Skip to content

Commit e0f5549

Browse files
committed
feat(ios): update to Firebase 6.29.0
1 parent 9011c70 commit e0f5549

File tree

10 files changed

+39
-89
lines changed

10 files changed

+39
-89
lines changed

ios/Cartfile

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

ios/Cartfile.resolved

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

ios/Classes/FirebaseCloudmessagingModule.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,14 @@
66
*/
77

88
#import "TiModule.h"
9-
10-
#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
119
#import <UserNotifications/UserNotifications.h>
12-
#endif
1310

1411
@import FirebaseMessaging;
1512

16-
#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
17-
@interface FirebaseCloudmessagingModule : TiModule<FIRMessagingDelegate, UIApplicationDelegate, UNUserNotificationCenterDelegate> {
18-
#else
19-
@interface FirebaseCloudmessagingModule : TiModule<FIRMessagingDelegate, UIApplicationDelegate> {
20-
#endif
21-
}
13+
@interface FirebaseCloudmessagingModule : TiModule<FIRMessagingDelegate, UIApplicationDelegate, UNUserNotificationCenterDelegate>
2214

2315
- (NSString *)fcmToken;
2416

25-
- (void)registerForPushNotifications:(id)arguments;
26-
2717
- (void)setApnsToken:(NSString *)apnsToken;
2818

2919
- (void)setShouldEstablishDirectChannel:(NSNumber *)shouldEstablishDirectChannel;

ios/Classes/FirebaseCloudmessagingModule.m

Lines changed: 25 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -55,52 +55,11 @@ - (NSString *)fcmToken
5555
return [[FIRMessaging messaging] FCMToken];
5656
}
5757

58-
- (void)registerForPushNotifications:(id)arguments
59-
{
60-
DEPRECATED_REPLACED_REMOVED(@"FirebaseCloudMessaging.registerForPushNotifications", @"2.0.0", @"2.0.0", @"Network.registerForPushNotifications");
61-
}
62-
6358
- (void)setApnsToken:(NSString *)apnsToken
6459
{
6560
[[FIRMessaging messaging] setAPNSToken:[apnsToken dataUsingEncoding:NSUTF8StringEncoding]];
6661
}
6762

