Skip to main content

Posts

Showing posts from November, 2022

Ionic & Capacitor SDK Setup - OneSignal Documentation

  Instructions for adding the OneSignal SDK to your Ionic or Capacitor app for iOS, Android Requirements OneSignal Account Your OneSignal App Id, available in  Settings > Keys & IDs . Ionic 1 or newer. Cordova 9.1.0 or newer. Capacitor 2.0.0 or newer. iOS Requirements An iOS 9+ or iPadOS device (iPhone, iPad, iPod Touch) to test on. Xcode 14+ simulator works running iOS 16+. A Mac with Xcode 12+. An iOS Push Certificate . Cordova ios@5.0.0 or newer. CocoaPods  - Install with the following from the Terminal: Shell sudo gem install cocoapods pod repo update Ionic/Capacitor npm install onesignal-cordova-plugin npx cap sync Ionic + Cordova (Angular) Add OneSignalInit () method in app.component.ts constructor (platform: Platform) { platform.ready().then(() => { OneSignalInit(); //Add this line }); } Add the  OneSignalInit()  code block to the same file as noted above. import OneSignal from 'onesignal-cordova-plugin' ; OneSignalInit(){