Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit ed4bd62

Browse files
Bump Firebase iOS SDK to 5.20.1 #1212
1 parent 5f268a0 commit ed4bd62

12 files changed

+204
-86
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
- [Firebase iOS SDK Changelog](https://firebase.google.com/support/release-notes/ios)
44
- [Firebase Android SDK Changelog](https://firebase.google.com/support/release-notes/android)
55

6+
## 8.2.0 (2019, April ?)
7+
[Fixes & Enhancements](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/milestone/98?closed=1)
8+
9+
> Note: The Firebase iOS SDK now requires Xcode 10.1 or later.
10+
611
## 8.1.1 (2019, March 24)
712
[Fixes & Enhancements](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/milestone/97?closed=1)
813

src/analytics/analytics.ios.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,10 @@ export function setScreenName(options: SetScreenNameOptions): Promise<void> {
213213
});
214214
}
215215

216-
// TODO see https://github.com/firebase/firebase-ios-sdk/pull/2516 (iOS SDK 5.19.0)
217216
export function setAnalyticsCollectionEnabled(enabled: boolean): void {
218-
FIRAnalyticsConfiguration.sharedInstance().setAnalyticsCollectionEnabled(enabled);
217+
FIRAnalytics.setAnalyticsCollectionEnabled(enabled);
219218
}
220219

221-
// TODO see https://github.com/firebase/firebase-ios-sdk/pull/2516 (iOS SDK 5.19.0)
222220
export function setSessionTimeoutDuration(seconds: number): void {
223-
FIRAnalyticsConfiguration.sharedInstance().setSessionTimeoutInterval(seconds);
221+
FIRAnalytics.setSessionTimeoutInterval(seconds);
224222
}

src/mlkit/custommodel/index.ios.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ function getInterpreter(localModelFile: string): FIRModelInterpreter {
109109
localModelName = localModelFile.lastIndexOf("/") === -1 ? localModelFile : localModelFile.substring(localModelFile.lastIndexOf("/") + 1);
110110

111111
// make sure we load the model (with the same name) only once
112-
if (FIRModelManager.modelManager().localModelSourceForModelName(localModelName)) {
112+
if (FIRModelManager.modelManager().localModelWithName(localModelName)) {
113113
localModelRegistrationSuccess = true;
114114
} else {
115115
let localModelFilePath: string;
@@ -120,22 +120,22 @@ function getInterpreter(localModelFile: string): FIRModelInterpreter {
120120
localModelFile.substring(0, localModelFile.lastIndexOf(".")),
121121
localModelFile.substring(localModelFile.lastIndexOf(".") + 1));
122122
}
123-
const localModelSource = FIRLocalModelSource.alloc().initWithNamePath(localModelName, localModelFilePath);
124-
localModelRegistrationSuccess = FIRModelManager.modelManager().registerLocalModelSource(localModelSource);
123+
const localModelSource = FIRLocalModel.alloc().initWithNamePath(localModelName, localModelFilePath);
124+
localModelRegistrationSuccess = FIRModelManager.modelManager().registerLocalModel(localModelSource);
125125
}
126126
}
127127

128128
/*
129129
if (options.cloudModelName) {
130-
const fIRModelDownloadConditions = FIRModelDownloadConditions.alloc().initWithIsWiFiRequiredCanDownloadInBackground(options.requireWifiForCloudModelDownload, true);
130+
const fIRModelDownloadConditions = FIRModelDownloadConditions.alloc().initWithAllowsCellularAccessAllowsBackgroundDownloading(options.requireWifiForCloudModelDownload, true);
131131
132-
const fIRCloudModelSource = FIRCloudModelSource.alloc().initWithModelNameEnableModelUpdatesInitialConditionsUpdateConditions(
132+
const fIRCloudModelSource = FIRRemoteModel.alloc().initWithNameAllowsModelUpdatesInitialConditionsUpdateConditions(
133133
options.cloudModelName,
134134
true,
135135
fIRModelDownloadConditions,
136136
fIRModelDownloadConditions);
137137
138-
cloudModelRegistrationSuccess = FIRModelManager.modelManager().registerCloudModelSource(fIRCloudModelSource);
138+
cloudModelRegistrationSuccess = FIRModelManager.modelManager().registerRemoteModel(fIRCloudModelSource);
139139
console.log("cloudModelRegistrationSuccess: " + cloudModelRegistrationSuccess);
140140
}
141141
*/
@@ -146,7 +146,7 @@ function getInterpreter(localModelFile: string): FIRModelInterpreter {
146146
return null;
147147
}
148148

