├── .gitignore
├── Externals
└── RMSharedPreferences
│ ├── Info.plist
│ ├── NSObject+RMSubclassSupport.h
│ ├── NSObject+RMSubclassSupport.m
│ ├── NSURL+RMApplicationGroup.h
│ ├── NSURL+RMApplicationGroup.m
│ ├── README.md
│ ├── RMCoalescingOperation.h
│ ├── RMCoalescingOperation.m
│ ├── RMPlistEncoding.h
│ ├── RMPlistEncoding.m
│ ├── RMSharedPreferences.h
│ ├── RMSharedPreferences.m
│ ├── RMSharedPreferences.xcodeproj
│ └── project.pbxproj
│ ├── RMSharedUserDefaults.h
│ ├── RMSharedUserDefaults.m
│ ├── SharedPreferences-Constants.h
│ ├── SharedPreferences-Constants.m
│ └── en-GB.lproj
│ └── InfoPlist.strings
├── LICENSE
├── README.md
└── Sample Application
├── Helper
├── Helper-Info.plist
├── Helper.entitlements
├── RMHelperAppDelegate.h
├── RMHelperAppDelegate.m
├── en.lproj
│ ├── Credits.rtf
│ ├── HelperMenu.xib
│ └── InfoPlist.strings
└── main.m
├── Main
├── Main-Info.plist
├── Main.entitlements
├── RMMainAppDelegate.h
├── RMMainAppDelegate.m
├── en.lproj
│ ├── Credits.rtf
│ ├── InfoPlist.strings
│ └── MainMenu.xib
└── main.m
├── SharedPreferences-Constants.h
├── SharedPreferences-Constants.m
└── SharedPreferences.xcodeproj
├── project.pbxproj
└── xcshareddata
└── xcschemes
├── Helper.xcscheme
└── Main.xcscheme
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | # Xcode
3 | build/*
4 | *.pbxuser
5 | !default.pbxuser
6 | *.mode1v3
7 | !default.mode1v3
8 | *.mode2v3
9 | !default.mode2v3
10 | *.perspectivev3
11 | !default.perspectivev3
12 | *.xcworkspace
13 | !default.xcworkspace
14 | xcuserdata
15 | profile
16 | *.moved-aside
17 |
18 |
--------------------------------------------------------------------------------
/Externals/RMSharedPreferences/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | com.realmacsoftware.rmsharedpreferences
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | FMWK
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | NSHumanReadableCopyright
26 | Copyright © 2012 Realmac Software. All rights reserved.
27 | NSPrincipalClass
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Externals/RMSharedPreferences/NSObject+RMSubclassSupport.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2012 Realmac Software Ltd
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject
10 | // to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
19 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
20 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | //
23 |
24 | #import
25 |
26 | @interface NSObject (RMSubclassSupport)
27 |
28 | - (void)subclassDoesNotSupportSelector:(SEL)selector;
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/Externals/RMSharedPreferences/NSObject+RMSubclassSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2012 Realmac Software Ltd
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject
10 | // to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
19 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
20 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | //
23 |
24 | #import "NSObject+RMSubclassSupport.h"
25 |
26 | #import
27 |
28 | @implementation NSObject (RMSubclassSupport)
29 |
30 | - (void)subclassDoesNotSupportSelector:(SEL)selector
31 | {
32 | NSString *prettyMethodName = [NSString stringWithFormat:@"%@[%@ %@]", (class_isMetaClass(object_getClass(self)) ? @"+" : @"-"), NSStringFromClass([self class]), NSStringFromSelector(selector)];
33 | @throw [NSException exceptionWithName:NSInternalInconsistencyException reason:[NSString stringWithFormat:@"%@, is not available in the subclass.", prettyMethodName] userInfo:nil];
34 | }
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/Externals/RMSharedPreferences/NSURL+RMApplicationGroup.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2012 Realmac Software Ltd
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject
10 | // to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
19 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
20 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | //
23 |
24 | #import
25 |
26 | @interface NSURL (RMApplicationGroup)
27 |
28 | + (NSString *)defaultGroupContainerIdentifier;
29 |
30 | + (NSURL *)containerURLForSecurityApplicationGroupIdentifier:(NSString *)identifier;
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/Externals/RMSharedPreferences/NSURL+RMApplicationGroup.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2012 Realmac Software Ltd
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject
10 | // to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
19 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
20 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | //
23 |
24 | #import "NSURL+RMApplicationGroup.h"
25 |
26 | #import
27 | #import
28 |
29 | @implementation NSURL (RMApplicationGroup)
30 |
31 | + (NSString *)defaultGroupContainerIdentifier
32 | {
33 | SecTaskRef task = NULL;
34 |
35 | NSString *applicationGroupIdentifier = nil;
36 | do {
37 | task = SecTaskCreateFromSelf(kCFAllocatorDefault);
38 | if (task == NULL) {
39 | break;
40 | }
41 |
42 | CFTypeRef applicationGroupIdentifiers = SecTaskCopyValueForEntitlement(task, CFSTR("com.apple.security.application-groups"), NULL);
43 | if (applicationGroupIdentifiers == NULL || CFGetTypeID(applicationGroupIdentifiers) != CFArrayGetTypeID() || CFArrayGetCount(applicationGroupIdentifiers) == 0) {
44 | break;
45 | }
46 |
47 | CFTypeRef firstApplicationGroupIdentifier = CFArrayGetValueAtIndex(applicationGroupIdentifiers, 0);
48 | if (CFGetTypeID(firstApplicationGroupIdentifier) != CFStringGetTypeID()) {
49 | break;
50 | }
51 |
52 | applicationGroupIdentifier = (__bridge NSString *)firstApplicationGroupIdentifier;
53 | } while (0);
54 |
55 | if (task != NULL) {
56 | CFRelease(task);
57 | }
58 |
59 | return applicationGroupIdentifier;
60 | }
61 |
62 | + (NSURL *)containerURLForSecurityApplicationGroupIdentifier:(NSString *)identifier
63 | {
64 | identifier = identifier ? : [self defaultGroupContainerIdentifier];
65 |
66 | if (identifier == nil) {
67 | @throw [NSException exceptionWithName:NSInvalidArgumentException reason:@"A default identifier could not be found in the entitlements." userInfo:nil];
68 | return nil;
69 | }
70 |
71 | static NSString * const NSURLEMBContainerExtensionsLibraryFolderName = @"Library";
72 | static NSString * const NSURLEMBContainerExtensionsGroupContainerFolderName = @"Group Containers";
73 |
74 | static NSURL *groupsContainerDirectory = nil;
75 |
76 | static dispatch_once_t onceToken = 0;
77 | dispatch_once(&onceToken, ^ {
78 | struct passwd *pw = getpwuid(getuid());
79 | const char *homedir = pw->pw_dir;
80 | NSURL *homeDirectory = [NSURL fileURLWithPath:@(homedir)];
81 | groupsContainerDirectory = [[homeDirectory URLByAppendingPathComponent:NSURLEMBContainerExtensionsLibraryFolderName] URLByAppendingPathComponent:NSURLEMBContainerExtensionsGroupContainerFolderName];
82 | });
83 |
84 | NSURL *indentifierGroupsContainerDirectory = [groupsContainerDirectory URLByAppendingPathComponent:identifier];
85 |
86 | BOOL createdDirectory = [[NSFileManager defaultManager] createDirectoryAtURL:indentifierGroupsContainerDirectory withIntermediateDirectories:YES attributes:nil error:NULL];
87 | if (!createdDirectory) {
88 | return nil;
89 | }
90 |
91 | return indentifierGroupsContainerDirectory;
92 | }
93 |
94 | @end
95 |
--------------------------------------------------------------------------------
/Externals/RMSharedPreferences/README.md:
--------------------------------------------------------------------------------
1 | ```
2 | - (void)registerDefaults:(NSDictionary *)registrationDictionary;
3 | ```
4 |
5 | The contents of the registered defaults are not written to disk; you need to call this method each time your application starts.
6 | The contents of the registered defaults are also local only which mean defaults registered in one process will not be seen by another process in the application group.
7 |
8 |
9 | The following methods from NSUserDefaults are not supported. Getters will return nil, 0 or NO based on the return type and setters will throw an exception.
10 |
11 | ```
12 | - (void)addSuiteNamed:(NSString *)suiteName;
13 | - (void)removeSuiteNamed:(NSString *)suiteName;
14 |
15 | - (NSArray *)volatileDomainNames;
16 | - (NSDictionary *)volatileDomainForName:(NSString *)domainName;
17 | - (void)setVolatileDomain:(NSDictionary *)domain forName:(NSString *)domainName;
18 | - (void)removeVolatileDomainForName:(NSString *)domainName;
19 |
20 | - (NSArray *)persistentDomainNames;
21 | - (NSDictionary *)persistentDomainForName:(NSString *)domainName;
22 | - (void)setPersistentDomain:(NSDictionary *)domain forName:(NSString *)domainName;
23 | - (void)removePersistentDomainForName:(NSString *)domainName;
24 |
25 | - (BOOL)objectIsForcedForKey:(NSString *)key;
26 | - (BOOL)objectIsForcedForKey:(NSString *)key inDomain:(NSString *)domain;
27 | ```
--------------------------------------------------------------------------------
/Externals/RMSharedPreferences/RMCoalescingOperation.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2012 Realmac Software Ltd
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject
10 | // to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
19 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
20 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | //
23 |
24 | #import
25 |
26 | @interface RMCoalescingOperation : NSOperation
27 |
28 | + (id)coalescingOperationWithBlock:(void (^)(void))block;
29 |
30 | /*!
31 | \brief
32 | Attempts to replace the execution block. Returns YES if succeeded, NO otherwise.
33 | */
34 | - (BOOL)replaceBlock:(void (^)(void))block;
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/Externals/RMSharedPreferences/RMCoalescingOperation.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2012 Realmac Software Ltd
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject
10 | // to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
19 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
20 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | //
23 |
24 | #import "RMCoalescingOperation.h"
25 |
26 | @interface RMCoalescingOperation ()
27 |
28 | @property (copy, nonatomic) void (^block)(void);
29 |
30 | @end
31 |
32 | @implementation RMCoalescingOperation
33 |
34 | + (id)coalescingOperationWithBlock:(void (^)(void))block
35 | {
36 | return [[self alloc] initWithBlock:block];
37 | }
38 |
39 | - (id)initWithBlock:(void (^)(void))block
40 | {
41 | NSParameterAssert(block != nil);
42 |
43 | self = [self init];
44 | if (self == nil) {
45 | return nil;
46 | }
47 |
48 | _block = [block copy];
49 |
50 | return self;
51 | }
52 |
53 | - (BOOL)replaceBlock:(void (^)(void))block
54 | {
55 | @synchronized (self) {
56 | if ([self block] == nil) {
57 | return NO;
58 | }
59 |
60 | [self setBlock:block];
61 | }
62 | return YES;
63 | }
64 |
65 | - (void)main
66 | {
67 | void (^block)(void) = nil;
68 |
69 | @synchronized (self) {
70 | block = [self block];
71 | [self setBlock:nil];
72 | }
73 |
74 | block();
75 | }
76 |
77 | @end
78 |
--------------------------------------------------------------------------------
/Externals/RMSharedPreferences/RMPlistEncoding.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2012 Realmac Software Ltd
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject
10 | // to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
19 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
20 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | //
23 |
24 | #import
25 |
26 | @interface RMPlistEncoding : NSObject
27 |
28 | + (BOOL)canEncodeObject:(id)object;
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/Externals/RMSharedPreferences/RMPlistEncoding.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2012 Realmac Software Ltd
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject
10 | // to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
19 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
20 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | //
23 |
24 | #import "RMPlistEncoding.h"
25 |
26 | @implementation RMPlistEncoding
27 |
28 | + (BOOL)canEncodeObject:(id)object
29 | {
30 | if ([object isKindOfClass:[NSString class]]) {
31 | return YES;
32 | }
33 |
34 | if ([object isKindOfClass:[NSData class]]) {
35 | return YES;
36 | }
37 |
38 | if ([object isKindOfClass:[NSNumber class]]) {
39 | return YES;
40 | }
41 |
42 | if ([object isKindOfClass:[NSDate class]]) {
43 | return YES;
44 | }
45 |
46 | if ([object isKindOfClass:[NSArray class]]) {
47 | __block BOOL canEncodeArray = YES;
48 |
49 | [(NSArray *)object enumerateObjectsUsingBlock:^ (id containedObject, NSUInteger idx, BOOL *stop) {
50 | if (![self canEncodeObject:containedObject]) {
51 | *stop = YES;
52 | canEncodeArray = NO;
53 | }
54 | }];
55 |
56 | return canEncodeArray;
57 | }
58 |
59 | if ([object isKindOfClass:[NSDictionary class]]) {
60 | __block BOOL canEncodeDictionary = YES;
61 |
62 | [(NSDictionary *)object enumerateKeysAndObjectsUsingBlock:^ (id containedKey, id containedObject, BOOL *stop) {
63 | if (![containedKey isKindOfClass:[NSString class]] || ![self canEncodeObject:containedObject]) {
64 | *stop = YES;
65 | canEncodeDictionary = NO;
66 | }
67 | }];
68 |
69 | return canEncodeDictionary;
70 | }
71 |
72 | return NO;
73 | }
74 |
75 | @end
76 |
--------------------------------------------------------------------------------
/Externals/RMSharedPreferences/RMSharedPreferences.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2012 Realmac Software Ltd
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject
10 | // to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
19 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
20 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | //
23 |
24 | #import
25 |
26 | #import "RMSharedPreferences/SharedPreferences-Constants.h"
27 |
28 | #import "RMSharedPreferences/RMSharedUserDefaults.h"
29 |
30 | #import "RMSharedPreferences/NSURL+RMApplicationGroup.h"
31 |
--------------------------------------------------------------------------------
/Externals/RMSharedPreferences/RMSharedPreferences.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2012 Realmac Software Ltd
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject
10 | // to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
19 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
20 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | //
23 |
24 | #import "RMSharedPreferences.h"
25 |
--------------------------------------------------------------------------------
/Externals/RMSharedPreferences/RMSharedPreferences.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 6D3B5F1F1663771500BE3CB8 /* RMSharedPreferences.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D3B5F1D1663771500BE3CB8 /* RMSharedPreferences.h */; settings = {ATTRIBUTES = (Public, ); }; };
11 | 6D3B5F201663771500BE3CB8 /* RMSharedPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D3B5F1E1663771500BE3CB8 /* RMSharedPreferences.m */; };
12 | 6D3B5F231663776F00BE3CB8 /* SharedPreferences-Constants.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D3B5F211663776F00BE3CB8 /* SharedPreferences-Constants.h */; settings = {ATTRIBUTES = (Public, ); }; };
13 | 6D3B5F241663776F00BE3CB8 /* SharedPreferences-Constants.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D3B5F221663776F00BE3CB8 /* SharedPreferences-Constants.m */; };
14 | 6D3B5F27166377C300BE3CB8 /* NSURL+RMApplicationGroup.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D3B5F25166377C300BE3CB8 /* NSURL+RMApplicationGroup.h */; settings = {ATTRIBUTES = (Public, ); }; };
15 | 6D3B5F28166377C300BE3CB8 /* NSURL+RMApplicationGroup.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D3B5F26166377C300BE3CB8 /* NSURL+RMApplicationGroup.m */; };
16 | 6D3B5F2A166377EA00BE3CB8 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D3B5F29166377EA00BE3CB8 /* Security.framework */; };
17 | 6D3B5F2E166378B600BE3CB8 /* NSObject+RMSubclassSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D3B5F2C166378B600BE3CB8 /* NSObject+RMSubclassSupport.h */; };
18 | 6D3B5F2F166378B600BE3CB8 /* NSObject+RMSubclassSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D3B5F2D166378B600BE3CB8 /* NSObject+RMSubclassSupport.m */; };
19 | 6D5026AB166665C800321B02 /* RMCoalescingOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D5026A9166665C800321B02 /* RMCoalescingOperation.h */; };
20 | 6D5026AC166665C800321B02 /* RMCoalescingOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D5026AA166665C800321B02 /* RMCoalescingOperation.m */; };
21 | 6D5028441667BB0500321B02 /* RMPlistEncoding.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D5028421667BB0500321B02 /* RMPlistEncoding.h */; };
22 | 6D5028451667BB0500321B02 /* RMPlistEncoding.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D5028431667BB0500321B02 /* RMPlistEncoding.m */; };
23 | 6D74A060166373B400D70B8F /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D74A05F166373B400D70B8F /* Cocoa.framework */; };
24 | 6D74A07A1663745B00D70B8F /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6D74A0781663745B00D70B8F /* InfoPlist.strings */; };
25 | 6D74A07D1663747100D70B8F /* RMSharedUserDefaults.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D74A07B1663747100D70B8F /* RMSharedUserDefaults.h */; settings = {ATTRIBUTES = (Public, ); }; };
26 | 6D74A07E1663747100D70B8F /* RMSharedUserDefaults.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D74A07C1663747100D70B8F /* RMSharedUserDefaults.m */; };
27 | /* End PBXBuildFile section */
28 |
29 | /* Begin PBXFileReference section */
30 | 6D3B5F1D1663771500BE3CB8 /* RMSharedPreferences.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RMSharedPreferences.h; sourceTree = SOURCE_ROOT; };
31 | 6D3B5F1E1663771500BE3CB8 /* RMSharedPreferences.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RMSharedPreferences.m; sourceTree = SOURCE_ROOT; };
32 | 6D3B5F211663776F00BE3CB8 /* SharedPreferences-Constants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SharedPreferences-Constants.h"; sourceTree = SOURCE_ROOT; };
33 | 6D3B5F221663776F00BE3CB8 /* SharedPreferences-Constants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "SharedPreferences-Constants.m"; sourceTree = SOURCE_ROOT; };
34 | 6D3B5F25166377C300BE3CB8 /* NSURL+RMApplicationGroup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSURL+RMApplicationGroup.h"; sourceTree = SOURCE_ROOT; };
35 | 6D3B5F26166377C300BE3CB8 /* NSURL+RMApplicationGroup.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSURL+RMApplicationGroup.m"; sourceTree = SOURCE_ROOT; };
36 | 6D3B5F29166377EA00BE3CB8 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
37 | 6D3B5F2C166378B600BE3CB8 /* NSObject+RMSubclassSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+RMSubclassSupport.h"; sourceTree = SOURCE_ROOT; };
38 | 6D3B5F2D166378B600BE3CB8 /* NSObject+RMSubclassSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+RMSubclassSupport.m"; sourceTree = SOURCE_ROOT; };
39 | 6D5026A9166665C800321B02 /* RMCoalescingOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RMCoalescingOperation.h; sourceTree = SOURCE_ROOT; };
40 | 6D5026AA166665C800321B02 /* RMCoalescingOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RMCoalescingOperation.m; sourceTree = SOURCE_ROOT; };
41 | 6D5028421667BB0500321B02 /* RMPlistEncoding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RMPlistEncoding.h; sourceTree = SOURCE_ROOT; };
42 | 6D5028431667BB0500321B02 /* RMPlistEncoding.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RMPlistEncoding.m; sourceTree = SOURCE_ROOT; };
43 | 6D74A05C166373B400D70B8F /* RMSharedPreferences.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RMSharedPreferences.framework; sourceTree = BUILT_PRODUCTS_DIR; };
44 | 6D74A05F166373B400D70B8F /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
45 | 6D74A062166373B400D70B8F /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
46 | 6D74A063166373B400D70B8F /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
47 | 6D74A064166373B400D70B8F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
48 | 6D74A0741663744900D70B8F /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = SOURCE_ROOT; };
49 | 6D74A0791663745B00D70B8F /* en-GB */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "en-GB"; path = "en-GB.lproj/InfoPlist.strings"; sourceTree = SOURCE_ROOT; };
50 | 6D74A07B1663747100D70B8F /* RMSharedUserDefaults.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RMSharedUserDefaults.h; sourceTree = SOURCE_ROOT; };
51 | 6D74A07C1663747100D70B8F /* RMSharedUserDefaults.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RMSharedUserDefaults.m; sourceTree = SOURCE_ROOT; };
52 | /* End PBXFileReference section */
53 |
54 | /* Begin PBXFrameworksBuildPhase section */
55 | 6D74A058166373B400D70B8F /* Frameworks */ = {
56 | isa = PBXFrameworksBuildPhase;
57 | buildActionMask = 2147483647;
58 | files = (
59 | 6D74A060166373B400D70B8F /* Cocoa.framework in Frameworks */,
60 | 6D3B5F2A166377EA00BE3CB8 /* Security.framework in Frameworks */,
61 | );
62 | runOnlyForDeploymentPostprocessing = 0;
63 | };
64 | /* End PBXFrameworksBuildPhase section */
65 |
66 | /* Begin PBXGroup section */
67 | 6D3B5F2B1663788200BE3CB8 /* Categories */ = {
68 | isa = PBXGroup;
69 | children = (
70 | 6D3B5F25166377C300BE3CB8 /* NSURL+RMApplicationGroup.h */,
71 | 6D3B5F26166377C300BE3CB8 /* NSURL+RMApplicationGroup.m */,
72 | 6D3B5F2C166378B600BE3CB8 /* NSObject+RMSubclassSupport.h */,
73 | 6D3B5F2D166378B600BE3CB8 /* NSObject+RMSubclassSupport.m */,
74 | );
75 | name = Categories;
76 | sourceTree = "";
77 | };
78 | 6D5026A71666609400321B02 /* Helpers */ = {
79 | isa = PBXGroup;
80 | children = (
81 | 6D5026A9166665C800321B02 /* RMCoalescingOperation.h */,
82 | 6D5026AA166665C800321B02 /* RMCoalescingOperation.m */,
83 | 6D5028421667BB0500321B02 /* RMPlistEncoding.h */,
84 | 6D5028431667BB0500321B02 /* RMPlistEncoding.m */,
85 | );
86 | name = Helpers;
87 | sourceTree = "";
88 | };
89 | 6D74A050166373B400D70B8F = {
90 | isa = PBXGroup;
91 | children = (
92 | 6D74A065166373B400D70B8F /* RMSharedPreferences */,
93 | 6D74A05E166373B400D70B8F /* Frameworks */,
94 | 6D74A05D166373B400D70B8F /* Products */,
95 | );
96 | sourceTree = "";
97 | };
98 | 6D74A05D166373B400D70B8F /* Products */ = {
99 | isa = PBXGroup;
100 | children = (
101 | 6D74A05C166373B400D70B8F /* RMSharedPreferences.framework */,
102 | );
103 | name = Products;
104 | sourceTree = "";
105 | };
106 | 6D74A05E166373B400D70B8F /* Frameworks */ = {
107 | isa = PBXGroup;
108 | children = (
109 | 6D74A05F166373B400D70B8F /* Cocoa.framework */,
110 | 6D3B5F29166377EA00BE3CB8 /* Security.framework */,
111 | 6D74A061166373B400D70B8F /* Other Frameworks */,
112 | );
113 | name = Frameworks;
114 | sourceTree = "";
115 | };
116 | 6D74A061166373B400D70B8F /* Other Frameworks */ = {
117 | isa = PBXGroup;
118 | children = (
119 | 6D74A062166373B400D70B8F /* AppKit.framework */,
120 | 6D74A063166373B400D70B8F /* CoreData.framework */,
121 | 6D74A064166373B400D70B8F /* Foundation.framework */,
122 | );
123 | name = "Other Frameworks";
124 | sourceTree = "";
125 | };
126 | 6D74A065166373B400D70B8F /* RMSharedPreferences */ = {
127 | isa = PBXGroup;
128 | children = (
129 | 6D74A07B1663747100D70B8F /* RMSharedUserDefaults.h */,
130 | 6D74A07C1663747100D70B8F /* RMSharedUserDefaults.m */,
131 | 6D3B5F2B1663788200BE3CB8 /* Categories */,
132 | 6D5026A71666609400321B02 /* Helpers */,
133 | 6D74A07F166374C700D70B8F /* Other Sources */,
134 | 6D74A066166373B500D70B8F /* Supporting Files */,
135 | );
136 | name = RMSharedPreferences;
137 | path = RMSharedUserDefaults;
138 | sourceTree = "";
139 | };
140 | 6D74A066166373B500D70B8F /* Supporting Files */ = {
141 | isa = PBXGroup;
142 | children = (
143 | 6D74A0741663744900D70B8F /* Info.plist */,
144 | 6D74A0781663745B00D70B8F /* InfoPlist.strings */,
145 | );
146 | name = "Supporting Files";
147 | sourceTree = "";
148 | };
149 | 6D74A07F166374C700D70B8F /* Other Sources */ = {
150 | isa = PBXGroup;
151 | children = (
152 | 6D3B5F1D1663771500BE3CB8 /* RMSharedPreferences.h */,
153 | 6D3B5F1E1663771500BE3CB8 /* RMSharedPreferences.m */,
154 | 6D3B5F211663776F00BE3CB8 /* SharedPreferences-Constants.h */,
155 | 6D3B5F221663776F00BE3CB8 /* SharedPreferences-Constants.m */,
156 | );
157 | name = "Other Sources";
158 | sourceTree = "";
159 | };
160 | /* End PBXGroup section */
161 |
162 | /* Begin PBXHeadersBuildPhase section */
163 | 6D74A059166373B400D70B8F /* Headers */ = {
164 | isa = PBXHeadersBuildPhase;
165 | buildActionMask = 2147483647;
166 | files = (
167 | 6D74A07D1663747100D70B8F /* RMSharedUserDefaults.h in Headers */,
168 | 6D3B5F1F1663771500BE3CB8 /* RMSharedPreferences.h in Headers */,
169 | 6D3B5F231663776F00BE3CB8 /* SharedPreferences-Constants.h in Headers */,
170 | 6D3B5F27166377C300BE3CB8 /* NSURL+RMApplicationGroup.h in Headers */,
171 | 6D3B5F2E166378B600BE3CB8 /* NSObject+RMSubclassSupport.h in Headers */,
172 | 6D5026AB166665C800321B02 /* RMCoalescingOperation.h in Headers */,
173 | 6D5028441667BB0500321B02 /* RMPlistEncoding.h in Headers */,
174 | );
175 | runOnlyForDeploymentPostprocessing = 0;
176 | };
177 | /* End PBXHeadersBuildPhase section */
178 |
179 | /* Begin PBXNativeTarget section */
180 | 6D74A05B166373B400D70B8F /* RMSharedPreferences */ = {
181 | isa = PBXNativeTarget;
182 | buildConfigurationList = 6D74A071166373B500D70B8F /* Build configuration list for PBXNativeTarget "RMSharedPreferences" */;
183 | buildPhases = (
184 | 6D74A057166373B400D70B8F /* Sources */,
185 | 6D74A058166373B400D70B8F /* Frameworks */,
186 | 6D74A059166373B400D70B8F /* Headers */,
187 | 6D74A05A166373B400D70B8F /* Resources */,
188 | );
189 | buildRules = (
190 | );
191 | dependencies = (
192 | );
193 | name = RMSharedPreferences;
194 | productName = RMSharedUserDefaults;
195 | productReference = 6D74A05C166373B400D70B8F /* RMSharedPreferences.framework */;
196 | productType = "com.apple.product-type.framework";
197 | };
198 | /* End PBXNativeTarget section */
199 |
200 | /* Begin PBXProject section */
201 | 6D74A052166373B400D70B8F /* Project object */ = {
202 | isa = PBXProject;
203 | attributes = {
204 | LastUpgradeCheck = 0450;
205 | ORGANIZATIONNAME = "Realmac Software";
206 | };
207 | buildConfigurationList = 6D74A055166373B400D70B8F /* Build configuration list for PBXProject "RMSharedPreferences" */;
208 | compatibilityVersion = "Xcode 3.2";
209 | developmentRegion = en-GB;
210 | hasScannedForEncodings = 0;
211 | knownRegions = (
212 | en,
213 | "en-GB",
214 | );
215 | mainGroup = 6D74A050166373B400D70B8F;
216 | productRefGroup = 6D74A05D166373B400D70B8F /* Products */;
217 | projectDirPath = "";
218 | projectRoot = "";
219 | targets = (
220 | 6D74A05B166373B400D70B8F /* RMSharedPreferences */,
221 | );
222 | };
223 | /* End PBXProject section */
224 |
225 | /* Begin PBXResourcesBuildPhase section */
226 | 6D74A05A166373B400D70B8F /* Resources */ = {
227 | isa = PBXResourcesBuildPhase;
228 | buildActionMask = 2147483647;
229 | files = (
230 | 6D74A07A1663745B00D70B8F /* InfoPlist.strings in Resources */,
231 | );
232 | runOnlyForDeploymentPostprocessing = 0;
233 | };
234 | /* End PBXResourcesBuildPhase section */
235 |
236 | /* Begin PBXSourcesBuildPhase section */
237 | 6D74A057166373B400D70B8F /* Sources */ = {
238 | isa = PBXSourcesBuildPhase;
239 | buildActionMask = 2147483647;
240 | files = (
241 | 6D74A07E1663747100D70B8F /* RMSharedUserDefaults.m in Sources */,
242 | 6D3B5F201663771500BE3CB8 /* RMSharedPreferences.m in Sources */,
243 | 6D3B5F241663776F00BE3CB8 /* SharedPreferences-Constants.m in Sources */,
244 | 6D3B5F28166377C300BE3CB8 /* NSURL+RMApplicationGroup.m in Sources */,
245 | 6D3B5F2F166378B600BE3CB8 /* NSObject+RMSubclassSupport.m in Sources */,
246 | 6D5026AC166665C800321B02 /* RMCoalescingOperation.m in Sources */,
247 | 6D5028451667BB0500321B02 /* RMPlistEncoding.m in Sources */,
248 | );
249 | runOnlyForDeploymentPostprocessing = 0;
250 | };
251 | /* End PBXSourcesBuildPhase section */
252 |
253 | /* Begin PBXVariantGroup section */
254 | 6D74A0781663745B00D70B8F /* InfoPlist.strings */ = {
255 | isa = PBXVariantGroup;
256 | children = (
257 | 6D74A0791663745B00D70B8F /* en-GB */,
258 | );
259 | name = InfoPlist.strings;
260 | sourceTree = "";
261 | };
262 | /* End PBXVariantGroup section */
263 |
264 | /* Begin XCBuildConfiguration section */
265 | 6D74A06F166373B500D70B8F /* Debug */ = {
266 | isa = XCBuildConfiguration;
267 | buildSettings = {
268 | ALWAYS_SEARCH_USER_PATHS = NO;
269 | ARCHS = "$(ARCHS_STANDARD_64_BIT)";
270 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
271 | CLANG_CXX_LIBRARY = "libc++";
272 | CLANG_ENABLE_OBJC_ARC = YES;
273 | CLANG_WARN_EMPTY_BODY = YES;
274 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
275 | COPY_PHASE_STRIP = NO;
276 | GCC_C_LANGUAGE_STANDARD = gnu99;
277 | GCC_DYNAMIC_NO_PIC = NO;
278 | GCC_ENABLE_OBJC_EXCEPTIONS = YES;
279 | GCC_OPTIMIZATION_LEVEL = 0;
280 | GCC_PREPROCESSOR_DEFINITIONS = (
281 | "DEBUG=1",
282 | "$(inherited)",
283 | );
284 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
285 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
286 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
287 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
288 | GCC_WARN_UNUSED_VARIABLE = YES;
289 | MACOSX_DEPLOYMENT_TARGET = 10.8;
290 | ONLY_ACTIVE_ARCH = YES;
291 | SDKROOT = macosx;
292 | WARNING_CFLAGS = "-Wall";
293 | };
294 | name = Debug;
295 | };
296 | 6D74A070166373B500D70B8F /* Release */ = {
297 | isa = XCBuildConfiguration;
298 | buildSettings = {
299 | ALWAYS_SEARCH_USER_PATHS = NO;
300 | ARCHS = "$(ARCHS_STANDARD_64_BIT)";
301 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
302 | CLANG_CXX_LIBRARY = "libc++";
303 | CLANG_ENABLE_OBJC_ARC = YES;
304 | CLANG_WARN_EMPTY_BODY = YES;
305 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
306 | COPY_PHASE_STRIP = YES;
307 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
308 | GCC_C_LANGUAGE_STANDARD = gnu99;
309 | GCC_ENABLE_OBJC_EXCEPTIONS = YES;
310 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
311 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
312 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
313 | GCC_WARN_UNUSED_VARIABLE = YES;
314 | MACOSX_DEPLOYMENT_TARGET = 10.8;
315 | SDKROOT = macosx;
316 | WARNING_CFLAGS = "-Wall";
317 | };
318 | name = Release;
319 | };
320 | 6D74A072166373B500D70B8F /* Debug */ = {
321 | isa = XCBuildConfiguration;
322 | buildSettings = {
323 | COMBINE_HIDPI_IMAGES = YES;
324 | DYLIB_COMPATIBILITY_VERSION = 1;
325 | DYLIB_CURRENT_VERSION = 1;
326 | FRAMEWORK_VERSION = A;
327 | INFOPLIST_FILE = Info.plist;
328 | INSTALL_PATH = "@rpath/";
329 | PRODUCT_NAME = RMSharedPreferences;
330 | SKIP_INSTALL = YES;
331 | WRAPPER_EXTENSION = framework;
332 | };
333 | name = Debug;
334 | };
335 | 6D74A073166373B500D70B8F /* Release */ = {
336 | isa = XCBuildConfiguration;
337 | buildSettings = {
338 | COMBINE_HIDPI_IMAGES = YES;
339 | DYLIB_COMPATIBILITY_VERSION = 1;
340 | DYLIB_CURRENT_VERSION = 1;
341 | FRAMEWORK_VERSION = A;
342 | INFOPLIST_FILE = Info.plist;
343 | INSTALL_PATH = "@rpath/";
344 | PRODUCT_NAME = RMSharedPreferences;
345 | SKIP_INSTALL = YES;
346 | WRAPPER_EXTENSION = framework;
347 | };
348 | name = Release;
349 | };
350 | /* End XCBuildConfiguration section */
351 |
352 | /* Begin XCConfigurationList section */
353 | 6D74A055166373B400D70B8F /* Build configuration list for PBXProject "RMSharedPreferences" */ = {
354 | isa = XCConfigurationList;
355 | buildConfigurations = (
356 | 6D74A06F166373B500D70B8F /* Debug */,
357 | 6D74A070166373B500D70B8F /* Release */,
358 | );
359 | defaultConfigurationIsVisible = 0;
360 | defaultConfigurationName = Release;
361 | };
362 | 6D74A071166373B500D70B8F /* Build configuration list for PBXNativeTarget "RMSharedPreferences" */ = {
363 | isa = XCConfigurationList;
364 | buildConfigurations = (
365 | 6D74A072166373B500D70B8F /* Debug */,
366 | 6D74A073166373B500D70B8F /* Release */,
367 | );
368 | defaultConfigurationIsVisible = 0;
369 | defaultConfigurationName = Release;
370 | };
371 | /* End XCConfigurationList section */
372 | };
373 | rootObject = 6D74A052166373B400D70B8F /* Project object */;
374 | }
375 |
--------------------------------------------------------------------------------
/Externals/RMSharedPreferences/RMSharedUserDefaults.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2012 Realmac Software Ltd
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject
10 | // to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
19 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
20 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | //
23 |
24 | #import
25 |
26 | @interface RMSharedUserDefaults : NSUserDefaults
27 |
28 | + (RMSharedUserDefaults *)standardUserDefaults;
29 |
30 | /*!
31 | \brief
32 | Designated initializer.
33 |
34 | \params
35 | applicationGroupIdentifier: the identifier for the application group the user defaults should target.
36 | You can pass nil to retrieve the default group container identifier. Throws an exception if no default identifier can be retrieved.
37 | */
38 | - (id)initWithApplicationGroupIdentifier:(NSString *)applicationGroupIdentifier;
39 |
40 | @end
41 |
42 | extern NSString * const RMSharedUserDefaultsDidChangeDefaultNameKey;
43 | extern NSString * const RMSharedUserDefaultsDidChangeDefaulValueKey;
44 |
--------------------------------------------------------------------------------
/Externals/RMSharedPreferences/RMSharedUserDefaults.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2012 Realmac Software Ltd
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject
10 | // to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
19 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
20 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | //
23 |
24 | #import "RMSharedUserDefaults.h"
25 |
26 | #import "RMCoalescingOperation.h"
27 | #import "RMPlistEncoding.h"
28 |
29 | #import "NSURL+RMApplicationGroup.h"
30 | #import "NSObject+RMSubclassSupport.h"
31 |
32 | NSString * const RMSharedUserDefaultsDidChangeDefaultNameKey = @"RMSharedUserDefaultsDidChangeDefaultNameKey";
33 | NSString * const RMSharedUserDefaultsDidChangeDefaulValueKey = @"RMSharedUserDefaultsDidChangeDefaulValueKey";
34 |
35 | @interface RMSharedUserDefaults ()
36 |
37 | @property (readonly, copy, nonatomic) NSURL *userDefaultsDictionaryLocation;
38 |
39 | @property (strong, nonatomic) NSDictionary *userDefaultsDictionary;
40 |
41 | @property (strong, nonatomic) NSMutableDictionary *updatedUserDefaultsDictionary;
42 | @property (strong, nonatomic) NSMutableDictionary *registeredUserDefaultsDictionary;
43 |
44 | @property (readonly, strong, nonatomic) NSRecursiveLock *accessorLock;
45 | @property (readonly, strong, nonatomic) NSLock *synchronizeLock;
46 |
47 | @property (readonly, strong, nonatomic) NSOperationQueue *fileCoordinationOperationQueue;
48 | @property (readonly, strong, nonatomic) NSOperationQueue *synchronizationQueue;
49 |
50 | @property (weak, nonatomic) RMCoalescingOperation *lastSynchronizationOperation;
51 |
52 | @end
53 |
54 | @implementation RMSharedUserDefaults
55 |
56 | + (RMSharedUserDefaults *)standardUserDefaults
57 | {
58 | static RMSharedUserDefaults *_standardUserDefaults = nil;
59 | static dispatch_once_t onceToken = 0;
60 | dispatch_once(&onceToken, ^ {
61 | _standardUserDefaults = [[self alloc] initWithApplicationGroupIdentifier:nil];
62 | });
63 | return _standardUserDefaults;
64 | }
65 |
66 | + (void)resetStandardUserDefaults
67 | {
68 | RMSharedUserDefaults *userDefaults = [self standardUserDefaults];
69 | [userDefaults synchronize];
70 | [[userDefaults userDefaultsDictionary] enumerateKeysAndObjectsUsingBlock:^ (NSString *defaultName, id value, BOOL *stop) {
71 | [userDefaults removeObjectForKey:defaultName];
72 | }];
73 | }
74 |
75 | - (id)initWithApplicationGroupIdentifier:(NSString *)applicationGroupIdentifier
76 | {
77 | self = [super initWithUser:nil];
78 | if (self == nil) {
79 | return nil;
80 | }
81 |
82 | NSURL *applicationGroupLocation = [NSURL containerURLForSecurityApplicationGroupIdentifier:applicationGroupIdentifier];
83 | if (applicationGroupLocation == nil) {
84 | @throw [NSException exceptionWithName:NSInternalInconsistencyException reason:@"A default application group identifier cannot be found in the entitlements" userInfo:nil];
85 | return nil;
86 | }
87 |
88 | NSURL *applicationGroupPreferencesLocation = [applicationGroupLocation URLByAppendingPathComponent:@"Preferences"];
89 | [[NSFileManager defaultManager] createDirectoryAtURL:applicationGroupPreferencesLocation withIntermediateDirectories:YES attributes:nil error:NULL];
90 |
91 | NSString *userDefaultsDictionaryFileName = applicationGroupIdentifier ? : [NSURL defaultGroupContainerIdentifier];
92 | _userDefaultsDictionaryLocation = [[applicationGroupPreferencesLocation URLByAppendingPathComponent:userDefaultsDictionaryFileName] URLByAppendingPathExtension:@"plist"];
93 |
94 | _updatedUserDefaultsDictionary = [NSMutableDictionary dictionary];
95 | _registeredUserDefaultsDictionary = [NSMutableDictionary dictionary];
96 |
97 | _accessorLock = [[NSRecursiveLock alloc] init];
98 | _synchronizeLock = [[NSLock alloc] init];
99 |
100 | NSString *queuePrefixName = [applicationGroupIdentifier stringByAppendingFormat:@".sharedpreferences"];
101 |
102 | _fileCoordinationOperationQueue = [[NSOperationQueue alloc] init];
103 | [_fileCoordinationOperationQueue setName:[queuePrefixName stringByAppendingFormat:@".filecoordination"]];
104 |
105 | _synchronizationQueue = [[NSOperationQueue alloc] init];
106 | [_synchronizationQueue setMaxConcurrentOperationCount:1];
107 | [_synchronizationQueue setName:[queuePrefixName stringByAppendingFormat:@".synchronization"]];
108 |
109 | [self _synchronize];
110 |
111 | [NSFileCoordinator addFilePresenter:self];
112 |
113 | return self;
114 | }
115 |
116 | - (id)initWithUser:(NSString *)username
117 | {
118 | return [self initWithApplicationGroupIdentifier:nil];
119 | }
120 |
121 | - (void)dealloc
122 | {
123 | [NSFileCoordinator removeFilePresenter:self];
124 | }
125 |
126 | #pragma mark - Accessors
127 |
128 | - (id)objectForKey:(NSString *)defaultName
129 | {
130 | __block id object = nil;
131 |
132 | [self _lock:[self accessorLock] criticalSection:^ {
133 | object = [self updatedUserDefaultsDictionary][defaultName];
134 | if (object != nil) {
135 | return;
136 | }
137 | object = [self userDefaultsDictionary][defaultName];
138 | if (object != nil) {
139 | return;
140 | }
141 | object = [self registeredUserDefaultsDictionary][defaultName];
142 | }];
143 |
144 | return object;
145 | }
146 |
147 | - (void)setObject:(id)object forKey:(NSString *)defaultName
148 | {
149 | if (object != nil && ![RMPlistEncoding canEncodeObject:object]) {
150 | @throw [NSException exceptionWithName:NSInvalidArgumentException reason:@"Attempt to insert non-property value" userInfo:nil];
151 | return;
152 | }
153 |
154 | object = object ? : [NSNull null];
155 |
156 | [self _lock:[self accessorLock] criticalSection:^ {
157 | [self willChangeValueForKey:defaultName];
158 | [[self updatedUserDefaultsDictionary] setObject:object forKey:defaultName];
159 | [self didChangeValueForKey:defaultName];
160 | }];
161 |
162 | [self _notifyChangeForDefaultName:defaultName value:object];
163 |
164 | [self _setNeedsSynchronizing];
165 | }
166 |
167 | - (void)removeObjectForKey:(NSString *)defaultName
168 | {
169 | [self setObject:nil forKey:defaultName];
170 | }
171 |
172 | #pragma mark - Public
173 |
174 | - (NSDictionary *)dictionaryRepresentation
175 | {
176 | __block NSDictionary *dictionaryRepresentation = nil;
177 |
178 | [self _lock:[self accessorLock] criticalSection:^ {
179 | dictionaryRepresentation = [NSDictionary dictionaryWithDictionary:[self userDefaultsDictionary]];
180 | }];
181 |
182 | return dictionaryRepresentation;
183 | }
184 |
185 | - (void)registerDefaults:(NSDictionary *)registrationDictionary
186 | {
187 | [self _lock:[self accessorLock] criticalSection:^ {
188 | [[self registeredUserDefaultsDictionary] addEntriesFromDictionary:registrationDictionary];
189 | }];
190 | }
191 |
192 | - (BOOL)synchronize
193 | {
194 | RMCoalescingOperation *synchronizationOperation = [RMCoalescingOperation coalescingOperationWithBlock:^ {
195 | [self _synchronize];
196 | }];
197 |
198 | __block RMCoalescingOperation *lastSynchronizationOperation = nil;
199 |
200 | [self _lock:[self synchronizeLock] criticalSection:^ {
201 | lastSynchronizationOperation = [self lastSynchronizationOperation];
202 | [self setLastSynchronizationOperation:synchronizationOperation];
203 | }];
204 |
205 | [lastSynchronizationOperation waitUntilFinished];
206 | [synchronizationOperation main];
207 |
208 | return YES;
209 | }
210 |
211 | #pragma mark - Synchronization
212 |
213 | - (void)_setNeedsSynchronizing
214 | {
215 | [self _lock:[self synchronizeLock] criticalSection:^ {
216 | RMCoalescingOperation *lastSynchronizationOperation = [self lastSynchronizationOperation];
217 |
218 | void (^synchronizationBlock)(void) = ^ {
219 | [self _synchronizeWithNotifyingQueue:[NSOperationQueue mainQueue]];
220 | };
221 | if (lastSynchronizationOperation != nil && [lastSynchronizationOperation replaceBlock:synchronizationBlock]) {
222 | return;
223 | }
224 |
225 | RMCoalescingOperation *synchronizationOperation = [RMCoalescingOperation coalescingOperationWithBlock:synchronizationBlock];
226 |
227 | if (lastSynchronizationOperation != nil) {
228 | [synchronizationOperation addDependency:lastSynchronizationOperation];
229 | }
230 | [self setLastSynchronizationOperation:synchronizationOperation];
231 |
232 | [[self synchronizationQueue] addOperation:synchronizationOperation];
233 |
234 | [[NSProcessInfo processInfo] disableSuddenTermination];
235 |
236 | NSOperation *enabledSuddenTermination = [NSBlockOperation blockOperationWithBlock:^ {
237 | [[NSProcessInfo processInfo] enableSuddenTermination];
238 | }];
239 | [enabledSuddenTermination addDependency:synchronizationOperation];
240 | [[[NSOperationQueue alloc] init] addOperation:enabledSuddenTermination];
241 | }];
242 | }
243 |
244 | - (void)_synchronize
245 | {
246 | return [self _synchronizeWithNotifyingQueue:nil];
247 | }
248 |
249 | - (void)_synchronizeWithNotifyingQueue:(NSOperationQueue *)notifyingQueue
250 | {
251 | /*
252 | Synchronize current updates with disk, get an up-to-date view of the world.
253 | */
254 | __block NSDictionary *updatedUserDefaultsDictionary = nil;
255 |
256 | [self _lock:[self accessorLock] criticalSection:^ {
257 | updatedUserDefaultsDictionary = [NSDictionary dictionaryWithDictionary:[self updatedUserDefaultsDictionary]];
258 | }];
259 |
260 | NSDictionary *userDefaultsDictionary = [self __coordinatedSynchronizeToDisk:updatedUserDefaultsDictionary];
261 |
262 | /*
263 | Find updates to be applied between the actual defaults and the up-to-date one.
264 | */
265 | __block NSDictionary *userDefaultsUpdates = nil;
266 |
267 | [self _lock:[self accessorLock] criticalSection:^ {
268 | userDefaultsUpdates = [self __userDefaultsUpdates:userDefaultsDictionary updatedUserDefaultsDictionary:updatedUserDefaultsDictionary];
269 | }];
270 |
271 | /*
272 | Apply the updates, notify and set up the new baseline.
273 | */
274 | NSOperation *updatesApplyingOperation = [NSBlockOperation blockOperationWithBlock:^ {
275 | [self _lock:[self accessorLock] criticalSection:^ {
276 | [self __applyBaselineAndNotify:userDefaultsDictionary updates:userDefaultsUpdates];
277 | }];
278 | }];
279 |
280 | if (notifyingQueue != nil) {
281 | [notifyingQueue addOperation:updatesApplyingOperation];
282 | }
283 | else {
284 | [updatesApplyingOperation start];
285 | }
286 |
287 | [updatesApplyingOperation waitUntilFinished];
288 | }
289 |
290 | - (NSDictionary *)__coordinatedSynchronizeToDisk:(NSDictionary *)userDefaultsUpdatesDictionary
291 | {
292 | NSFileCoordinator *fileCoordinator = [[NSFileCoordinator alloc] initWithFilePresenter:self];
293 |
294 | __block NSDictionary *userDefaultsDictionary = nil;
295 |
296 | [fileCoordinator coordinateWritingItemAtURL:[self userDefaultsDictionaryLocation] options:NSFileCoordinatorWritingForMerging error:NULL byAccessor:^ (NSURL *userDefaultsDictionaryLocation) {
297 | userDefaultsDictionary = [self __synchronizeToDisk:userDefaultsUpdatesDictionary atLocation:userDefaultsDictionaryLocation];
298 | }];
299 |
300 | return userDefaultsDictionary;
301 | }
302 |
303 | /*!
304 | \brief
305 | Takes a dictionary of locally updated user defaults. Returns an up-to-date dictionary of user defaults after merging on-disk and local data.
306 | */
307 | - (NSDictionary *)__synchronizeToDisk:(NSDictionary *)userDefaultsUpdatesDictionary atLocation:(NSURL *)userDefaultsDictionaryLocation
308 | {
309 | /*
310 | Get the current user defaults as saved on disk
311 | */
312 | NSData *onDiskUserDefaultsData = [NSData dataWithContentsOfURL:userDefaultsDictionaryLocation options:(NSDataReadingOptions)0 error:NULL];
313 |
314 | id onDiskUserDefaults = (onDiskUserDefaultsData != nil) ? [NSPropertyListSerialization propertyListWithData:onDiskUserDefaultsData options:NSPropertyListImmutable format:NULL error:NULL] : nil;
315 | NSDictionary *onDiskUserDefaultsDictionary = ([onDiskUserDefaults isKindOfClass:[NSDictionary class]] ? onDiskUserDefaults : nil);
316 |
317 | NSDictionary *userDefaultsDictionary = [NSDictionary dictionaryWithDictionary:onDiskUserDefaultsDictionary];
318 |
319 | /*
320 | Update with the local values, if needed
321 | */
322 | userDefaultsDictionary = [self _dictionary:userDefaultsDictionary byApplyingChanges:userDefaultsUpdatesDictionary];
323 |
324 | /*
325 | If there are no local updates and we already have a file on disk, simply return the up-to-date on-disk defaults
326 | */
327 | if (([userDefaultsUpdatesDictionary count] == 0) && (onDiskUserDefaults != nil)) {
328 | return userDefaultsDictionary;
329 | }
330 |
331 | /*
332 | Safely replace the plist on disk
333 | */
334 | NSData *userDefaultsDictionaryData = [NSPropertyListSerialization dataWithPropertyList:userDefaultsDictionary format:NSPropertyListXMLFormat_v1_0 options:(NSPropertyListWriteOptions)0 error:NULL];
335 | if (userDefaultsDictionaryData == nil) {
336 | return nil;
337 | }
338 |
339 | BOOL write = [userDefaultsDictionaryData writeToURL:userDefaultsDictionaryLocation options:NSDataWritingAtomic error:NULL];
340 | if (!write) {
341 | return nil;
342 | }
343 |
344 | return userDefaultsDictionary;
345 | }
346 |
347 | - (NSDictionary *)__userDefaultsUpdates:(NSDictionary *)userDefaultsDictionary updatedUserDefaultsDictionary:(NSDictionary *)updatedUserDefaultsDictionary
348 | {
349 | NSMutableDictionary *userDefaultsChanges = [NSMutableDictionary dictionary];
350 |
351 | NSSet *userDefaultsUpdatesFromDisk = [self _keyDiffsBetweenDictionaries:userDefaultsDictionary :[self userDefaultsDictionary]];
352 |
353 | [userDefaultsUpdatesFromDisk enumerateObjectsUsingBlock:^ (NSString *defaultName, BOOL *stop) {
354 | id value = userDefaultsDictionary[defaultName] ? : [NSNull null];
355 | [userDefaultsChanges setObject:value forKey:defaultName];
356 | }];
357 |
358 | [userDefaultsChanges addEntriesFromDictionary:updatedUserDefaultsDictionary];
359 |
360 | return userDefaultsChanges;
361 | }
362 |
363 | - (void)__applyBaselineAndNotify:(NSDictionary *)userDefaultsDictionary updates:(NSDictionary *)userDefaultsChanges
364 | {
365 | NSMutableDictionary *mutableUserDefaultsDictionary = [NSMutableDictionary dictionaryWithDictionary:userDefaultsDictionary];
366 | [self setUserDefaultsDictionary:mutableUserDefaultsDictionary];
367 |
368 | NSMutableDictionary *mutableUpdatedUserDefaultsDictionary = [self updatedUserDefaultsDictionary];
369 |
370 | [userDefaultsChanges enumerateKeysAndObjectsUsingBlock:^ (NSString *defaultName, id value, BOOL *stop) {
371 | id currentValue = [mutableUpdatedUserDefaultsDictionary objectForKey:defaultName];
372 |
373 | /*
374 | The value of the updated key has been mutated since we acquired it.
375 | It will be picked up at the next synchronisation loop.
376 | */
377 | if (currentValue != nil && ![currentValue isEqual:value]) {
378 | return;
379 | }
380 |
381 | /*
382 | The default has been updated locally meaning notifications have already been posted.
383 | */
384 | if (currentValue != nil) {
385 | [mutableUpdatedUserDefaultsDictionary removeObjectForKey:defaultName];
386 | return;
387 | }
388 |
389 | /*
390 | Update and notify
391 | */
392 | [self willChangeValueForKey:defaultName];
393 | [mutableUserDefaultsDictionary setObject:value forKey:defaultName];
394 | [self didChangeValueForKey:defaultName];
395 |
396 | [self _notifyChangeForDefaultName:defaultName value:value];
397 | }];
398 | }
399 |
400 | #pragma mark - Notify
401 |
402 | - (void)_notifyChangeForDefaultName:(NSString *)defaultName value:(id)value
403 | {
404 | NSDictionary *userInfo = @{
405 | RMSharedUserDefaultsDidChangeDefaultNameKey : defaultName,
406 | RMSharedUserDefaultsDidChangeDefaulValueKey : value,
407 | };
408 | [[NSNotificationCenter defaultCenter] postNotificationName:NSUserDefaultsDidChangeNotification object:self userInfo:userInfo];
409 | }
410 |
411 | #pragma mark - Helpers
412 |
413 | - (NSSet *)_keyDiffsBetweenDictionaries:(NSDictionary *)dictionary1 :(NSDictionary *)dictionary2
414 | {
415 | NSMutableSet *updatedKeys = [NSMutableSet set];
416 |
417 | [dictionary1 enumerateKeysAndObjectsUsingBlock:^ (id key, id object, BOOL *stop) {
418 | if (![[dictionary2 objectForKey:key] isEqual:object]) {
419 | [updatedKeys addObject:key];
420 | }
421 | }];
422 |
423 | [dictionary2 enumerateKeysAndObjectsUsingBlock:^ (id key, id object, BOOL *stop) {
424 | if (![[dictionary1 objectForKey:key] isEqual:object]) {
425 | [updatedKeys addObject:key];
426 | }
427 | }];
428 |
429 | return updatedKeys;
430 | }
431 |
432 | - (NSDictionary *)_dictionary:(NSDictionary *)dictionary byApplyingChanges:(NSDictionary *)changes
433 | {
434 | NSMutableDictionary *newDictionary = [NSMutableDictionary dictionaryWithDictionary:dictionary];
435 |
436 | [changes enumerateKeysAndObjectsUsingBlock:^ (id key, id object, BOOL *stop) {
437 | if ([object isEqual:[NSNull null]]) {
438 | [newDictionary removeObjectForKey:key];
439 | return;
440 | }
441 | [newDictionary setObject:object forKey:key];
442 | }];
443 |
444 | return newDictionary;
445 | }
446 |
447 | - (void)_lock:(id )lock criticalSection:(void (^)(void))criticalSection
448 | {
449 | [lock lock];
450 | criticalSection();
451 | [lock unlock];
452 | }
453 |
454 | #pragma mark - NSFilePresenter
455 |
456 | - (NSURL *)presentedItemURL
457 | {
458 | return [self userDefaultsDictionaryLocation];
459 | }
460 |
461 | - (NSOperationQueue *)presentedItemOperationQueue
462 | {
463 | return [self fileCoordinationOperationQueue];
464 | }
465 |
466 | - (void)presentedItemDidChange
467 | {
468 | [self _setNeedsSynchronizing];
469 | }
470 |
471 | @end
472 |
473 | #pragma mark -
474 |
475 | @implementation RMSharedUserDefaults (RMNotSupportedOverrides)
476 |
477 | - (void)addSuiteNamed:(NSString *)suiteName
478 | {
479 | [self subclassDoesNotSupportSelector:_cmd];
480 | }
481 |
482 | - (void)removeSuiteNamed:(NSString *)suiteName
483 | {
484 | [self subclassDoesNotSupportSelector:_cmd];
485 | }
486 |
487 | - (NSArray *)volatileDomainNames
488 | {
489 | return nil;
490 | }
491 |
492 | - (NSDictionary *)volatileDomainForName:(NSString *)domainName
493 | {
494 | return nil;
495 | }
496 |
497 | - (void)setVolatileDomain:(NSDictionary *)domain forName:(NSString *)domainName
498 | {
499 | [self subclassDoesNotSupportSelector:_cmd];
500 | }
501 |
502 | - (void)removeVolatileDomainForName:(NSString *)domainName
503 | {
504 | [self subclassDoesNotSupportSelector:_cmd];
505 | }
506 |
507 | - (NSArray *)persistentDomainNames
508 | {
509 | return nil;
510 | }
511 |
512 | - (NSDictionary *)persistentDomainForName:(NSString *)domainName
513 | {
514 | return nil;
515 | }
516 |
517 | - (void)setPersistentDomain:(NSDictionary *)domain forName:(NSString *)domainName
518 | {
519 | [self subclassDoesNotSupportSelector:_cmd];
520 | }
521 |
522 | - (void)removePersistentDomainForName:(NSString *)domainName
523 | {
524 | [self subclassDoesNotSupportSelector:_cmd];
525 | }
526 |
527 | - (BOOL)objectIsForcedForKey:(NSString *)key
528 | {
529 | return NO;
530 | }
531 |
532 | - (BOOL)objectIsForcedForKey:(NSString *)key inDomain:(NSString *)domain
533 | {
534 | return NO;
535 | }
536 |
537 | @end
538 |
--------------------------------------------------------------------------------
/Externals/RMSharedPreferences/SharedPreferences-Constants.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2012 Realmac Software Ltd
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject
10 | // to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
19 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
20 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | //
23 |
24 | #import
25 |
26 | extern NSString * const EMBSharedPreferencesBundleIdentifier;
27 |
--------------------------------------------------------------------------------
/Externals/RMSharedPreferences/SharedPreferences-Constants.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2012 Realmac Software Ltd
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject
10 | // to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
19 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
20 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | //
23 |
24 | #import "SharedPreferences-Constants.h"
25 |
26 | NSString * const EMBSharedPreferencesBundleIdentifier = @"com.realmacsoftware.rmsharedpreferences";
27 |
--------------------------------------------------------------------------------
/Externals/RMSharedPreferences/en-GB.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2012 Realmac Software Ltd
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject
10 | // to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
19 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
20 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | //
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # RMSharedPreferences
2 |
3 | RMSharedUserDefaults is an NSUserDefaults subclass that supports shared user defaults because multiple sandboxed applications in the same application group.
4 |
5 | RMSharedUserDefaults makes use of file coordination to offer coordinated access to a preferences file and change notifications across multiple processes.
6 |
7 | It is available as a framework `RMSharedPreferences.framework` to make it easy to plug in to any project.
8 |
9 | See this [post](http://realmacsoftware.com/blog/shared-preferences-between-sandboxed-applications) on the Realmac Software blog for more details.
10 |
11 | ## Sample application
12 |
13 | A sample application showing `RMSharedUserDefaults` in action is provided.
14 | It is compounded of a Main and a Helper target, both being applications. Main is precisely the main application and Helper is a helper application, bundled with the main one under `Contents/Library/LoginItems`.
15 | Both applications are sandboxed and use the same group identifier for `com.apple.security.application-groups` entitlement (which mean they share a common folder outside of their sandbox under `~/Library/Group Containers/XYZABC1234.com.realmacsoftware.dts.sharedpreferences)`.
16 |
17 | Each application has a very simple UI with a single `NSTextField` that is bound, in one way or another to a value in `RMSharedUserDefaults` for a given default key.
18 | The main application also has a couple of buttons to launch and kill the helper application by using the `SMLoginItemSetEnabled` function from the ServiceManagement framework. This is not actually required and the helper application could well be launched on its own. It just makes things easier!
19 |
20 | In order to fully demonstrate the ease of use of `RMSharedUserDefaults`, both applications observe the user default changes in a slightly different way:
21 |
22 | - The main application creates an `NSUserDefaultsController` instance with `[RMSharedUserDefaults standardUserDefaults]` and binds the text field value to the appropriate default key in Interface Builder.
23 | - The helper application observes for `NSUserDefaultsDidChangeNotification` notifications on `[RMSharedUserDefaults standardUserDefaults]` and appropriately updates the text field’s value by inspecting the userInfo dictionary and interfering the changed value.
24 |
25 | When clicking the Save button (or simply hitting Return in the text field) will set the user default’s value and trigger a sync. As you can see, the value in the text field is kept in sync between both applications.
26 |
27 | ## Notes
28 |
29 | It is important noting that even though persisted user defaults are shared between applications, registered defaults are not written to disk and are therefore local to each application.
30 | Similarly to `NSUserDefaults` they are also not persisted across launches.
31 |
32 | ```
33 | - (void)registerDefaults:(NSDictionary *)registrationDictionary;
34 | ```
35 |
36 | Also, the following methods from `NSUserDefaults` are not supported in `RMSharedUserDefaults`.
37 |
38 | ```
39 | - (void)addSuiteNamed:(NSString *)suiteName;
40 | - (void)removeSuiteNamed:(NSString *)suiteName;
41 |
42 | - (NSArray *)volatileDomainNames;
43 | - (NSDictionary *)volatileDomainForName:(NSString *)domainName;
44 | - (void)setVolatileDomain:(NSDictionary *)domain forName:(NSString *)domainName;
45 | - (void)removeVolatileDomainForName:(NSString *)domainName;
46 |
47 | - (NSArray *)persistentDomainNames;
48 | - (NSDictionary *)persistentDomainForName:(NSString *)domainName;
49 | - (void)setPersistentDomain:(NSDictionary *)domain forName:(NSString *)domainName;
50 | - (void)removePersistentDomainForName:(NSString *)domainName;
51 |
52 | - (BOOL)objectIsForcedForKey:(NSString *)key;
53 | - (BOOL)objectIsForcedForKey:(NSString *)key inDomain:(NSString *)domain;
54 | ```
55 |
56 | Getters will return `nil`, `0` or `NO` based on the return type and setters will throw an exception.
57 |
58 | ## Requirements
59 |
60 | - OS X 10.8.0 or above
61 | - LLVM Compiler 4.0 and above
62 |
63 | Both the framework and the sample application use ARC.
64 |
65 | ## Contact
66 |
67 | Please contact [Damien](mailto:damien@realmacsoftware.com) regarding this project.
68 |
69 | ## License
70 |
71 | See the LICENSE file for more info.
--------------------------------------------------------------------------------
/Sample Application/Helper/Helper-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | com.realmacsoftware.dts.sharedpreferences.helper
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSMinimumSystemVersion
26 | ${MACOSX_DEPLOYMENT_TARGET}
27 | NSHumanReadableCopyright
28 | Copyright © 2012 Realmac Software. All rights reserved.
29 | NSMainNibFile
30 | HelperMenu
31 | NSPrincipalClass
32 | NSApplication
33 |
34 |
35 |
--------------------------------------------------------------------------------
/Sample Application/Helper/Helper.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.application-groups
8 |
9 | XYZABC1234.com.realmacsoftware.dts.sharedpreferences
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Sample Application/Helper/RMHelperAppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2012 Realmac Software Ltd
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject
10 | // to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
19 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
20 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | //
23 |
24 | #import
25 |
26 | @interface RMHelperAppDelegate : NSObject
27 |
28 | @property (assign) IBOutlet NSWindow *window;
29 |
30 | @property (assign, nonatomic) IBOutlet NSTextField *textField;
31 | - (IBAction)saveText:(id)sender;
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/Sample Application/Helper/RMHelperAppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2012 Realmac Software Ltd
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject
10 | // to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
19 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
20 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | //
23 |
24 | #import "RMHelperAppDelegate.h"
25 |
26 | #import "RMSharedPreferences/RMSharedPreferences.h"
27 |
28 | #import "SharedPreferences-Constants.h"
29 |
30 | @implementation RMHelperAppDelegate
31 |
32 | - (void)applicationDidFinishLaunching:(NSNotification *)notification
33 | {
34 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(preferencesDidUpdate:) name:NSUserDefaultsDidChangeNotification object:[RMSharedUserDefaults standardUserDefaults]];
35 |
36 | [self _updateTextField:[[RMSharedUserDefaults standardUserDefaults] stringForKey:RMSharedPreferencesSomeTextDefaultKey]];
37 |
38 | [[self textField] setTarget:self];
39 | [[self textField] setAction:@selector(saveText:)];
40 | }
41 |
42 | - (void)preferencesDidUpdate:(NSNotification *)notification
43 | {
44 | NSString *defaultName = [notification userInfo][RMSharedUserDefaultsDidChangeDefaultNameKey];
45 |
46 | if ([defaultName isEqualToString:RMSharedPreferencesSomeTextDefaultKey]) {
47 | NSString *text = [notification userInfo][RMSharedUserDefaultsDidChangeDefaulValueKey];
48 | [self _updateTextField:text];
49 | }
50 | }
51 |
52 | - (IBAction)saveText:(id)sender
53 | {
54 | [[RMSharedUserDefaults standardUserDefaults] setObject:[[self textField] stringValue] forKey:RMSharedPreferencesSomeTextDefaultKey];
55 | }
56 |
57 | - (void)_updateTextField:(NSString *)text
58 | {
59 | if (text == nil) {
60 | return;
61 | }
62 | [[self textField] setStringValue:text];
63 | }
64 |
65 | @end
66 |
--------------------------------------------------------------------------------
/Sample Application/Helper/en.lproj/Credits.rtf:
--------------------------------------------------------------------------------
1 | {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
2 | {\colortbl;\red255\green255\blue255;}
3 | \paperw9840\paperh8400
4 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
5 |
6 | \f0\b\fs24 \cf0 Engineering:
7 | \b0 \
8 | Some people\
9 | \
10 |
11 | \b Human Interface Design:
12 | \b0 \
13 | Some other people\
14 | \
15 |
16 | \b Testing:
17 | \b0 \
18 | Hopefully not nobody\
19 | \
20 |
21 | \b Documentation:
22 | \b0 \
23 | Whoever\
24 | \
25 |
26 | \b With special thanks to:
27 | \b0 \
28 | Mom\
29 | }
30 |
--------------------------------------------------------------------------------
/Sample Application/Helper/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/Sample Application/Helper/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2012 Realmac Software Ltd
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject
10 | // to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
19 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
20 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | //
23 |
24 | #import
25 |
26 | int main(int argc, char **argv)
27 | {
28 | return NSApplicationMain(argc, (const char **)argv);
29 | }
30 |
--------------------------------------------------------------------------------
/Sample Application/Main/Main-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | com.realmacsoftware.dts.sharedpreferences
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSMinimumSystemVersion
26 | ${MACOSX_DEPLOYMENT_TARGET}
27 | NSHumanReadableCopyright
28 | Copyright © 2012 Realmac Software. All rights reserved.
29 | NSMainNibFile
30 | MainMenu
31 | NSPrincipalClass
32 | NSApplication
33 |
34 |
35 |
--------------------------------------------------------------------------------
/Sample Application/Main/Main.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.application-groups
8 |
9 | XYZABC1234.com.realmacsoftware.dts.sharedpreferences
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Sample Application/Main/RMMainAppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2012 Realmac Software Ltd
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject
10 | // to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
19 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
20 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | //
23 |
24 | #import
25 |
26 | @interface RMMainAppDelegate : NSObject
27 |
28 | @property (assign) IBOutlet NSWindow *window;
29 |
30 | - (IBAction)startHelperApplication:(id)sender;
31 | - (IBAction)killHelperApplication:(id)sender;
32 |
33 | @property (assign, nonatomic) IBOutlet NSTextField *textField;
34 |
35 | - (IBAction)saveText:(id)sender;
36 |
37 | @property (strong, nonatomic) NSUserDefaultsController *userDefaultsController;
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/Sample Application/Main/RMMainAppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2012 Realmac Software Ltd
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject
10 | // to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
19 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
20 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | //
23 |
24 | #import "RMMainAppDelegate.h"
25 |
26 | #import
27 |
28 | #import "RMSharedPreferences/RMSharedPreferences.h"
29 |
30 | #import "SharedPreferences-Constants.h"
31 |
32 | static NSString * const RMSharedPreferencesHelperBundleIdentifier = @"com.realmacsoftware.dts.sharedpreferences.helper";
33 |
34 | @implementation RMMainAppDelegate
35 |
36 | - (void)applicationDidFinishLaunching:(NSNotification *)notification
37 | {
38 | NSUserDefaultsController *userDefaultsController = [[NSUserDefaultsController alloc] initWithDefaults:[RMSharedUserDefaults standardUserDefaults] initialValues:nil];
39 | [self setUserDefaultsController:userDefaultsController];
40 | }
41 |
42 | - (void)applicationWillTerminate:(NSNotification *)notification
43 | {
44 | [self _setHelperApplicationEnabled:NO];
45 | }
46 |
47 | - (IBAction)startHelperApplication:(id)sender
48 | {
49 | [self _setHelperApplicationEnabled:YES];
50 | }
51 |
52 | - (IBAction)killHelperApplication:(id)sender
53 | {
54 | [self _setHelperApplicationEnabled:NO];
55 | }
56 |
57 | - (void)_setHelperApplicationEnabled:(BOOL)enabled
58 | {
59 | SMLoginItemSetEnabled((__bridge CFStringRef)RMSharedPreferencesHelperBundleIdentifier, (Boolean)enabled);
60 | }
61 |
62 | - (IBAction)saveText:(id)sender
63 | {
64 | [[RMSharedUserDefaults standardUserDefaults] setObject:[[self textField] stringValue] forKey:RMSharedPreferencesSomeTextDefaultKey];
65 | }
66 |
67 | @end
68 |
--------------------------------------------------------------------------------
/Sample Application/Main/en.lproj/Credits.rtf:
--------------------------------------------------------------------------------
1 | {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
2 | {\colortbl;\red255\green255\blue255;}
3 | \paperw9840\paperh8400
4 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
5 |
6 | \f0\b\fs24 \cf0 Engineering:
7 | \b0 \
8 | Some people\
9 | \
10 |
11 | \b Human Interface Design:
12 | \b0 \
13 | Some other people\
14 | \
15 |
16 | \b Testing:
17 | \b0 \
18 | Hopefully not nobody\
19 | \
20 |
21 | \b Documentation:
22 | \b0 \
23 | Whoever\
24 | \
25 |
26 | \b With special thanks to:
27 | \b0 \
28 | Mom\
29 | }
30 |
--------------------------------------------------------------------------------
/Sample Application/Main/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/Sample Application/Main/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2012 Realmac Software Ltd
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject
10 | // to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
19 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
20 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | //
23 |
24 | #import
25 |
26 | int main(int argc, char **argv)
27 | {
28 | return NSApplicationMain(argc, (const char **)argv);
29 | }
30 |
--------------------------------------------------------------------------------
/Sample Application/SharedPreferences-Constants.h:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2012 Realmac Software Ltd
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject
10 | // to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
19 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
20 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | //
23 |
24 | #import
25 |
26 | extern NSString * const RMSharedPreferencesSomeTextDefaultKey;
27 |
--------------------------------------------------------------------------------
/Sample Application/SharedPreferences-Constants.m:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2012 Realmac Software Ltd
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining
5 | // a copy of this software and associated documentation files (the
6 | // "Software"), to deal in the Software without restriction, including
7 | // without limitation the rights to use, copy, modify, merge, publish,
8 | // distribute, sublicense, and/or sell copies of the Software, and to
9 | // permit persons to whom the Software is furnished to do so, subject
10 | // to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be
13 | // included in all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
19 | // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
20 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | //
23 |
24 | #import "SharedPreferences-Constants.h"
25 |
26 | NSString * const RMSharedPreferencesSomeTextDefaultKey = @"SomeText";
27 |
--------------------------------------------------------------------------------
/Sample Application/SharedPreferences.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 6D5029311667CBEE00321B02 /* SharedPreferences-Constants.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D5029301667CBEE00321B02 /* SharedPreferences-Constants.m */; };
11 | 6D5029321667CBEE00321B02 /* SharedPreferences-Constants.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D5029301667CBEE00321B02 /* SharedPreferences-Constants.m */; };
12 | 6DE2E07F165EC72400DE9405 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DE2E07E165EC72400DE9405 /* Cocoa.framework */; };
13 | 6DE2E0A1165EC73D00DE9405 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DE2E07E165EC72400DE9405 /* Cocoa.framework */; };
14 | 6DE2E0A7165EC73D00DE9405 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6DE2E0A5165EC73D00DE9405 /* InfoPlist.strings */; };
15 | 6DE2E0A9165EC73D00DE9405 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DE2E0A8165EC73D00DE9405 /* main.m */; };
16 | 6DE2E0AD165EC73D00DE9405 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 6DE2E0AB165EC73D00DE9405 /* Credits.rtf */; };
17 | 6DE2E0B0165EC73D00DE9405 /* RMHelperAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DE2E0AF165EC73D00DE9405 /* RMHelperAppDelegate.m */; };
18 | 6DE2E0B3165EC73D00DE9405 /* HelperMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6DE2E0B1165EC73D00DE9405 /* HelperMenu.xib */; };
19 | 6DE2E0C6165EC93600DE9405 /* Helper.app in Copy Helper */ = {isa = PBXBuildFile; fileRef = 6DE2E09F165EC73D00DE9405 /* Helper.app */; };
20 | 6DE2E0C8165EC9EF00DE9405 /* ServiceManagement.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DE2E0C7165EC9EF00DE9405 /* ServiceManagement.framework */; };
21 | 6DE69E78166E5C2700415303 /* RMMainAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DE69E77166E5C2700415303 /* RMMainAppDelegate.m */; };
22 | 6DE69E7B166E5C2F00415303 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6DE69E79166E5C2F00415303 /* MainMenu.xib */; };
23 | 6DE69E81166E5C5C00415303 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DE69E7E166E5C5C00415303 /* main.m */; };
24 | 6DE69E84166E5C8200415303 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6DE69E82166E5C8200415303 /* InfoPlist.strings */; };
25 | 6DE69E87166E5C9000415303 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 6DE69E85166E5C9000415303 /* Credits.rtf */; };
26 | 6DE69EF8166F676B00415303 /* RMSharedPreferences.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DE69EF6166F676500415303 /* RMSharedPreferences.framework */; };
27 | 6DE69EF9166F677200415303 /* RMSharedPreferences.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DE69EF6166F676500415303 /* RMSharedPreferences.framework */; };
28 | 6DE69EFE166F678F00415303 /* RMSharedPreferences.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 6DE69EF6166F676500415303 /* RMSharedPreferences.framework */; };
29 | /* End PBXBuildFile section */
30 |
31 | /* Begin PBXContainerItemProxy section */
32 | 6DE2E0C3165EC90200DE9405 /* PBXContainerItemProxy */ = {
33 | isa = PBXContainerItemProxy;
34 | containerPortal = 6DE2E071165EC72400DE9405 /* Project object */;
35 | proxyType = 1;
36 | remoteGlobalIDString = 6DE2E09E165EC73D00DE9405;
37 | remoteInfo = Helper;
38 | };
39 | 6DE69EF5166F676500415303 /* PBXContainerItemProxy */ = {
40 | isa = PBXContainerItemProxy;
41 | containerPortal = 6DE69EEE166F676500415303 /* RMSharedPreferences.xcodeproj */;
42 | proxyType = 2;
43 | remoteGlobalIDString = 6D74A05C166373B400D70B8F;
44 | remoteInfo = RMSharedPreferences;
45 | };
46 | 6DE69EFA166F677B00415303 /* PBXContainerItemProxy */ = {
47 | isa = PBXContainerItemProxy;
48 | containerPortal = 6DE69EEE166F676500415303 /* RMSharedPreferences.xcodeproj */;
49 | proxyType = 1;
50 | remoteGlobalIDString = 6D74A05B166373B400D70B8F;
51 | remoteInfo = RMSharedPreferences;
52 | };
53 | 6DE69EFC166F678500415303 /* PBXContainerItemProxy */ = {
54 | isa = PBXContainerItemProxy;
55 | containerPortal = 6DE69EEE166F676500415303 /* RMSharedPreferences.xcodeproj */;
56 | proxyType = 1;
57 | remoteGlobalIDString = 6D74A05B166373B400D70B8F;
58 | remoteInfo = RMSharedPreferences;
59 | };
60 | /* End PBXContainerItemProxy section */
61 |
62 | /* Begin PBXCopyFilesBuildPhase section */
63 | 6D3B605016637C4C00BE3CB8 /* Copy Frameworks */ = {
64 | isa = PBXCopyFilesBuildPhase;
65 | buildActionMask = 2147483647;
66 | dstPath = "";
67 | dstSubfolderSpec = 10;
68 | files = (
69 | 6DE69EFE166F678F00415303 /* RMSharedPreferences.framework in Copy Frameworks */,
70 | );
71 | name = "Copy Frameworks";
72 | runOnlyForDeploymentPostprocessing = 0;
73 | };
74 | 6DE2E0C5165EC91700DE9405 /* Copy Helper */ = {
75 | isa = PBXCopyFilesBuildPhase;
76 | buildActionMask = 2147483647;
77 | dstPath = Contents/Library/LoginItems;
78 | dstSubfolderSpec = 1;
79 | files = (
80 | 6DE2E0C6165EC93600DE9405 /* Helper.app in Copy Helper */,
81 | );
82 | name = "Copy Helper";
83 | runOnlyForDeploymentPostprocessing = 0;
84 | };
85 | /* End PBXCopyFilesBuildPhase section */
86 |
87 | /* Begin PBXFileReference section */
88 | 6D50292F1667CBEE00321B02 /* SharedPreferences-Constants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SharedPreferences-Constants.h"; sourceTree = ""; };
89 | 6D5029301667CBEE00321B02 /* SharedPreferences-Constants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "SharedPreferences-Constants.m"; sourceTree = ""; };
90 | 6DE2E07A165EC72400DE9405 /* Main.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Main.app; sourceTree = BUILT_PRODUCTS_DIR; };
91 | 6DE2E07E165EC72400DE9405 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
92 | 6DE2E081165EC72400DE9405 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
93 | 6DE2E082165EC72400DE9405 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
94 | 6DE2E083165EC72400DE9405 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
95 | 6DE2E09F165EC73D00DE9405 /* Helper.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Helper.app; sourceTree = BUILT_PRODUCTS_DIR; };
96 | 6DE2E0A4165EC73D00DE9405 /* Helper-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Helper-Info.plist"; sourceTree = ""; };
97 | 6DE2E0A6165EC73D00DE9405 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
98 | 6DE2E0A8165EC73D00DE9405 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
99 | 6DE2E0AC165EC73D00DE9405 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; };
100 | 6DE2E0AE165EC73D00DE9405 /* RMHelperAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RMHelperAppDelegate.h; sourceTree = ""; };
101 | 6DE2E0AF165EC73D00DE9405 /* RMHelperAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RMHelperAppDelegate.m; sourceTree = ""; };
102 | 6DE2E0B2165EC73D00DE9405 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/HelperMenu.xib; sourceTree = ""; };
103 | 6DE2E0BD165EC7F100DE9405 /* Helper.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = Helper.entitlements; sourceTree = ""; };
104 | 6DE2E0C7165EC9EF00DE9405 /* ServiceManagement.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ServiceManagement.framework; path = System/Library/Frameworks/ServiceManagement.framework; sourceTree = SDKROOT; };
105 | 6DE69E76166E5C2700415303 /* RMMainAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RMMainAppDelegate.h; path = Main/RMMainAppDelegate.h; sourceTree = SOURCE_ROOT; };
106 | 6DE69E77166E5C2700415303 /* RMMainAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RMMainAppDelegate.m; path = Main/RMMainAppDelegate.m; sourceTree = SOURCE_ROOT; };
107 | 6DE69E7A166E5C2F00415303 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = Main/en.lproj/MainMenu.xib; sourceTree = SOURCE_ROOT; };
108 | 6DE69E7C166E5C5C00415303 /* Main-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "Main-Info.plist"; path = "Main/Main-Info.plist"; sourceTree = SOURCE_ROOT; };
109 | 6DE69E7D166E5C5C00415303 /* Main.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = Main.entitlements; path = Main/Main.entitlements; sourceTree = SOURCE_ROOT; };
110 | 6DE69E7E166E5C5C00415303 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Main/main.m; sourceTree = SOURCE_ROOT; };
111 | 6DE69E83166E5C8200415303 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Main/en.lproj/InfoPlist.strings; sourceTree = SOURCE_ROOT; };
112 | 6DE69E86166E5C9000415303 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = Main/en.lproj/Credits.rtf; sourceTree = SOURCE_ROOT; };
113 | 6DE69EEE166F676500415303 /* RMSharedPreferences.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RMSharedPreferences.xcodeproj; path = ../Externals/RMSharedPreferences/RMSharedPreferences.xcodeproj; sourceTree = ""; };
114 | /* End PBXFileReference section */
115 |
116 | /* Begin PBXFrameworksBuildPhase section */
117 | 6DE2E077165EC72400DE9405 /* Frameworks */ = {
118 | isa = PBXFrameworksBuildPhase;
119 | buildActionMask = 2147483647;
120 | files = (
121 | 6DE2E07F165EC72400DE9405 /* Cocoa.framework in Frameworks */,
122 | 6DE2E0C8165EC9EF00DE9405 /* ServiceManagement.framework in Frameworks */,
123 | 6DE69EF8166F676B00415303 /* RMSharedPreferences.framework in Frameworks */,
124 | );
125 | runOnlyForDeploymentPostprocessing = 0;
126 | };
127 | 6DE2E09C165EC73D00DE9405 /* Frameworks */ = {
128 | isa = PBXFrameworksBuildPhase;
129 | buildActionMask = 2147483647;
130 | files = (
131 | 6DE2E0A1165EC73D00DE9405 /* Cocoa.framework in Frameworks */,
132 | 6DE69EF9166F677200415303 /* RMSharedPreferences.framework in Frameworks */,
133 | );
134 | runOnlyForDeploymentPostprocessing = 0;
135 | };
136 | /* End PBXFrameworksBuildPhase section */
137 |
138 | /* Begin PBXGroup section */
139 | 6D3B604316637C2500BE3CB8 /* Externals */ = {
140 | isa = PBXGroup;
141 | children = (
142 | 6DE69EEE166F676500415303 /* RMSharedPreferences.xcodeproj */,
143 | );
144 | name = Externals;
145 | sourceTree = "";
146 | };
147 | 6DE2E06F165EC72400DE9405 = {
148 | isa = PBXGroup;
149 | children = (
150 | 6D50292F1667CBEE00321B02 /* SharedPreferences-Constants.h */,
151 | 6D5029301667CBEE00321B02 /* SharedPreferences-Constants.m */,
152 | 6DE2E084165EC72400DE9405 /* Main */,
153 | 6DE2E0A2165EC73D00DE9405 /* Helper */,
154 | 6D3B604316637C2500BE3CB8 /* Externals */,
155 | 6DE2E07D165EC72400DE9405 /* Frameworks */,
156 | 6DE2E07B165EC72400DE9405 /* Products */,
157 | );
158 | sourceTree = "";
159 | };
160 | 6DE2E07B165EC72400DE9405 /* Products */ = {
161 | isa = PBXGroup;
162 | children = (
163 | 6DE2E07A165EC72400DE9405 /* Main.app */,
164 | 6DE2E09F165EC73D00DE9405 /* Helper.app */,
165 | );
166 | name = Products;
167 | sourceTree = "";
168 | };
169 | 6DE2E07D165EC72400DE9405 /* Frameworks */ = {
170 | isa = PBXGroup;
171 | children = (
172 | 6DE2E07E165EC72400DE9405 /* Cocoa.framework */,
173 | 6DE2E0C7165EC9EF00DE9405 /* ServiceManagement.framework */,
174 | 6DE2E080165EC72400DE9405 /* Other Frameworks */,
175 | );
176 | name = Frameworks;
177 | sourceTree = "";
178 | };
179 | 6DE2E080165EC72400DE9405 /* Other Frameworks */ = {
180 | isa = PBXGroup;
181 | children = (
182 | 6DE2E081165EC72400DE9405 /* AppKit.framework */,
183 | 6DE2E082165EC72400DE9405 /* CoreData.framework */,
184 | 6DE2E083165EC72400DE9405 /* Foundation.framework */,
185 | );
186 | name = "Other Frameworks";
187 | sourceTree = "";
188 | };
189 | 6DE2E084165EC72400DE9405 /* Main */ = {
190 | isa = PBXGroup;
191 | children = (
192 | 6DE69E76166E5C2700415303 /* RMMainAppDelegate.h */,
193 | 6DE69E77166E5C2700415303 /* RMMainAppDelegate.m */,
194 | 6DE69E79166E5C2F00415303 /* MainMenu.xib */,
195 | 6DE2E085165EC72400DE9405 /* Supporting Files */,
196 | );
197 | name = Main;
198 | path = SharedPreferences;
199 | sourceTree = "";
200 | };
201 | 6DE2E085165EC72400DE9405 /* Supporting Files */ = {
202 | isa = PBXGroup;
203 | children = (
204 | 6DE69E7C166E5C5C00415303 /* Main-Info.plist */,
205 | 6DE69E82166E5C8200415303 /* InfoPlist.strings */,
206 | 6DE69E7D166E5C5C00415303 /* Main.entitlements */,
207 | 6DE69E7E166E5C5C00415303 /* main.m */,
208 | 6DE69E85166E5C9000415303 /* Credits.rtf */,
209 | );
210 | name = "Supporting Files";
211 | sourceTree = "";
212 | };
213 | 6DE2E0A2165EC73D00DE9405 /* Helper */ = {
214 | isa = PBXGroup;
215 | children = (
216 | 6DE2E0AE165EC73D00DE9405 /* RMHelperAppDelegate.h */,
217 | 6DE2E0AF165EC73D00DE9405 /* RMHelperAppDelegate.m */,
218 | 6DE2E0B1165EC73D00DE9405 /* HelperMenu.xib */,
219 | 6DE2E0A3165EC73D00DE9405 /* Supporting Files */,
220 | );
221 | path = Helper;
222 | sourceTree = "";
223 | };
224 | 6DE2E0A3165EC73D00DE9405 /* Supporting Files */ = {
225 | isa = PBXGroup;
226 | children = (
227 | 6DE2E0A4165EC73D00DE9405 /* Helper-Info.plist */,
228 | 6DE2E0A5165EC73D00DE9405 /* InfoPlist.strings */,
229 | 6DE2E0BD165EC7F100DE9405 /* Helper.entitlements */,
230 | 6DE2E0A8165EC73D00DE9405 /* main.m */,
231 | 6DE2E0AB165EC73D00DE9405 /* Credits.rtf */,
232 | );
233 | name = "Supporting Files";
234 | sourceTree = "";
235 | };
236 | 6DE69EEF166F676500415303 /* Products */ = {
237 | isa = PBXGroup;
238 | children = (
239 | 6DE69EF6166F676500415303 /* RMSharedPreferences.framework */,
240 | );
241 | name = Products;
242 | sourceTree = "";
243 | };
244 | /* End PBXGroup section */
245 |
246 | /* Begin PBXNativeTarget section */
247 | 6DE2E079165EC72400DE9405 /* Main */ = {
248 | isa = PBXNativeTarget;
249 | buildConfigurationList = 6DE2E098165EC72400DE9405 /* Build configuration list for PBXNativeTarget "Main" */;
250 | buildPhases = (
251 | 6DE2E076165EC72400DE9405 /* Sources */,
252 | 6DE2E077165EC72400DE9405 /* Frameworks */,
253 | 6DE2E078165EC72400DE9405 /* Resources */,
254 | 6D3B605016637C4C00BE3CB8 /* Copy Frameworks */,
255 | 6DE2E0C5165EC91700DE9405 /* Copy Helper */,
256 | );
257 | buildRules = (
258 | );
259 | dependencies = (
260 | 6DE69EFD166F678500415303 /* PBXTargetDependency */,
261 | 6DE2E0C4165EC90200DE9405 /* PBXTargetDependency */,
262 | );
263 | name = Main;
264 | productName = SharedPreferences;
265 | productReference = 6DE2E07A165EC72400DE9405 /* Main.app */;
266 | productType = "com.apple.product-type.application";
267 | };
268 | 6DE2E09E165EC73D00DE9405 /* Helper */ = {
269 | isa = PBXNativeTarget;
270 | buildConfigurationList = 6DE2E0B4165EC73D00DE9405 /* Build configuration list for PBXNativeTarget "Helper" */;
271 | buildPhases = (
272 | 6DE2E09B165EC73D00DE9405 /* Sources */,
273 | 6DE2E09C165EC73D00DE9405 /* Frameworks */,
274 | 6DE2E09D165EC73D00DE9405 /* Resources */,
275 | );
276 | buildRules = (
277 | );
278 | dependencies = (
279 | 6DE69EFB166F677B00415303 /* PBXTargetDependency */,
280 | );
281 | name = Helper;
282 | productName = Helper;
283 | productReference = 6DE2E09F165EC73D00DE9405 /* Helper.app */;
284 | productType = "com.apple.product-type.application";
285 | };
286 | /* End PBXNativeTarget section */
287 |
288 | /* Begin PBXProject section */
289 | 6DE2E071165EC72400DE9405 /* Project object */ = {
290 | isa = PBXProject;
291 | attributes = {
292 | CLASSPREFIX = RM;
293 | LastUpgradeCheck = 0450;
294 | ORGANIZATIONNAME = "Realmac Software";
295 | };
296 | buildConfigurationList = 6DE2E074165EC72400DE9405 /* Build configuration list for PBXProject "SharedPreferences" */;
297 | compatibilityVersion = "Xcode 3.2";
298 | developmentRegion = English;
299 | hasScannedForEncodings = 0;
300 | knownRegions = (
301 | en,
302 | );
303 | mainGroup = 6DE2E06F165EC72400DE9405;
304 | productRefGroup = 6DE2E07B165EC72400DE9405 /* Products */;
305 | projectDirPath = "";
306 | projectReferences = (
307 | {
308 | ProductGroup = 6DE69EEF166F676500415303 /* Products */;
309 | ProjectRef = 6DE69EEE166F676500415303 /* RMSharedPreferences.xcodeproj */;
310 | },
311 | );
312 | projectRoot = "";
313 | targets = (
314 | 6DE2E079165EC72400DE9405 /* Main */,
315 | 6DE2E09E165EC73D00DE9405 /* Helper */,
316 | );
317 | };
318 | /* End PBXProject section */
319 |
320 | /* Begin PBXReferenceProxy section */
321 | 6DE69EF6166F676500415303 /* RMSharedPreferences.framework */ = {
322 | isa = PBXReferenceProxy;
323 | fileType = wrapper.framework;
324 | path = RMSharedPreferences.framework;
325 | remoteRef = 6DE69EF5166F676500415303 /* PBXContainerItemProxy */;
326 | sourceTree = BUILT_PRODUCTS_DIR;
327 | };
328 | /* End PBXReferenceProxy section */
329 |
330 | /* Begin PBXResourcesBuildPhase section */
331 | 6DE2E078165EC72400DE9405 /* Resources */ = {
332 | isa = PBXResourcesBuildPhase;
333 | buildActionMask = 2147483647;
334 | files = (
335 | 6DE69E7B166E5C2F00415303 /* MainMenu.xib in Resources */,
336 | 6DE69E84166E5C8200415303 /* InfoPlist.strings in Resources */,
337 | 6DE69E87166E5C9000415303 /* Credits.rtf in Resources */,
338 | );
339 | runOnlyForDeploymentPostprocessing = 0;
340 | };
341 | 6DE2E09D165EC73D00DE9405 /* Resources */ = {
342 | isa = PBXResourcesBuildPhase;
343 | buildActionMask = 2147483647;
344 | files = (
345 | 6DE2E0A7165EC73D00DE9405 /* InfoPlist.strings in Resources */,
346 | 6DE2E0AD165EC73D00DE9405 /* Credits.rtf in Resources */,
347 | 6DE2E0B3165EC73D00DE9405 /* HelperMenu.xib in Resources */,
348 | );
349 | runOnlyForDeploymentPostprocessing = 0;
350 | };
351 | /* End PBXResourcesBuildPhase section */
352 |
353 | /* Begin PBXSourcesBuildPhase section */
354 | 6DE2E076165EC72400DE9405 /* Sources */ = {
355 | isa = PBXSourcesBuildPhase;
356 | buildActionMask = 2147483647;
357 | files = (
358 | 6D5029311667CBEE00321B02 /* SharedPreferences-Constants.m in Sources */,
359 | 6DE69E78166E5C2700415303 /* RMMainAppDelegate.m in Sources */,
360 | 6DE69E81166E5C5C00415303 /* main.m in Sources */,
361 | );
362 | runOnlyForDeploymentPostprocessing = 0;
363 | };
364 | 6DE2E09B165EC73D00DE9405 /* Sources */ = {
365 | isa = PBXSourcesBuildPhase;
366 | buildActionMask = 2147483647;
367 | files = (
368 | 6DE2E0A9165EC73D00DE9405 /* main.m in Sources */,
369 | 6DE2E0B0165EC73D00DE9405 /* RMHelperAppDelegate.m in Sources */,
370 | 6D5029321667CBEE00321B02 /* SharedPreferences-Constants.m in Sources */,
371 | );
372 | runOnlyForDeploymentPostprocessing = 0;
373 | };
374 | /* End PBXSourcesBuildPhase section */
375 |
376 | /* Begin PBXTargetDependency section */
377 | 6DE2E0C4165EC90200DE9405 /* PBXTargetDependency */ = {
378 | isa = PBXTargetDependency;
379 | target = 6DE2E09E165EC73D00DE9405 /* Helper */;
380 | targetProxy = 6DE2E0C3165EC90200DE9405 /* PBXContainerItemProxy */;
381 | };
382 | 6DE69EFB166F677B00415303 /* PBXTargetDependency */ = {
383 | isa = PBXTargetDependency;
384 | name = RMSharedPreferences;
385 | targetProxy = 6DE69EFA166F677B00415303 /* PBXContainerItemProxy */;
386 | };
387 | 6DE69EFD166F678500415303 /* PBXTargetDependency */ = {
388 | isa = PBXTargetDependency;
389 | name = RMSharedPreferences;
390 | targetProxy = 6DE69EFC166F678500415303 /* PBXContainerItemProxy */;
391 | };
392 | /* End PBXTargetDependency section */
393 |
394 | /* Begin PBXVariantGroup section */
395 | 6DE2E0A5165EC73D00DE9405 /* InfoPlist.strings */ = {
396 | isa = PBXVariantGroup;
397 | children = (
398 | 6DE2E0A6165EC73D00DE9405 /* en */,
399 | );
400 | name = InfoPlist.strings;
401 | sourceTree = "";
402 | };
403 | 6DE2E0AB165EC73D00DE9405 /* Credits.rtf */ = {
404 | isa = PBXVariantGroup;
405 | children = (
406 | 6DE2E0AC165EC73D00DE9405 /* en */,
407 | );
408 | name = Credits.rtf;
409 | sourceTree = "";
410 | };
411 | 6DE2E0B1165EC73D00DE9405 /* HelperMenu.xib */ = {
412 | isa = PBXVariantGroup;
413 | children = (
414 | 6DE2E0B2165EC73D00DE9405 /* en */,
415 | );
416 | name = HelperMenu.xib;
417 | sourceTree = "";
418 | };
419 | 6DE69E79166E5C2F00415303 /* MainMenu.xib */ = {
420 | isa = PBXVariantGroup;
421 | children = (
422 | 6DE69E7A166E5C2F00415303 /* en */,
423 | );
424 | name = MainMenu.xib;
425 | sourceTree = "";
426 | };
427 | 6DE69E82166E5C8200415303 /* InfoPlist.strings */ = {
428 | isa = PBXVariantGroup;
429 | children = (
430 | 6DE69E83166E5C8200415303 /* en */,
431 | );
432 | name = InfoPlist.strings;
433 | sourceTree = "";
434 | };
435 | 6DE69E85166E5C9000415303 /* Credits.rtf */ = {
436 | isa = PBXVariantGroup;
437 | children = (
438 | 6DE69E86166E5C9000415303 /* en */,
439 | );
440 | name = Credits.rtf;
441 | sourceTree = "";
442 | };
443 | /* End PBXVariantGroup section */
444 |
445 | /* Begin XCBuildConfiguration section */
446 | 6DE2E096165EC72400DE9405 /* Debug */ = {
447 | isa = XCBuildConfiguration;
448 | buildSettings = {
449 | ALWAYS_SEARCH_USER_PATHS = NO;
450 | ARCHS = "$(ARCHS_STANDARD_64_BIT)";
451 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
452 | CLANG_CXX_LIBRARY = "libc++";
453 | CLANG_ENABLE_OBJC_ARC = YES;
454 | CLANG_WARN_EMPTY_BODY = YES;
455 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
456 | COPY_PHASE_STRIP = NO;
457 | GCC_C_LANGUAGE_STANDARD = gnu99;
458 | GCC_DYNAMIC_NO_PIC = NO;
459 | GCC_ENABLE_OBJC_EXCEPTIONS = YES;
460 | GCC_OPTIMIZATION_LEVEL = 0;
461 | GCC_PREPROCESSOR_DEFINITIONS = (
462 | "DEBUG=1",
463 | "$(inherited)",
464 | );
465 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
466 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
467 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
468 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
469 | GCC_WARN_UNUSED_VARIABLE = YES;
470 | MACOSX_DEPLOYMENT_TARGET = 10.8;
471 | ONLY_ACTIVE_ARCH = YES;
472 | SDKROOT = macosx;
473 | WARNING_CFLAGS = "-Wall";
474 | };
475 | name = Debug;
476 | };
477 | 6DE2E097165EC72400DE9405 /* Release */ = {
478 | isa = XCBuildConfiguration;
479 | buildSettings = {
480 | ALWAYS_SEARCH_USER_PATHS = NO;
481 | ARCHS = "$(ARCHS_STANDARD_64_BIT)";
482 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
483 | CLANG_CXX_LIBRARY = "libc++";
484 | CLANG_ENABLE_OBJC_ARC = YES;
485 | CLANG_WARN_EMPTY_BODY = YES;
486 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
487 | COPY_PHASE_STRIP = YES;
488 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
489 | GCC_C_LANGUAGE_STANDARD = gnu99;
490 | GCC_ENABLE_OBJC_EXCEPTIONS = YES;
491 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
492 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
493 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
494 | GCC_WARN_UNUSED_VARIABLE = YES;
495 | MACOSX_DEPLOYMENT_TARGET = 10.8;
496 | SDKROOT = macosx;
497 | WARNING_CFLAGS = "-Wall";
498 | };
499 | name = Release;
500 | };
501 | 6DE2E099165EC72400DE9405 /* Debug */ = {
502 | isa = XCBuildConfiguration;
503 | buildSettings = {
504 | CODE_SIGN_ENTITLEMENTS = Main/Main.entitlements;
505 | CODE_SIGN_IDENTITY = "Mac Developer";
506 | COMBINE_HIDPI_IMAGES = YES;
507 | INFOPLIST_FILE = "Main/Main-Info.plist";
508 | LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
509 | PRODUCT_NAME = "$(TARGET_NAME)";
510 | WRAPPER_EXTENSION = app;
511 | };
512 | name = Debug;
513 | };
514 | 6DE2E09A165EC72400DE9405 /* Release */ = {
515 | isa = XCBuildConfiguration;
516 | buildSettings = {
517 | CODE_SIGN_ENTITLEMENTS = Main/Main.entitlements;
518 | CODE_SIGN_IDENTITY = "Mac Developer";
519 | COMBINE_HIDPI_IMAGES = YES;
520 | INFOPLIST_FILE = "Main/Main-Info.plist";
521 | LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
522 | PRODUCT_NAME = "$(TARGET_NAME)";
523 | WRAPPER_EXTENSION = app;
524 | };
525 | name = Release;
526 | };
527 | 6DE2E0B5165EC73D00DE9405 /* Debug */ = {
528 | isa = XCBuildConfiguration;
529 | buildSettings = {
530 | CODE_SIGN_ENTITLEMENTS = Helper/Helper.entitlements;
531 | CODE_SIGN_IDENTITY = "Mac Developer";
532 | COMBINE_HIDPI_IMAGES = YES;
533 | INFOPLIST_FILE = "Helper/Helper-Info.plist";
534 | LD_RUNPATH_SEARCH_PATHS = "@loader_path/../../../../../Frameworks";
535 | PRODUCT_NAME = "$(TARGET_NAME)";
536 | WRAPPER_EXTENSION = app;
537 | };
538 | name = Debug;
539 | };
540 | 6DE2E0B6165EC73D00DE9405 /* Release */ = {
541 | isa = XCBuildConfiguration;
542 | buildSettings = {
543 | CODE_SIGN_ENTITLEMENTS = Helper/Helper.entitlements;
544 | CODE_SIGN_IDENTITY = "Mac Developer";
545 | COMBINE_HIDPI_IMAGES = YES;
546 | INFOPLIST_FILE = "Helper/Helper-Info.plist";
547 | LD_RUNPATH_SEARCH_PATHS = "@loader_path/../../../../../Frameworks";
548 | PRODUCT_NAME = "$(TARGET_NAME)";
549 | WRAPPER_EXTENSION = app;
550 | };
551 | name = Release;
552 | };
553 | /* End XCBuildConfiguration section */
554 |
555 | /* Begin XCConfigurationList section */
556 | 6DE2E074165EC72400DE9405 /* Build configuration list for PBXProject "SharedPreferences" */ = {
557 | isa = XCConfigurationList;
558 | buildConfigurations = (
559 | 6DE2E096165EC72400DE9405 /* Debug */,
560 | 6DE2E097165EC72400DE9405 /* Release */,
561 | );
562 | defaultConfigurationIsVisible = 0;
563 | defaultConfigurationName = Release;
564 | };
565 | 6DE2E098165EC72400DE9405 /* Build configuration list for PBXNativeTarget "Main" */ = {
566 | isa = XCConfigurationList;
567 | buildConfigurations = (
568 | 6DE2E099165EC72400DE9405 /* Debug */,
569 | 6DE2E09A165EC72400DE9405 /* Release */,
570 | );
571 | defaultConfigurationIsVisible = 0;
572 | defaultConfigurationName = Release;
573 | };
574 | 6DE2E0B4165EC73D00DE9405 /* Build configuration list for PBXNativeTarget "Helper" */ = {
575 | isa = XCConfigurationList;
576 | buildConfigurations = (
577 | 6DE2E0B5165EC73D00DE9405 /* Debug */,
578 | 6DE2E0B6165EC73D00DE9405 /* Release */,
579 | );
580 | defaultConfigurationIsVisible = 0;
581 | defaultConfigurationName = Release;
582 | };
583 | /* End XCConfigurationList section */
584 | };
585 | rootObject = 6DE2E071165EC72400DE9405 /* Project object */;
586 | }
587 |
--------------------------------------------------------------------------------
/Sample Application/SharedPreferences.xcodeproj/xcshareddata/xcschemes/Helper.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/Sample Application/SharedPreferences.xcodeproj/xcshareddata/xcschemes/Main.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------