Skip to content

Commit 0b780c0

Browse files
committed
Fix SMS channel being overridden by Push Channel
* Remove notification_types param from sms request * Remove notification_types from tests
1 parent 09628f4 commit 0b780c0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

iOS_SDK/OneSignalSDK/Source/OSStateSynchronizer.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ - (void)setSMSNumber:(NSString *)smsNumber
242242
[self callFailureBlockOnMainThread:failureBlock withError:error];
243243
}];
244244
} else {
245-
[OneSignalClient.sharedClient executeRequest:[OSRequestCreateDevice withAppId:appId withDeviceType:@(DEVICE_TYPE_SMS) notificationTypes:@([OneSignal getNotificationTypes]) withSMSNumber:smsNumber withPlayerId:_currentSubscriptionState.userId withSMSAuthHash:hashToken withExternalIdAuthToken:self.currentSubscriptionState.externalIdAuthCode] onSuccess:^(NSDictionary *result) {
245+
[OneSignalClient.sharedClient executeRequest:[OSRequestCreateDevice withAppId:appId withDeviceType:@(DEVICE_TYPE_SMS) withSMSNumber:smsNumber withPlayerId:_currentSubscriptionState.userId withSMSAuthHash:hashToken withExternalIdAuthToken:self.currentSubscriptionState.externalIdAuthCode] onSuccess:^(NSDictionary *result) {
246246
let smsPlayerId = (NSString*)result[@"id"];
247247

248248
if (smsPlayerId) {

iOS_SDK/OneSignalSDK/Source/Requests.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ NS_ASSUME_NONNULL_END
8383
@interface OSRequestCreateDevice : OneSignalRequest
8484
+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId withDeviceType:(NSNumber * _Nonnull)deviceType withEmail:(NSString * _Nullable)email withPlayerId:(NSString * _Nullable)playerId withEmailAuthHash:(NSString * _Nullable)emailAuthHash withExternalIdAuthToken:(NSString * _Nullable)externalIdAuthToken;
8585

86-
+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId withDeviceType:(NSNumber * _Nonnull)deviceType notificationTypes:(NSNumber * _Nonnull)notificationTypes withSMSNumber:(NSString * _Nullable)smsNumber withPlayerId:(NSString * _Nullable)playerId withSMSAuthHash:(NSString * _Nullable)smsAuthHash withExternalIdAuthToken:(NSString * _Nullable)externalIdAuthToken;
86+
+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId withDeviceType:(NSNumber * _Nonnull)deviceType withSMSNumber:(NSString * _Nullable)smsNumber withPlayerId:(NSString * _Nullable)playerId withSMSAuthHash:(NSString * _Nullable)smsAuthHash withExternalIdAuthToken:(NSString * _Nullable)externalIdAuthToken;
8787
@end
8888

8989
@interface OSRequestLogoutEmail : OneSignalRequest

iOS_SDK/OneSignalSDK/Source/Requests.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ + (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId withDeviceType:(NS
218218
return request;
219219
}
220220

221-
+ (instancetype)withAppId:(NSString *)appId withDeviceType:(NSNumber *)deviceType notificationTypes:(NSNumber *)notificationTypes withSMSNumber:(NSString *)smsNumber withPlayerId:(NSString *)playerId withSMSAuthHash:(NSString *)smsAuthHash withExternalIdAuthToken:(NSString *)externalIdAuthToken {
221+
+ (instancetype)withAppId:(NSString *)appId withDeviceType:(NSNumber *)deviceType withSMSNumber:(NSString *)smsNumber withPlayerId:(NSString *)playerId withSMSAuthHash:(NSString *)smsAuthHash withExternalIdAuthToken:(NSString *)externalIdAuthToken {
222222
let request = [OSRequestCreateDevice new];
223223

224224
request.parameters = @{

0 commit comments

Comments
 (0)