68-
- (void)setShouldEstablishDirectChannel:(NSNumber *)shouldEstablishDirectChannel
69-
{
70-
DEPRECATED_REMOVED(@"Firebase.CloudMessaging.shouldEstablishDirectChannel (use APNs channel for downstream messaging)", @"3.0.0", @"4.0.0");
71-
72-
[[FIRMessaging messaging] setShouldEstablishDirectChannel:[TiUtils boolValue:shouldEstablishDirectChannel]];
73-
}
74-
75-
- (NSNumber *)shouldEstablishDirectChannel
76-
{
77-
DEPRECATED_REMOVED(@"Firebase.CloudMessaging.shouldEstablishDirectChannel (use APNs channel for downstream messaging)", @"3.0.0", @"4.0.0");
78-
79-
return @([[FIRMessaging messaging] shouldEstablishDirectChannel]);
80-
}
81-
82-
- (void)appDidReceiveMessage:(id)arguments
83-
{
84-
ENSURE_SINGLE_ARG(arguments, NSDictionary);
85-
[[FIRMessaging messaging] appDidReceiveMessage:arguments];
86-
}
87-
88-
- (void)sendMessage:(id)arguments
89-
{
90-
DEPRECATED_REMOVED(@"Firebase.CloudMessaging.sendMessage", @"3.0.0", @"4.0.0");
91-
ENSURE_SINGLE_ARG(arguments, NSDictionary);
92-
93-
NSDictionary *message = [arguments objectForKey:@"message"];
94-
NSString *messageID = [arguments objectForKey:@"messageID"];
95-
NSString *to = [arguments objectForKey:@"to"];
96-
int64_t timeToLive = [(NSNumber *)[arguments objectForKey:@"timeToLive"] unsignedLongLongValue];
97-
98-
[[FIRMessaging messaging] sendMessage:message
99-
to:to
100-
withMessageID:messageID
101-
timeToLive:timeToLive];
102-
}
103-
10463
- (void)subscribeToTopic:(id)topic
10564
{
10665
ENSURE_SINGLE_ARG(topic, NSString);
@@ -115,13 +74,6 @@ - (void)unsubscribeFromTopic:(id)topic
11574

11675
#pragma mark FIRMessaging Delegates
11776

118-
- (void)messaging:(FIRMessaging *)messaging didReceiveMessage:(FIRMessagingRemoteMessage *)remoteMessage
119-
{
120-
if ([self _hasListeners:@"didReceiveMessage"]) {
121-
[self fireEvent:@"didReceiveMessage" withObject:@{ @"message": remoteMessage.appData }];
122-
}
123-
}
124-
12577
- (void)messaging:(FIRMessaging *)messaging didReceiveRegistrationToken:(NSString *)fcmToken
12678
{
12779
if ([self _hasListeners:@"didRefreshRegistrationToken"]) {
@@ -134,4 +86,29 @@ - (void)application:(UIApplication *)application didRegisterForRemoteNotificatio
13486
[[FIRMessaging messaging] setAPNSToken:deviceToken];
13587
}
13688

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+
103+
- (void)appDidReceiveMessage:(id)arguments
104+
{
105+
ENSURE_SINGLE_ARG(arguments, NSDictionary);
106+
[[FIRMessaging messaging] appDidReceiveMessage:arguments];
107+
}
108+
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+
137114
@end

ios/manifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ name: titanium-firebase-cloud-messaging
1515
moduleid: firebase.cloudmessaging
1616
guid: 36052f2b-8ddc-4177-b5a1-82c6b948f83d
1717
platform: iphone
18-
minsdk: 8.0.0
18+
minsdk: 8.3.1.GA
Binary file not shown.

ios/platform/FirebaseMessaging.framework/Headers/FirebaseMessaging-umbrella.h

Lines changed: 0 additions & 19 deletions
This file was deleted.

ios/platform/FirebaseMessaging.framework/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<key>CFBundleExecutable</key>
66
<string>FirebaseMessaging</string>
77
<key>CFBundleIdentifier</key>
8-
<string>com.firebase.Firebase</string>
8+
<string>com.firebase.Firebase-FirebaseMessaging</string>
99
<key>CFBundleInfoDictionaryVersion</key>
1010
<string>6.0</string>
1111
<key>CFBundleName</key>

ios/titanium-firebase-cloud-messaging.xcodeproj/project.pbxproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
24DD6CFA1134B3F500162E58 /* FirebaseCloudmessagingModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 24DD6CF81134B3F500162E58 /* FirebaseCloudmessagingModule.m */; };
2727
24DE9E1111C5FE74003F90F6 /* FirebaseCloudmessagingModuleAssets.h in Headers */ = {isa = PBXBuildFile; fileRef = 24DE9E0F11C5FE74003F90F6 /* FirebaseCloudmessagingModuleAssets.h */; };
2828
24DE9E1211C5FE74003F90F6 /* FirebaseCloudmessagingModuleAssets.m in Sources */ = {isa = PBXBuildFile; fileRef = 24DE9E1011C5FE74003F90F6 /* FirebaseCloudmessagingModuleAssets.m */; };
29+
3A0DE22F24D6039B0036AA1A /* FirebaseInstanceID.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A0DE22D24D6039B0036AA1A /* FirebaseInstanceID.framework */; };
30+
3A0DE23024D6039B0036AA1A /* FirebaseMessaging.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A0DE22E24D6039B0036AA1A /* FirebaseMessaging.framework */; };
2931
AA747D9F0F9514B9006C5449 /* FirebaseCloudmessaging_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = AA747D9E0F9514B9006C5449 /* FirebaseCloudmessaging_Prefix.pch */; };
30-
AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AACBBE490F95108600F1A2B1 /* Foundation.framework */; };
31-
DB4B81F71F94B3530034B0F6 /* FirebaseMessaging.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB4B81F61F94B34C0034B0F6 /* FirebaseMessaging.framework */; };
3232
/* End PBXBuildFile section */
3333

