Skip to content

Commit 0076e51

Browse files
committed
feat(ios): update Firebase to 7.3.0
1 parent cfa8533 commit 0076e51

File tree

11 files changed

+136
-252
lines changed

11 files changed

+136
-252
lines changed

ios/Cartfile.resolved

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMessagingBinary.json" "6.29.0"
1+
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMessagingBinary.json" "7.3.0"

ios/Classes/FirebaseCloudmessagingModule.m

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,11 @@ - (void)_configure
4242
[[TiApp app] registerApplicationDelegate:self];
4343
}
4444

45-
- (void)startup
46-
{
47-
[super startup];
48-
NSLog(@"[DEBUG] %@ loaded", self);
49-
}
50-
5145
#pragma Public APIs
5246

5347
- (NSString *)fcmToken
5448
{
55-
return [[FIRMessaging messaging] FCMToken];
49+
return NULL_IF_NIL([[FIRMessaging messaging] FCMToken]);
5650
}
5751

5852
- (void)setApnsToken:(NSString *)apnsToken
@@ -77,7 +71,7 @@ - (void)unsubscribeFromTopic:(id)topic
7771
- (void)messaging:(FIRMessaging *)messaging didReceiveRegistrationToken:(NSString *)fcmToken
7872
{
7973
if ([self _hasListeners:@"didRefreshRegistrationToken"]) {
80-
[self fireEvent:@"didRefreshRegistrationToken" withObject:@{ @"fcmToken": fcmToken }];
74+
[self fireEvent:@"didRefreshRegistrationToken" withObject:@{ @"fcmToken": NULL_IF_NIL(fcmToken) }];
8175
}
8276
}
8377

@@ -86,29 +80,10 @@ - (void)application:(UIApplication *)application didRegisterForRemoteNotificatio
8680
[[FIRMessaging messaging] setAPNSToken:deviceToken];
8781
}
8882

89-
#pragma mark Deprecated / removed APIs
90-
91-
- (void)setShouldEstablishDirectChannel:(NSNumber *)shouldEstablishDirectChannel
92-
{
93-
DEPRECATED_REMOVED(@"Firebase.CloudMessaging.shouldEstablishDirectChannel", @"3.0.0", @"3.0.0 (FCM direct channel is deprecated, please use APNs channel for downstream message delivery.)");
94-
}
95-
96-
- (NSNumber *)shouldEstablishDirectChannel
97-
{
98-
DEPRECATED_REMOVED(@"Firebase.CloudMessaging.shouldEstablishDirectChannel", @"3.0.0", @"3.0.0 (FCM direct channel is deprecated, please use APNs channel for downstream message delivery.)");
99-
100-
return @(NO);
101-
}
102-
10383
- (void)appDidReceiveMessage:(id)arguments
10484
{
10585
ENSURE_SINGLE_ARG(arguments, NSDictionary);
10686
[[FIRMessaging messaging] appDidReceiveMessage:arguments];
10787
}
10888

109-
- (void)sendMessage:(id)arguments
110-
{
111-
DEPRECATED_REMOVED(@"Firebase.CloudMessaging.sendMessage", @"3.0.0", @"3.0.0 (Upstream messaging through direct channel is deprecated. For realtime updates, use Cloud Firestore, Realtime Database, or other services.)");
112-
}
113-
11489
@end

ios/carthage.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# carthage.sh
2+
# Usage example: ./carthage.sh build --platform iOS
3+
4+
set -euo pipefail
5+
6+
xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX)
7+
trap 'rm -f "$xcconfig"' INT TERM HUP EXIT
8+
9+
# For Xcode 12 make sure EXCLUDED_ARCHS is set to arm architectures otherwise
10+
# the build will fail on lipo due to duplicate architectures.
11+
12+
CURRENT_XCODE_VERSION=$(xcodebuild -version | grep "Build version" | cut -d' ' -f3)
13+
echo "EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_$CURRENT_XCODE_VERSION = arm64 arm64e armv7 armv7s armv6 armv8" >> $xcconfig
14+
15+
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_$(XCODE_PRODUCT_BUILD_VERSION))' >> $xcconfig
16+
echo 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))' >> $xcconfig
17+
18+
export XCODE_XCCONFIG_FILE="$xcconfig"
19+
carthage "$@"

ios/manifest

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22
# this is your module manifest and used by Titanium
33
# during compilation, packaging, distribution, etc.
44
#
5-
version: 3.0.0
5+
version: 4.0.0
66
apiversion: 2
7-
architectures: armv7 arm64 i386 x86_64
7+
architectures: arm64 x86_64
88
description: titanium-firebase-cloud-messaging
99
author: Hans Knoechel
1010
license: Apache 2
11+
mac: false
1112
copyright: Copyright (c) 2017 by Axway Appcelerator
1213

1314
# these should not be edited
1415
name: titanium-firebase-cloud-messaging
1516
moduleid: firebase.cloudmessaging
1617
guid: 36052f2b-8ddc-4177-b5a1-82c6b948f83d
1718
platform: iphone
18-
minsdk: 8.3.1.GA
19+
minsdk: 9.2.0.GA
Binary file not shown.

0 commit comments

Comments
 (0)