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

get CocoaPods back on the rails #860

Closed
1 task done
incanus opened this issue Feb 8, 2024 · 24 comments
Closed
1 task done

get CocoaPods back on the rails #860

incanus opened this issue Feb 8, 2024 · 24 comments

Comments

@incanus
Copy link
Collaborator

incanus commented Feb 8, 2024

I'm taking a look at pushing the latest stable release, 2.7.8, to CocoaPods per @ccgus, who has made me a maintainer there. After success with that, I will push new versions going forward, too.

Two things are needed for this to happen:

  • [ ] A tag of 2.7.8 needs to be created.

    A tag for v2.7.8 already exists, but past versions since 2.7.1 have used a tag name without the v and the release's Podspec would benefit from having this tag naming pattern without requiring other changes. Optionally, the old v2.7.8 (and v2.7) tag could be deleted for tidiness and to avoid confusion in the future, but it's not required, and possibly could break downstream users.

    This is needed since the Podspec refers to the version to know which :tag to check out.

    I have tested this tag creation in a fork and it resolves the issue if that repo is used in the Podspec instead of this one.

  • I will then pod trunk push FMDB.podspec from 2.7.8 2.7.9 per the guide.

Obsoletes #853 & #857.

@incanus
Copy link
Collaborator Author

incanus commented Feb 8, 2024

Per discussion with @ccgus we're going to go with 2.7.9 and beyond on CocoaPods. He made the tag and I'm going to push. Currently I'm getting linter errors despite the Pod working in Mac/iOS sample projects, so I'll keep at that.

linter output
$ pod trunk push --allow-warnings

[!] Found podspec `FMDB.podspec`
Updating spec repo `trunk`
Validating podspec
 -> FMDB (2.7.9)
    - NOTE  | [FMDB/standard, FMDB/FTS, FMDB/standalone, and more...] xcodebuild:  note: Using codesigning identity override: -
    - NOTE  | [FMDB/standard, FMDB/FTS, FMDB/standalone, and more...] xcodebuild:  note: Building targets in dependency order
    - NOTE  | [FMDB/standalone, FMDB/standalone-fts, FMDB/SQLCipher, and more...] xcodebuild:  note: Target dependency graph (4 targets)
    - NOTE  | [FMDB/standard, FMDB/FTS, FMDB/SQLCipher, and more...] xcodebuild:  note: Signing static framework with --generate-pre-encrypt-hashes (in target 'Pods-App' from project 'Pods')
    - NOTE  | [FMDB/standard, FMDB/FTS, FMDB/standalone, and more...] xcodebuild:  /var/folders/4_/5s0y5tg88xj76q001s7946d00000gn/T/CocoaPods-Lint-20240208-5713-8oilen-FMDB/App.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.2.99. (in target 'App' from project 'App')
    - NOTE  | [FMDB/standard, FMDB/FTS, FMDB/standalone, and more...] xcodebuild:  Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.2.99. (in target 'Pods-App' from project 'Pods')
    - NOTE  | [iOS] xcodebuild:  Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.2.99. (in target 'FMDB-FMDB' from project 'Pods')
    - NOTE  | [FMDB/standard, FMDB/FTS, FMDB/standalone, and more...] xcodebuild:  Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.2.99. (in target 'FMDB' from project 'Pods')
    - NOTE  | [FMDB/standard, FMDB/FTS, FMDB/standalone, and more...] xcodebuild:  note: Using codesigning identity override: 
    - ERROR | [FMDB/standard, FMDB/FTS, FMDB/standalone, and more...] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
    - NOTE  | [FMDB/standard, FMDB/FTS, FMDB/standalone, and more...] xcodebuild:  xcodebuild: error: Found no destinations for the scheme 'App' and action clean.
    - NOTE  | [FMDB/standard,FMDB/FTS] xcodebuild:  note: Target dependency graph (3 targets)
    - NOTE  | [FMDB/standalone,FMDB/standalone-fts] xcodebuild:  clang: error: SDK does not contain 'libarclite' at the path '/Applications/Xcode-15.2.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a'; try increasing the minimum deployment target
    - NOTE  | [FMDB/standalone,FMDB/standalone-fts] xcodebuild:  Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 12.0 to 17.2.99. (in target 'sqlite3' from project 'Pods')
    - NOTE  | [FMDB/standalone,FMDB/standalone-fts] xcodebuild:  clang: error: SDK does not contain 'libarclite' at the path '/Applications/Xcode-15.2.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_macosx.a'; try increasing the minimum deployment target
    - NOTE  | [FMDB/standalone,FMDB/standalone-fts] xcodebuild:  Pods.xcodeproj: warning: The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET' is set to 10.6, but the range of supported deployment target versions is 10.13 to 14.2.99. (in target 'sqlite3' from project 'Pods')
    - NOTE  | [iOS] [FMDB/SQLCipher] xcodebuild:  Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.2.99. (in target 'SQLCipher' from project 'Pods')

