pinterest / PINCache

Fast, non-deadlocking parallel object cache for iOS, tvOS and OS X
Apache License 2.0
2.66k stars 361 forks source link

Update project and installation methods (CocoaPods and Swift Package Manager) for Xcode 15 #327

Closed ghost closed 4 months ago

ghost commented 4 months ago

Background

As of April 29th, 2024, all apps submitted to the App Store must be built using Xcode 15 (ref: Apple News).

Additionally, all third-party SDKs are required/encouraged to include a Privacy Manifest file (ref: Apple Support).

Purpose

The purpose of these changes is to upgrade the project and bump the minimum deployment targets for Xcode 15:

These changes span across the following:

Additionally, the Swift Package Manager Package file points to a new "include" public header folder of symlinks. This allows the project to use angled bracket imports for public headers without having to suppress any warnings from clang.

This PR fulfills the following open issues and pull requests:

NOTE: A separate PR has been created on PINOperation with similar changes.

Attachments

PINCache after being installed via CocoaPods (also shows PINOperation PR for completeness):

PINCache - Installation - CocoaPods

PINCache targets after being installed via CocoaPods (the blue icon represents a resource bundle target that includes the Privacy Manifest file. also shows PINOperation PR for completeness):

PINCache - Targets - CocoaPods

PINCache unit tests passing:

PINCache - Unit Tests Passing
ghost commented 4 months ago

Ready for review.

NOTE: I have a similar PR to open for PINOperation, which I've linked in the PR description.

cc: @garrettmoon @garricn

rcancro commented 4 months ago

It looks a few of the checks are failing. In particular -[PINCacheTests testDiskCacheEmptyTrash] is failing, and CocoaPods + Carthage seem to be having issues.

ghost commented 4 months ago

@rcancro I've made all the necessary updates in this PR to work with the latest in PINOperation's master branch.

We won't be able to get all CI tests passing in this PR until a new PINOperation version is released and pushed to CocoaPods trunk.

In the meantime, I've attached a patch you can apply to verify this PR is passing all CI tests (except for CocoaPods). The patch points SPM and Carthage to PINOperation's master branch, which has the changes we merged earlier today. Unfortunately, there's no similar trick we can do for CocoaPods.

I'll wait for your reply before moving over to create a similar PR for PINRemoteImage.

Carthage + SPM CI tests passing patch: spm-carthage-passing-ci-tests.diff.zip NOTE: You can also view the results of this patch on my fork.

rcancro commented 4 months ago

@tstump-phunware Thanks for all your work! Let me try to get a new version of PINOperation pushed to CocoaPods.

rcancro commented 4 months ago

@tstump-phunware Thanks for all your work! Let me try to get a new version of PINOperation pushed to CocoaPods.

I'm trying to get the pod spec to lint without much luck. Code signing keeps failing. For sanity's sake, I tried to lint AlamoFire's pod spec and got the same errors. Part of me is tempted to give up on cocoapods in favor of SPM.

I'm going to be OOO starting tomorrow, but someone else should be looking into this.

ghost commented 4 months ago

@rcancro Thanks for the update.

I just locally ran a lint and simulated pushing the PINOperation podspec to CocoaPods trunk. Both commands ran as expected using Xcode 15.2 and CocoaPods 1.15.2:

pod lib lint --verbose
pod trunk push PINOperation.podspec --allow-warnings --verbose

I hope we can resolve this issue, as I currently depend on the CocoaPods installation method.

Enjoy your time off!

andyfinnell commented 4 months ago

@tstump-phunware Thanks for your patience on this! PINOperation is updated to 1.2.3 with your PR. For this PR, it looks like we just need to update Carthage, CocoaPods, and SPM to use that version, then revert the CHANGELOG.md, and we should be good to go.

ghost commented 4 months ago

@andyfinnell Thanks for helping to move this PR along!

I've updated the PR with everything we talked about (using PINOperation 1.2.3 for CocoaPods, SPM, and Carthage, as well as reverting changes to CHANGELOG.md).

All CI tests are now passing on my fork, so we should be good to go!

ref: https://github.com/tstump-phunware/PINCache/actions/runs/9037258343/job/24835893412.

andyfinnell commented 4 months ago

@tstump-phunware ...and we're merged! Thank you again for all your work on this! I have a couple of other PRs to merge, then I'll roll a new release with this in it.

ghost commented 4 months ago

@andyfinnell Wohoo! Sounds good about the upcoming release -- I can't wait! 🚀

I owe you guys a PR on PINRemoteImage with similar changes. I should have that ready by early next week.

I'll keep an eye out for the new PINCache release.