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
- Make sure you have the latest version of cocoapods by running
sudo gem install cocoapods
. - Make sure your Xcode project is closed.
- Run
pod init
from the terminal in your project directory. - Open the newly created
Podfile
with your favorite code editor, such as Sublime. - 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'
end
target 'OneSignalNotificationServiceExtension' do
pod 'OneSignalXCFramework', '>= 3.0.0', '< 4.0'
end
- Run the following command in your terminal in your project directory.
pod install --repo-update
- 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 10 months ago
Did this page help you?