Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit 1eebeea

Browse files
author
SotoiGhost
committed
[Firebase][CloudMessaging] Updated to version 4.1.1 (Firebase v6.5.0)
* Fixed dependencies of it
1 parent 616fd1f commit 1eebeea

File tree

6 files changed

+35
-29
lines changed

6 files changed

+35
-29
lines changed

Diff for: Readme.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Xamarin creates and maintains Xamarin.iOS bindings for the Google APIs for iOS L
1111
| [Xamarin.Firebase.iOS.Analytics][F.Analytics.Name] | [6.0.4.0][F.Analytics.Package] |
1212
| [Xamarin.Firebase.iOS.Auth][F.Auth.Name] | [5.0.4.1][F.Auth.Package] |
1313
| [Xamarin.Firebase.iOS.CloudFirestore][F.CloudFirestore.Name] | [0.13.3.0][F.CloudFirestore.Package] |
14-
| [Xamarin.Firebase.iOS.CloudMessaging][F.CloudMessaging.Name] | [3.1.2.0][F.CloudMessaging.Package] |
14+
| [Xamarin.Firebase.iOS.CloudMessaging][F.CloudMessaging.Name] | [4.1.1.0][F.CloudMessaging.Package] |
1515
| [Xamarin.Firebase.iOS.Core][F.Core.Name] | [6.1.0.0][F.Core.Package] |
1616
| [Xamarin.Firebase.iOS.Crashlytics][F.Crashlytics.Name] | [3.10.3.1][F.Crashlytics.Package] |
1717
| [Xamarin.Firebase.iOS.Database][F.Database.Name] | [5.0.3.0][F.Database.Package] |
@@ -55,7 +55,7 @@ Here's a table that shows in which global version is located each component of F
5555
| Firebase Analytics | **6.0.4.0** | **6.5.0** |
5656
| Firebase Auth | **5.0.4.1** | **5.8.1** |
5757
| Firebase Cloud Firestore | **0.13.3.0** | **5.8.1** |
58-
| Firebase Cloud Messaging | **3.1.2.0** | **5.8.1** |
58+
| Firebase Cloud Messaging | **4.1.1.0** | **6.5.0** |
5959
| Firebase Core | **6.1.0.0** | **6.5.0** |
6060
| Firebase Database | **5.0.3.0** | **5.8.1** |
6161
| Firebase Dynamic Links | **4.0.1.0** | **6.5.0** |

Diff for: cgmanifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"git": {
4747
"name": "FirebaseMessaging",
4848
"repositoryUrl": "https://github.com/firebase/firebase-ios-sdk.git",
49-
"commitHash": "1e8fc1ac130eef9d8ee351637436ac6d65129b96"
49+
"commitHash": "bac26882e0f36f87fbe651b38333289de8842e69"
5050
}
5151
}
5252
},

Diff for: components.cake

