From c895fc42239b885f21ff66e6608b38ad86bff7af Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Fri, 21 Feb 2020 19:34:32 +0100 Subject: [PATCH] feat(ios): Update Capacitor project to Swift 5.0 (#2465) --- Capacitor.podspec | 2 +- cli/src/config.ts | 2 +- ios/Capacitor/Capacitor.xcodeproj/project.pbxproj | 12 ++++++------ scripts/deploy/Capacitor.podspec.template | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Capacitor.podspec b/Capacitor.podspec index 013ad3ad16..e1378f5b60 100644 --- a/Capacitor.podspec +++ b/Capacitor.podspec @@ -10,5 +10,5 @@ Pod::Spec.new do |s| s.source = { :git => 'https://github.com/ionic-team/capacitor.git', :tag => s.version.to_s } s.source_files = 'ios/Capacitor/Capacitor/*.{swift,h,m}', 'ios/Capacitor/Capacitor/Plugins/*.{swift,h,m}', 'ios/Capacitor/Capacitor/Plugins/**/*.{swift,h,m}' s.dependency 'CapacitorCordova', '1.5.0' - s.swift_version = '4.2' + s.swift_version = '5.0' end diff --git a/cli/src/config.ts b/cli/src/config.ts index 4d7dd62c97..bcc8e81d47 100644 --- a/cli/src/config.ts +++ b/cli/src/config.ts @@ -45,7 +45,7 @@ export class Config implements CliConfig { ios = { name: 'ios', minVersion: '11.0', - cordovaSwiftVersion: '4.0', + cordovaSwiftVersion: '5.0', platformDir: '', webDir: 'public', webDirAbs: '', diff --git a/ios/Capacitor/Capacitor.xcodeproj/project.pbxproj b/ios/Capacitor/Capacitor.xcodeproj/project.pbxproj index ff30d393a9..e607d7f69c 100644 --- a/ios/Capacitor/Capacitor.xcodeproj/project.pbxproj +++ b/ios/Capacitor/Capacitor.xcodeproj/project.pbxproj @@ -351,7 +351,7 @@ SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -404,7 +404,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -431,7 +431,7 @@ SKIP_INSTALL = YES; SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -455,7 +455,7 @@ PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; SWIFT_OBJC_BRIDGING_HEADER = ""; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; @@ -470,7 +470,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.avocadojs.ios.AvocadoTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -485,7 +485,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.avocadojs.ios.AvocadoTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; diff --git a/scripts/deploy/Capacitor.podspec.template b/scripts/deploy/Capacitor.podspec.template index 0452589dff..048d77d2d0 100644 --- a/scripts/deploy/Capacitor.podspec.template +++ b/scripts/deploy/Capacitor.podspec.template @@ -10,5 +10,5 @@ Pod::Spec.new do |s| s.source = { :git => 'https://github.com/ionic-team/capacitor.git', :tag => s.version.to_s } s.source_files = 'ios/Capacitor/Capacitor/*.{swift,h,m}', 'ios/Capacitor/Capacitor/Plugins/*.{swift,h,m}', 'ios/Capacitor/Capacitor/Plugins/**/*.{swift,h,m}' s.dependency 'CapacitorCordova', POD_VERSION - s.swift_version = '4.2' + s.swift_version = '5.0' end