Skip to content

Commit de0e229

Browse files
committed
Binaries and updated header file for release 3.4.0
1 parent 9e486b0 commit de0e229

File tree

11 files changed

+326
-56
lines changed

11 files changed

+326
-56
lines changed

iOS_SDK/OneSignalSDK/Framework/OneSignal.framework/Versions/A/Headers/OneSignal.h

Lines changed: 63 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -294,25 +294,42 @@ typedef NS_ENUM(NSInteger, OSNotificationPermission) {
294294

295295
@end
296296

297-
@interface OSEmailSubscriptionState : NSObject
298-
@property (readonly, nonatomic, nullable) NSString* emailUserId; // The new Email user ID
299-
@property (readonly, nonatomic, nullable) NSString *emailAddress;
300-
@property (readonly, nonatomic) BOOL isSubscribed;
301-
- (NSDictionary* _Nonnull)toDictionary;
302-
@end
303-
304297
@interface OSSubscriptionStateChanges : NSObject
305298
@property (readonly, nonnull) OSSubscriptionState* to;
306299
@property (readonly, nonnull) OSSubscriptionState* from;
307300
- (NSDictionary* _Nonnull)toDictionary;
308301
@end
309302

303+
@interface OSEmailSubscriptionState : NSObject
304+
@property (readonly, nonatomic, nullable) NSString *emailUserId; // The new Email user ID
305+
@property (readonly, nonatomic, nullable) NSString *emailAddress;
306+
@property (readonly, nonatomic) BOOL isSubscribed;
307+
- (NSDictionary* _Nonnull)toDictionary;
308+
@end
309+
310310
@interface OSEmailSubscriptionStateChanges : NSObject
311311
@property (readonly, nonnull) OSEmailSubscriptionState* to;
312312
@property (readonly, nonnull) OSEmailSubscriptionState* from;
313313
- (NSDictionary* _Nonnull)toDictionary;
314314
@end
315315

316+
@interface OSSMSSubscriptionState : NSObject
317+
@property (readonly, nonatomic, nullable) NSString* smsUserId;
318+
@property (readonly, nonatomic, nullable) NSString *smsNumber;
319+
@property (readonly, nonatomic) BOOL isSubscribed;
320+
- (NSDictionary* _Nonnull)toDictionary;
321+
@end
322+
323+
@interface OSSMSSubscriptionStateChanges : NSObject
324+
@property (readonly, nonnull) OSSMSSubscriptionState* to;
325+
@property (readonly, nonnull) OSSMSSubscriptionState* from;
326+
- (NSDictionary* _Nonnull)toDictionary;
327+
@end
328+
329+
@protocol OSPermissionObserver <NSObject>
330+
- (void)onOSPermissionChanged:(OSPermissionStateChanges* _Nonnull)stateChanges;
331+
@end
332+
316333
@protocol OSSubscriptionObserver <NSObject>
317334
- (void)onOSSubscriptionChanged:(OSSubscriptionStateChanges* _Nonnull)stateChanges;
318335
@end
@@ -321,8 +338,8 @@ typedef NS_ENUM(NSInteger, OSNotificationPermission) {
321338
- (void)onOSEmailSubscriptionChanged:(OSEmailSubscriptionStateChanges* _Nonnull)stateChanges;
322339
@end
323340

324-
@protocol OSPermissionObserver <NSObject>
325-
- (void)onOSPermissionChanged:(OSPermissionStateChanges* _Nonnull)stateChanges;
341+
@protocol OSSMSSubscriptionObserver <NSObject>
342+
- (void)onOSSMSSubscriptionChanged:(OSSMSSubscriptionStateChanges* _Nonnull)stateChanges;
326343
@end
327344

328345
@interface OSDeviceState : NSObject
@@ -369,6 +386,20 @@ typedef NS_ENUM(NSInteger, OSNotificationPermission) {
369386

370387
@property (readonly) BOOL isEmailSubscribed;
371388

389+
/**
390+
* Get the user sms id
391+
* @return sms id if user sms number was registered, otherwise null
392+
*/
393+
@property (readonly, nullable) NSString* smsUserId;
394+
/**
395+
* Get the user sms number, number may start with + and continue with numbers or contain only numbers
396+
* e.g: +11231231231 or 11231231231
397+
* @return sms number if set, otherwise null
398+
*/
399+
@property (readonly, nullable) NSString* smsNumber;
400+
401+
@property (readonly) BOOL isSMSSubscribed;
402+
372403
// Convert the class into a NSDictionary
373404
- (NSDictionary *_Nonnull)jsonRepresentation;
374405

@@ -485,6 +516,9 @@ NS_ASSUME_NONNULL_BEGIN
485516

486517
+ (void)addEmailSubscriptionObserver:(NSObject<OSEmailSubscriptionObserver>*)observer;
487518
+ (void)removeEmailSubscriptionObserver:(NSObject<OSEmailSubscriptionObserver>*)observer;
519+
520+
+ (void)addSMSSubscriptionObserver:(NSObject<OSSMSSubscriptionObserver>*)observer;
521+
+ (void)removeSMSSubscriptionObserver:(NSObject<OSSMSSubscriptionObserver>*)observer;
488522
NS_ASSUME_NONNULL_END
489523

490524
#pragma mark Email
@@ -507,6 +541,26 @@ typedef void (^OSEmailSuccessBlock)();
507541
+ (void)logoutEmail;
508542
+ (void)logoutEmailWithSuccess:(OSEmailSuccessBlock _Nullable)successBlock withFailure:(OSEmailFailureBlock _Nullable)failureBlock;
509543

544+
#pragma mark SMS
545+
// Typedefs defining completion blocks for SMS & simultaneous HTTP requests
546+
typedef void (^OSSMSFailureBlock)(NSError *error);
547+
typedef void (^OSSMSSuccessBlock)(NSDictionary *results);
548+
549+
// Allows you to set the SMS for this user. SMS number may start with + and continue with numbers or contain only numbers
550+
// e.g: +11231231231 or 11231231231
551+
// SMS Auth Token is a (recommended) optional parameter that should *NOT* be generated on the client.
552+
// For security purposes, the smsAuthToken should be generated by your backend server.
553+
// If you do not have a backend server for your application, use the version of thge setSMSNumber: method without an smsAuthToken parameter.
554+
+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber withSMSAuthHashToken:(NSString * _Nullable)hashToken;
555+
+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber withSMSAuthHashToken:(NSString * _Nullable)hashToken withSuccess:(OSSMSSuccessBlock _Nullable)successBlock withFailure:(OSSMSFailureBlock _Nullable)failureBlock;
556+
557+
// Sets SMS without an authentication token
558+
+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber;
559+
+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber withSuccess:(OSSMSSuccessBlock _Nullable)successBlock withFailure:(OSSMSFailureBlock _Nullable)failureBlock;
560+
561+
// Logs the device out of the current sms number.
562+
+ (void)logoutSMSNumber;
563+
+ (void)logoutSMSNumberWithSuccess:(OSSMSSuccessBlock _Nullable)successBlock withFailure:(OSSMSFailureBlock _Nullable)failureBlock;
510564

511565
#pragma mark External User Id
512566
// Typedefs defining completion blocks for updating the external user id
Binary file not shown.

iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/Info.plist

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,33 @@
66
<array>
77
<dict>
88
<key>LibraryIdentifier</key>
9-
<string>ios-arm64_armv7_armv7s</string>
9+
<string>ios-arm64_i386_x86_64-simulator</string>
1010
<key>LibraryPath</key>
1111
<string>OneSignal.framework</string>
1212
<key>SupportedArchitectures</key>
1313
<array>
1414
<string>arm64</string>
15-
<string>armv7</string>
16-
<string>armv7s</string>
15+
<string>i386</string>
16+
<string>x86_64</string>
1717
</array>
1818
<key>SupportedPlatform</key>
1919
<string>ios</string>
20+
<key>SupportedPlatformVariant</key>
21+
<string>simulator</string>
2022
</dict>
2123
<dict>
2224
<key>LibraryIdentifier</key>
23-
<string>ios-arm64_i386_x86_64-simulator</string>
25+
<string>ios-arm64_armv7_armv7s</string>
2426
<key>LibraryPath</key>
2527
<string>OneSignal.framework</string>
2628
<key>SupportedArchitectures</key>
2729
<array>
2830
<string>arm64</string>
29-
<string>i386</string>
30-
<string>x86_64</string>
31+
<string>armv7</string>
32+
<string>armv7s</string>
3133
</array>
3234
<key>SupportedPlatform</key>
3335
<string>ios</string>
34-
<key>SupportedPlatformVariant</key>
35-
<string>simulator</string>
3636
</dict>
3737
<dict>
3838
<key>LibraryIdentifier</key>

iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_armv7_armv7s/OneSignal.framework/Headers/OneSignal.h

Lines changed: 63 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -294,25 +294,42 @@ typedef NS_ENUM(NSInteger, OSNotificationPermission) {
294294

295295
@end
296296

297-
@interface OSEmailSubscriptionState : NSObject
298-
@property (readonly, nonatomic, nullable) NSString* emailUserId; // The new Email user ID
299-
@property (readonly, nonatomic, nullable) NSString *emailAddress;
300-
@property (readonly, nonatomic) BOOL isSubscribed;
301-
- (NSDictionary* _Nonnull)toDictionary;
302-
@end
303-
304297
@interface OSSubscriptionStateChanges : NSObject
305298
@property (readonly, nonnull) OSSubscriptionState* to;
306299
@property (readonly, nonnull) OSSubscriptionState* from;
307300
- (NSDictionary* _Nonnull)toDictionary;
308301
@end
309302

303+
@interface OSEmailSubscriptionState : NSObject
304+
@property (readonly, nonatomic, nullable) NSString *emailUserId; // The new Email user ID
305+
@property (readonly, nonatomic, nullable) NSString *emailAddress;
306+
@property (readonly, nonatomic) BOOL isSubscribed;
307+
- (NSDictionary* _Nonnull)toDictionary;
308+
@end
309+
310310
@interface OSEmailSubscriptionStateChanges : NSObject
311311
@property (readonly, nonnull) OSEmailSubscriptionState* to;
312312
@property (readonly, nonnull) OSEmailSubscriptionState* from;
313313
- (NSDictionary* _Nonnull)toDictionary;
314314
@end
315315

316+
@interface OSSMSSubscriptionState : NSObject
317+
@property (readonly, nonatomic, nullable) NSString* smsUserId;
318+
@property (readonly, nonatomic, nullable) NSString *smsNumber;
319+
@property (readonly, nonatomic) BOOL isSubscribed;
320+
- (NSDictionary* _Nonnull)toDictionary;
321+
@end
322+
323+
@interface OSSMSSubscriptionStateChanges : NSObject
324+
@property (readonly, nonnull) OSSMSSubscriptionState* to;
325+
@property (readonly, nonnull) OSSMSSubscriptionState* from;
326+
- (NSDictionary* _Nonnull)toDictionary;
327+
@end
328+
329+
@protocol OSPermissionObserver <NSObject>
330+
- (void)onOSPermissionChanged:(OSPermissionStateChanges* _Nonnull)stateChanges;
331+
@end
332+
316333
@protocol OSSubscriptionObserver <NSObject>
317334
- (void)onOSSubscriptionChanged:(OSSubscriptionStateChanges* _Nonnull)stateChanges;
318335
@end
@@ -321,8 +338,8 @@ typedef NS_ENUM(NSInteger, OSNotificationPermission) {
321338
- (void)onOSEmailSubscriptionChanged:(OSEmailSubscriptionStateChanges* _Nonnull)stateChanges;
322339
@end
323340

324-
@protocol OSPermissionObserver <NSObject>
325-
- (void)onOSPermissionChanged:(OSPermissionStateChanges* _Nonnull)stateChanges;
341+
@protocol OSSMSSubscriptionObserver <NSObject>
342+
- (void)onOSSMSSubscriptionChanged:(OSSMSSubscriptionStateChanges* _Nonnull)stateChanges;
326343
@end
327344

328345
@interface OSDeviceState : NSObject
@@ -369,6 +386,20 @@ typedef NS_ENUM(NSInteger, OSNotificationPermission) {
369386

370387
@property (readonly) BOOL isEmailSubscribed;
371388

389+
/**
390+
* Get the user sms id
391+
* @return sms id if user sms number was registered, otherwise null
392+
*/
393+
@property (readonly, nullable) NSString* smsUserId;
394+
/**
395+
* Get the user sms number, number may start with + and continue with numbers or contain only numbers
396+
* e.g: +11231231231 or 11231231231
397+
* @return sms number if set, otherwise null
398+
*/
399+
@property (readonly, nullable) NSString* smsNumber;
400+
401+
@property (readonly) BOOL isSMSSubscribed;
402+
372403
// Convert the class into a NSDictionary
373404
- (NSDictionary *_Nonnull)jsonRepresentation;
374405

@@ -485,6 +516,9 @@ NS_ASSUME_NONNULL_BEGIN
485516

486517
+ (void)addEmailSubscriptionObserver:(NSObject<OSEmailSubscriptionObserver>*)observer;
487518
+ (void)removeEmailSubscriptionObserver:(NSObject<OSEmailSubscriptionObserver>*)observer;
519+
520+
+ (void)addSMSSubscriptionObserver:(NSObject<OSSMSSubscriptionObserver>*)observer;
521+
+ (void)removeSMSSubscriptionObserver:(NSObject<OSSMSSubscriptionObserver>*)observer;
488522
NS_ASSUME_NONNULL_END
489523

490524
#pragma mark Email
@@ -507,6 +541,26 @@ typedef void (^OSEmailSuccessBlock)();
507541
+ (void)logoutEmail;
508542
+ (void)logoutEmailWithSuccess:(OSEmailSuccessBlock _Nullable)successBlock withFailure:(OSEmailFailureBlock _Nullable)failureBlock;
509543

544+
#pragma mark SMS
545+
// Typedefs defining completion blocks for SMS & simultaneous HTTP requests
546+
typedef void (^OSSMSFailureBlock)(NSError *error);
547+
typedef void (^OSSMSSuccessBlock)(NSDictionary *results);
548+
549+
// Allows you to set the SMS for this user. SMS number may start with + and continue with numbers or contain only numbers
550+
// e.g: +11231231231 or 11231231231
551+
// SMS Auth Token is a (recommended) optional parameter that should *NOT* be generated on the client.
552+
// For security purposes, the smsAuthToken should be generated by your backend server.
553+
// If you do not have a backend server for your application, use the version of thge setSMSNumber: method without an smsAuthToken parameter.
554+
+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber withSMSAuthHashToken:(NSString * _Nullable)hashToken;
555+
+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber withSMSAuthHashToken:(NSString * _Nullable)hashToken withSuccess:(OSSMSSuccessBlock _Nullable)successBlock withFailure:(OSSMSFailureBlock _Nullable)failureBlock;
556+
557+
// Sets SMS without an authentication token
558+
+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber;
559+
+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber withSuccess:(OSSMSSuccessBlock _Nullable)successBlock withFailure:(OSSMSFailureBlock _Nullable)failureBlock;
560+
561+
// Logs the device out of the current sms number.
562+
+ (void)logoutSMSNumber;
563+
+ (void)logoutSMSNumberWithSuccess:(OSSMSSuccessBlock _Nullable)successBlock withFailure:(OSSMSFailureBlock _Nullable)failureBlock;
510564

511565
#pragma mark External User Id
512566
// Typedefs defining completion blocks for updating the external user id

iOS_SDK/OneSignalSDK/OneSignal_XCFramework/OneSignal.xcframework/ios-arm64_i386_x86_64-simulator/OneSignal.framework/Headers/OneSignal.h

Lines changed: 63 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -294,25 +294,42 @@ typedef NS_ENUM(NSInteger, OSNotificationPermission) {
294294

295295
@end
296296

297-
@interface OSEmailSubscriptionState : NSObject
298-
@property (readonly, nonatomic, nullable) NSString* emailUserId; // The new Email user ID
299-
@property (readonly, nonatomic, nullable) NSString *emailAddress;
300-
@property (readonly, nonatomic) BOOL isSubscribed;
301-
- (NSDictionary* _Nonnull)toDictionary;
302-
@end
303-
304297
@interface OSSubscriptionStateChanges : NSObject
305298
@property (readonly, nonnull) OSSubscriptionState* to;
306299
@property (readonly, nonnull) OSSubscriptionState* from;
307300
- (NSDictionary* _Nonnull)toDictionary;
308301
@end
309302

303+
@interface OSEmailSubscriptionState : NSObject
304+
@property (readonly, nonatomic, nullable) NSString *emailUserId; // The new Email user ID
305+
@property (readonly, nonatomic, nullable) NSString *emailAddress;
306+
@property (readonly, nonatomic) BOOL isSubscribed;
307+
- (NSDictionary* _Nonnull)toDictionary;
308+
@end
309+
310310
@interface OSEmailSubscriptionStateChanges : NSObject
311311
@property (readonly, nonnull) OSEmailSubscriptionState* to;
312312
@property (readonly, nonnull) OSEmailSubscriptionState* from;
313313
- (NSDictionary* _Nonnull)toDictionary;
314314
@end
315315

316+
@interface OSSMSSubscriptionState : NSObject
317+
@property (readonly, nonatomic, nullable) NSString* smsUserId;
318+
@property (readonly, nonatomic, nullable) NSString *smsNumber;
319+
@property (readonly, nonatomic) BOOL isSubscribed;
320+
- (NSDictionary* _Nonnull)toDictionary;
321+
@end
322+
323+
@interface OSSMSSubscriptionStateChanges : NSObject
324+
@property (readonly, nonnull) OSSMSSubscriptionState* to;
325+
@property (readonly, nonnull) OSSMSSubscriptionState* from;
326+
- (NSDictionary* _Nonnull)toDictionary;
327+
@end
328+
329+
@protocol OSPermissionObserver <NSObject>
330+
- (void)onOSPermissionChanged:(OSPermissionStateChanges* _Nonnull)stateChanges;
331+
@end
332+
316333
@protocol OSSubscriptionObserver <NSObject>
317334
- (void)onOSSubscriptionChanged:(OSSubscriptionStateChanges* _Nonnull)stateChanges;
318335
@end
@@ -321,8 +338,8 @@ typedef NS_ENUM(NSInteger, OSNotificationPermission) {
321338
- (void)onOSEmailSubscriptionChanged:(OSEmailSubscriptionStateChanges* _Nonnull)stateChanges;
322339
@end
323340

324-
@protocol OSPermissionObserver <NSObject>
325-
- (void)onOSPermissionChanged:(OSPermissionStateChanges* _Nonnull)stateChanges;
341+
@protocol OSSMSSubscriptionObserver <NSObject>
342+
- (void)onOSSMSSubscriptionChanged:(OSSMSSubscriptionStateChanges* _Nonnull)stateChanges;
326343
@end
327344

328345
@interface OSDeviceState : NSObject
@@ -369,6 +386,20 @@ typedef NS_ENUM(NSInteger, OSNotificationPermission) {
369386

370387
@property (readonly) BOOL isEmailSubscribed;
371388

389+
/**
390+
* Get the user sms id
391+
* @return sms id if user sms number was registered, otherwise null
392+
*/
393+
@property (readonly, nullable) NSString* smsUserId;
394+
/**
395+
* Get the user sms number, number may start with + and continue with numbers or contain only numbers
396+
* e.g: +11231231231 or 11231231231
397+
* @return sms number if set, otherwise null
398+
*/
399+
@property (readonly, nullable) NSString* smsNumber;
400+
401+
@property (readonly) BOOL isSMSSubscribed;
402+
372403
// Convert the class into a NSDictionary
373404
- (NSDictionary *_Nonnull)jsonRepresentation;
374405

@@ -485,6 +516,9 @@ NS_ASSUME_NONNULL_BEGIN
485516

486517
+ (void)addEmailSubscriptionObserver:(NSObject<OSEmailSubscriptionObserver>*)observer;
487518
+ (void)removeEmailSubscriptionObserver:(NSObject<OSEmailSubscriptionObserver>*)observer;
519+
520+
+ (void)addSMSSubscriptionObserver:(NSObject<OSSMSSubscriptionObserver>*)observer;
521+
+ (void)removeSMSSubscriptionObserver:(NSObject<OSSMSSubscriptionObserver>*)observer;
488522
NS_ASSUME_NONNULL_END
489523

490524
#pragma mark Email
@@ -507,6 +541,26 @@ typedef void (^OSEmailSuccessBlock)();
507541
+ (void)logoutEmail;
508542
+ (void)logoutEmailWithSuccess:(OSEmailSuccessBlock _Nullable)successBlock withFailure:(OSEmailFailureBlock _Nullable)failureBlock;
509543

544+
#pragma mark SMS
545+
// Typedefs defining completion blocks for SMS & simultaneous HTTP requests
546+
typedef void (^OSSMSFailureBlock)(NSError *error);
547+
typedef void (^OSSMSSuccessBlock)(NSDictionary *results);
548+
549+
// Allows you to set the SMS for this user. SMS number may start with + and continue with numbers or contain only numbers
550+
// e.g: +11231231231 or 11231231231
551+
// SMS Auth Token is a (recommended) optional parameter that should *NOT* be generated on the client.
552+
// For security purposes, the smsAuthToken should be generated by your backend server.
553+
// If you do not have a backend server for your application, use the version of thge setSMSNumber: method without an smsAuthToken parameter.
554+
+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber withSMSAuthHashToken:(NSString * _Nullable)hashToken;
555+
+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber withSMSAuthHashToken:(NSString * _Nullable)hashToken withSuccess:(OSSMSSuccessBlock _Nullable)successBlock withFailure:(OSSMSFailureBlock _Nullable)failureBlock;
556+
557+
// Sets SMS without an authentication token
558+
+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber;
559+
+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber withSuccess:(OSSMSSuccessBlock _Nullable)successBlock withFailure:(OSSMSFailureBlock _Nullable)failureBlock;
560+
561+
// Logs the device out of the current sms number.
562+
+ (void)logoutSMSNumber;
563+
+ (void)logoutSMSNumberWithSuccess:(OSSMSSuccessBlock _Nullable)successBlock withFailure:(OSSMSFailureBlock _Nullable)failureBlock;
510564

511565
#pragma mark External User Id
512566
// Typedefs defining completion blocks for updating the external user id

0 commit comments

Comments
 (0)