[!] The spec did not pass validation, due to 1 error.

@incanus
Copy link
Collaborator Author

incanus commented Feb 8, 2024

My hunch here is that there are problems in the project that linting exposes. At first I thought maybe they were only x86_64, but there are also arm64 issues.

Full verbose linter log (~12k lines):

https://gist.github.com/incanus/9c957f803931534d6207499de1635f45

Pulling out the relevant lines, the problems seem to be related to compiling the sqlite3 binary.

e.g.

Ld /Users/incanus/Library/Developer/Xcode/DerivedData/App-ayhqlhdpentoorfyiubetjbkpbaq/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/sqlite3.build/Objects-normal/arm64/Binary/sqlite3 normal arm64 (in target 'sqlite3' from project 'Pods')

and

Ld /Users/incanus/Library/Developer/Xcode/DerivedData/App-ayhqlhdpentoorfyiubetjbkpbaq/Build/Intermediates.noindex/Pods.build/Release/sqlite3.build/Objects-normal/x86_64/Binary/sqlite3 normal x86_64 (in target 'sqlite3' from project 'Pods')

both fail.

@incanus
Copy link
Collaborator Author

incanus commented Feb 9, 2024

I've at least now figured out that only the standalone and standalone-fts subspecs are failing. The other three succeed.

@incanus
Copy link
Collaborator Author

incanus commented Feb 9, 2024

Confirmed that pod spec lint passes if both the standalone and standalone-fts subspecs are commented out.

Looking a bit closer at these subspecs, both use the sqlite3 pod as a dependency, vs. the other subspecs which use the system-provided sqlite3 as a library.

And the sqlite3 pod seems to have an old deployment target set, which causes the problems with libarclite

e.g.

    - NOTE  | [iOS] [FMDB/standalone] xcodebuild:  clang: error: SDK does not contain 'libarclite' at the path '/Applications/Xcode-15.2.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a'; try increasing the minimum deployment target
    - NOTE  | [iOS] [FMDB/standalone] xcodebuild:  Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 12.0 to 17.2.99. (in target 'sqlite3' from project 'Pods')

So the next step would be to try building against a local checkout of the upstream sqlite3 pod with these settings adjusted. If that works, maybe we can convince upstream to bump up the deployment target.

@incanus
Copy link
Collaborator Author

incanus commented Feb 13, 2024

It looks like we are blocked on pushing a release to CocoaPods until the upstream clemensg/sqlite3pod#22 is solved, potentially with the pull request clemensg/sqlite3pod#23. This will fix the deployment targets issue for the sqlite3 pod that we are using in those subspecs, allowing our Podspec to lint, which is required for pod trunk push to work.

I looked into testing this theory by cloning the upstream sqlite3 repo and pointing to it locally, but that's not allowed in library Podspecs, only in project Podfiles which use the library.

So I can't actually successfully lint the FMDB Podspec if it includes the standalone or standalone-fts subspecs as a result, blocking publish (AFAICT).

@incanus
Copy link
Collaborator Author

incanus commented Feb 14, 2024

I should add that with this as with any use of FMDB via CocoaPods, you could always clone this repo locally and point to it with:

pod 'FMDB', :path => '/path/to/fmdb'

Of course, the standalone and standalone-fts subspecs won't work this way either.

@ccgus Should we consider removing those subspecs for now so that we can publish until the upstream issue is solved?

@ccgus
Copy link
Owner

ccgus commented Feb 26, 2024

Yea, let's comment out standalone , standalone-fts , and SQLCipher just to get things working again. … which I've just done.

@incanus
Copy link
Collaborator Author

incanus commented Feb 27, 2024

Ok, working off of @ccgus' change in 84d81a5 gets things to lint... on iOS and Mac. WatchOS still fails where it didn't before. Will dig into that.

