cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject [2/2] ios commit: CB-11235 - NSInternalInconsistencyException when running ios unit tests
Date Mon, 09 May 2016 21:34:45 GMT
CB-11235 - NSInternalInconsistencyException when running ios unit tests


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/ac8fc027
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/ac8fc027
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/ac8fc027

Branch: refs/heads/master
Commit: ac8fc0273ffd0d5def65a488579253caa25ce47c
Parents: 730d79d
Author: Shazron Abdullah <shazron@apache.org>
Authored: Mon May 9 14:35:47 2016 -0700
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Mon May 9 14:35:47 2016 -0700

----------------------------------------------------------------------
 .../CordovaLibTests/CordovaLibApp/AppDelegate.h |  7 +--
 .../CordovaLibTests/CordovaLibApp/AppDelegate.m | 50 +-------------------
 2 files changed, 4 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/ac8fc027/tests/CordovaLibTests/CordovaLibApp/AppDelegate.h
----------------------------------------------------------------------
diff --git a/tests/CordovaLibTests/CordovaLibApp/AppDelegate.h b/tests/CordovaLibTests/CordovaLibApp/AppDelegate.h
index d26fb8e..c815f20 100644
--- a/tests/CordovaLibTests/CordovaLibApp/AppDelegate.h
+++ b/tests/CordovaLibTests/CordovaLibApp/AppDelegate.h
@@ -18,14 +18,11 @@
  */
 
 #import <UIKit/UIKit.h>
+#import <Cordova/CDVAppDelegate.h>
 
 @class ViewController;
 
-@interface AppDelegate : UIResponder <UIApplicationDelegate>
-
-@property (strong, nonatomic) UIWindow* window;
-
-@property (strong, nonatomic) ViewController* viewController;
+@interface AppDelegate : CDVAppDelegate
 
 - (void)createViewController;
 - (void)destroyViewController;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/ac8fc027/tests/CordovaLibTests/CordovaLibApp/AppDelegate.m
----------------------------------------------------------------------
diff --git a/tests/CordovaLibTests/CordovaLibApp/AppDelegate.m b/tests/CordovaLibTests/CordovaLibApp/AppDelegate.m
index 065abd4..5b26110 100644
--- a/tests/CordovaLibTests/CordovaLibApp/AppDelegate.m
+++ b/tests/CordovaLibTests/CordovaLibApp/AppDelegate.m
@@ -23,19 +23,6 @@
 
 @implementation AppDelegate
 
-@synthesize window = _window;
-@synthesize viewController = _viewController;
-
-- (id)init
-{
-    NSHTTPCookieStorage* cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
-
-    [cookieStorage setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];
-
-    self = [super init];
-    return self;
-}
-
 - (void)createViewController
 {
     NSAssert(!self.viewController, @"ViewController already created.");
@@ -57,46 +44,13 @@
 
 - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
 {
-    CGRect screenBounds = [[UIScreen mainScreen] bounds];
-
-    self.window = [[UIWindow alloc] initWithFrame:screenBounds];
-    self.window.autoresizesSubviews = YES;
-
+    BOOL retVal = [super application:application didFinishLaunchingWithOptions:launchOptions];
     // Create the main view on start-up only when not running unit tests.
     if (!NSClassFromString(@"CDVWebViewTest")) {
         [self createViewController];
     }
 
-    [self.window makeKeyAndVisible];
-
-    return YES;
-}
-
-- (void)applicationWillResignActive:(UIApplication*)application
-{
-    // Sent when the application is about to move from active to inactive state. This can
occur for certain types of temporary interruptions (such as an incoming phone call or SMS
message) or when the user quits the application and it begins the transition to the background
state.
-    // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES
frame rates. Games should use this method to pause the game.
-}
-
-- (void)applicationDidEnterBackground:(UIApplication*)application
-{
-    // Use this method to release shared resources, save user data, invalidate timers, and
store enough application state information to restore your application to its current state
in case it is terminated later.
-    // If your application supports background execution, this method is called instead of
applicationWillTerminate: when the user quits.
-}
-
-- (void)applicationWillEnterForeground:(UIApplication*)application
-{
-    // Called as part of the transition from the background to the inactive state; here you
can undo many of the changes made on entering the background.
-}
-
-- (void)applicationDidBecomeActive:(UIApplication*)application
-{
-    // Restart any tasks that were paused (or not yet started) while the application was
inactive. If the application was previously in the background, optionally refresh the user
interface.
-}
-
-- (void)applicationWillTerminate:(UIApplication*)application
-{
-    // Called when the application is about to terminate. Save data if appropriate. See also
applicationDidEnterBackground:.
+    return retVal;
 }
 
 @end


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message