commit | author | age
|
a6c014
|
1 |
/* |
L |
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 |
|
|
17 |
#import <Foundation/Foundation.h> |
|
18 |
|
|
19 |
NS_ASSUME_NONNULL_BEGIN |
|
20 |
|
|
21 |
/** |
|
22 |
* This class provides constant fields of Google APIs. |
|
23 |
*/ |
|
24 |
NS_SWIFT_NAME(FirebaseOptions) |
|
25 |
@interface FIROptions : NSObject <NSCopying> |
|
26 |
|
|
27 |
/** |
|
28 |
* Returns the default options. The first time this is called it synchronously reads |
|
29 |
* GoogleService-Info.plist from disk. |
|
30 |
*/ |
|
31 |
+ (nullable FIROptions *)defaultOptions NS_SWIFT_NAME(defaultOptions()); |
|
32 |
|
|
33 |
/** |
|
34 |
* An iOS API key used for authenticating requests from your app, e.g. |
|
35 |
* @"AIzaSyDdVgKwhZl0sTTTLZ7iTmt1r3N2cJLnaDk", used to identify your app to Google servers. |
|
36 |
*/ |
|
37 |
@property(nonatomic, copy, nullable) NSString *APIKey NS_SWIFT_NAME(apiKey); |
|
38 |
|
|
39 |
/** |
|
40 |
* The bundle ID for the application. Defaults to `[[NSBundle mainBundle] bundleID]` when not set |
|
41 |
* manually or in a plist. |
|
42 |
*/ |
|
43 |
@property(nonatomic, copy) NSString *bundleID; |
|
44 |
|
|
45 |
/** |
|
46 |
* The OAuth2 client ID for iOS application used to authenticate Google users, for example |
|
47 |
* @"12345.apps.googleusercontent.com", used for signing in with Google. |
|
48 |
*/ |
|
49 |
@property(nonatomic, copy, nullable) NSString *clientID; |
|
50 |
|
|
51 |
/** |
|
52 |
* The tracking ID for Google Analytics, e.g. @"UA-12345678-1", used to configure Google Analytics. |
|
53 |
*/ |
|
54 |
@property(nonatomic, copy, nullable) NSString *trackingID; |
|
55 |
|
|
56 |
/** |
|
57 |
* The Project Number from the Google Developer's console, for example @"012345678901", used to |
|
58 |
* configure Google Cloud Messaging. |
|
59 |
*/ |
|
60 |
@property(nonatomic, copy) NSString *GCMSenderID NS_SWIFT_NAME(gcmSenderID); |
|
61 |
|
|
62 |
/** |
|
63 |
* The Project ID from the Firebase console, for example @"abc-xyz-123". |
|
64 |
*/ |
|
65 |
@property(nonatomic, copy, nullable) NSString *projectID; |
|
66 |
|
|
67 |
/** |
|
68 |
* The Android client ID used in Google AppInvite when an iOS app has its Android version, for |
|
69 |
* example @"12345.apps.googleusercontent.com". |
|
70 |
*/ |
|
71 |
@property(nonatomic, copy, nullable) NSString *androidClientID; |
|
72 |
|
|
73 |
/** |
|
74 |
* The Google App ID that is used to uniquely identify an instance of an app. |
|
75 |
*/ |
|
76 |
@property(nonatomic, copy) NSString *googleAppID; |
|
77 |
|
|
78 |
/** |
|
79 |
* The database root URL, e.g. @"http://abc-xyz-123.firebaseio.com". |
|
80 |
*/ |
|
81 |
@property(nonatomic, copy, nullable) NSString *databaseURL; |
|
82 |
|
|
83 |
/** |
|
84 |
* The URL scheme used to set up Durable Deep Link service. |
|
85 |
*/ |
|
86 |
@property(nonatomic, copy, nullable) NSString *deepLinkURLScheme; |
|
87 |
|
|
88 |
/** |
|
89 |
* The Google Cloud Storage bucket name, e.g. @"abc-xyz-123.storage.firebase.com". |
|
90 |
*/ |
|
91 |
@property(nonatomic, copy, nullable) NSString *storageBucket; |
|
92 |
|
|
93 |
/** |
|
94 |
* The App Group identifier to share data between the application and the application extensions. |
|
95 |
* The App Group must be configured in the application and on the Apple Developer Portal. Default |
|
96 |
* value `nil`. |
|
97 |
*/ |
|
98 |
@property(nonatomic, copy, nullable) NSString *appGroupID; |
|
99 |
|
|
100 |
/** |
|
101 |
* Initializes a customized instance of FIROptions from the file at the given plist file path. This |
|
102 |
* will read the file synchronously from disk. |
|
103 |
* For example, |
|
104 |
* NSString *filePath = |
|
105 |
* [[NSBundle mainBundle] pathForResource:@"GoogleService-Info" ofType:@"plist"]; |
|
106 |
* FIROptions *options = [[FIROptions alloc] initWithContentsOfFile:filePath]; |
|
107 |
* Returns nil if the plist file does not exist or is invalid. |
|
108 |
*/ |
|
109 |
- (nullable instancetype)initWithContentsOfFile:(NSString *)plistPath; |
|
110 |
|
|
111 |
/** |
|
112 |
* Initializes a customized instance of FIROptions with required fields. Use the mutable properties |
|
113 |
* to modify fields for configuring specific services. |
|
114 |
*/ |
|
115 |
// clang-format off |
|
116 |
- (instancetype)initWithGoogleAppID:(NSString *)googleAppID |
|
117 |
GCMSenderID:(NSString *)GCMSenderID |
|
118 |
NS_SWIFT_NAME(init(googleAppID:gcmSenderID:)); |
|
119 |
// clang-format on |
|
120 |
|
|
121 |
@end |
|
122 |
|
|
123 |
NS_ASSUME_NONNULL_END |