com.onesignal.unity.ios 2.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Documentation~/com.onesignal.unity.ios.md +4 -0
- package/Editor/OneSignal.iOS.Editor.asmdef +14 -0
- package/Editor/OneSignal.iOS.Editor.asmdef.meta +7 -0
- package/Editor/PostProcessBuildPlayer_iOS.cs +399 -0
- package/Editor/PostProcessBuildPlayer_iOS.cs.meta +13 -0
- package/Editor.meta +8 -0
- package/LICENSE.md +129 -0
- package/LICENSE.md.meta +7 -0
- package/README.md +5 -0
- package/README.md.meta +7 -0
- package/Runtime/AssemblyInfo.cs +3 -0
- package/Runtime/AssemblyInfo.cs.meta +11 -0
- package/Runtime/OneSignal.iOS.asmdef +17 -0
- package/Runtime/OneSignal.iOS.asmdef.meta +7 -0
- package/Runtime/OneSignalIOS.cs +458 -0
- package/Runtime/OneSignalIOS.cs.meta +10 -0
- package/Runtime/OneSignalIOSInit.cs +12 -0
- package/Runtime/OneSignalIOSInit.cs.meta +3 -0
- package/Runtime/Plugins/iOS/Info.plist +31 -0
- package/Runtime/Plugins/iOS/Info.plist.meta +9 -0
- package/Runtime/Plugins/iOS/NotificationService.h +13 -0
- package/Runtime/Plugins/iOS/NotificationService.h.meta +26 -0
- package/Runtime/Plugins/iOS/NotificationService.m +40 -0
- package/Runtime/Plugins/iOS/NotificationService.m.meta +36 -0
- package/Runtime/Plugins/iOS/OneSignal.h +617 -0
- package/Runtime/Plugins/iOS/OneSignal.h.meta +26 -0
- package/Runtime/Plugins/iOS/OneSignalUnityRuntime.m +542 -0
- package/Runtime/Plugins/iOS/OneSignalUnityRuntime.m.meta +24 -0
- package/Runtime/Plugins/iOS/libOneSignal.a +0 -0
- package/Runtime/Plugins/iOS/libOneSignal.a.meta +21 -0
- package/Runtime/Plugins/iOS.meta +9 -0
- package/Runtime/Plugins.meta +8 -0
- package/Runtime.meta +8 -0
- package/package.json +35 -0
- package/package.json.meta +7 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>CFBundleDevelopmentRegion</key>
|
|
6
|
+
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
|
7
|
+
<key>CFBundleDisplayName</key>
|
|
8
|
+
<string>OneSignalNotificationServiceExtension</string>
|
|
9
|
+
<key>CFBundleExecutable</key>
|
|
10
|
+
<string>$(EXECUTABLE_NAME)</string>
|
|
11
|
+
<key>CFBundleIdentifier</key>
|
|
12
|
+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
|
13
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
|
14
|
+
<string>6.0</string>
|
|
15
|
+
<key>CFBundleName</key>
|
|
16
|
+
<string>$(PRODUCT_NAME)</string>
|
|
17
|
+
<key>CFBundlePackageType</key>
|
|
18
|
+
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
|
19
|
+
<key>CFBundleShortVersionString</key>
|
|
20
|
+
<string>1.0</string>
|
|
21
|
+
<key>CFBundleVersion</key>
|
|
22
|
+
<string>1</string>
|
|
23
|
+
<key>NSExtension</key>
|
|
24
|
+
<dict>
|
|
25
|
+
<key>NSExtensionPointIdentifier</key>
|
|
26
|
+
<string>com.apple.usernotifications.service</string>
|
|
27
|
+
<key>NSExtensionPrincipalClass</key>
|
|
28
|
+
<string>NotificationService</string>
|
|
29
|
+
</dict>
|
|
30
|
+
</dict>
|
|
31
|
+
</plist>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//
|
|
2
|
+
// NotificationService.h
|
|
3
|
+
// OneSignalNotificationServiceExtension
|
|
4
|
+
//
|
|
5
|
+
// Created by Kasten on 3/10/17.
|
|
6
|
+
// Copyright © 2017 OneSignal. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <UserNotifications/UserNotifications.h>
|
|
10
|
+
|
|
11
|
+
@interface NotificationService : UNNotificationServiceExtension
|
|
12
|
+
|
|
13
|
+
@end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: a9c6690a215404e00bd79b9feed7cfd8
|
|
3
|
+
timeCreated: 1522803673
|
|
4
|
+
licenseType: Free
|
|
5
|
+
PluginImporter:
|
|
6
|
+
externalObjects: {}
|
|
7
|
+
serializedVersion: 2
|
|
8
|
+
iconMap: {}
|
|
9
|
+
executionOrder: {}
|
|
10
|
+
isPreloaded: 0
|
|
11
|
+
isOverridable: 0
|
|
12
|
+
platformData:
|
|
13
|
+
- first:
|
|
14
|
+
Any:
|
|
15
|
+
second:
|
|
16
|
+
enabled: 1
|
|
17
|
+
settings: {}
|
|
18
|
+
- first:
|
|
19
|
+
Editor: Editor
|
|
20
|
+
second:
|
|
21
|
+
enabled: 0
|
|
22
|
+
settings:
|
|
23
|
+
DefaultValueInitialized: true
|
|
24
|
+
userData:
|
|
25
|
+
assetBundleName:
|
|
26
|
+
assetBundleVariant:
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#import "OneSignal.h"
|
|
2
|
+
|
|
3
|
+
#import "NotificationService.h"
|
|
4
|
+
|
|
5
|
+
@interface NotificationService ()
|
|
6
|
+
|
|
7
|
+
@property (nonatomic, strong) void (^contentHandler)(UNNotificationContent *contentToDeliver);
|
|
8
|
+
@property (nonatomic, strong) UNNotificationRequest *receivedRequest;
|
|
9
|
+
@property (nonatomic, strong) UNMutableNotificationContent *bestAttemptContent;
|
|
10
|
+
|
|
11
|
+
@end
|
|
12
|
+
|
|
13
|
+
@implementation NotificationService
|
|
14
|
+
|
|
15
|
+
- (void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler {
|
|
16
|
+
self.receivedRequest = request;
|
|
17
|
+
self.contentHandler = contentHandler;
|
|
18
|
+
self.bestAttemptContent = [request.content mutableCopy];
|
|
19
|
+
|
|
20
|
+
[OneSignal didReceiveNotificationExtensionRequest:self.receivedRequest withMutableNotificationContent:self.bestAttemptContent];
|
|
21
|
+
|
|
22
|
+
// DEBUGGING: Uncomment the 2 lines below and comment out the one above to ensure this extension is excuting
|
|
23
|
+
// Note, this extension only runs when mutable-content is set
|
|
24
|
+
// Setting an attachment or action buttons automatically adds this
|
|
25
|
+
// NSLog(@"Running NotificationServiceExtension");
|
|
26
|
+
// self.bestAttemptContent.body = [@"[Modified] " stringByAppendingString:self.bestAttemptContent.body];
|
|
27
|
+
|
|
28
|
+
self.contentHandler(self.bestAttemptContent);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
- (void)serviceExtensionTimeWillExpire {
|
|
32
|
+
// Called just before the extension will be terminated by the system.
|
|
33
|
+
// Use this as an opportunity to deliver your "best attempt" at modified content, otherwise the original push payload will be used.
|
|
34
|
+
|
|
35
|
+
[OneSignal serviceExtensionTimeWillExpireRequest:self.receivedRequest withMutableNotificationContent:self.bestAttemptContent];
|
|
36
|
+
|
|
37
|
+
self.contentHandler(self.bestAttemptContent);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 4677c01ecce0a4366a990873a5fd6e02
|
|
3
|
+
timeCreated: 1522803673
|
|
4
|
+
licenseType: Free
|
|
5
|
+
PluginImporter:
|
|
6
|
+
externalObjects: {}
|
|
7
|
+
serializedVersion: 2
|
|
8
|
+
iconMap: {}
|
|
9
|
+
executionOrder: {}
|
|
10
|
+
isPreloaded: 0
|
|
11
|
+
isOverridable: 0
|
|
12
|
+
platformData:
|
|
13
|
+
- first:
|
|
14
|
+
Any:
|
|
15
|
+
second:
|
|
16
|
+
enabled: 0
|
|
17
|
+
settings: {}
|
|
18
|
+
- first:
|
|
19
|
+
Editor: Editor
|
|
20
|
+
second:
|
|
21
|
+
enabled: 0
|
|
22
|
+
settings:
|
|
23
|
+
DefaultValueInitialized: true
|
|
24
|
+
- first:
|
|
25
|
+
iPhone: iOS
|
|
26
|
+
second:
|
|
27
|
+
enabled: 1
|
|
28
|
+
settings: {}
|
|
29
|
+
- first:
|
|
30
|
+
tvOS: tvOS
|
|
31
|
+
second:
|
|
32
|
+
enabled: 1
|
|
33
|
+
settings: {}
|
|
34
|
+
userData:
|
|
35
|
+
assetBundleName:
|
|
36
|
+
assetBundleVariant:
|
|
@@ -0,0 +1,617 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Modified MIT License
|
|
3
|
+
|
|
4
|
+
Copyright 2017 OneSignal
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
1. The above copyright notice and this permission notice shall be included in
|
|
14
|
+
all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
2. All copies of substantial portions of the Software may only be used in connection
|
|
17
|
+
with services provided by OneSignal.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
25
|
+
THE SOFTWARE.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
### Setting up the SDK ###
|
|
30
|
+
Follow the documentation from https://documentation.onesignal.com/docs/ios-sdk-setupto setup OneSignal in your app.
|
|
31
|
+
|
|
32
|
+
### API Reference ###
|
|
33
|
+
Follow the documentation from https://documentation.onesignal.com/docs/ios-sdk-api for a detailed explanation of the API.
|
|
34
|
+
|
|
35
|
+
### Troubleshoot ###
|
|
36
|
+
Follow the documentation from https://documentation.onesignal.com/docs/troubleshooting-ios to fix common problems.
|
|
37
|
+
|
|
38
|
+
For help on how to upgrade your code from 1.* SDK to 2.*: https://documentation.onesignal.com/docs/upgrading-to-ios-sdk-20
|
|
39
|
+
|
|
40
|
+
### More ###
|
|
41
|
+
iOS Push Cert: https://documentation.onesignal.com/docs/generating-an-ios-push-certificate
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
#import <Foundation/Foundation.h>
|
|
45
|
+
#import <UserNotifications/UserNotifications.h>
|
|
46
|
+
|
|
47
|
+
#pragma clang diagnostic push
|
|
48
|
+
#pragma clang diagnostic ignored "-Wstrict-prototypes"
|
|
49
|
+
#pragma clang diagnostic ignored "-Wnullability-completeness"
|
|
50
|
+
|
|
51
|
+
/* The action type associated to an OSNotificationAction object */
|
|
52
|
+
typedef NS_ENUM(NSUInteger, OSNotificationActionType) {
|
|
53
|
+
OSNotificationActionTypeOpened,
|
|
54
|
+
OSNotificationActionTypeActionTaken
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/* The way a notification was displayed to the user */
|
|
58
|
+
typedef NS_ENUM(NSUInteger, OSNotificationDisplayType) {
|
|
59
|
+
/*Notification is silent, or app is in focus but InAppAlertNotifications are disabled*/
|
|
60
|
+
OSNotificationDisplayTypeNone,
|
|
61
|
+
|
|
62
|
+
/*Default UIAlertController display*/
|
|
63
|
+
OSNotificationDisplayTypeInAppAlert,
|
|
64
|
+
|
|
65
|
+
/*iOS native notification display*/
|
|
66
|
+
OSNotificationDisplayTypeNotification
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
@interface OSNotificationAction : NSObject
|
|
70
|
+
|
|
71
|
+
/* The type of the notification action */
|
|
72
|
+
@property(readonly)OSNotificationActionType type;
|
|
73
|
+
|
|
74
|
+
/* The ID associated with the button tapped. NULL when the actionType is NotificationTapped or InAppAlertClosed */
|
|
75
|
+
@property(readonly)NSString* actionID;
|
|
76
|
+
|
|
77
|
+
@end
|
|
78
|
+
|
|
79
|
+
/* Notification Payload Received Object */
|
|
80
|
+
@interface OSNotificationPayload : NSObject
|
|
81
|
+
|
|
82
|
+
/* Unique Message Identifier */
|
|
83
|
+
@property(readonly)NSString* notificationID;
|
|
84
|
+
|
|
85
|
+
/* Unique Template Identifier */
|
|
86
|
+
@property(readonly)NSString* templateID;
|
|
87
|
+
|
|
88
|
+
/* Name of Template */
|
|
89
|
+
@property(readonly)NSString* templateName;
|
|
90
|
+
|
|
91
|
+
/* True when the key content-available is set to 1 in the aps payload.
|
|
92
|
+
content-available is used to wake your app when the payload is received.
|
|
93
|
+
See Apple's documenation for more details.
|
|
94
|
+
https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623013-application
|
|
95
|
+
*/
|
|
96
|
+
@property(readonly)BOOL contentAvailable;
|
|
97
|
+
|
|
98
|
+
/* True when the key mutable-content is set to 1 in the aps payload.
|
|
99
|
+
mutable-content is used to wake your Notification Service Extension to modify a notification.
|
|
100
|
+
See Apple's documenation for more details.
|
|
101
|
+
https://developer.apple.com/documentation/usernotifications/unnotificationserviceextension
|
|
102
|
+
*/
|
|
103
|
+
@property(readonly)BOOL mutableContent;
|
|
104
|
+
|
|
105
|
+
/*
|
|
106
|
+
Notification category key previously registered to display with.
|
|
107
|
+
This overrides OneSignal's actionButtons.
|
|
108
|
+
See Apple's documenation for more details.
|
|
109
|
+
https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/SupportingNotificationsinYourApp.html#//apple_ref/doc/uid/TP40008194-CH4-SW26
|
|
110
|
+
*/
|
|
111
|
+
@property(readonly)NSString* category;
|
|
112
|
+
|
|
113
|
+
/* The badge assigned to the application icon */
|
|
114
|
+
@property(readonly)NSUInteger badge;
|
|
115
|
+
@property(readonly)NSInteger badgeIncrement;
|
|
116
|
+
|
|
117
|
+
/* The sound parameter passed to the notification
|
|
118
|
+
By default set to UILocalNotificationDefaultSoundName */
|
|
119
|
+
@property(readonly)NSString* sound;
|
|
120
|
+
|
|
121
|
+
/* Main push content */
|
|
122
|
+
@property(readonly)NSString* title;
|
|
123
|
+
@property(readonly)NSString* subtitle;
|
|
124
|
+
@property(readonly)NSString* body;
|
|
125
|
+
|
|
126
|
+
/* Web address to launch within the app via a WKWebView */
|
|
127
|
+
@property(readonly)NSString* launchURL;
|
|
128
|
+
|
|
129
|
+
/* Additional key value properties set within the payload */
|
|
130
|
+
@property(readonly)NSDictionary* additionalData;
|
|
131
|
+
|
|
132
|
+
/* iOS 10+ : Attachments sent as part of the rich notification */
|
|
133
|
+
@property(readonly)NSDictionary* attachments;
|
|
134
|
+
|
|
135
|
+
/* Action buttons passed */
|
|
136
|
+
@property(readonly)NSArray *actionButtons;
|
|
137
|
+
|
|
138
|
+
/* Holds the original payload received
|
|
139
|
+
Keep the raw value for users that would like to root the push */
|
|
140
|
+
@property(readonly)NSDictionary *rawPayload;
|
|
141
|
+
|
|
142
|
+
/* iOS 10+ : Groups notifications into threads */
|
|
143
|
+
@property(readonly)NSString *threadId;
|
|
144
|
+
|
|
145
|
+
/* Parses an APS push payload into a OSNotificationPayload object.
|
|
146
|
+
Useful to call from your NotificationServiceExtension when the
|
|
147
|
+
didReceiveNotificationRequest:withContentHandler: method fires. */
|
|
148
|
+
+ (instancetype)parseWithApns:(nonnull NSDictionary*)message;
|
|
149
|
+
|
|
150
|
+
@end
|
|
151
|
+
|
|
152
|
+
/* OneSignal OSNotification */
|
|
153
|
+
@interface OSNotification : NSObject
|
|
154
|
+
|
|
155
|
+
/* Notification Payload */
|
|
156
|
+
@property(readonly)OSNotificationPayload* payload;
|
|
157
|
+
|
|
158
|
+
/* Display method of the notification */
|
|
159
|
+
@property(readonly)OSNotificationDisplayType displayType;
|
|
160
|
+
|
|
161
|
+
/* Set to true when the user was able to see the notification and reacted to it
|
|
162
|
+
Set to false when app is in focus and in-app alerts are disabled, or the remote notification is silent. */
|
|
163
|
+
@property(readonly, getter=wasShown)BOOL shown;
|
|
164
|
+
|
|
165
|
+
/* Set to true if the app was in focus when the notification */
|
|
166
|
+
@property(readonly, getter=wasAppInFocus)BOOL isAppInFocus;
|
|
167
|
+
|
|
168
|
+
/* Set to true when the received notification is silent
|
|
169
|
+
Silent means there is no alert, sound, or badge payload in the aps dictionary
|
|
170
|
+
requires remote-notification within UIBackgroundModes array of the Info.plist */
|
|
171
|
+
@property(readonly, getter=isSilentNotification)BOOL silentNotification;
|
|
172
|
+
|
|
173
|
+
/* iOS 10+: Indicates whether or not the received notification has mutableContent : 1 assigned to its payload
|
|
174
|
+
Used for UNNotificationServiceExtension to launch extension. */
|
|
175
|
+
@property(readonly, getter=hasMutableContent)BOOL mutableContent;
|
|
176
|
+
|
|
177
|
+
/* Convert object into an NSString that can be convertible into a custom Dictionary / JSON Object */
|
|
178
|
+
- (NSString*)stringify;
|
|
179
|
+
|
|
180
|
+
@end
|
|
181
|
+
|
|
182
|
+
@interface OSNotificationOpenedResult : NSObject
|
|
183
|
+
|
|
184
|
+
@property(readonly)OSNotification* notification;
|
|
185
|
+
@property(readonly)OSNotificationAction *action;
|
|
186
|
+
|
|
187
|
+
/* Convert object into an NSString that can be convertible into a custom Dictionary / JSON Object */
|
|
188
|
+
- (NSString*)stringify;
|
|
189
|
+
|
|
190
|
+
@end;
|
|
191
|
+
|
|
192
|
+
@interface OSInAppMessageOutcome : NSObject
|
|
193
|
+
|
|
194
|
+
@property (strong, nonatomic, nonnull) NSString *name;
|
|
195
|
+
@property (strong, nonatomic, nonnull) NSNumber *weight;
|
|
196
|
+
@property (nonatomic) BOOL unique;
|
|
197
|
+
|
|
198
|
+
// Convert the class into a NSDictionary
|
|
199
|
+
- (NSDictionary *_Nonnull)jsonRepresentation;
|
|
200
|
+
|
|
201
|
+
@end
|
|
202
|
+
|
|
203
|
+
@interface OSInAppMessageTag : NSObject
|
|
204
|
+
|
|
205
|
+
@property (strong, nonatomic, nullable) NSDictionary *tagsToAdd;
|
|
206
|
+
@property (strong, nonatomic, nullable) NSArray *tagsToRemove;
|
|
207
|
+
|
|
208
|
+
// Convert the class into a NSDictionary
|
|
209
|
+
- (NSDictionary *_Nonnull)jsonRepresentation;
|
|
210
|
+
|
|
211
|
+
@end
|
|
212
|
+
|
|
213
|
+
@interface OSInAppMessageAction : NSObject
|
|
214
|
+
|
|
215
|
+
// The action name attached to the IAM action
|
|
216
|
+
@property (strong, nonatomic, nullable) NSString *clickName;
|
|
217
|
+
|
|
218
|
+
// The URL (if any) that should be opened when the action occurs
|
|
219
|
+
@property (strong, nonatomic, nullable) NSURL *clickUrl;
|
|
220
|
+
|
|
221
|
+
// Whether or not the click action is first click on the IAM
|
|
222
|
+
@property (nonatomic) BOOL firstClick;
|
|
223
|
+
|
|
224
|
+
// Whether or not the click action dismisses the message
|
|
225
|
+
@property (nonatomic) BOOL closesMessage;
|
|
226
|
+
|
|
227
|
+
// The outcome to send for this action
|
|
228
|
+
@property (strong, nonatomic, nullable) NSArray<OSInAppMessageOutcome *> *outcomes;
|
|
229
|
+
|
|
230
|
+
// The tags to send for this action
|
|
231
|
+
@property (strong, nonatomic, nullable) OSInAppMessageTag *tags;
|
|
232
|
+
|
|
233
|
+
// Convert the class into a NSDictionary
|
|
234
|
+
- (NSDictionary *_Nonnull)jsonRepresentation;
|
|
235
|
+
|
|
236
|
+
@end
|
|
237
|
+
|
|
238
|
+
@protocol OSInAppMessageDelegate <NSObject>
|
|
239
|
+
@optional
|
|
240
|
+
- (void)handleMessageAction:(OSInAppMessageAction * _Nonnull)action NS_SWIFT_NAME(handleMessageAction(action:));
|
|
241
|
+
@end
|
|
242
|
+
|
|
243
|
+
/* OneSignal Influence Types */
|
|
244
|
+
typedef NS_ENUM(NSUInteger, Session) {
|
|
245
|
+
DIRECT,
|
|
246
|
+
INDIRECT,
|
|
247
|
+
UNATTRIBUTED,
|
|
248
|
+
DISABLED
|
|
249
|
+
};
|
|
250
|
+
/* OneSignal Influence Channels */
|
|
251
|
+
typedef NS_ENUM(NSUInteger, OSInfluenceChannel) {
|
|
252
|
+
IN_APP_MESSAGE,
|
|
253
|
+
NOTIFICATION,
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
@interface OSOutcomeEvent : NSObject
|
|
257
|
+
|
|
258
|
+
// Session enum (DIRECT, INDIRECT, UNATTRIBUTED, or DISABLED) to determine code route and request params
|
|
259
|
+
@property (nonatomic) Session session;
|
|
260
|
+
|
|
261
|
+
// Notification ids for the current session
|
|
262
|
+
@property (strong, nonatomic, nullable) NSArray *notificationIds;
|
|
263
|
+
|
|
264
|
+
// Id or name of the event
|
|
265
|
+
@property (strong, nonatomic, nonnull) NSString *name;
|
|
266
|
+
|
|
267
|
+
// Time of the event occurring
|
|
268
|
+
@property (strong, nonatomic, nonnull) NSNumber *timestamp;
|
|
269
|
+
|
|
270
|
+
// A weight to attach to the outcome name
|
|
271
|
+
@property (strong, nonatomic, nonnull) NSDecimalNumber *weight;
|
|
272
|
+
|
|
273
|
+
// Convert the object into a NSDictionary
|
|
274
|
+
- (NSDictionary * _Nonnull)jsonRepresentation;
|
|
275
|
+
|
|
276
|
+
@end
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
typedef NS_ENUM(NSInteger, OSNotificationPermission) {
|
|
280
|
+
// The user has not yet made a choice regarding whether your app can show notifications.
|
|
281
|
+
OSNotificationPermissionNotDetermined = 0,
|
|
282
|
+
|
|
283
|
+
// The application is not authorized to post user notifications.
|
|
284
|
+
OSNotificationPermissionDenied,
|
|
285
|
+
|
|
286
|
+
// The application is authorized to post user notifications.
|
|
287
|
+
OSNotificationPermissionAuthorized,
|
|
288
|
+
|
|
289
|
+
// the application is only authorized to post Provisional notifications (direct to history)
|
|
290
|
+
OSNotificationPermissionProvisional
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
// Permission Classes
|
|
294
|
+
@interface OSPermissionState : NSObject
|
|
295
|
+
|
|
296
|
+
@property (readonly, nonatomic) BOOL reachable;
|
|
297
|
+
@property (readonly, nonatomic) BOOL hasPrompted;
|
|
298
|
+
@property (readonly, nonatomic) BOOL providesAppNotificationSettings;
|
|
299
|
+
@property (readonly, nonatomic) OSNotificationPermission status;
|
|
300
|
+
- (NSDictionary*)toDictionary;
|
|
301
|
+
|
|
302
|
+
@end
|
|
303
|
+
|
|
304
|
+
@interface OSPermissionStateChanges : NSObject
|
|
305
|
+
|
|
306
|
+
@property (readonly) OSPermissionState* to;
|
|
307
|
+
@property (readonly) OSPermissionState* from;
|
|
308
|
+
- (NSDictionary*)toDictionary;
|
|
309
|
+
|
|
310
|
+
@end
|
|
311
|
+
|
|
312
|
+
@protocol OSPermissionObserver <NSObject>
|
|
313
|
+
- (void)onOSPermissionChanged:(OSPermissionStateChanges*)stateChanges;
|
|
314
|
+
@end
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
// Subscription Classes
|
|
318
|
+
@interface OSSubscriptionState : NSObject
|
|
319
|
+
|
|
320
|
+
@property (readonly, nonatomic) BOOL subscribed; // (yes only if userId, pushToken, and setSubscription exists / are true)
|
|
321
|
+
@property (readonly, nonatomic) BOOL userSubscriptionSetting; // returns setSubscription state.
|
|
322
|
+
@property (readonly, nonatomic) NSString* userId; // AKA OneSignal PlayerId
|
|
323
|
+
@property (readonly, nonatomic) NSString* pushToken; // AKA Apple Device Token
|
|
324
|
+
- (NSDictionary*)toDictionary;
|
|
325
|
+
|
|
326
|
+
@end
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
@interface OSEmailSubscriptionState : NSObject
|
|
330
|
+
@property (readonly, nonatomic) NSString* emailUserId; // The new Email user ID
|
|
331
|
+
@property (readonly, nonatomic) NSString *emailAddress;
|
|
332
|
+
@property (readonly, nonatomic) BOOL subscribed;
|
|
333
|
+
- (NSDictionary*)toDictionary;
|
|
334
|
+
@end
|
|
335
|
+
|
|
336
|
+
@interface OSSubscriptionStateChanges : NSObject
|
|
337
|
+
@property (readonly) OSSubscriptionState* to;
|
|
338
|
+
@property (readonly) OSSubscriptionState* from;
|
|
339
|
+
- (NSDictionary*)toDictionary;
|
|
340
|
+
@end
|
|
341
|
+
|
|
342
|
+
@interface OSEmailSubscriptionStateChanges : NSObject
|
|
343
|
+
@property (readonly) OSEmailSubscriptionState* to;
|
|
344
|
+
@property (readonly) OSEmailSubscriptionState* from;
|
|
345
|
+
- (NSDictionary*)toDictionary;
|
|
346
|
+
@end
|
|
347
|
+
|
|
348
|
+
@protocol OSSubscriptionObserver <NSObject>
|
|
349
|
+
- (void)onOSSubscriptionChanged:(OSSubscriptionStateChanges*)stateChanges;
|
|
350
|
+
@end
|
|
351
|
+
|
|
352
|
+
@protocol OSEmailSubscriptionObserver <NSObject>
|
|
353
|
+
- (void)onOSEmailSubscriptionChanged:(OSEmailSubscriptionStateChanges*)stateChanges;
|
|
354
|
+
@end
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
// Permission+Subscription Classes
|
|
359
|
+
@interface OSPermissionSubscriptionState : NSObject
|
|
360
|
+
|
|
361
|
+
@property (readonly) OSPermissionState* permissionStatus;
|
|
362
|
+
@property (readonly) OSSubscriptionState* subscriptionStatus;
|
|
363
|
+
@property (readonly) OSEmailSubscriptionState *emailSubscriptionStatus;
|
|
364
|
+
- (NSDictionary*)toDictionary;
|
|
365
|
+
|
|
366
|
+
@end
|
|
367
|
+
|
|
368
|
+
@interface OSDevice : NSObject
|
|
369
|
+
/**
|
|
370
|
+
* Get the app's notification permission
|
|
371
|
+
* @return false if the user disabled notifications for the app, otherwise true
|
|
372
|
+
*/
|
|
373
|
+
- (BOOL)isNotificationEnabled;
|
|
374
|
+
/**
|
|
375
|
+
* Get whether the user is subscribed to OneSignal notifications or not
|
|
376
|
+
* @return false if the user is not subscribed to OneSignal notifications, otherwise true
|
|
377
|
+
*/
|
|
378
|
+
- (BOOL)isUserSubscribed;
|
|
379
|
+
/**
|
|
380
|
+
* Get whether the user is subscribed
|
|
381
|
+
* @return true if isNotificationEnabled, isUserSubscribed, getUserId and getPushToken are true, otherwise false
|
|
382
|
+
*/
|
|
383
|
+
- (BOOL)isSubscribed;
|
|
384
|
+
/**
|
|
385
|
+
* Get the user notification permision status
|
|
386
|
+
* @return OSNotificationPermission
|
|
387
|
+
*/
|
|
388
|
+
- (OSNotificationPermission)getNotificationPermissionStatus;
|
|
389
|
+
/**
|
|
390
|
+
* Get user id from registration (player id)
|
|
391
|
+
* @return user id if user is registered, otherwise false
|
|
392
|
+
*/
|
|
393
|
+
- (NSString*)getUserId;
|
|
394
|
+
/**
|
|
395
|
+
* Get apple deice push token
|
|
396
|
+
* @return push token if available, otherwise null
|
|
397
|
+
*/
|
|
398
|
+
- (NSString*)getPushToken;
|
|
399
|
+
/**
|
|
400
|
+
* Get the user email id
|
|
401
|
+
* @return email id if user address was registered, otherwise null
|
|
402
|
+
*/
|
|
403
|
+
- (NSString*)getEmailUserId;
|
|
404
|
+
/**
|
|
405
|
+
* Get the user email
|
|
406
|
+
* @return email address if set, otherwise null
|
|
407
|
+
*/
|
|
408
|
+
- (NSString*)getEmailAddress;
|
|
409
|
+
@end
|
|
410
|
+
|
|
411
|
+
typedef void (^OSWebOpenURLResultBlock)(BOOL shouldOpen);
|
|
412
|
+
|
|
413
|
+
/*Block for generic results on success and errors on failure*/
|
|
414
|
+
typedef void (^OSResultSuccessBlock)(NSDictionary* result);
|
|
415
|
+
typedef void (^OSFailureBlock)(NSError* error);
|
|
416
|
+
|
|
417
|
+
/*Block for notifying availability of the User's ID and push token*/
|
|
418
|
+
typedef void (^OSIdsAvailableBlock)(NSString* userId, NSString* pushToken);
|
|
419
|
+
|
|
420
|
+
/*Block for handling the reception of a remote notification */
|
|
421
|
+
typedef void (^OSHandleNotificationReceivedBlock)(OSNotification* notification);
|
|
422
|
+
|
|
423
|
+
/*Block for handling a user reaction to a notification*/
|
|
424
|
+
typedef void (^OSHandleNotificationActionBlock)(OSNotificationOpenedResult * result);
|
|
425
|
+
|
|
426
|
+
/*Block for handling user click on an in app message*/
|
|
427
|
+
typedef void (^OSHandleInAppMessageActionClickBlock)(OSInAppMessageAction* action);
|
|
428
|
+
|
|
429
|
+
/*Block for handling outcome event being sent successfully*/
|
|
430
|
+
typedef void (^OSSendOutcomeSuccess)(OSOutcomeEvent* outcome);
|
|
431
|
+
|
|
432
|
+
/*Dictionary of keys to pass alongside the init settings*/
|
|
433
|
+
|
|
434
|
+
/*Let OneSignal directly prompt for push notifications on init*/
|
|
435
|
+
extern NSString * const kOSSettingsKeyAutoPrompt;
|
|
436
|
+
|
|
437
|
+
/*Enable the default in-app alerts*/
|
|
438
|
+
extern NSString * const kOSSettingsKeyInAppAlerts;
|
|
439
|
+
|
|
440
|
+
/*Enable In-App display of Launch URLs*/
|
|
441
|
+
extern NSString * const kOSSettingsKeyInAppLaunchURL;
|
|
442
|
+
|
|
443
|
+
/*Prompt user yes/no to open URL's from push notifications*/
|
|
444
|
+
extern NSString * const kOSSSettingsKeyPromptBeforeOpeningPushURL;
|
|
445
|
+
|
|
446
|
+
/* iOS 10 +
|
|
447
|
+
Set notification's in-focus display option.
|
|
448
|
+
Value must be an OSNotificationDisplayType enum
|
|
449
|
+
*/
|
|
450
|
+
extern NSString * const kOSSettingsKeyInFocusDisplayOption;
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
/* iOS 12 +
|
|
454
|
+
Used to determine if the app is able to present it's
|
|
455
|
+
own customized Notification Settings view
|
|
456
|
+
*/
|
|
457
|
+
extern NSString * const kOSSettingsKeyProvidesAppNotificationSettings;
|
|
458
|
+
|
|
459
|
+
// ======= OneSignal Class Interface =========
|
|
460
|
+
@interface OneSignal : NSObject
|
|
461
|
+
|
|
462
|
+
extern NSString* const ONESIGNAL_VERSION;
|
|
463
|
+
|
|
464
|
+
typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) {
|
|
465
|
+
ONE_S_LL_NONE, ONE_S_LL_FATAL, ONE_S_LL_ERROR, ONE_S_LL_WARN, ONE_S_LL_INFO, ONE_S_LL_DEBUG, ONE_S_LL_VERBOSE
|
|
466
|
+
};
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
/*
|
|
470
|
+
Initialize OneSignal.
|
|
471
|
+
Sends push token to OneSignal so you can later send notifications.
|
|
472
|
+
*/
|
|
473
|
+
|
|
474
|
+
// - Initialization
|
|
475
|
+
+ (id)initWithLaunchOptions:(NSDictionary*)launchOptions appId:(NSString*)appId;
|
|
476
|
+
+ (id)initWithLaunchOptions:(NSDictionary*)launchOptions appId:(NSString*)appId handleNotificationAction:(OSHandleNotificationActionBlock)actionCallback;
|
|
477
|
+
+ (id)initWithLaunchOptions:(NSDictionary*)launchOptions appId:(NSString*)appId handleNotificationAction:(OSHandleNotificationActionBlock)actionCallback settings:(NSDictionary*)settings;
|
|
478
|
+
+ (id)initWithLaunchOptions:(NSDictionary*)launchOptions appId:(NSString*)appId handleNotificationReceived:(OSHandleNotificationReceivedBlock)receivedCallback handleNotificationAction:(OSHandleNotificationActionBlock)actionCallback settings:(NSDictionary*)settings;
|
|
479
|
+
|
|
480
|
+
// - Privacy
|
|
481
|
+
+ (void)consentGranted:(BOOL)granted;
|
|
482
|
+
+ (BOOL)requiresUserPrivacyConsent; // tells your application if privacy consent is still needed from the current user
|
|
483
|
+
+ (void)setRequiresUserPrivacyConsent:(BOOL)required; //used by wrapper SDK's to require user privacy consent
|
|
484
|
+
|
|
485
|
+
@property (class) OSNotificationDisplayType inFocusDisplayType;
|
|
486
|
+
|
|
487
|
+
+ (NSString*)app_id;
|
|
488
|
+
+ (NSString*)sdk_version_raw;
|
|
489
|
+
+ (NSString*)sdk_semantic_version;
|
|
490
|
+
|
|
491
|
+
// Only use if you set kOSSettingsKeyAutoPrompt to false
|
|
492
|
+
+ (void)registerForPushNotifications __deprecated_msg("Please use promptForPushNotificationsWithUserResponse instead.");
|
|
493
|
+
+ (void)promptForPushNotificationsWithUserResponse:(void(^)(BOOL accepted))completionHandler;
|
|
494
|
+
+ (void)promptForPushNotificationsWithUserResponse:(void (^)(BOOL accepted))completionHandler fallbackToSettings:(BOOL)fallback;
|
|
495
|
+
|
|
496
|
+
// This method opens the iOS Settings app and navigates to the Push Notification Settings
|
|
497
|
+
// page for your app specifically
|
|
498
|
+
+ (void)presentAppSettings;
|
|
499
|
+
+ (void)registerForProvisionalAuthorization:(void(^)(BOOL accepted))completionHandler;
|
|
500
|
+
|
|
501
|
+
// - Logging
|
|
502
|
+
+ (void)setLogLevel:(ONE_S_LOG_LEVEL)logLevel visualLevel:(ONE_S_LOG_LEVEL)visualLogLevel;
|
|
503
|
+
+ (void)onesignal_Log:(ONE_S_LOG_LEVEL)logLevel message:(NSString*)message;
|
|
504
|
+
|
|
505
|
+
// - Tagging
|
|
506
|
+
+ (void)sendTag:(NSString*)key value:(NSString*)value onSuccess:(OSResultSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock;
|
|
507
|
+
+ (void)sendTag:(NSString*)key value:(NSString*)value;
|
|
508
|
+
+ (void)sendTags:(NSDictionary*)keyValuePair onSuccess:(OSResultSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock;
|
|
509
|
+
+ (void)sendTags:(NSDictionary*)keyValuePair;
|
|
510
|
+
+ (void)sendTagsWithJsonString:(NSString*)jsonString;
|
|
511
|
+
+ (void)getTags:(OSResultSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock;
|
|
512
|
+
+ (void)getTags:(OSResultSuccessBlock)successBlock;
|
|
513
|
+
+ (void)deleteTag:(NSString*)key onSuccess:(OSResultSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock;
|
|
514
|
+
+ (void)deleteTag:(NSString*)key;
|
|
515
|
+
+ (void)deleteTags:(NSArray*)keys onSuccess:(OSResultSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock;
|
|
516
|
+
+ (void)deleteTags:(NSArray*)keys;
|
|
517
|
+
+ (void)deleteTagsWithJsonString:(NSString*)jsonString;
|
|
518
|
+
// Optional method that sends us the user's email as an anonymized hash so that we can better target and personalize notifications sent to that user across their devices.
|
|
519
|
+
// Sends as MD5 and SHA1 of the provided email
|
|
520
|
+
+ (void)syncHashedEmail:(NSString*)email __deprecated_msg("Please refer to our new Email methods/functionality such as setEmail(). This method will be removed in a future version of the OneSignal SDK");
|
|
521
|
+
|
|
522
|
+
// - Subscription and Permissions
|
|
523
|
+
+ (void)IdsAvailable:(OSIdsAvailableBlock)idsAvailableBlock __deprecated_msg("Please use getPermissionSubscriptionState or addSubscriptionObserver and addPermissionObserver instead.");
|
|
524
|
+
|
|
525
|
+
+ (OSPermissionSubscriptionState*)getPermissionSubscriptionState;
|
|
526
|
+
+ (OSDevice*)getUserDevice;
|
|
527
|
+
|
|
528
|
+
+ (void)addPermissionObserver:(NSObject<OSPermissionObserver>*)observer;
|
|
529
|
+
+ (void)removePermissionObserver:(NSObject<OSPermissionObserver>*)observer;
|
|
530
|
+
|
|
531
|
+
+ (void)addSubscriptionObserver:(NSObject<OSSubscriptionObserver>*)observer;
|
|
532
|
+
+ (void)removeSubscriptionObserver:(NSObject<OSSubscriptionObserver>*)observer;
|
|
533
|
+
|
|
534
|
+
+ (void)addEmailSubscriptionObserver:(NSObject<OSEmailSubscriptionObserver>*)observer;
|
|
535
|
+
+ (void)removeEmailSubscriptionObserver:(NSObject<OSEmailSubscriptionObserver>*)observer;
|
|
536
|
+
|
|
537
|
+
+ (void)setSubscription:(BOOL)enable;
|
|
538
|
+
+ (BOOL)isInAppMessagingPaused;
|
|
539
|
+
+ (void)pauseInAppMessages:(BOOL)pause;
|
|
540
|
+
|
|
541
|
+
// - Posting Notification
|
|
542
|
+
+ (void)postNotification:(NSDictionary*)jsonData;
|
|
543
|
+
+ (void)postNotification:(NSDictionary*)jsonData onSuccess:(OSResultSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock;
|
|
544
|
+
+ (void)postNotificationWithJsonString:(NSString*)jsonData onSuccess:(OSResultSuccessBlock)successBlock onFailure:(OSFailureBlock)failureBlock;
|
|
545
|
+
+ (NSString*)parseNSErrorAsJsonString:(NSError*)error;
|
|
546
|
+
|
|
547
|
+
// - Request and track user's location
|
|
548
|
+
+ (void)promptLocation;
|
|
549
|
+
+ (void)setLocationShared:(BOOL)enable;
|
|
550
|
+
+ (BOOL)isLocationShared;
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
// Only used for wrapping SDKs, such as Unity, Cordova, Xamarin, etc.
|
|
554
|
+
+ (void)setMSDKType:(NSString*)type;
|
|
555
|
+
|
|
556
|
+
+ (void)setInAppMessageClickHandler:(OSHandleInAppMessageActionClickBlock)delegate;
|
|
557
|
+
|
|
558
|
+
// iOS 10 only
|
|
559
|
+
// Process from Notification Service Extension.
|
|
560
|
+
// Used for iOS Media Attachemtns and Action Buttons.
|
|
561
|
+
+ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest*)request withMutableNotificationContent:(UNMutableNotificationContent*)replacementContent;
|
|
562
|
+
+ (UNMutableNotificationContent*)serviceExtensionTimeWillExpireRequest:(UNNotificationRequest*)request withMutableNotificationContent:(UNMutableNotificationContent*)replacementContent;
|
|
563
|
+
|
|
564
|
+
// Email methods
|
|
565
|
+
|
|
566
|
+
// Typedefs defining completion blocks for email & simultaneous HTTP requests
|
|
567
|
+
typedef void (^OSEmailFailureBlock)(NSError* error);
|
|
568
|
+
typedef void (^OSEmailSuccessBlock)();
|
|
569
|
+
|
|
570
|
+
// Allows you to set the email for this user.
|
|
571
|
+
// Email Auth Token is a (recommended) optional parameter that should *NOT* be generated on the client.
|
|
572
|
+
// For security purposes, the emailAuthToken should be generated by your backend server.
|
|
573
|
+
// If you do not have a backend server for your application, use the version of thge setEmail: method without an emailAuthToken parameter.
|
|
574
|
+
+ (void)setEmail:(NSString * _Nonnull)email withEmailAuthHashToken:(NSString * _Nullable)hashToken;
|
|
575
|
+
+ (void)setEmail:(NSString * _Nonnull)email withEmailAuthHashToken:(NSString * _Nullable)hashToken withSuccess:(OSEmailSuccessBlock _Nullable)successBlock withFailure:(OSEmailFailureBlock _Nullable)failureBlock;
|
|
576
|
+
|
|
577
|
+
// Sets email without an authentication token
|
|
578
|
+
+ (void)setEmail:(NSString * _Nonnull)email;
|
|
579
|
+
+ (void)setEmail:(NSString * _Nonnull)email withSuccess:(OSEmailSuccessBlock _Nullable)successBlock withFailure:(OSEmailFailureBlock _Nullable)failureBlock;
|
|
580
|
+
|
|
581
|
+
// Logs the device out of the current email.
|
|
582
|
+
+ (void)logoutEmail;
|
|
583
|
+
+ (void)logoutEmailWithSuccess:(OSEmailSuccessBlock _Nullable)successBlock withFailure:(OSEmailFailureBlock _Nullable)failureBlock;
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
// External user id
|
|
587
|
+
// Typedefs defining completion blocks for updating the external user id
|
|
588
|
+
typedef void (^OSUpdateExternalUserIdBlock)(NSDictionary* results);
|
|
589
|
+
typedef void (^OSUpdateExternalUserIdFailureBlock)(NSError *error);
|
|
590
|
+
typedef void (^OSUpdateExternalUserIdSuccessBlock)(NSDictionary *results);
|
|
591
|
+
|
|
592
|
+
+ (void)setExternalUserId:(NSString * _Nonnull)externalId;
|
|
593
|
+
+ (void)setExternalUserId:(NSString * _Nonnull)externalId withCompletion:(OSUpdateExternalUserIdBlock _Nullable)completionBlock;
|
|
594
|
+
+ (void)setExternalUserId:(NSString * _Nonnull)externalId withSuccess:(OSUpdateExternalUserIdSuccessBlock _Nullable)successBlock withFailure:(OSUpdateExternalUserIdFailureBlock _Nullable)failureBlock;
|
|
595
|
+
+ (void)setExternalUserId:(NSString *)externalId withExternalIdAuthHashToken:(NSString *)hashToken withSuccess:(OSUpdateExternalUserIdSuccessBlock _Nullable)successBlock withFailure:(OSUpdateExternalUserIdFailureBlock _Nullable)failureBlock;
|
|
596
|
+
+ (void)removeExternalUserId;
|
|
597
|
+
+ (void)removeExternalUserId:(OSUpdateExternalUserIdBlock _Nullable)completionBlock;
|
|
598
|
+
+ (void)removeExternalUserId:(OSUpdateExternalUserIdSuccessBlock _Nullable)successBlock withFailure:(OSUpdateExternalUserIdFailureBlock _Nullable)failureBlock;
|
|
599
|
+
|
|
600
|
+
// In-App Messaging triggers
|
|
601
|
+
+ (void)addTrigger:(NSString * _Nonnull)key withValue:(id _Nonnull)value;
|
|
602
|
+
+ (void)addTriggers:(NSDictionary<NSString *, id> * _Nonnull)triggers;
|
|
603
|
+
+ (void)removeTriggerForKey:(NSString * _Nonnull)key;
|
|
604
|
+
+ (void)removeTriggersForKeys:(NSArray<NSString *> * _Nonnull)keys;
|
|
605
|
+
+ (NSDictionary<NSString *, id> * _Nonnull)getTriggers;
|
|
606
|
+
+ (id _Nullable)getTriggerValueForKey:(NSString * _Nonnull)key;
|
|
607
|
+
|
|
608
|
+
// Outcome Events
|
|
609
|
+
+ (void)sendOutcome:(NSString * _Nonnull)name;
|
|
610
|
+
+ (void)sendOutcome:(NSString * _Nonnull)name onSuccess:(OSSendOutcomeSuccess _Nullable)success;
|
|
611
|
+
+ (void)sendUniqueOutcome:(NSString * _Nonnull)name;
|
|
612
|
+
+ (void)sendUniqueOutcome:(NSString * _Nonnull)name onSuccess:(OSSendOutcomeSuccess _Nullable)success;
|
|
613
|
+
+ (void)sendOutcomeWithValue:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value;
|
|
614
|
+
+ (void)sendOutcomeWithValue:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value onSuccess:(OSSendOutcomeSuccess _Nullable)success;
|
|
615
|
+
@end
|
|
616
|
+
|
|
617
|
+
#pragma clang diagnostic pop
|