-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Nested sqlite3 framework causing app store rejection #88
Comments
Looks like just removing sqlite3 from Frameworks and Embed Frameworks took care of the issue. Crisis averted! |
@kklobe Removing them from your target or the SQLite framework target? Does everything still function afterward? |
From the SQLite framework target, e.g. the following diff in SQLite.swift/SQLite.xcodeproj/project.pbxproj:
Yep, everything seems to still works fine. Well, basic insert, update and delete anyways. |
Test a clean (kill your derived data) and clean install on device to be safe. It's easy to get linker errors with nested frameworks, but there's no good alternative till Apple includes a module map for libsqlite3. |
I cracked open the .IPA from both builds (wiping DerivedData between builds), and the working/accepted one definitely had no nested sqlite3 framework. |
I'm just wondering how it could possibly work if that's the case. The first query should crash the app. If it works, though, that's good to hear. Keep me posted if you have problems. I may have to bring back my bridging header hack. |
I haven't worked at all with modules/embedded frameworks, so I haven't been able to figure out exactly what problem sqlite3 as a framework is designed to solve. What is contained in that embedded 108k sqlite3 file I see in my original rejected .IPA? Is it just the libsqlite3.dylib repackaged? |
OS X and iOS don't currently ship with module maps that point to system headers for common libraries like SQLite3 ( Meanwhile, framework targets:
The embedded sqlite3 framework is a "dummy" module that tries to address (most of) the above. It allows the SQLite framework to import the system libsqlite3 library into Swift transparently. Workarounds that other libraries use:
The embedded framework was the cleanest, seemingly valid solution I could come up with, but because it possibly causes linker issues, I may have to rethink things and go back to the bridging header hack. Alternatively, I may have to add a build script that copies the appropriate system header into the framework. |
Thanks for the explanation! So, a couple more questions: My app is clearly running just fine. The only change I've made to the SQLite project was the removal of sqlite3. Is the runtime dependency handled by having libsqlite3.dylib in "Linked Frameworks and Libraries"? In other words, is the embedded sqlite3 target really only required for compilation? |
@kklobe I believe so. I'll have to do some testing locally. Thanks for the heads-up! |
Hi, |
(Butterfingers.) |
I managed to pass the submission step. I did the same as @kklobe, and also had to remove SQLite from Linked Frameworks and Libraries in the General tab of my frameworks. |
Great! I'll try to get the fix in after testing it soon. |
I'm building my app after upgrading to Xcode 6.3 GM and updating to the latest commit (fc086d0). When I try to submit a binary to the app store, I get rejected for a nested framework:
The text was updated successfully, but these errors were encountered: