akofman / cordova-plugin-add-swift-support

:hammer: Swiftify your Cordova app !
MIT License
117 stars 110 forks source link

Hook won't trigger #40

Closed Ponsen closed 6 years ago

Ponsen commented 7 years ago

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

$ 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.

Thank you

akofman commented 6 years ago

Hello,

Should be fixed with version 1.7.1, I think this was related to #36