Only set the default configuration when we're running as an extension

Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
This commit is contained in:
Marcel Müller 2022-01-28 19:04:42 +01:00
Родитель ebfe9b40bb
Коммит 4f5a0b191a
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -110,8 +110,10 @@
};
NSError *error = nil;
// Set the default configuration to make sure we always use the correct realm-file
// When running as an extension, set the default configuration to make sure we always use the correct realm-file
if ([[[NSBundle mainBundle] bundlePath] hasSuffix:@".appex"]) {
[RLMRealmConfiguration setDefaultConfiguration:configuration];
}
_realm = [RLMRealm realmWithConfiguration:configuration error:&error];
[self setupShareViewForAccount:nil];