This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import CoreData | |
/// NSPersistentStoreCoordinator extension | |
extension NSPersistentStoreCoordinator { | |
/// NSPersistentStoreCoordinator error types | |
public enum CoordinatorError: Error { | |
/// .momd file not found | |
case modelFileNotFound |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
[application registerForRemoteNotificationTypes:UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeBadge|UIRemoteNotificationTypeSound]; | |
} | |
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { | |
NSString* deviceTokens = [[[[deviceToken description] | |
stringByReplacingOccurrencesOfString: @"<" withString: @""] | |
stringByReplacingOccurrencesOfString: @">" withString: @""] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSString *path = [[NSBundle mainBundle] bundlePath]; | |
NSString *finalPath = [path stringByAppendingPathComponent:@"name.plist"]; | |
NSArray *plistData = [NSArray arrayWithContentsOfFile:finalPath]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "WSConsult.h" | |
@interface WSConsult()<NSURLSessionDelegate> | |
@end | |
@implementation WSConsult | |
+(WSConsult *)sharedInstance { | |
static dispatch_once_t pred; | |
static WSConsult *shared = nil; | |
dispatch_once(&pred, ^{ |