Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Example/Core/Tests/FIROptionsTest.m
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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