OneSignal Help & Documentation

Welcome to the OneSignal New IA developer hub. You'll find comprehensive guides and documentation to help you start working with OneSignal New IA as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Discussions

Carthage Setup

iOS Setup With Carthage

You can also use Carthage for setting up and upgrading the OneSignal SDK.

1 Make sure your current Xcode project is closed.
2 Open Project Directory in Terminal. Run echo 'github "OneSignal/OneSignal-iOS-SDK"' >> Cartfile
3 Run carthage update.
4 Open your Xcode project.
5 Go to your application targets’ “General” settings tab, “Embedded Binaries” section.

6 Drag and drop OneSignal.framework from the <YOUR PROJECT'S DIRECTORY>/Carthage/Build/iOS folder on disk.

7 Create folder references and click Finish.

8 Go to your OneSignalNotificationServiceExtension targets’ “General” settings tab, “Linked Frameworks and Libraries” section.

9 Drag and drop the same OneSignal.framework from the <YOUR PROJECT'S DIRECTORY>/Carthage/Build/iOS folder on disk.

10 On your application targets’ “Build Phases” settings tab, click the “+” icon, choose “New Run Script Phase”.

11 Create a Run Script in which you specify your shell (ex: bin/sh), add the following contents to the script area below the shell:
/usr/local/bin/carthage copy-frameworks

12 Add the path to the OneSignal framework under “Input Files”:

$(SRCROOT)/Carthage/Build/iOS/OneSignal.framework

👍

Done! Continue onto step 4 of our iOS SDK setup guide.

Updated 5 months ago


Carthage Setup


iOS Setup With Carthage

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.