Onesignal-ios-sdk: Dylib unsafe error for NotificationServiceExtension using Carthage

Created on 21 Apr 2017  ·  11Comments  ·  Source: OneSignal/OneSignal-iOS-SDK

: Linking against a dylib which is not safe for use in NotificationServiceExtension: .../Carthage/Build/iOS/OneSignal.framework/OneSignal

Can you please tell me why I am getting this error and what I can do to avoid it? I could only find a single OneSignal.framework in my Carthage folder and I used it for both the app and the NotificationServiceExtension. I think this was probably wrong, but I can't find a separate 'safe' OneSignal.framework for NotificationServiceExtensions. Please advise. Thank you.

Most helpful comment

I can confirm that this is still happening (Xcode 8, Xcode 9) with a manual integration of OneSignal (not using Carthage), and has been for a few months now.

Like others, I'm a bit concerned about App Store rejection.

All 11 comments

@mommyme We tested our notification service extension with Carthage and it fires without an issue. We will research if there is a way to clean up this warning.

Have you found anything? I still have the warning.

@mommyme We haven't seen any side effects to this warning however you try turn on "Require Only App-Extension-Safe API" in the build settings in Xcode.

I have the same issue, indeed the extension works as expected however if I research the issue on the web there seams to be a chance that the app will be rejected due to this... better get this fixed...

Same issue here. Does my app get rejected because of that? The "Require Only App-Extension-Safe API" of "OneSignalNotificationServiceExtension" is automatically set to YES. When I turn it to NO then the warning goes away. Anyone who solved this?

I can confirm that this is still happening (Xcode 8, Xcode 9) with a manual integration of OneSignal (not using Carthage), and has been for a few months now.

Like others, I'm a bit concerned about App Store rejection.

jkasten2 Can you change your settings and see that this error is present? It is not about making error 'go away'. There is a reason for the error - could be something like the possibility of the code trying to access the app delegate from an extension - Apple doesn't take these things very lightly, and they are ESPECIALLY cracking down on things in iOS 11. This is an AMAZING service and I am excited to use it, but this is actually a big deal, since we are required to create an app extension to use OneSignal. Can you please address this?

jkasten2 - this is still an issue - are you at all interested in getting it fixed?

inPhilly Yes please

My experience isn't related to OneSignal products, I've just come across this thread googling the same topic. Just wanted to share our experience. We access UIApplication.shared from our extension (from our own SDK) and had no issues with AppStore review so far (5 applications are in production already) although the alert about "Linking against a dylib which is not safe" is present in all of the projects.

We have never seen an app get rejected because of this warning. I would suggest ignoring it for the time being as it doesn't cause any issues/rejections.

Was this page helpful?
0 / 5 - 0 ratings