+6-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Artifact FIREBASE_AD_MOB_ARTIFACT = new Artifact ("Firebase.AdM
44
Artifact FIREBASE_ANALYTICS_ARTIFACT = new Artifact ("Firebase.Analytics", "6.0.4", "8.0", ComponentGroup.Firebase, csprojName: "Analytics");
55
Artifact FIREBASE_AUTH_ARTIFACT = new Artifact ("Firebase.Auth", "5.0.4.1", "8.0", ComponentGroup.Firebase, csprojName: "Auth");
66
Artifact FIREBASE_CLOUD_FIRESTORE_ARTIFACT = new Artifact ("Firebase.CloudFirestore", "0.13.3", "8.0", ComponentGroup.Firebase, csprojName: "CloudFirestore");
7-
Artifact FIREBASE_CLOUD_MESSAGING_ARTIFACT = new Artifact ("Firebase.CloudMessaging", "3.1.2", "8.0", ComponentGroup.Firebase, csprojName: "CloudMessaging");
7+
Artifact FIREBASE_CLOUD_MESSAGING_ARTIFACT = new Artifact ("Firebase.CloudMessaging", "4.1.1", "8.0", ComponentGroup.Firebase, csprojName: "CloudMessaging");
88
Artifact FIREBASE_CORE_ARTIFACT = new Artifact ("Firebase.Core", "6.1.0", "8.0", ComponentGroup.Firebase, csprojName: "Core");
99
Artifact FIREBASE_CRASHLYTICS_ARTIFACT = new Artifact ("Firebase.Crashlytics", "3.10.9", "8.0", ComponentGroup.Firebase, csprojName: "Crashlytics");
1010
Artifact FIREBASE_DATABASE_ARTIFACT = new Artifact ("Firebase.Database", "5.0.3", "8.0", ComponentGroup.Firebase, csprojName: "Database");
@@ -69,7 +69,7 @@ void SetArtifactsDependencies ()
6969
FIREBASE_ANALYTICS_ARTIFACT.Dependencies = new [] { FIREBASE_CORE_ARTIFACT, FIREBASE_INSTANCE_ID_ARTIFACT };
7070
FIREBASE_AUTH_ARTIFACT.Dependencies = new [] { FIREBASE_CORE_ARTIFACT };
7171
FIREBASE_CLOUD_FIRESTORE_ARTIFACT.Dependencies = new [] { FIREBASE_CORE_ARTIFACT, FIREBASE_INSTANCE_ID_ARTIFACT };
72-
FIREBASE_CLOUD_MESSAGING_ARTIFACT.Dependencies = new [] { FIREBASE_CORE_ARTIFACT };
72+
FIREBASE_CLOUD_MESSAGING_ARTIFACT.Dependencies = new [] { FIREBASE_CORE_ARTIFACT, FIREBASE_INSTANCE_ID_ARTIFACT };
7373
FIREBASE_CORE_ARTIFACT.Dependencies = null;
7474
FIREBASE_CRASHLYTICS_ARTIFACT.Dependencies = null;
7575
FIREBASE_DATABASE_ARTIFACT.Dependencies = new [] { FIREBASE_CORE_ARTIFACT };
@@ -105,7 +105,7 @@ void SetArtifactsPodSpecs ()
105105
new PodSpec ("Firebase", "6.5.0", subSpecs: new [] { "AdMob" })
106106
};
107107
FIREBASE_ANALYTICS_ARTIFACT.PodSpecs = new [] {
108-
new PodSpec ("Firebase", "6.5.0", subSpecs: new [] { "Analytics" })
108+
new PodSpec ("Firebase", "6.5.0", subSpecs: new [] { "Analytics" })
109109
};
110110
FIREBASE_AUTH_ARTIFACT.PodSpecs = new [] {
111111
new PodSpec ("Firebase", "5.8.1", frameworkSource: FrameworkSource.Pods, frameworkName: "FirebaseAuth", targetName: "FirebaseAuth", subSpecs: new [] { "Auth" })
@@ -120,7 +120,7 @@ void SetArtifactsPodSpecs ()
120120
new PodSpec ("gRPC-C++", "0.0.3", frameworkSource: FrameworkSource.Pods, frameworkName: "grpcpp"),
121121
};
122122
FIREBASE_CLOUD_MESSAGING_ARTIFACT.PodSpecs = new [] {
123-
new PodSpec ("Firebase", "5.8.1", frameworkSource: FrameworkSource.Pods, frameworkName: "FirebaseMessaging", targetName: "FirebaseMessaging", subSpecs: new [] { "Messaging" })
123+
new PodSpec ("Firebase", "6.5.0", frameworkSource: FrameworkSource.Pods, frameworkName: "FirebaseMessaging", targetName: "FirebaseMessaging", subSpecs: new [] { "Messaging" })
124124
};
125125
FIREBASE_CORE_ARTIFACT.PodSpecs = new [] {
126126
new PodSpec ("Firebase", "6.5.0", frameworkSource: FrameworkSource.Pods, frameworkName: "FirebaseCore", targetName: "FirebaseCore", subSpecs: new [] { "CoreOnly" }),
@@ -132,7 +132,7 @@ void SetArtifactsPodSpecs ()
132132
new PodSpec ("GTMSessionFetcher", "1.2.1", frameworkSource: FrameworkSource.Pods, subSpecs: new [] { "Full" }),
133133
new PodSpec ("leveldb-library", "1.20.0", frameworkSource: FrameworkSource.Pods, frameworkName: "leveldb"),
134134
new PodSpec ("nanopb", "0.3.901", frameworkSource: FrameworkSource.Pods),
135-
new PodSpec ("Protobuf", "3.6.1", frameworkSource: FrameworkSource.Pods),
135+
new PodSpec ("Protobuf", "3.8.0", frameworkSource: FrameworkSource.Pods),
136136
new PodSpec ("GoogleAppMeasurement", "6.0.4")
137137
};
138138
FIREBASE_CRASHLYTICS_ARTIFACT.PodSpecs = new [] {
@@ -223,6 +223,7 @@ void SetArtifactsExtraPodfileLines ()
223223
"end",
224224
};
225225

