Skip to content

Commit 20ec9fb

Browse files
committed
feat: update library
1 parent d5b4a6f commit 20ec9fb

File tree

25 files changed

+1205
-107
lines changed

25 files changed

+1205
-107
lines changed

ios/manifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# this is your module manifest and used by Titanium
33
# during compilation, packaging, distribution, etc.
44
#
5-
version: 2.0.0
5+
version: 2.1.0
66
apiversion: 2
77
architectures: armv7 arm64 i386 x86_64
88
description: titanium-firebase-core

ios/platform/FirebaseCore.framework/FirebaseCore

100755100644
-1.2 MB
Binary file not shown.

ios/platform/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h

100755100644
File mode changed.

ios/platform/FirebaseCore.framework/Headers/FIRApp.h

100755100644
Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@
1616

1717
#import <Foundation/Foundation.h>
1818

19-
#if TARGET_OS_IOS
20-
// TODO: Remove UIKit import on next breaking change release
21-
#import <UIKit/UIKit.h>
22-
#endif
23-
2419
@class FIROptions;
2520

2621
NS_ASSUME_NONNULL_BEGIN
@@ -90,19 +85,11 @@ NS_SWIFT_NAME(FirebaseApp)
9085
*/
9186
+ (nullable FIRApp *)appNamed:(NSString *)name NS_SWIFT_NAME(app(name:));
9287

93-
#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
9488
/**
9589
* Returns the set of all extant FIRApp instances, or nil if there are no FIRApp instances. This
9690
* method is thread safe.
9791
*/
9892
@property(class, readonly, nullable) NSDictionary<NSString *, FIRApp *> *allApps;
99-
#else
100-
/**
101-
* Returns the set of all extant FIRApp instances, or nil if there are no FIRApp instances. This
102-
* method is thread safe.
103-
*/
104-
+ (nullable NSDictionary<NSString *, FIRApp *> *)allApps NS_SWIFT_NAME(allApps());
105-
#endif // defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
10693

10794
/**
10895
* Cleans up the current FIRApp, freeing associated data and returning its name to the pool for
@@ -126,6 +113,15 @@ NS_SWIFT_NAME(FirebaseApp)
126113
*/
127114
@property(nonatomic, copy, readonly) FIROptions *options;
128115

116+
/**
117+
* Gets or sets whether automatic data collection is enabled for all products. Defaults to `YES`
118+
* unless `FirebaseDataCollectionDefaultEnabled` is set to `NO` in your app's Info.plist. This value
119+
* is persisted across runs of the app so that it can be set once when users have consented to
120+
* collection.
121+
*/
122+
@property(nonatomic, readwrite, getter=isDataCollectionDefaultEnabled)
123+
BOOL dataCollectionDefaultEnabled;
124+
129125
@end
130126

131127
NS_ASSUME_NONNULL_END

ios/platform/FirebaseCore.framework/Headers/FIRConfiguration.h

100755100644
Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,6 @@
1919
#import "FIRAnalyticsConfiguration.h"
2020
#import "FIRLoggerLevel.h"
2121

22-
/**
23-
* The log levels used by FIRConfiguration.
24-
*/
25-
typedef NS_ENUM(NSInteger, FIRLogLevel) {
26-
/** Error */
27-
kFIRLogLevelError __deprecated = 0,
28-
/** Warning */
29-
kFIRLogLevelWarning __deprecated,
30-
/** Info */
31-
kFIRLogLevelInfo __deprecated,
32-
/** Debug */
33-
kFIRLogLevelDebug __deprecated,
34-
/** Assert */
35-
kFIRLogLevelAssert __deprecated,
36-
/** Max */
37-
kFIRLogLevelMax __deprecated = kFIRLogLevelAssert
38-
} DEPRECATED_MSG_ATTRIBUTE(
39-
"Use -FIRDebugEnabled and -FIRDebugDisabled or setLoggerLevel. See FIRApp.h for more details.");
40-
4122
NS_ASSUME_NONNULL_BEGIN
4223

4324
/**
@@ -47,21 +28,12 @@ NS_ASSUME_NONNULL_BEGIN
4728
NS_SWIFT_NAME(FirebaseConfiguration)
4829
@interface FIRConfiguration : NSObject
4930

50-
#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
5131
/** Returns the shared configuration object. */
5232
@property(class, nonatomic, readonly) FIRConfiguration *sharedInstance NS_SWIFT_NAME(shared);
53-
#else
54-
/** Returns the shared configuration object. */
55-
+ (FIRConfiguration *)sharedInstance NS_SWIFT_NAME(shared());
56-
#endif // defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
5733

5834
/** The configuration class for Firebase Analytics. */
5935
@property(nonatomic, readwrite) FIRAnalyticsConfiguration *analyticsConfiguration;
6036