3434
/* Begin PBXContainerItemProxy section */
@@ -47,19 +47,19 @@
4747
24DD6D1B1134B66800162E58 /* titanium.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = titanium.xcconfig; sourceTree = "<group>"; };
4848
24DE9E0F11C5FE74003F90F6 /* FirebaseCloudmessagingModuleAssets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FirebaseCloudmessagingModuleAssets.h; path = Classes/FirebaseCloudmessagingModuleAssets.h; sourceTree = "<group>"; };
4949
24DE9E1011C5FE74003F90F6 /* FirebaseCloudmessagingModuleAssets.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FirebaseCloudmessagingModuleAssets.m; path = Classes/FirebaseCloudmessagingModuleAssets.m; sourceTree = "<group>"; };
50+
3A0DE22D24D6039B0036AA1A /* FirebaseInstanceID.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FirebaseInstanceID.framework; path = platform/FirebaseInstanceID.framework; sourceTree = "<group>"; };
51+
3A0DE22E24D6039B0036AA1A /* FirebaseMessaging.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FirebaseMessaging.framework; path = platform/FirebaseMessaging.framework; sourceTree = "<group>"; };
5052
AA747D9E0F9514B9006C5449 /* FirebaseCloudmessaging_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FirebaseCloudmessaging_Prefix.pch; sourceTree = SOURCE_ROOT; };
51-
AACBBE490F95108600F1A2B1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
5253
D2AAC07E0554694100DB518D /* libfirebase.cloudmessaging.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libfirebase.cloudmessaging.a; sourceTree = BUILT_PRODUCTS_DIR; };
53-
DB4B81F61F94B34C0034B0F6 /* FirebaseMessaging.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FirebaseMessaging.framework; path = platform/FirebaseMessaging.framework; sourceTree = "<group>"; };
5454
/* End PBXFileReference section */
5555

5656
/* Begin PBXFrameworksBuildPhase section */
5757
D2AAC07C0554694100DB518D /* Frameworks */ = {
5858
isa = PBXFrameworksBuildPhase;
5959
buildActionMask = 2147483647;
6060
files = (
61-
DB4B81F71F94B3530034B0F6 /* FirebaseMessaging.framework in Frameworks */,
62-
AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */,
61+
3A0DE23024D6039B0036AA1A /* FirebaseMessaging.framework in Frameworks */,
62+
3A0DE22F24D6039B0036AA1A /* FirebaseInstanceID.framework in Frameworks */,
6363
);
6464
runOnlyForDeploymentPostprocessing = 0;
6565
};
@@ -88,8 +88,8 @@
8888
0867D69AFE84028FC02AAC07 /* Frameworks */ = {
8989
isa = PBXGroup;
9090
children = (
91-
DB4B81F61F94B34C0034B0F6 /* FirebaseMessaging.framework */,
92-
AACBBE490F95108600F1A2B1 /* Foundation.framework */,
91+
3A0DE22D24D6039B0036AA1A /* FirebaseInstanceID.framework */,
92+
3A0DE22E24D6039B0036AA1A /* FirebaseMessaging.framework */,
9393
);
9494
name = Frameworks;
9595
sourceTree = "<group>";

ios/titanium.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// OF YOUR TITANIUM SDK YOU'RE BUILDING FOR
55
//
66
//
7-
TITANIUM_SDK_VERSION = 8.3.1.GA
7+
TITANIUM_SDK_VERSION = 9.0.3.GA
88

99
//
1010
// THESE SHOULD BE OK GENERALLY AS-IS

0 commit comments

Comments
 (0)