226+
FIREBASE_CLOUD_MESSAGING_ARTIFACT.ExtraPodfileLines = staticFrameworkLines;
226227
FIREBASE_CORE_ARTIFACT.ExtraPodfileLines = staticFrameworkLines;
227228
FIREBASE_DYNAMIC_LINKS_ARTIFACT.ExtraPodfileLines = staticFrameworkLines;
228229
FIREBASE_INSTANCE_ID_ARTIFACT.ExtraPodfileLines = staticFrameworkLines;

Diff for: source/Firebase/CloudMessaging/ApiDefinition.cs

+21-18
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
using System;
22
using System.Collections.Generic;
33

4-
using UIKit;
54
using Foundation;
65
using ObjCRuntime;
6+
using UserNotifications;
77

88
namespace Firebase.CloudMessaging
99
{
@@ -16,10 +16,6 @@ namespace Firebase.CloudMessaging
1616
// typedef void (^FIRMessagingTopicOperationCompletion)(NSError *_Nullable error);
1717
delegate void MessagingTopicOperationCompletionHandler ([NullAllowed] NSError error);
1818

19-
[Obsolete ("Please listen for the Messaging.ConnectionStateChangedNotification NSNotification instead.")]
20-
// typedef void(^FIRMessagingConnectCompletion)(NSError* __nullable error);
21-
delegate void ConnectCompletionHandler ([NullAllowed] NSError error);
22-
2319
// @interface FIRMessagingMessageInfo : NSObject
2420
[BaseType (typeof (NSObject), Name = "FIRMessagingMessageInfo")]
2521
interface MessageInfo
@@ -34,6 +30,10 @@ interface MessageInfo
3430
[BaseType (typeof (NSObject), Name = "FIRMessagingRemoteMessage")]
3531
interface RemoteMessage
3632
{
33+
// @property (readonly, copy, nonatomic) NSString * _Nonnull messageID;
34+
[Export ("messageID")]
35+
string MessageId { get; }
36+
3737
// @property(nonatomic, readonly, strong, nonnull) NSDictionary *appData;
3838
[Export ("appData", ArgumentSemantic.Strong)]
3939
NSDictionary AppData { get; }
@@ -53,8 +53,7 @@ interface MessagingDelegate
5353
[Export ("messaging:didReceiveRegistrationToken:")]
5454
void DidReceiveRegistrationToken (Messaging messaging, string fcmToken);
5555

56-
// - (void)messaging:(nonnull FIRMessaging *)messaging didReceiveMessage:(nonnull FIRMessagingRemoteMessage *)remoteMessage FIR_SWIFT_NAME(messaging(_:didReceive:) __IOS_AVAILABLE(10.0);
57-
[Introduced (PlatformName.iOS, 10, 0, 0)]
56+
// - (void)messaging:(nonnull FIRMessaging *)messaging didReceiveMessage:(nonnull FIRMessagingRemoteMessage *)remoteMessage FIR_SWIFT_NAME(messaging(_:didReceive:)
5857
[Export("messaging:didReceiveMessage:")]
5958
void DidReceiveMessage (Messaging messaging, RemoteMessage remoteMessage);
6059
}
@@ -107,6 +106,12 @@ interface Messaging
107106
[Export ("messaging")]
108107
Messaging SharedInstance { get; }
109108

109+
// +(FIRMessagingExtensionHelper * _Nonnull)extensionHelper __attribute__((swift_name("serviceExtension()"))) __attribute__((availability(ios, introduced=10.0)));
110+
[Introduced (PlatformName.iOS, 10, 0, 0)]
111+
[Static]
112+
[Export ("extensionHelper")]
113+
MessagingExtensionHelper ExtensionHelper { get; }
114+
110115
// @property(nonatomic, copy, nullable) NSData *APNSToken FIR_SWIFT_NAME(apnsToken);
111116
[NullAllowed]
112117
[Export("APNSToken", ArgumentSemantic.Copy)]
@@ -135,16 +140,6 @@ interface Messaging
135140
[Export("deleteFCMTokenForSenderID:completion:")]
136141
void DeleteFcmToken(string senderId, MessagingDeleteFcmTokenCompletionHandler completion);
137142

138-
// -(void)connectWithCompletion:(FIRMessagingConnectCompletion _Nonnull)handler;
139-
[Obsolete ("Use the ShouldEstablishDirectChannel property instead.")]
140-
[Export ("connectWithCompletion:")]
141-
void Connect (ConnectCompletionHandler handler);
142-
143-
// -(void)disconnect;
144-
[Obsolete("Use the ShouldEstablishDirectChannel property instead.")]
145-
[Export ("disconnect")]
146-
void Disconnect ();
147-
148143
// -(void)subscribeToTopic:(NSString * _Nonnull)topic;
149144
[Export ("subscribeToTopic:")]
150145
void Subscribe (string topic);
@@ -174,5 +169,13 @@ interface Messaging
174169
[Export ("appDidReceiveMessage:")]
175170
MessageInfo AppDidReceiveMessage (NSDictionary message);
176171
}
177-
}
178172

