You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
CLI: 5.3.3
Cross-platform modules: Not applicable
Android Runtime: Not applicable
iOS Runtime: Not applicable
Plugin(s): any plugin with Podfile, preferably nativescript-socket.io
Cocoapods version: 1.6.1
Describe the bug
During project preparation CLI merges xcconfig files, but it does it only for the currently passed build configuration, i.e. debug or release. This leads to different problems:
Setting SWIFT_VERSION in project's build.xcconfig breaks build for iOS
With Cocoapods 1.6.x there are some differences in case Pods with Swift code are handled. Previously users were able to have post_install task in the Podfile in which to set Swift version for specified Pod. Now, this is not working and projects which have such Pods cannot be build. One easy workaround is to set SWIFT_VERSION in App_Resources/iOS/build.xcconfig, however this leads to error:
Copying template files...
Platform ios successfully added. v5.3.1
Preparing project...
Successfully prepared plugin nativescript-socket.io for ios.
Successfully prepared plugin nativescript-theme-core for ios.
Successfully prepared plugin tns-core-modules for ios.
Successfully prepared plugin tns-core-modules-widgets for ios.
Installing pods...
Analyzing dependencies
[!] There may only be up to 1 unique SWIFT_VERSION per target. Found target(s) with multiple Swift versions:
myApp: Swift
myApp: Swift 4.0
[!] Automatically assigning platform `ios` with version `9.0` on target `myApp` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
'pod install' command failed.
The problem is that CLI prepares the project only for one build configuration, i.e. debug or release, but Cocoapods check the SWIFT_VERSION value in both configurations. As CLI had not prepared the project for release build, the value in the release target is not set, so Cocoapods fail.
Unable to find included file "../plugins-release.xcconfig" file error in Xcode
In case you create a project with NativeScript CLI and build it for iOS, you can safely open the .xcworkspace/.xcodeproject in <project dir>/platforms/ios and try to build the application for release. However, this will fail in Xcode with error: Unable to find included file "../plugins-release.xcconfig".
To Reproduce
Setting SWIFT_VERSION in project's build.xcconfig breaks build for iOS
$ pod --version # in case the installed version is not 1.6.x or later, install new one with sudo gem update cocoapods
$ tns create myApp
$ cd myApp
$ npm i --save nativescript-socket.io
Open <project dir>/app/App_Resources/iOS/build.xcconfig and add the following line:
SWIFT_VERSION = 4.0
Now build the project:
$ tns build ios
Unable to find included file "../plugins-release.xcconfig" file error in Xcode
$ tns create myApp
$ cd myApp
$ tns build ios
$ open platforms/ios/myApp.xcodeproj
The last command will open Xcode.
From the top menus select Product -> Profile. This will build the app in release mode. However, the build fails with error that plugins-release.xcconfig file is missing.
Expected behavior
The build should succeed in both cases.
The text was updated successfully, but these errors were encountered:
Environment
Provide version numbers for the following components (information can be retrieved by running
tns info
in your project folder or by inspecting thepackage.json
of the project):nativescript-socket.io
Describe the bug
During project preparation CLI merges xcconfig files, but it does it only for the currently passed build configuration, i.e.
debug
orrelease
. This leads to different problems:Setting SWIFT_VERSION in project's build.xcconfig breaks build for iOS
With Cocoapods 1.6.x there are some differences in case Pods with Swift code are handled. Previously users were able to have post_install task in the Podfile in which to set Swift version for specified Pod. Now, this is not working and projects which have such Pods cannot be build. One easy workaround is to set SWIFT_VERSION in
App_Resources/iOS/build.xcconfig
, however this leads to error:The problem is that CLI prepares the project only for one build configuration, i.e.
debug
orrelease
, but Cocoapods check the SWIFT_VERSION value in both configurations. As CLI had not prepared the project for release build, the value in the release target is not set, so Cocoapods fail.Unable to find included file "../plugins-release.xcconfig"
file error in XcodeIn case you create a project with NativeScript CLI and build it for iOS, you can safely open the
.xcworkspace
/.xcodeproject
in<project dir>/platforms/ios
and try to build the application for release. However, this will fail in Xcode with error:Unable to find included file "../plugins-release.xcconfig"
.To Reproduce
Setting SWIFT_VERSION in project's build.xcconfig breaks build for iOS
Open
<project dir>/app/App_Resources/iOS/build.xcconfig
and add the following line:Now build the project:
Unable to find included file "../plugins-release.xcconfig"
file error in Xcode$ tns create myApp $ cd myApp $ tns build ios $ open platforms/ios/myApp.xcodeproj
The last command will open Xcode.
From the top menus select
Product
->Profile
. This will build the app in release mode. However, the build fails with error that plugins-release.xcconfig file is missing.Expected behavior
The build should succeed in both cases.
The text was updated successfully, but these errors were encountered: