Skip to content

Commit 9fa02e1

Browse files
committed
Fixed 1.12.0 crash when calling sendTag(s) before init was done.
1 parent 912289b commit 9fa02e1

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

OneSignal.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "OneSignal"
3-
s.version = "1.12.1"
3+
s.version = "1.12.2"
44
s.summary = "OneSignal push notification library for mobile apps."
55
s.homepage = "https://onesignal.com"
66
s.license = { :type => 'MIT', :file => 'LICENSE' }
784 Bytes
Binary file not shown.

iOS_SDK/OneSignal/OneSignal.m

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ @interface OneSignal ()
6161

6262
@implementation OneSignal
6363

64-
NSString* const ONESIGNAL_VERSION = @"011200";
64+
NSString* const ONESIGNAL_VERSION = @"011201";
6565

6666
@synthesize app_id = _GT_publicKey;
6767
@synthesize httpClient = _GT_httpRequest;
@@ -459,12 +459,16 @@ - (void)registerUser {
459459
if (mDeviceToken)
460460
[self updateDeviceToken:mDeviceToken onSuccess:tokenUpdateSuccessBlock onFailure:tokenUpdateFailureBlock];
461461

462-
if (tagsToSend != nil) {
462+
if (tagsToSend) {
463463
[self sendTags:tagsToSend];
464-
[self sendLocation:lastLocation];
465464
tagsToSend = nil;
466465
}
467466

467+
if (lastLocation) {
468+
[self sendLocation:lastLocation];
469+
lastLocation = nil;
470+
}
471+
468472
if (idsAvailableBlockWhenReady) {
469473
idsAvailableBlockWhenReady(mUserId, getUsableDeviceToken());
470474
if (getUsableDeviceToken())

0 commit comments

Comments
 (0)