git commit: CB-7556 - iOS: Clearing all Watches does not stop Location Services
Repository: cordova-plugin-geolocation Updated Branches: refs/heads/master 4102a332b -> 551b40458 CB-7556 - iOS: Clearing all Watches does not stop Location Services iOS shows a little arrow in the status bar if location services are in use. When you set a watch on Location Manager, it starts tracking position, and the arrow symbol appears. However, when that watch is cleared, no command to Location Manager is sent to stop tracking, so the arrow stays visible, even though in reality, the app is not using location services. My guess is that this also impacts battery life to some extent, especially if your iOS app has background location enabled. This fix would automatically stop tracking location once all watched are cleared, so that the arrow symbol in the iOS status will disappear. Tested on iOS 7.1.2. Signed-off-by: Shazron Abdullah Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/commit/551b4045 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/tree/551b4045 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/diff/551b4045 Branch: refs/heads/master Commit: 551b40458c208e23be0005f25ad8a5c896f3aa9f Parents: 4102a33 Author: Mark Pearce Authored: Mon Sep 15 16:43:08 2014 -0300 Committer: Shazron Abdullah Committed: Mon Sep 15 15:09:45 2014 -0700 -- src/ios/CDVLocation.m | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/551b4045/src/ios/CDVLocation.m -- diff --git a/src/ios/CDVLocation.m b/src/ios/CDVLocation.m index 7c73b64..f82b52a 100644 --- a/src/ios/CDVLocation.m +++ b/src/ios/CDVLocation.m @@ -267,6 +267,9 @@ if (self.locationData && self.locationData.watchCallbacks && [self.locationData.watchCallbacks objectForKey:timerId]) { [self.locationData.watchCallbacks removeObjectForKey:timerId]; +if([self.locationData.watchCallbacks count] == 0) { +[self _stopLocation]; +} } }
git commit: CB-7423 do cleanup after copyImage manual test
Repository: cordova-plugin-camera Updated Branches: refs/heads/master fcfe64214 -> 45da41066 CB-7423 do cleanup after copyImage manual test Signed-off-by: Shazron Abdullah Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/commit/45da4106 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/tree/45da4106 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/diff/45da4106 Branch: refs/heads/master Commit: 45da410662bfdaa391dbd722ffd118acd479f474 Parents: fcfe642 Author: Edna Morales Authored: Thu Sep 4 11:04:33 2014 -0400 Committer: Shazron Abdullah Committed: Mon Sep 15 15:27:46 2014 -0700 -- tests/tests.js | 18 ++ 1 file changed, 18 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/blob/45da4106/tests/tests.js -- diff --git a/tests/tests.js b/tests/tests.js index e2ffa9f..e228a93 100644 --- a/tests/tests.js +++ b/tests/tests.js @@ -241,10 +241,28 @@ exports.defineManualTests = function (contentEl, createActionButton) { function copyImage() { var onFileSystemReceived = function (fileSystem) { var destDirEntry = fileSystem.root; +var origName = fileEntry.name; // Test FileEntry API here. fileEntry.copyTo(destDirEntry, 'copied_file.png', logCallback('FileEntry.copyTo', true), logCallback('FileEntry.copyTo', false)); fileEntry.moveTo(destDirEntry, 'moved_file.png', logCallback('FileEntry.moveTo', true), logCallback('FileEntry.moveTo', false)); + +//cleanup +//rename moved file back to original name so other tests can reference image +resolveLocalFileSystemURI(destDirEntry.nativeURL+'moved_file.png', function(fileEntry) { +fileEntry.moveTo(destDirEntry, origName, logCallback('FileEntry.moveTo', true), logCallback('FileEntry.moveTo', false)); +console.log('Cleanup: successfully renamed file back to original name'); +}, function () { +console.log('Cleanup: failed to rename file back to original name'); +}); + +//remove copied file + resolveLocalFileSystemURI(destDirEntry.nativeURL+'copied_file.png', function(fileEntry) { +fileEntry.remove(logCallback('FileEntry.remove', true), logCallback('FileEntry.remove', false)); +console.log('Cleanup: successfully removed copied file'); +}, function () { +console.log('Cleanup: failed to remove copied file'); +}); }; window.requestFileSystem(LocalFileSystem.TEMPORARY, 0, onFileSystemReceived, null);
git commit: CB-7557 - Camera plugin tests is missing a File dependency
Repository: cordova-plugin-camera Updated Branches: refs/heads/master 45da41066 -> 43cb385f0 CB-7557 - Camera plugin tests is missing a File dependency Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/commit/43cb385f Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/tree/43cb385f Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/diff/43cb385f Branch: refs/heads/master Commit: 43cb385f0e29efa4437d970281cecf92f472cbac Parents: 45da410 Author: Shazron Abdullah Authored: Mon Sep 15 15:31:04 2014 -0700 Committer: Shazron Abdullah Committed: Mon Sep 15 15:31:04 2014 -0700 -- tests/plugin.xml | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/blob/43cb385f/tests/plugin.xml -- diff --git a/tests/plugin.xml b/tests/plugin.xml index 403753b..20e288d 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -25,6 +25,8 @@ version="0.3.1-dev"> Cordova Camera Plugin Tests Apache 2.0 + +
git commit: CB-7558 - hasPendingOperation flag in Camera plugin's takePicture should be reversed to fix memory errors
Repository: cordova-plugin-camera Updated Branches: refs/heads/master 43cb385f0 -> 513bfde49 CB-7558 - hasPendingOperation flag in Camera plugin's takePicture should be reversed to fix memory errors Signed-off-by: Shazron Abdullah Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/commit/513bfde4 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/tree/513bfde4 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/diff/513bfde4 Branch: refs/heads/master Commit: 513bfde49e4226133c976d53834e11b040950d3e Parents: 43cb385 Author: Wang Jinggang Authored: Thu Jun 5 15:56:45 2014 +0800 Committer: Shazron Abdullah Committed: Mon Sep 15 15:34:18 2014 -0700 -- src/ios/CDVCamera.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/blob/513bfde4/src/ios/CDVCamera.m -- diff --git a/src/ios/CDVCamera.m b/src/ios/CDVCamera.m index c2409be..cb53932 100644 --- a/src/ios/CDVCamera.m +++ b/src/ios/CDVCamera.m @@ -82,7 +82,7 @@ static NSSet* org_apache_cordova_validArrowDirections; NSString* callbackId = command.callbackId; NSArray* arguments = command.arguments; -self.hasPendingOperation = NO; +self.hasPendingOperation = YES; NSString* sourceTypeString = [arguments objectAtIndex:2]; UIImagePickerControllerSourceType sourceType = UIImagePickerControllerSourceTypeCamera; // default @@ -161,7 +161,7 @@ static NSSet* org_apache_cordova_validArrowDirections; } else { [self.viewController presentViewController:cameraPicker animated:YES completion:nil]; } -self.hasPendingOperation = YES; +self.hasPendingOperation = NO; } - (void)repositionPopover:(CDVInvokedUrlCommand*)command
git commit: CB-7486 - Remove StatusBarBackgroundColor intial preference (black background) so background will be initially transparent
Repository: cordova-plugin-statusbar Updated Branches: refs/heads/master 03fbd9ded -> 61024e50b CB-7486 - Remove StatusBarBackgroundColor intial preference (black background) so background will be initially transparent This should not be a default ios setting: It makes it impossible to unset the initial background color (for transparent backgrounds). Instead just have the default as no background color (which will effectively be transparent), and then allow users to override that with a desired color. Signed-off-by: Shazron Abdullah Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/commit/61024e50 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/tree/61024e50 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/diff/61024e50 Branch: refs/heads/master Commit: 61024e50b3ffed4d7b149ccf9199cfcacd0cc5bc Parents: 03fbd9d Author: SayreBlades Authored: Wed Aug 13 11:37:11 2014 -0400 Committer: Shazron Abdullah Committed: Mon Sep 15 15:58:34 2014 -0700 -- plugin.xml | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/blob/61024e50/plugin.xml -- diff --git a/plugin.xml b/plugin.xml index e4c..9c3eae4 100644 --- a/plugin.xml +++ b/plugin.xml @@ -54,7 +54,6 @@ -
docs commit: CB-5464 - Documentation Issues
Repository: cordova-docs Updated Branches: refs/heads/master 9c1ccc512 -> ac6eb41a1 CB-5464 - Documentation Issues Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/ac6eb41a Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/ac6eb41a Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/ac6eb41a Branch: refs/heads/master Commit: ac6eb41a10635963b450c9ac3fc26c5616bf4f9a Parents: 9c1ccc5 Author: Shazron Abdullah Authored: Mon Sep 15 22:29:10 2014 -0700 Committer: Shazron Abdullah Committed: Mon Sep 15 22:29:10 2014 -0700 -- docs/en/edge/guide/platforms/ios/config.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/ac6eb41a/docs/en/edge/guide/platforms/ios/config.md -- diff --git a/docs/en/edge/guide/platforms/ios/config.md b/docs/en/edge/guide/platforms/ios/config.md index 860221f..e0e0a73 100644 --- a/docs/en/edge/guide/platforms/ios/config.md +++ b/docs/en/edge/guide/platforms/ios/config.md @@ -21,8 +21,8 @@ license: Licensed to the Apache Software Foundation (ASF) under one The `config.xml` file controls an app's basic settings that apply across each application and CordovaWebView instance. This section -details preferences that only apply to iOS builds. See The config.xml -File for information on global configuration options. +details preferences that only apply to iOS builds. See [The config.xml +File](config_ref_index.md.html#The%20config.xml%20File) for information on global configuration options. - `EnableViewportScale` (boolean, defaults to `false`): Set to `true` to allow a viewport meta tag to either disable or restrict the range
ios commit: CB-7560 - Tel and Mailto links don't work in iframe
Repository: cordova-ios Updated Branches: refs/heads/master d5f570efa -> cf367cb49 CB-7560 - Tel and Mailto links don't work in iframe Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/cf367cb4 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/cf367cb4 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/cf367cb4 Branch: refs/heads/master Commit: cf367cb49916196ce6009b54c4a6dfa9779be20c Parents: d5f570e Author: Shazron Abdullah Authored: Mon Sep 15 23:04:38 2014 -0700 Committer: Shazron Abdullah Committed: Mon Sep 15 23:04:38 2014 -0700 -- CordovaLib/Classes/CDVWebViewDelegate.m | 13 - CordovaLibTests/CDVWebViewDelegateTests.m | 21 + 2 files changed, 33 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/cf367cb4/CordovaLib/Classes/CDVWebViewDelegate.m -- diff --git a/CordovaLib/Classes/CDVWebViewDelegate.m b/CordovaLib/Classes/CDVWebViewDelegate.m index 6bac3fa..cdc3980 100644 --- a/CordovaLib/Classes/CDVWebViewDelegate.m +++ b/CordovaLib/Classes/CDVWebViewDelegate.m @@ -198,6 +198,17 @@ static NSString *stripFragment(NSString* url) } } +- (BOOL)shouldLoadRequest:(NSURLRequest*)request +{ +NSString* scheme = [[request URL] scheme]; + +if ([scheme isEqualToString:@"mailto"] || [scheme isEqualToString:@"tel"]) { +return YES; +} + +return [NSURLConnection canHandleRequest:request]; +} + - (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType { BOOL shouldLoad = YES; @@ -259,7 +270,7 @@ static NSString *stripFragment(NSString* url) } else { // Deny invalid URLs so that we don't get the case where we go straight from // webViewShouldLoad -> webViewDidFailLoad (messes up _loadCount). -shouldLoad = shouldLoad && [NSURLConnection canHandleRequest:request]; +shouldLoad = shouldLoad && [self shouldLoadRequest:request]; } VerboseLog(@"webView shouldLoad=%d (after) isTopLevelNavigation=%d state=%d loadCount=%d", shouldLoad, isTopLevelNavigation, _state, _loadCount); } http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/cf367cb4/CordovaLibTests/CDVWebViewDelegateTests.m -- diff --git a/CordovaLibTests/CDVWebViewDelegateTests.m b/CordovaLibTests/CDVWebViewDelegateTests.m index 15af654..7edd189 100644 --- a/CordovaLibTests/CDVWebViewDelegateTests.m +++ b/CordovaLibTests/CDVWebViewDelegateTests.m @@ -21,6 +21,13 @@ #import +@interface CDVWebViewDelegate () + +// expose private interface +- (BOOL)shouldLoadRequest:(NSURLRequest*)request; + +@end + @interface CDVWebViewDelegateTests : XCTestCase @end @@ -36,6 +43,20 @@ [super tearDown]; } +- (void)testShouldLoadRequest +{ +CDVWebViewDelegate* wvd = [[CDVWebViewDelegate alloc] initWithDelegate:nil]; // not really testing delegate handling + +NSURLRequest* mailtoUrl = [NSURLRequest requestWithURL:[NSURL URLWithString:@"mailto:d...@cordova.apache.org";]]; +NSURLRequest* telUrl = [NSURLRequest requestWithURL:[NSURL URLWithString:@"tel:12345"]]; +NSURLRequest* plainUrl = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://apache.org";]]; + +XCTAssertTrue([wvd shouldLoadRequest:mailtoUrl], @"mailto urls should be allowed"); +XCTAssertTrue([wvd shouldLoadRequest:telUrl], @"tel urls should be allowed"); +// as long as this is in the whitelist it should pass +XCTAssertTrue([wvd shouldLoadRequest:plainUrl], @"http urls should be allowed"); +} + - (void)testFragmentIdentifiersWithHttpUrl { [self doTestFragmentIdentifiersWithBaseUrl:@"http://cordova.apache.org"; fragment:@"myfragment"];
git commit: CB-7551 - [Camera][iOS 8] Scaled images show a white line
Repository: cordova-plugin-camera Updated Branches: refs/heads/master 513bfde49 -> 3581c595d CB-7551 - [Camera][iOS 8] Scaled images show a white line Signed-off-by: Shazron Abdullah Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/commit/3581c595 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/tree/3581c595 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/diff/3581c595 Branch: refs/heads/master Commit: 3581c595d7d67b011aaf33b5b09e702c119d6b79 Parents: 513bfde Author: ktsour Authored: Mon Sep 15 19:00:45 2014 +0300 Committer: Shazron Abdullah Committed: Mon Sep 15 23:13:34 2014 -0700 -- src/ios/CDVCamera.m | 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/blob/3581c595/src/ios/CDVCamera.m -- diff --git a/src/ios/CDVCamera.m b/src/ios/CDVCamera.m index cb53932..b2c058a 100644 --- a/src/ios/CDVCamera.m +++ b/src/ios/CDVCamera.m @@ -532,6 +532,10 @@ static NSSet* org_apache_cordova_validArrowDirections; scaledSize = CGSizeMake(MIN(width * scaleFactor, targetWidth), MIN(height * scaleFactor, targetHeight)); } +// If the pixels are floats, it causes a white line in iOS8 and probably other versions too +scaledSize.width = (int)scaledSize.width; +scaledSize.height = (int)scaledSize.height; + UIGraphicsBeginImageContext(scaledSize); // this will resize [sourceImage drawInRect:CGRectMake(0, 0, scaledSize.width, scaledSize.height)];
docs commit: CB-7565 - Add debugging guide for iOS with Xcode and Safari Web Inspector
Repository: cordova-docs Updated Branches: refs/heads/master ac6eb41a1 -> e7b8d159d CB-7565 - Add debugging guide for iOS with Xcode and Safari Web Inspector Signed-off-by: Shazron Abdullah Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/e7b8d159 Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/e7b8d159 Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/e7b8d159 Branch: refs/heads/master Commit: e7b8d159d2eee5e945d4210253426da90c736373 Parents: ac6eb41 Author: Edna Morales Authored: Tue Sep 16 15:55:12 2014 -0400 Committer: Shazron Abdullah Committed: Tue Sep 16 13:21:44 2014 -0700 -- docs/en/edge/guide/next/index.md | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/e7b8d159/docs/en/edge/guide/next/index.md -- diff --git a/docs/en/edge/guide/next/index.md b/docs/en/edge/guide/next/index.md index ba6564e..8f369e0 100644 --- a/docs/en/edge/guide/next/index.md +++ b/docs/en/edge/guide/next/index.md @@ -114,8 +114,13 @@ Tip: It is possible on Android Nexus devices to easily flash different versions Debugging Cordova requires some setup. Unlike a desktop application, you can't simply open dev tools on your mobile device and start debugging, luckily there are some great alternatives. -## Safari Remote Debugging -The first option is Safari Remote Debugging. This works only on OSX and only with iOS 6 (and higher). It uses Safari to connect to your device (or the simulator) and will connect the browser's dev tools to the Cordova application. You get what you expect from dev tools - DOM inspection/manipulation, a JavaScript debugger, network inspection, the console, and more. For more details, see this excellent blog post: [http://moduscreate.com/enable-remote-web-inspector-in-ios-6/](http://moduscreate.com/enable-remote-web-inspector-in-ios-6/) +##iOS Debugging + +###Xcode +With Xcode you can debug the iOS native side of your Cordova application. Make sure the Debug Area is showing (View -> Debug Area). Once your app is running on the device (or simulator), you can view log output in the debug area. This is where any errors or warnings will print. You can also set breakpoints within the source files. This will allow you to step through the code one line at a time and view the state of the variables at that time. The state of the variables is shown in the debug area when a breakpoint is hit. Once your app is up and running on the device, you can bring up Safari's web inspector (as described below) to debug the webview and js side of your application. For more details and help, see the Xcode guide: [Xcode Debugging Guide](https://developer.apple.com/library/mac/documentation/ToolsLanguages/Conceptual/Xcode_Overview/DebugYourApp/DebugYourApp.html#//apple_ref/doc/uid/TP40010215-CH18-SW1) + +###Safari Remote Debugging with Web Inspector +With Safari's web inspector you can debug the webview and js code in your Cordova application. This works only on OSX and only with iOS 6 (and higher). It uses Safari to connect to your device (or the simulator) and will connect the browser's dev tools to the Cordova application. You get what you expect from dev tools - DOM inspection/manipulation, a JavaScript debugger, network inspection, the console, and more. Like Xcode, with Safari's web inspector you can set breakpoints in the JavaScript code and view the state of the variables at that time. You can view any errors, warnings or messages that are printed to the console. You can also run JavaScript commands directly from the console as your app is running. For more details on how to set it up and what you can do, see this excellent blog post: [http://moduscreate.com/enable-remote-web-inspector-in-ios-6/](http://moduscreate.com/enable-remote-web-inspector-in-ios-6/) and this guide: [Safari Web Inspector Guide](https://developer.a pple.com/library/safari/documentation/AppleApplications/Conceptual/Safari_Developer_Guide/Introduction/Introduction.html) ## Chrome Remote Debugging Virtually the same as the Safari version, this works with Android only but can be used from any desktop operating system. It requires a minimum of Android 4.4 (KitKat), minimum API level of 19, and Chrome 30+ (on the desktop). Once connected, you get the same Chrome Dev Tools experience for your mobile applications as you do with your desktop applications. Even better, the Chrome Dev Tools have a mirror option that shows your app running on the mobile device. This is more than just a view - you can scroll and click from dev tools and it updates on the mobile device. More detail
git commit: CB-7549 - [StatusBar][iOS 8] Landscape issue
Repository: cordova-plugin-statusbar Updated Branches: refs/heads/master 61024e50b -> 921daccd2 CB-7549 - [StatusBar][iOS 8] Landscape issue When starting an app in landscape mode in ios 8 and then calling StatusBar.overlaysWebView(false), the screen would be pushed down all the way. Changing the orientation did not fix the issue, leaving the page pushed down the width of the device. We found that excluding the changes above in ios 8 fixed the issue, although it's possible that this is hiding a landscape orientation bug in ios 8 that may get fixed later. Signed-off-by: Shazron Abdullah Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/commit/921daccd Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/tree/921daccd Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/diff/921daccd Branch: refs/heads/master Commit: 921daccd2cc7be5294488adb64b8c4c36363b63c Parents: 61024e5 Author: twomz Authored: Mon Sep 15 16:19:20 2014 -0500 Committer: Shazron Abdullah Committed: Tue Sep 16 16:40:15 2014 -0700 -- src/ios/CDVStatusBar.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/blob/921daccd/src/ios/CDVStatusBar.m -- diff --git a/src/ios/CDVStatusBar.m b/src/ios/CDVStatusBar.m index 8be..e39424d 100644 --- a/src/ios/CDVStatusBar.m +++ b/src/ios/CDVStatusBar.m @@ -168,7 +168,7 @@ static const void *kStatusBarStyle = &kStatusBarStyle; - (void) initializeStatusBarBackgroundView { CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame; -if (UIDeviceOrientationIsLandscape(self.viewController.interfaceOrientation)) { +if (UIDeviceOrientationIsLandscape(self.viewController.interfaceOrientation) && !IsAtLeastiOSVersion(@"8.0")) { // swap width and height. set origin to zero statusBarFrame = CGRectMake(0, 0, statusBarFrame.size.height, statusBarFrame.size.width); } @@ -205,7 +205,7 @@ static const void *kStatusBarStyle = &kStatusBarStyle; CGRect frame = self.webView.frame; -if (UIDeviceOrientationIsLandscape(self.viewController.interfaceOrientation)) { +if (UIDeviceOrientationIsLandscape(self.viewController.interfaceOrientation) && !IsAtLeastiOSVersion(@"8.0")) { frame.origin.y = statusBarFrame.size.width; frame.size.height -= statusBarFrame.size.width; } else {
ios commit: CB-7596 - [iOS 8] CDV_IsIPhone5() Macro needs to be updated because screen size is now orientation dependent
Repository: cordova-ios Updated Branches: refs/heads/master cf367cb49 -> b06ca8db4 CB-7596 - [iOS 8] CDV_IsIPhone5() Macro needs to be updated because screen size is now orientation dependent iOS8 introduces a change to screen orientation, making [UIScreen bounds] orientation-dependent. Testing for the iPhone5 screen resolution now needs to account for landscape (568x320) in addition to portrait (320x568). Details at http://stackoverflow.com/questions/24150359/is-uiscreen-mainscreen-bound s-size-becoming-orientation-dependent-in-ios8 Signed-off-by: Shazron Abdullah Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/b06ca8db Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/b06ca8db Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/b06ca8db Branch: refs/heads/master Commit: b06ca8db4288f47e99f32294080106884e236d47 Parents: cf367cb Author: Clafou Authored: Thu Sep 18 11:18:04 2014 +0100 Committer: Shazron Abdullah Committed: Thu Sep 18 15:27:06 2014 -0700 -- CordovaLib/Classes/CDVAvailability.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/b06ca8db/CordovaLib/Classes/CDVAvailability.h -- diff --git a/CordovaLib/Classes/CDVAvailability.h b/CordovaLib/Classes/CDVAvailability.h index 6f43754..e16a951 100644 --- a/CordovaLib/Classes/CDVAvailability.h +++ b/CordovaLib/Classes/CDVAvailability.h @@ -75,7 +75,7 @@ #define CDV_IsIPad() ([[UIDevice currentDevice] respondsToSelector:@selector(userInterfaceIdiom)] && ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad)) -#define CDV_IsIPhone5() ([[UIScreen mainScreen] bounds].size.height == 568 && [[UIScreen mainScreen] bounds].size.width == 320) +#define CDV_IsIPhone5() (([[UIScreen mainScreen] bounds].size.width == 568 && [[UIScreen mainScreen] bounds].size.height == 320) || ([[UIScreen mainScreen] bounds].size.height == 568 && [[UIScreen mainScreen] bounds].size.width == 320)) /* Return the string version of the decimal version */ #define CDV_VERSION [NSString stringWithFormat:@"%d.%d.%d", \
git commit: CB-6809 - Network Information - Fix header licenses (Apache RAT report)
Repository: cordova-coho Updated Branches: refs/heads/master b7a4f8ab7 -> 29b8efe81 CB-6809 - Network Information - Fix header licenses (Apache RAT report) Project: http://git-wip-us.apache.org/repos/asf/cordova-coho/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-coho/commit/29b8efe8 Tree: http://git-wip-us.apache.org/repos/asf/cordova-coho/tree/29b8efe8 Diff: http://git-wip-us.apache.org/repos/asf/cordova-coho/diff/29b8efe8 Branch: refs/heads/master Commit: 29b8efe81d3f7e6aa630c032e1ecbe8b94ecd070 Parents: b7a4f8a Author: Shazron Abdullah Authored: Mon Sep 22 12:33:57 2014 -0700 Committer: Shazron Abdullah Committed: Mon Sep 22 12:33:57 2014 -0700 -- src/repoutil.js | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/29b8efe8/src/repoutil.js -- diff --git a/src/repoutil.js b/src/repoutil.js index 696a36b..3bfcfbe 100644 --- a/src/repoutil.js +++ b/src/repoutil.js @@ -259,7 +259,13 @@ var pluginRepos = [ id: 'plugin-network-information', repoName: 'cordova-plugin-network-information', jiraComponentName: 'Plugin Network Information', -inactive: true +inactive: true, +ratExcludes: [ +// Apple license is BSD compatible: +// http://markmail.org/message/3ok5cottuxt5wpub +'CDVReachability.m', +'CDVReachability.h' +] }, { title: 'Plugin - Splash Screen', id: 'plugin-splashscreen',
git commit: CB-6811 - Vibration - Fix header licenses (Apache RAT report)
Repository: cordova-coho Updated Branches: refs/heads/master 29b8efe81 -> 3834b78f5 CB-6811 - Vibration - Fix header licenses (Apache RAT report) Project: http://git-wip-us.apache.org/repos/asf/cordova-coho/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-coho/commit/3834b78f Tree: http://git-wip-us.apache.org/repos/asf/cordova-coho/tree/3834b78f Diff: http://git-wip-us.apache.org/repos/asf/cordova-coho/diff/3834b78f Branch: refs/heads/master Commit: 3834b78f546d60053f2611ec66f4b4ee9b4c4247 Parents: 29b8efe Author: Shazron Abdullah Authored: Mon Sep 22 12:38:34 2014 -0700 Committer: Shazron Abdullah Committed: Mon Sep 22 12:38:34 2014 -0700 -- src/repoutil.js | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/3834b78f/src/repoutil.js -- diff --git a/src/repoutil.js b/src/repoutil.js index 3bfcfbe..1dcad35 100644 --- a/src/repoutil.js +++ b/src/repoutil.js @@ -277,7 +277,13 @@ var pluginRepos = [ id: 'plugin-vibration', repoName: 'cordova-plugin-vibration', jiraComponentName: 'Plugin Vibration', -inactive: true +inactive: true, +ratExcludes: [ +// zlib/libpng approved by Apache legal +// http://www.apache.org/legal/resolved.html +'tokenizer.cpp', +'tokenizer.h' +] }, { title: 'Plugin - Statusbar', id: 'plugin-statusbar',
ios commit: CB-7631 - CDVUrlProtocol - the iOS 8 NSHttpUrlResponse is not initialized with the statuscode
Repository: cordova-ios Updated Branches: refs/heads/master b06ca8db4 -> 6329027c4 CB-7631 - CDVUrlProtocol - the iOS 8 NSHttpUrlResponse is not initialized with the statuscode Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/6329027c Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/6329027c Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/6329027c Branch: refs/heads/master Commit: 6329027c4a35d18d85dcc5bcd0ee3a6d34fe2421 Parents: b06ca8d Author: Shazron Abdullah Authored: Wed Sep 24 15:53:30 2014 -0700 Committer: Shazron Abdullah Committed: Wed Sep 24 15:53:30 2014 -0700 -- CordovaLib/Classes/CDVURLProtocol.m | 32 +--- 1 file changed, 1 insertion(+), 31 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/6329027c/CordovaLib/Classes/CDVURLProtocol.m -- diff --git a/CordovaLib/Classes/CDVURLProtocol.m b/CordovaLib/Classes/CDVURLProtocol.m index 3ecb6a0..fce5783 100644 --- a/CordovaLib/Classes/CDVURLProtocol.m +++ b/CordovaLib/Classes/CDVURLProtocol.m @@ -26,12 +26,6 @@ #import "CDVWhitelist.h" #import "CDVViewController.h" -@interface CDVHTTPURLResponse : NSHTTPURLResponse -#ifndef __IPHONE_8_0 -@property (nonatomic) NSInteger statusCode; -#endif -@end - static CDVWhitelist* gWhitelist = nil; // Contains a set of NSNumbers of addresses of controllers. It doesn't store // the actual pointer to avoid retaining. @@ -206,22 +200,8 @@ static CDVViewController *viewControllerForRequest(NSURLRequest* request) if (mimeType == nil) { mimeType = @"text/plain"; } -NSString* encodingName = [@"text/plain" isEqualToString : mimeType] ? @"UTF-8" : nil; - -#ifdef __IPHONE_8_0 -NSHTTPURLResponse* response = [NSHTTPURLResponse alloc]; -#else -CDVHTTPURLResponse* response = [CDVHTTPURLResponse alloc]; -#endif -response = [response initWithURL:[[self request] URL] -MIMEType:mimeType - expectedContentLength:[data length] -textEncodingName:encodingName]; - -#ifndef __IPHONE_8_0 -response.statusCode = statusCode; -#endif +NSHTTPURLResponse* response = [[NSHTTPURLResponse alloc] initWithURL:[[self request] URL] statusCode:statusCode HTTPVersion:@"HTTP/1.1" headerFields:@{@"Content-Type" : mimeType}]; [[self client] URLProtocol:self didReceiveResponse:response cacheStoragePolicy:NSURLCacheStorageNotAllowed]; if (data != nil) { @@ -231,13 +211,3 @@ static CDVViewController *viewControllerForRequest(NSURLRequest* request) } @end - -@implementation CDVHTTPURLResponse -@synthesize statusCode; - -- (NSDictionary*)allHeaderFields -{ -return nil; -} - -@end
ios commit: Update test schemes
Repository: cordova-ios Updated Branches: refs/heads/master 6329027c4 -> 5dff3fae8 Update test schemes Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/5dff3fae Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/5dff3fae Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/5dff3fae Branch: refs/heads/master Commit: 5dff3fae87a73f8b7db379ba47d780eb77e7cb72 Parents: 6329027 Author: Shazron Abdullah Authored: Fri Sep 26 10:03:13 2014 -0700 Committer: Shazron Abdullah Committed: Fri Sep 26 10:03:26 2014 -0700 -- .../xcshareddata/xcschemes/CordovaLibApp.xcscheme | 2 +- .../xcshareddata/xcschemes/CordovaLibTests.xcscheme| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/5dff3fae/CordovaLibTests/CordovaTests.xcodeproj/xcshareddata/xcschemes/CordovaLibApp.xcscheme -- diff --git a/CordovaLibTests/CordovaTests.xcodeproj/xcshareddata/xcschemes/CordovaLibApp.xcscheme b/CordovaLibTests/CordovaTests.xcodeproj/xcshareddata/xcschemes/CordovaLibApp.xcscheme index 8a3bc7d..7f8499a 100644 --- a/CordovaLibTests/CordovaTests.xcodeproj/xcshareddata/xcschemes/CordovaLibApp.xcscheme +++ b/CordovaLibTests/CordovaTests.xcodeproj/xcshareddata/xcschemes/CordovaLibApp.xcscheme @@ -32,7 +32,7 @@ http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/5dff3fae/CordovaLibTests/CordovaTests.xcodeproj/xcshareddata/xcschemes/CordovaLibTests.xcscheme -- diff --git a/CordovaLibTests/CordovaTests.xcodeproj/xcshareddata/xcschemes/CordovaLibTests.xcscheme b/CordovaLibTests/CordovaTests.xcodeproj/xcshareddata/xcschemes/CordovaLibTests.xcscheme index fa7ec88..3557154 100644 --- a/CordovaLibTests/CordovaTests.xcodeproj/xcshareddata/xcschemes/CordovaLibTests.xcscheme +++ b/CordovaLibTests/CordovaTests.xcodeproj/xcshareddata/xcschemes/CordovaLibTests.xcscheme @@ -16,7 +16,7 @@
ios commit: CB-7632 - [iOS 8] Add launch image definitions to Info.plist
Repository: cordova-ios Updated Branches: refs/heads/master 5dff3fae8 -> d08cf362c CB-7632 - [iOS 8] Add launch image definitions to Info.plist Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/d08cf362 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/d08cf362 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/d08cf362 Branch: refs/heads/master Commit: d08cf362cc0268141f351151a818d3ff49c83a1b Parents: 5dff3fa Author: Shazron Abdullah Authored: Fri Sep 26 11:07:15 2014 -0700 Committer: Shazron Abdullah Committed: Fri Sep 26 11:07:15 2014 -0700 -- .../project/__CLI__.xcodeproj/project.pbxproj | 12 +++ .../__NON-CLI__.xcodeproj/project.pbxproj | 14 ++- .../Resources/splash/Default-667h.png | Bin 0 -> 57532 bytes .../Resources/splash/Default-736h.png | Bin 0 -> 80929 bytes .../Resources/splash/Default-Landscape-736h.png | Bin 0 -> 79491 bytes .../__PROJECT_NAME__-Info.plist | 103 +++ 6 files changed, 128 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d08cf362/bin/templates/project/__CLI__.xcodeproj/project.pbxproj -- diff --git a/bin/templates/project/__CLI__.xcodeproj/project.pbxproj b/bin/templates/project/__CLI__.xcodeproj/project.pbxproj index cf949d0..f74b45d 100755 --- a/bin/templates/project/__CLI__.xcodeproj/project.pbxproj +++ b/bin/templates/project/__CLI__.xcodeproj/project.pbxproj @@ -25,6 +25,9 @@ 308D05381370CCF300D202BF /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 308D052F1370CCF300D202BF /* icon.png */; }; 308D05391370CCF300D202BF /* i...@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 308D05301370CCF300D202BF /* i...@2x.png */; }; 30A0434814DC770100060A13 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 30A0434314DC770100060A13 /* Localizable.strings */; }; + 30B4F30019D5E07200D9F7D8 /* Default-667h.png in Resources */ = {isa = PBXBuildFile; fileRef = 30B4F2FD19D5E07200D9F7D8 /* Default-667h.png */; }; + 30B4F30119D5E07200D9F7D8 /* Default-736h.png in Resources */ = {isa = PBXBuildFile; fileRef = 30B4F2FE19D5E07200D9F7D8 /* Default-736h.png */; }; + 30B4F30219D5E07200D9F7D8 /* Default-Landscape-736h.png in Resources */ = {isa = PBXBuildFile; fileRef = 30B4F2FF19D5E07200D9F7D8 /* Default-Landscape-736h.png */; }; 30FC414916E50CA1004E6F35 /* icon...@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 30FC414816E50CA1004E6F35 /* icon...@2x.png */; }; 5B1594DD16A7569C00FEF299 /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B1594DC16A7569C00FEF299 /* AssetsLibrary.framework */; }; 7E7966DE1810823500FA85AD /* icon-40.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966D41810823500FA85AD /* icon-40.png */; }; @@ -82,6 +85,9 @@ 308D05301370CCF300D202BF /* i...@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "i...@2x.png"; sourceTree = ""; }; 30A0434414DC770100060A13 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = Localizable.strings; sourceTree = ""; }; 30A0434714DC770100060A13 /* se */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = se; path = Localizable.strings; sourceTree = ""; }; + 30B4F2FD19D5E07200D9F7D8 /* Default-667h.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-667h.png"; sourceTree = ""; }; + 30B4F2FE19D5E07200D9F7D8 /* Default-736h.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-736h.png"; sourceTree = ""; }; + 30B4F2FF19D5E07200D9F7D8 /* Default-Landscape-736h.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape-736h.png"; sourceTree = ""; }; 30FC414816E50CA1004E6F35 /* icon...@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon...@2x.png"; sourceTree = ""; }; 32CA4F630368D1EE00C91783 /* __PROJECT_NAME__-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "__PROJECT_NAME__-Prefix.pch"; sourceTree = ""; }; 5B1594DC16A7569C00FEF299 /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType =
ios commit: CB-7648 - [iOS 8] Add iPhone 6 Plus icon to default template
Repository: cordova-ios Updated Branches: refs/heads/master d08cf362c -> 5e136a09a CB-7648 - [iOS 8] Add iPhone 6 Plus icon to default template Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/5e136a09 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/5e136a09 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/5e136a09 Branch: refs/heads/master Commit: 5e136a09a1feae3b12309ee5b33854c18c853f86 Parents: d08cf36 Author: Shazron Abdullah Authored: Fri Sep 26 12:57:56 2014 -0700 Committer: Shazron Abdullah Committed: Fri Sep 26 12:57:56 2014 -0700 -- .../project/__CLI__.xcodeproj/project.pbxproj | 4 .../project/__NON-CLI__.xcodeproj/project.pbxproj | 4 .../Resources/icons/icon...@3x.png | Bin 0 -> 30083 bytes 3 files changed, 8 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/5e136a09/bin/templates/project/__CLI__.xcodeproj/project.pbxproj -- diff --git a/bin/templates/project/__CLI__.xcodeproj/project.pbxproj b/bin/templates/project/__CLI__.xcodeproj/project.pbxproj index f74b45d..f18b857 100755 --- a/bin/templates/project/__CLI__.xcodeproj/project.pbxproj +++ b/bin/templates/project/__CLI__.xcodeproj/project.pbxproj @@ -28,6 +28,7 @@ 30B4F30019D5E07200D9F7D8 /* Default-667h.png in Resources */ = {isa = PBXBuildFile; fileRef = 30B4F2FD19D5E07200D9F7D8 /* Default-667h.png */; }; 30B4F30119D5E07200D9F7D8 /* Default-736h.png in Resources */ = {isa = PBXBuildFile; fileRef = 30B4F2FE19D5E07200D9F7D8 /* Default-736h.png */; }; 30B4F30219D5E07200D9F7D8 /* Default-Landscape-736h.png in Resources */ = {isa = PBXBuildFile; fileRef = 30B4F2FF19D5E07200D9F7D8 /* Default-Landscape-736h.png */; }; + 30C1856619D5FC0A00212699 /* icon...@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 30C1856519D5FC0A00212699 /* icon...@3x.png */; }; 30FC414916E50CA1004E6F35 /* icon...@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 30FC414816E50CA1004E6F35 /* icon...@2x.png */; }; 5B1594DD16A7569C00FEF299 /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B1594DC16A7569C00FEF299 /* AssetsLibrary.framework */; }; 7E7966DE1810823500FA85AD /* icon-40.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966D41810823500FA85AD /* icon-40.png */; }; @@ -88,6 +89,7 @@ 30B4F2FD19D5E07200D9F7D8 /* Default-667h.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-667h.png"; sourceTree = ""; }; 30B4F2FE19D5E07200D9F7D8 /* Default-736h.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-736h.png"; sourceTree = ""; }; 30B4F2FF19D5E07200D9F7D8 /* Default-Landscape-736h.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape-736h.png"; sourceTree = ""; }; + 30C1856519D5FC0A00212699 /* icon...@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon...@3x.png"; sourceTree = ""; }; 30FC414816E50CA1004E6F35 /* icon...@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon...@2x.png"; sourceTree = ""; }; 32CA4F630368D1EE00C91783 /* __PROJECT_NAME__-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "__PROJECT_NAME__-Prefix.pch"; sourceTree = ""; }; 5B1594DC16A7569C00FEF299 /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; }; @@ -233,6 +235,7 @@ 308D052D1370CCF300D202BF /* icons */ = { isa = PBXGroup; children = ( + 30C1856519D5FC0A00212699 /* icon...@3x.png */, 7E7966D41810823500FA85AD /* icon-40.png */, 7E7966D51810823500FA85AD /* icon...@2x.png */, 7E7966D61810823500FA85AD /* icon-50.png */, @@ -391,6 +394,7 @@ 3088BBC2154F3926009F9C59 /* Default~iphone.png in Resources */, D4A0D8761607E02300AEF8BB /* Default-568h@2x~iphone.png in Resources */, 30B4F30219D5E07200D9F7D8 /* Default-Landscape-736h.png in Resources */, +
git commit: Properly formatted splashscreen preference docs.
Repository: cordova-plugin-splashscreen Updated Branches: refs/heads/master ec7c6aac3 -> e1f17d666 Properly formatted splashscreen preference docs. Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/commit/e1f17d66 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/tree/e1f17d66 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/diff/e1f17d66 Branch: refs/heads/master Commit: e1f17d6665877a116cc25cb166ebfeefb96e9e5e Parents: ec7c6aa Author: Shazron Abdullah Authored: Mon Sep 29 12:03:01 2014 -0700 Committer: Shazron Abdullah Committed: Mon Sep 29 12:03:01 2014 -0700 -- doc/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/e1f17d66/doc/index.md -- diff --git a/doc/index.md b/doc/index.md index d6d6b8c..c3070cc 100644 --- a/doc/index.md +++ b/doc/index.md @@ -45,8 +45,8 @@ This plugin displays and hides a splash screen during application launch. In your config.xml, you need to add the following preferences: -`` -`` + + Where foo is the name of the splashscreen file, preferably a 9 patch file. Make sure to add your splashcreen files to your res/xml directory under the appropriate folders. The second parameter represents how long the splashscreen will appear in milliseconds. It defaults to 3000 ms. See [Icons and Splash Screens](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html) for more information.
git commit: CB-7663 - prep for unit tests
Repository: cordova-plugin-splashscreen Updated Branches: refs/heads/master e1f17d666 -> fcd628ffc CB-7663 - prep for unit tests Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/commit/fcd628ff Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/tree/fcd628ff Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/diff/fcd628ff Branch: refs/heads/master Commit: fcd628ffc9038862e5906e1fc3fe48c6cada49ba Parents: e1f17d6 Author: Shazron Abdullah Authored: Mon Sep 29 14:03:58 2014 -0700 Committer: Shazron Abdullah Committed: Mon Sep 29 14:03:58 2014 -0700 -- src/ios/CDVSplashScreen.m | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/fcd628ff/src/ios/CDVSplashScreen.m -- diff --git a/src/ios/CDVSplashScreen.m b/src/ios/CDVSplashScreen.m index 7ce828d..15c665d 100644 --- a/src/ios/CDVSplashScreen.m +++ b/src/ios/CDVSplashScreen.m @@ -19,6 +19,7 @@ #import "CDVSplashScreen.h" #import +#import #define kSplashScreenDurationDefault 0.25f @@ -116,26 +117,25 @@ [self.viewController.view removeObserver:self forKeyPath:@"bounds"]; } -// Sets the view's frame and image. -- (void)updateImage +- (NSString*)getImageName:(id)screenOrientationDelegate { UIInterfaceOrientation orientation = self.viewController.interfaceOrientation; - + // Use UILaunchImageFile if specified in plist. Otherwise, use Default. NSString* imageName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchImageFile"]; - + // Checks to see if the developer has locked the orientation to use only one of Portrait or Landscape CDVViewController* vc = (CDVViewController*)self.viewController; BOOL supportsLandscape = [vc supportsOrientation:UIInterfaceOrientationLandscapeLeft] || [vc supportsOrientation:UIInterfaceOrientationLandscapeRight]; BOOL supportsPortrait = [vc supportsOrientation:UIInterfaceOrientationPortrait] || [vc supportsOrientation:UIInterfaceOrientationPortraitUpsideDown]; BOOL isOrientationLocked = !(supportsPortrait && supportsLandscape); - + if (imageName) { imageName = [imageName stringByDeletingPathExtension]; } else { imageName = @"Default"; } - + if (CDV_IsIPhone5()) { imageName = [imageName stringByAppendingString:@"-568h"]; } else if (CDV_IsIPad()) { @@ -147,7 +147,7 @@ case UIInterfaceOrientationLandscapeRight: imageName = [imageName stringByAppendingString:@"-Landscape"]; break; - + case UIInterfaceOrientationPortrait: case UIInterfaceOrientationPortraitUpsideDown: default: @@ -156,6 +156,14 @@ } } } + +return imageName; +} + +// Sets the view's frame and image. +- (void)updateImage +{ +NSString* imageName = [self getImageName:(id)self.viewController]; if (![imageName isEqualToString:_curImageName]) { UIImage* img = [UIImage imageNamed:imageName];
git commit: CB-7663 - iOS unit tests for splash screen
Repository: cordova-plugin-splashscreen Updated Branches: refs/heads/master fcd628ffc -> d85c6a935 CB-7663 - iOS unit tests for splash screen Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/commit/d85c6a93 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/tree/d85c6a93 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/diff/d85c6a93 Branch: refs/heads/master Commit: d85c6a935949a7aa7493725e8b1e4f40aedff910 Parents: fcd628f Author: Shazron Abdullah Authored: Mon Sep 29 17:33:50 2014 -0700 Committer: Shazron Abdullah Committed: Mon Sep 29 17:33:50 2014 -0700 -- .gitignore | 9 +- src/ios/CDVSplashScreen.m | 19 +- .../contents.xcworkspacedata| 7 + .../xcshareddata/CDVSplashScreenTest.xccheckout | 41 ++ .../CDVSplashScreenLibTests/ImageNameTest.m | 175 +++ .../ImageNameTestDelegates.h| 57 +++ .../ImageNameTestDelegates.m| 200 .../CDVSplashScreenLibTests/Info.plist | 24 + .../project.pbxproj | 505 +++ .../contents.xcworkspacedata| 7 + .../xcshareddata/CDVSplashScreenTest.xccheckout | 41 ++ tests/ios/README.md | 11 + tests/ios/package.json | 10 + 13 files changed, 1094 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/d85c6a93/.gitignore -- diff --git a/.gitignore b/.gitignore index 52b558e..7d3b1ce 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -#If ignorance is bliss, then somebody knock the smile off my face +#If ignorance is bliss, then somebody knock the smile off my face *.csproj.user *.suo @@ -20,4 +20,9 @@ Thumbs.db - \ No newline at end of file + +node_modules + +/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/xcuserdata/ + +/tests/ios/CDVSplashScreenTest.xcworkspace/xcuserdata/ http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/d85c6a93/src/ios/CDVSplashScreen.m -- diff --git a/src/ios/CDVSplashScreen.m b/src/ios/CDVSplashScreen.m index 15c665d..53e3688 100644 --- a/src/ios/CDVSplashScreen.m +++ b/src/ios/CDVSplashScreen.m @@ -117,17 +117,16 @@ [self.viewController.view removeObserver:self forKeyPath:@"bounds"]; } -- (NSString*)getImageName:(id)screenOrientationDelegate +- (NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(id)orientationDelegate isIPad:(BOOL)isIPad isIPhone5:(BOOL)isIPhone5 { -UIInterfaceOrientation orientation = self.viewController.interfaceOrientation; - // Use UILaunchImageFile if specified in plist. Otherwise, use Default. NSString* imageName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchImageFile"]; +NSUInteger supportedOrientations = [orientationDelegate supportedInterfaceOrientations]; + // Checks to see if the developer has locked the orientation to use only one of Portrait or Landscape -CDVViewController* vc = (CDVViewController*)self.viewController; -BOOL supportsLandscape = [vc supportsOrientation:UIInterfaceOrientationLandscapeLeft] || [vc supportsOrientation:UIInterfaceOrientationLandscapeRight]; -BOOL supportsPortrait = [vc supportsOrientation:UIInterfaceOrientationPortrait] || [vc supportsOrientation:UIInterfaceOrientationPortraitUpsideDown]; +BOOL supportsLandscape = (supportedOrientations & UIInterfaceOrientationMaskLandscape); +BOOL supportsPortrait = (supportedOrientations & UIInterfaceOrientationMaskPortrait || supportedOrientations & UIInterfaceOrientationMaskPortraitUpsideDown); BOOL isOrientationLocked = !(supportsPortrait && supportsLandscape); if (imageName) { @@ -136,13 +135,13 @@ imageName = @"Default"; } -if (CDV_IsIPhone5()) { +if (isIPhone5) { imageName = [imageName stringByAppendingString:@"-568h"]; -} else if (CDV_IsIPad()) { +} else if (isIPad) { if (isOrientationLocked) { imageName = [imageName stringByAppendingString:(supportsLandscape ? @"-Landscape" : @"-Portrait")]; } else { -switch (orientation) { +switch (currentOrientation) { case UIInterfaceOrientationLandscapeLeft: case UIInterfaceOrientationLandscapeRight: imageName = [imageName stringByAppe
git commit: CB-7663 - Update README for command line invocation of tests
Repository: cordova-plugin-splashscreen Updated Branches: refs/heads/master d85c6a935 -> 483182f33 CB-7663 - Update README for command line invocation of tests Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/commit/483182f3 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/tree/483182f3 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/diff/483182f3 Branch: refs/heads/master Commit: 483182f33a1e7b76251e429d3f9b1b4d4efc8719 Parents: d85c6a9 Author: Shazron Abdullah Authored: Mon Sep 29 17:49:21 2014 -0700 Committer: Shazron Abdullah Committed: Mon Sep 29 17:49:21 2014 -0700 -- tests/ios/README.md | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/483182f3/tests/ios/README.md -- diff --git a/tests/ios/README.md b/tests/ios/README.md index 3be61c4..5bd4008 100644 --- a/tests/ios/README.md +++ b/tests/ios/README.md @@ -2,10 +2,20 @@ You need to install `node.js` to pull in `cordova-ios`. -To install cordova-ios: +First install cordova-ios: npm install ... in the current folder. -Then launch the `CDVSplashScreenTest.xcworkspace` file. \ No newline at end of file + +# Testing from Xcode + +1. Launch the `CDVSplashScreenTest.xcworkspace` file. +2. Choose "CDVSplashScreenLibTets" from the scheme drop-down menu +3. Click and hold on the `Play` button, and choose the `Wrench` icon to run the tests + + +# Testing from the command line + +xcodebuild -scheme CordovaLib && xcodebuild test -scheme CDVSplashScreenLibTests
git commit: Fixed iOS tests README typo.
Repository: cordova-plugin-splashscreen Updated Branches: refs/heads/master 483182f33 -> d0614c532 Fixed iOS tests README typo. Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/commit/d0614c53 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/tree/d0614c53 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/diff/d0614c53 Branch: refs/heads/master Commit: d0614c532bc1e7e0a380bd5d4fcd66324e1b68e0 Parents: 483182f Author: Shazron Abdullah Authored: Tue Sep 30 11:06:04 2014 -0700 Committer: Shazron Abdullah Committed: Tue Sep 30 11:06:04 2014 -0700 -- tests/ios/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/d0614c53/tests/ios/README.md -- diff --git a/tests/ios/README.md b/tests/ios/README.md index 5bd4008..6530421 100644 --- a/tests/ios/README.md +++ b/tests/ios/README.md @@ -12,7 +12,7 @@ First install cordova-ios: # Testing from Xcode 1. Launch the `CDVSplashScreenTest.xcworkspace` file. -2. Choose "CDVSplashScreenLibTets" from the scheme drop-down menu +2. Choose "CDVSplashScreenLibTests" from the scheme drop-down menu 3. Click and hold on the `Play` button, and choose the `Wrench` icon to run the tests
git commit: Added 'npm test'
Repository: cordova-plugin-splashscreen Updated Branches: refs/heads/master d0614c532 -> 6b8757780 Added 'npm test' Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/commit/6b875778 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/tree/6b875778 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/diff/6b875778 Branch: refs/heads/master Commit: 6b87577801cc3ed64f17969e0947e2ad127b35c4 Parents: d0614c5 Author: Shazron Abdullah Authored: Tue Sep 30 11:47:46 2014 -0700 Committer: Shazron Abdullah Committed: Tue Sep 30 11:47:46 2014 -0700 -- tests/ios/README.md| 2 +- tests/ios/package.json | 5 - 2 files changed, 5 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/6b875778/tests/ios/README.md -- diff --git a/tests/ios/README.md b/tests/ios/README.md index 6530421..b6bf31b 100644 --- a/tests/ios/README.md +++ b/tests/ios/README.md @@ -18,4 +18,4 @@ First install cordova-ios: # Testing from the command line -xcodebuild -scheme CordovaLib && xcodebuild test -scheme CDVSplashScreenLibTests +npm test http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/6b875778/tests/ios/package.json -- diff --git a/tests/ios/package.json b/tests/ios/package.json index 642484b..e121e69 100644 --- a/tests/ios/package.json +++ b/tests/ios/package.json @@ -6,5 +6,8 @@ "license": "Apache Version 2.0", "dependencies": { "cordova-ios": "^3.6.0" -} +}, +"scripts": { +"test": "xcodebuild -scheme CordovaLib && xcodebuild test -scheme CDVSplashScreenLibTests" +} } \ No newline at end of file
git commit: Fix iOS command line tests not working if Xcode was not launched at least once.
Repository: cordova-plugin-splashscreen Updated Branches: refs/heads/master 6b8757780 -> 99803ba7c Fix iOS command line tests not working if Xcode was not launched at least once. Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/commit/99803ba7 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/tree/99803ba7 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/diff/99803ba7 Branch: refs/heads/master Commit: 99803ba7c636688e4a258efe8e15e84d8bf90ed9 Parents: 6b87577 Author: Shazron Abdullah Authored: Tue Sep 30 11:52:11 2014 -0700 Committer: Shazron Abdullah Committed: Tue Sep 30 11:52:11 2014 -0700 -- .../xcschemes/CDVSplashScreenLib.xcscheme | 77 .../xcschemes/CDVSplashScreenLibTests.xcscheme | 96 2 files changed, 173 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/99803ba7/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/xcshareddata/xcschemes/CDVSplashScreenLib.xcscheme -- diff --git a/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/xcshareddata/xcschemes/CDVSplashScreenLib.xcscheme b/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/xcshareddata/xcschemes/CDVSplashScreenLib.xcscheme new file mode 100644 index 000..b97b863 --- /dev/null +++ b/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/xcshareddata/xcschemes/CDVSplashScreenLib.xcscheme @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/99803ba7/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/xcshareddata/xcschemes/CDVSplashScreenLibTests.xcscheme -- diff --git a/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/xcshareddata/xcschemes/CDVSplashScreenLibTests.xcscheme b/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/xcshareddata/xcschemes/CDVSplashScreenLibTests.xcscheme new file mode 100644 index 000..6a2a526 --- /dev/null +++ b/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/xcshareddata/xcschemes/CDVSplashScreenLibTests.xcscheme @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
git commit: Re-fix iOS command line tests not working if Xcode was not launched at least once (shared scheme was not saved in the right place)
Repository: cordova-plugin-splashscreen Updated Branches: refs/heads/master 99803ba7c -> 95f407ea0 Re-fix iOS command line tests not working if Xcode was not launched at least once (shared scheme was not saved in the right place) Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/commit/95f407ea Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/tree/95f407ea Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/diff/95f407ea Branch: refs/heads/master Commit: 95f407ea0d0691808355a78fdb98951133c33a5a Parents: 99803ba Author: Shazron Abdullah Authored: Tue Sep 30 11:56:38 2014 -0700 Committer: Shazron Abdullah Committed: Tue Sep 30 11:56:38 2014 -0700 -- .../xcshareddata/xcschemes/CordovaLib.xcscheme | 77 1 file changed, 77 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/95f407ea/tests/ios/CDVSplashScreenTest.xcworkspace/xcshareddata/xcschemes/CordovaLib.xcscheme -- diff --git a/tests/ios/CDVSplashScreenTest.xcworkspace/xcshareddata/xcschemes/CordovaLib.xcscheme b/tests/ios/CDVSplashScreenTest.xcworkspace/xcshareddata/xcschemes/CordovaLib.xcscheme new file mode 100644 index 000..13f9a15 --- /dev/null +++ b/tests/ios/CDVSplashScreenTest.xcworkspace/xcshareddata/xcschemes/CordovaLib.xcscheme @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
git commit: Added failing iPhone 6/6 Plus tests.
Repository: cordova-plugin-splashscreen Updated Branches: refs/heads/master 95f407ea0 -> 0ffe1c2d4 Added failing iPhone 6/6 Plus tests. Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/commit/0ffe1c2d Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/tree/0ffe1c2d Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/diff/0ffe1c2d Branch: refs/heads/master Commit: 0ffe1c2d461ea60fd9535553e07a9f65167569c5 Parents: 95f407e Author: Shazron Abdullah Authored: Tue Sep 30 16:59:47 2014 -0700 Committer: Shazron Abdullah Committed: Tue Sep 30 16:59:47 2014 -0700 -- src/ios/CDVSplashScreen.h | 10 + src/ios/CDVSplashScreen.m | 29 +++-- .../CDVSplashScreenLibTests/ImageNameTest.m | 45 +--- .../project.pbxproj | 6 +-- 4 files changed, 76 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/0ffe1c2d/src/ios/CDVSplashScreen.h -- diff --git a/src/ios/CDVSplashScreen.h b/src/ios/CDVSplashScreen.h index 932ad06..0d6ae39 100644 --- a/src/ios/CDVSplashScreen.h +++ b/src/ios/CDVSplashScreen.h @@ -20,6 +20,16 @@ #import #import +typedef struct { +BOOL iPhone; +BOOL iPad; +BOOL iPhone5; +BOOL iPhone6; +BOOL iPhone6Plus; +BOOL retina; + +} CDV_iOSDevice; + @interface CDVSplashScreen : CDVPlugin { UIActivityIndicatorView* _activityView; UIImageView* _imageView; http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/0ffe1c2d/src/ios/CDVSplashScreen.m -- diff --git a/src/ios/CDVSplashScreen.m b/src/ios/CDVSplashScreen.m index 53e3688..0846c55 100644 --- a/src/ios/CDVSplashScreen.m +++ b/src/ios/CDVSplashScreen.m @@ -23,6 +23,7 @@ #define kSplashScreenDurationDefault 0.25f + @implementation CDVSplashScreen - (void)pluginInitialize @@ -117,7 +118,27 @@ [self.viewController.view removeObserver:self forKeyPath:@"bounds"]; } -- (NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(id)orientationDelegate isIPad:(BOOL)isIPad isIPhone5:(BOOL)isIPhone5 +- (CDV_iOSDevice) getCurrentDevice +{ +CDV_iOSDevice device; + +UIScreen* mainScreen = [UIScreen mainScreen]; +CGFloat mainScreenHeight = mainScreen.bounds.size.height; + +device.iPad = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad); +device.iPhone = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone); +device.retina = ([mainScreen scale] == 2.0); +device.iPhone5 = (device.iPhone && mainScreenHeight == 568.0); +// note these below is not a true device detect, for example if you are on an +// iPhone 6/6+ but the app is scaled it will prob set iPhone5 as true, but +// this is appropriate for detecting the runtime screen environment +device.iPhone6 = (device.iPhone && mainScreenHeight == 667.0); +device.iPhone6Plus = (device.iPhone && mainScreenHeight == 736.0); + +return device; +} + +- (NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(id)orientationDelegate device:(CDV_iOSDevice)device { // Use UILaunchImageFile if specified in plist. Otherwise, use Default. NSString* imageName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchImageFile"]; @@ -135,9 +156,9 @@ imageName = @"Default"; } -if (isIPhone5) { +if (device.iPhone5) { imageName = [imageName stringByAppendingString:@"-568h"]; -} else if (isIPad) { +} else if (device.iPad) { if (isOrientationLocked) { imageName = [imageName stringByAppendingString:(supportsLandscape ? @"-Landscape" : @"-Portrait")]; } else { @@ -162,7 +183,7 @@ // Sets the view's frame and image. - (void)updateImage { -NSString* imageName = [self getImageName:self.viewController.interfaceOrientation delegate:(id)self.viewController isIPad:CDV_IsIPad() isIPhone5:CDV_IsIPhone5()]; +NSString* imageName = [self getImageName:self.viewController.interfaceOrientation delegate:(id)self.viewController device:[self getCurrentDevice]]; if (![imageName isEqualToString:_curImageName]) { UIImage* img = [UIImage imageNamed:imageName]; http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/0ffe1c2d/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTest.m -- diff
git commit: CB-7633 - Add support for iPhone 6/6+
Repository: cordova-plugin-splashscreen Updated Branches: refs/heads/master 0ffe1c2d4 -> 55722de1c CB-7633 - Add support for iPhone 6/6+ Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/commit/55722de1 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/tree/55722de1 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/diff/55722de1 Branch: refs/heads/master Commit: 55722de1c413a8f52cebc31567df0054dc968aa9 Parents: 0ffe1c2 Author: Shazron Abdullah Authored: Tue Sep 30 17:52:30 2014 -0700 Committer: Shazron Abdullah Committed: Tue Sep 30 17:52:30 2014 -0700 -- src/ios/CDVSplashScreen.m | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/55722de1/src/ios/CDVSplashScreen.m -- diff --git a/src/ios/CDVSplashScreen.m b/src/ios/CDVSplashScreen.m index 0846c55..91fb251 100644 --- a/src/ios/CDVSplashScreen.m +++ b/src/ios/CDVSplashScreen.m @@ -148,6 +148,7 @@ // Checks to see if the developer has locked the orientation to use only one of Portrait or Landscape BOOL supportsLandscape = (supportedOrientations & UIInterfaceOrientationMaskLandscape); BOOL supportsPortrait = (supportedOrientations & UIInterfaceOrientationMaskPortrait || supportedOrientations & UIInterfaceOrientationMaskPortraitUpsideDown); +// this means there are no mixed orientations in there BOOL isOrientationLocked = !(supportsPortrait && supportsLandscape); if (imageName) { @@ -156,9 +157,24 @@ imageName = @"Default"; } -if (device.iPhone5) { +if (device.iPhone5) { // does not support landscape imageName = [imageName stringByAppendingString:@"-568h"]; -} else if (device.iPad) { +} else if (device.iPhone6) { // does not support landscape +imageName = [imageName stringByAppendingString:@"-667h"]; +} else if (device.iPhone6Plus) { // supports landscape +switch (currentOrientation) { +case UIInterfaceOrientationLandscapeLeft: +case UIInterfaceOrientationLandscapeRight: +if (supportsLandscape) { +imageName = [imageName stringByAppendingString:@"-Landscape"]; +} +break; +default: +break; +} +imageName = [imageName stringByAppendingString:@"-736h"]; + +} else if (device.iPad) { // supports landscape if (isOrientationLocked) { imageName = [imageName stringByAppendingString:(supportsLandscape ? @"-Landscape" : @"-Portrait")]; } else {
git commit: Added more iOS splash screen tests.
Repository: cordova-plugin-splashscreen Updated Branches: refs/heads/master 55722de1c -> 4d548e67c Added more iOS splash screen tests. Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/commit/4d548e67 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/tree/4d548e67 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/diff/4d548e67 Branch: refs/heads/master Commit: 4d548e67c2aaa2bc9b460385ad7f01985a6086b5 Parents: 55722de Author: Shazron Abdullah Authored: Tue Sep 30 17:52:51 2014 -0700 Committer: Shazron Abdullah Committed: Tue Sep 30 17:52:51 2014 -0700 -- .../CDVSplashScreenLibTests/ImageNameTest.m | 151 +++ 1 file changed, 151 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/4d548e67/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTest.m -- diff --git a/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTest.m b/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTest.m index e9fb642..b19cbc5 100644 --- a/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTest.m +++ b/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTest.m @@ -115,6 +115,33 @@ const CDV_iOSDevice CDV_iOSDeviceZero = { 0, 0, 0, 0, 0, 0 }; } +- (void) currentOrientationNotSupportedHelper:(UIInterfaceOrientation)initialOrientation delegate:(id)delegate +{ +NSString* name = nil; +CDV_iOSDevice device; + +// Portrait, iPad, non-iPhone5 +device = CDV_iOSDeviceZero; device.iPad = YES; device.iPhone5 = NO; +name = [self.plugin getImageName:initialOrientation delegate:delegate device:device]; +XCTAssertTrue([@"Default-Portrait" isEqualToString:name], @"Portrait - iPad failed (%@)", name); + +// Portrait, non-iPad, iPhone5 +device = CDV_iOSDeviceZero; device.iPad = NO; device.iPhone5 = YES; +name = [self.plugin getImageName:initialOrientation delegate:delegate device:device]; +XCTAssertTrue([@"Default-568h" isEqualToString:name], @"Portrait - iPhone 5 failed (%@)", name); + +// Portrait, non-iPad, iPhone6 +device = CDV_iOSDeviceZero; device.iPad = NO; device.iPhone6 = YES; +name = [self.plugin getImageName:initialOrientation delegate:delegate device:device]; +XCTAssertTrue([@"Default-667h" isEqualToString:name], @"Portrait - iPhone 6 failed (%@)", name); + +// Portrait, non-iPad, iPhone6Plus +device = CDV_iOSDeviceZero; device.iPad = NO; device.iPhone6Plus = YES; +name = [self.plugin getImageName:initialOrientation delegate:delegate device:device]; +XCTAssertTrue([@"Default-736h" isEqualToString:name], @"Portrait - iPhone 6Plus failed (%@)", name); +} + + - (void)testPortraitOnly { PortraitOnly* delegate = [[PortraitOnly alloc] init]; @@ -203,4 +230,128 @@ const CDV_iOSDevice CDV_iOSDeviceZero = { 0, 0, 0, 0, 0, 0 }; [self landscapeHelper:UIInterfaceOrientationLandscapeRight delegate:delegate]; } +- (void)testiPadCurrentOrientationNotSupported { + +NSString* name = nil; +CDV_iOSDevice device; +UIInterfaceOrientation currentOrientation; + +/// PORTRAIT + +PortraitOnly* delegate = [[PortraitOnly alloc] init]; + +// LandscapeLeft, iPad - should always return Portrait +device = CDV_iOSDeviceZero; device.iPad = YES; +currentOrientation = UIInterfaceOrientationLandscapeLeft; +name = [self.plugin getImageName:currentOrientation delegate:delegate device:device]; +XCTAssertTrue([@"Default-Portrait" isEqualToString:name], @"Portrait - iPad failed (%@)", name); + +// LandscapeRight, iPad - should always return Portrait +device = CDV_iOSDeviceZero; device.iPad = YES; +currentOrientation = UIInterfaceOrientationLandscapeRight; +name = [self.plugin getImageName:currentOrientation delegate:delegate device:device]; +XCTAssertTrue([@"Default-Portrait" isEqualToString:name], @"Portrait - iPad failed (%@)", name); + +// Portrait, iPad - should always return Portrait +device = CDV_iOSDeviceZero; device.iPad = YES; +currentOrientation = UIInterfaceOrientationPortrait; +name = [self.plugin getImageName:currentOrientation delegate:delegate device:device]; +XCTAssertTrue([@"Default-Portrait" isEqualToString:name], @"Portrait - iPad failed (%@)", name); + +// PortraitUpsideDown, iPad - should always return Portrait +device = CDV_iOSDeviceZero; device.iPad = YES; +currentOrientation = UIInterfaceOrientati
git commit: Updated iOS tests for locked orientations
Repository: cordova-plugin-splashscreen Updated Branches: refs/heads/master 4d548e67c -> 21f372acc Updated iOS tests for locked orientations Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/commit/21f372ac Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/tree/21f372ac Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/diff/21f372ac Branch: refs/heads/master Commit: 21f372acc98c42c82daf3ce84f090c5801eb Parents: 4d548e6 Author: Shazron Abdullah Authored: Wed Oct 1 13:49:36 2014 -0700 Committer: Shazron Abdullah Committed: Wed Oct 1 13:49:36 2014 -0700 -- .../CDVSplashScreenLibTests/ImageNameTest.m | 229 --- 1 file changed, 144 insertions(+), 85 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/21f372ac/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTest.m -- diff --git a/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTest.m b/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTest.m index b19cbc5..b01a8d3 100644 --- a/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTest.m +++ b/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTest.m @@ -230,128 +230,187 @@ const CDV_iOSDevice CDV_iOSDeviceZero = { 0, 0, 0, 0, 0, 0 }; [self landscapeHelper:UIInterfaceOrientationLandscapeRight delegate:delegate]; } -- (void)testiPadCurrentOrientationNotSupported { +- (void) lockedOrientationHelper:(id)delegate expectedImageName:(NSString*)expectedImageName orientationName:(NSString*)orientationName device:(CDV_iOSDevice)device{ NSString* name = nil; -CDV_iOSDevice device; UIInterfaceOrientation currentOrientation; +NSString* deviceName = device.iPad? @"iPad" : device.iPhone6Plus? @"iPhone6Plus": device.iPhone6? @"iPhone6": device.iPhone5? @"iPhone5" : @"iPhone"; -/// PORTRAIT - -PortraitOnly* delegate = [[PortraitOnly alloc] init]; - -// LandscapeLeft, iPad - should always return Portrait -device = CDV_iOSDeviceZero; device.iPad = YES; +// LandscapeLeft, should always return expectedImageName currentOrientation = UIInterfaceOrientationLandscapeLeft; name = [self.plugin getImageName:currentOrientation delegate:delegate device:device]; -XCTAssertTrue([@"Default-Portrait" isEqualToString:name], @"Portrait - iPad failed (%@)", name); - -// LandscapeRight, iPad - should always return Portrait -device = CDV_iOSDeviceZero; device.iPad = YES; +XCTAssertTrue([expectedImageName isEqualToString:name], @"%@ - %@ failed (%@)", orientationName, deviceName, name); + +// LandscapeRight - should always return expectedImageName currentOrientation = UIInterfaceOrientationLandscapeRight; name = [self.plugin getImageName:currentOrientation delegate:delegate device:device]; -XCTAssertTrue([@"Default-Portrait" isEqualToString:name], @"Portrait - iPad failed (%@)", name); +XCTAssertTrue([expectedImageName isEqualToString:name], @"%@ - %@ failed (%@)", orientationName, deviceName, name); -// Portrait, iPad - should always return Portrait -device = CDV_iOSDeviceZero; device.iPad = YES; +// Portrait - should always return expectedImageName currentOrientation = UIInterfaceOrientationPortrait; name = [self.plugin getImageName:currentOrientation delegate:delegate device:device]; -XCTAssertTrue([@"Default-Portrait" isEqualToString:name], @"Portrait - iPad failed (%@)", name); - -// PortraitUpsideDown, iPad - should always return Portrait -device = CDV_iOSDeviceZero; device.iPad = YES; +XCTAssertTrue([expectedImageName isEqualToString:name], @"%@ - %@ failed (%@)", orientationName, deviceName, name); + +// PortraitUpsideDown - should always return expectedImageName currentOrientation = UIInterfaceOrientationPortraitUpsideDown; name = [self.plugin getImageName:currentOrientation delegate:delegate device:device]; -XCTAssertTrue([@"Default-Portrait" isEqualToString:name], @"Portrait - iPad failed (%@)", name); +XCTAssertTrue([expectedImageName isEqualToString:name], @"%@ - %@ failed (%@)", orientationName, deviceName, name); + +} + +- (void)testiPadLockedOrientation { -/// PORTRAIT UPSIDE DOWN +CDV_iOSDevice device = CDV_iOSDeviceZero; +device.iPad = YES; + +// One orientation + +PortraitOnly* delegate = [[PortraitOnly alloc] init];
git commit: CB-7633 - (Re-fix based on updated unit tests) iPhone 6 Plus support
Repository: cordova-plugin-splashscreen Updated Branches: refs/heads/master 21f372acc -> 24e6f2e0d CB-7633 - (Re-fix based on updated unit tests) iPhone 6 Plus support Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/commit/24e6f2e0 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/tree/24e6f2e0 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/diff/24e6f2e0 Branch: refs/heads/master Commit: 24e6f2e0dd3f54781bd9b9f16d49585ace53d10a Parents: 21f372a Author: Shazron Abdullah Authored: Wed Oct 1 13:59:22 2014 -0700 Committer: Shazron Abdullah Committed: Wed Oct 1 13:59:22 2014 -0700 -- src/ios/CDVSplashScreen.m | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/24e6f2e0/src/ios/CDVSplashScreen.m -- diff --git a/src/ios/CDVSplashScreen.m b/src/ios/CDVSplashScreen.m index 91fb251..ade5df0 100644 --- a/src/ios/CDVSplashScreen.m +++ b/src/ios/CDVSplashScreen.m @@ -162,15 +162,17 @@ } else if (device.iPhone6) { // does not support landscape imageName = [imageName stringByAppendingString:@"-667h"]; } else if (device.iPhone6Plus) { // supports landscape -switch (currentOrientation) { -case UIInterfaceOrientationLandscapeLeft: -case UIInterfaceOrientationLandscapeRight: -if (supportsLandscape) { -imageName = [imageName stringByAppendingString:@"-Landscape"]; -} -break; -default: -break; +if (isOrientationLocked) { +imageName = [imageName stringByAppendingString:(supportsLandscape ? @"-Landscape" : @"")]; +} else { +switch (currentOrientation) { +case UIInterfaceOrientationLandscapeLeft: +case UIInterfaceOrientationLandscapeRight: +imageName = [imageName stringByAppendingString:@"-Landscape"]; +break; +default: +break; +} } imageName = [imageName stringByAppendingString:@"-736h"];
git commit: Finalized iOS splash screen (image name) tests. 176 tests in all, 44 for each type of device (iPad, iPhone, iPhone5, iPhone6, iPhone 6 Plus).
Repository: cordova-plugin-splashscreen Updated Branches: refs/heads/master 24e6f2e0d -> 129830a76 Finalized iOS splash screen (image name) tests. 176 tests in all, 44 for each type of device (iPad, iPhone, iPhone5, iPhone6, iPhone 6 Plus). Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/commit/129830a7 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/tree/129830a7 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/diff/129830a7 Branch: refs/heads/master Commit: 129830a76c01bd027fff4b6da3743a6ce942b287 Parents: 24e6f2e Author: Shazron Abdullah Authored: Wed Oct 1 16:06:24 2014 -0700 Committer: Shazron Abdullah Committed: Wed Oct 1 16:06:24 2014 -0700 -- .../CDVSplashScreenLibTests/ImageNameTest.m | 726 +-- 1 file changed, 506 insertions(+), 220 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/129830a7/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTest.m -- diff --git a/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTest.m b/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTest.m index b01a8d3..1637d24 100644 --- a/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTest.m +++ b/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTest.m @@ -52,213 +52,39 @@ const CDV_iOSDevice CDV_iOSDeviceZero = { 0, 0, 0, 0, 0, 0 }; [super tearDown]; } -- (void) portraitHelper:(UIInterfaceOrientation)initialOrientation delegate:(id)delegate -{ -NSString* name = nil; -CDV_iOSDevice device; - -// Portrait, non-iPad, non-iPhone5 -device = CDV_iOSDeviceZero; device.iPad = NO; device.iPhone5 = NO; -name = [self.plugin getImageName:initialOrientation delegate:delegate device:device]; -XCTAssertTrue([@"Default" isEqualToString:name], @"Portrait - 3.5\" iPhone failed (%@)", name); - -// Portrait, iPad, non-iPhone5 -device = CDV_iOSDeviceZero; device.iPad = YES; device.iPhone5 = NO; -name = [self.plugin getImageName:initialOrientation delegate:delegate device:device]; -XCTAssertTrue([@"Default-Portrait" isEqualToString:name], @"Portrait - iPad failed (%@)", name); - -// Portrait, non-iPad, iPhone5 -device = CDV_iOSDeviceZero; device.iPad = NO; device.iPhone5 = YES; -name = [self.plugin getImageName:initialOrientation delegate:delegate device:device]; -XCTAssertTrue([@"Default-568h" isEqualToString:name], @"Portrait - iPhone 5 failed (%@)", name); - -// Portrait, non-iPad, iPhone6 -device = CDV_iOSDeviceZero; device.iPad = NO; device.iPhone6 = YES; -name = [self.plugin getImageName:initialOrientation delegate:delegate device:device]; -XCTAssertTrue([@"Default-667h" isEqualToString:name], @"Portrait - iPhone 6 failed (%@)", name); - -// Portrait, non-iPad, iPhone6Plus -device = CDV_iOSDeviceZero; device.iPad = NO; device.iPhone6Plus = YES; -name = [self.plugin getImageName:initialOrientation delegate:delegate device:device]; -XCTAssertTrue([@"Default-736h" isEqualToString:name], @"Portrait - iPhone 6Plus failed (%@)", name); -} - -- (void) landscapeHelper:(UIInterfaceOrientation)initialOrientation delegate:(id)delegate -{ -NSString* name = nil; -CDV_iOSDevice device; - -// Landscape, non-iPad, non-iPhone5 (does NOT support landscape) -device = CDV_iOSDeviceZero; device.iPad = NO; device.iPhone5 = NO; -name = [self.plugin getImageName:initialOrientation delegate:delegate device:device]; -XCTAssertTrue([@"Default" isEqualToString:name], @"Landscape - 3.5\" iPhone failed (%@)", name ); - -// Landscape, iPad, non-iPhone5 (supports landscape) -device = CDV_iOSDeviceZero; device.iPad = YES; device.iPhone5 = NO; -name = [self.plugin getImageName:initialOrientation delegate:delegate device:device]; -XCTAssertTrue([@"Default-Landscape" isEqualToString:name], @"Landscape - iPad failed (%@)", name); - -// Landscape, non-iPad, iPhone5 (does NOT support landscape) -device = CDV_iOSDeviceZero; device.iPad = NO; device.iPhone5 = YES; -name = [self.plugin getImageName:initialOrientation delegate:delegate device:device]; -XCTAssertTrue([@"Default-568h" isEqualToString:name], @"Landscape - iPhone5 failed (%@)", name); - -// Landscape, non-iPad, iPhone6 (does NOT support landscape) -device = CDV_iOSDeviceZero; device.iPad = NO; device.iPhone6 = YES; -name = [self.p
ios commit: CB-7627 - Remove duplicate reference to the same libCordova.a.
Repository: cordova-ios Updated Branches: refs/heads/master 5e136a09a -> 2ba35b1e2 CB-7627 - Remove duplicate reference to the same libCordova.a. libCordova.a has already been referred to as a framework, no need to force_load it again. Normally it is OK to refer to libCordova.a twice, as they are the same file anyway. But when symbolic link is used in workspace and Jenkins is use to do the build, there will be a problem because Jenkins will dereference symbolic links (https://issues.jenkins-ci.org/browse/JENKINS-5597) and now we could have 2 copies of libCordova.a, and have countless duplicate symbols errors. Signed-off-by: Shazron Abdullah Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/2ba35b1e Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/2ba35b1e Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/2ba35b1e Branch: refs/heads/master Commit: 2ba35b1e2e315f4f6776a4430cb1db56d3592865 Parents: 5e136a0 Author: Lianghui Chen Authored: Mon Sep 22 15:24:58 2014 -0400 Committer: Shazron Abdullah Committed: Wed Oct 1 23:52:39 2014 -0700 -- bin/templates/project/__CLI__.xcodeproj/project.pbxproj | 8 bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj | 8 2 files changed, 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/2ba35b1e/bin/templates/project/__CLI__.xcodeproj/project.pbxproj -- diff --git a/bin/templates/project/__CLI__.xcodeproj/project.pbxproj b/bin/templates/project/__CLI__.xcodeproj/project.pbxproj index f18b857..2c10f47 100755 --- a/bin/templates/project/__CLI__.xcodeproj/project.pbxproj +++ b/bin/templates/project/__CLI__.xcodeproj/project.pbxproj @@ -502,8 +502,6 @@ "-weak_framework", CoreMedia, "-weak-lSystem", - "-force_load", - "\"$(BUILT_PRODUCTS_DIR)/libCordova.a\"", "-ObjC", ); PRODUCT_NAME = "__PROJECT_NAME__"; @@ -533,8 +531,6 @@ "-weak_framework", CoreMedia, "-weak-lSystem", - "-force_load", - "\"$(BUILT_PRODUCTS_DIR)/libCordova.a\"", "-ObjC", ); PRODUCT_NAME = "__PROJECT_NAME__"; @@ -578,8 +574,6 @@ "-weak_framework", CoreMedia, "-weak-lSystem", - "-force_load", - "\"$(BUILT_PRODUCTS_DIR)/libCordova.a\"", "-ObjC", ); SDKROOT = iphoneos; @@ -623,8 +617,6 @@ "-weak_framework", CoreMedia, "-weak-lSystem", - "-force_load", - "\"$(BUILT_PRODUCTS_DIR)/libCordova.a\"", "-ObjC", ); SDKROOT = iphoneos; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/2ba35b1e/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj -- diff --git a/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj b/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj index bd16b20..b13d9b8 100755 --- a/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj +++ b/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj @@ -488,8 +488,6 @@ "-weak_framework", CoreMedia, "-weak-lSystem", - "-force_load", - "\"$(BUILT_PRODUCTS_DIR)/libCordova.a\"",
git commit: CB-7549 - (Re-fix) [StatusBar][iOS 8] Landscape issue (closes #15)
Repository: cordova-plugin-statusbar Updated Branches: refs/heads/master 33674fffd -> 5658e7548 CB-7549 - (Re-fix) [StatusBar][iOS 8] Landscape issue (closes #15) Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/commit/5658e754 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/tree/5658e754 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/diff/5658e754 Branch: refs/heads/master Commit: 5658e7548c813bf7d6102eea4eaa7726b727b18e Parents: 33674ff Author: Shazron Abdullah Authored: Mon Oct 6 14:43:12 2014 -0700 Committer: Shazron Abdullah Committed: Mon Oct 6 14:43:12 2014 -0700 -- src/ios/CDVStatusBar.m | 43 +-- 1 file changed, 21 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/blob/5658e754/src/ios/CDVStatusBar.m -- diff --git a/src/ios/CDVStatusBar.m b/src/ios/CDVStatusBar.m index e39424d..f305f63 100644 --- a/src/ios/CDVStatusBar.m +++ b/src/ios/CDVStatusBar.m @@ -168,10 +168,7 @@ static const void *kStatusBarStyle = &kStatusBarStyle; - (void) initializeStatusBarBackgroundView { CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame; -if (UIDeviceOrientationIsLandscape(self.viewController.interfaceOrientation) && !IsAtLeastiOSVersion(@"8.0")) { -// swap width and height. set origin to zero -statusBarFrame = CGRectMake(0, 0, statusBarFrame.size.height, statusBarFrame.size.width); -} +statusBarFrame = [self invertFrameIfNeeded:statusBarFrame orientation:self.viewController.interfaceOrientation]; _statusBarBackgroundView = [[UIView alloc] initWithFrame:statusBarFrame]; _statusBarBackgroundView.backgroundColor = _statusBarBackgroundColor; @@ -179,6 +176,19 @@ static const void *kStatusBarStyle = &kStatusBarStyle; _statusBarBackgroundView.autoresizesSubviews = YES; } +- (CGRect) invertFrameIfNeeded:(CGRect)rect orientation:(UIInterfaceOrientation)orientation { +// landscape is where (width > height). On iOS < 8, we need to invert since frames are +// always in Portrait context +if (UIDeviceOrientationIsLandscape(orientation) && (rect.size.width < rect.size.height) ) { +CGFloat temp = rect.size.width; +rect.size.width = rect.size.height; +rect.size.height = temp; +rect.origin = CGPointZero; +} + +return rect; +} + - (void) setStatusBarOverlaysWebView:(BOOL)statusBarOverlaysWebView { // we only care about the latest iOS version or a change in setting @@ -200,18 +210,13 @@ static const void *kStatusBarStyle = &kStatusBarStyle; } else { CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame; +statusBarFrame = [self invertFrameIfNeeded:statusBarFrame orientation:self.viewController.interfaceOrientation]; [self initializeStatusBarBackgroundView]; CGRect frame = self.webView.frame; - -if (UIDeviceOrientationIsLandscape(self.viewController.interfaceOrientation) && !IsAtLeastiOSVersion(@"8.0")) { -frame.origin.y = statusBarFrame.size.width; -frame.size.height -= statusBarFrame.size.width; -} else { -frame.origin.y = statusBarFrame.size.height; -frame.size.height -= statusBarFrame.size.height; -} +frame.origin.y = statusBarFrame.size.height; +frame.size.height -= statusBarFrame.size.height; self.webView.frame = frame; [self.webView.superview addSubview:_statusBarBackgroundView]; @@ -408,6 +413,7 @@ static const void *kStatusBarStyle = &kStatusBarStyle; self.viewController.view.frame = [[UIScreen mainScreen] bounds]; CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame; +statusBarFrame = [self invertFrameIfNeeded:statusBarFrame orientation:self.viewController.interfaceOrientation]; if (!self.statusBarOverlaysWebView) { @@ -415,16 +421,9 @@ static const void *kStatusBarStyle = &kStatusBarStyle; // from the current one. Therefore we need to expand the statusBarBackgroundView as well to the // statusBar's current size CGRect sbBgFrame = _statusBarBackgroundView.frame; - -if (UIDeviceOrientationIsLandscape(self.viewController.interfaceOrientation)) { -frame.origin.y = statusBarFrame.size.width; -frame.size.height -= statusBarFrame.size.width; -sbBgFrame.size = CGSizeMake
git commit: CB-7647 - [iOS 8] Support new iPhone 6 and 6 Plus Images in the CLI config.xml (closes #103)
Repository: cordova-lib Updated Branches: refs/heads/master 3fc9c198c -> cfcf3b2bb CB-7647 - [iOS 8] Support new iPhone 6 and 6 Plus Images in the CLI config.xml (closes #103) Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/cfcf3b2b Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/cfcf3b2b Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/cfcf3b2b Branch: refs/heads/master Commit: cfcf3b2bbfd95a447beff23b282e893e2abdf0c4 Parents: 3fc9c19 Author: Shazron Abdullah Authored: Fri Sep 26 12:26:56 2014 -0700 Committer: Shazron Abdullah Committed: Tue Oct 7 11:32:23 2014 -0700 -- cordova-lib/src/cordova/metadata/ios_parser.js | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/cfcf3b2b/cordova-lib/src/cordova/metadata/ios_parser.js -- diff --git a/cordova-lib/src/cordova/metadata/ios_parser.js b/cordova-lib/src/cordova/metadata/ios_parser.js index b853fab..06d6e80 100644 --- a/cordova-lib/src/cordova/metadata/ios_parser.js +++ b/cordova-lib/src/cordova/metadata/ios_parser.js @@ -122,7 +122,10 @@ module.exports.prototype = { {dest: 'Resources/splash/Default-Portrait@2x~ipad.png', width: 1536, height: 2048}, {dest: 'Resources/splash/Default-Landscape~ipad.png', width: 1024, height: 768}, {dest: 'Resources/splash/Default-Landscape@2x~ipad.png', width: 2048, height: 1536}, -{dest: 'Resources/splash/Default-568h@2x~iphone.png', width: 640, height: 1136} +{dest: 'Resources/splash/Default-568h@2x~iphone.png', width: 640, height: 1136}, +{dest: 'Resources/splash/Default-667h.png', width: 750, height: 1334}, +{dest: 'Resources/splash/Default-736h.png', width: 1242, height: 2208}, +{dest: 'Resources/splash/Default-Landscape-736h.png', width: 2208, height: 1242} ]; platformSplashScreens.forEach(function(item) { - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
git commit: CB-7649 - [iOS 8][CLI] Support iPhone 6 Plus Icon in CLI config.xml (closes #100)
Repository: cordova-lib Updated Branches: refs/heads/master 1e80c77fc -> 6922bc9b8 CB-7649 - [iOS 8][CLI] Support iPhone 6 Plus Icon in CLI config.xml (closes #100) Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/6922bc9b Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/6922bc9b Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/6922bc9b Branch: refs/heads/master Commit: 6922bc9b873aa6a09ebc720f40e21b640be0b017 Parents: 1e80c77 Author: Shazron Abdullah Authored: Fri Sep 26 13:07:11 2014 -0700 Committer: Shazron Abdullah Committed: Tue Oct 7 11:39:37 2014 -0700 -- cordova-lib/src/cordova/metadata/ios_parser.js | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/6922bc9b/cordova-lib/src/cordova/metadata/ios_parser.js -- diff --git a/cordova-lib/src/cordova/metadata/ios_parser.js b/cordova-lib/src/cordova/metadata/ios_parser.js index 06d6e80..49e389e 100644 --- a/cordova-lib/src/cordova/metadata/ios_parser.js +++ b/cordova-lib/src/cordova/metadata/ios_parser.js @@ -89,6 +89,7 @@ module.exports.prototype = { var platformIcons = [ {dest: 'icon-60.png', width: 60, height: 60}, {dest: 'icon...@2x.png', width: 120, height: 120}, +{dest: 'icon...@3x.png', width: 180, height: 180}, {dest: 'icon-76.png', width: 76, height: 76}, {dest: 'icon...@2x.png', width: 152, height: 152}, {dest: 'icon-small.png', width: 29, height: 29}, - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
docs commit: CB-7646 - [iOS 8][Docs] Add docs for new iPhone 6 and 6 Plus (closes #238) Launch Images
Repository: cordova-docs Updated Branches: refs/heads/master b7ed92648 -> 835e841c8 CB-7646 - [iOS 8][Docs] Add docs for new iPhone 6 and 6 Plus (closes #238) Launch Images Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/835e841c Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/835e841c Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/835e841c Branch: refs/heads/master Commit: 835e841c8688eddc8f499760177a969035b61bb9 Parents: b7ed926 Author: Shazron Abdullah Authored: Fri Sep 26 12:31:47 2014 -0700 Committer: Shazron Abdullah Committed: Tue Oct 7 11:50:06 2014 -0700 -- docs/en/edge/config_ref/images.md | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/835e841c/docs/en/edge/config_ref/images.md -- diff --git a/docs/en/edge/config_ref/images.md b/docs/en/edge/config_ref/images.md index 1d46195..a8849f7 100644 --- a/docs/en/edge/config_ref/images.md +++ b/docs/en/edge/config_ref/images.md @@ -164,6 +164,9 @@ You can name the source image whatever you like. The internal name in the app ar + + + - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
docs commit: CB-7650 - [iOS 8][Docs] Docs for iPhone 6 Plus Icon (closes #239)
Repository: cordova-docs Updated Branches: refs/heads/master 835e841c8 -> 4c11edd35 CB-7650 - [iOS 8][Docs] Docs for iPhone 6 Plus Icon (closes #239) Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/4c11edd3 Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/4c11edd3 Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/4c11edd3 Branch: refs/heads/master Commit: 4c11edd3526366dff62d39e4e5e76ed6a86c5a05 Parents: 835e841 Author: Shazron Abdullah Authored: Fri Sep 26 13:10:43 2014 -0700 Committer: Shazron Abdullah Committed: Tue Oct 7 11:52:16 2014 -0700 -- docs/en/edge/config_ref/images.md | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/4c11edd3/docs/en/edge/config_ref/images.md -- diff --git a/docs/en/edge/config_ref/images.md b/docs/en/edge/config_ref/images.md index a8849f7..9415922 100644 --- a/docs/en/edge/config_ref/images.md +++ b/docs/en/edge/config_ref/images.md @@ -86,6 +86,9 @@ Firefox OS iOS + + + - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
ios commit: CB-7630 - Deprecate CDV_IsIPhone5 and CDV_IsIPad macro in CDVAvailability.h
Repository: cordova-ios Updated Branches: refs/heads/master a08a7a3c8 -> 765065ce3 CB-7630 - Deprecate CDV_IsIPhone5 and CDV_IsIPad macro in CDVAvailability.h Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/765065ce Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/765065ce Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/765065ce Branch: refs/heads/master Commit: 765065ce3918aec57d05d6aa731bf5052d42712f Parents: a08a7a3 Author: Shazron Abdullah Authored: Tue Oct 7 17:48:11 2014 -0700 Committer: Shazron Abdullah Committed: Tue Oct 7 17:48:11 2014 -0700 -- CordovaLib/Classes/CDVAvailability.h| 12 ++- CordovaLib/Classes/CDVAvailabilityDeprecated.h | 38 CordovaLib/CordovaLib.xcodeproj/project.pbxproj | 4 +++ 3 files changed, 44 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/765065ce/CordovaLib/Classes/CDVAvailability.h -- diff --git a/CordovaLib/Classes/CDVAvailability.h b/CordovaLib/Classes/CDVAvailability.h index e16a951..cbcb65b 100644 --- a/CordovaLib/Classes/CDVAvailability.h +++ b/CordovaLib/Classes/CDVAvailability.h @@ -17,6 +17,8 @@ under the License. */ +#import "CDVAvailabilityDeprecated.h" + #define __CORDOVA_IOS__ #define __CORDOVA_0_9_6 906 @@ -73,22 +75,12 @@ */ #define IsAtLeastiOSVersion(X) ([[[UIDevice currentDevice] systemVersion] compare:X options:NSNumericSearch] != NSOrderedAscending) -#define CDV_IsIPad() ([[UIDevice currentDevice] respondsToSelector:@selector(userInterfaceIdiom)] && ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad)) - -#define CDV_IsIPhone5() (([[UIScreen mainScreen] bounds].size.width == 568 && [[UIScreen mainScreen] bounds].size.height == 320) || ([[UIScreen mainScreen] bounds].size.height == 568 && [[UIScreen mainScreen] bounds].size.width == 320)) - /* Return the string version of the decimal version */ #define CDV_VERSION [NSString stringWithFormat:@"%d.%d.%d", \ (CORDOVA_VERSION_MIN_REQUIRED / 1), \ (CORDOVA_VERSION_MIN_REQUIRED % 1) / 100, \ (CORDOVA_VERSION_MIN_REQUIRED % 1) % 100] -#ifdef __clang__ -#define CDV_DEPRECATED(version, msg) __attribute__((deprecated("Deprecated in Cordova " #version ". " msg))) -#else -#define CDV_DEPRECATED(version, msg) __attribute__((deprecated())) -#endif - // Enable this to log all exec() calls. #define CDV_ENABLE_EXEC_LOGGING 0 #if CDV_ENABLE_EXEC_LOGGING http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/765065ce/CordovaLib/Classes/CDVAvailabilityDeprecated.h -- diff --git a/CordovaLib/Classes/CDVAvailabilityDeprecated.h b/CordovaLib/Classes/CDVAvailabilityDeprecated.h new file mode 100644 index 000..216b4c1 --- /dev/null +++ b/CordovaLib/Classes/CDVAvailabilityDeprecated.h @@ -0,0 +1,38 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + + +#import + +#ifdef __clang__ +#define CDV_DEPRECATED(version, msg) __attribute__((deprecated("Deprecated in Cordova " #version ". " msg))) +#else +#define CDV_DEPRECATED(version, msg) __attribute__((deprecated())) +#endif + +static inline BOOL CDV_IsIPad(void) CDV_DEPRECATED(3.7.0, "This will be removed in 4.0.0"); +static inline BOOL CDV_IsIPhone5(void) CDV_DEPRECATED(3.7.0, "This will be removed in 4.0.0"); + +static inline BOOL CDV_IsIPad(void) { +return [[UIDevice currentDevice] respondsToSelector:@selector(userInterfaceIdiom)] && [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad; +} + +static inline BOOL CDV_IsIPhone5(void) { +return ([[UIScreen mainScreen] bounds].size.width == 568 && [[UIScreen mainScreen] bounds].size.height == 320) || ([[UIScreen mainScreen] bounds].size.hei
[2/3] Move CordovaLibTests into tests/
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/cba612ff/CordovaLibTests/CordovaTests.xcodeproj/project.pbxproj -- diff --git a/CordovaLibTests/CordovaTests.xcodeproj/project.pbxproj b/CordovaLibTests/CordovaTests.xcodeproj/project.pbxproj deleted file mode 100644 index e1bab9e..000 --- a/CordovaLibTests/CordovaTests.xcodeproj/project.pbxproj +++ /dev/null @@ -1,715 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 3019D58D1918C00C00D72DCC /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3019D58B1918BFF800D72DCC /* XCTest.framework */; }; - 302193F91745430F00BC8D2B /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 302193F81745430F00BC8D2B /* ImageIO.framework */; }; - 3035621714104C34006C2D43 /* CDVWhitelistTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 30356213141049E1006C2D43 /* CDVWhitelistTests.m */; }; - 303A406A152124BB00182201 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357AA141002F100DF4CF2 /* UIKit.framework */; }; - 303A406B152124BB00182201 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357AC141002F100DF4CF2 /* Foundation.framework */; }; - 303A406C152124BB00182201 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357AE141002F100DF4CF2 /* CoreGraphics.framework */; }; - 303A4072152124BB00182201 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 303A4070152124BB00182201 /* InfoPlist.strings */; }; - 303A4074152124BB00182201 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 303A4073152124BB00182201 /* main.m */; }; - 303A4078152124BB00182201 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 303A4077152124BB00182201 /* AppDelegate.m */; }; - 303A407B152124BB00182201 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 303A407A152124BB00182201 /* ViewController.m */; }; - 30610C9219AD9B95000B3781 /* CDVCommandDelegateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 30610C9119AD9B95000B3781 /* CDVCommandDelegateTests.m */; }; - 3062D1AE151D4D9D000D9128 /* CDVLocalStorageTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3062D1AD151D4D9D000D9128 /* CDVLocalStorageTests.m */; }; - 30B342F515224B360070E6A5 /* CDVWebViewTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 30B342F415224B360070E6A5 /* CDVWebViewTest.m */; }; - 30D1B08C15A2B36D0060C291 /* CDVBase64Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 30D1B08B15A2B36D0060C291 /* CDVBase64Tests.m */; }; - 30F8AE0515212587006625B3 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 68A32D7414103017006B237C /* AddressBook.framework */; }; - 30F8AE0615212587006625B3 /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357CC14100AAD00DF4CF2 /* AddressBookUI.framework */; }; - 30F8AE0715212587006625B3 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357CE14100ADA00DF4CF2 /* AudioToolbox.framework */; }; - 30F8AE0815212587006625B3 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357CF14100ADB00DF4CF2 /* AVFoundation.framework */; }; - 30F8AE0915212587006625B3 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357D014100ADE00DF4CF2 /* CoreLocation.framework */; }; - 30F8AE0A15212587006625B3 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357DC14100B1600DF4CF2 /* CoreMedia.framework */; }; - 30F8AE0B15212587006625B3 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357D414100AF200DF4CF2 /* SystemConfiguration.framework */; }; - 30F8AE0C152125B6006625B3 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357D214100AE700DF4CF2 /* MobileCoreServices.framework */; }; - 30F8AE1D152129DA006625B3 /* www in Resources */ = {isa = PBXBuildFile; fileRef = 30F8AE1C152129DA006625B3 /* www */; }; - 686357B5141002F200DF4CF2 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 686357B3141002F200DF4CF2 /* InfoPlist.strings */; }; - 686357BA141002F200DF4CF2 /* CDVPluginResultJSONSerializationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 686357B9141002F200DF4CF2 /* CDVPluginResultJSONSerializationTests.m */; }; - 68A32D7514103017006B237C /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef =
[3/3] ios commit: Move CordovaLibTests into tests/
Move CordovaLibTests into 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/cba612ff Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/cba612ff Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/cba612ff Branch: refs/heads/master Commit: cba612ff06168b50feaf3562a7b10764e98ecb3c Parents: 765065c Author: Shazron Abdullah Authored: Thu Oct 9 16:05:16 2014 -0700 Committer: Shazron Abdullah Committed: Thu Oct 9 16:05:16 2014 -0700 -- CordovaLibTests/CDVBase64Tests.m| 64 -- CordovaLibTests/CDVCommandDelegateTests.m | 57 -- CordovaLibTests/CDVFakeFileManager.h| 35 - CordovaLibTests/CDVFakeFileManager.m| 43 -- CordovaLibTests/CDVInvokedUrlCommandTests.m | 51 -- CordovaLibTests/CDVLocalStorageTests.m | 146 .../CDVPluginResultJSONSerializationTests.m | 144 CordovaLibTests/CDVStartPageTests.m | 95 --- CordovaLibTests/CDVUserAgentTest.m | 93 --- CordovaLibTests/CDVWebViewDelegateTests.m | 103 --- CordovaLibTests/CDVWebViewTest.h| 43 -- CordovaLibTests/CDVWebViewTest.m| 122 CordovaLibTests/CDVWhitelistTests.m | 259 --- CordovaLibTests/CordovaLibApp/AppDelegate.h | 33 - CordovaLibTests/CordovaLibApp/AppDelegate.m | 102 --- .../CordovaLibApp/CordovaLibApp-Info.plist | 45 -- CordovaLibTests/CordovaLibApp/ViewController.h | 25 - CordovaLibTests/CordovaLibApp/ViewController.m | 53 -- CordovaLibTests/CordovaLibApp/config.xml| 55 -- .../CordovaLibApp/en.lproj/InfoPlist.strings| 20 - CordovaLibTests/CordovaLibApp/main.m| 29 - CordovaLibTests/CordovaLibApp/www/index.html| 84 --- CordovaLibTests/CordovaLibTests-Info.plist | 42 -- .../CordovaTests.xcodeproj/project.pbxproj | 715 --- .../xcschemes/CordovaLibApp.xcscheme| 95 --- .../xcschemes/CordovaLibTests.xcscheme | 62 -- CordovaLibTests/default-5...@2x.png | Bin 18594 -> 0 bytes CordovaLibTests/en.lproj/InfoPlist.strings | 20 - tests/CordovaLibTests/CDVBase64Tests.m | 64 ++ tests/CordovaLibTests/CDVCommandDelegateTests.m | 57 ++ tests/CordovaLibTests/CDVFakeFileManager.h | 35 + tests/CordovaLibTests/CDVFakeFileManager.m | 43 ++ .../CordovaLibTests/CDVInvokedUrlCommandTests.m | 51 ++ tests/CordovaLibTests/CDVLocalStorageTests.m| 146 .../CDVPluginResultJSONSerializationTests.m | 144 tests/CordovaLibTests/CDVStartPageTests.m | 95 +++ tests/CordovaLibTests/CDVUserAgentTest.m| 93 +++ tests/CordovaLibTests/CDVWebViewDelegateTests.m | 103 +++ tests/CordovaLibTests/CDVWebViewTest.h | 43 ++ tests/CordovaLibTests/CDVWebViewTest.m | 122 tests/CordovaLibTests/CDVWhitelistTests.m | 259 +++ .../CordovaLibTests/CordovaLibApp/AppDelegate.h | 33 + .../CordovaLibTests/CordovaLibApp/AppDelegate.m | 102 +++ .../CordovaLibApp/CordovaLibApp-Info.plist | 45 ++ .../CordovaLibApp/ViewController.h | 25 + .../CordovaLibApp/ViewController.m | 53 ++ tests/CordovaLibTests/CordovaLibApp/config.xml | 55 ++ .../CordovaLibApp/en.lproj/InfoPlist.strings| 20 + tests/CordovaLibTests/CordovaLibApp/main.m | 29 + .../CordovaLibApp/www/index.html| 84 +++ .../CordovaLibTests/CordovaLibTests-Info.plist | 42 ++ .../CordovaTests.xcodeproj/project.pbxproj | 715 +++ .../xcschemes/CordovaLibApp.xcscheme| 95 +++ .../xcschemes/CordovaLibTests.xcscheme | 62 ++ tests/CordovaLibTests/default-5...@2x.png | Bin 0 -> 18594 bytes .../CordovaLibTests/en.lproj/InfoPlist.strings | 20 + 56 files changed, 2635 insertions(+), 2635 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/cba612ff/CordovaLibTests/CDVBase64Tests.m -- diff --git a/CordovaLibTests/CDVBase64Tests.m b/CordovaLibTests/CDVBase64Tests.m deleted file mode 100644 index 744601f..000 --- a/CordovaLibTests/CDVBase64Tests.m +++ /dev/null @@ -1,64 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in wri
[1/3] Move CordovaLibTests into tests/
Repository: cordova-ios Updated Branches: refs/heads/master 765065ce3 -> cba612ff0 http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/cba612ff/tests/CordovaLibTests/CDVWhitelistTests.m -- diff --git a/tests/CordovaLibTests/CDVWhitelistTests.m b/tests/CordovaLibTests/CDVWhitelistTests.m new file mode 100644 index 000..abb984c --- /dev/null +++ b/tests/CordovaLibTests/CDVWhitelistTests.m @@ -0,0 +1,259 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +#import "CDVWhitelist.h" + +@interface CDVWhitelistTests : XCTestCase +@end + +@implementation CDVWhitelistTests + +- (void)setUp +{ +[super setUp]; + +// setup code here +} + +- (void)tearDown +{ +// Tear-down code here. + +[super tearDown]; +} + +- (void)testAllowedSchemes +{ +NSArray* allowedHosts = [NSArray arrayWithObjects: +@"*.apache.org", +nil]; + +CDVWhitelist* whitelist = [[CDVWhitelist alloc] initWithArray:allowedHosts]; + +XCTAssertTrue([whitelist schemeIsAllowed:@"http"]); +XCTAssertTrue([whitelist schemeIsAllowed:@"https"]); +XCTAssertTrue([whitelist schemeIsAllowed:@"ftp"]); +XCTAssertTrue([whitelist schemeIsAllowed:@"ftps"]); +XCTAssertFalse([whitelist schemeIsAllowed:@"gopher"]); +} + +- (void)testSubdomainWildcard +{ +NSArray* allowedHosts = [NSArray arrayWithObjects: +@"*.apache.org", +nil]; + +CDVWhitelist* whitelist = [[CDVWhitelist alloc] initWithArray:allowedHosts]; + +XCTAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"http://build.apache.org";]]); +XCTAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"http://apache.org";]]); +XCTAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"http://sub1.sub0.build.apache.org";]]); +XCTAssertFalse([whitelist URLIsAllowed:[NSURL URLWithString:@"http://apache.org.ca";]]); +} + +- (void)testCatchallWildcardOnly +{ +NSArray* allowedHosts = [NSArray arrayWithObjects: +@"*", +nil]; + +CDVWhitelist* whitelist = [[CDVWhitelist alloc] initWithArray:allowedHosts]; + +XCTAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"http://apache.org";]]); +XCTAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"https://build.apache.prg";]]); +XCTAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"ftp://MyDangerousSite.org";]]); +XCTAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"ftps://apache.org.SuspiciousSite.com"]]); +XCTAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"gopher://apache.org";]]); +} + +- (void)testCatchallWildcardByProto +{ +NSArray* allowedHosts = [NSArray arrayWithObjects: +@"http://*";, +@"https://*";, +@"ftp://*";, +@"ftps://*", +nil]; + +CDVWhitelist* whitelist = [[CDVWhitelist alloc] initWithArray:allowedHosts]; + +XCTAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"http://apache.org";]]); +XCTAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"https://build.apache.prg";]]); +XCTAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"ftp://MyDangerousSite.org";]]); +XCTAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"ftps://apache.org.SuspiciousSite.com"]]); +XCTAssertFalse([whitelist URLIsAllowed:[NSURL URLWithString:@"gopher://apache.org";]]); +} + +- (void)testExactMatch +{ +NSArray* allowedHosts = [NSArray arrayWithObjects: +@"www.apache.org", +nil]; + +CDVWhitelist* whitelist = [[CDVWhitelist alloc] initWithArray:allowedHosts]; + +XCTAssertTrue([whitelist URLIsAllowed:[NSURL URLWithString:@"http://www.apache.org";]]); +XCTAssertFalse([whitelist URLIsAllowed:[NSURL URLWithString:@"http://build.apache.org";]]); +XCTAssertFalse([whitelist URLIsAllowed:[NSURL URLWithString:@"http://apache.org";]]); +} + +- (void)testNoMatchInQueryParam +{ +NSArray* allowedHosts = [NSArray arrayWithObjects: +@"www.apache.org", +nil]; + +CDVWhitelist* whitelist = [[CDVWhitelist alloc] initWithArray:allowedHosts]; + +XCTAssertFalse([whitelist URLIsAllowed:[NSURL URLWithString:@"www.malicious-site.org?url=http://w
[1/2] Changed CordovaLibTests to run in a xcworkspace, and runnable from the command line
Repository: cordova-ios Updated Branches: refs/heads/master cba612ff0 -> ff9a4ad0e http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/ff9a4ad0/tests/CordovaLibTests/CordovaTests.xcodeproj/xcshareddata/xcschemes/CordovaLibTests.xcscheme -- diff --git a/tests/CordovaLibTests/CordovaTests.xcodeproj/xcshareddata/xcschemes/CordovaLibTests.xcscheme b/tests/CordovaLibTests/CordovaTests.xcodeproj/xcshareddata/xcschemes/CordovaLibTests.xcscheme deleted file mode 100644 index 3557154..000 --- a/tests/CordovaLibTests/CordovaTests.xcodeproj/xcshareddata/xcschemes/CordovaLibTests.xcscheme +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/ff9a4ad0/tests/README.md -- diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 000..18018d2 --- /dev/null +++ b/tests/README.md @@ -0,0 +1,19 @@ +# Tests for cordova-ios + +You need to install `node.js` to run npm test + + +# Testing from Xcode + +1. Launch the `cordova-ios.xcworkspace` file. +2. Choose "CordovaLibTests" from the scheme drop-down menu +3. Click and hold on the `Play` button, and choose the `Wrench` icon to run the tests + + +# Testing from the command line + +npm test + +OR + +killall 'iOS Simulator' && xcodebuild test -scheme CordovaLibTests -destination 'platform=iOS Simulator,name=iPhone 5' http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/ff9a4ad0/tests/package.json -- diff --git a/tests/package.json b/tests/package.json new file mode 100644 index 000..82d2540 --- /dev/null +++ b/tests/package.json @@ -0,0 +1,13 @@ +{ +"name": "cordova-ios-tests", +"version": "1.0.0", +"description": "Tests for cordova-ios", +"author": "Apache Software Foundation", +"license": "Apache Version 2.0", +"dependencies": { +}, +"scripts": { +"test": "npm run cordovalib", +"cordovalib" : "killall 'iOS Simulator' && xcodebuild test -scheme CordovaLibTests -destination 'platform=iOS Simulator,name=iPhone 5'" +} +} \ No newline at end of file - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
[2/2] ios commit: Changed CordovaLibTests to run in a xcworkspace, and runnable from the command line
Changed CordovaLibTests to run in a xcworkspace, and runnable from the command line Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/ff9a4ad0 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/ff9a4ad0 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/ff9a4ad0 Branch: refs/heads/master Commit: ff9a4ad0edef0ef3b41e65b701bb9e70f8ae3385 Parents: cba612f Author: Shazron Abdullah Authored: Thu Oct 9 17:04:51 2014 -0700 Committer: Shazron Abdullah Committed: Thu Oct 9 17:04:51 2014 -0700 -- tests/CordovaLibTests/CDVBase64Tests.m | 2 +- .../CordovaLibTests/CDVInvokedUrlCommandTests.m | 2 +- tests/CordovaLibTests/CDVLocalStorageTests.m| 2 +- .../CDVPluginResultJSONSerializationTests.m | 4 +- tests/CordovaLibTests/CDVStartPageTests.m | 2 +- tests/CordovaLibTests/CDVUserAgentTest.m| 2 +- tests/CordovaLibTests/CDVWhitelistTests.m | 2 +- .../CordovaLibApp/ViewController.h | 2 +- .../CordovaLibTests.xcodeproj/project.pbxproj | 717 +++ .../CordovaTests.xcodeproj/project.pbxproj | 715 -- .../xcschemes/CordovaLibApp.xcscheme| 95 --- .../xcschemes/CordovaLibTests.xcscheme | 62 -- tests/README.md | 19 + tests/package.json | 13 + 14 files changed, 758 insertions(+), 881 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/ff9a4ad0/tests/CordovaLibTests/CDVBase64Tests.m -- diff --git a/tests/CordovaLibTests/CDVBase64Tests.m b/tests/CordovaLibTests/CDVBase64Tests.m index 744601f..0d44c2a 100644 --- a/tests/CordovaLibTests/CDVBase64Tests.m +++ b/tests/CordovaLibTests/CDVBase64Tests.m @@ -19,7 +19,7 @@ #import -#import "NSData+Base64.h" +#import @interface CDVBase64Tests : XCTestCase @end http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/ff9a4ad0/tests/CordovaLibTests/CDVInvokedUrlCommandTests.m -- diff --git a/tests/CordovaLibTests/CDVInvokedUrlCommandTests.m b/tests/CordovaLibTests/CDVInvokedUrlCommandTests.m index 3f8dd18..424ad1c 100644 --- a/tests/CordovaLibTests/CDVInvokedUrlCommandTests.m +++ b/tests/CordovaLibTests/CDVInvokedUrlCommandTests.m @@ -19,7 +19,7 @@ #import -#import "CDVInvokedUrlCommand.h" +#import @interface CDVInvokedUrlCommandTests : XCTestCase @end http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/ff9a4ad0/tests/CordovaLibTests/CDVLocalStorageTests.m -- diff --git a/tests/CordovaLibTests/CDVLocalStorageTests.m b/tests/CordovaLibTests/CDVLocalStorageTests.m index f664508..b816d4b 100644 --- a/tests/CordovaLibTests/CDVLocalStorageTests.m +++ b/tests/CordovaLibTests/CDVLocalStorageTests.m @@ -19,7 +19,7 @@ #import -#import "CDVLocalStorage.h" +#import #import "CDVWebViewTest.h" #import "CDVFakeFileManager.h" #import "ViewController.h" http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/ff9a4ad0/tests/CordovaLibTests/CDVPluginResultJSONSerializationTests.m -- diff --git a/tests/CordovaLibTests/CDVPluginResultJSONSerializationTests.m b/tests/CordovaLibTests/CDVPluginResultJSONSerializationTests.m index 48eaa82..e87f52d 100644 --- a/tests/CordovaLibTests/CDVPluginResultJSONSerializationTests.m +++ b/tests/CordovaLibTests/CDVPluginResultJSONSerializationTests.m @@ -20,8 +20,8 @@ #import #import -#import "CDVPluginResult.h" -#import "CDVJSON.h" +#import +#import @interface CDVPluginResultJSONSerializationTests : XCTestCase @end http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/ff9a4ad0/tests/CordovaLibTests/CDVStartPageTests.m -- diff --git a/tests/CordovaLibTests/CDVStartPageTests.m b/tests/CordovaLibTests/CDVStartPageTests.m index 452e4f8..5df0057 100644 --- a/tests/CordovaLibTests/CDVStartPageTests.m +++ b/tests/CordovaLibTests/CDVStartPageTests.m @@ -20,7 +20,7 @@ #import #import "CDVWebViewTest.h" -#import "CDVViewController.h" +#import #import "AppDelegate.h" @interface CDVStartPageTestViewController : UIViewController http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/ff9a4ad0/tests/CordovaLibTests/CDVUserAgentTest.m -- diff --git a/tests/CordovaLibTests/CDVUserAgentTest.m b/tests/CordovaLibTests/CDVUserAgentTest.m index 1a68364..e9066b3
ios commit: Update README.md for new tests location.
Repository: cordova-ios Updated Branches: refs/heads/master ff9a4ad0e -> c9a228957 Update README.md for new tests location. Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/c9a22895 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/c9a22895 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/c9a22895 Branch: refs/heads/master Commit: c9a22895794ed366495ebd1a6e4fe8136cbb98f1 Parents: ff9a4ad Author: Shazron Abdullah Authored: Thu Oct 9 17:07:22 2014 -0700 Committer: Shazron Abdullah Committed: Thu Oct 9 17:07:22 2014 -0700 -- README.md | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/c9a22895/README.md -- diff --git a/README.md b/README.md index 3b782a5..bdbbaa3 100644 --- a/README.md +++ b/README.md @@ -52,13 +52,10 @@ When you update to a new Cordova version, you may need to update the CordovaLib By default when you create a new project, the CordovaLib sub-project is copied into your project folder, it is not shared. -Unit Tests +Tests -1. **Create** a new Cordova project -2. **Download** the code from the **[mobile-spec](https://github.com/apache/cordova-mobile-spec)** and put all of it in the root of your **www** folder -3. Install all the http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-Line%20Interface_add_plugin_features";>core plugins -3. **Run** the project - + +See the `tests/README.md` file. Futher reading - - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
ios commit: Add test script to package.son
Repository: cordova-ios Updated Branches: refs/heads/master c9a228957 -> c3f5a2535 Add test script to package.son Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/c3f5a253 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/c3f5a253 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/c3f5a253 Branch: refs/heads/master Commit: c3f5a25351b6ade323caf787723c6b33a31aae9b Parents: c9a2289 Author: Shazron Abdullah Authored: Thu Oct 9 17:16:17 2014 -0700 Committer: Shazron Abdullah Committed: Thu Oct 9 17:16:17 2014 -0700 -- package.json | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/c3f5a253/package.json -- diff --git a/package.json b/package.json index f11f29f..f2a2345 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,9 @@ "cordova", "apache" ], +"scripts" : { +"test" : "cd tests && npm test" +}, "author": "Apache Software Foundation", "license": "Apache Version 2.0", "dependencies": { - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
[3/3] ios commit: CB-7493 - Add e2e test for 'space-in-path' and 'unicode in path/name' for core platforms (moved from root folder).
CB-7493 - Add e2e test for 'space-in-path' and 'unicode in path/name' for core platforms (moved from root folder). Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/b9f2fe8d Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/b9f2fe8d Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/b9f2fe8d Branch: refs/heads/master Commit: b9f2fe8d0c57d9548992dae8c5e1c8586c394ac5 Parents: f559a6f Author: Shazron Abdullah Authored: Thu Oct 9 17:34:42 2014 -0700 Committer: Shazron Abdullah Committed: Thu Oct 9 17:34:42 2014 -0700 -- tests/package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/b9f2fe8d/tests/package.json -- diff --git a/tests/package.json b/tests/package.json index 82d2540..e84b485 100644 --- a/tests/package.json +++ b/tests/package.json @@ -7,7 +7,8 @@ "dependencies": { }, "scripts": { -"test": "npm run cordovalib", -"cordovalib" : "killall 'iOS Simulator' && xcodebuild test -scheme CordovaLibTests -destination 'platform=iOS Simulator,name=iPhone 5'" +"test": "npm run cordovalib-test && npm run create-project-unicode-space-in-path", +"cordovalib-test" : "killall 'iOS Simulator' && xcodebuild test -scheme CordovaLibTests -destination 'platform=iOS Simulator,name=iPhone 5'", +"create-project-unicode-space-in-path" : "rm -rf \"testcreate å¿ç¨\"; ../bin/create \"testcreate å¿ç¨\" com.test.app å¿ç¨ && \"./testcreate å¿ç¨/cordova/build\" && rm -rf \"testcreate å¿ç¨\"" } } \ No newline at end of file - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
[1/3] ios commit: CB-7493 Adds test-build command to package.json
Repository: cordova-ios Updated Branches: refs/heads/master c3f5a2535 -> b9f2fe8d0 CB-7493 Adds test-build command to package.json Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/cfdc9cc5 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/cfdc9cc5 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/cfdc9cc5 Branch: refs/heads/master Commit: cfdc9cc56beef91527aab8a2f5e8223b46e5b29b Parents: 62f924e Author: Vladimir Kotikov Authored: Tue Sep 9 17:06:15 2014 +0400 Committer: Vladimir Kotikov Committed: Tue Sep 9 17:54:20 2014 +0400 -- .travis.yml | 3 +++ package.json | 3 +++ 2 files changed, 6 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/cfdc9cc5/.travis.yml -- diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000..531635b --- /dev/null +++ b/.travis.yml @@ -0,0 +1,3 @@ +language: objective-c +install: npm install +script: "npm test" \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/cfdc9cc5/package.json -- diff --git a/package.json b/package.json index f11f29f..05a4814 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,9 @@ "cordova", "apache" ], +"scripts": { +"test": "rm -rf \"testcreate å¿ç¨\"; ./bin/create \"testcreate å¿ç¨\" com.test.app å¿ç¨ && \"./testcreate å¿ç¨/cordova/build\" && rm -rf \"testcreate å¿ç¨\"" +}, "author": "Apache Software Foundation", "license": "Apache Version 2.0", "dependencies": { - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
[2/3] ios commit: Merge branch 'CB-7493' of https://github.com/MSOpenTech/cordova-ios (closes #103)
Merge branch 'CB-7493' of https://github.com/MSOpenTech/cordova-ios (closes #103) Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/f559a6f6 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/f559a6f6 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/f559a6f6 Branch: refs/heads/master Commit: f559a6f6a986bef5db67165f5f3028d4f898f42d Parents: c3f5a25 cfdc9cc Author: Shazron Abdullah Authored: Thu Oct 9 17:26:15 2014 -0700 Committer: Shazron Abdullah Committed: Thu Oct 9 17:26:15 2014 -0700 -- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) -- - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
[2/2] ios commit: Added missing tests/cordova-ios.xcworkspace
Added missing tests/cordova-ios.xcworkspace Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/1d43720e Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/1d43720e Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/1d43720e Branch: refs/heads/master Commit: 1d43720ead1eae3e858017039a51521330479eeb Parents: 3acdb29 Author: Shazron Abdullah Authored: Fri Oct 10 11:02:54 2014 -0700 Committer: Shazron Abdullah Committed: Fri Oct 10 11:02:54 2014 -0700 -- .../contents.xcworkspacedata| 10 ++ .../xcshareddata/cordova-ios.xccheckout | 41 ++ .../xcshareddata/xcschemes/CordovaLib.xcscheme | 77 +++ .../xcschemes/CordovaLibApp.xcscheme| 128 +++ .../xcschemes/CordovaLibTests.xcscheme | 110 5 files changed, 366 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/1d43720e/tests/cordova-ios.xcworkspace/contents.xcworkspacedata -- diff --git a/tests/cordova-ios.xcworkspace/contents.xcworkspacedata b/tests/cordova-ios.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000..369ca40 --- /dev/null +++ b/tests/cordova-ios.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/1d43720e/tests/cordova-ios.xcworkspace/xcshareddata/cordova-ios.xccheckout -- diff --git a/tests/cordova-ios.xcworkspace/xcshareddata/cordova-ios.xccheckout b/tests/cordova-ios.xcworkspace/xcshareddata/cordova-ios.xccheckout new file mode 100644 index 000..df6d866 --- /dev/null +++ b/tests/cordova-ios.xcworkspace/xcshareddata/cordova-ios.xccheckout @@ -0,0 +1,41 @@ + +http://www.apple.com/DTDs/PropertyList-1.0.dtd";> + + + IDESourceControlProjectFavoriteDictionaryKey + + IDESourceControlProjectIdentifier + 98C9766F-4C4F-444E-8FA9-C08C9A9BD59C + IDESourceControlProjectName + cordova-ios + IDESourceControlProjectOriginsDictionary + + BCEF5DF91F385AC4047CEAF9627D88E4C774D4FA + https://git-wip-us.apache.org/repos/asf/cordova-ios.git + + IDESourceControlProjectPath + tests/cordova-ios.xcworkspace + IDESourceControlProjectRelativeInstallPathDictionary + + BCEF5DF91F385AC4047CEAF9627D88E4C774D4FA + ../.. + + IDESourceControlProjectURL + https://git-wip-us.apache.org/repos/asf/cordova-ios.git + IDESourceControlProjectVersion + 111 + IDESourceControlProjectWCCIdentifier + BCEF5DF91F385AC4047CEAF9627D88E4C774D4FA + IDESourceControlProjectWCConfigurations + + + IDESourceControlRepositoryExtensionIdentifierKey + public.vcs.git + IDESourceControlWCCIdentifierKey + BCEF5DF91F385AC4047CEAF9627D88E4C774D4FA + IDESourceControlWCCName + cordova-ios + + + + http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/1d43720e/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaLib.xcscheme -- diff --git a/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaLib.xcscheme b/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaLib.xcscheme new file mode 100644 index 000..b3559ef --- /dev/null +++ b/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaLib.xcscheme @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/1d43720e/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaLibApp.xcscheme -- diff --git a/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaLibApp.xcscheme b/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaLibApp.xcscheme new file mode 100644 index 000..41f6d8e --- /dev/null +++ b/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaLibApp.xcscheme @@ -0,
[1/2] ios commit: Update .gitignore to not ignore .xcworkspace files
Repository: cordova-ios Updated Branches: refs/heads/master b9f2fe8d0 -> 1d43720ea Update .gitignore to not ignore .xcworkspace files Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/3acdb296 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/3acdb296 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/3acdb296 Branch: refs/heads/master Commit: 3acdb296c2d795fea54128393efda82160ce8e02 Parents: b9f2fe8 Author: Shazron Abdullah Authored: Fri Oct 10 11:02:28 2014 -0700 Committer: Shazron Abdullah Committed: Fri Oct 10 11:02:28 2014 -0700 -- .gitignore | 3 --- 1 file changed, 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3acdb296/.gitignore -- diff --git a/.gitignore b/.gitignore index e72193b..0f4014c 100644 --- a/.gitignore +++ b/.gitignore @@ -4,8 +4,5 @@ tmp *.mode1v3 *.pbxuser -*.xcworkspace xcuserdata -CordovaLib/javascript/cordova-*.js -CordovaLib/CordovaLibApp/www/cordova.ios.js console.log - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
ios commit: Updated cordova/build script to use specific SHARED_PRECOMPS_DIR variable.
Repository: cordova-ios Updated Branches: refs/heads/master 1d43720ea -> cad22c353 Updated cordova/build script to use specific SHARED_PRECOMPS_DIR variable. Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/cad22c35 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/cad22c35 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/cad22c35 Branch: refs/heads/master Commit: cad22c35362d891242e9ceab872b9c819f7ddfef Parents: 1d43720 Author: Shazron Abdullah Authored: Fri Oct 10 15:33:43 2014 -0700 Committer: Shazron Abdullah Committed: Fri Oct 10 15:33:43 2014 -0700 -- bin/templates/scripts/cordova/build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/cad22c35/bin/templates/scripts/cordova/build -- diff --git a/bin/templates/scripts/cordova/build b/bin/templates/scripts/cordova/build index 220c3af..124ce81 100755 --- a/bin/templates/scripts/cordova/build +++ b/bin/templates/scripts/cordova/build @@ -49,8 +49,8 @@ while [[ $# -gt 0 ]]; do done if (( $EMULATOR )); then -exec xcodebuild -project "$PROJECT_NAME.xcodeproj" -arch i386 -target "$PROJECT_NAME" -configuration $CONFIGURATION -sdk iphonesimulator build VALID_ARCHS="i386" CONFIGURATION_BUILD_DIR="$PROJECT_PATH/build/emulator" +exec xcodebuild -project "$PROJECT_NAME.xcodeproj" -arch i386 -target "$PROJECT_NAME" -configuration $CONFIGURATION -sdk iphonesimulator build VALID_ARCHS="i386" CONFIGURATION_BUILD_DIR="$PROJECT_PATH/build/emulator" SHARED_PRECOMPS_DIR="$PROJECT_PATH/build/sharedpch" else -exec xcodebuild -xcconfig "$CORDOVA_PATH/build.xcconfig" -project "$PROJECT_NAME.xcodeproj" ARCHS="armv7 armv7s arm64" -target "$PROJECT_NAME" -configuration $CONFIGURATION -sdk iphoneos build VALID_ARCHS="armv7 armv7s arm64" CONFIGURATION_BUILD_DIR="$PROJECT_PATH/build/device" +exec xcodebuild -xcconfig "$CORDOVA_PATH/build.xcconfig" -project "$PROJECT_NAME.xcodeproj" ARCHS="armv7 armv7s arm64" -target "$PROJECT_NAME" -configuration $CONFIGURATION -sdk iphoneos build VALID_ARCHS="armv7 armv7s arm64" CONFIGURATION_BUILD_DIR="$PROJECT_PATH/build/device" SHARED_PRECOMPS_DIR="$PROJECT_PATH/build/sharedpch" fi - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
ios commit: Created jasmine tests, removed old tests.
Repository: cordova-ios Updated Branches: refs/heads/master cad22c353 -> 8d03b08c9 Created jasmine tests, removed old 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/8d03b08c Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/8d03b08c Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/8d03b08c Branch: refs/heads/master Commit: 8d03b08c9677b8e59502514187c3544bfb9fc20a Parents: cad22c3 Author: Shazron Abdullah Authored: Fri Oct 10 15:51:25 2014 -0700 Committer: Shazron Abdullah Committed: Fri Oct 10 15:51:25 2014 -0700 -- package.json | 5 +- tests/README.md | 19 --- tests/package.json| 14 - tests/spec/cordovalib.spec.js | 50 + tests/spec/create.spec.js | 106 + 5 files changed, 160 insertions(+), 34 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/8d03b08c/package.json -- diff --git a/package.json b/package.json index f2a2345..bcd6ddd 100644 --- a/package.json +++ b/package.json @@ -13,11 +13,14 @@ "apache" ], "scripts" : { -"test" : "cd tests && npm test" +"test" : "npm run jasmine", +"jasmine" : "jasmine-node --captureExceptions --color tests/spec" + }, "author": "Apache Software Foundation", "license": "Apache Version 2.0", "dependencies": { +"jasmine-node": "~1", "shelljs": "^0.2.6", "coffee-script": "^1.7.1", "nodeunit": "^0.8.7" http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/8d03b08c/tests/README.md -- diff --git a/tests/README.md b/tests/README.md deleted file mode 100644 index 18018d2..000 --- a/tests/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# Tests for cordova-ios - -You need to install `node.js` to run npm test - - -# Testing from Xcode - -1. Launch the `cordova-ios.xcworkspace` file. -2. Choose "CordovaLibTests" from the scheme drop-down menu -3. Click and hold on the `Play` button, and choose the `Wrench` icon to run the tests - - -# Testing from the command line - -npm test - -OR - -killall 'iOS Simulator' && xcodebuild test -scheme CordovaLibTests -destination 'platform=iOS Simulator,name=iPhone 5' http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/8d03b08c/tests/package.json -- diff --git a/tests/package.json b/tests/package.json deleted file mode 100644 index e84b485..000 --- a/tests/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ -"name": "cordova-ios-tests", -"version": "1.0.0", -"description": "Tests for cordova-ios", -"author": "Apache Software Foundation", -"license": "Apache Version 2.0", -"dependencies": { -}, -"scripts": { -"test": "npm run cordovalib-test && npm run create-project-unicode-space-in-path", -"cordovalib-test" : "killall 'iOS Simulator' && xcodebuild test -scheme CordovaLibTests -destination 'platform=iOS Simulator,name=iPhone 5'", -"create-project-unicode-space-in-path" : "rm -rf \"testcreate å¿ç¨\"; ../bin/create \"testcreate å¿ç¨\" com.test.app å¿ç¨ && \"./testcreate å¿ç¨/cordova/build\" && rm -rf \"testcreate å¿ç¨\"" -} -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/8d03b08c/tests/spec/cordovalib.spec.js -- diff --git a/tests/spec/cordovalib.spec.js b/tests/spec/cordovalib.spec.js new file mode 100644 index 000..f1236ff --- /dev/null +++ b/tests/spec/cordovalib.spec.js @@ -0,0 +1,50 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.
ios commit: Updated .gitignore to ignore node_modules
Repository: cordova-ios Updated Branches: refs/heads/master 8d03b08c9 -> e3c0d36fb Updated .gitignore to ignore node_modules Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/e3c0d36f Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/e3c0d36f Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/e3c0d36f Branch: refs/heads/master Commit: e3c0d36fbd6236977d6d22f93e18db5a08f40b32 Parents: 8d03b08 Author: Shazron Abdullah Authored: Fri Oct 10 15:52:05 2014 -0700 Committer: Shazron Abdullah Committed: Fri Oct 10 15:52:05 2014 -0700 -- .gitignore | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/e3c0d36f/.gitignore -- diff --git a/.gitignore b/.gitignore index 0f4014c..7c9f41e 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ tmp *.pbxuser xcuserdata console.log +node_modules \ No newline at end of file - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
ios commit: Update README.md for Tests
Repository: cordova-ios Updated Branches: refs/heads/master e3c0d36fb -> 99aea9840 Update README.md for 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/99aea984 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/99aea984 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/99aea984 Branch: refs/heads/master Commit: 99aea98401938aa869b0fda198ae8db1d1ce4560 Parents: e3c0d36 Author: Shazron Abdullah Authored: Fri Oct 10 15:54:23 2014 -0700 Committer: Shazron Abdullah Committed: Fri Oct 10 15:54:23 2014 -0700 -- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/99aea984/README.md -- diff --git a/README.md b/README.md index bdbbaa3..5faf0dc 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,9 @@ By default when you create a new project, the CordovaLib sub-project is copied i Tests -See the `tests/README.md` file. +1. Install [node.js](http://nodejs.org) +2. Run `npm install` +3. Run `npm test` Futher reading - - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
ios commit: Added Travis CI badge to README.md
Repository: cordova-ios Updated Branches: refs/heads/master 99aea9840 -> fb66b916d Added Travis CI badge to README.md Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/fb66b916 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/fb66b916 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/fb66b916 Branch: refs/heads/master Commit: fb66b916d31ec0afce87858187e846feb7ed2f5f Parents: 99aea98 Author: Shazron Abdullah Authored: Sun Oct 12 00:32:00 2014 -0700 Committer: Shazron Abdullah Committed: Sun Oct 12 00:32:00 2014 -0700 -- README.md | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/fb66b916/README.md -- diff --git a/README.md b/README.md index 5faf0dc..d4adc20 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,9 @@ # under the License. # --> + +[![Build Status](https://travis-ci.org/apache/cordova-ios.svg)](https://travis-ci.org/apache/cordova-ios) + Cordova iOS = Cordova iOS is an iOS application library that allows for Cordova-based projects to be built for the iOS Platform. Cordova based applications are, at the core, applications written with web technology: HTML, CSS and JavaScript. - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
ios commit: CB-7775 - Add component.json for component and duo package managers (closes #102)
Repository: cordova-ios Updated Branches: refs/heads/master fb66b916d -> 875f5a4bb CB-7775 - Add component.json for component and duo package managers (closes #102) - This allows cordova-ios to be compatible with `component(1)` and `duo(1)` Signed-off-by: Shazron Abdullah Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/875f5a4b Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/875f5a4b Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/875f5a4b Branch: refs/heads/master Commit: 875f5a4bb8aba38c8e78a6989fe62a9c87047b6f Parents: fb66b91 Author: Sankar Gorthi Authored: Mon Sep 8 22:40:26 2014 -0700 Committer: Shazron Abdullah Committed: Mon Oct 13 13:41:37 2014 -0700 -- component.json | 10 ++ 1 file changed, 10 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/875f5a4b/component.json -- diff --git a/component.json b/component.json new file mode 100644 index 000..53def41 --- /dev/null +++ b/component.json @@ -0,0 +1,10 @@ +{ + "name": "cordova-ios", + "version": "3.7.0-dev", + "repository": "apache/cordova-ios", + "main": "CordovaLib/cordova.js", + "scripts": [ +"CordovaLib/cordova.js" + ], + "license": "Apache Version 2.0" +} - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
ios commit: CB-7777 - In AppDelegate, before calling handleOpenURL check whether it exists first to prevent exceptions (closes #109)
Repository: cordova-ios Updated Branches: refs/heads/master 875f5a4bb -> b1ebdab27 CB- - In AppDelegate, before calling handleOpenURL check whether it exists first to prevent exceptions (closes #109) Signed-off-by: Shazron Abdullah Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/b1ebdab2 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/b1ebdab2 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/b1ebdab2 Branch: refs/heads/master Commit: b1ebdab272c64b69ad434a7c72abd05fd660ac71 Parents: 875f5a4 Author: Emil Marashliev Authored: Mon Sep 29 15:24:14 2014 +0300 Committer: Shazron Abdullah Committed: Mon Oct 13 13:56:32 2014 -0700 -- bin/templates/project/__PROJECT_NAME__/Classes/AppDelegate.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/b1ebdab2/bin/templates/project/__PROJECT_NAME__/Classes/AppDelegate.m -- diff --git a/bin/templates/project/__PROJECT_NAME__/Classes/AppDelegate.m b/bin/templates/project/__PROJECT_NAME__/Classes/AppDelegate.m index cc82260..1cf7fb6 100644 --- a/bin/templates/project/__PROJECT_NAME__/Classes/AppDelegate.m +++ b/bin/templates/project/__PROJECT_NAME__/Classes/AppDelegate.m @@ -100,7 +100,7 @@ } // calls into javascript global function 'handleOpenURL' -NSString* jsString = [NSString stringWithFormat:@"handleOpenURL(\"%@\");", url]; +NSString* jsString = [NSString stringWithFormat:@"if (typeof handleOpenURL === 'function') { handleOpenURL(\"%@\");}", url]; [self.viewController.webView stringByEvaluatingJavaScriptFromString:jsString]; // all plugins will get the notification, and their handlers will be called - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
ios commit: CB-2520 - iOS - "original" user agent needs to be overridable (closes #112)
Repository: cordova-ios Updated Branches: refs/heads/master b1ebdab27 -> 78ca06e1a CB-2520 - iOS - "original" user agent needs to be overridable (closes #112) Signed-off-by: Shazron Abdullah Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/78ca06e1 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/78ca06e1 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/78ca06e1 Branch: refs/heads/master Commit: 78ca06e1ae14ad895d73ac5d141843cc94ecae33 Parents: b1ebdab Author: Kevin Hawkins Authored: Sat Oct 4 19:45:54 2014 -0700 Committer: Shazron Abdullah Committed: Mon Oct 13 15:07:10 2014 -0700 -- CordovaLib/Classes/CDVViewController.h | 11 ++ CordovaLib/Classes/CDVViewController.m | 11 -- tests/CordovaLibTests/CDVUserAgentTest.m | 51 --- 3 files changed, 66 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/78ca06e1/CordovaLib/Classes/CDVViewController.h -- diff --git a/CordovaLib/Classes/CDVViewController.h b/CordovaLib/Classes/CDVViewController.h index 1015c50..1d34ddd 100644 --- a/CordovaLib/Classes/CDVViewController.h +++ b/CordovaLib/Classes/CDVViewController.h @@ -48,8 +48,19 @@ @property (nonatomic, readwrite, copy) NSString* startPage; @property (nonatomic, readonly, strong) CDVCommandQueue* commandQueue; @property (nonatomic, readonly, strong) id commandDelegate; + +/** + The complete user agent that Cordova will use when sending web requests. + */ @property (nonatomic, readonly) NSString* userAgent; +/** + The base user agent data that Cordova will use to build its user agent. If this + property isn't set, Cordova will use the standard web view user agent as its + base. + */ +@property (nonatomic, readwrite, copy) NSString* baseUserAgent; + + (NSDictionary*)getBundlePlist:(NSString*)plistName; + (NSString*)applicationDocumentsDirectory; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/78ca06e1/CordovaLib/Classes/CDVViewController.m -- diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m index 66c1850..1e59b1b 100644 --- a/CordovaLib/Classes/CDVViewController.m +++ b/CordovaLib/Classes/CDVViewController.m @@ -52,7 +52,7 @@ @synthesize webView, supportedOrientations; @synthesize pluginObjects, pluginsMap, whitelist, startupPluginNames; @synthesize configParser, settings, loadFromString; -@synthesize wwwFolderName, startPage, initialized, openURL; +@synthesize wwwFolderName, startPage, initialized, openURL, baseUserAgent; @synthesize commandDelegate = _commandDelegate; @synthesize commandQueue = _commandQueue; @@ -562,9 +562,14 @@ - (NSString*)userAgent { if (_userAgent == nil) { -NSString* originalUserAgent = [CDVUserAgentUtil originalUserAgent]; +NSString *localBaseUserAgent; +if (self.baseUserAgent != nil) { +localBaseUserAgent = self.baseUserAgent; +} else { +localBaseUserAgent = [CDVUserAgentUtil originalUserAgent]; +} // Use our address as a unique number to append to the User-Agent. -_userAgent = [NSString stringWithFormat:@"%@ (%lld)", originalUserAgent, (long long)self]; +_userAgent = [NSString stringWithFormat:@"%@ (%lld)", localBaseUserAgent, (long long)self]; } return _userAgent; } http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/78ca06e1/tests/CordovaLibTests/CDVUserAgentTest.m -- diff --git a/tests/CordovaLibTests/CDVUserAgentTest.m b/tests/CordovaLibTests/CDVUserAgentTest.m index e9066b3..42d238c 100644 --- a/tests/CordovaLibTests/CDVUserAgentTest.m +++ b/tests/CordovaLibTests/CDVUserAgentTest.m @@ -31,14 +31,22 @@ @implementation CDVUserAgentTestViewController @synthesize vc1 = _vc1, vc2 = _vc2; +- (id)init +{ +self = [super init]; +if (self) { +_vc1 = [[CDVViewController alloc] init]; +_vc2 = [[CDVViewController alloc] init]; +} +return self; +} + - (void)loadView { -_vc1 = [[CDVViewController alloc] init]; _vc1.wwwFolderName = @"www"; _vc1.startPage = @"index.html"; [self addChildViewController:_vc1]; -_vc2 = [[CDVViewController alloc] init]; _vc2.wwwFolderName = @"www"; _vc2.startPage = @"index.html"; [self addChildViewController:_vc2]; @@ -74,6 +82,23 @@ [super tearDown]; } +- (void)testDefaultUserAgent +{ +CDVUserAgentTestViewController* rootVc = [[CDVUserAgentTestViewController alloc] init]; + +
js commit: CB-2520 - User agent-related changes for custom user agents in iOS
Repository: cordova-js Updated Branches: refs/heads/master 1b9dc0da8 -> d9e2a1c24 CB-2520 - User agent-related changes for custom user agents in iOS Signed-off-by: Shazron Abdullah Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/d9e2a1c2 Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/d9e2a1c2 Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/d9e2a1c2 Branch: refs/heads/master Commit: d9e2a1c2401b986b5af09ecd6b4be60df2cbf131 Parents: 1b9dc0d Author: Kevin Hawkins Authored: Tue Oct 7 14:09:32 2014 -0700 Committer: Shazron Abdullah Committed: Mon Oct 13 15:17:34 2014 -0700 -- src/ios/exec.js | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-js/blob/d9e2a1c2/src/ios/exec.js -- diff --git a/src/ios/exec.js b/src/ios/exec.js index 89c2f35..e3e8b32 100644 --- a/src/ios/exec.js +++ b/src/ios/exec.js @@ -131,15 +131,8 @@ function convertMessageToArgsNativeToJs(message) { } function iOSExec() { -// Use XHR for iOS 5 to work around a bug in -webkit-scroll. -// Use IFRAME_NAV elsewhere since it's faster and XHR bridge -// seems to have bugs in newer OS's (CB-3900, CB-3359, CB-5457, CB-4970, CB-4998, CB-5134) if (bridgeMode === undefined) { -if (navigator.userAgent) { -bridgeMode = navigator.userAgent.indexOf(' 5_') == -1 ? jsToNativeModes.IFRAME_NAV: jsToNativeModes.XHR_NO_PAYLOAD; -} else { -bridgeMode = jsToNativeModes.IFRAME_NAV; -} +bridgeMode = jsToNativeModes.IFRAME_NAV; } if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.cordova && window.webkit.messageHandlers.cordova.postMessage) { @@ -230,7 +223,7 @@ function pokeNativeViaXhr() { // Add a timestamp to the query param to prevent caching. execXhr.open('HEAD', "/!gap_exec?" + (+new Date()), true); if (!vcHeaderValue) { -vcHeaderValue = /.*\((.*)\)/.exec(navigator.userAgent)[1]; +vcHeaderValue = /.*\((.*)\)$/.exec(navigator.userAgent)[1]; } execXhr.setRequestHeader('vc', vcHeaderValue); execXhr.setRequestHeader('rc', ++requestCount); - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
ios commit: CB-2520 - built interim js from cordova-js for custom user agent support
Repository: cordova-ios Updated Branches: refs/heads/master 78ca06e1a -> c4ece0e7a CB-2520 - built interim js from cordova-js for custom user agent support Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/c4ece0e7 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/c4ece0e7 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/c4ece0e7 Branch: refs/heads/master Commit: c4ece0e7af320246c164b97b00ac78567dbfbfc4 Parents: 78ca06e Author: Shazron Abdullah Authored: Mon Oct 13 15:23:57 2014 -0700 Committer: Shazron Abdullah Committed: Mon Oct 13 15:23:57 2014 -0700 -- CordovaLib/cordova.js | 80 +++--- 1 file changed, 47 insertions(+), 33 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/c4ece0e7/CordovaLib/cordova.js -- diff --git a/CordovaLib/cordova.js b/CordovaLib/cordova.js index 3153482..963dfe6 100644 --- a/CordovaLib/cordova.js +++ b/CordovaLib/cordova.js @@ -1,5 +1,5 @@ // Platform: ios -// 3.7.0-dev-1258511 +// d9e2a1c2401b986b5af09ecd6b4be60df2cbf131 /* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -19,7 +19,7 @@ under the License. */ ;(function() { -var CORDOVA_JS_BUILD_LABEL = '3.7.0-dev-1258511'; +var PLATFORM_VERSION_BUILD_LABEL = '3.7.0-dev'; // file: src/scripts/require.js /*jshint -W079 */ @@ -175,7 +175,8 @@ function createEvent(type, data) { var cordova = { define:define, require:require, -version:CORDOVA_JS_BUILD_LABEL, +version:PLATFORM_VERSION_BUILD_LABEL, +platformVersion:PLATFORM_VERSION_BUILD_LABEL, platformId:platform.id, /** * Methods to add/remove your own addEventListener hijacking on document + window. @@ -262,11 +263,7 @@ var cordova = { * Called by native code when returning successful result from an action. */ callbackSuccess: function(callbackId, args) { -try { -cordova.callbackFromNative(callbackId, true, args.status, [args.message], args.keepCallback); -} catch (e) { -console.log("Error in success callback: " + callbackId + " = "+e); -} +cordova.callbackFromNative(callbackId, true, args.status, [args.message], args.keepCallback); }, /** @@ -275,30 +272,34 @@ var cordova = { callbackError: function(callbackId, args) { // TODO: Deprecate callbackSuccess and callbackError in favour of callbackFromNative. // Derive success from status. -try { -cordova.callbackFromNative(callbackId, false, args.status, [args.message], args.keepCallback); -} catch (e) { -console.log("Error in error callback: " + callbackId + " = "+e); -} +cordova.callbackFromNative(callbackId, false, args.status, [args.message], args.keepCallback); }, /** * Called by native code when returning the result from an action. */ -callbackFromNative: function(callbackId, success, status, args, keepCallback) { -var callback = cordova.callbacks[callbackId]; -if (callback) { -if (success && status == cordova.callbackStatus.OK) { -callback.success && callback.success.apply(null, args); -} else if (!success) { -callback.fail && callback.fail.apply(null, args); -} +callbackFromNative: function(callbackId, isSuccess, status, args, keepCallback) { +try { +var callback = cordova.callbacks[callbackId]; +if (callback) { +if (isSuccess && status == cordova.callbackStatus.OK) { +callback.success && callback.success.apply(null, args); +} else { +callback.fail && callback.fail.apply(null, args); +} -// Clear callback if not expecting any more results -if (!keepCallback) { -delete cordova.callbacks[callbackId]; +// Clear callback if not expecting any more results +if (!keepCallback) { +delete cordova.callbacks[callbackId]; +} } } +catch (err) { +var msg = "Error in " + (isSuccess ? "Success" : "Error") + " callbackId: " + callbackId + " : " + err; +console && console.log && console.log(msg); +cordova.fireWindowEvent("cordovacallbackerror", { 'message': msg }); +
[1/2] git commit: Fix for portrait/landscape detection
Repository: cordova-plugin-splashscreen Updated Branches: refs/heads/master 887f0f6c8 -> c67622f1b Fix for portrait/landscape detection Sometimes the width can be 568 or 320 depending on orientation on iPhone 5. This fixes the detection. Signed-off-by: Shazron Abdullah Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/commit/2f37eed1 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/tree/2f37eed1 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/diff/2f37eed1 Branch: refs/heads/master Commit: 2f37eed1840619c31f5fdc746cbf9324ef6afb53 Parents: 887f0f6 Author: Nic Mulvaney Authored: Sat Oct 11 18:53:40 2014 +0100 Committer: Shazron Abdullah Committed: Mon Oct 13 16:03:33 2014 -0700 -- src/ios/CDVSplashScreen.m | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/2f37eed1/src/ios/CDVSplashScreen.m -- diff --git a/src/ios/CDVSplashScreen.m b/src/ios/CDVSplashScreen.m index ade5df0..4b4d466 100644 --- a/src/ios/CDVSplashScreen.m +++ b/src/ios/CDVSplashScreen.m @@ -124,16 +124,19 @@ UIScreen* mainScreen = [UIScreen mainScreen]; CGFloat mainScreenHeight = mainScreen.bounds.size.height; +CGFloat mainScreenWidth = mainScreen.bounds.size.width; + +int limit = MAX(mainScreenHeight,mainScreenWidth); device.iPad = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad); device.iPhone = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone); device.retina = ([mainScreen scale] == 2.0); -device.iPhone5 = (device.iPhone && mainScreenHeight == 568.0); +device.iPhone5 = (device.iPhone && limit == 568.0); // note these below is not a true device detect, for example if you are on an // iPhone 6/6+ but the app is scaled it will prob set iPhone5 as true, but // this is appropriate for detecting the runtime screen environment -device.iPhone6 = (device.iPhone && mainScreenHeight == 667.0); -device.iPhone6Plus = (device.iPhone && mainScreenHeight == 736.0); +device.iPhone6 = (device.iPhone && limit == 667.0); +device.iPhone6Plus = (device.iPhone && limit == 736.0); return device; } - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
[2/2] git commit: Update iOS test to specify device
Update iOS test to specify device Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/commit/c67622f1 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/tree/c67622f1 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/diff/c67622f1 Branch: refs/heads/master Commit: c67622f1b97a9faa6d96d3c455b5e1a691bbbcbb Parents: 2f37eed Author: Shazron Abdullah Authored: Mon Oct 13 16:06:17 2014 -0700 Committer: Shazron Abdullah Committed: Mon Oct 13 16:06:17 2014 -0700 -- tests/ios/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/c67622f1/tests/ios/package.json -- diff --git a/tests/ios/package.json b/tests/ios/package.json index e121e69..ca5db59 100644 --- a/tests/ios/package.json +++ b/tests/ios/package.json @@ -8,6 +8,6 @@ "cordova-ios": "^3.6.0" }, "scripts": { -"test": "xcodebuild -scheme CordovaLib && xcodebuild test -scheme CDVSplashScreenLibTests" +"test": "xcodebuild -scheme CordovaLib && xcodebuild test -scheme CDVSplashScreenLibTests -destination 'platform=iOS Simulator,name=iPhone 5'" } } \ No newline at end of file - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
git commit: CB-7204 - Race condition when hiding and showing spinner (closes #21)
Repository: cordova-plugin-splashscreen Updated Branches: refs/heads/master c67622f1b -> d2e62a551 CB-7204 - Race condition when hiding and showing spinner (closes #21) Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/commit/d2e62a55 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/tree/d2e62a55 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/diff/d2e62a55 Branch: refs/heads/master Commit: d2e62a551c950041cb4c9683624a04d931f4bee3 Parents: c67622f Author: Shazron Abdullah Authored: Mon Oct 13 16:11:42 2014 -0700 Committer: Shazron Abdullah Committed: Mon Oct 13 16:11:42 2014 -0700 -- src/ios/CDVSplashScreen.m | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/d2e62a55/src/ios/CDVSplashScreen.m -- diff --git a/src/ios/CDVSplashScreen.m b/src/ios/CDVSplashScreen.m index 4b4d466..f65a501 100644 --- a/src/ios/CDVSplashScreen.m +++ b/src/ios/CDVSplashScreen.m @@ -292,13 +292,15 @@ duration:fadeDuration options:UIViewAnimationOptionTransitionNone animations:^(void) { -[_imageView setAlpha:0]; -[_activityView setAlpha:0]; -} - +[_imageView setAlpha:0]; +[_activityView setAlpha:0]; +} completion:^(BOOL finished) { -[self destroyViews]; -}]; +if (finished) { +[self destroyViews]; +} +} +]; } } - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
git commit: CB-7762 - Parameter list is incorrect for contacts.find
Repository: cordova-plugin-contacts Updated Branches: refs/heads/master dccdfbb1d -> e18d72d14 CB-7762 - Parameter list is incorrect for contacts.find Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/commit/e18d72d1 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/tree/e18d72d1 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/diff/e18d72d1 Branch: refs/heads/master Commit: e18d72d1418bfe412e5e102b7b202baa9ed5e147 Parents: dccdfbb Author: Shazron Abdullah Authored: Mon Oct 13 17:38:38 2014 -0700 Committer: Shazron Abdullah Committed: Mon Oct 13 17:38:38 2014 -0700 -- doc/index.md | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/e18d72d1/doc/index.md -- diff --git a/doc/index.md b/doc/index.md index d48c557..010010b 100644 --- a/doc/index.md +++ b/doc/index.md @@ -127,19 +127,21 @@ parameter to control which contact properties must be returned back. ### Parameters +- __contactFields__: Contact fields to use as a search qualifier. _(DOMString[])_ [Required] + - __contactSuccess__: Success callback function invoked with the array of Contact objects returned from the database. [Required] - __contactError__: Error callback function, invoked when an error occurs. [Optional] -- __contactFields__: Contact fields to use as a search qualifier. _(DOMString[])_ [Required] - -- __contactFindOptions__: Search options to filter navigator.contacts. [Optional] Keys include: +- __contactFindOptions__: Search options to filter navigator.contacts. [Optional] + + Keys include: -- __filter__: The search string used to find navigator.contacts. _(DOMString)_ (Default: `""`) + - __filter__: The search string used to find navigator.contacts. _(DOMString)_ (Default: `""`) -- __multiple__: Determines if the find operation returns multiple navigator.contacts. _(Boolean)_ (Default: `false`) + - __multiple__: Determines if the find operation returns multiple navigator.contacts. _(Boolean)_ (Default: `false`) -- __desiredFields__: Contact fields to be returned back. If specified, the resulting `Contact` object only features values for these fields. _(DOMString[])_ [Optional] + - __desiredFields__: Contact fields to be returned back. If specified, the resulting `Contact` object only features values for these fields. _(DOMString[])_ [Optional] ### Supported Platforms - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
git commit: CB-7761 - Misleading text in documentation
Repository: cordova-plugin-contacts Updated Branches: refs/heads/master e18d72d14 -> 15d1f9698 CB-7761 - Misleading text in documentation Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/commit/15d1f969 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/tree/15d1f969 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/diff/15d1f969 Branch: refs/heads/master Commit: 15d1f9698464335c2fbf3ec2992c87236e0f9fec Parents: e18d72d Author: Shazron Abdullah Authored: Mon Oct 13 17:40:15 2014 -0700 Committer: Shazron Abdullah Committed: Mon Oct 13 17:40:15 2014 -0700 -- doc/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/15d1f969/doc/index.md -- diff --git a/doc/index.md b/doc/index.md index 010010b..fe7c794 100644 --- a/doc/index.md +++ b/doc/index.md @@ -116,7 +116,7 @@ function specified by the __contactSuccess__ parameter. The __contactFields__ parameter specifies the fields to be used as a search qualifier. A zero-length __contactFields__ parameter is invalid and results in `ContactError.INVALID_ARGUMENT_ERROR`. A __contactFields__ value of -`"*"` returns all contact fields. +`"*"` searches all contact fields. The __contactFindOptions.filter__ string can be used as a search filter when querying the contacts database. If provided, a - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
git commit: CB-7772 - [Contacts] Cancelling pickContact should call the error callback, not the success callback
Repository: cordova-plugin-contacts Updated Branches: refs/heads/master 15d1f9698 -> e8fa35f44 CB-7772 - [Contacts] Cancelling pickContact should call the error callback, not the success callback Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/commit/e8fa35f4 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/tree/e8fa35f4 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/diff/e8fa35f4 Branch: refs/heads/master Commit: e8fa35f44d165cae13605c416ecc484b0790671e Parents: 15d1f96 Author: Shazron Abdullah Authored: Tue Oct 14 12:57:05 2014 -0700 Committer: Shazron Abdullah Committed: Tue Oct 14 12:57:05 2014 -0700 -- src/ios/CDVContacts.m | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/e8fa35f4/src/ios/CDVContacts.m -- diff --git a/src/ios/CDVContacts.m b/src/ios/CDVContacts.m index f7fb99d..719b070 100644 --- a/src/ios/CDVContacts.m +++ b/src/ios/CDVContacts.m @@ -243,7 +243,16 @@ } CFRelease(addrBook); } -CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:picker.pickedContactDictionary]; + +CDVPluginResult* result = nil; +NSNumber* recordId = picker.pickedContactDictionary[kW3ContactId]; + +if ([recordId isEqualToNumber:[NSNumber numberWithInt:kABRecordInvalidID]]) { +result = [CDVPluginResult resultWithStatus:CDVCommandStatus_NO_RESULT]; +} else { +result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:picker.pickedContactDictionary]; +} + [self.commandDelegate sendPluginResult:result callbackId:picker.callbackId]; [[peoplePicker presentingViewController] dismissViewControllerAnimated:YES completion:nil]; - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
ios commit: CB-7643 - made isValidCallbackId threadsafe
Repository: cordova-ios Updated Branches: refs/heads/master 24e3ba6c0 -> 9a3b1085f CB-7643 - made isValidCallbackId threadsafe _callbackIdPattern was being changed on multiple threads which caused bad access errors Signed-off-by: Shazron Abdullah Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/9a3b1085 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/9a3b1085 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/9a3b1085 Branch: refs/heads/master Commit: 9a3b1085f22956d463d9a5732f3316214a4a1005 Parents: 24e3ba6 Author: samedii Authored: Fri Sep 26 00:49:08 2014 +0200 Committer: Shazron Abdullah Committed: Thu Oct 16 18:40:58 2014 -0700 -- CordovaLib/Classes/CDVCommandDelegateImpl.m | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/9a3b1085/CordovaLib/Classes/CDVCommandDelegateImpl.m -- diff --git a/CordovaLib/Classes/CDVCommandDelegateImpl.m b/CordovaLib/Classes/CDVCommandDelegateImpl.m index 76f5ef4..fc3346d 100644 --- a/CordovaLib/Classes/CDVCommandDelegateImpl.m +++ b/CordovaLib/Classes/CDVCommandDelegateImpl.m @@ -31,7 +31,14 @@ if (self != nil) { _viewController = viewController; _commandQueue = _viewController.commandQueue; -_callbackIdPattern = nil; + +NSError* err = nil; +_callbackIdPattern = [NSRegularExpression regularExpressionWithPattern:@"[^A-Za-z0-9._-]" options:0 error:&err]; +if (err != nil) { +// Couldn't initialize Regex +NSLog(@"Error: Couldn't initialize regex"); +_callbackIdPattern = nil; +} } return self; } @@ -97,21 +104,11 @@ - (BOOL)isValidCallbackId:(NSString*)callbackId { -NSError* err = nil; - -if (callbackId == nil) { + +if (callbackId == nil || _callbackIdPattern == nil) { return NO; } -// Initialize on first use -if (_callbackIdPattern == nil) { -// Catch any invalid characters in the callback id. -_callbackIdPattern = [NSRegularExpression regularExpressionWithPattern:@"[^A-Za-z0-9._-]" options:0 error:&err]; -if (err != nil) { -// Couldn't initialize Regex; No is safer than Yes. -return NO; -} -} // Disallow if too long or if any invalid characters were found. if (([callbackId length] > 100) || [_callbackIdPattern firstMatchInString:callbackId options:0 range:NSMakeRange(0, [callbackId length])]) { return NO; - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
[2/2] ios commit: CB-7812 - cordova-ios xcode unit-tests are failing from npm test, in Xcode it is fine
CB-7812 - cordova-ios xcode unit-tests are failing from npm test, in Xcode it is fine Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/3058347d Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/3058347d Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/3058347d Branch: refs/heads/master Commit: 3058347d4d52c9ae8ca21c95efb9b083fbbd19ec Parents: 45b4a85 Author: Shazron Abdullah Authored: Thu Oct 16 19:20:18 2014 -0700 Committer: Shazron Abdullah Committed: Thu Oct 16 19:20:18 2014 -0700 -- tests/spec/cordovalib.spec.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3058347d/tests/spec/cordovalib.spec.js -- diff --git a/tests/spec/cordovalib.spec.js b/tests/spec/cordovalib.spec.js index f1236ff..dc581ff 100644 --- a/tests/spec/cordovalib.spec.js +++ b/tests/spec/cordovalib.spec.js @@ -23,6 +23,7 @@ var shell = require('shelljs'), util = require('util'); var tests_dir = path.join(spec, '..'); +var artifacts_dir = path.join(spec, '..', 'CordovaLibTests', 'build'); describe('cordova-lib', function() { @@ -42,7 +43,7 @@ describe('cordova-lib', function() { } // run the tests -command = util.format('xcodebuild test -workspace %s/cordova-ios.xcworkspace -scheme CordovaLibTests -destination "platform=iOS Simulator,name=iPhone 5"', tests_dir); +command = util.format('xcodebuild test -workspace %s/cordova-ios.xcworkspace -scheme CordovaLibTests -destination "platform=iOS Simulator,name=iPhone 5" CONFIGURATION_BUILD_DIR="%s"', tests_dir, artifacts_dir); shell.echo(command); return_code = shell.exec(command).code; expect(return_code).toBe(0); - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
[1/2] ios commit: Ignore test build artifacts
Repository: cordova-ios Updated Branches: refs/heads/master 9a3b1085f -> 3058347d4 Ignore test build artifacts Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/45b4a854 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/45b4a854 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/45b4a854 Branch: refs/heads/master Commit: 45b4a85497396a474a32f01a516534f528000c77 Parents: 9a3b108 Author: Shazron Abdullah Authored: Thu Oct 16 18:59:51 2014 -0700 Committer: Shazron Abdullah Committed: Thu Oct 16 18:59:51 2014 -0700 -- tests/CordovaLibTests/.gitignore | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/45b4a854/tests/CordovaLibTests/.gitignore -- diff --git a/tests/CordovaLibTests/.gitignore b/tests/CordovaLibTests/.gitignore new file mode 100644 index 000..c795b05 --- /dev/null +++ b/tests/CordovaLibTests/.gitignore @@ -0,0 +1 @@ +build \ No newline at end of file - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
[1/2] ios commit: CB-7813 - CDVWebViewDelegate fails to update the webview state properly in iOS
Repository: cordova-ios Updated Branches: refs/heads/master 3058347d4 -> d72a48acd CB-7813 - CDVWebViewDelegate fails to update the webview state properly in iOS CDVWebViewDelegate fails to update the webview state properly in iOS when a page loads an iframe using javascript and does a redirect to another page using javascript. Method didFailLoadWithError gets called while in STATE_WAITING_FOR_LOAD_START with a NSURLErrorCancelled (-999) error. Instead of entering STATE_CANCELLED in this situation it always enters STATE_IDLE, which causes didFailLoadWithError event to never fire (which depending on the app, and definitely in our case, can cause a hang condition). For a simplified Cordova project that reproduces the problem in the most straigtforward way possible, please refer to: https://github.com/greatvines/cordova-webview-state-bug-www Signed-off-by: Shazron Abdullah Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/5de0f3f7 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/5de0f3f7 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/5de0f3f7 Branch: refs/heads/master Commit: 5de0f3f7f1d39e5b45909d00862869b4fc245bb3 Parents: 3058347 Author: pbenschop Authored: Mon Sep 29 17:31:30 2014 -0700 Committer: Shazron Abdullah Committed: Fri Oct 17 15:13:30 2014 -0700 -- CordovaLib/Classes/CDVWebViewDelegate.m | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/5de0f3f7/CordovaLib/Classes/CDVWebViewDelegate.m -- diff --git a/CordovaLib/Classes/CDVWebViewDelegate.m b/CordovaLib/Classes/CDVWebViewDelegate.m index cdc3980..5a187f4 100644 --- a/CordovaLib/Classes/CDVWebViewDelegate.m +++ b/CordovaLib/Classes/CDVWebViewDelegate.m @@ -378,7 +378,11 @@ static NSString *stripFragment(NSString* url) break; case STATE_WAITING_FOR_LOAD_START: -_state = STATE_IDLE; +if ([error code] == NSURLErrorCancelled) { +_state = STATE_CANCELLED; +} else { +_state = STATE_IDLE; +} fireCallback = YES; break; - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
[2/2] ios commit: CB-7813 - Added unit test
CB-7813 - Added unit test Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/d72a48ac Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/d72a48ac Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/d72a48ac Branch: refs/heads/master Commit: d72a48acd0b9455ece519419f0cbc538a8af808c Parents: 5de0f3f Author: Shazron Abdullah Authored: Fri Oct 17 15:15:43 2014 -0700 Committer: Shazron Abdullah Committed: Fri Oct 17 15:15:43 2014 -0700 -- tests/CordovaLibTests/CDVWebViewDelegateTests.m | 35 1 file changed, 35 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d72a48ac/tests/CordovaLibTests/CDVWebViewDelegateTests.m -- diff --git a/tests/CordovaLibTests/CDVWebViewDelegateTests.m b/tests/CordovaLibTests/CDVWebViewDelegateTests.m index 7edd189..3413638 100644 --- a/tests/CordovaLibTests/CDVWebViewDelegateTests.m +++ b/tests/CordovaLibTests/CDVWebViewDelegateTests.m @@ -21,6 +21,27 @@ #import +@interface CDVWebViewDelegate2 : CDVWebViewDelegate {} + +- (void)setState:(NSInteger)state; +- (NSInteger)state; + +@end + +@implementation CDVWebViewDelegate2 + +- (void)setState:(NSInteger)state +{ +_state = state; +} + +- (NSInteger)state +{ +return _state; +} + +@end + @interface CDVWebViewDelegate () // expose private interface @@ -43,6 +64,20 @@ [super tearDown]; } +- (void)testFailLoadStateCancelled +{ +NSInteger initialState = 1; // STATE_WAITING_FOR_LOAD_START; +NSInteger expectedState = 5; // STATE_CANCELLED; +NSError* errorCancelled = [NSError errorWithDomain:NSCocoaErrorDomain code:NSURLErrorCancelled userInfo:nil]; + +CDVWebViewDelegate2* wvd = [[CDVWebViewDelegate2 alloc] initWithDelegate:nil]; // not really testing delegate handling + +wvd.state = initialState; +[wvd webView:nil didFailLoadWithError:errorCancelled]; + +XCTAssertTrue(wvd.state == expectedState, @"If the load error was through an iframe redirect (NSURLErrorCancelled), the state should be STATE_CANCELLED"); +} + - (void)testShouldLoadRequest { CDVWebViewDelegate* wvd = [[CDVWebViewDelegate alloc] initWithDelegate:nil]; // not really testing delegate handling - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
ios commit: CB-7729 - Support ios-sim 3.0 (Xcode 6) and new targets (iPhone 6/6+) (closes #107)
Repository: cordova-ios Updated Branches: refs/heads/master d72a48acd -> 307a00b31 CB-7729 - Support ios-sim 3.0 (Xcode 6) and new targets (iPhone 6/6+) (closes #107) Signed-off-by: Shazron Abdullah Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/307a00b3 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/307a00b3 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/307a00b3 Branch: refs/heads/master Commit: 307a00b310955c3a7e5147b50c336b9389348b40 Parents: d72a48a Author: aharb...@aharbick.com Authored: Thu Sep 25 15:09:22 2014 -0400 Committer: Shazron Abdullah Committed: Fri Oct 17 15:25:03 2014 -0700 -- bin/templates/scripts/cordova/emulate | 4 +- .../scripts/cordova/lib/install-emulator| 50 +-- bin/templates/scripts/cordova/run | 52 ++-- 3 files changed, 30 insertions(+), 76 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/307a00b3/bin/templates/scripts/cordova/emulate -- diff --git a/bin/templates/scripts/cordova/emulate b/bin/templates/scripts/cordova/emulate index 241cbb6..638e650 100755 --- a/bin/templates/scripts/cordova/emulate +++ b/bin/templates/scripts/cordova/emulate @@ -29,7 +29,7 @@ source "$CORDOVA_PATH/check_reqs" APP_PATH=${1:-$PROJECT_PATH/build/emulator/$(xcodebuild -project "$PROJECT_PATH/$PROJECT_NAME.xcodeproj" -arch i386 -target "$PROJECT_NAME" -configuration Debug -sdk $SDK -showBuildSettings | grep FULL_PRODUCT_NAME | awk -F ' = ' '{print $2}')} -DEVICE_FAMILY=${2:-${DEVICE_FAMILY:-iphone}} +TARGET=${2:-${TARGET:-iPhone-6}} IOS_SIM_MIN_VERSION="1.7" IOS_SIM_LOCATION=$(which ios-sim) @@ -56,4 +56,4 @@ if [ ! -d "$APP_PATH" ]; then fi # launch using ios-sim -ios-sim launch "$APP_PATH" --family "$DEVICE_FAMILY" --stderr "$CORDOVA_PATH/console.log" --stdout "$CORDOVA_PATH/console.log" --exit +ios-sim launch "$APP_PATH" --devicetypeid "com.apple.CoreSimulator.SimDeviceType.$TARGET" --stderr "$CORDOVA_PATH/console.log" --stdout "$CORDOVA_PATH/console.log" --exit http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/307a00b3/bin/templates/scripts/cordova/lib/install-emulator -- diff --git a/bin/templates/scripts/cordova/lib/install-emulator b/bin/templates/scripts/cordova/lib/install-emulator index ae2c47a..e916660 100755 --- a/bin/templates/scripts/cordova/lib/install-emulator +++ b/bin/templates/scripts/cordova/lib/install-emulator @@ -17,16 +17,20 @@ # specific language governing permissions and limitations # under the License. # -# Valid values for "--target" (case insensitive): -# "iPhone (Retina 3.5-inch)" (default) -# "iPhone (Retina 4-inch)" -# "iPhone" -# "iPad" -# "iPad (Retina)" +# Valid values for "--target" (case sensitive): +# iPhone-4s +# iPhone-5 +# iPhone-5s +# iPhone-6-Plus +# iPhone-6 +# iPad-2 +# iPad-Retina +# iPad-Air +# Resizable-iPhone +# Resizable-iPad OPTION_RESULT=() -TARGET="iPhone (Retina 3.5-inch)" -TARGET_FLAG='--family iphone --retina' +TARGET="iPhone-6" # separates "key=value", sets an array with 0th index as key, 1st index as value _parseOption() @@ -60,32 +64,6 @@ _parseArgs() _parseArgs "$@" -# lowercase the target string -TARGET_LC=`echo $TARGET | tr '[:upper:]' '[:lower:]'` - -# remember the comparison is lowercase -case "$TARGET_LC" in - "iphone (retina 3.5-inch)") -TARGET_FLAG="--family iphone --retina" -;; -"iphone (retina 4-inch)") -TARGET_FLAG="--family iphone --retina --tall" -;; -# --64bit not supportted by ios-sim yet -#"iphone retina (4-inch 64-bit)") -#TARGET_FLAG="--family iphone --retina --tall --64bit" -#;; -"iphone") -TARGET_FLAG="--family iphone" -;; -"ipad") -TARGET_FLAG="--family ipad" -;; -"ipad (retina)") -TARGET_FLAG="--family ipad --retina" -;; -esac - LIB_PATH=$( cd "$( dirname "$0" )" && pwd -P) CORDOVA_PATH="$(dirname "$LIB_PATH")" PROJECT_PATH="$(dirname "$CORDOVA_PATH")" @@ -121,6 +99,4 @@ if [[ "$IOS_SIM_VERSION" < "$IOS_SIM_MIN_VERSION" ]]; then fi # launch using ios-sim -ios-sim
ios commit: Increment ios-deploy min version to 1.2.0 and ios-sim min version to 3.0
Repository: cordova-ios Updated Branches: refs/heads/master 307a00b31 -> bdbb026fc Increment ios-deploy min version to 1.2.0 and ios-sim min version to 3.0 Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/bdbb026f Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/bdbb026f Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/bdbb026f Branch: refs/heads/master Commit: bdbb026fce26d476485f708f8ec9398b3ec714db Parents: 307a00b Author: Shazron Abdullah Authored: Fri Oct 17 15:35:46 2014 -0700 Committer: Shazron Abdullah Committed: Fri Oct 17 15:35:46 2014 -0700 -- bin/templates/scripts/cordova/emulate | 2 +- bin/templates/scripts/cordova/lib/install-device | 2 +- bin/templates/scripts/cordova/lib/install-emulator | 2 +- bin/templates/scripts/cordova/run | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/bdbb026f/bin/templates/scripts/cordova/emulate -- diff --git a/bin/templates/scripts/cordova/emulate b/bin/templates/scripts/cordova/emulate index 638e650..5c68a82 100755 --- a/bin/templates/scripts/cordova/emulate +++ b/bin/templates/scripts/cordova/emulate @@ -31,7 +31,7 @@ APP_PATH=${1:-$PROJECT_PATH/build/emulator/$(xcodebuild -project "$PROJECT_PATH/ TARGET=${2:-${TARGET:-iPhone-6}} -IOS_SIM_MIN_VERSION="1.7" +IOS_SIM_MIN_VERSION="3.0" IOS_SIM_LOCATION=$(which ios-sim) if [ $? != 0 ]; then echo -e "\033[31mError: ios-sim was not found. Please download, build and install version $IOS_SIM_MIN_VERSION or greater from https://github.com/phonegap/ios-sim into your path. Or 'npm install -g ios-sim' using node.js: http://nodejs.org/\033[m"; 1>&2; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/bdbb026f/bin/templates/scripts/cordova/lib/install-device -- diff --git a/bin/templates/scripts/cordova/lib/install-device b/bin/templates/scripts/cordova/lib/install-device index 617442f..4cea6c7 100755 --- a/bin/templates/scripts/cordova/lib/install-device +++ b/bin/templates/scripts/cordova/lib/install-device @@ -40,7 +40,7 @@ if [ ! -d "$DEVICE_APP_PATH" ]; then fi -IOS_DEPLOY_MIN_VERSION="1.0.4" +IOS_DEPLOY_MIN_VERSION="1.2.0" IOS_DEPLOY_LOCATION=$(which ios-deploy) if [ $? != 0 ]; then echo -e "\033[31mError: ios-deploy was not found. Please download, build and install version $IOS_DEPLOY_MIN_VERSION or greater from https://github.com/phonegap/ios-deploy into your path. Or 'npm install -g ios-deploy' using node.js: http://nodejs.org/\033[m";; exit 1; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/bdbb026f/bin/templates/scripts/cordova/lib/install-emulator -- diff --git a/bin/templates/scripts/cordova/lib/install-emulator b/bin/templates/scripts/cordova/lib/install-emulator index e916660..65d2036 100755 --- a/bin/templates/scripts/cordova/lib/install-emulator +++ b/bin/templates/scripts/cordova/lib/install-emulator @@ -84,7 +84,7 @@ if [ ! -d "$SIMULATOR_APP_PATH" ]; then exit 1 fi -IOS_SIM_MIN_VERSION="1.7" +IOS_SIM_MIN_VERSION="3.0" IOS_SIM_LOCATION=$(which ios-sim) if [ $? != 0 ]; then echo -e "\033[31mError: ios-sim was not found. Please download, build and install version $IOS_SIM_MIN_VERSION or greater from https://github.com/phonegap/ios-sim into your path. Or 'npm install -g ios-sim' using node.js: http://nodejs.org/\033[m";; exit 1; http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/bdbb026f/bin/templates/scripts/cordova/run -- diff --git a/bin/templates/scripts/cordova/run b/bin/templates/scripts/cordova/run index b4d45d0..ff60876 100755 --- a/bin/templates/scripts/cordova/run +++ b/bin/templates/scripts/cordova/run @@ -90,7 +90,7 @@ source "$CORDOVA_PATH/check_reqs" # if device build found, run it first if "$USE_DEVICE"; then -IOS_DEPLOY_MIN_VERSION="1.0.4" +IOS_DEPLOY_MIN_VERSION="1.2.0" IOS_DEPLOY_LOCATION=$(which ios-deploy) if [ $? != 0 ]; then echo -e "\033[31mError: ios-deploy was not found. Please download, build and install version $IOS_DEPLOY_MIN_VERSION or greater from https://github.com/phonegap/ios-deploy into your path. Or 'npm install -g ios-deploy' using node.js: http://nodejs.org/\033[m"; 1>&2; @@ -116,7 +116,7 @@ if "$USE_DEVICE"; then
ios commit: Update cordova/lib/list-emulator-images for ios-sim 3.0
Repository: cordova-ios Updated Branches: refs/heads/master bdbb026fc -> 10c87e249 Update cordova/lib/list-emulator-images for ios-sim 3.0 Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/10c87e24 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/10c87e24 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/10c87e24 Branch: refs/heads/master Commit: 10c87e249ade65c427cbfa5248d6c7f4f3c0d85f Parents: bdbb026 Author: Shazron Abdullah Authored: Fri Oct 17 16:21:06 2014 -0700 Committer: Shazron Abdullah Committed: Fri Oct 17 16:21:06 2014 -0700 -- bin/templates/scripts/cordova/lib/list-emulator-images | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/10c87e24/bin/templates/scripts/cordova/lib/list-emulator-images -- diff --git a/bin/templates/scripts/cordova/lib/list-emulator-images b/bin/templates/scripts/cordova/lib/list-emulator-images index a73de7b..689f22c 100755 --- a/bin/templates/scripts/cordova/lib/list-emulator-images +++ b/bin/templates/scripts/cordova/lib/list-emulator-images @@ -26,15 +26,14 @@ set -e -echo \""iPhone (Retina 3.5-inch)"\" -echo \""iPhone (Retina 4-inch)"\" +IOS_SIM_VERSION=$(ios-sim --version) -# this assumes Xcode 5 minimum not supported by ios-sim yet -# echo \""iPhone (Retina 4-inch 64-bit)"\" +if [[ "$IOS_SIM_VERSION" < "$IOS_SIM_MIN_VERSION" ]]; then + echo "Cordova needs ios-sim version $IOS_SIM_MIN_VERSION or greater, you have version $IOS_SIM_VERSION." 1>&2; + exit 1 +fi -echo \""iPhone"\" -echo \""iPad"\" -echo \""iPad (Retina)"\" +ios-sim showdevicetypes 2>&1 | sed "s/com.apple.CoreSimulator.SimDeviceType.//g" | awk -F',' '{print $1}' - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
ios commit: Remove "Valid values for --target" in script headers. Use "cordova/lib/list-emulator-images" to get the list.
Repository: cordova-ios Updated Branches: refs/heads/master 10c87e249 -> 8dd4d6ffa Remove "Valid values for --target" in script headers. Use "cordova/lib/list-emulator-images" to get the list. Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/8dd4d6ff Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/8dd4d6ff Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/8dd4d6ff Branch: refs/heads/master Commit: 8dd4d6ffa8394aa415a059f6c9b5ea15b2c66ac8 Parents: 10c87e2 Author: Shazron Abdullah Authored: Fri Oct 17 16:27:29 2014 -0700 Committer: Shazron Abdullah Committed: Fri Oct 17 16:27:29 2014 -0700 -- bin/templates/scripts/cordova/lib/install-device | 6 -- bin/templates/scripts/cordova/lib/install-emulator | 11 --- bin/templates/scripts/cordova/lib/list-emulator-images | 7 --- bin/templates/scripts/cordova/lib/list-started-emulators | 6 -- bin/templates/scripts/cordova/lib/start-emulator | 6 -- 5 files changed, 36 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/8dd4d6ff/bin/templates/scripts/cordova/lib/install-device -- diff --git a/bin/templates/scripts/cordova/lib/install-device b/bin/templates/scripts/cordova/lib/install-device index 4cea6c7..bb57e93 100755 --- a/bin/templates/scripts/cordova/lib/install-device +++ b/bin/templates/scripts/cordova/lib/install-device @@ -17,12 +17,6 @@ # specific language governing permissions and limitations # under the License. # -# Valid values for "--target" (case insensitive): -# "iPhone (Retina 3.5-inch)" (default) -# "iPhone (Retina 4-inch)" -# "iPhone" -# "iPad" -# "iPad (Retina)" LIB_PATH=$( cd "$( dirname "$0" )" && pwd -P) CORDOVA_PATH="$(dirname "$LIB_PATH")" http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/8dd4d6ff/bin/templates/scripts/cordova/lib/install-emulator -- diff --git a/bin/templates/scripts/cordova/lib/install-emulator b/bin/templates/scripts/cordova/lib/install-emulator index 65d2036..2be0f45 100755 --- a/bin/templates/scripts/cordova/lib/install-emulator +++ b/bin/templates/scripts/cordova/lib/install-emulator @@ -17,17 +17,6 @@ # specific language governing permissions and limitations # under the License. # -# Valid values for "--target" (case sensitive): -# iPhone-4s -# iPhone-5 -# iPhone-5s -# iPhone-6-Plus -# iPhone-6 -# iPad-2 -# iPad-Retina -# iPad-Air -# Resizable-iPhone -# Resizable-iPad OPTION_RESULT=() TARGET="iPhone-6" http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/8dd4d6ff/bin/templates/scripts/cordova/lib/list-emulator-images -- diff --git a/bin/templates/scripts/cordova/lib/list-emulator-images b/bin/templates/scripts/cordova/lib/list-emulator-images index 689f22c..88dcd6b 100755 --- a/bin/templates/scripts/cordova/lib/list-emulator-images +++ b/bin/templates/scripts/cordova/lib/list-emulator-images @@ -16,13 +16,6 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -# -# Valid values for "--target" (case insensitive): -# "iPhone Retina (3.5-inch)" (default) -# "iPhone Retina (4-inch)" -# "iPhone" -# "iPad" -# "iPad Retina" set -e http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/8dd4d6ff/bin/templates/scripts/cordova/lib/list-started-emulators -- diff --git a/bin/templates/scripts/cordova/lib/list-started-emulators b/bin/templates/scripts/cordova/lib/list-started-emulators index cfafe67..ccdb1a7 100755 --- a/bin/templates/scripts/cordova/lib/list-started-emulators +++ b/bin/templates/scripts/cordova/lib/list-started-emulators @@ -17,12 +17,6 @@ # specific language governing permissions and limitations # under the License. # -# Valid values for "--target" (case insensitive): -# "iPhone (Retina 3.5-inch)" (default) -# "iPhone (Retina 4-inch)" -# "iPhone" -# "iPad" -# "iPad (Retina)" set -e http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/8dd4d6ff/bin/templates/scripts/cordova/lib/start-emulator -- diff --git a/bin/templates/scripts/cordova/lib/start-emulator b/bin/temp
ios commit: Add support for the iPod in cordova/lib/list-devices script.
Repository: cordova-ios Updated Branches: refs/heads/master 8dd4d6ffa -> b53d21ac4 Add support for the iPod in cordova/lib/list-devices script. Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/b53d21ac Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/b53d21ac Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/b53d21ac Branch: refs/heads/master Commit: b53d21ac4467d04c3a1f48713b7a20c1c65c195f Parents: 8dd4d6f Author: Shazron Abdullah Authored: Fri Oct 17 16:27:52 2014 -0700 Committer: Shazron Abdullah Committed: Fri Oct 17 16:27:52 2014 -0700 -- bin/templates/scripts/cordova/lib/list-devices | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/b53d21ac/bin/templates/scripts/cordova/lib/list-devices -- diff --git a/bin/templates/scripts/cordova/lib/list-devices b/bin/templates/scripts/cordova/lib/list-devices index 80dd3b8..feacfba 100755 --- a/bin/templates/scripts/cordova/lib/list-devices +++ b/bin/templates/scripts/cordova/lib/list-devices @@ -20,3 +20,4 @@ system_profiler SPUSBDataType | sed -n -e '/iPad/,/Serial/p' | grep "Serial Number:" | awk -F ": " '{print $2 " iPad"}' system_profiler SPUSBDataType | sed -n -e '/iPhone/,/Serial/p' | grep "Serial Number:" | awk -F ": " '{print $2 " iPhone"}' +system_profiler SPUSBDataType | sed -n -e '/iPod/,/Serial/p' | grep "Serial Number:" | awk -F ": " '{print $2 " iPod"}' - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
ios commit: Remove non-working applescript to start emulator, use Instruments to start iOS Simulator now.
Repository: cordova-ios Updated Branches: refs/heads/master b53d21ac4 -> 21f2749c5 Remove non-working applescript to start emulator, use Instruments to start iOS Simulator now. Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/21f2749c Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/21f2749c Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/21f2749c Branch: refs/heads/master Commit: 21f2749c56794b4d33724c14cba89eba1b1d8031 Parents: b53d21a Author: Shazron Abdullah Authored: Fri Oct 17 16:36:05 2014 -0700 Committer: Shazron Abdullah Committed: Fri Oct 17 16:36:05 2014 -0700 -- .../scripts/cordova/lib/sim.applescript | 31 .../scripts/cordova/lib/start-emulator | 7 +++-- 2 files changed, 4 insertions(+), 34 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/21f2749c/bin/templates/scripts/cordova/lib/sim.applescript -- diff --git a/bin/templates/scripts/cordova/lib/sim.applescript b/bin/templates/scripts/cordova/lib/sim.applescript deleted file mode 100755 index 8425625..000 --- a/bin/templates/scripts/cordova/lib/sim.applescript +++ /dev/null @@ -1,31 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -tell application "System Events" - set UI elements enabled to true -end tell - -tell application "iPhone Simulator" -activate -end tell - -tell application "System Events" -tell process "iPhone Simulator" -click menu item "$DEVICE_NAME" of menu 1 of menu item "Device" of menu 1 of menu bar item "Hardware" of menu bar 1 -click menu item "Home" of menu 1 of menu bar item "Hardware" of menu bar 1 -end tell -end tell http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/21f2749c/bin/templates/scripts/cordova/lib/start-emulator -- diff --git a/bin/templates/scripts/cordova/lib/start-emulator b/bin/templates/scripts/cordova/lib/start-emulator index 7e6885f..c300bb3 100755 --- a/bin/templates/scripts/cordova/lib/start-emulator +++ b/bin/templates/scripts/cordova/lib/start-emulator @@ -17,13 +17,14 @@ # specific language governing permissions and limitations # under the License. # +# Run the below to get the device targets: +# xcrun instruments -s set -e -DEFAULT_TARGET="iPhone Retina (3.5-inch)" +DEFAULT_TARGET="iPhone 5s" TARGET=${1:-$DEFAULT_TARGET} LIB_PATH=$( cd "$( dirname "$0" )" && pwd -P) -SCPT=`sed -e "s/\\$DEVICE_NAME/$TARGET/g" "$LIB_PATH/sim.applescript"` -osascript -e "$SCPT" +xcrun instruments -w "$TARGET" \ No newline at end of file - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
ios commit: Fix cordova/lib/list-started-emulators for Xcode 6
Repository: cordova-ios Updated Branches: refs/heads/master 21f2749c5 -> 442606a19 Fix cordova/lib/list-started-emulators for Xcode 6 Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/442606a1 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/442606a1 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/442606a1 Branch: refs/heads/master Commit: 442606a194a1bbf54a755614500a4179bf7a59c3 Parents: 21f2749 Author: Shazron Abdullah Authored: Fri Oct 17 16:37:29 2014 -0700 Committer: Shazron Abdullah Committed: Fri Oct 17 16:37:29 2014 -0700 -- bin/templates/scripts/cordova/lib/list-started-emulators | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/442606a1/bin/templates/scripts/cordova/lib/list-started-emulators -- diff --git a/bin/templates/scripts/cordova/lib/list-started-emulators b/bin/templates/scripts/cordova/lib/list-started-emulators index ccdb1a7..badab2c 100755 --- a/bin/templates/scripts/cordova/lib/list-started-emulators +++ b/bin/templates/scripts/cordova/lib/list-started-emulators @@ -20,7 +20,7 @@ set -e -SIM_RUNNING=$(ps aux | grep -i "[i]Phone Simulator" | wc -l) +SIM_RUNNING=$(ps aux | grep -i "[i]OS Simulator" | wc -l) if [ $SIM_RUNNING == 0 ]; then echo "No emulators are running." exit 1 - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
[1/3] ios commit: Fix cordova/lib/install-emulator to pass in the correct prefix for ios-sim --devicetypeid
Repository: cordova-ios Updated Branches: refs/heads/master 442606a19 -> 7cd2e2b9e Fix cordova/lib/install-emulator to pass in the correct prefix for ios-sim --devicetypeid Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/14fa0a83 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/14fa0a83 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/14fa0a83 Branch: refs/heads/master Commit: 14fa0a8367ab7fc4a0d7ae873b4cf0ea2cdd7dcb Parents: 442606a Author: Shazron Abdullah Authored: Fri Oct 17 16:45:27 2014 -0700 Committer: Shazron Abdullah Committed: Fri Oct 17 16:45:27 2014 -0700 -- bin/templates/scripts/cordova/lib/install-emulator | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/14fa0a83/bin/templates/scripts/cordova/lib/install-emulator -- diff --git a/bin/templates/scripts/cordova/lib/install-emulator b/bin/templates/scripts/cordova/lib/install-emulator index 2be0f45..bcf926e 100755 --- a/bin/templates/scripts/cordova/lib/install-emulator +++ b/bin/templates/scripts/cordova/lib/install-emulator @@ -88,4 +88,4 @@ if [[ "$IOS_SIM_VERSION" < "$IOS_SIM_MIN_VERSION" ]]; then fi # launch using ios-sim -ios-sim launch "$SIMULATOR_APP_PATH" --stderr "$CORDOVA_PATH/console.log" --stdout "$CORDOVA_PATH/console.log" --devicetypeid $TARGET --exit +ios-sim launch "$SIMULATOR_APP_PATH" --stderr "$CORDOVA_PATH/console.log" --stdout "$CORDOVA_PATH/console.log" --devicetypeid "com.apple.CoreSimulator.SimDeviceType.$TARGET" --exit - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
[3/3] ios commit: Suppress output of cordova/lib/start-emulator for harmless message (we don't need to specify a template to Instruments)
Suppress output of cordova/lib/start-emulator for harmless message (we don't need to specify a template to Instruments) Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/7cd2e2b9 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/7cd2e2b9 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/7cd2e2b9 Branch: refs/heads/master Commit: 7cd2e2b9ee696775a8e01368a7c17c4dad8a37a5 Parents: 5bbfbf8 Author: Shazron Abdullah Authored: Fri Oct 17 16:46:27 2014 -0700 Committer: Shazron Abdullah Committed: Fri Oct 17 16:46:27 2014 -0700 -- bin/templates/scripts/cordova/lib/start-emulator | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/7cd2e2b9/bin/templates/scripts/cordova/lib/start-emulator -- diff --git a/bin/templates/scripts/cordova/lib/start-emulator b/bin/templates/scripts/cordova/lib/start-emulator index c300bb3..624335b 100755 --- a/bin/templates/scripts/cordova/lib/start-emulator +++ b/bin/templates/scripts/cordova/lib/start-emulator @@ -27,4 +27,4 @@ DEFAULT_TARGET="iPhone 5s" TARGET=${1:-$DEFAULT_TARGET} LIB_PATH=$( cd "$( dirname "$0" )" && pwd -P) -xcrun instruments -w "$TARGET" \ No newline at end of file +xcrun instruments -w "$TARGET" &> /dev/null \ No newline at end of file - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
[2/3] ios commit: Add ios-sim version check (3.0) to cordova/lib/list-emulator-images
Add ios-sim version check (3.0) to cordova/lib/list-emulator-images Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/5bbfbf8a Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/5bbfbf8a Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/5bbfbf8a Branch: refs/heads/master Commit: 5bbfbf8a60ad6aa4453a9458b64f276b36eb8d02 Parents: 14fa0a8 Author: Shazron Abdullah Authored: Fri Oct 17 16:45:50 2014 -0700 Committer: Shazron Abdullah Committed: Fri Oct 17 16:45:50 2014 -0700 -- bin/templates/scripts/cordova/lib/list-emulator-images | 7 +++ 1 file changed, 7 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/5bbfbf8a/bin/templates/scripts/cordova/lib/list-emulator-images -- diff --git a/bin/templates/scripts/cordova/lib/list-emulator-images b/bin/templates/scripts/cordova/lib/list-emulator-images index 88dcd6b..c831370 100755 --- a/bin/templates/scripts/cordova/lib/list-emulator-images +++ b/bin/templates/scripts/cordova/lib/list-emulator-images @@ -19,6 +19,13 @@ set -e +IOS_SIM_MIN_VERSION="3.0" +IOS_SIM_LOCATION=$(which ios-sim) +if [ $? != 0 ]; then +echo -e "\033[31mError: ios-sim was not found. Please download, build and install version $IOS_SIM_MIN_VERSION or greater from https://github.com/phonegap/ios-sim into your path. Or 'npm install -g ios-sim' using node.js: http://nodejs.org/\033[m"; 1>&2; + exit 1; +fi + IOS_SIM_VERSION=$(ios-sim --version) if [[ "$IOS_SIM_VERSION" < "$IOS_SIM_MIN_VERSION" ]]; then - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
ios commit: CB-7818 - CLI builds ignore Distribution certificates (closes #114)
Repository: cordova-ios Updated Branches: refs/heads/master 7cd2e2b9e -> c0db6382a CB-7818 - CLI builds ignore Distribution certificates (closes #114) Fixed build / xcconfig defaults for CI environments. "cordova build -⦠â¦-device --release" now builds using the "iPhone Distribution"-type profile, as opposed to the default "cordova build --device", using the default "iPhone Developer"-type profile. Re-added build.xcconfig as shared .xcconfig for legacy compatibility. Implemented Configuration-level .xcconfig selection via inheritance. Added ASF comment section, short documentation. Signed-off-by: Shazron Abdullah Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/c0db6382 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/c0db6382 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/c0db6382 Branch: refs/heads/master Commit: c0db6382af2e2570be139d584f553ca5c046a941 Parents: 7cd2e2b Author: Sidney Bofah Authored: Sat Oct 18 03:38:49 2014 +0200 Committer: Shazron Abdullah Committed: Mon Oct 20 12:32:45 2014 -0700 -- bin/templates/scripts/cordova/build | 2 +- .../scripts/cordova/build-debug.xcconfig| 24 +++ .../scripts/cordova/build-release.xcconfig | 27 + bin/templates/scripts/cordova/build.xcconfig| 32 +--- 4 files changed, 80 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/c0db6382/bin/templates/scripts/cordova/build -- diff --git a/bin/templates/scripts/cordova/build b/bin/templates/scripts/cordova/build index 124ce81..9df2be0 100755 --- a/bin/templates/scripts/cordova/build +++ b/bin/templates/scripts/cordova/build @@ -51,6 +51,6 @@ done if (( $EMULATOR )); then exec xcodebuild -project "$PROJECT_NAME.xcodeproj" -arch i386 -target "$PROJECT_NAME" -configuration $CONFIGURATION -sdk iphonesimulator build VALID_ARCHS="i386" CONFIGURATION_BUILD_DIR="$PROJECT_PATH/build/emulator" SHARED_PRECOMPS_DIR="$PROJECT_PATH/build/sharedpch" else -exec xcodebuild -xcconfig "$CORDOVA_PATH/build.xcconfig" -project "$PROJECT_NAME.xcodeproj" ARCHS="armv7 armv7s arm64" -target "$PROJECT_NAME" -configuration $CONFIGURATION -sdk iphoneos build VALID_ARCHS="armv7 armv7s arm64" CONFIGURATION_BUILD_DIR="$PROJECT_PATH/build/device" SHARED_PRECOMPS_DIR="$PROJECT_PATH/build/sharedpch" +exec xcodebuild -xcconfig "$CORDOVA_PATH/build$(echo -$CONFIGURATION | tr '[:upper:]' '[:lower:]').xcconfig" -project "$PROJECT_NAME.xcodeproj" ARCHS="armv7 armv7s arm64" -target "$PROJECT_NAME" -configuration $CONFIGURATION -sdk iphoneos build VALID_ARCHS="armv7 armv7s arm64" CONFIGURATION_BUILD_DIR="$PROJECT_PATH/build/device" SHARED_PRECOMPS_DIR="$PROJECT_PATH/build/sharedpch" fi http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/c0db6382/bin/templates/scripts/cordova/build-debug.xcconfig -- diff --git a/bin/templates/scripts/cordova/build-debug.xcconfig b/bin/templates/scripts/cordova/build-debug.xcconfig new file mode 100644 index 000..85748ea --- /dev/null +++ b/bin/templates/scripts/cordova/build-debug.xcconfig @@ -0,0 +1,24 @@ +// +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// + +// +// XCode Build settings for "Debug" Build Configuration. +// + +#include "build.xcconfig" \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/c0db6382/bin/templates/scripts/cordova/build-release.xcconfig -- diff --git a/bin/templates/scripts/cordova/build-release.xcco
git commit: CB-7597 - Localizable.strings for Media Capture are in the default template, it should be in the plugin
Repository: cordova-plugin-media-capture Updated Branches: refs/heads/master b16eb2367 -> f7d70e2e8 CB-7597 - Localizable.strings for Media Capture are in the default template, it should be in the plugin Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/commit/f7d70e2e Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/tree/f7d70e2e Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/diff/f7d70e2e Branch: refs/heads/master Commit: f7d70e2e8f8354743286011f70dcd79a3292a82e Parents: b16eb23 Author: Shazron Abdullah Authored: Mon Oct 20 16:55:04 2014 -0700 Committer: Shazron Abdullah Committed: Mon Oct 20 16:55:04 2014 -0700 -- .../de.lproj/Localizable.strings| 28 .../en.lproj/Localizable.strings| 27 +++ .../es.lproj/Localizable.strings| 27 +++ .../se.lproj/Localizable.strings| 28 src/ios/CDVCapture.m| 16 --- 5 files changed, 123 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/f7d70e2e/src/ios/CDVCapture.bundle/de.lproj/Localizable.strings -- diff --git a/src/ios/CDVCapture.bundle/de.lproj/Localizable.strings b/src/ios/CDVCapture.bundle/de.lproj/Localizable.strings new file mode 100644 index 000..945cbc4 --- /dev/null +++ b/src/ios/CDVCapture.bundle/de.lproj/Localizable.strings @@ -0,0 +1,28 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + + +// controller title for Videos +"Videos title" = "Videos"; +// accessibility label for recording button +"toggle audio recording" = "starten/beenden der Tonaufnahme"; +// notification spoken by VoiceOver when timed recording finishes +"timed recording complete" = "programmierte Aufnahme beendet"; +// accessibility hint for display of recorded elapsed time +"recorded time in minutes and seconds" = "aufgenommene Zeit in Minuten und Sekunden"; http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/f7d70e2e/src/ios/CDVCapture.bundle/en.lproj/Localizable.strings -- diff --git a/src/ios/CDVCapture.bundle/en.lproj/Localizable.strings b/src/ios/CDVCapture.bundle/en.lproj/Localizable.strings new file mode 100644 index 000..a4a049e --- /dev/null +++ b/src/ios/CDVCapture.bundle/en.lproj/Localizable.strings @@ -0,0 +1,27 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +// controller title for Videos +"Videos title" = "Videos"; +// accessibility label for recording button +"toggle audio recording" = "toggle audio recording"; +// notification spoken by VoiceOver when timed recording finishes +"timed recording complete" = "timed recording complete"; +// accessibility hint for display of recorded elapsed time +"recorded time in minutes and seconds" = "recorded time in minutes and seconds"; http://git-wip-us.apache.
ios commit: CB-7597 - Localizable.strings for Media Capture are in the default template, it should be in the plugin
Repository: cordova-ios Updated Branches: refs/heads/master c0db6382a -> 7a1d6c833 CB-7597 - Localizable.strings for Media Capture are in the default template, it should be in the plugin Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/7a1d6c83 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/7a1d6c83 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/7a1d6c83 Branch: refs/heads/master Commit: 7a1d6c833041fa7662cfd87cab3772434a750c12 Parents: c0db638 Author: Shazron Abdullah Authored: Mon Oct 20 17:18:49 2014 -0700 Committer: Shazron Abdullah Committed: Mon Oct 20 17:18:49 2014 -0700 -- .../project/__CLI__.xcodeproj/project.pbxproj | 77 --- .../__NON-CLI__.xcodeproj/project.pbxproj | 79 .../Resources/de.lproj/Localizable.strings | 28 --- .../Resources/en.lproj/Localizable.strings | 27 --- .../Resources/es.lproj/Localizable.strings | 27 --- .../Resources/se.lproj/Localizable.strings | 28 --- 6 files changed, 266 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/7a1d6c83/bin/templates/project/__CLI__.xcodeproj/project.pbxproj -- diff --git a/bin/templates/project/__CLI__.xcodeproj/project.pbxproj b/bin/templates/project/__CLI__.xcodeproj/project.pbxproj index 2c10f47..9edef21 100755 --- a/bin/templates/project/__CLI__.xcodeproj/project.pbxproj +++ b/bin/templates/project/__CLI__.xcodeproj/project.pbxproj @@ -9,7 +9,6 @@ /* Begin PBXBuildFile section */ 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* AppDelegate.m */; }; 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; - 1F766FE113BBADB100FB74C0 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1F766FDC13BBADB100FB74C0 /* Localizable.strings */; }; 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; }; 301BF552109A68D80062928A /* libCordova.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF535109A57CC0062928A /* libCordova.a */; }; 302D95F114D2391D003F00A1 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 302D95EF14D2391D003F00A1 /* MainViewController.m */; }; @@ -24,7 +23,6 @@ 308D05371370CCF300D202BF /* icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 308D052E1370CCF300D202BF /* icon-72.png */; }; 308D05381370CCF300D202BF /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 308D052F1370CCF300D202BF /* icon.png */; }; 308D05391370CCF300D202BF /* i...@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 308D05301370CCF300D202BF /* i...@2x.png */; }; - 30A0434814DC770100060A13 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 30A0434314DC770100060A13 /* Localizable.strings */; }; 30B4F30019D5E07200D9F7D8 /* Default-667h.png in Resources */ = {isa = PBXBuildFile; fileRef = 30B4F2FD19D5E07200D9F7D8 /* Default-667h.png */; }; 30B4F30119D5E07200D9F7D8 /* Default-736h.png in Resources */ = {isa = PBXBuildFile; fileRef = 30B4F2FE19D5E07200D9F7D8 /* Default-736h.png */; }; 30B4F30219D5E07200D9F7D8 /* Default-Landscape-736h.png in Resources */ = {isa = PBXBuildFile; fileRef = 30B4F2FF19D5E07200D9F7D8 /* Default-Landscape-736h.png */; }; @@ -84,8 +82,6 @@ 308D052E1370CCF300D202BF /* icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-72.png"; sourceTree = ""; }; 308D052F1370CCF300D202BF /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon.png; sourceTree = ""; }; 308D05301370CCF300D202BF /* i...@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "i...@2x.png"; sourceTree = ""; }; - 30A0434414DC770100060A13 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = Localizable.strings; sourceTree = ""; }; - 30A0434714DC770100060A13 /* se */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = se; path = Localizable.strings; sourceTree = ""; }; 30B4F2FD19D5E07200D9F7D8 /* Default-667h.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "De
git commit: CB-5892 - Remove deprecated window.Settings
Repository: cordova-plugin-device Updated Branches: refs/heads/master 56677ed8a -> 974ef81cb CB-5892 - Remove deprecated window.Settings Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/commit/974ef81c Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/tree/974ef81c Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/diff/974ef81c Branch: refs/heads/master Commit: 974ef81cbb4135c4a66d4d3b078aee864cefede6 Parents: 56677ed Author: Shazron Abdullah Authored: Mon Oct 20 17:41:37 2014 -0700 Committer: Shazron Abdullah Committed: Mon Oct 20 17:41:37 2014 -0700 -- src/ios/CDVDevice.m | 14 -- 1 file changed, 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/974ef81c/src/ios/CDVDevice.m -- diff --git a/src/ios/CDVDevice.m b/src/ios/CDVDevice.m index 7e18d92..36e48e3 100644 --- a/src/ios/CDVDevice.m +++ b/src/ios/CDVDevice.m @@ -50,20 +50,6 @@ NSDictionary* deviceProperties = [self deviceProperties]; CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:deviceProperties]; -/* Settings.plist - * Read the optional Settings.plist file and push these user-defined settings down into the web application. - * This can be useful for supplying build-time configuration variables down to the app to change its behavior, - * such as specifying Full / Lite version, or localization (English vs German, for instance). - */ -// TODO: turn this into an iOS only plugin -NSDictionary* temp = [CDVViewController getBundlePlist:@"Settings"]; - -if ([temp respondsToSelector:@selector(JSONString)]) { -NSLog(@"Deprecation warning: window.Setting will be removed Aug 2013. Refer to https://issues.apache.org/jira/browse/CB-2433";); -NSString* js = [NSString stringWithFormat:@"window.Settings = %@;", [temp JSONString]]; -[self.commandDelegate evalJs:js]; -} - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; } - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
[1/2] git commit: Update ratExcludes for cordova-ios.
Repository: cordova-coho Updated Branches: refs/heads/master b92ef1d41 -> 4f34b358c Update ratExcludes for cordova-ios. Project: http://git-wip-us.apache.org/repos/asf/cordova-coho/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-coho/commit/4f34b358 Tree: http://git-wip-us.apache.org/repos/asf/cordova-coho/tree/4f34b358 Diff: http://git-wip-us.apache.org/repos/asf/cordova-coho/diff/4f34b358 Branch: refs/heads/master Commit: 4f34b358cd0d372f800b11c80079ab3ede891ee7 Parents: 944dd72 Author: Shazron Abdullah Authored: Mon Oct 20 23:53:57 2014 -0700 Committer: Shazron Abdullah Committed: Mon Oct 20 23:54:05 2014 -0700 -- src/repoutil.js | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/4f34b358/src/repoutil.js -- diff --git a/src/repoutil.js b/src/repoutil.js index da3cbbb..33417fd 100644 --- a/src/repoutil.js +++ b/src/repoutil.js @@ -41,7 +41,13 @@ var platformRepos = [ repoName: 'cordova-ios', jiraComponentName: 'iOS', cordovaJsPaths: ['CordovaLib/cordova.js'], -versionFilePaths: [path.join('CordovaLib', 'VERSION')] +versionFilePaths: [path.join('CordovaLib', 'VERSION')], +ratExcludes: [ +// yes, not .gitignore +'gitignore', +// licenses for both below are in the cordova-ios LICENSE file +'NSData+Base64.h', +'NSData+Base64.m'] }, { title: 'BlackBerry', id: 'blackberry', - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
[2/2] git commit: Update audit common excludes for other xcode project files, and component.json
Update audit common excludes for other xcode project files, and component.json Project: http://git-wip-us.apache.org/repos/asf/cordova-coho/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-coho/commit/944dd72a Tree: http://git-wip-us.apache.org/repos/asf/cordova-coho/tree/944dd72a Diff: http://git-wip-us.apache.org/repos/asf/cordova-coho/diff/944dd72a Branch: refs/heads/master Commit: 944dd72ae7afe4624512c7ae3774f700d9425ea8 Parents: b92ef1d Author: Shazron Abdullah Authored: Mon Oct 20 23:53:15 2014 -0700 Committer: Shazron Abdullah Committed: Mon Oct 20 23:54:05 2014 -0700 -- src/audit-license-headers.js | 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/944dd72a/src/audit-license-headers.js -- diff --git a/src/audit-license-headers.js b/src/audit-license-headers.js index 4de3213..72dcc7a 100644 --- a/src/audit-license-headers.js +++ b/src/audit-license-headers.js @@ -40,6 +40,10 @@ var COMMON_RAT_EXCLUDES = [ 'node_modules', 'thirdparty', 'package.json', +'component.json', +'*.xcworkspacedata', +'*.xccheckout', +'*.xcscheme', ]; module.exports = function*() { - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
[2/2] ios commit: CB-7606 - handleOpenURL handler firing more than necessary
CB-7606 - handleOpenURL handler firing more than necessary - plus style fixups through uncrustify Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/01b3d191 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/01b3d191 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/01b3d191 Branch: refs/heads/master Commit: 01b3d191d47b5f5b9549a1174b0d92ae0f0a901d Parents: 6506b22 Author: Shazron Abdullah Authored: Tue Oct 21 01:52:40 2014 -0700 Committer: Shazron Abdullah Committed: Tue Oct 21 01:52:40 2014 -0700 -- CordovaLib/Classes/CDVViewController.h | 1 + CordovaLib/Classes/CDVViewController.m | 35 ++-- .../__PROJECT_NAME__/Classes/AppDelegate.m | 18 +- 3 files changed, 34 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/01b3d191/CordovaLib/Classes/CDVViewController.h -- diff --git a/CordovaLib/Classes/CDVViewController.h b/CordovaLib/Classes/CDVViewController.h index 1d34ddd..51863a5 100644 --- a/CordovaLib/Classes/CDVViewController.h +++ b/CordovaLib/Classes/CDVViewController.h @@ -79,5 +79,6 @@ - (void)registerPlugin:(CDVPlugin*)plugin withPluginName:(NSString*)pluginName; - (BOOL)URLisAllowed:(NSURL*)url; +- (void)processOpenUrl:(NSURL*)url; @end http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/01b3d191/CordovaLib/Classes/CDVViewController.m -- diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m index 9f02d82..acb88f7 100644 --- a/CordovaLib/Classes/CDVViewController.m +++ b/CordovaLib/Classes/CDVViewController.m @@ -72,7 +72,8 @@ name:UIApplicationWillEnterForegroundNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppDidEnterBackground:) name:UIApplicationDidEnterBackgroundNotification object:nil]; -[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleOpenURL:) name:CDVPluginHandleOpenURLNotification object:nil]; +[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onPageDidLoad:) + name:CDVPageDidLoadNotification object:nil]; // read from UISupportedInterfaceOrientations (or UISupportedInterfaceOrientations~iPad, if its iPad) from -Info.plist self.supportedOrientations = [self parseInterfaceOrientations: @@ -562,7 +563,7 @@ - (NSString*)userAgent { if (_userAgent == nil) { -NSString *localBaseUserAgent; +NSString* localBaseUserAgent; if (self.baseUserAgent != nil) { localBaseUserAgent = self.baseUserAgent; } else { @@ -649,8 +650,6 @@ */ [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO]; -[self processOpenUrl]; - [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPageDidLoadNotification object:self.webView]]; } @@ -953,21 +952,37 @@ // /// -- (void)handleOpenURL:(NSNotification*)notification +- (void)onPageDidLoad:(NSNotification*)notification { -self.openURL = notification.object; +if (self.openURL) { +[self processOpenUrl:self.openURL pageLoaded:YES]; +self.openURL = nil; +} } -- (void)processOpenUrl +- (void)processOpenUrl:(NSURL*)url pageLoaded:(BOOL)pageLoaded { -if (self.openURL) { +if (!pageLoaded) { +// query the webview for readystate +NSString* readyState = [webView stringByEvaluatingJavaScriptFromString:@"document.readyState"]; +pageLoaded = [readyState isEqualToString:@"loaded"] || [readyState isEqualToString:@"complete"]; +} + +if (pageLoaded) { // calls into javascript global function 'handleOpenURL' -NSString* jsString = [NSString stringWithFormat:@"handleOpenURL(\"%@\");", [self.openURL description]]; +NSString* jsString = [NSString stringWithFormat:@"if (typeof handleOpenURL === 'function') { handleOpenURL(\"%@\");}", url]; [self.webView stringByEvaluatingJavaScriptFromString:jsString]; -self.openURL = nil; +} else { +// save for when page has loaded +self.openURL = url; } } +- (void)processOpenUrl:(NSURL*)url +{ +[self processOpenUrl:url pageLoaded:NO]; +} + // /// - (void)dealloc http://git-wip-us.apache.org/repos/
[1/2] ios commit: Remove unused code, also pre-iOS 4 only code
Repository: cordova-ios Updated Branches: refs/heads/master 7a1d6c833 -> 01b3d191d Remove unused code, also pre-iOS 4 only code Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/6506b22f Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/6506b22f Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/6506b22f Branch: refs/heads/master Commit: 6506b22f71efcbebc8df4a71300203771250caf5 Parents: 7a1d6c8 Author: Shazron Abdullah Authored: Tue Oct 21 01:42:17 2014 -0700 Committer: Shazron Abdullah Committed: Tue Oct 21 01:42:17 2014 -0700 -- CordovaLib/Classes/CDVViewController.m | 17 - 1 file changed, 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/6506b22f/CordovaLib/Classes/CDVViewController.m -- diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m index 1e59b1b..9f02d82 100644 --- a/CordovaLib/Classes/CDVViewController.m +++ b/CordovaLib/Classes/CDVViewController.m @@ -779,23 +779,6 @@ [self.commandDelegate evalJs:jsString]; } -+ (NSString*)resolveImageResource:(NSString*)resource -{ -NSString* systemVersion = [[UIDevice currentDevice] systemVersion]; -BOOL isLessThaniOS4 = ([systemVersion compare:@"4.0" options:NSNumericSearch] == NSOrderedAscending); - -// the iPad image (nor retina) differentiation code was not in 3.x, and we have to explicitly set the path -if (isLessThaniOS4) { -if (CDV_IsIPad()) { -return [NSString stringWithFormat:@"%@~ipad.png", resource]; -} else { -return [NSString stringWithFormat:@"%@.png", resource]; -} -} - -return resource; -} - + (NSString*)applicationDocumentsDirectory { NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
ios commit: CB-7857 - Load appURL after plugins have loaded
Repository: cordova-ios Updated Branches: refs/heads/master 01b3d191d -> 1b85a6e67 CB-7857 - Load appURL after plugins have loaded - includes uncrustify style fixups Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/1b85a6e6 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/1b85a6e6 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/1b85a6e6 Branch: refs/heads/master Commit: 1b85a6e6762ef1280651a6e52358298b3d2a0ed7 Parents: 01b3d19 Author: Shazron Abdullah Authored: Thu Oct 23 12:43:13 2014 -0700 Committer: Shazron Abdullah Committed: Thu Oct 23 12:43:13 2014 -0700 -- CordovaLib/Classes/CDVViewController.m | 27 +-- 1 file changed, 17 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/1b85a6e6/CordovaLib/Classes/CDVViewController.m -- diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m index acb88f7..8cd59b3 100644 --- a/CordovaLib/Classes/CDVViewController.m +++ b/CordovaLib/Classes/CDVViewController.m @@ -199,13 +199,9 @@ self.pluginObjects = [[NSMutableDictionary alloc] initWithCapacity:20]; } -// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. -- (void)viewDidLoad +- (NSURL*)appUrl { -[super viewDidLoad]; - NSURL* appURL = nil; -NSString* loadErr = nil; if ([self.startPage rangeOfString:@"://"].location != NSNotFound) { appURL = [NSURL URLWithString:self.startPage]; @@ -217,8 +213,6 @@ NSString* startFilePath = [self.commandDelegate pathForResource:[startURL path]]; if (startFilePath == nil) { -loadErr = [NSString stringWithFormat:@"ERROR: Start Page at '%@/%@' was not found.", self.wwwFolderName, self.startPage]; -NSLog(@"%@", loadErr); self.loadFromString = YES; appURL = nil; } else { @@ -233,6 +227,14 @@ } } +return appURL; +} + +// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. +- (void)viewDidLoad +{ +[super viewDidLoad]; + // // Fix the iOS 5.1 SECURITY_ERR bug (CB-347), this must be before the webView is instantiated NSString* backupWebStorageType = @"cloud"; // default value @@ -315,7 +317,7 @@ } NSString* decelerationSetting = [self settingForKey:@"UIWebViewDecelerationSpeed"]; -if (![@"fast" isEqualToString : decelerationSetting]) { +if (![@"fast" isEqualToString:decelerationSetting]) { [self.webView.scrollView setDecelerationRate:UIScrollViewDecelerationRateNormal]; } @@ -437,13 +439,18 @@ } // / +NSURL* appURL = [self appUrl]; + [CDVUserAgentUtil acquireLock:^(NSInteger lockToken) { _userAgentLockToken = lockToken; [CDVUserAgentUtil setUserAgent:self.userAgent lockToken:lockToken]; -if (!loadErr) { +if (appURL) { NSURLRequest* appReq = [NSURLRequest requestWithURL:appURL cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:20.0]; [self.webView loadRequest:appReq]; } else { +NSString* loadErr = [NSString stringWithFormat:@"ERROR: Start Page at '%@/%@' was not found.", self.wwwFolderName, self.startPage]; +NSLog(@"%@", loadErr); + NSString* html = [NSString stringWithFormat:@" %@ ", loadErr]; [self.webView loadHTMLString:html baseURL:nil]; } @@ -781,7 +788,7 @@ + (NSString*)applicationDocumentsDirectory { NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); -NSString* basePath = ([paths count] > 0) ? [paths objectAtIndex:0] : nil; +NSString* basePath = ([paths count] > 0) ? (([paths objectAtIndex : 0]) : nil); return basePath; } - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
ios commit: Typo in style fixup.
Repository: cordova-ios Updated Branches: refs/heads/master 1b85a6e67 -> 722397ae7 Typo in style fixup. Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/722397ae Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/722397ae Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/722397ae Branch: refs/heads/master Commit: 722397ae7b4a084fd54ac9e52517938ca82a9b0b Parents: 1b85a6e Author: Shazron Abdullah Authored: Thu Oct 23 13:09:33 2014 -0700 Committer: Shazron Abdullah Committed: Thu Oct 23 13:09:33 2014 -0700 -- CordovaLib/Classes/CDVViewController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/722397ae/CordovaLib/Classes/CDVViewController.m -- diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m index 8cd59b3..c62ba87 100644 --- a/CordovaLib/Classes/CDVViewController.m +++ b/CordovaLib/Classes/CDVViewController.m @@ -788,7 +788,7 @@ + (NSString*)applicationDocumentsDirectory { NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); -NSString* basePath = ([paths count] > 0) ? (([paths objectAtIndex : 0]) : nil); +NSString* basePath = (([paths count] > 0) ? ([paths objectAtIndex : 0]) : nil); return basePath; } - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
ios commit: CB-6510 - Support for ErrorUrl preference on iOS
Repository: cordova-ios Updated Branches: refs/heads/master 722397ae7 -> a96f059ac CB-6510 - Support for ErrorUrl preference on iOS - ErrorUrl is a file that is relative to the www folder, or an external url. The value cannot have any query parameters or fragment identifiers, since an error query parameter is passed to the url, with the query parameter value as the error message. Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/a96f059a Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/a96f059a Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/a96f059a Branch: refs/heads/master Commit: a96f059ac160c20c95d0ee802e0ee09dfb0f5856 Parents: 722397a Author: Shazron Abdullah Authored: Thu Oct 23 14:15:54 2014 -0700 Committer: Shazron Abdullah Committed: Thu Oct 23 14:15:54 2014 -0700 -- CordovaLib/Classes/CDVViewController.m | 43 +++-- 1 file changed, 40 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a96f059a/CordovaLib/Classes/CDVViewController.m -- diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m index c62ba87..f0e0c2f 100644 --- a/CordovaLib/Classes/CDVViewController.m +++ b/CordovaLib/Classes/CDVViewController.m @@ -230,6 +230,28 @@ return appURL; } +- (NSURL*)errorUrl +{ +NSURL* errorURL = nil; + +id setting = [self settingForKey:@"ErrorUrl"]; + +if (setting) { +NSString* errorUrlString = (NSString*)setting; +if ([errorUrlString rangeOfString:@"://"].location != NSNotFound) { +errorURL = [NSURL URLWithString:errorUrlString]; +} else { +NSURL* url = [NSURL URLWithString:(NSString*)setting]; +NSString* errorFilePath = [self.commandDelegate pathForResource:[url path]]; +if (errorFilePath) { +errorURL = [NSURL fileURLWithPath:errorFilePath]; +} +} +} + +return errorURL; +} + // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { @@ -451,8 +473,15 @@ NSString* loadErr = [NSString stringWithFormat:@"ERROR: Start Page at '%@/%@' was not found.", self.wwwFolderName, self.startPage]; NSLog(@"%@", loadErr); -NSString* html = [NSString stringWithFormat:@" %@ ", loadErr]; -[self.webView loadHTMLString:html baseURL:nil]; +NSURL* errorUrl = [self errorUrl]; +if (errorUrl) { +errorUrl = [NSURL URLWithString:[NSString stringWithFormat:@"?error=%@", [loadErr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]] relativeToURL:errorUrl]; +NSLog(@"%@", [errorUrl absoluteString]); +[self.webView loadRequest:[NSURLRequest requestWithURL:errorUrl]]; +} else { +NSString* html = [NSString stringWithFormat:@" %@ ", loadErr]; +[self.webView loadHTMLString:html baseURL:nil]; +} } }]; } @@ -664,7 +693,15 @@ { [CDVUserAgentUtil releaseLock:&_userAgentLockToken]; -NSLog(@"Failed to load webpage with error: %@", [error localizedDescription]); +NSString* message = [NSString stringWithFormat:@"Failed to load webpage with error: %@", [error localizedDescription]]; +NSLog(@"%@", message); + +NSURL* errorUrl = [self errorUrl]; +if (errorUrl) { +errorUrl = [NSURL URLWithString:[NSString stringWithFormat:@"?error=%@", [message stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]] relativeToURL:errorUrl]; +NSLog(@"%@", [errorUrl absoluteString]); +[theWebView loadRequest:[NSURLRequest requestWithURL:errorUrl]]; +} } - (BOOL)webView:(UIWebView*)theWebView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
docs commit: CB-6510 - Support for ErrorUrl preference on iOS
Repository: cordova-docs Updated Branches: refs/heads/master 281dc5f7c -> 83a113c14 CB-6510 - Support for ErrorUrl preference on iOS Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/83a113c1 Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/83a113c1 Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/83a113c1 Branch: refs/heads/master Commit: 83a113c14fe23cce113e4db98e7972b910e871fe Parents: 281dc5f Author: Shazron Abdullah Authored: Thu Oct 23 14:20:37 2014 -0700 Committer: Shazron Abdullah Committed: Thu Oct 23 14:20:37 2014 -0700 -- docs/en/edge/guide/platforms/ios/config.md | 6 ++ 1 file changed, 6 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/83a113c1/docs/en/edge/guide/platforms/ios/config.md -- diff --git a/docs/en/edge/guide/platforms/ios/config.md b/docs/en/edge/guide/platforms/ios/config.md index e0e0a73..6b05869 100644 --- a/docs/en/edge/guide/platforms/ios/config.md +++ b/docs/en/edge/guide/platforms/ios/config.md @@ -111,3 +111,9 @@ File](config_ref_index.md.html#The%20config.xml%20File) for information on globa +- `ErrorUrl` (string, not set by default): + If set, will display the referenced local page upon an error in the application. + + + + - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
ios commit: CB-7872 - XCode 6.1's xcrun PackageApplication fails at packaging / resigning Cordova applications (closes #115)
Repository: cordova-ios Updated Branches: refs/heads/master a96f059ac -> 1d7ed65ac CB-7872 - XCode 6.1's xcrun PackageApplication fails at packaging / resigning Cordova applications (closes #115) Signed-off-by: Shazron Abdullah Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/1d7ed65a Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/1d7ed65a Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/1d7ed65a Branch: refs/heads/master Commit: 1d7ed65ac3b265224cd5c9bd9a3cdfcad2bf9bb2 Parents: a96f059 Author: Sidney Bofah Authored: Sat Oct 25 17:25:42 2014 +0200 Committer: Shazron Abdullah Committed: Mon Oct 27 16:44:46 2014 -0700 -- bin/templates/scripts/cordova/build.xcconfig | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/1d7ed65a/bin/templates/scripts/cordova/build.xcconfig -- diff --git a/bin/templates/scripts/cordova/build.xcconfig b/bin/templates/scripts/cordova/build.xcconfig index 99231ea..dca8c6c 100644 --- a/bin/templates/scripts/cordova/build.xcconfig +++ b/bin/templates/scripts/cordova/build.xcconfig @@ -26,4 +26,7 @@ // Type of signing identity used for codesigning, resolves to first match of given type. // "iPhone Developer": Development builds (default, local only; iOS Development certificate) or "iPhone Distribution": Distribution builds (Adhoc/In-House/AppStore; iOS Distribution certificate) CODE_SIGN_IDENTITY = iPhone Developer -CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer \ No newline at end of file +CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer + +// (CB-7872) Solution for XCode 6.1 signing errors related to resource envelope format deprecation +CODE_SIGN_RESOURCE_RULES_PATH = "$(SDKROOT)/ResourceRules.plist" \ No newline at end of file - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
ios commit: CB-7882 - viewDidUnload instance method is missing [super viewDidUnload] call
Repository: cordova-ios Updated Branches: refs/heads/master 1d7ed65ac -> 31302e403 CB-7882 - viewDidUnload instance method is missing [super viewDidUnload] call Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/31302e40 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/31302e40 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/31302e40 Branch: refs/heads/master Commit: 31302e403013618e7ed1f5e703db8475643c78ff Parents: 1d7ed65 Author: Shazron Abdullah Authored: Mon Oct 27 16:53:13 2014 -0700 Committer: Shazron Abdullah Committed: Mon Oct 27 16:53:13 2014 -0700 -- CordovaLib/Classes/CDVViewController.m | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/31302e40/CordovaLib/Classes/CDVViewController.m -- diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m index f0e0c2f..eb056ce 100644 --- a/CordovaLib/Classes/CDVViewController.m +++ b/CordovaLib/Classes/CDVViewController.m @@ -657,6 +657,8 @@ self.webView.delegate = nil; self.webView = nil; [CDVUserAgentUtil releaseLock:&_userAgentLockToken]; + +[super viewDidUnload]; } #pragma mark UIWebViewDelegate - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
ios commit: Updated cordova.js for CB-7868
Repository: cordova-ios Updated Branches: refs/heads/master 31302e403 -> 8458588eb Updated cordova.js for CB-7868 Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/8458588e Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/8458588e Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/8458588e Branch: refs/heads/master Commit: 8458588ebe311f9a6154a1004d410d11e88d61c8 Parents: 31302e4 Author: Shazron Abdullah Authored: Mon Oct 27 17:01:44 2014 -0700 Committer: Shazron Abdullah Committed: Mon Oct 27 17:01:44 2014 -0700 -- CordovaLib/cordova.js | 35 --- 1 file changed, 16 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/8458588e/CordovaLib/cordova.js -- diff --git a/CordovaLib/cordova.js b/CordovaLib/cordova.js index 7889955..cc900ac 100644 --- a/CordovaLib/cordova.js +++ b/CordovaLib/cordova.js @@ -1,5 +1,5 @@ // Platform: ios -// 94291706945c42fd47fa632ed30f5eb811080e95 +// 91157c2e1bf3eb098c7e2ab31404e895ccb0df2a /* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -1152,6 +1152,7 @@ var cordova = require('cordova'); var modulemapper = require('cordova/modulemapper'); var platform = require('cordova/platform'); var pluginloader = require('cordova/pluginloader'); +var utils = require('cordova/utils'); var platformInitChannelsArray = [channel.onNativeReady, channel.onPluginsReady]; @@ -1183,21 +1184,19 @@ function replaceNavigator(origNavigator) { for (var key in origNavigator) { if (typeof origNavigator[key] == 'function') { newNavigator[key] = origNavigator[key].bind(origNavigator); -} else { +} +else { (function(k) { -Object.defineProperty(newNavigator, k, { -get: function() { -return origNavigator[k]; -}, -configurable: true, -enumerable: true -}); -})(key); +utils.defineGetterSetter(newNavigator,key,function() { +return origNavigator[k]; +}); +})(key); } } } return newNavigator; } + if (window.navigator) { window.navigator = replaceNavigator(window.navigator); } @@ -1278,6 +1277,7 @@ define("cordova/init_b", function(require, exports, module) { var channel = require('cordova/channel'); var cordova = require('cordova'); var platform = require('cordova/platform'); +var utils = require('cordova/utils'); var platformInitChannelsArray = [channel.onDOMContentLoaded, channel.onNativeReady]; @@ -1312,16 +1312,13 @@ function replaceNavigator(origNavigator) { for (var key in origNavigator) { if (typeof origNavigator[key] == 'function') { newNavigator[key] = origNavigator[key].bind(origNavigator); -} else { +} +else { (function(k) { -Object.defineProperty(newNavigator, k, { -get: function() { -return origNavigator[k]; -}, -configurable: true, -enumerable: true -}); -})(key); +utils.defineGetterSetter(newNavigator,key,function() { +return origNavigator[k]; +}); +})(key); } } } - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
docs commit: CB-7902 - Update iOS docs for Xcode 6 minimum requirement
Repository: cordova-docs Updated Branches: refs/heads/master 0ba0ac78a -> 83bd1d1cd CB-7902 - Update iOS docs for Xcode 6 minimum requirement Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/83bd1d1c Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/83bd1d1c Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/83bd1d1c Branch: refs/heads/master Commit: 83bd1d1cd397076bc6d6c0f2b049ecb7894eff0b Parents: 0ba0ac7 Author: Shazron Abdullah Authored: Wed Oct 29 15:37:25 2014 -0700 Committer: Shazron Abdullah Committed: Wed Oct 29 15:37:25 2014 -0700 -- docs/en/edge/guide/platforms/ios/index.md | 10 +- docs/en/edge/guide/platforms/ios/plugin.md | 6 +++--- docs/en/edge/guide/platforms/ios/tools.md | 10 -- docs/en/edge/guide/platforms/ios/webview.md | 2 +- 4 files changed, 17 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/83bd1d1c/docs/en/edge/guide/platforms/ios/index.md -- diff --git a/docs/en/edge/guide/platforms/ios/index.md b/docs/en/edge/guide/platforms/ios/index.md index f9553ce..7ce66c2 100644 --- a/docs/en/edge/guide/platforms/ios/index.md +++ b/docs/en/edge/guide/platforms/ios/index.md @@ -36,16 +36,16 @@ current interface. ## Requirements and Support Apple® tools required to build iOS applications run only on the OS X -operating system on Intel-based Macs. Xcode® 4.5 (the minimum required -version) runs only on OS X version 10.7 (Lion) or greater, and -includes the iOS 6 SDK (Software Development Kit). To submit apps to +operating system on Intel-based Macs. Xcode® 6.0 (the minimum required +version) runs only on OS X version 10.9 (Mavericks) or greater, and +includes the iOS 8 SDK (Software Development Kit). To submit apps to the Apple App Storeâ requires the latest versions of the Apple tools. You can test many of the Cordova features using the iOS emulator installed with the iOS SDK and Xcode, but you need an actual device to fully test all of the app's device features before submitting to the -App Store. The device must have at least iOS 5.x installed, the -minimum iOS version supported as of Cordova 2.3. Supporting devices +App Store. The device must have at least iOS 6.x installed, the +minimum iOS version supported as of Cordova 3.0. Supporting devices include all iPad® models, iPhone® 3GS and above, and iPod® Touch 3rd Generation or later. To install apps onto a device, you must also be a member of Apple's http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/83bd1d1c/docs/en/edge/guide/platforms/ios/plugin.md -- diff --git a/docs/en/edge/guide/platforms/ios/plugin.md b/docs/en/edge/guide/platforms/ios/plugin.md index 8d5b67f..043deb7 100644 --- a/docs/en/edge/guide/platforms/ios/plugin.md +++ b/docs/en/edge/guide/platforms/ios/plugin.md @@ -231,10 +231,10 @@ example: ## Debugging iOS Plugins To debug on the Objective-C side, you need Xcode's built-in debugger. -For JavaScript, on iOS 5.0 you can use [Weinre, an Apache Cordova +For JavaScript, on iOS 5.0 or greater you can use [Weinre, an Apache Cordova Project](https://github.com/apache/cordova-weinre) or [iWebInspector, -a third-party utility](http://www.iwebinspector.com/). For iOS 6, you -can attach Safari 6.0 to the app running within the iOS 6 Simulator. +a third-party utility](http://www.iwebinspector.com/). For iOS 8, you +can attach Safari 8.0 to the app running within the iOS 8 Simulator. ## Common Pitfalls http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/83bd1d1c/docs/en/edge/guide/platforms/ios/tools.md -- diff --git a/docs/en/edge/guide/platforms/ios/tools.md b/docs/en/edge/guide/platforms/ios/tools.md index e7ca14c..df1c672 100644 --- a/docs/en/edge/guide/platforms/ios/tools.md +++ b/docs/en/edge/guide/platforms/ios/tools.md @@ -56,11 +56,17 @@ name. ## Run App on an Emulator -$ /path/to/my_new_project/cordova/run +$ /path/to/my_new_project/cordova/run --emulator + +## Run App on a Device + +$ /path/to/my_new_project/cordova/run --device ## Releasing -$ /path/to/my_new_project/cordova/release +$ /path/to/my_new_project/cordova/build --release + +(modify the `cordova/build-release.xcconfig` file for your Code Signing identity) ## Logging http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/83bd1d1c/docs/en/edge/guide/platforms/ios/webview.md -- diff --git a/docs/en/edge/guide/platforms/ios/webview.md b/
ios commit: Update RELEASENOTES.md for 3.7.0 release
Repository: cordova-ios Updated Branches: refs/heads/master 8458588eb -> cc43cd7db Update RELEASENOTES.md for 3.7.0 release Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/cc43cd7d Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/cc43cd7d Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/cc43cd7d Branch: refs/heads/master Commit: cc43cd7dbb4b6f19b35a74502431a167f1ed492e Parents: 8458588 Author: Shazron Abdullah Authored: Thu Oct 30 11:20:38 2014 -0700 Committer: Shazron Abdullah Committed: Thu Oct 30 11:20:38 2014 -0700 -- RELEASENOTES.md | 49 - 1 file changed, 48 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/cc43cd7d/RELEASENOTES.md -- diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 503bd84..23d6194 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -24,7 +24,54 @@ Update these notes using: git log --pretty=format:'* %s' --topo-order --no-merge Cordova is a static library that enables developers to include the Cordova API in their iOS application projects easily, and also create new Cordova-based iOS application projects through the command-line. -### 3.6.0 (201409XX) ### +### 3.7.0 (201411XX) ### + +* CB-7882 - viewDidUnload instance method is missing [super viewDidUnload] call +* CB-7872 - XCode 6.1's xcrun PackageApplication fails at packaging / resigning Cordova applications (closes #115) +* CB-6510 - Support for ErrorUrl preference on iOS +* CB-7857 - Load appURL after plugins have loaded +* CB-7606 - handleOpenURL handler firing more than necessary +* CB-7597 - Localizable.strings for Media Capture are in the default template, it should be in the plugin +* CB-7818 - CLI builds ignore Distribution certificates (closes #114) +* CB-7729 - Support ios-sim 3.0 (Xcode 6) and new targets (iPhone 6/6+) (closes #107) +* CB-7813 - Added unit test +* CB-7813 - CDVWebViewDelegate fails to update the webview state properly in iOS +* CB-7812 - cordova-ios xcode unit-tests are failing from npm test, in Xcode it is fine +* CB-7643 - made isValidCallbackId threadsafe +* CB-7735 - Update cordova.js snapshot with the bridge fix +* CB-2520 - built interim js from cordova-js for custom user agent support +* CB-2520 - iOS - "original" user agent needs to be overridable (closes #112) +* CB- - In AppDelegate, before calling handleOpenURL check whether it exists first to prevent exceptions (closes #109) +* CB-7775 - Add component.json for component and duo package managers (closes #102) +* CB-7493 - Add e2e test for 'space-in-path' and 'unicode in path/name' for core platforms (moved from root folder). +* CB-7493 - Adds test-build command to package.json +* CB-7630 - Deprecate CDV_IsIPhone5 and CDV_IsIPad macro in CDVAvailability.h +* CB-7727 - add resolution part to 'backup to icloud' warning message +* CB-7627 - Remove duplicate reference to the same libCordova.a. +* CB-7648 - [iOS 8] Add iPhone 6 Plus icon to default template +* CB-7632 - [iOS 8] Add launch image definitions to Info.plist +* CB-7631 - CDVUrlProtocol - the iOS 8 NSHttpUrlResponse is not initialized with the statuscode +* CB-7596 - [iOS 8] CDV_IsIPhone5() Macro needs to be updated because screen size is now orientation dependent +* CB-7560 - Tel and Mailto links don't work in iframe +* CB-7450 - Fix deprecations in cordova-ios unit tests +* CB-7546 - [Contacts][iOS] Prevent exception when index is out of range +* CB-7450 - Fix deprecations in cordova-ios unit tests (interim checkin) +* CB-7502 - iOS default template is missing CFBundleShortVersionString key in Info.plist, prevents iTunes Connect submission +* Changed CordovaLibTests to run in a xcworkspace, and runnable from the command line +* Move CordovaLibTests into tests/ +* Add ios-sim version check (3.0) to cordova/lib/list-emulator-images +* Fix cordova/lib/install-emulator to pass in the correct prefix for ios-sim --devicetypeid +* Fix cordova/lib/list-started-emulators for Xcode 6 +* Remove non-working applescript to start emulator, use Instruments to start iOS Simulator now. +* Add support for the iPod in cordova/lib/list-devices script. +* Remove "Valid values for --target" in script headers. Use "cordova/lib/list-emulator-images" to get the list. +* Update cordova/lib/list-emulator-images for ios-sim 3.0 +* Increment ios-deploy min version to 1.2.0 and ios-sim min version to 3.0 +* Updated cordova/build script to use specific SHARED_PRECOMPS_DIR variable. +* Update .gitignore to not ignore .xcworkspace files + + +### 3.6.3 (20140908) ### * Updated default te
ios commit: Update version to 3.7.0
Repository: cordova-ios Updated Branches: refs/heads/master cc43cd7db -> 753d06c93 Update version to 3.7.0 Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/753d06c9 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/753d06c9 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/753d06c9 Branch: refs/heads/master Commit: 753d06c93a98cfbbc51df64cbc080ac8186b470b Parents: cc43cd7 Author: Shazron Abdullah Authored: Thu Oct 30 11:34:11 2014 -0700 Committer: Shazron Abdullah Committed: Thu Oct 30 11:34:11 2014 -0700 -- CordovaLib/Classes/CDVAvailability.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/753d06c9/CordovaLib/Classes/CDVAvailability.h -- diff --git a/CordovaLib/Classes/CDVAvailability.h b/CordovaLib/Classes/CDVAvailability.h index cbcb65b..1d37be0 100644 --- a/CordovaLib/Classes/CDVAvailability.h +++ b/CordovaLib/Classes/CDVAvailability.h @@ -53,6 +53,7 @@ #define __CORDOVA_3_4_1 30401 #define __CORDOVA_3_5_0 30500 #define __CORDOVA_3_6_0 30600 +#define __CORDOVA_3_7_0 30700 #define __CORDOVA_NA 9 /* not available */ /* @@ -63,7 +64,7 @@ #endif */ #ifndef CORDOVA_VERSION_MIN_REQUIRED -#define CORDOVA_VERSION_MIN_REQUIRED __CORDOVA_3_6_0 +#define CORDOVA_VERSION_MIN_REQUIRED __CORDOVA_3_7_0 #endif /* - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org
[2/2] ios commit: Update JS snapshot to version 3.8.0-dev (via coho)
Update JS snapshot to version 3.8.0-dev (via coho) Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/5769d58d Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/5769d58d Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/5769d58d Branch: refs/heads/master Commit: 5769d58daf9fee00b12345f34d9f8a1ef88d3f39 Parents: b798680 Author: Shazron Abdullah Authored: Thu Oct 30 11:34:54 2014 -0700 Committer: Shazron Abdullah Committed: Thu Oct 30 11:34:54 2014 -0700 -- CordovaLib/cordova.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/5769d58d/CordovaLib/cordova.js -- diff --git a/CordovaLib/cordova.js b/CordovaLib/cordova.js index cc900ac..75729c1 100644 --- a/CordovaLib/cordova.js +++ b/CordovaLib/cordova.js @@ -19,7 +19,7 @@ under the License. */ ;(function() { -var PLATFORM_VERSION_BUILD_LABEL = '3.7.0-dev'; +var PLATFORM_VERSION_BUILD_LABEL = '3.8.0-dev'; // file: src/scripts/require.js /*jshint -W079 */ - To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org