Troubleshooting iOS

Common setup issues with iOS

Troubleshooting steps:

Please follow all steps below. If you are still having issues, please reach out to support with a log generated from Step 4.

1. Double Check Setup Guide

Return to our iOS SDK Setup Guide to make sure you followed all steps and added any updates.

2. Use the latest iOS Version

Make sure you have version 1.1.0 or newer of CocoaPods by running pod --version from the terminal.

Make sure you are running version 3.3.0 or newer of the OneSignal SDK. We recommend being on the newest version. See our iOS Github Releases for the latest version of the OneSignal iOS SDK and changelog of features and updates.

Run pod update OneSignal from the terminal to update to the latest version of OneSignal SDK.

3. Test on Mobile Device

You must test on an actual iOS device. The Simulator does not support push.

4. Check below for common issues and if still not sure, send us a log.

After running through the rest of this Troubleshooting guide, use the OneSignal SDK setLogLevel method to Verbose and send us the full logcat from the device when reproducing the behavior.

//The following options are available with increasingly more information: 
OneSignal.setLogLevel(.LL_VERBOSE, visualLevel: .LL_NONE)
//The following options are available with increasingly more information: 
[OneSignal setLogLevel:ONE_S_LL_VERBOSE visualLevel:ONE_S_LL_NONE];

If you need help interpreting the logs, please share them through Pastebin or a .txt file to help our support and engineering team assist you.

APNS Delegate Never Fired

"APNS Delegate Never Fired" is a timeout message for when iOS doesn't fire a success or failure message if a connection is not made to Apple's APNS servers. This usually occurs in Development/Ad-hoc environments and is more rare in Production.

Please check the following:

1 - Try toggling WiFi on the iOS device, try another device, or a different network. You may see this more often with development builds of your app since this will be connecting to Apple's Sandbox server instead of Production.

2 - Make sure you are using Xcode 10 or higher and you have the Push Notifications capability in the Main App Target > "Signing & Capabilities" > Push Notifications

Some users reported enabling Background Fetch in Main App Target helped reduce the frequency as well.

Check that this is enabled for both Debug and Release builds. You may need to check your entitlements if these are different.


3 - Other Dependencies, especially other Push Provider SDKs, can interfere with this. It is best to remove the other Push SDK from the app.

4 - If using Cocoapods, run pod install again to get updated, then pod update to update your pods. Make sure to remove any pods that you do not use anymore (especially other push SDKs).

5 - Check if you added abstract_target in the Podfile. This can cause issues, more detail:

6 - Check the Logs

After the above steps. If you are still having issues it is best to plug the device into your IDE and use our SetLogLevel method to Verbose. Then uninstall and re-build the app on the device. This will help log any issues to your IDE console.

Clicks Not Counting

Make sure your app is initializing OneSignal from didFinishLaunchingWithOptions and from the main thread. Otherwise it can miss the click event if the app is cold started from a click.

If you have any other SDKs or libraries handing push notifications, then it is possible it is an issue with swizzling the iOS click handler and conflicting with OneSignal.

URL Not working

ERROR: The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.

Make sure your URL is HTTPS. HTTP urls will not work unless you set NSAppTransportSecurity to NSAllowsArbitraryLoads in your Xcode .plist.


About App Transport Security

Please do not leave NSAllowsArbitraryLoads enabled when releasing your app to the App Store, as this can create a security vulnerability in your app. For more information, please read Apple's Security Overview

Notification is shown but media attachments are not displayed

  1. Open your attachment URL in a web browser. Make sure it is a direct link to the image, it can't be part of an HTML page. Also redirects are not supported.

  2. Make sure your URL is HTTPS. HTTP urls will not work unless you set NSAppTransportSecurity to NSAllowsArbitraryLoads in your Xcode .plist.

  3. Make sure your url ends with the correct file extension. If the URL doesn't contain a file extension you can add it as a parameter by adding ?filetype=file.jpg for example to the end of your URL.

  4. Please double check you have correctly added the NotificationServiceExtension noted in step 1 of the iOS Setup guide.

  5. If you correctly added the OneSignal Notification Service Extension and rich push notifications (images, buttons) still don't appear, make sure that the Deployment Target in the Extension service matches the deployment target of your application.

