Manos Chorianopoulos

Fixed sendDeviceInfo crash

......@@ -1723,7 +1723,7 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify";
- (void)sendDeviceInfoIfNecessary:(NSString *)newDeviceToken {
if ([Warply sharedService] != nil) {
if ([Warply sharedServiceExists] == YES) {
[[Warply sharedService].pushManager sendDeviceInfoIfNecessary:newDeviceToken];
}
......
......@@ -135,6 +135,10 @@ typedef enum {
*/
+ (Warply *)sharedService;
/*!
@abstract Returns if a shared instance of WLAppService exists.
*/
+ (BOOL)sharedServiceExists;
/*!
@methodgroup Launching and Abolishing Warp service.
*/
/*!
......
......@@ -106,6 +106,16 @@ typedef void (^FailureResponse)(NSURLSessionDataTask * _Nullable task, NSError *
}
///////////////////////////////////////////////////////////////////////////////
+ (BOOL)sharedServiceExists
{
if (_sharedService != nil) {
return YES;
} else {
return NO;
}
}
///////////////////////////////////////////////////////////////////////////////
+ (void)launchWithAppUUID:(NSString *)appUUID launchOptions:(NSDictionary *)launchOptions customPushDelegate:(id <WLCustomPushHandler>)customPushDelegate serverBaseUrl:(NSString *)url
{
//Launch Once
......