Skip to content

Commit a926dd9

Browse files
authored
Merge pull request #1017 from OneSignal/react_native_release_3.9.0
Release commit for React-Native 3.9.0
2 parents 545521f + 41affbe commit a926dd9

File tree

5 files changed

+80
-7
lines changed

5 files changed

+80
-7
lines changed

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ dependencies {
2424

2525
// api is used instead of implementation so the parent :app project can access any of the OneSignal Java
2626
// classes if needed. Such as com.onesignal.NotificationExtenderService
27-
api 'com.onesignal:OneSignal:3.14.1'
27+
api 'com.onesignal:OneSignal:3.15.1'
2828

2929
testImplementation 'junit:junit:4.12'
3030
}

ios/OneSignal.h

Lines changed: 77 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,20 +189,50 @@ typedef NS_ENUM(NSUInteger, OSNotificationDisplayType) {
189189

190190
@end;
191191

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+
192213
@interface OSInAppMessageAction : NSObject
193214

194-
/* The action name attached to the IAM action */
215+
// The action name attached to the IAM action
195216
@property (strong, nonatomic, nullable) NSString *clickName;
196217

197-
/* The URL (if any) that should be opened when the action occurs */
218+
// The URL (if any) that should be opened when the action occurs
198219
@property (strong, nonatomic, nullable) NSURL *clickUrl;
199220

200-
/* Whether or not the click action is first click on the IAM */
221+
// Whether or not the click action is first click on the IAM
201222
@property (nonatomic) BOOL firstClick;
202223

203-
/* Whether or not the click action dismisses the message */
224+
// Whether or not the click action dismisses the message
204225
@property (nonatomic) BOOL closesMessage;
205226

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+
206236
@end
207237

208238
@protocol OSInAppMessageDelegate <NSObject>
@@ -335,6 +365,48 @@ typedef NS_ENUM(NSInteger, OSNotificationPermission) {
335365

336366
@end
337367

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
338410

339411
typedef void (^OSWebOpenURLResultBlock)(BOOL shouldOpen);
340412

@@ -451,6 +523,7 @@ typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) {
451523
+ (void)IdsAvailable:(OSIdsAvailableBlock)idsAvailableBlock __deprecated_msg("Please use getPermissionSubscriptionState or addSubscriptionObserver and addPermissionObserver instead.");
452524

453525
+ (OSPermissionSubscriptionState*)getPermissionSubscriptionState;
526+
+ (OSDevice*)getUserDevice;
454527

455528
+ (void)addPermissionObserver:(NSObject<OSPermissionObserver>*)observer;
456529
+ (void)removePermissionObserver:(NSObject<OSPermissionObserver>*)observer;

ios/libOneSignal.a

155 KB
Binary file not shown.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-onesignal",
3-
"version": "3.8.1",
3+
"version": "3.9.0",
44
"description": "React Native OneSignal SDK",
55
"main": "index",
66
"scripts": {

react-native-onesignal.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ Pod::Spec.new do |s|
2222
# pod 'React', :path => '../node_modules/react-native/'
2323

2424
# The Native OneSignal-iOS-SDK from cocoapods.
25-
s.dependency 'OneSignal', '2.14.2'
25+
s.dependency 'OneSignal', '2.14.3'
2626
end

0 commit comments

Comments
 (0)