Notification is shown but action buttons are not displaying

Please double check you have correctly added the NotificationServiceExtension noted in step 1 of the iOS Setup guide.

Debug the Notification Service Extension

  1. Double check that you followed all setup instructions first, please see the SDK docs your are using for more on this.

  2. The 2 debugging lines in the .m source we provide are 2 ways to confirm the notification service extension is running.

self.bestAttemptContent.body = [@"[Modified] "

This line will add "[Modified] " to the beginning of all your notification bodies. You should see this on all notifications on your device.

NSLog(@"Running NotificationServiceExtension");

This will add an entry to the device log when the extension is run. You can view this in Xcode under Window > "Devices and Simulators". Select your device on the left and open the log up arrow at the bottom.


We recommend clearing the log before sending a notification to test as it can grow quickly. Copy the log and search for the debug entry "Running NotificationServiceExtension".

We don't recommend trying to attach to the extension process with the debugger in Xcode through the Debug menu. Doing so can create issues with it launch so we recommend restarting your device if you have tried doing so.

Lastly the Notification Service Extension will only run if you have set our Action Buttons, a Media Attachment, or have set mutable content on the notification so make sure your test notification have one of these set.

Swift : No such module 'OneSignal'

CocoaPods: Pods written in Swift should be imported with the use_frameworks!, and CocoaPods will complain if you don't do this and try to import the pods in Swift code.

Manual Import: One way to solve your issue is to go into your build settings and defining the Framework Search Paths to a folder which contains the frameworks in question. If the OneSignal framework is placed in your project directory, simply set the framework search path to $(SRCROOT) and set it to recursive.

How to get a crash log from an iOS device

NOTE: For your crash to show in the following steps the crash must happen when your device is not connected to your Mac. Connect it after you reproduce the crash.

  1. In Xcode go to Window > Devices & Simulators.
  2. Select your device on the left and press the "Open Console" button.
  3. Select "All Messages" (top left)
  4. Reproduce issue with the connected device.
  5. Press Command + A to select all, then Command + C to copy log
  1. Send it to OneSignal support along with details on reproducing the crash.

Previous Push Notifications Disappear

The OneSignal SDK will automatically clear previously received push notifications when the app is opened under two conditions:

  • The badge number is > 0
  • The application was opened from a push notification

This behavior is caused by our system to clear the badge number. Most app developers want this behavior, however some do not. In order to prevent this from occurring, you can add OneSignal_disable_badge_clearing = true in your application's Info.plist.

App Groups Error

Couldn't read values in CFPrefsPlistSource<0x281514780> (Domain:, 
User: kCFPreferencesAnyUser, ByHost: Yes, Container: (null), 
Contents Need Refresh: Yes): Using kCFPreferencesAnyUser with a container is only allowed for
System Containers, detaching from cfprefsd

This error is normal and results from a bug in iOS. It should appear if you have App Groups added correctly. For more info, read this comment by an Apple employee.

Can we setup multiple Notification Service Extensions for Multiple Targets in single Xcode Project?

Example, we are using multiple targets within the same Xcode Project. 2 separate apps to be uploaded to app store. Getting error "Embedded binary's bundle identifier is not prefixed with the parent app's bundle identifier" and cannot enable separate app groups for separate targets.

Unfortunately you need a separate NSE for each application. There might be a workaround with writing a custom build script that dynamically sets the bundle_id of the NSE based on the containing Apps bundle Id but this is outside the scope of OneSignal.


Still having problems? We're happy to help!

We answer most support queries in under 4 hours during the week, and under 24 hours on weekends. Simply email us at [email protected]

Include as much as you can of the following to help us find your issue quicker:

  • Version of our SDK
  • Device OS version
  • Xcode crash lock or stack trace of the app starting and the problem point
  • Any other libraries or plugins in your app
  • Details on reproducing your problem.