i'm facing the issue that when adding the ios-platform with "@latest" it wont trigger the hook to add the specified swift version. This also happens when using a locally stored platform.
I tried cordova-cli 6.5.0 and 7.X, makes no difference.
add ios platform via "cordova platform add ios@latest" -> hook does not trigger
remove platform
add ios platform via "cordova platform add ios@4.5.3" -> hook does trigger, version doesn't seem to matter
remove platform
add ios platform via "cordova platform add ../local/path/cordova-ios/master" -> hook does not trigger
Log
$ cordova create swifttest
Creating a new cordova project.
$ cd swifttest/
$ cordova plugin add cordova-plugin-add-swift-support
Fetching plugin "cordova-plugin-add-swift-support" via npm
$ cordova platform add ios
Adding ios project...
Creating Cordova project for the iOS platform:
Path: platforms/ios
Package: io.cordova.hellocordova
Name: HelloCordova
iOS project created with cordova-ios@4.3.1
Installing "cordova-plugin-add-swift-support" for ios
Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project
Fetching plugin "cordova-plugin-whitelist@1" via npm
Installing "cordova-plugin-whitelist" for ios
Update IOS build setting SWIFT_OBJC_BRIDGING_HEADER to: "$(PROJECT_DIR)/$(PROJECT_NAME)/Bridging-Header.h" for build configuration Debug
Update IOS build setting SWIFT_OBJC_BRIDGING_HEADER to: "$(PROJECT_DIR)/$(PROJECT_NAME)/Bridging-Header.h" for build configuration Release
Update IOS build setting ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to: YES for build configuration Debug
Update SWIFT version to 3.0 Debug
Update IOS build setting SWIFT_OPTIMIZATION_LEVEL to: -Onone for build configuration Debug
Update IOS build setting ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to: YES for build configuration Release
Update SWIFT version to 3.0 Release
//Working as expected
$ cordova platform rm ios
$ cordova platform add ios@latest
Adding ios project...
Creating Cordova project for the iOS platform:
Path: platforms/ios
Package: io.cordova.hellocordova
Name: HelloCordova
iOS project created with cordova-ios@4.5.3
Installing "cordova-plugin-add-swift-support" for ios
Installing "cordova-plugin-whitelist" for ios
//hook did not trigger
$ cordova platform rm ios
$ cordova platform add ios@4.5.3
Adding ios project...
Creating Cordova project for the iOS platform:
Path: platforms/ios
Package: io.cordova.hellocordova
Name: HelloCordova
iOS project created with cordova-ios@4.5.3
Installing "cordova-plugin-add-swift-support" for ios
Installing "cordova-plugin-whitelist" for ios
Update IOS build setting SWIFT_OBJC_BRIDGING_HEADER to: "$(PROJECT_DIR)/$(PROJECT_NAME)/Bridging-Header.h" for build configuration Debug
Update IOS build setting SWIFT_OBJC_BRIDGING_HEADER to: "$(PROJECT_DIR)/$(PROJECT_NAME)/Bridging-Header.h" for build configuration Release
Update IOS build setting ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to: YES for build configuration Debug
Update SWIFT version to 3.0 Debug
Update IOS build setting SWIFT_OPTIMIZATION_LEVEL to: -Onone for build configuration Debug
Update IOS build setting ALWAYS_EMBED_SWIFT_STANDARDLIBRARIES to: YES for build configuration Release
Update SWIFT version to 3.0 Release
//hook triggered
$ cordova platform rm ios
$ cordova platform add ../../../cordova-ios-master/
Warning: using prerelease platform ios@4.6.0-dev.
Use 'cordova platform add ios@latest' to add the latest published version instead.
Adding ios project...
Creating Cordova project for the iOS platform:
Path: platforms/ios
Package: io.cordova.hellocordova
Name: HelloCordova
iOS project created with cordova-ios@4.6.0-dev
Installing "cordova-plugin-add-swift-support" for ios
Installing "cordova-plugin-whitelist" for ios
//hook did not trigger
$
I don't know if it's an issue of the plugin or the hooks. If it's not the plugin, I'll issue a bug report on apache.
Hi,
i'm facing the issue that when adding the ios-platform with "@latest" it wont trigger the hook to add the specified swift version. This also happens when using a locally stored platform. I tried cordova-cli 6.5.0 and 7.X, makes no difference.
Reproducable:
Log
I don't know if it's an issue of the plugin or the hooks. If it's not the plugin, I'll issue a bug report on apache.
Thank you