61-
/** Global log level. Defaults to kFIRLogLevelError. */
62-
@property(nonatomic, readwrite, assign) FIRLogLevel logLevel DEPRECATED_MSG_ATTRIBUTE(
63-
"Use -FIRDebugEnabled and -FIRDebugDisabled or setLoggerLevel. See FIRApp.h for more details.");
64-
6537
/**
6638
* Sets the logging level for internal Firebase logging. Firebase will only log messages
6739
* that are logged at or below loggerLevel. The messages are logged both to the Xcode

ios/platform/FirebaseCore.framework/Headers/FIRLoggerLevel.h

100755100644
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
* limitations under the License.
1515
*/
1616

17+
// Note that importing GULLoggerLevel.h will lead to a non-modular header
18+
// import error.
19+
1720
/**
1821
* The log levels used by internal logging.
1922
*/
@@ -24,7 +27,7 @@ typedef NS_ENUM(NSInteger, FIRLoggerLevel) {
2427
FIRLoggerLevelWarning = 4,
2528
/** Notice level, matches ASL_LEVEL_NOTICE. */
2629
FIRLoggerLevelNotice = 5,
27-
/** Info level, matches ASL_LEVEL_NOTICE. */
30+
/** Info level, matches ASL_LEVEL_INFO. */
2831
FIRLoggerLevelInfo = 6,
2932
/** Debug level, matches ASL_LEVEL_DEBUG. */
3033
FIRLoggerLevelDebug = 7,

ios/platform/FirebaseCore.framework/Headers/FIROptions.h

100755100644
Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -90,25 +90,6 @@ NS_SWIFT_NAME(FirebaseOptions)
9090
*/
9191
@property(nonatomic, copy, nullable) NSString *storageBucket;
9292

93-
/**
94-
* Initializes a customized instance of FIROptions with keys. googleAppID, bundleID and GCMSenderID
95-
* are required. Other keys may required for configuring specific services.
96-
*/
97-
- (instancetype)initWithGoogleAppID:(NSString *)googleAppID
98-
bundleID:(NSString *)bundleID
99-
GCMSenderID:(NSString *)GCMSenderID
100-
APIKey:(NSString *)APIKey
101-
clientID:(NSString *)clientID
102-
trackingID:(NSString *)trackingID
103-
androidClientID:(NSString *)androidClientID
104-
databaseURL:(NSString *)databaseURL
105-
storageBucket:(NSString *)storageBucket
106-
deepLinkURLScheme:(NSString *)deepLinkURLScheme
107-
DEPRECATED_MSG_ATTRIBUTE(
108-
"Use `-[[FIROptions alloc] initWithGoogleAppID:GCMSenderID:]` "
109-
"(`FirebaseOptions(googleAppID:gcmSenderID:)` in Swift)` and property "
110-
"setters instead.");
111-
11293
/**
11394
* Initializes a customized instance of FIROptions from the file at the given plist file path. This
11495
* will read the file synchronously from disk.

ios/platform/FirebaseCore.framework/Headers/FirebaseCore.h

100755100644
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2017 Google
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
#import "FIRAnalyticsConfiguration.h"
218
#import "FIRApp.h"
319
#import "FIRConfiguration.h"

ios/platform/FirebaseCore.framework/Modules/module.modulemap

100755100644
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ framework module FirebaseCore {
22
umbrella header "FirebaseCore.h"
33
export *
44
module * { export *}
5-
link "z"
6-
link framework "Security"
7-
link framework "SystemConfiguration"}
5+
link framework "Foundation"
6+
}
Binary file not shown.
Binary file not shown.

ios/platform/FirebaseInstanceID.framework/Headers/FIRInstanceID.h

Lines changed: 56 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
#import <Foundation/Foundation.h>
22

3+
NS_ASSUME_NONNULL_BEGIN
4+
5+
@class FIRInstanceIDResult;
36
/**
47
* @memberof FIRInstanceID
58
*
69
* The scope to be used when fetching/deleting a token for Firebase Messaging.
710
*/
8-
FOUNDATION_EXPORT NSString *__nonnull const kFIRInstanceIDScopeFirebaseMessaging
11+
FOUNDATION_EXPORT NSString *const kFIRInstanceIDScopeFirebaseMessaging
912
NS_SWIFT_NAME(InstanceIDScopeFirebaseMessaging);
1013

1114
#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
@@ -17,7 +20,7 @@ FOUNDATION_EXPORT NSString *__nonnull const kFIRInstanceIDScopeFirebaseMessaging
1720
* Instance ID service will throttle the refresh event across all devices
1821
* to control the rate of token updates on application servers.
1922
*/
20-
FOUNDATION_EXPORT const NSNotificationName __nonnull kFIRInstanceIDTokenRefreshNotification
23+
FOUNDATION_EXPORT const NSNotificationName kFIRInstanceIDTokenRefreshNotification
2124
NS_SWIFT_NAME(InstanceIDTokenRefresh);
2225
#else
2326
/**
@@ -28,7 +31,7 @@ FOUNDATION_EXPORT const NSNotificationName __nonnull kFIRInstanceIDTokenRefreshN
2831
* Instance ID service will throttle the refresh event across all devices
2932
* to control the rate of token updates on application servers.
3033
*/
31-
FOUNDATION_EXPORT NSString *__nonnull const kFIRInstanceIDTokenRefreshNotification
34+
FOUNDATION_EXPORT NSString *const kFIRInstanceIDTokenRefreshNotification
3235
NS_SWIFT_NAME(InstanceIDTokenRefreshNotification);
3336
#endif // defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
3437

@@ -56,7 +59,7 @@ typedef void (^FIRInstanceIDTokenHandler)(NSString *__nullable token, NSError *_
5659
* @param error The error describing why deleting the token failed.
5760
* See the error codes below for a more detailed description.
5861
*/
59-
typedef void (^FIRInstanceIDDeleteTokenHandler)(NSError *__nullable error)
62+
typedef void (^FIRInstanceIDDeleteTokenHandler)(NSError *error)
6063
NS_SWIFT_NAME(InstanceIDDeleteTokenHandler);
6164

6265
/**
@@ -84,6 +87,20 @@ typedef void (^FIRInstanceIDHandler)(NSString *__nullable identity, NSError *__n
8487
typedef void (^FIRInstanceIDDeleteHandler)(NSError *__nullable error)
8588
NS_SWIFT_NAME(InstanceIDDeleteHandler);
8689

90+
/**
91+
* @related FIRInstanceID
92+
*
93+
* The completion handler invoked when the app identity and token are fetched. If the
94+
* identity wasn't created for some reason we return the appropriate error code.
95+
*
96+
* @param result The result containing an identity for the app instance and a valid token,
97+
* nil if there was an error while creating the result.
98+
* @param error The error if fetching the identity or token fails else nil.
99+
*/
100+
typedef void (^FIRInstanceIDResultHandler)(FIRInstanceIDResult *__nullable result,
101+
NSError *__nullable error)
102+
NS_SWIFT_NAME(InstanceIDResultHandler);
103+
87104
/**
88105
* Public errors produced by InstanceID.
89106
*/
@@ -114,19 +131,22 @@ typedef NS_ENUM(NSUInteger, FIRInstanceIDError) {
114131
} NS_SWIFT_NAME(InstanceIDError);
115132

116133
/**
117-
* The APNS token type for the app. If the token type is set to `UNKNOWN`
118-
* InstanceID will implicitly try to figure out what the actual token type
119-
* is from the provisioning profile.
134+
* A class contains the results of InstanceID and token query.
135+
*/
136+
NS_SWIFT_NAME(InstanceIDResult)
137+
@interface FIRInstanceIDResult : NSObject <NSCopying>
138+
139+
/**
140+
* An instanceID uniquely identifies the app instance.
141+
*/
142+
@property(nonatomic, readonly, copy) NSString *instanceID;
143+
144+
/*
145+
* Returns a Firebase Messaging scoped token for the firebase app.
120146
*/
121-
typedef NS_ENUM(NSInteger, FIRInstanceIDAPNSTokenType) {
122-
/// Unknown token type.
123-
FIRInstanceIDAPNSTokenTypeUnknown,
124-
/// Sandbox token type.
125-
FIRInstanceIDAPNSTokenTypeSandbox,
126-
/// Production token type.
127-
FIRInstanceIDAPNSTokenTypeProd,
128-
} NS_SWIFT_NAME(InstanceIDAPNSTokenType)
129-
__deprecated_enum_msg("Use FIRMessaging's APNSToken property instead.");
147+
@property(nonatomic, readonly, copy) NSString *token;
148+
149+
@end
130150

131151
/**
132152
* Instance ID provides a unique identifier for each app instance and a mechanism
@@ -155,36 +175,30 @@ NS_SWIFT_NAME(InstanceID)
155175
*
156176
* @return A shared instance of FIRInstanceID.
157177
*/
158-
+ (nonnull instancetype)instanceID NS_SWIFT_NAME(instanceID());
178+
+ (instancetype)instanceID NS_SWIFT_NAME(instanceID());
159179

160180
/**
161181
* Unavailable. Use +instanceID instead.
162182
*/
163-
- (nonnull instancetype)init __attribute__((unavailable("Use +instanceID instead.")));
183+
- (instancetype)init __attribute__((unavailable("Use +instanceID instead.")));
184+
185+
#pragma mark - Tokens
164186

165187
/**
166-
* Set APNS token for the application. This APNS token will be used to register
167-
* with Firebase Messaging using `token` or
168-
* `tokenWithAuthorizedEntity:scope:options:handler`. If the token type is set to
169-
* `FIRInstanceIDAPNSTokenTypeUnknown` InstanceID will read the provisioning profile
170-
* to find out the token type.
171-
*
172-
* @param token The APNS token for the application.
173-
* @param type The APNS token type for the above token.
188+
* Returns a result of app instance identifier InstanceID and a Firebase Messaging scoped token.
189+
* param handler The callback handler invoked when an app instanceID and a default token
190+
* are generated and returned. If instanceID and token fetching fail for some
191+
* reason the callback is invoked with nil `result` and the appropriate error.
174192
*/
175-
- (void)setAPNSToken:(nonnull NSData *)token
176-
type:(FIRInstanceIDAPNSTokenType)type
177-
__deprecated_msg("Use FIRMessaging's APNSToken property instead.");
178-
179-
#pragma mark - Tokens
193+
- (void)instanceIDWithHandler:(FIRInstanceIDResultHandler)handler;
180194

181195
/**
182196
* Returns a Firebase Messaging scoped token for the firebase app.
183197
*
184198
* @return Returns the stored token if the device has registered with Firebase Messaging, otherwise
185199
* returns nil.
186200
*/
187-
- (nullable NSString *)token;
201+
- (nullable NSString *)token __deprecated_msg("Use instanceIDWithHandler: instead.");
188202

189203
/**
190204
* Returns a token that authorizes an Entity (example: cloud service) to perform
@@ -225,10 +239,10 @@ NS_SWIFT_NAME(InstanceID)
225239
* is nil and a valid `error` is returned. The valid error
226240
* codes have been documented above.
227241
*/
228-
- (void)tokenWithAuthorizedEntity:(nonnull NSString *)authorizedEntity
229-
scope:(nonnull NSString *)scope
242+
- (void)tokenWithAuthorizedEntity:(NSString *)authorizedEntity
243+
scope:(NSString *)scope
230244
options:(nullable NSDictionary *)options
231-
handler:(nonnull FIRInstanceIDTokenHandler)handler;
245+
handler:(FIRInstanceIDTokenHandler)handler;
232246

233247
/**
234248
* Revokes access to a scope (action) for an entity previously
@@ -249,9 +263,9 @@ NS_SWIFT_NAME(InstanceID)
249263
* In case of error an appropriate error object is returned
250264
* else error is nil.
251265
*/
252-
- (void)deleteTokenWithAuthorizedEntity:(nonnull NSString *)authorizedEntity
253-
scope:(nonnull NSString *)scope
254-
handler:(nonnull FIRInstanceIDDeleteTokenHandler)handler;
266+
- (void)deleteTokenWithAuthorizedEntity:(NSString *)authorizedEntity
267+
scope:(NSString *)scope
268+
handler:(FIRInstanceIDDeleteTokenHandler)handler;
255269

256270
#pragma mark - Identity
257271

@@ -269,7 +283,7 @@ NS_SWIFT_NAME(InstanceID)
269283
* a valid identifier is returned and a valid identifier for the
270284
* application instance.
271285
*/
272-
- (void)getIDWithHandler:(nonnull FIRInstanceIDHandler)handler NS_SWIFT_NAME(getID(handler:));
286+
- (void)getIDWithHandler:(FIRInstanceIDHandler)handler NS_SWIFT_NAME(getID(handler:));
273287

274288
/**
275289
* Resets Instance ID and revokes all tokens.
@@ -283,7 +297,8 @@ NS_SWIFT_NAME(InstanceID)
283297
* (like FCM, RemoteConfig or Analytics) or user explicitly calls Instance ID APIs to get an
284298
* Instance ID and token again.
285299
*/
286-
- (void)deleteIDWithHandler:(nonnull FIRInstanceIDDeleteHandler)handler
287-
NS_SWIFT_NAME(deleteID(handler:));
300+
- (void)deleteIDWithHandler:(FIRInstanceIDDeleteHandler)handler NS_SWIFT_NAME(deleteID(handler:));
288301

289302
@end
303+
304+
NS_ASSUME_NONNULL_END

ios/platform/FirebaseInstanceID.framework/Modules/module.modulemap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ framework module FirebaseInstanceID {
22
umbrella header "FirebaseInstanceID.h"
33
export *
44
module * { export *}
5-
link "z"
65
link framework "Security"
76
link framework "SystemConfiguration"}
Binary file not shown.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
framework module GoogleAppMeasurement {
2+
export *
3+
module * { export *}
4+
link "sqlite3"
5+
link "z"
6+
link framework "Security"
7+
link framework "StoreKit"
8+
link framework "SystemConfiguration"
9+
link framework "UIKit"}
Binary file not shown.

0 commit comments

Comments
 (0)