Easiest way to verify is:

  • pod spec lint --verbose --allow-warnings --fail-fast --platforms=ios,macos (success)
  • pod spec lint --verbose --allow-warnings --fail-fast --platforms=watchos (failure)

@incanus
Copy link
Collaborator Author

incanus commented Feb 27, 2024

The problem would be that I didn't have a WatchOS simulator installed. Discovered via CocoaPods/CocoaPods#11558.

I'm pleased to report: 🎺🎺🎺

--------------------------------------------------------------------------------
 🎉  Congrats

 🚀  FMDB (2.7.9) successfully published
 📅  February 27th, 10:04
 🌎  https://cocoapods.org/pods/FMDB
 👍  Tell your friends!
--------------------------------------------------------------------------------

@ccgus I'll leave it to you as to whether to close this or not, given the standalone subspec issues.

@ccgus
Copy link
Owner

ccgus commented Feb 27, 2024

Woo!

@ccgus
Copy link
Owner

ccgus commented Feb 27, 2024

Thanks so much @incanus !

@brendand
Copy link

Is SQLCipher coming back online anytime soon? I was just trying to update my pods and I got the following error:

[!] CocoaPods could not find compatible versions for pod "FMDB/SQLCipher":
  In Podfile:
    FMDB/SQLCipher (from `https://github.com/ccgus/fmdb.git`)

None of your spec sources contain a spec satisfying the dependency: `FMDB/SQLCipher (from `https://github.com/ccgus/fmdb.git`)`.

You have either:
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

I use FMDB with SQLCipher from CocoaPods. Thanks.

@ccgus
Copy link
Owner

ccgus commented Mar 25, 2024

@brendand none of the maintainers use SQLCipher, so we rely on folks like you to submit a patch for it.

@brendand
Copy link

Is there more to it than just uncommenting the SQLCipher section of the Podspec? I've never worked on any Cocoapods things before. I just use them when available and I've been using FMDB / SQLCipher for years. @incanus said above that it was only the standalone and standalone-fts builds that failed. The other three succeeded. I'm assuming the SQLCipher one succeeded. So it was odd that it was also commented out from the Podspec.

@incanus
Copy link
Collaborator Author

incanus commented Mar 26, 2024 via email

@incanus
Copy link
Collaborator Author

incanus commented Mar 27, 2024

The SQLCipher subpec does indeed seem to pod lint successfully for me if uncommented. I'll leave it to @ccgus as to why he might have commented it out, but I think it may have been accidental — I certainly didn't notice it before. Like the main subspecs, it uses the system SQLite instead of the upstream SQLite pod which is the thing causing problems for us. It does however rely on the upstream SQLCipher pod, but so far that does not seem to be problematic for us.

@brendand
Copy link

Excellent. Hopefully the SQLCipher item can be uncommented and I can update my pods again. Thanks @incanus

@ccgus
Copy link
Owner

ccgus commented Mar 27, 2024

I'll uncomment it. I took it out to make getting the CocoaPods stuff working and the plan was to bring it back if folks complained :)

@ccgus
Copy link
Owner

ccgus commented Mar 27, 2024

OK, it's back up. @incanus can you do the magic cocoapods stuff when you get a chance? (Or … do I need to release a new version?)

@incanus
Copy link
Collaborator Author

incanus commented Mar 27, 2024 via email

@ccgus
Copy link
Owner

ccgus commented Mar 27, 2024

@incanus Done! https://github.com/ccgus/fmdb/releases/tag/2.7.10

@incanus
Copy link
Collaborator Author

incanus commented Mar 31, 2024

Sorry, just getting a chance to look at this. @ccgus we need the version updated to 2.7.10 in the podspec itself — this should typically come before the Git tag. I didn't notice until I went to push — things linted fine but then I got a duplicate version error.

@incanus incanus mentioned this issue Mar 31, 2024
@ccgus
Copy link
Owner

ccgus commented Apr 1, 2024

I've added the tag and pushed it up. I can do another release (2.7.11!) if needed.

@incanus
Copy link
Collaborator Author

incanus commented Apr 2, 2024

Per #432 (comment) we have updated the podspec version as well as enabled tvOS support, then moved the tag since it only affected CocoaPods stuff and nothing code-wise. Version 2.7.10 is pushed!

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

No branches or pull requests

3 participants