Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing warning if NSAssert is undefined #53

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Source/MMWormholeFileTransiting.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ @interface MMWormholeFileTransiting ()

@implementation MMWormholeFileTransiting

- (instancetype)init {
// Can't call this but it's the designated initializer for NSObject so we have to provide it.
NSLog(@"Don't call MMWormholeFileTransiting init, use initWithApplicationGroupIdentifier:optionalDirectory:");
return [self initWithApplicationGroupIdentifier:@"dev.null" optionalDirectory:nil];
}

- (instancetype)initWithApplicationGroupIdentifier:(NSString *)identifier
optionalDirectory:(nullable NSString *)directory {
if ((self = [super init])) {
Expand All @@ -52,8 +58,10 @@ - (instancetype)initWithApplicationGroupIdentifier:(NSString *)identifier
#pragma mark - Private Check App Group Capabilities

- (void)checkAppGroupCapabilities {
#ifndef NS_BLOCK_ASSERTIONS
NSURL *appGroupContainer = [self.fileManager containerURLForSecurityApplicationGroupIdentifier:self.applicationGroupIdentifier];
NSAssert(appGroupContainer != nil, @"App Group Capabilities may not be correctly configured for your project, or your appGroupIdentifier may not match your project settings. Check Project->Capabilities->App Groups. Three checkmarks should be displayed in the steps section, and the value passed in for your appGroupIdentifier should match the setting in your project file.");
#endif
}


Expand Down