diff --git a/CordovaLib/Classes/Private/Plugins/CDVGestureHandler/CDVGestureHandler.h b/CordovaLib/Classes/Private/Plugins/CDVGestureHandler/CDVGestureHandler.h index 510b6ebf1..f39e066a2 100644 --- a/CordovaLib/Classes/Private/Plugins/CDVGestureHandler/CDVGestureHandler.h +++ b/CordovaLib/Classes/Private/Plugins/CDVGestureHandler/CDVGestureHandler.h @@ -17,7 +17,7 @@ under the License. */ -#import "CDVPlugin.h" +#import @interface CDVGestureHandler : CDVPlugin diff --git a/CordovaLib/Classes/Private/Plugins/CDVHandleOpenURL/CDVHandleOpenURL.h b/CordovaLib/Classes/Private/Plugins/CDVHandleOpenURL/CDVHandleOpenURL.h index f9b0bffa6..37dab40b2 100644 --- a/CordovaLib/Classes/Private/Plugins/CDVHandleOpenURL/CDVHandleOpenURL.h +++ b/CordovaLib/Classes/Private/Plugins/CDVHandleOpenURL/CDVHandleOpenURL.h @@ -17,7 +17,7 @@ under the License. */ -#import "CDVPlugin.h" +#import @interface CDVHandleOpenURL : CDVPlugin diff --git a/CordovaLib/Classes/Private/Plugins/CDVHandleOpenURL/CDVHandleOpenURL.m b/CordovaLib/Classes/Private/Plugins/CDVHandleOpenURL/CDVHandleOpenURL.m index 72199b9cf..400cb9dea 100644 --- a/CordovaLib/Classes/Private/Plugins/CDVHandleOpenURL/CDVHandleOpenURL.m +++ b/CordovaLib/Classes/Private/Plugins/CDVHandleOpenURL/CDVHandleOpenURL.m @@ -18,7 +18,7 @@ Licensed to the Apache Software Foundation (ASF) under one */ #import "CDVHandleOpenURL.h" -#import "CDV.h" +#import @implementation CDVHandleOpenURL diff --git a/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.h b/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.h index ee89e1a8a..94c10de8c 100644 --- a/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.h +++ b/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.h @@ -17,8 +17,8 @@ under the License. */ -#import "CDVPlugin.h" -#import "CDVWhitelist.h" +#import +#import typedef NS_ENUM(NSInteger, CDVIntentAndNavigationFilterValue) { CDVIntentAndNavigationFilterValueIntentAllowed, diff --git a/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.h b/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.h index dec6ab3b9..e93675ec2 100644 --- a/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.h +++ b/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.h @@ -17,7 +17,7 @@ under the License. */ -#import "CDVPlugin.h" +#import #define kCDVLocalStorageErrorDomain @"kCDVLocalStorageErrorDomain" #define kCDVLocalStorageFileOperationError 1 diff --git a/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.m b/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.m index 252dfaf11..21b5cd9f4 100644 --- a/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.m +++ b/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.m @@ -18,7 +18,7 @@ Licensed to the Apache Software Foundation (ASF) under one */ #import "CDVLocalStorage.h" -#import "CDV.h" +#import @interface CDVLocalStorage () diff --git a/CordovaLib/Classes/Private/Plugins/CDVLogger/CDVLogger.h b/CordovaLib/Classes/Private/Plugins/CDVLogger/CDVLogger.h index eeba63ca4..7cfb3063e 100644 --- a/CordovaLib/Classes/Private/Plugins/CDVLogger/CDVLogger.h +++ b/CordovaLib/Classes/Private/Plugins/CDVLogger/CDVLogger.h @@ -17,7 +17,7 @@ under the License. */ -#import "CDVPlugin.h" +#import @interface CDVLogger : CDVPlugin diff --git a/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.h b/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.h index d77f19136..7db8a4ea7 100644 --- a/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.h +++ b/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.h @@ -18,7 +18,7 @@ */ #import -#import "CDVAvailability.h" +#import /** * Distinguishes top-level navigations from sub-frame navigations. diff --git a/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.h b/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.h index 6a9ee77ea..f4070092c 100644 --- a/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.h +++ b/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.h @@ -17,8 +17,8 @@ under the License. */ -#import "CDVPlugin.h" -#import "CDVWebViewEngineProtocol.h" +#import +#import @interface CDVUIWebViewEngine : CDVPlugin diff --git a/CordovaLib/Classes/Public/CDVCommandDelegateImpl.m b/CordovaLib/Classes/Public/CDVCommandDelegateImpl.m index 1ae4483eb..effca6fd4 100644 --- a/CordovaLib/Classes/Public/CDVCommandDelegateImpl.m +++ b/CordovaLib/Classes/Public/CDVCommandDelegateImpl.m @@ -81,8 +81,8 @@ - (void)evalJsHelper2:(NSString*)js CDV_EXEC_LOG(@"Exec: Retrieved new exec messages by chaining."); } - [_commandQueue enqueueCommandBatch:commandsJSON]; - [_commandQueue executePending]; + [self->_commandQueue enqueueCommandBatch:commandsJSON]; + [self->_commandQueue executePending]; } }]; } diff --git a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj index 4df32ce56..5fda6f84e 100644 --- a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj +++ b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj @@ -61,10 +61,43 @@ 7ED95D581AB9029B008C4574 /* NSDictionary+CordovaPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D321AB9029B008C4574 /* NSDictionary+CordovaPreferences.m */; }; 7ED95D591AB9029B008C4574 /* NSMutableArray+QueueAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D331AB9029B008C4574 /* NSMutableArray+QueueAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7ED95D5A1AB9029B008C4574 /* NSMutableArray+QueueAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D341AB9029B008C4574 /* NSMutableArray+QueueAdditions.m */; }; + 9052DE712150D040008E83D4 /* CDVAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D111AB9029B008C4574 /* CDVAppDelegate.m */; }; + 9052DE722150D040008E83D4 /* CDVCommandDelegateImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D161AB9029B008C4574 /* CDVCommandDelegateImpl.m */; }; + 9052DE732150D040008E83D4 /* CDVCommandQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D181AB9029B008C4574 /* CDVCommandQueue.m */; }; + 9052DE742150D040008E83D4 /* CDVConfigParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D1A1AB9029B008C4574 /* CDVConfigParser.m */; }; + 9052DE752150D040008E83D4 /* CDVInvokedUrlCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D1C1AB9029B008C4574 /* CDVInvokedUrlCommand.m */; }; + 9052DE762150D040008E83D4 /* CDVPlugin+Resources.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D1E1AB9029B008C4574 /* CDVPlugin+Resources.m */; }; + 9052DE772150D040008E83D4 /* CDVPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D201AB9029B008C4574 /* CDVPlugin.m */; }; + 9052DE782150D040008E83D4 /* CDVPluginResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D221AB9029B008C4574 /* CDVPluginResult.m */; }; + 9052DE792150D040008E83D4 /* CDVTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D251AB9029B008C4574 /* CDVTimer.m */; }; + 9052DE7A2150D040008E83D4 /* CDVURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D271AB9029B008C4574 /* CDVURLProtocol.m */; }; + 9052DE7B2150D040008E83D4 /* CDVUserAgentUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D291AB9029B008C4574 /* CDVUserAgentUtil.m */; }; + 9052DE7C2150D040008E83D4 /* CDVViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D2B1AB9029B008C4574 /* CDVViewController.m */; }; + 9052DE7D2150D040008E83D4 /* CDVWhitelist.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D2E1AB9029B008C4574 /* CDVWhitelist.m */; }; + 9052DE7E2150D040008E83D4 /* NSDictionary+CordovaPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D321AB9029B008C4574 /* NSDictionary+CordovaPreferences.m */; }; + 9052DE7F2150D040008E83D4 /* NSMutableArray+QueueAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D341AB9029B008C4574 /* NSMutableArray+QueueAdditions.m */; }; + 9052DE802150D040008E83D4 /* CDVJSON_private.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95CF41AB9028C008C4574 /* CDVJSON_private.m */; }; + 9052DE812150D040008E83D4 /* CDVLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 28BFF9131F355A4E00DDF01A /* CDVLogger.m */; }; + 9052DE822150D040008E83D4 /* CDVGestureHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = A3B082D31BB15CEA00D8DC35 /* CDVGestureHandler.m */; }; + 9052DE832150D040008E83D4 /* CDVIntentAndNavigationFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 3093E2221B16D6A3003F381A /* CDVIntentAndNavigationFilter.m */; }; + 9052DE842150D040008E83D4 /* CDVHandleOpenURL.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95CF91AB9028C008C4574 /* CDVHandleOpenURL.m */; }; + 9052DE852150D040008E83D4 /* CDVLocalStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95CFC1AB9028C008C4574 /* CDVLocalStorage.m */; }; + 9052DE862150D040008E83D4 /* CDVUIWebViewNavigationDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 30193A4E1AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.m */; }; + 9052DE872150D040008E83D4 /* CDVUIWebViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95CFF1AB9028C008C4574 /* CDVUIWebViewDelegate.m */; }; + 9052DE882150D040008E83D4 /* CDVUIWebViewEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D011AB9028C008C4574 /* CDVUIWebViewEngine.m */; }; + 9052DE892150D06B008E83D4 /* CDVDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF21AB9028C008C4574 /* CDVDebug.h */; }; + 9052DE8A2150D06B008E83D4 /* CDVJSON_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF31AB9028C008C4574 /* CDVJSON_private.h */; }; + 9052DE8B2150D06B008E83D4 /* CDVPlugin+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF51AB9028C008C4574 /* CDVPlugin+Private.h */; }; + 9052DE8C2150D06B008E83D4 /* CDVLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BFF9121F355A4E00DDF01A /* CDVLogger.h */; }; + 9052DE8D2150D06B008E83D4 /* CDVGestureHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = A3B082D21BB15CEA00D8DC35 /* CDVGestureHandler.h */; }; + 9052DE8E2150D06B008E83D4 /* CDVIntentAndNavigationFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 3093E2211B16D6A3003F381A /* CDVIntentAndNavigationFilter.h */; }; + 9052DE8F2150D06B008E83D4 /* CDVHandleOpenURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF81AB9028C008C4574 /* CDVHandleOpenURL.h */; }; + 9052DE902150D06B008E83D4 /* CDVLocalStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CFB1AB9028C008C4574 /* CDVLocalStorage.h */; }; + 9052DE912150D06B008E83D4 /* CDVUIWebViewNavigationDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 30193A4F1AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.h */; }; + 9052DE922150D06B008E83D4 /* CDVUIWebViewEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D001AB9028C008C4574 /* CDVUIWebViewEngine.h */; }; A3B082D41BB15CEA00D8DC35 /* CDVGestureHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = A3B082D21BB15CEA00D8DC35 /* CDVGestureHandler.h */; }; A3B082D51BB15CEA00D8DC35 /* CDVGestureHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = A3B082D31BB15CEA00D8DC35 /* CDVGestureHandler.m */; }; C0C01EB61E3911D50056E6CB /* Cordova.h in Headers */ = {isa = PBXBuildFile; fileRef = C0C01EB41E3911D50056E6CB /* Cordova.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C0C01EBA1E39120F0056E6CB /* libCordova.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 68A32D7114102E1C006B237C /* libCordova.a */; }; C0C01EBB1E39131A0056E6CB /* CDV.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D0F1AB9029B008C4574 /* CDV.h */; settings = {ATTRIBUTES = (Public, ); }; }; C0C01EBC1E39131A0056E6CB /* CDVAppDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D101AB9029B008C4574 /* CDVAppDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; C0C01EBD1E39131A0056E6CB /* CDVAvailability.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D121AB9029B008C4574 /* CDVAvailability.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -89,16 +122,6 @@ C0C01ED01E3913610056E6CB /* CDVUIWebViewDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CFE1AB9028C008C4574 /* CDVUIWebViewDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; /* End PBXBuildFile section */ -/* Begin PBXContainerItemProxy section */ - C0C01ED11E39137C0056E6CB /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; - proxyType = 1; - remoteGlobalIDString = D2AAC07D0554694100DB518D; - remoteInfo = CordovaLib; - }; -/* End PBXContainerItemProxy section */ - /* Begin PBXFileReference section */ 28BFF9121F355A4E00DDF01A /* CDVLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVLogger.h; sourceTree = ""; }; 28BFF9131F355A4E00DDF01A /* CDVLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVLogger.m; sourceTree = ""; }; @@ -169,7 +192,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - C0C01EBA1E39120F0056E6CB /* libCordova.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -372,6 +394,16 @@ C0C01EC31E39131A0056E6CB /* CDVInvokedUrlCommand.h in Headers */, C0C01EC71E39131A0056E6CB /* CDVScreenOrientationDelegate.h in Headers */, C0C01EC61E39131A0056E6CB /* CDVPluginResult.h in Headers */, + 9052DE892150D06B008E83D4 /* CDVDebug.h in Headers */, + 9052DE8A2150D06B008E83D4 /* CDVJSON_private.h in Headers */, + 9052DE8B2150D06B008E83D4 /* CDVPlugin+Private.h in Headers */, + 9052DE8C2150D06B008E83D4 /* CDVLogger.h in Headers */, + 9052DE8D2150D06B008E83D4 /* CDVGestureHandler.h in Headers */, + 9052DE8E2150D06B008E83D4 /* CDVIntentAndNavigationFilter.h in Headers */, + 9052DE8F2150D06B008E83D4 /* CDVHandleOpenURL.h in Headers */, + 9052DE902150D06B008E83D4 /* CDVLocalStorage.h in Headers */, + 9052DE912150D06B008E83D4 /* CDVUIWebViewNavigationDelegate.h in Headers */, + 9052DE922150D06B008E83D4 /* CDVUIWebViewEngine.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -424,12 +456,10 @@ C0C01EAD1E3911D50056E6CB /* Sources */, C0C01EAE1E3911D50056E6CB /* Frameworks */, C0C01EAF1E3911D50056E6CB /* Headers */, - C0C01EB01E3911D50056E6CB /* Resources */, ); buildRules = ( ); dependencies = ( - C0C01ED21E39137C0056E6CB /* PBXTargetDependency */, ); name = Cordova; productName = Cordova; @@ -459,7 +489,7 @@ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0720; + LastUpgradeCheck = 1000; TargetAttributes = { C0C01EB11E3911D50056E6CB = { CreatedOnToolsVersion = 8.2; @@ -489,21 +519,35 @@ }; /* End PBXProject section */ -/* Begin PBXResourcesBuildPhase section */ - C0C01EB01E3911D50056E6CB /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ C0C01EAD1E3911D50056E6CB /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 9052DE712150D040008E83D4 /* CDVAppDelegate.m in Sources */, + 9052DE722150D040008E83D4 /* CDVCommandDelegateImpl.m in Sources */, + 9052DE732150D040008E83D4 /* CDVCommandQueue.m in Sources */, + 9052DE742150D040008E83D4 /* CDVConfigParser.m in Sources */, + 9052DE752150D040008E83D4 /* CDVInvokedUrlCommand.m in Sources */, + 9052DE762150D040008E83D4 /* CDVPlugin+Resources.m in Sources */, + 9052DE772150D040008E83D4 /* CDVPlugin.m in Sources */, + 9052DE782150D040008E83D4 /* CDVPluginResult.m in Sources */, + 9052DE792150D040008E83D4 /* CDVTimer.m in Sources */, + 9052DE7A2150D040008E83D4 /* CDVURLProtocol.m in Sources */, + 9052DE7B2150D040008E83D4 /* CDVUserAgentUtil.m in Sources */, + 9052DE7C2150D040008E83D4 /* CDVViewController.m in Sources */, + 9052DE7D2150D040008E83D4 /* CDVWhitelist.m in Sources */, + 9052DE7E2150D040008E83D4 /* NSDictionary+CordovaPreferences.m in Sources */, + 9052DE7F2150D040008E83D4 /* NSMutableArray+QueueAdditions.m in Sources */, + 9052DE802150D040008E83D4 /* CDVJSON_private.m in Sources */, + 9052DE812150D040008E83D4 /* CDVLogger.m in Sources */, + 9052DE822150D040008E83D4 /* CDVGestureHandler.m in Sources */, + 9052DE832150D040008E83D4 /* CDVIntentAndNavigationFilter.m in Sources */, + 9052DE842150D040008E83D4 /* CDVHandleOpenURL.m in Sources */, + 9052DE852150D040008E83D4 /* CDVLocalStorage.m in Sources */, + 9052DE862150D040008E83D4 /* CDVUIWebViewNavigationDelegate.m in Sources */, + 9052DE872150D040008E83D4 /* CDVUIWebViewDelegate.m in Sources */, + 9052DE882150D040008E83D4 /* CDVUIWebViewEngine.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -540,14 +584,6 @@ }; /* End PBXSourcesBuildPhase section */ -/* Begin PBXTargetDependency section */ - C0C01ED21E39137C0056E6CB /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = D2AAC07D0554694100DB518D /* CordovaLib */; - targetProxy = C0C01ED11E39137C0056E6CB /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - /* Begin XCBuildConfiguration section */ 1DEB921F08733DC00010E9CD /* Debug */ = { isa = XCBuildConfiguration; @@ -566,7 +602,7 @@ GCC_THUMB_SUPPORT = NO; GCC_VERSION = ""; INSTALL_PATH = /usr/local/lib; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; PRODUCT_NAME = Cordova; PUBLIC_HEADERS_FOLDER_PATH = include/Cordova; SKIP_INSTALL = YES; @@ -587,7 +623,7 @@ GCC_THUMB_SUPPORT = NO; GCC_VERSION = ""; INSTALL_PATH = /usr/local/lib; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; PRODUCT_NAME = Cordova; PUBLIC_HEADERS_FOLDER_PATH = include/Cordova; SKIP_INSTALL = YES; @@ -597,24 +633,39 @@ 1DEB922308733DC00010E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c99; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ""; GCC_THUMB_SUPPORT = NO; GCC_VERSION = ""; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = "-DDEBUG"; PUBLIC_HEADERS_FOLDER_PATH = include/Cordova; @@ -628,22 +679,37 @@ 1DEB922408733DC00010E9CD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c99; + GCC_NO_COMMON_BLOCKS = YES; GCC_PREPROCESSOR_DEFINITIONS = ""; GCC_THUMB_SUPPORT = NO; GCC_VERSION = ""; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; ONLY_ACTIVE_ARCH = NO; PUBLIC_HEADERS_FOLDER_PATH = include/Cordova; SDKROOT = iphoneos; @@ -656,7 +722,6 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD)"; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -681,6 +746,8 @@ GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = CordovaLib_Prefix.pch; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", @@ -690,7 +757,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; INFOPLIST_FILE = Cordova/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = "-all_load"; @@ -707,7 +774,6 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD)"; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -732,12 +798,14 @@ ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = CordovaLib_Prefix.pch; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; INFOPLIST_FILE = Cordova/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; OTHER_LDFLAGS = "-all_load"; diff --git a/CordovaLib/CordovaLib.xcodeproj/xcshareddata/xcschemes/Cordova.xcscheme b/CordovaLib/CordovaLib.xcodeproj/xcshareddata/xcschemes/Cordova.xcscheme index e94f15120..f2e2321e8 100644 --- a/CordovaLib/CordovaLib.xcodeproj/xcshareddata/xcschemes/Cordova.xcscheme +++ b/CordovaLib/CordovaLib.xcodeproj/xcshareddata/xcschemes/Cordova.xcscheme @@ -1,6 +1,6 @@ CFBundleDevelopmentRegion - English + en_US CFBundleDisplayName - ${PRODUCT_NAME} + $(PRODUCT_NAME) CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIcons - - CFBundleIcons~ipad - + $(EXECUTABLE_NAME) CFBundleIdentifier - --ID-- + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName - ${PRODUCT_NAME} + $(PRODUCT_NAME) CFBundlePackageType APPL CFBundleShortVersionString @@ -25,13 +21,15 @@ CFBundleSignature ???? CFBundleVersion - 1.0 + 1 LSRequiresIPhoneOS NSMainNibFile NSMainNibFile~ipad + UIRequiresFullScreen + UISupportedInterfaceOrientations UIInterfaceOrientationPortrait @@ -45,7 +43,5 @@ UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeRight - UIRequiresFullScreen - diff --git a/bin/templates/project/__TEMP__.xcodeproj/project.pbxproj b/bin/templates/project/__TEMP__.xcodeproj/project.pbxproj index 4c3179562..c6f995219 100755 --- a/bin/templates/project/__TEMP__.xcodeproj/project.pbxproj +++ b/bin/templates/project/__TEMP__.xcodeproj/project.pbxproj @@ -10,12 +10,9 @@ 0207DA581B56EA530066E2B4 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0207DA571B56EA530066E2B4 /* Images.xcassets */; }; 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* AppDelegate.m */; }; 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; - 301BF552109A68D80062928A /* libCordova.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF535109A57CC0062928A /* libCordova.a */; }; + 301BF552109A68D80062928A /* libCordova.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF535109A57CC0062928A /* libCordova.a */; settings = {ATTRIBUTES = (Required, ); }; }; 302D95F114D2391D003F00A1 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 302D95EF14D2391D003F00A1 /* MainViewController.m */; }; 302D95F214D2391D003F00A1 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 302D95F014D2391D003F00A1 /* MainViewController.xib */; }; - 3047A5121AB8059700498E2A /* build-debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 3047A50F1AB8059700498E2A /* build-debug.xcconfig */; }; - 3047A5131AB8059700498E2A /* build-release.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 3047A5101AB8059700498E2A /* build-release.xcconfig */; }; - 3047A5141AB8059700498E2A /* build.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 3047A5111AB8059700498E2A /* build.xcconfig */; }; 6AFF5BF91D6E424B00AB3073 /* CDVLaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6AFF5BF81D6E424B00AB3073 /* CDVLaunchScreen.storyboard */; }; /* End PBXBuildFile section */ @@ -34,6 +31,13 @@ remoteGlobalIDString = D2AAC07D0554694100DB518D; remoteInfo = CordovaLib; }; + 907D8123214C687600058A10 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = C0C01EB21E3911D50056E6CB; + remoteInfo = Cordova; + }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ @@ -47,16 +51,16 @@ 302D95EE14D2391D003F00A1 /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = ""; }; 302D95EF14D2391D003F00A1 /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainViewController.m; sourceTree = ""; }; 302D95F014D2391D003F00A1 /* MainViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainViewController.xib; sourceTree = ""; }; - 3047A50F1AB8059700498E2A /* build-debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "build-debug.xcconfig"; path = cordova/build-debug.xcconfig; sourceTree = SOURCE_ROOT; }; - 3047A5101AB8059700498E2A /* build-release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "build-release.xcconfig"; path = cordova/build-release.xcconfig; sourceTree = SOURCE_ROOT; }; + 3047A50F1AB8059700498E2A /* build-debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "build-debug.xcconfig"; path = "cordova/build-debug.xcconfig"; sourceTree = SOURCE_ROOT; }; + 3047A5101AB8059700498E2A /* build-release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "build-release.xcconfig"; path = "cordova/build-release.xcconfig"; sourceTree = SOURCE_ROOT; }; 3047A5111AB8059700498E2A /* build.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = build.xcconfig; path = cordova/build.xcconfig; sourceTree = SOURCE_ROOT; }; 32CA4F630368D1EE00C91783 /* __PROJECT_NAME__-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "__PROJECT_NAME__-Prefix.pch"; sourceTree = ""; }; 6AFF5BF81D6E424B00AB3073 /* CDVLaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = CDVLaunchScreen.storyboard; path = "__PROJECT_NAME__/CDVLaunchScreen.storyboard"; sourceTree = SOURCE_ROOT; }; 8D1107310486CEB800E47090 /* __PROJECT_NAME__-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "__PROJECT_NAME__-Info.plist"; path = "__PROJECT_NAME__/__PROJECT_NAME__-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = SOURCE_ROOT; }; EB87FDF31871DA8E0020F90C /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; name = www; path = ../../www; sourceTree = ""; }; EB87FDF41871DAF40020F90C /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = ../../config.xml; sourceTree = ""; }; - F840E1F0165FE0F500CFE078 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = "__PROJECT_NAME__/config.xml"; sourceTree = ""; }; ED33DF2A687741AEAF9F8254 /* Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Bridging-Header.h"; path = "Bridging-Header.h"; sourceTree = ""; }; + F840E1F0165FE0F500CFE078 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = "__PROJECT_NAME__/config.xml"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -143,6 +147,7 @@ isa = PBXGroup; children = ( 301BF535109A57CC0062928A /* libCordova.a */, + 907D8124214C687600058A10 /* Cordova.framework */, ); name = Products; sourceTree = ""; @@ -209,7 +214,7 @@ }; }; }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "__NON-CLI__" */; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "__PROJECT_NAME__" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 1; @@ -236,6 +241,13 @@ remoteRef = 301BF534109A57CC0062928A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; + 907D8124214C687600058A10 /* Cordova.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = Cordova.framework; + remoteRef = 907D8123214C687600058A10 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ @@ -308,10 +320,11 @@ GCC_THUMB_SUPPORT = NO; GCC_VERSION = ""; INFOPLIST_FILE = "__PROJECT_NAME__/__PROJECT_NAME__-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "__PROJECT_ID__"; + PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; - PRODUCT_NAME = "__PROJECT_NAME__"; }; name = Debug; }; @@ -330,10 +343,11 @@ GCC_THUMB_SUPPORT = NO; GCC_VERSION = ""; INFOPLIST_FILE = "__PROJECT_NAME__/__PROJECT_NAME__-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "__PROJECT_ID__"; + PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; - PRODUCT_NAME = "__PROJECT_NAME__"; }; name = Release; }; @@ -343,15 +357,30 @@ buildSettings = { CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c99; + GCC_NO_COMMON_BLOCKS = YES; GCC_THUMB_SUPPORT = NO; GCC_VERSION = ""; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; @@ -369,15 +398,29 @@ buildSettings = { CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c99; + GCC_NO_COMMON_BLOCKS = YES; GCC_THUMB_SUPPORT = NO; GCC_VERSION = ""; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; @@ -400,7 +443,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "__NON-CLI__" */ = { + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "__PROJECT_NAME__" */ = { isa = XCConfigurationList; buildConfigurations = ( C01FCF4F08A954540054247B /* Debug */, diff --git a/bin/templates/scripts/cordova/lib/prepare.js b/bin/templates/scripts/cordova/lib/prepare.js index 860b6e4c8..5fd4ea1ea 100644 --- a/bin/templates/scripts/cordova/lib/prepare.js +++ b/bin/templates/scripts/cordova/lib/prepare.js @@ -189,7 +189,6 @@ function updateProject (platformConfig, locations) { // because node and shell scripts handles unicode symbols differently // We need to normalize the name to NFD form since iOS uses NFD unicode form var name = unorm.nfd(platformConfig.name()); - var pkg = platformConfig.getAttribute('ios-CFBundleIdentifier') || platformConfig.packageName(); var version = platformConfig.version(); var displayName = platformConfig.shortName && platformConfig.shortName(); @@ -198,7 +197,6 @@ function updateProject (platformConfig, locations) { // Update package id (bundle id) var plistFile = path.join(locations.xcodeCordovaProj, originalName + '-Info.plist'); var infoPlist = plist.parse(fs.readFileSync(plistFile, 'utf8')); - infoPlist['CFBundleIdentifier'] = pkg; // Update version (bundle version) infoPlist['CFBundleShortVersionString'] = version; @@ -224,10 +222,14 @@ function updateProject (platformConfig, locations) { handleOrientationSettings(platformConfig, infoPlist); updateProjectPlistForLaunchStoryboard(platformConfig, infoPlist); - var info_contents = plist.build(infoPlist); + /* eslint-disable no-tabs */ + // Write out the plist file with the same formatting as Xcode does + var info_contents = plist.build(infoPlist, { indent: ' ', offset: -1 }); + /* eslint-enable no-tabs */ + info_contents = info_contents.replace(/[\s\r\n]*<\/string>/g, ''); fs.writeFileSync(plistFile, info_contents, 'utf-8'); - events.emit('verbose', 'Wrote out iOS Bundle Identifier "' + pkg + '" and iOS Bundle Version "' + version + '" to ' + plistFile); + events.emit('verbose', 'Wrote out iOS Bundle Version "' + version + '" to ' + plistFile); return handleBuildSettings(platformConfig, locations, infoPlist).then(function () { if (name === originalName) { @@ -274,23 +276,31 @@ function handleOrientationSettings (platformConfig, infoPlist) { } function handleBuildSettings (platformConfig, locations, infoPlist) { + var pkg = platformConfig.getAttribute('ios-CFBundleIdentifier') || platformConfig.packageName(); var targetDevice = parseTargetDevicePreference(platformConfig.getPreference('target-device', 'ios')); var deploymentTarget = platformConfig.getPreference('deployment-target', 'ios'); var needUpdatedBuildSettingsForLaunchStoryboard = checkIfBuildSettingsNeedUpdatedForLaunchStoryboard(platformConfig, infoPlist); var swiftVersion = platformConfig.getPreference('SwiftVersion', 'ios'); - // no build settings provided and we don't need to update build settings for launch storyboards, - // then we don't need to parse and update .pbxproj file - if (!targetDevice && !deploymentTarget && !needUpdatedBuildSettingsForLaunchStoryboard && !swiftVersion) { - return Q(); - } - var proj = new xcode.project(locations.pbxproj); /* eslint new-cap : 0 */ try { proj.parseSync(); } catch (err) { - return Q.reject(new CordovaError('Could not parse project.pbxproj: ' + err)); + return Q.reject(new CordovaError('Could not parse ' + locations.pbxproj + ': ' + err)); + } + + var origPkg = proj.getBuildProperty('PRODUCT_BUNDLE_IDENTIFIER'); + + // no build settings provided and we don't need to update build settings for launch storyboards, + // then we don't need to parse and update .pbxproj file + if (origPkg === pkg && !targetDevice && !deploymentTarget && !needUpdatedBuildSettingsForLaunchStoryboard && !swiftVersion) { + return Q(); + } + + if (origPkg !== pkg) { + events.emit('verbose', 'Set PRODUCT_BUNDLE_IDENTIFIER to ' + pkg + '.'); + proj.updateBuildProperty('PRODUCT_BUNDLE_IDENTIFIER', pkg); } if (targetDevice) { diff --git a/tests/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj b/tests/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj index d813d0911..fb6f059c8 100644 --- a/tests/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj +++ b/tests/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj @@ -555,7 +555,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = "-DDEBUG"; @@ -594,7 +594,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; ONLY_ACTIVE_ARCH = NO; OTHER_LDFLAGS = ( @@ -629,7 +629,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; HEADER_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = "CordovaLibApp/CordovaLibApp-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LIBRARY_SEARCH_PATHS = "$(inherited)"; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; @@ -652,7 +652,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; HEADER_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = "CordovaLibApp/CordovaLibApp-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LIBRARY_SEARCH_PATHS = "$(inherited)"; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -684,7 +684,7 @@ "$(BUILT_PRODUCTS_DIR)/include/Cordova/**", ); INFOPLIST_FILE = "CordovaLibTests-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = ( "-all_load", @@ -715,7 +715,7 @@ "$(BUILT_PRODUCTS_DIR)/include/Cordova/**", ); INFOPLIST_FILE = "CordovaLibTests-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; ONLY_ACTIVE_ARCH = NO; OTHER_LDFLAGS = ( "-all_load", @@ -746,7 +746,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; HEADER_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = "$(SRCROOT)/CordovaLibApp/CordovaLibApp-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = "$(inherited)"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -770,7 +770,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; HEADER_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = "$(SRCROOT)/CordovaLibApp/CordovaLibApp-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = "$(inherited)"; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; @@ -803,7 +803,7 @@ "$(BUILT_PRODUCTS_DIR)/include/Cordova/**", ); INFOPLIST_FILE = "CordovaLibTests-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = ( "-all_load", @@ -834,7 +834,7 @@ "$(BUILT_PRODUCTS_DIR)/include/Cordova/**", ); INFOPLIST_FILE = "CordovaLibTests-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; ONLY_ACTIVE_ARCH = NO; OTHER_LDFLAGS = ( "-all_load", diff --git a/tests/cordova-ios.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/tests/cordova-ios.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/tests/cordova-ios.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaFrameworkApp.xcscheme b/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaFrameworkApp.xcscheme index 65b737e11..e2f9a9d8f 100644 --- a/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaFrameworkApp.xcscheme +++ b/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaFrameworkApp.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> + + + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -80,15 +80,18 @@ ReferencedContainer = "container:CordovaLibTests/CordovaLibTests.xcodeproj"> + + @@ -104,10 +107,10 @@ diff --git a/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaLibTests.xcscheme b/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaLibTests.xcscheme index 2b4f1c74d..a2722dd67 100644 --- a/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaLibTests.xcscheme +++ b/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaLibTests.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -62,15 +62,18 @@ ReferencedContainer = "container:CordovaLibTests/CordovaLibTests.xcodeproj"> + + - should handle wildcard, with NSAllowsArbitraryLoadsInWebContent', function (done) { + const origReadFile = fse.readFileSync; var readFile = spyOn(fse, 'readFileSync'); var configXml = 'SampleApp' + '' + ''; - readFile.and.returnValue(configXml); + + readFile.and.callFake(function (...args) { + if (args[0] === 'fake/path') { + return configXml; + } + return origReadFile(...args); + }); var my_config = new ConfigParser('fake/path'); @@ -791,11 +809,18 @@ describe('prepare', function () { it(' - should handle wildcard, with NSAllowsArbitraryLoadsForMedia set (fixed allows-arbitrary-loads-for-media)', function (done) { + const origReadFile = fse.readFileSync; var readFile = spyOn(fse, 'readFileSync'); var configXml = 'SampleApp' + '' + ''; - readFile.and.returnValue(configXml); + + readFile.and.callFake(function (...args) { + if (args[0] === 'fake/path') { + return configXml; + } + return origReadFile(...args); + }); var my_config = new ConfigParser('fake/path'); wrapper(updateProject(my_config, p.locations), done, function () { @@ -810,11 +835,18 @@ describe('prepare', function () { it(' - should handle wildcard, with NSAllowsArbitraryLoadsForMedia not set (fixed allows-arbitrary-loads-for-media)', function (done) { + const origReadFile = fse.readFileSync; var readFile = spyOn(fse, 'readFileSync'); var configXml = 'SampleApp' + '' + ''; - readFile.and.returnValue(configXml); + + readFile.and.callFake(function (...args) { + if (args[0] === 'fake/path') { + return configXml; + } + return origReadFile(...args); + }); var my_config = new ConfigParser('fake/path'); wrapper(updateProject(my_config, p.locations), done, function () { @@ -829,11 +861,18 @@ describe('prepare', function () { it(' - should handle wildcard, with NSAllowsArbitraryLoadsForMedia set (deprecated allows-arbitrary-loads-in-media)', function (done) { + const origReadFile = fse.readFileSync; var readFile = spyOn(fse, 'readFileSync'); var configXml = 'SampleApp' + '' + ''; - readFile.and.returnValue(configXml); + + readFile.and.callFake(function (...args) { + if (args[0] === 'fake/path') { + return configXml; + } + return origReadFile(...args); + }); var my_config = new ConfigParser('fake/path'); wrapper(updateProject(my_config, p.locations), done, function () { @@ -848,11 +887,18 @@ describe('prepare', function () { it(' - should handle wildcard, with NSAllowsArbitraryLoadsForMedia not set (deprecated allows-arbitrary-loads-in-media)', function (done) { + const origReadFile = fse.readFileSync; var readFile = spyOn(fse, 'readFileSync'); var configXml = 'SampleApp' + '' + ''; - readFile.and.returnValue(configXml); + + readFile.and.callFake(function (...args) { + if (args[0] === 'fake/path') { + return configXml; + } + return origReadFile(...args); + }); var my_config = new ConfigParser('fake/path'); wrapper(updateProject(my_config, p.locations), done, function () { @@ -867,11 +913,18 @@ describe('prepare', function () { it(' - should handle wildcard, with NSAllowsLocalNetworking', function (done) { + const origReadFile = fse.readFileSync; var readFile = spyOn(fse, 'readFileSync'); var configXml = 'SampleApp' + '' + ''; - readFile.and.returnValue(configXml); + + readFile.and.callFake(function (...args) { + if (args[0] === 'fake/path') { + return configXml; + } + return origReadFile(...args); + }); var my_config = new ConfigParser('fake/path'); @@ -887,11 +940,18 @@ describe('prepare', function () { it(' - should handle wildcard, with NSAllowsArbitraryLoadsInWebContent, NSAllowsArbitraryLoadsForMedia, NSAllowsLocalNetworking', function (done) { + const origReadFile = fse.readFileSync; var readFile = spyOn(fse, 'readFileSync'); var configXml = 'SampleApp' + '' + ''; - readFile.and.returnValue(configXml); + + readFile.and.callFake(function (...args) { + if (args[0] === 'fake/path') { + return configXml; + } + return origReadFile(...args); + }); var my_config = new ConfigParser('fake/path'); @@ -906,11 +966,18 @@ describe('prepare', function () { }); it(' - sanity check - no wildcard but has NSAllowsArbitraryLoadsInWebContent, NSAllowsArbitraryLoadsForMedia, NSAllowsLocalNetworking', function (done) { + const origReadFile = fse.readFileSync; var readFile = spyOn(fse, 'readFileSync'); var configXml = 'SampleApp' + '' + ''; - readFile.and.returnValue(configXml); + + readFile.and.callFake(function (...args) { + if (args[0] === 'fake/path') { + return configXml; + } + return origReadFile(...args); + }); var my_config = new ConfigParser('fake/path'); @@ -1176,11 +1243,18 @@ describe('prepare', function () { it(' - should handle wildcard', function (done) { + const origReadFile = fse.readFileSync; var readFile = spyOn(fse, 'readFileSync'); var configXml = 'SampleApp' + '' + ''; - readFile.and.returnValue(configXml); + + readFile.and.callFake(function (...args) { + if (args[0] === 'fake/path') { + return configXml; + } + return origReadFile(...args); + }); var my_config = new ConfigParser('fake/path'); @@ -1196,11 +1270,18 @@ describe('prepare', function () { it(' - sanity check - no wildcard but has NSAllowsArbitraryLoadsInWebContent, NSAllowsArbitraryLoadsForMedia, NSAllowsLocalNetworking', function (done) { + const origReadFile = fse.readFileSync; var readFile = spyOn(fse, 'readFileSync'); var configXml = 'SampleApp' + '' + ''; - readFile.and.returnValue(configXml); + + readFile.and.callFake(function (...args) { + if (args[0] === 'fake/path') { + return configXml; + } + return origReadFile(...args); + }); var my_config = new ConfigParser('fake/path');