Is there anyone to help adding custom sound to ionic 5 and capacitor push notification with one signal, It works good with cordova but now I want to migrate to capacitor
Asked
Active
Viewed 1,086 times
1 Answers
0
I recently integrated capacitor with one signal. You can try following the instructions(step 1 to 5) in this document: https://documentation.onesignal.com/docs/ionic-sdk-setup.
The following notes may also help you:
- In step 2.1 "Import the OneSignal Cordova Plugin", run
npm install onesignal-cordova-plugin
andnpx cap sync
(commands in "Ionic Capacitor" tab). Cordova plugins installed in this step works all fine with Capacitor. - In step 5.4 "Add a Service Extension", there are two similar extensions in Xcode named "Notification Content Extension" and "Notification Service Extension", the correct one is "Notification Service Extension" (you will see
NotificationService.swift
if you select this extension, otherwise you will seeNotificationViewController.swift
). - In step 5.5.7 "You should now see all 3 frameworks", since we all use webview engine, we need to add "WebKit.framework", or your will fail and you might see the same error in this question: Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_WKWebView", referenced from:.

Stream Huang
- 326
- 1
- 3
- 7