OP-Engineering / op-sqlite

Fastest SQLite library for react-native by @ospfranco
MIT License
593 stars 41 forks source link

Minimum iOS Version rejected by App Store validation #144

Closed devYonz closed 2 months ago

devYonz commented 2 months ago

BEFORE YOU START!!! DID YOU TAKE A LOOK AT THE DOCUMENTATION?

https://ospfranco.notion.site/OP-SQLite-Documentation-a279a52102464d0cb13c3fa230d2f2dc?pvs=74

Describe the bug Apple app store bundle validation is rejecting the bundle due to a minimum OS error

Asset validation failed (90208)
Invalid Bundle. The bundle Vella.app/Frameworks/sqlitevec.framework does not support the minimum OS Version specified in the Info.plist. (ID: 1ea065d0-5f0d-4dc2-a148-b486dd106c30)

Versions:

Link Reproducible example Error occurs on app store submit

Proposed Solution Bump the minimum os version to 13+, current expo apps are set to default to 13.4 deployment target.

devYonz commented 2 months ago

I'm not clear on why sqlitevec specifically causes trouble but chatGPT seems to indicate that the embeddable frameworks are different from source dependencies and Apple requires matching minimums.

For Embedded Frameworks:
They require their own deployment target specifications because they are separate bundles that need to conform to the app’s target OS version requirements.
If a framework is outdated (e.g., has a minimum deployment target of iOS 8.0) and your app targets a newer iOS version (e.g., iOS 13.4), you must update the framework’s deployment target to match or exceed the app's target.

For Static Libraries and Source Code:
They are integrated directly into the app's codebase or binary, so their compatibility with the app's target OS version is implicitly managed by the app’s deployment target settings.
They do not require separate **Info.plist files** or framework-specific deployment targets.
ospfranco commented 2 months ago

Weird. Can you try manually editing the file inside:

node_modules/@op-engineering/op-sqlite/ios/sqlite.xcframework/ios-arm64/sqlitevec.framework/Info.plist

And change the deployment target? Seems unlikely though, because the crsqlite.framework uses the exact same Info.plist and I guess that works fine (it's the same one expo uses). I guess rather it is some issue with the compilation.

ospfranco commented 2 months ago

I think what the issue might be. I didn't specify a minimumm OS version when compiling the binary. Version 3.4.1 is published. Give that a try please.

devYonz commented 2 months ago

Weird. Can you try manually editing the file inside:

I tried that initially and it didn't work https://github.com/devYonz/op-sqlite

Version 3.4.1 is published. Give that a try please

I tried 7.4.1 and I still get the error. I also rebased my fork devYonz/op-sqlite with the new binaries and I still get the error. What did you use for the minimumm OS version? on my branch I updated all the info.plist files to 13.4

ospfranco commented 2 months ago

Minimum OS is 8. For your app it shouldn't matter. It's about how the C code is compiled in the sqlite-vec binary.

ospfranco commented 2 months ago

Make sure you clear the derived data directory as well as doing a clean build before submitting to the app store.

devYonz commented 2 months ago

Minimum OS shouldn't matter in most cases but something about the way sqlitevec is added creates a demand on the top level App requirement. Other dependencies don't have the same side effect.

I've nuked everything, did xcode clean, rm rf ios & node_modules and etc... It didn't help. Can you try rebuilding with 13.4 as min just on sqlitevec? Or if you have some instructions on compiling sqlite-vec I can play with the binary.

I'm not clear on why sqlitevec specifically causes trouble but chatGPT seems to indicate that the embeddable frameworks are different from source dependencies and Apple requires matching minimums.

For Embedded Frameworks:
They require their own deployment target specifications because they are separate bundles that need to conform to the app’s target OS version requirements.
If a framework is outdated (e.g., has a minimum deployment target of iOS 8.0) and your app targets a newer iOS version (e.g., iOS 13.4), you must update the framework’s deployment target to match or exceed the app's target.

For Static Libraries and Source Code:
They are integrated directly into the app's codebase or binary, so their compatibility with the app's target OS version is implicitly managed by the app’s deployment target settings.
They do not require separate **Info.plist files** or framework-specific deployment targets.

I've narrowed down that it is in the linking / binary after uncompressing the app.ipa.

devYonz commented 2 months ago

Steps to reproduce the app store error using @devYonz/op-sqlite-vec repo

  1. clone https://github.com/devYonz/op-sqlite-vec
  2. eas build --local --profile ios
    • Needs an expo account
    • Needs an app store account
  3. Submit with Transporter
Asset validation failed (90208)
Invalid Bundle. The bundle embedopsql.app/Frameworks/sqlitevec.framework does not support the minimum OS Version specified in the Info.plist. (ID: 959c6673-7dfb-4fa1-8325-29f6b4e56202)

Here is the generated build after changing the name from .ipa -> .zip. build-1726421035081.zip

Furthermore, https://github.com/devYonz/op-sqlite shows that even if the plist values and minimums are set to 13.4 the binary will need to also be compiled to that. Again, the error is only on sqlitevec which is coming in as a framework i think.

devYonz commented 2 months ago

🥳 SUCCESS, issue is resolved with v7.4.2