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

Non-public API usage on Mac Catalyst #846

Closed
harryworld opened this issue Oct 5, 2020 · 7 comments
Closed

Non-public API usage on Mac Catalyst #846

harryworld opened this issue Oct 5, 2020 · 7 comments
Labels

Comments

@harryworld
Copy link

This may likely an issue from App Store, but I'm curious if anyone experienced this and has suggestion on what to do next.

What did you do?

Submit Mac Catalyst app with the use of GRDB.swift

Besides, I can also confirm that both iOS app and AppKit Mac app are working

What did you expect to happen?

The binary can be submitted and processed successfully

What happened instead?

Binary is invalid with the following email message

ITMS-90338: Non-public API usage - The app references non-public symbols in Contents/Frameworks/GRDB.framework/Versions/A/GRDB: _sqlite3_snapshot_cmp, _sqlite3_snapshot_free, _sqlite3_snapshot_get. If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed. For further information, visit the Technical Support Information at http://developer.apple.com/support/technical/

Environment

GRDB flavor(s): GRDB default
GRDB version: 5.0.1
Installation method: CocoaPods
Xcode version: 12.0 official
Swift version: 5.1
Platform(s) running GRDB: Mac Catalyst
macOS version running Xcode: 10.15.6

Demo Project

https://github.com/harryworld/TestGRDB

This is really basic repo, by just adding GRDB via Cocoapods and doing nothing else

@groue
Copy link
Owner

groue commented Oct 5, 2020

Hello @harryworld,

Thanks for reporting this issue. GRDB 5 indeed uses SQLite snapshots, in a way that is questionable. Those apis are not exposed in the SQLite headers that ship with the various SDKs, but it happens that a library or an application can link against them.

I assumed this was a oversight in the headers.

Your issue reveals that it is actually verboten, and that this needs to be fixed at the GRDB level.

A fix will be released in the next few days.

See also #845 for a related issue.

@harryworld
Copy link
Author

Thanks for the quick response @groue
So when was snapshot added? I would like to try a previous version prior to the addition of this.

@groue
Copy link
Owner

groue commented Oct 5, 2020

You can go back to the latest GRDB 4 version. I can be quite fun to reverse the migration guide to GRDB 5 ;-)

@harryworld
Copy link
Author

At least with the sample repo, I can confirm that GRDB 4.x works

@diatoming
Copy link
Contributor

Had the same problem with Mac App Store here, back to GRDB 4 version solve the problem.
Please note Apple review may still treat the new build as using private API even it is built with GRDB 4, if you submit a new build too fast.
I submit new build with GRDB 4 after the first rejection, and rejected again.
I then submit the same build again immediately, and the review happened the next day, then it passed.
So You may need to wait for one day for the new build review.

And looking forward to the fix, i use GRDB in all my apps.
Thank you very much @groue

@harryworld
Copy link
Author

@groue I can confirm the proposed 5.0.2 currently in development can be submitted to App Store
Since the issue was only with Mac Catalyst, I guess iOS or macOS can still turn this on for optimization purpose

@groue
Copy link
Owner

groue commented Oct 6, 2020

Thank you all for your messages and patience. The fix has shipped in GRDB 5.0.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants