[URGENT] Fix CocoaPods and Swift Package Manager Installation Methods #872
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.
Background
After pushing the 2.7.11 release to CocoaPods trunk, the CocoaPods installation method is broken for people who use the following library subspec:
FMDB/SQLCipher
The issue is seen only when archiving an application for release, which fails because both the FMDB/SQLCipher subspec and SQLCipher dependency are including a Resource Bundle with the same name ("SQLCipher"). Below is the error output from xcodebuild:
error: Multiple commands produce '.../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/SQLCipher.bundle' note: Target 'FMDB-SQLCipher' (project 'Pods') has create directory command with output '.../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/SQLCipher.bundle' note: Target 'SQLCipher-SQLCipher' (project 'Pods') has create directory command with output '.../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/SQLCipher.bundle'
Purpose
The purpose of these changes is to fix CocoaPods and Swift Package Manager installation methods by correctly bundling the newly introduced Privacy Manifest resource file, while avoiding Resource Bundle name collisions.
NOTE: I've recently helped other popular libraries resolve similar issues, such as Pinterest's PINCache.
This screenshot demonstrates successfully linting via CocoaPods, which includes the standalone subspecs that were temporarily disabled:
This screenshot demonstrates successfully resolving the Privacy Manifest file via Swift Package Manager:
This screenshot demonstrates successfully installing FMDB into my application (which can now be archived for release):
*screenshot was taken before I fixed a typo in the resource bundle name