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

OneSignal's XCFramework SDK

OneSignal support for Mac Catalyst using an XCFramework

OneSignal's XCFramework version of the iOS SDK can be used for Mac Catalyst Apps since XCFrameworks allow you to support multiple platforms that use the same architecture. In this case both the iOS Simulator and Mac use the x86_64 architecture.

Cocoapods is currently the only dependency manager that can be used to get the XCFramework SDK.

Install OneSignal's XCFramework using Cocoapods

  1. Make sure your current Xcode project is closed and in the project root, run sudo gem install cocoapods. Note Cocoapods 1.9.3 has had issues with XCFrameworks. If you receive build errors try using Cocoapods 1.10 which is currently in beta. To install the beta version run sudo gem install cocoapods --pre.
  2. Run pod init from the terminal in your project directory.
  3. Open the newly created Podfile with your favorite code editor such as Sublime.
  4. Add the OneSignalXCFramework dependency under your project name target as well as OneSignalNotificationServiceExtension target like below. Make sure to update the tag to the latest SDK release version
target 'your_project_name' do
  #Replace the tag with the latest version of the SDK
  pod 'OneSignalXCFramework', :git => 'https://github.com/OneSignal/OneSignal-iOS-SDK.git', :tag => '2.15.0'
end

target 'OneSignalNotificationServiceExtension' do
  #Replace the tag with the latest version of the SDK
  pod 'OneSignalXCFramework', :git => 'https://github.com/OneSignal/OneSignal-iOS-SDK.git', :tag => '2.15.0'
end
  1. Run the following commands in your terminal in your project directory.

pod repo update
pod install

  1. Open the newly created <project-name>.xcworkspace file.

Make sure to always open the workspace from now on. You can also do this automatically by running xed . from the root of your project.

Updated about a month ago


OneSignal's XCFramework SDK


Suggested Edits are limited on API Reference Pages

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