Skip to content

Commit 917afb3

Browse files
committed
Change property attributes on OTMPreferences
The app was crashing with an `EXC_BAD_ACCESS` exception when the app delegate's `applicationDidEnterBackground:` method attempted to call `save` on `OTMPreferences`. Setting a breakpoint on unhandled exceptions revealed that the value of the `instance` property was invalid. It looks like this is the result of using the `assign` attribute, which should only be used on primitive types (int, BOOL, etc.). I am not able to reproduce the exception after replacing `assign` with our app-wide convention for string properties, `nonatomic` and `strong`.
1 parent e4d8b72 commit 917afb3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

OpenTreeMap/src/OTM/OTMPreferences.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
+ (OTMPreferences *)sharedPreferences;
2121

22-
@property (assign) NSString *instance;
22+
@property (nonatomic, strong) NSString *instance;
2323

2424
- (void)save;
2525
- (void)load;

0 commit comments

Comments
 (0)