diff --git a/Cordova.podspec b/Cordova.podspec index 786bf1bb5c..ec48830d50 100644 --- a/Cordova.podspec +++ b/Cordova.podspec @@ -34,9 +34,10 @@ Pod::Spec.new do |s| s.platform = :ios, "11.0" s.source = relSource s.requires_arc = true - s.frameworks = 'Foundation' + s.frameworks = ["Foundation", "UIKit", "WebKit"] s.source_files = 'CordovaLib/**/*.{h,m}' s.public_header_files = 'CordovaLib/include/**/*.h' + s.resource_bundles = { "Cordova" => ["CordovaLib/Cordova/PrivacyInfo.xcprivacy"] } end # diff --git a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj index 04a7b35c7b..d6ceb49fb3 100644 --- a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj +++ b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj @@ -94,6 +94,8 @@ 9052DE8E2150D06B008E83D4 /* CDVIntentAndNavigationFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 3093E2211B16D6A3003F381A /* CDVIntentAndNavigationFilter.h */; }; 9052DE8F2150D06B008E83D4 /* CDVHandleOpenURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF81AB9028C008C4574 /* CDVHandleOpenURL.h */; }; 9059F51C26F2CE2400B3B2B7 /* CDVURLSchemeHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 2F4D42BA23F218BA00501999 /* CDVURLSchemeHandler.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 90B382512AEB72DD00F3F4D7 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 902D0BC12AEB64EB009C68E5 /* PrivacyInfo.xcprivacy */; }; + 90DE61742B8F11D300810C2E /* Cordova.h in Headers */ = {isa = PBXBuildFile; fileRef = C0C01EB41E3911D50056E6CB /* Cordova.h */; settings = {ATTRIBUTES = (Public, ); }; }; 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, ); }; }; @@ -172,6 +174,7 @@ 7ED95D321AB9029B008C4574 /* NSDictionary+CordovaPreferences.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+CordovaPreferences.m"; sourceTree = ""; }; 7ED95D331AB9029B008C4574 /* NSMutableArray+QueueAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableArray+QueueAdditions.h"; sourceTree = ""; }; 7ED95D341AB9029B008C4574 /* NSMutableArray+QueueAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableArray+QueueAdditions.m"; sourceTree = ""; }; + 902D0BC12AEB64EB009C68E5 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; A3B082D21BB15CEA00D8DC35 /* CDVGestureHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVGestureHandler.h; sourceTree = ""; }; A3B082D31BB15CEA00D8DC35 /* CDVGestureHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVGestureHandler.m; sourceTree = ""; }; C0C01EB21E3911D50056E6CB /* Cordova.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Cordova.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -212,7 +215,8 @@ 9064EF5E26FAB74200C9D65B /* include */, 7ED95D0E1AB9029B008C4574 /* Public */, 7ED95CF11AB9028C008C4574 /* Private */, - C0C01EB31E3911D50056E6CB /* Cordova */, + C0C01EB51E3911D50056E6CB /* Info.plist */, + 902D0BC12AEB64EB009C68E5 /* PrivacyInfo.xcprivacy */, 034768DFFF38A50411DB9C8B /* Products */, ); sourceTree = ""; @@ -325,6 +329,7 @@ 9064EF5F26FAB74800C9D65B /* Cordova */ = { isa = PBXGroup; children = ( + C0C01EB41E3911D50056E6CB /* Cordova.h */, 7ED95D0F1AB9029B008C4574 /* CDV.h */, 7ED95D101AB9029B008C4574 /* CDVAppDelegate.h */, 7ED95D121AB9029B008C4574 /* CDVAvailability.h */, @@ -342,9 +347,9 @@ 4E23F8F923E16E96006CD852 /* CDVWebViewProcessPoolFactory.h */, 7ED95D2C1AB9029B008C4574 /* CDVWebViewEngineProtocol.h */, 7ED95D2D1AB9029B008C4574 /* CDVAllowList.h */, + 2F4D42BA23F218BA00501999 /* CDVURLSchemeHandler.h */, 7ED95D311AB9029B008C4574 /* NSDictionary+CordovaPreferences.h */, 7ED95D331AB9029B008C4574 /* NSMutableArray+QueueAdditions.h */, - 2F4D42BA23F218BA00501999 /* CDVURLSchemeHandler.h */, ); path = Cordova; sourceTree = ""; @@ -358,15 +363,6 @@ path = CDVGestureHandler; sourceTree = ""; }; - C0C01EB31E3911D50056E6CB /* Cordova */ = { - isa = PBXGroup; - children = ( - C0C01EB41E3911D50056E6CB /* Cordova.h */, - C0C01EB51E3911D50056E6CB /* Info.plist */, - ); - path = Cordova; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -426,6 +422,7 @@ 7ED95D411AB9029B008C4574 /* CDVInvokedUrlCommand.h in Headers */, 7ED95D431AB9029B008C4574 /* CDVPlugin+Resources.h in Headers */, 7ED95D451AB9029B008C4574 /* CDVPlugin.h in Headers */, + 90DE61742B8F11D300810C2E /* Cordova.h in Headers */, 7ED95D471AB9029B008C4574 /* CDVPluginResult.h in Headers */, 7ED95D491AB9029B008C4574 /* CDVScreenOrientationDelegate.h in Headers */, 4E23F8FC23E16E96006CD852 /* CDVWebViewUIDelegate.h in Headers */, @@ -457,6 +454,7 @@ C0C01EAF1E3911D50056E6CB /* Headers */, C0C01EAD1E3911D50056E6CB /* Sources */, C0C01EAE1E3911D50056E6CB /* Frameworks */, + 90B382502AEB72D300F3F4D7 /* Resources */, ); buildRules = ( ); @@ -490,7 +488,6 @@ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - BuildIndependentTargetsInParallel = YES; LastUpgradeCheck = 1010; TargetAttributes = { C0C01EB11E3911D50056E6CB = { @@ -522,6 +519,17 @@ }; /* End PBXProject section */ +/* Begin PBXResourcesBuildPhase section */ + 90B382502AEB72D300F3F4D7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 90B382512AEB72DD00F3F4D7 /* PrivacyInfo.xcprivacy in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ C0C01EAD1E3911D50056E6CB /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -645,6 +653,7 @@ COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; + ENABLE_MODULE_VERIFIER = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; @@ -665,6 +674,8 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 11.0; MERGEABLE_LIBRARY = YES; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -712,6 +723,7 @@ COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; + ENABLE_MODULE_VERIFIER = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; @@ -727,6 +739,8 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 11.0; MERGEABLE_LIBRARY = YES; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; OTHER_LDFLAGS = "-ObjC"; @@ -740,10 +754,12 @@ C0C01EB71E3911D50056E6CB /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_MODULE_VERIFIER = YES; - INFOPLIST_FILE = Cordova/Info.plist; + INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -752,6 +768,7 @@ MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; PRODUCT_BUNDLE_IDENTIFIER = org.apache.cordova.Cordova; + SKIP_INSTALL = NO; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -761,10 +778,12 @@ C0C01EB81E3911D50056E6CB /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_MODULE_VERIFIER = YES; - INFOPLIST_FILE = Cordova/Info.plist; + INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -773,6 +792,7 @@ MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; PRODUCT_BUNDLE_IDENTIFIER = org.apache.cordova.Cordova; + SKIP_INSTALL = NO; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; diff --git a/CordovaLib/Cordova/Info.plist b/CordovaLib/Info.plist similarity index 69% rename from CordovaLib/Cordova/Info.plist rename to CordovaLib/Info.plist index fbe1e6b314..a6833ce9a5 100644 --- a/CordovaLib/Cordova/Info.plist +++ b/CordovaLib/Info.plist @@ -3,7 +3,9 @@ CFBundleDevelopmentRegion - en + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + CordovaLib CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -13,12 +15,12 @@ CFBundleName $(PRODUCT_NAME) CFBundlePackageType - FMWK + $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 1.0 + 7.0.2-dev CFBundleVersion $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - + NSHumanReadableCopyright + Copyright 2012 The Apache Software Foundation diff --git a/CordovaLib/PrivacyInfo.xcprivacy b/CordovaLib/PrivacyInfo.xcprivacy new file mode 100644 index 0000000000..2f893d89ad --- /dev/null +++ b/CordovaLib/PrivacyInfo.xcprivacy @@ -0,0 +1,14 @@ + + + + + NSPrivacyTracking + + NSPrivacyCollectedDataTypes + + NSPrivacyAccessedAPITypes + + NSPrivacyTrackingDomains + + + diff --git a/CordovaLib/include/Cordova/CDV.h b/CordovaLib/include/Cordova/CDV.h index 2002ac8a09..c7ad0a5754 100644 --- a/CordovaLib/include/Cordova/CDV.h +++ b/CordovaLib/include/Cordova/CDV.h @@ -24,7 +24,15 @@ #import #import #import +#import +#import #import +#import +#import +#import +#import +#import #import #import #import +#import diff --git a/CordovaLib/Cordova/Cordova.h b/CordovaLib/include/Cordova/Cordova.h similarity index 53% rename from CordovaLib/Cordova/Cordova.h rename to CordovaLib/include/Cordova/Cordova.h index b49d56c47b..39fd65e963 100644 --- a/CordovaLib/Cordova/Cordova.h +++ b/CordovaLib/include/Cordova/Cordova.h @@ -25,25 +25,4 @@ FOUNDATION_EXPORT double CordovaVersionNumber; //! Project version string for Cordova. FOUNDATION_EXPORT const unsigned char CordovaVersionString[]; -// In this header, you should import all the public headers of your framework using statements like #import - #import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import diff --git a/Package.swift b/Package.swift index e85bff475c..0fe8d0d9fa 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.3 +// swift-tools-version:5.5 /* Licensed to the Apache Software Foundation (ASF) under one @@ -24,7 +24,8 @@ import PackageDescription let package = Package( name: "Cordova", platforms: [ - .iOS(.v11) + .iOS(.v11), + .macCatalyst(.v13) ], products: [ .library(name: "CordovaLib", targets: ["Cordova"]) @@ -34,7 +35,9 @@ let package = Package( .target( name: "Cordova", path: "CordovaLib/", - exclude: ["Cordova/Cordova.h", "Cordova/Info.plist"], + resources: [ + .copy("PrivacyInfo.xcprivacy") + ], cSettings: [ .headerSearchPath("Classes/Private") ] diff --git a/lib/create.js b/lib/create.js index 7a15ee84d0..0f638f13cb 100755 --- a/lib/create.js +++ b/lib/create.js @@ -118,9 +118,7 @@ class ProjectCreator { // like it should). fs.symlinkSync(cordovaLibPathSrc, cordovaLibPathDest); } else { - for (const p of ['include', 'Classes', 'CordovaLib.xcodeproj/project.pbxproj']) { - fs.copySync(path.join(cordovaLibPathSrc, p), path.join(cordovaLibPathDest, p)); - } + fs.copySync(cordovaLibPathSrc, cordovaLibPathDest); } } diff --git a/templates/project/__PROJECT_NAME__.xcodeproj/project.pbxproj b/templates/project/__PROJECT_NAME__.xcodeproj/project.pbxproj index fb3037a7a8..1b62732620 100755 --- a/templates/project/__PROJECT_NAME__.xcodeproj/project.pbxproj +++ b/templates/project/__PROJECT_NAME__.xcodeproj/project.pbxproj @@ -16,6 +16,7 @@ 4E7CA2B6272ABB0D00177EF9 /* config.xml in Copy Staging Resources */ = {isa = PBXBuildFile; fileRef = F840E1F0165FE0F500CFE078 /* config.xml */; }; 4E7CA2B7272ABB0D00177EF9 /* www in Copy Staging Resources */ = {isa = PBXBuildFile; fileRef = 301BF56E109A69640062928A /* www */; }; 6AFF5BF91D6E424B00AB3073 /* CDVLaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6AFF5BF81D6E424B00AB3073 /* CDVLaunchScreen.storyboard */; }; + 90B630EF2AECBBD0009EF368 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 90B630EE2AECBBD0009EF368 /* PrivacyInfo.xcprivacy */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -74,6 +75,7 @@ 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; path = CDVLaunchScreen.storyboard; sourceTree = ""; }; 8D1107310486CEB800E47090 /* __PROJECT_NAME__-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "__PROJECT_NAME__-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; + 90B630EE2AECBBD0009EF368 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; 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 = ""; }; ED33DF2A687741AEAF9F8254 /* Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Bridging-Header.h"; sourceTree = ""; }; @@ -120,6 +122,7 @@ 29B97315FDCFA39411CA2CEA /* __PROJECT_NAME__ */ = { isa = PBXGroup; children = ( + 90B630EE2AECBBD0009EF368 /* PrivacyInfo.xcprivacy */, 8D1107310486CEB800E47090 /* __PROJECT_NAME__-Info.plist */, 32CA4F630368D1EE00C91783 /* __PROJECT_NAME__-Prefix.pch */, 6AFF5BF81D6E424B00AB3073 /* CDVLaunchScreen.storyboard */, @@ -269,6 +272,7 @@ files = ( 302D95F214D2391D003F00A1 /* MainViewController.xib in Resources */, 0207DA581B56EA530066E2B4 /* Assets.xcassets in Resources */, + 90B630EF2AECBBD0009EF368 /* PrivacyInfo.xcprivacy in Resources */, 6AFF5BF91D6E424B00AB3073 /* CDVLaunchScreen.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -351,6 +355,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 3047A5111AB8059700498E2A /* build.xcconfig */; buildSettings = { + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; @@ -397,6 +402,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 3047A5111AB8059700498E2A /* build.xcconfig */; buildSettings = { + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; diff --git a/templates/project/__PROJECT_NAME__/Bridging-Header.h b/templates/project/__PROJECT_NAME__/Bridging-Header.h index 5d8abc9883..2644cdb122 100644 --- a/templates/project/__PROJECT_NAME__/Bridging-Header.h +++ b/templates/project/__PROJECT_NAME__/Bridging-Header.h @@ -6,7 +6,9 @@ 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 @@ -14,15 +16,5 @@ specific language governing permissions and limitations under the License. */ -// -// Bridging-Header.h -// __PROJECT_NAME__ -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// -// -// Use this file to import your target's public headers that you would like to expose to Swift. -// -#import +#import diff --git a/templates/project/__PROJECT_NAME__/PrivacyInfo.xcprivacy b/templates/project/__PROJECT_NAME__/PrivacyInfo.xcprivacy new file mode 100644 index 0000000000..6631ffa6f2 --- /dev/null +++ b/templates/project/__PROJECT_NAME__/PrivacyInfo.xcprivacy @@ -0,0 +1,6 @@ + + + + + +