Skip to content

Commit

Permalink
add two more constructors
Browse files Browse the repository at this point in the history
- adding two constructors that don't involve
app id easing xamarin development.
  • Loading branch information
Vivek Ayer committed Feb 19, 2016
1 parent 94f74cc commit f6183cc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions iOS_SDK/OneSignal/OneSignal.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) {

- (id)initWithLaunchOptions:(NSDictionary*)launchOptions appId:(NSString*)appId handleNotification:(OneSignalHandleNotificationBlock)callback;

- (id)initWithLaunchOptions:(NSDictionary*)launchOptions handleNotification:(OneSignalHandleNotificationBlock)callback autoRegister:(BOOL)autoRegister;

- (id)initWithLaunchOptions:(NSDictionary*)launchOptions autoRegister:(BOOL)autoRegister;

- (id)initWithLaunchOptions:(NSDictionary*)launchOptions appId:(NSString*)appId handleNotification:(OneSignalHandleNotificationBlock)callback autoRegister:(BOOL)autoRegister;

// Only use if you passed FALSE to autoRegister
Expand Down
8 changes: 8 additions & 0 deletions iOS_SDK/OneSignal/OneSignal.m
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,14 @@ - (id)initWithLaunchOptions:(NSDictionary*)launchOptions appId:(NSString*)appId
return [self initWithLaunchOptions:launchOptions appId:appId handleNotification:callback autoRegister:true];
}

- (id)initWithLaunchOptions:(NSDictionary*)launchOptions handleNotification:(OneSignalHandleNotificationBlock)callback autoRegister:(BOOL)autoRegister {
return [self initWithLaunchOptions:launchOptions appId:nil handleNotification:callback autoRegister:autoRegister];
}

- (id)initWithLaunchOptions:(NSDictionary*)launchOptions autoRegister:(BOOL)autoRegister {
return [self initWithLaunchOptions:launchOptions appId:nil handleNotification:nil autoRegister:autoRegister];
}

- (id)initWithLaunchOptions:(NSDictionary*)launchOptions appId:(NSString*)appId handleNotification:(OneSignalHandleNotificationBlock)callback autoRegister:(BOOL)autoRegister {
self = [super init];

Expand Down

0 comments on commit f6183cc

Please sign in to comment.