Manos Chorianopoulos

added test code for push notifications 2

......@@ -43,6 +43,24 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify";
NSURLCache *sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:cacheSizeMemory diskCapacity:cacheSizeDisk diskPath:@"nsurlcache"];
[NSURLCache setSharedURLCache:sharedCache];
// TEST CODE FOR PUSH - PUSH FIX
// RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
// RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
// moduleName:@"swift_example"
// initialProperties:nil];
// if (@available(iOS 13.0, *)) {
// rootView.backgroundColor = [UIColor systemBackgroundColor];
// } else {
// rootView.backgroundColor = [UIColor whiteColor];
// }
// self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
// UIViewController *rootViewController = [UIViewController new];
// rootViewController.view = rootView;
// self.window.rootViewController = rootViewController;
// [self.window makeKeyAndVisible];
// date = [NSDate date];
// if ([CMPedometer isStepCountingAvailable]) {
// pedometer = [[CMPedometer alloc] init];
......
......@@ -212,6 +212,8 @@
_webView = [[WKWebView alloc] initWithFrame:self.view.frame configuration:wkWebConfig];
self.timer = [NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@selector(onTimer:) userInfo:nil repeats:YES];
[Warply sharedService].allOffers = nil;
// TEST CODE FOR PUSH - PUSH FIX - Maybe comment
[[Warply sharedService] getInboxWithSuccessBlock: nil failureBlock:nil];
}
......
......@@ -754,6 +754,13 @@ static const char* jailbreak_apps[] =
newModalController.navigationBarHidden = YES;
newModalController.toolbarHidden = NO;
// TEST CODE FOR PUSH - PUSH FIX
// UIWindow *modalWindow = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
// modalWindow.rootViewController = [[UIViewController alloc] init];
//// modalWindow.windowLevel = UIWindowLevelNormal + 1;
// [modalWindow makeKeyAndVisible];
// [modalWindow.rootViewController presentViewController:newModalController animated:YES completion:nil];
UIViewController *existingModalController = [[UIApplication sharedApplication].delegate.window.rootViewController topModalViewController];
if (existingModalController == nil) {
......