stephencelis / SQLite.swift

A type-safe, Swift-language layer over SQLite3.
MIT License
9.57k stars 1.54k forks source link

Version 0.15.0 Not Applied in CocoaPods #1250

Closed sihon321 closed 2 months ago

sihon321 commented 3 months ago

I'm using SQLite from CocoaPods, and I want to use the latest 0.15.0 version that includes an updated privacy manifest file. However, it seems that the update has not yet been reflected on CocoaPods (https://cocoapods.org/pods/SQLite.swift).

When I run 'pod lib lint --allow-warnings' in the terminal, it appears that Twitter URL is causing an error. I would greatly appreciate it if you could address this issue.

Thank you.

pod lib lint --allow-warnings

 -> SQLite.swift (0.15.0)
    - NOTE  | url: The URL (https://twitter.com/stephencelis) is not reachable.
    - ERROR | [iOS] unknown: Encountered an unknown error (/usr/bin/xcrun simctl list -j devices

xcrun: error: unable to find utility "simctl", not a developer tool or in PATH
) during validation.

[!] SQLite.swift did not pass validation, due to 1 error.
You can use the `--no-clean` option to inspect any issue.
nathanfallet commented 3 months ago

I'm unable to publish the update due to the issue I mentioned in #1237. There is somewhere the minimum version of iOS is too low and I don't find where, and this is what makes the update not passing. So I'll publish a new version (with visionOS support at the same time) as soon as we fix that.

tomieq commented 3 months ago

Hello, this issue blocks my release which in fact blocks my client's release. We want to upgrade dependencies, release and run all the tests before April. The same our client. Do you know what are the plans(the dates) to fix this issue? Thank you.

SagarSDagdu commented 2 months ago

Hello @nathanfallet , Is it possible that we release 0.15.0 on Cocoapods (with the privacy manifest added) without visionOS support and then work on adding visionOS support in later versions? As @tomieq mentioned in the above comment, we too have a dependency on this Pod in our framework, and hence that is blocking our client in turn. Any help here would be highly appreciated!

nathanfallet commented 2 months ago

@SagarSDagdu the problem is that when I tried to upload the last update from the master branch it got rejected because of that iOS minimal requirement, I changed it but I'm unable to find the one missing it stills says it's not the correct version (I Cmd+F it and don't find it anywhere)

SagarSDagdu commented 2 months ago

Hi @nathanfallet , I spent a couple of days on this issue and I have come up with a bare minimum solution needed to push the spec to Cocoapods repo 🚀 ✅

Minimum deployment targets issue

Issue Description

As mentioned here, the issue happens because when we run pod lib lint, Cocoapods generates Xcode projects with minimum deployment targets that are not supported by Xcode 15. Hence xcodebuild throws an error in the build process and the lint fails.

Solution

Step 1

As the Cocoapods main repo has this bug, I created a fork (reused an existing fork) - https://github.com/SagarSDagdu/CocoaPods

Step 2

I incremented the minimum deployment targets for each of the platforms in my fork of Cocoapods and created a release. The changes can be seen here and the release can be seen here

Step 3

Now in SQLite.swift, I wanted to use this fork instead of the global one. I did that by creating a Gemfile at the root of this repo, and adding the following statement to the file:

gem 'cocoapods', :git => 'https://github.com/SagarSDagdu/CocoaPods.git', tag: '1.15.2.1-sagard'

and then running bundle install to install my copy of Cocoapods.

Step 4

Making changes to this project for minimum deployment targets - I have demonstrated the changes here: https://github.com/stephencelis/SQLite.swift/pull/1255

After these changes, when I run

bundle exec pod lib lint SQLite.swift.podspec --no-clean --allow-warnings --verbose

the validation passes. 🚀

Let me know if you need any help in the above steps, I am happy to help and get this sorted so that we can have a new version of this awesome library available on Cocoapods.

Screenshot 2024-04-13 at 8 28 38 AM
SagarSDagdu commented 2 months ago

As a result of the above, I think we will need to drop support for iOS 11 in 0.15.0 (As app store requires all apps to be submitted using Xcode 15, and Xcode 15 does not support iOS 11)

SagarSDagdu commented 2 months ago

@nathanfallet The simplest way to test out what I have done is, checkout to the mentioned branch, run bundle install and then try linting the podpsec

nathanfallet commented 2 months ago

@SagarSDagdu thank you for your investigation, I'll have a look now and try to publish that version! So if I understand well, the issue comes from cocoapods itself, so every library using cocoapods is blocked with this? And if yes how is this issue still not resolved on their side?

SagarSDagdu commented 2 months ago

@nathanfallet Yes, the issue comes from Cocoapods itself! Other libraries are also facing this issue, for example, here is a link to an issue that is open in GRDB which is exactly what we are talking about here. This is happening with other lib maintainers too.

There is an issue open on the Cocoapods Repo: https://github.com/CocoaPods/CocoaPods/issues/11839 but the maintainers have not fully acknowledged it (you can go through the entire comments on this issue to get to know how I have come to the above solution I have implemented)

nathanfallet commented 2 months ago

image Thank you @SagarSDagdu for your help!