OneSignal's XCFramework SDK

OneSignal support for Mac Catalyst and Apple Silicon Macs 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 you have the latest version of cocoapods by running sudo gem install cocoapods.
  2. Make sure your Xcode project is closed.
  3. Run pod init from the terminal in your project directory.
  4. Open the newly created Podfile with your favorite code editor, such as Sublime.
  5. Add the OneSignalXCFramework dependency under your project name target as well as OneSignalNotificationServiceExtension target like below.
target 'your_project_name' do
  pod 'OneSignalXCFramework', '>= 3.0.0', '< 4.0'

target 'OneSignalNotificationServiceExtension' do
  pod 'OneSignalXCFramework', '>= 3.0.0', '< 4.0'
  1. Run the following command in your terminal in your project directory.

pod install --repo-update

  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.

Did this page help you?