Commit f5e2dd0c authored by Tobias's avatar Tobias

use group identifier from Info.plist by default

(this simplifies the change of group identifiers and allows change even after compilation)
parent c76e6cf4
......@@ -39,7 +39,9 @@
@property (nonatomic, strong) NSPersistentStoreCoordinator *persistentStoreCoordinator;
@property (nonatomic, copy) NSDictionary *additionalPersitentStoreOptions;
@property (nonatomic, readonly) int deviceSpeedCategory;
// default is
// uses identifier from Info.plist in framework bundle or main bundle with key
// MLKitGroupIdentifier by default
// if key in Info.plist wasn't set it further defaults to
@property (nonatomic, copy) NSString *applicationGroupIdentifier;
......@@ -102,7 +102,16 @@ static NSString *kDecrapifyTitles = @"MLDecrapifyTitles";
self = [super init];
if (self) {
_applicationGroupIdentifier = @"";
NSString *key = @"MLKitGroupIdentifier";
_applicationGroupIdentifier = [[[NSBundle bundleForClass:self.class] infoDictionary] valueForKey:key];
if (!_applicationGroupIdentifier) {
_applicationGroupIdentifier = [[[NSBundle mainBundle] infoDictionary] valueForKey:key];
if (!_applicationGroupIdentifier) {
_applicationGroupIdentifier = @"";
[self _setupLibraryPathPriorToMigration];
APLog(@"Initializing db in %@", [self databaseFolderPath]);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment