Skip to content

Commit b6ae567

Browse files
authored
chore!: Bump CordovaLib requirements to iOS 13+ (#1480)
1 parent 5dede30 commit b6ae567

File tree

20 files changed

+33
-74
lines changed

20 files changed

+33
-74
lines changed

Cordova.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Pod::Spec.new do |s|
3131
s.homepage = "https://github.com/apache/cordova-ios"
3232
s.license = { :type => "Apache 2.0", :file => "LICENSE" }
3333
s.author = "Apache Software Foundation"
34-
s.platform = :ios, "11.0"
34+
s.platform = :ios, "13.0"
3535
s.source = relSource
3636
s.requires_arc = true
3737
s.frameworks = ["Foundation", "UIKit", "WebKit"]

CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.m

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,11 @@ - (WKWebViewConfiguration*) createConfigurationFromSettings:(CDVSettingsDictiona
147147
}
148148
configuration.applicationNameForUserAgent = userAgent;
149149

150-
if (@available(iOS 13.0, *)) {
151-
NSString *contentMode = [settings cordovaSettingForKey:@"PreferredContentMode"];
152-
if ([contentMode isEqual: @"mobile"]) {
153-
configuration.defaultWebpagePreferences.preferredContentMode = WKContentModeMobile;
154-
} else if ([contentMode isEqual: @"desktop"]) {
155-
configuration.defaultWebpagePreferences.preferredContentMode = WKContentModeDesktop;
156-
}
157-
150+
NSString *contentMode = [settings cordovaSettingForKey:@"PreferredContentMode"];
151+
if ([contentMode isEqual: @"mobile"]) {
152+
configuration.defaultWebpagePreferences.preferredContentMode = WKContentModeMobile;
153+
} else if ([contentMode isEqual: @"desktop"]) {
154+
configuration.defaultWebpagePreferences.preferredContentMode = WKContentModeDesktop;
158155
}
159156

160157
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 140000

CordovaLib/Classes/Public/CDVViewController.m

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,7 @@ Licensed to the Apache Software Foundation (ASF) under one
3030
#import "CDVCommandDelegateImpl.h"
3131

3232
static UIColor* defaultBackgroundColor(void) {
33-
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
34-
if (@available(iOS 13.0, *)) {
35-
return UIColor.systemBackgroundColor;
36-
}
37-
#endif
38-
39-
return UIColor.whiteColor;
33+
return UIColor.systemBackgroundColor;
4034
}
4135

4236
@interface CDVViewController () <CDVWebViewEngineConfigurationDelegate> {

CordovaLib/CordovaLib.xcodeproj/project.pbxproj

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
archiveVersion = 1;
2222
classes = {
2323
};
24-
objectVersion = 52;
24+
objectVersion = 54;
2525
objects = {
2626

2727
/* Begin PBXBuildFile section */
@@ -194,8 +194,8 @@
194194
7ED95D321AB9029B008C4574 /* NSDictionary+CordovaPreferences.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+CordovaPreferences.m"; sourceTree = "<group>"; };
195195
7ED95D331AB9029B008C4574 /* NSMutableArray+QueueAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableArray+QueueAdditions.h"; sourceTree = "<group>"; };
196196
7ED95D341AB9029B008C4574 /* NSMutableArray+QueueAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableArray+QueueAdditions.m"; sourceTree = "<group>"; };
197-
902D0BC12AEB64EB009C68E5 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
198197
902B30732C6C5A7E00C6804C /* CordovaLib.docc */ = {isa = PBXFileReference; lastKnownFileType = folder.documentationcatalog; path = CordovaLib.docc; sourceTree = "<group>"; };
198+
902D0BC12AEB64EB009C68E5 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
199199
9036843B2C6EB06500A3338C /* CDVAllowList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CDVAllowList.h; sourceTree = "<group>"; };
200200
9036843C2C6EB06500A3338C /* CDVAllowList.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CDVAllowList.m; sourceTree = "<group>"; };
201201
9047732D2C7A57E900373636 /* CDVURLSchemeHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CDVURLSchemeHandler.h; sourceTree = "<group>"; };
@@ -521,7 +521,7 @@
521521
isa = PBXProject;
522522
attributes = {
523523
BuildIndependentTargetsInParallel = YES;
524-
LastUpgradeCheck = 1010;
524+
LastUpgradeCheck = 1540;
525525
TargetAttributes = {
526526
C0C01EB11E3911D50056E6CB = {
527527
CreatedOnToolsVersion = 10.1;
@@ -711,7 +711,7 @@
711711
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
712712
GCC_WARN_UNUSED_FUNCTION = YES;
713713
GCC_WARN_UNUSED_VARIABLE = YES;
714-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
714+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
715715
MERGEABLE_LIBRARY = YES;
716716
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
717717
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14";
@@ -778,7 +778,7 @@
778778
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
779779
GCC_WARN_UNUSED_FUNCTION = YES;
780780
GCC_WARN_UNUSED_VARIABLE = YES;
781-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
781+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
782782
MERGEABLE_LIBRARY = YES;
783783
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
784784
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14";
@@ -800,7 +800,6 @@
800800
ENABLE_MODULE_VERIFIER = YES;
801801
INFOPLIST_FILE = Info.plist;
802802
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
803-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
804803
LD_RUNPATH_SEARCH_PATHS = (
805804
"$(inherited)",
806805
"@executable_path/Frameworks",
@@ -824,7 +823,6 @@
824823
ENABLE_MODULE_VERIFIER = YES;
825824
INFOPLIST_FILE = Info.plist;
826825
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
827-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
828826
LD_RUNPATH_SEARCH_PATHS = (
829827
"$(inherited)",
830828
"@executable_path/Frameworks",

CordovaLib/CordovaLib.xcodeproj/xcshareddata/xcschemes/Cordova.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
under the License.
1919
-->
2020
<Scheme
21-
LastUpgradeVersion = "1130"
21+
LastUpgradeVersion = "1540"
2222
version = "1.3">
2323
<BuildAction
2424
parallelizeBuildables = "YES"

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import PackageDescription
2424
let package = Package(
2525
name: "Cordova",
2626
platforms: [
27-
.iOS(.v11),
27+
.iOS(.v13),
2828
.macCatalyst(.v13)
2929
],
3030
products: [

lib/Podfile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function Podfile (podFilePath, projectName, minDeploymentTarget) {
3737

3838
this.path = podFilePath;
3939
this.projectName = projectName;
40-
this.minDeploymentTarget = minDeploymentTarget || '11.0';
40+
this.minDeploymentTarget = minDeploymentTarget || '13.0';
4141
this.contents = null;
4242
this.sources = null;
4343
this.declarations = null;
@@ -73,7 +73,7 @@ Podfile.prototype.__parseForDeclarations = function (text) {
7373
// split by \n
7474
const arr = text.split('\n');
7575

76-
// getting lines between "platform :ios, '11.0'"" and "target 'HelloCordova'" do
76+
// getting lines between "platform :ios, '13.0'"" and "target 'HelloCordova'" do
7777
const declarationsPreRE = /platform :ios,\s+'[^']+'/;
7878
const declarationsPostRE = /target\s+'[^']+'\s+do/;
7979
const declarationRE = /^\s*[^#]/;

tests/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@
581581
GCC_WARN_UNINITIALIZED_AUTOS = YES;
582582
GCC_WARN_UNUSED_FUNCTION = YES;
583583
GCC_WARN_UNUSED_VARIABLE = YES;
584-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
584+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
585585
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
586586
MERGED_BINARY_TYPE = automatic;
587587
ONLY_ACTIVE_ARCH = YES;
@@ -638,7 +638,7 @@
638638
GCC_WARN_UNINITIALIZED_AUTOS = YES;
639639
GCC_WARN_UNUSED_FUNCTION = YES;
640640
GCC_WARN_UNUSED_VARIABLE = YES;
641-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
641+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
642642
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
643643
MERGED_BINARY_TYPE = automatic;
644644
ONLY_ACTIVE_ARCH = NO;
@@ -677,7 +677,7 @@
677677
GCC_WARN_UNINITIALIZED_AUTOS = YES;
678678
HEADER_SEARCH_PATHS = "$(inherited)";
679679
INFOPLIST_FILE = "CordovaLibApp/CordovaLibApp-Info.plist";
680-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
680+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
681681
LIBRARY_SEARCH_PATHS = "$(inherited)";
682682
PRODUCT_BUNDLE_IDENTIFIER = "org.apache.cordova.cordovalibapptests.${PRODUCT_NAME:rfc1034identifier}";
683683
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -702,7 +702,7 @@
702702
GCC_WARN_UNINITIALIZED_AUTOS = YES;
703703
HEADER_SEARCH_PATHS = "$(inherited)";
704704
INFOPLIST_FILE = "CordovaLibApp/CordovaLibApp-Info.plist";
705-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
705+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
706706
LIBRARY_SEARCH_PATHS = "$(inherited)";
707707
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
708708
PRODUCT_BUNDLE_IDENTIFIER = "org.apache.cordova.cordovalibapptests.${PRODUCT_NAME:rfc1034identifier}";
@@ -736,7 +736,7 @@
736736
"$(BUILT_PRODUCTS_DIR)/include/Cordova/**",
737737
);
738738
INFOPLIST_FILE = "CordovaLibTests-Info.plist";
739-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
739+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
740740
ONLY_ACTIVE_ARCH = YES;
741741
OTHER_LDFLAGS = (
742742
"-all_load",
@@ -768,7 +768,7 @@
768768
"$(BUILT_PRODUCTS_DIR)/include/Cordova/**",
769769
);
770770
INFOPLIST_FILE = "CordovaLibTests-Info.plist";
771-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
771+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
772772
ONLY_ACTIVE_ARCH = NO;
773773
OTHER_LDFLAGS = (
774774
"-all_load",
@@ -800,7 +800,7 @@
800800
GCC_WARN_UNINITIALIZED_AUTOS = YES;
801801
HEADER_SEARCH_PATHS = "$(inherited)";
802802
INFOPLIST_FILE = "$(SRCROOT)/CordovaLibApp/CordovaLibApp-Info.plist";
803-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
803+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
804804
LD_RUNPATH_SEARCH_PATHS = (
805805
"$(inherited)",
806806
"@executable_path/Frameworks",
@@ -829,7 +829,7 @@
829829
GCC_WARN_UNINITIALIZED_AUTOS = YES;
830830
HEADER_SEARCH_PATHS = "$(inherited)";
831831
INFOPLIST_FILE = "$(SRCROOT)/CordovaLibApp/CordovaLibApp-Info.plist";
832-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
832+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
833833
LD_RUNPATH_SEARCH_PATHS = (
834834
"$(inherited)",
835835
"@executable_path/Frameworks",
@@ -867,7 +867,7 @@
867867
"$(BUILT_PRODUCTS_DIR)/include/Cordova/**",
868868
);
869869
INFOPLIST_FILE = "CordovaLibTests-Info.plist";
870-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
870+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
871871
ONLY_ACTIVE_ARCH = YES;
872872
OTHER_LDFLAGS = (
873873
"-all_load",
@@ -899,7 +899,7 @@
899899
"$(BUILT_PRODUCTS_DIR)/include/Cordova/**",
900900
);
901901
INFOPLIST_FILE = "CordovaLibTests-Info.plist";
902-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
902+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
903903
ONLY_ACTIVE_ARCH = NO;
904904
OTHER_LDFLAGS = (
905905
"-all_load",

tests/spec/unit/fixtures/icon-support/configs/multi.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
<content src="index.html" />
1111

1212
<platform name="ios">
13-
<preference name="orientation" value="all" />
14-
<preference name="target-device" value="handset" />
15-
<preference name="deployment-target" value="13.0" />
16-
1713
<icon src="res/ios/AppIcon-20x20@2x.png" height="40" width="40" />
1814
<icon src="res/ios/AppIcon-20x20@3x.png" height="60" width="60" />
1915
<icon src="res/ios/AppIcon-29x29@2x.png" height="58" width="58" />

tests/spec/unit/fixtures/icon-support/configs/none.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
<content src="index.html" />
1111

1212
<platform name="ios">
13-
<preference name="orientation" value="all" />
14-
<preference name="target-device" value="handset" />
15-
<preference name="deployment-target" value="13.0" />
1613
</platform>
1714

1815
<access origin="http://*.apache.org" />

0 commit comments

Comments
 (0)