Skip to content

Commit

Permalink
FIROptions.appGroupID introduced (#3293)
Browse files Browse the repository at this point in the history
  • Loading branch information
maksymmalyhin committed Jul 2, 2019
1 parent 4d63873 commit c665b6e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Example/Core/Tests/FIROptionsTest.m
Expand Up @@ -197,6 +197,11 @@ - (void)testCopyingProperties {
options.storageBucket = mutableString;
[mutableString appendString:@"2"];
XCTAssertEqualObjects(options.storageBucket, @"1");

mutableString = [[NSMutableString alloc] initWithString:@"1"];
options.appGroupID = mutableString;
[mutableString appendString:@"2"];
XCTAssertEqualObjects(options.appGroupID, @"1");
}

- (void)testCopyWithZone {
Expand Down
6 changes: 6 additions & 0 deletions Firebase/Core/FIROptions.m
Expand Up @@ -179,6 +179,7 @@ - (id)copyWithZone:(NSZone *)zone {
if (newOptions) {
newOptions.optionsDictionary = self.optionsDictionary;
newOptions.deepLinkURLScheme = self.deepLinkURLScheme;
newOptions.appGroupID = self.appGroupID;
newOptions.editingLocked = self.isEditingLocked;
newOptions.usingOptionsFromDefaultPlist = self.usingOptionsFromDefaultPlist;
}
Expand Down Expand Up @@ -340,6 +341,11 @@ - (void)setBundleID:(NSString *)bundleID {
_optionsDictionary[kFIRBundleID] = [bundleID copy];
}

- (void)setAppGroupID:(NSString *)appGroupID {
[self checkEditingLocked];
_appGroupID = [appGroupID copy];
}

#pragma mark - Internal instance methods

- (NSDictionary *)analyticsOptionsDictionaryWithInfoDictionary:(NSDictionary *)infoDictionary {
Expand Down
7 changes: 7 additions & 0 deletions Firebase/Core/Public/FIROptions.h
Expand Up @@ -90,6 +90,13 @@ NS_SWIFT_NAME(FirebaseOptions)
*/
@property(nonatomic, copy, nullable) NSString *storageBucket;

/**
* The App Group identifier to share data between the application and the application extensions.
* The App Group must be configured in the application and on the Apple Developer Portal. Default
* value `nil`.
*/
@property(nonatomic, copy, nullable) NSString *appGroupID;

/**
* Initializes a customized instance of FIROptions from the file at the given plist file path. This
* will read the file synchronously from disk.
Expand Down

0 comments on commit c665b6e

Please sign in to comment.