You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* You can also pass settings to OneSignal to control various effects, such as whether OneSignal automatically asks for permission to send push notifications shortly after launch or not.
190
192
```objc
191
-
// For requiring push notification permissions manually.
* If you don't already have one, create an Objective-C Bridging header for your project (`YourProjectName-Bridging-Header.h`) and import the React-Native-Onesignal library:
202
+
203
+
```objc
204
+
#import<RCTOneSignal.h>
205
+
```
206
+
* In your AppDelegate, add the following property:
207
+
208
+
```swift
209
+
var oneSignal : RCTOneSignal!
210
+
```
211
+
212
+
* On the `application didFinishLaunchingWithOptions` method, insert the following code (replace YOUR_ONESIGNAL_APP_ID with your OneSignal app ID):
* You can also pass settings to OneSignal to control various effects, such as whether OneSignal automatically asks for permission to send push notifications shortly after launch or not.
This step is optional but highly recommended. The `OneSignalNotificationServiceExtension` allows your application (in iOS) to receive rich notifications with images and/or buttons. If you do not follow this step, your application will not be able to show images in push notifications, and won't be able to add action buttons to notifications either.
0 commit comments