mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 09:50:15 +01:00
Update AppDelegate.mm
This commit is contained in:
parent
cdb754ea32
commit
d5dcae61e3
@ -30,18 +30,12 @@ NSUserDefaults *group = [[NSUserDefaults alloc] initWithSuiteName:@"group.io.blu
|
||||
config.appType = @"macOS";
|
||||
// Start Bugsnag with the configuration
|
||||
[Bugsnag startWithConfiguration:config];
|
||||
[self copyDeviceUID];
|
||||
|
||||
#else
|
||||
[Bugsnag start];
|
||||
[self copyDeviceUID];
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] addObserver:self
|
||||
forKeyPath:@"deviceUID"
|
||||
options:NSKeyValueObservingOptionNew
|
||||
context:NULL];
|
||||
[[NSUserDefaults standardUserDefaults] addObserver:self
|
||||
forKeyPath:@"deviceUIDCopy"
|
||||
options:NSKeyValueObservingOptionNew
|
||||
context:NULL];
|
||||
[self copyDeviceUID];
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -94,6 +88,14 @@ NSUserDefaults *group = [[NSUserDefaults alloc] initWithSuiteName:@"group.io.blu
|
||||
}
|
||||
|
||||
- (void)copyDeviceUID {
|
||||
[[NSUserDefaults standardUserDefaults] addObserver:self
|
||||
forKeyPath:@"deviceUID"
|
||||
options:NSKeyValueObservingOptionNew
|
||||
context:NULL];
|
||||
[[NSUserDefaults standardUserDefaults] addObserver:self
|
||||
forKeyPath:@"deviceUIDCopy"
|
||||
options:NSKeyValueObservingOptionNew
|
||||
context:NULL];
|
||||
NSString *deviceUID = [[NSUserDefaults standardUserDefaults] stringForKey:@"deviceUID"];
|
||||
if (deviceUID && deviceUID.length > 0) {
|
||||
[NSUserDefaults.standardUserDefaults setValue:deviceUID forKey:@"deviceUIDCopy"];
|
||||
|
Loading…
Reference in New Issue
Block a user