Permalink
Browse files

Disabling iCloud if flag is set

  • Loading branch information...
1 parent 2ea866f commit 36262a23f12db56e91647f6f8324d5b76e9024b7 @hfossli hfossli committed Mar 26, 2012
Showing with 8 additions and 0 deletions.
  1. +4 −0 Source/CoreData+MagicalRecord.h
  2. +4 −0 Source/MagicalRecordHelpers.m
@@ -22,6 +22,10 @@
#define MRLog(...) ((void)0)
#endif
+#ifndef MR_IS_ICLOUD_DISABLED
+#define MR_IS_ICLOUD_DISABLED 0
+#endif
+
#import <CoreData/CoreData.h>
#ifndef MR_USE_ARC
@@ -191,8 +191,12 @@ + (void) setupCoreDataStackWithInMemoryStore;
+ (BOOL) isICloudEnabled;
{
+#if MR_IS_ICLOUD_DISABLED
+ return NO;
+#else
NSURL *cloudURL = [NSPersistentStore MR_cloudURLForUbiqutiousContainer:nil];
return cloudURL != nil;
+#endif
}
+ (void) setupCoreDataStackWithiCloudContainer:(NSString *)icloudBucket localStoreNamed:(NSString *)localStore;

0 comments on commit 36262a2

Please sign in to comment.