OneSignal-iOS-SDK icon indicating copy to clipboard operation
OneSignal-iOS-SDK copied to clipboard

[Bug]: Asset validation failed (50) The app references non-public selectors in Payload/Runner.app/Frameworks/OneSignalFramework.framework/OneSignalFramework: setSharedInstance

Open Eddayy opened this issue 1 year ago • 5 comments

What happened?

When I upload my app to apple connect, apple will reject the ipa and says the app has non public selectors. I'm also using flutter and fastlane to upload to app store, i've also post this in the flutter repo but i think here is relevant since it's a bug on the native code?

Steps to reproduce?

1. Install `onesignal_flutter: ^5.1.0`
2. Follow setup guide
3. Build IPA
4. Upload to Apple connect

What did you expect to happen?

For the ipa to uploade successfully

OneSignal iOS SDK version

5.1.0

iOS version

15

Specific iOS version

No response

Relevant log output

[!] Error uploading ipa file: 
 [Application Loader Error Output]: ERROR: [ContentDelivery.Uploader] Asset validation failed (50) The app references non-public selectors in Payload/Runner.app/Frameworks/OneSignalFramework.framework/OneSignalFramework: setSharedInstance: (ID: 4b3297b1-4a68-4ade-aa94-b1cc19f3b90d)
[Application Loader Error Output]: Error uploading '/var/folders/bf/fz1p4pms3k5bjl9x1sqvzf880000gp/T/ed36fbfb-4a1e-481c-86ae-dfa20e10ed76.ipa'.
[Application Loader Error Output]: Asset validation failed The app references non-public selectors in Payload/Runner.app/Frameworks/OneSignalFramework.framework/OneSignalFramework: setSharedInstance: (ID: 4b3297b1-4a68-4ade-aa94-b1cc19f3b90d) (50)

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

Eddayy avatar Feb 14 '24 08:02 Eddayy

Hi @Eddayy,

Is this the first time you are uploading with the OneSignal SDK?

Have you succeeded before?

I am confused by this error because the only call the SDK makes to a method called setSharedInstance is the SDK's own method, and not a non-public selector. Here.

Can you try again?

I looked up this error. Make sure that you are distributing your app using the release scheme instead of the debug scheme, or try again as some people reported flakiness with the validation.

nan-li avatar Feb 14 '24 21:02 nan-li

Thanks for the speedy response!

Yes, this is the first time I've uploaded with OneSignal SDK, I've tried again and apple still rejects my uploads, I also confirmed that I'm using release scheme. Is there any info I can provide to help?

Eddayy avatar Feb 15 '24 02:02 Eddayy

Oh if I downgrade to 3.12.7, I can upload to apple.

Eddayy avatar Feb 15 '24 06:02 Eddayy

looking around, seems like the solution is just to rename the method https://github.com/GetStream/stream-chat-swift/issues/1177

Eddayy avatar Feb 15 '24 07:02 Eddayy

Seems like a false negative on Apple's app review. We can make the change, but I am surprised this hasn't been reported by anyone else before.

nan-li avatar Feb 22 '24 17:02 nan-li