Showing
3 changed files
with
15 additions
and
1 deletions
| ... | @@ -1723,7 +1723,7 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify"; | ... | @@ -1723,7 +1723,7 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify"; |
| 1723 | 1723 | ||
| 1724 | - (void)sendDeviceInfoIfNecessary:(NSString *)newDeviceToken { | 1724 | - (void)sendDeviceInfoIfNecessary:(NSString *)newDeviceToken { |
| 1725 | 1725 | ||
| 1726 | - if ([Warply sharedService] != nil) { | 1726 | + if ([Warply sharedServiceExists] == YES) { |
| 1727 | [[Warply sharedService].pushManager sendDeviceInfoIfNecessary:newDeviceToken]; | 1727 | [[Warply sharedService].pushManager sendDeviceInfoIfNecessary:newDeviceToken]; |
| 1728 | } | 1728 | } |
| 1729 | 1729 | ... | ... |
| ... | @@ -135,6 +135,10 @@ typedef enum { | ... | @@ -135,6 +135,10 @@ typedef enum { |
| 135 | */ | 135 | */ |
| 136 | + (Warply *)sharedService; | 136 | + (Warply *)sharedService; |
| 137 | /*! | 137 | /*! |
| 138 | + @abstract Returns if a shared instance of WLAppService exists. | ||
| 139 | + */ | ||
| 140 | ++ (BOOL)sharedServiceExists; | ||
| 141 | +/*! | ||
| 138 | @methodgroup Launching and Abolishing Warp service. | 142 | @methodgroup Launching and Abolishing Warp service. |
| 139 | */ | 143 | */ |
| 140 | /*! | 144 | /*! | ... | ... |
| ... | @@ -106,6 +106,16 @@ typedef void (^FailureResponse)(NSURLSessionDataTask * _Nullable task, NSError * | ... | @@ -106,6 +106,16 @@ typedef void (^FailureResponse)(NSURLSessionDataTask * _Nullable task, NSError * |
| 106 | } | 106 | } |
| 107 | 107 | ||
| 108 | /////////////////////////////////////////////////////////////////////////////// | 108 | /////////////////////////////////////////////////////////////////////////////// |
| 109 | ++ (BOOL)sharedServiceExists | ||
| 110 | +{ | ||
| 111 | + if (_sharedService != nil) { | ||
| 112 | + return YES; | ||
| 113 | + } else { | ||
| 114 | + return NO; | ||
| 115 | + } | ||
| 116 | +} | ||
| 117 | + | ||
| 118 | +/////////////////////////////////////////////////////////////////////////////// | ||
| 109 | + (void)launchWithAppUUID:(NSString *)appUUID launchOptions:(NSDictionary *)launchOptions customPushDelegate:(id <WLCustomPushHandler>)customPushDelegate serverBaseUrl:(NSString *)url | 119 | + (void)launchWithAppUUID:(NSString *)appUUID launchOptions:(NSDictionary *)launchOptions customPushDelegate:(id <WLCustomPushHandler>)customPushDelegate serverBaseUrl:(NSString *)url |
| 110 | { | 120 | { |
| 111 | //Launch Once | 121 | //Launch Once | ... | ... |
-
Please register or login to post a comment