149-
const fIRModelOptions = FIRModelOptions.alloc().initWithCloudModelNameLocalModelName(
149+
const fIRModelOptions = FIRModelOptions.alloc().initWithRemoteModelNameLocalModelName(
150150
null, // cloudModelRegistrationSuccess ? cloudModelName : null,
151151
localModelRegistrationSuccess ? localModelName : null);
152152

src/platforms/ios/typings/objc!FirebaseAnalytics.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@ declare class FIRAnalytics extends NSObject {
1717

1818
static resetAnalyticsData(): void;
1919

20+
static setAnalyticsCollectionEnabled(analyticsCollectionEnabled: boolean): void;
21+
2022
static setScreenNameScreenClass(screenName: string, screenClassOverride: string): void;
2123

24+
static setSessionTimeoutInterval(sessionTimeoutInterval: number): void;
25+
2226
static setUserID(userID: string): void;
2327

2428
static setUserPropertyStringForName(value: string, name: string): void;

src/platforms/ios/typings/objc!FirebaseAuth.d.ts

Lines changed: 106 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ declare class FIRAuth extends NSObject {
144144

145145
signInWithEmailPasswordCompletion(email: string, password: string, completion: (p1: FIRAuthDataResult, p2: NSError) => void): void;
146146

147+
signInWithProviderUIDelegateCompletion(provider: FIRFederatedAuthProvider, UIDelegate: FIRAuthUIDelegate, completion: (p1: FIRAuthDataResult, p2: NSError) => void): void;
148+
147149
signOut(): boolean;
148150

149151
updateCurrentUserCompletion(user: FIRUser, completion: (p1: NSError) => void): void;
@@ -290,12 +292,18 @@ declare const enum FIRAuthErrorCode {
290292

291293
WebInternalError = 17062,
292294

295+
WebSignInUserInteractionFailure = 17063,
296+
293297
LocalPlayerNotAuthenticated = 17066,
294298

295299
NullUser = 17067,
296300

301+
InvalidProviderID = 17071,
302+
297303
InvalidDynamicLinkDomain = 17074,
298304

305+
GameKitNotLinked = 17076,
306+
299307
KeychainError = 17995,
300308

301309
InternalError = 17999,
@@ -309,6 +317,10 @@ declare var FIRAuthErrorNameKey: string;
309317

310318
declare var FIRAuthErrorUserInfoEmailKey: string;
311319

320+
declare var FIRAuthErrorUserInfoNameKey: string;
321+
322+
declare var FIRAuthErrorUserInfoUpdatedCredentialKey: string;
323+
312324
declare class FIRAuthErrors {
313325
}
314326

@@ -387,6 +399,15 @@ declare var FIRFacebookAuthProviderID: string;
387399

388400
declare var FIRFacebookAuthSignInMethod: string;
389401

402+
interface FIRFederatedAuthProvider extends NSObjectProtocol {
403+
404+
getCredentialWithUIDelegateCompletion(UIDelegate: FIRAuthUIDelegate, completion: (p1: FIRAuthCredential, p2: NSError) => void): void;
405+
}
406+
declare var FIRFederatedAuthProvider: {
407+
408+
prototype: FIRFederatedAuthProvider;
409+
};
410+
390411
declare class FIRGameCenterAuthProvider extends NSObject {
391412

392413
static alloc(): FIRGameCenterAuthProvider; // inherited from NSObject
@@ -426,22 +447,101 @@ declare var FIRGoogleAuthProviderID: string;
426447

427448
declare var FIRGoogleAuthSignInMethod: string;
428449

429-
declare class FIROAuthProvider extends NSObject {
450+
declare var FIRMicrosoftAuthProviderID: string;
451+
452+
declare class FIROAuthCredential extends FIRAuthCredential implements NSSecureCoding {
453+
454+
static alloc(): FIROAuthCredential; // inherited from NSObject
455+
456+
static new(): FIROAuthCredential; // inherited from NSObject
457+
458+
readonly IDToken: string;
459+
460+
readonly accessToken: string;
461+
462+
readonly pendingToken: string;
463+
464+
static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding
465+
466+
constructor(o: { coder: NSCoder; }); // inherited from NSCoding
467+
468+
encodeWithCoder(aCoder: NSCoder): void;
469+
470+
initWithCoder(aDecoder: NSCoder): this;
471+
}
472+
473+
declare class FIROAuthProvider extends NSObject implements FIRFederatedAuthProvider {
430474

431475
static alloc(): FIROAuthProvider; // inherited from NSObject
432476

433-
static credentialWithProviderIDAccessToken(providerID: string, accessToken: string): FIRAuthCredential;
477+
static credentialWithProviderIDAccessToken(providerID: string, accessToken: string): FIROAuthCredential;
434478

435-
static credentialWithProviderIDIDTokenAccessToken(providerID: string, IDToken: string, accessToken: string): FIRAuthCredential;
479+
static credentialWithProviderIDIDTokenAccessToken(providerID: string, IDToken: string, accessToken: string): FIROAuthCredential;
480+
481+
static credentialWithProviderIDIDTokenAccessTokenPendingToken(providerID: string, IDToken: string, accessToken: string, pendingToken: string): FIROAuthCredential;
436482

437483
static new(): FIROAuthProvider; // inherited from NSObject
484+
485+
static providerWithProviderID(providerID: string): FIROAuthProvider;
486+
487+
static providerWithProviderIDAuth(providerID: string, auth: FIRAuth): FIROAuthProvider;
488+
489+
customParameters: NSDictionary<string, string>;
490+
491+
readonly providerID: string;
492+
493+
scopes: NSArray<string>;
494+
495+
readonly debugDescription: string; // inherited from NSObjectProtocol
496+
497+
readonly description: string; // inherited from NSObjectProtocol
498+
499+
readonly hash: number; // inherited from NSObjectProtocol
500+
501+
readonly isProxy: boolean; // inherited from NSObjectProtocol
502+
503+
readonly superclass: typeof NSObject; // inherited from NSObjectProtocol
504+
505+
readonly // inherited from NSObjectProtocol
506+
507+
class(): typeof NSObject;
508+
509+
conformsToProtocol(aProtocol: any /* Protocol */): boolean;
510+
511+
getCredentialWithUIDelegateCompletion(UIDelegate: FIRAuthUIDelegate, completion: (p1: FIRAuthCredential, p2: NSError) => void): void;
512+
513+
isEqual(object: any): boolean;
514+
515+
isKindOfClass(aClass: typeof NSObject): boolean;
516+
517+
isMemberOfClass(aClass: typeof NSObject): boolean;
518+
519+
performSelector(aSelector: string): any;
520+
521+
performSelectorWithObject(aSelector: string, object: any): any;
522+
523+
performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any;
524+
525+
respondsToSelector(aSelector: string): boolean;
526+
527+
retainCount(): number;
528+
529+
self(): this;
438530
}
439531

440-
declare class FIRPhoneAuthCredential extends FIRAuthCredential {
532+
declare class FIRPhoneAuthCredential extends FIRAuthCredential implements NSSecureCoding {
441533

442534
static alloc(): FIRPhoneAuthCredential; // inherited from NSObject
443535

444536
static new(): FIRPhoneAuthCredential; // inherited from NSObject
537+
538+
static readonly supportsSecureCoding: boolean; // inherited from NSSecureCoding
539+
540+
constructor(o: { coder: NSCoder; }); // inherited from NSCoding
541+
542+
encodeWithCoder(aCoder: NSCoder): void;
543+
544+
initWithCoder(aDecoder: NSCoder): this;
445545
}
446546

447547
declare class FIRPhoneAuthProvider extends NSObject {
@@ -616,6 +716,8 @@ declare class FIRUserProfileChangeRequest extends NSObject {
616716
commitChangesWithCompletion(completion: (p1: NSError) => void): void;
617717
}
618718

719+
declare var FIRYahooAuthProviderID: string;
720+
619721
declare var FirebaseAuthVersionNum: number;
620722

621723
declare var FirebaseAuthVersionNumber: number;

src/platforms/ios/typings/objc!FirebaseFirestore.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ declare class FIRFieldValue extends NSObject {
139139

140140
static fieldValueForDelete(): FIRFieldValue;
141141

142+
static fieldValueForDoubleIncrement(d: number): FIRFieldValue;
143+
144+
static fieldValueForIntegerIncrement(l: number): FIRFieldValue;
145+
142146
static fieldValueForServerTimestamp(): FIRFieldValue;
143147

144148
static new(): FIRFieldValue; // inherited from NSObject

src/platforms/ios/typings/objc!FirebaseInstanceID.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ declare class FIRInstanceIDResult extends NSObject implements NSCopying {
5050
copyWithZone(zone: interop.Pointer | interop.Reference<any>): any;
5151
}
5252

53+
declare var FirebaseInstanceIDVersionNumber: number;
54+
55+
declare var FirebaseInstanceIDVersionString: interop.Reference<number>;
56+
5357
declare var kFIRInstanceIDScopeFirebaseMessaging: string;
5458

5559
declare var kFIRInstanceIDTokenRefreshNotification: string;
Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,9 @@
11

2-
declare class FIRCloudModelSource extends NSObject {
2+
declare class FIRLocalModel extends NSObject {
33

4-
static alloc(): FIRCloudModelSource; // inherited from NSObject
4+
static alloc(): FIRLocalModel; // inherited from NSObject
55

6-
static new(): FIRCloudModelSource; // inherited from NSObject
7-
8-
readonly enableModelUpdates: boolean;
9-
10-
readonly initialConditions: FIRModelDownloadConditions;
11-
12-
readonly name: string;
13-
14-
readonly updateConditions: FIRModelDownloadConditions;
15-
16-
constructor(o: { name: string; enableModelUpdates: boolean; initialConditions: FIRModelDownloadConditions; updateConditions: FIRModelDownloadConditions; });
17-
18-
initWithNameEnableModelUpdatesInitialConditionsUpdateConditions(name: string, enableModelUpdates: boolean, initialConditions: FIRModelDownloadConditions, updateConditions: FIRModelDownloadConditions): this;
19-
}
20-
21-
declare class FIRLocalModelSource extends NSObject {
22-
23-
static alloc(): FIRLocalModelSource; // inherited from NSObject
24-
25-
static new(): FIRLocalModelSource; // inherited from NSObject
6+
static new(): FIRLocalModel; // inherited from NSObject
267

278
readonly name: string;
289

@@ -39,15 +20,15 @@ declare class FIRModelDownloadConditions extends NSObject implements NSCopying {
3920

4021
static new(): FIRModelDownloadConditions; // inherited from NSObject
4122

42-
readonly canDownloadInBackground: boolean;
23+
readonly allowsBackgroundDownloading: boolean;
4324

44-
readonly isWiFiRequired: boolean;
25+
readonly allowsCellularAccess: boolean;
4526

46-
constructor(o: { isWiFiRequired: boolean; canDownloadInBackground: boolean; });
27+
constructor(o: { allowsCellularAccess: boolean; allowsBackgroundDownloading: boolean; });
4728

4829
copyWithZone(zone: interop.Pointer | interop.Reference<any>): any;
4930

50-
initWithIsWiFiRequiredCanDownloadInBackground(isWiFiRequired: boolean, canDownloadInBackground: boolean): this;
31+
initWithAllowsCellularAccessAllowsBackgroundDownloading(allowsCellularAccess: boolean, allowsBackgroundDownloading: boolean): this;
5132
}
5233

5334
declare class FIRModelManager extends NSObject {
@@ -58,11 +39,30 @@ declare class FIRModelManager extends NSObject {
5839

5940
static new(): FIRModelManager; // inherited from NSObject
6041

61-
cloudModelSourceForModelName(name: string): FIRCloudModelSource;
42+
localModelWithName(name: string): FIRLocalModel;
6243

63-
localModelSourceForModelName(name: string): FIRLocalModelSource;
44+
registerLocalModel(localModel: FIRLocalModel): boolean;
45+
46+
registerRemoteModel(remoteModel: FIRRemoteModel): boolean;
47+
48+
remoteModelWithName(name: string): FIRRemoteModel;
49+
}
50+
51+
declare class FIRRemoteModel extends NSObject {
52+
53+
static alloc(): FIRRemoteModel; // inherited from NSObject
54+
55+
static new(): FIRRemoteModel; // inherited from NSObject
56+
57+
readonly allowsModelUpdates: boolean;
58+
59+
readonly initialConditions: FIRModelDownloadConditions;
60+
61+
readonly name: string;
62+
63+
readonly updateConditions: FIRModelDownloadConditions;
6464

65-
registerCloudModelSource(cloudModelSource: FIRCloudModelSource): boolean;
65+
constructor(o: { name: string; allowsModelUpdates: boolean; initialConditions: FIRModelDownloadConditions; updateConditions: FIRModelDownloadConditions; });
6666

67-
registerLocalModelSource(localModelSource: FIRLocalModelSource): boolean;
67+
initWithNameAllowsModelUpdatesInitialConditionsUpdateConditions(name: string, allowsModelUpdates: boolean, initialConditions: FIRModelDownloadConditions, updateConditions: FIRModelDownloadConditions): this;
6868
}

src/platforms/ios/typings/objc!FirebaseMLModelInterpreter.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ declare class FIRModelOptions extends NSObject {
5555

5656
static new(): FIRModelOptions; // inherited from NSObject
5757

58-
readonly cloudModelName: string;
59-
6058
readonly localModelName: string;
6159

62-
constructor(o: { cloudModelName: string; localModelName: string; });
60+
readonly remoteModelName: string;
61+
62+
constructor(o: { remoteModelName: string; localModelName: string; });
6363

64-
initWithCloudModelNameLocalModelName(cloudModelName: string, localModelName: string): this;
64+
initWithRemoteModelNameLocalModelName(remoteModelName: string, localModelName: string): this;
6565
}
6666

6767
declare class FIRModelOutputs extends NSObject {

0 commit comments

Comments
 (0)