Skip to content

Commit 3aaa431

Browse files
committed
SHK-7858: Fixed network requests crash
1 parent 9abac36 commit 3aaa431

2 files changed

Lines changed: 16 additions & 12 deletions

File tree

example/ios/Podfile.lock

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,28 +34,28 @@ PODS:
3434
- GoogleDataTransport (10.1.0):
3535
- nanopb (~> 3.30910.0)
3636
- PromisesObjC (~> 2.4)
37-
- GoogleUtilities/AppDelegateSwizzler (8.0.2):
37+
- GoogleUtilities/AppDelegateSwizzler (8.1.0):
3838
- GoogleUtilities/Environment
3939
- GoogleUtilities/Logger
4040
- GoogleUtilities/Network
4141
- GoogleUtilities/Privacy
42-
- GoogleUtilities/Environment (8.0.2):
42+
- GoogleUtilities/Environment (8.1.0):
4343
- GoogleUtilities/Privacy
44-
- GoogleUtilities/Logger (8.0.2):
44+
- GoogleUtilities/Logger (8.1.0):
4545
- GoogleUtilities/Environment
4646
- GoogleUtilities/Privacy
47-
- GoogleUtilities/Network (8.0.2):
47+
- GoogleUtilities/Network (8.1.0):
4848
- GoogleUtilities/Logger
4949
- "GoogleUtilities/NSData+zlib"
5050
- GoogleUtilities/Privacy
5151
- GoogleUtilities/Reachability
52-
- "GoogleUtilities/NSData+zlib (8.0.2)":
52+
- "GoogleUtilities/NSData+zlib (8.1.0)":
5353
- GoogleUtilities/Privacy
54-
- GoogleUtilities/Privacy (8.0.2)
55-
- GoogleUtilities/Reachability (8.0.2):
54+
- GoogleUtilities/Privacy (8.1.0)
55+
- GoogleUtilities/Reachability (8.1.0):
5656
- GoogleUtilities/Logger
5757
- GoogleUtilities/Privacy
58-
- GoogleUtilities/UserDefaults (8.0.2):
58+
- GoogleUtilities/UserDefaults (8.1.0):
5959
- GoogleUtilities/Logger
6060
- GoogleUtilities/Privacy
6161
- hermes-engine (0.76.3):
@@ -1605,7 +1605,7 @@ PODS:
16051605
- RNFBApp
16061606
- RNFS (2.20.0):
16071607
- React-Core
1608-
- Shake-Staging (17.1.0-rc.1618)
1608+
- Shake-Staging (17.1.2-rc.1626)
16091609
- SocketRocket (0.7.1)
16101610
- Yoga (0.0.0)
16111611

@@ -1852,7 +1852,7 @@ SPEC CHECKSUMS:
18521852
fmt: 10c6e61f4be25dc963c36bd73fc7b1705fe975be
18531853
glog: 08b301085f15bcbb6ff8632a8ebaf239aae04e6a
18541854
GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7
1855-
GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d
1855+
GoogleUtilities: 00c88b9a86066ef77f0da2fab05f65d7768ed8e1
18561856
hermes-engine: 0555a84ea495e8e3b4bde71b597cd87fbb382888
18571857
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
18581858
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
@@ -1918,7 +1918,7 @@ SPEC CHECKSUMS:
19181918
RNFBApp: 72b96921c64702d51eca9f3ed579c1777efd0d7e
19191919
RNFBMessaging: 2ad5a47bd81da9f2d65188292d24115f40cbba74
19201920
RNFS: 89de7d7f4c0f6bafa05343c578f61118c8282ed8
1921-
Shake-Staging: f77d61b3b376dbb23bfff829725ed49666ca5040
1921+
Shake-Staging: e6816093c214af312f3c0e4c0ae70bef028f8387
19221922
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
19231923
Yoga: e6c2f5a192a47cd0c5523ec8c4f7eca01d15d077
19241924

ios/Shake.mm

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,10 +737,14 @@ - (NSDictionary*)mapToNetworkRequestToDict:(JS::NativeShake::NetworkRequest &)na
737737
}
738738

739739
- (NSNumber *)parseIntegerFromString:(NSString *)string {
740+
if (string == nil || [string length] == 0)
741+
return @0;
742+
740743
NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init];
741744
formatter.numberStyle = NSNumberFormatterNoStyle;
742745

743-
return [formatter numberFromString:string];
746+
NSNumber *number = [formatter numberFromString:string];
747+
return number ?: @0;
744748
}
745749

746750
- (NSDictionary*)mapToNotificationEvent:(JS::NativeShake::NotificationEvent &)nativeNotification

0 commit comments

Comments
 (0)