173+
// @interface FIRMessagingExtensionHelper : NSObject
174+
[Introduced (PlatformName.iOS, 10, 0, 0)]
175+
[BaseType (typeof (NSObject), Name = "FIRMessagingExtensionHelper")]
176+
interface MessagingExtensionHelper {
177+
// -(void)populateNotificationContent:(UNMutableNotificationContent * _Nonnull)content withContentHandler:(void (^ _Nonnull)(UNNotificationContent * _Nonnull))contentHandler;
178+
[Export ("populateNotificationContent:withContentHandler:")]
179+
void PopulateNotificationContent (UNMutableNotificationContent content, Action<UNNotificationContent> contentHandler);
180+
}
181+
}

Diff for: source/Firebase/CloudMessaging/CloudMessaging.csproj

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<RootNamespace>Firebase.CloudMessaging</RootNamespace>
77
<AssemblyName>Firebase.CloudMessaging</AssemblyName>
88
<AssemblyVersion>1.0.0.0</AssemblyVersion>
9-
<FileVersion>3.1.2</FileVersion>
9+
<FileVersion>4.1.1</FileVersion>
1010
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
1111
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
1212
</PropertyGroup>
@@ -23,7 +23,7 @@
2323
<PackageProjectUrl>https://go.microsoft.com/fwlink/?linkid=865576</PackageProjectUrl>
2424
<PackageLicenseUrl>https://go.microsoft.com/fwlink/?linkid=865577</PackageLicenseUrl>
2525
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
26-
<PackageVersion>3.1.2</PackageVersion>
26+
<PackageVersion>4.1.1</PackageVersion>
2727
</PropertyGroup>
2828

2929
<ItemGroup>
@@ -45,6 +45,7 @@
4545
<NativeReference Include="..\..\..\externals\FirebaseMessaging.framework">
4646
<Kind>Framework</Kind>
4747
<Frameworks>SystemConfiguration</Frameworks>
48+
<WeakFrameworks>UserNotifications</WeakFrameworks>
4849
<ForceLoad>True</ForceLoad>
4950
<LinkerFlags>-lsqlite3</LinkerFlags>
5051
</NativeReference>

Diff for: source/Firebase/CloudMessaging/Enums.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ public enum ErrorCode : ulong
1212
Timeout = 3,
1313
Network = 4,
1414
OperationInProgress = 5,
15-
InvalidRequest = 7
15+
InvalidRequest = 7,
16+
InvalidTopicName = 8
1617
}
1718

1819
[Native]

0 commit comments

Comments
 (0)