Repository navigation
fix(connections): write connection files that iPhone and older Macs can open - #3685
Merged
Merged
Conversation
…an open Every export since 0.80 was format 2, so iPhone build 22 and Macs on 0.79 or earlier refused it as needing a newer version. Write format 1 whenever it reads back as the same bundle, and format 2 only for saved queries, query folders or nested groups. Both import sheets now keep the passphrase step only for a wrong passphrase; any other failure after decryption shows the error screen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
decryptionFailed.Tests changed on purpose, since an empty or flat bundle is now format 1:
headerIsAlwaysWritten,emptyFileDecodes(nowemptyFileOpens),exportWritesCurrentFormatWithoutQueries(iOS, nowexportWritesFormatOneWithoutQueries) andencryptedRoundTrip(looks up the decoded ref). A format 1 file numbers connections by position, so the iOS import testsonlyUsedGroupsAndTagsAreCreated,secondReplaceIsRefusedandreplaceKeepsLocalStatefind their rows by name instead of the refs they built.bundleWithCredentialsandencryptedFileDecodesAsVersionTwogained a saved query or a nested group so they keep testing format 2.Docs: TableProApp/docs#54.
Test plan
swift test --filter TableProImportTests: 214 passed. Onmain, 5 of the new cases fail, among them a flat file through the frozen format 1 reader, plain and encrypted with index-keyed credentials.ConnectionBundleExporterTests,TeamCatalogPublisherTests,WelcomeViewModelLinkedConnectionTests,WelcomeViewModelTests: 80 passed. The new Team Catalog case checks a flat connection publishes format 1 and a subgroup one format 2 with its full group path.IOSConnectionImportServiceTests,IOSConnectionExportServiceTests,IOSConnectionExportFileDataTests,IOSConnectionImportIconTests,MacOnlyImportRowTests: 64 passed.Not in this PR
mainships. That build already reads format 2.