Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[URGENT] Fix CocoaPods and Swift Package Manager Installation Methods #872

Conversation

ghost
Copy link

@ghost ghost commented May 30, 2024

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:
FMDB - CocoaPods - Linting

This screenshot demonstrates successfully resolving the Privacy Manifest file via Swift Package Manager:
FMDB - Swift Package Manager

This screenshot demonstrates successfully installing FMDB into my application (which can now be archived for release):
FMDB - CocoaPods - Installation
*screenshot was taken before I fixed a typo in the resource bundle name

@ghost
Copy link
Author

ghost commented May 30, 2024

Ready for review.

@ccgus @incanus I kept the number of changes as small as possible, while also making it convenient for you guys to release a new version purely using this PR's changes. Feel free to edit as you see fit!

NOTE: As of April 29th, 2024, all apps submitted to the App Store must be built using Xcode 15 (ref: Apple News). Xcode 15.0 supports Swift 5.9, iOS 12+, and tvOS 12+, which is why I bumped the corresponding versions in both FMDB.podspec and Package.swift.

@ghost ghost force-pushed the bugfix/cocoapods_and_spm_installation_methods branch from 997d804 to f35e2e6 Compare May 30, 2024 20:05
@ghost ghost force-pushed the bugfix/cocoapods_and_spm_installation_methods branch from f35e2e6 to 0cb9d77 Compare May 30, 2024 22:53
@ccgus
Copy link
Owner

ccgus commented May 31, 2024

Thanks for doing this. I'll hopefully have the time to review this soon and get it up.

@ghost
Copy link
Author

ghost commented Jun 1, 2024

Sounds like a plan, @ccgus 💪

Thanks for all that you've been doing recently to support the community + Apple's new requirements ❤️

@ghost
Copy link
Author

ghost commented Jun 25, 2024

@ccgus Just checking in to see if there's anything I can do to help here? I'm more than happy to help with preparing/pushing this release out (I manage the release process of closed source SDKs at the company I work for and am no stranger to pushing new CocoaPods specs to CocoaPods trunk).

@ccgus
Copy link
Owner

ccgus commented Jun 29, 2024

@tstump-phunware I've just been super busy with higher priority things at the moment, and CocoaPods likes to fight me for some reason.

@ghost
Copy link
Author

ghost commented Jun 30, 2024

Roger that! 🫡

@lokii49
Copy link

lokii49 commented Jul 1, 2024

@tstump-phunware Will this address our issue, if yes @ccgus please consider this as high priority. This is a blocker to us.
#873

@ccgus ccgus merged commit 1227a3f into ccgus:master Jul 2, 2024
@ccgus
Copy link
Owner

ccgus commented Jul 3, 2024

A new version of FMDB is up on CocoaPods with this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants