cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Ridley (JIRA)" <>
Subject [jira] [Commented] (CB-8254) Cordova build only uses xcconfig with --device flag (please also enable without)
Date Thu, 05 Feb 2015 04:25:35 GMT


Matthew Ridley commented on CB-8254:

I agree, option 2 sounds like the best option. I see this becoming a bigger issue as Swift
gains more popularity. (I found this post because I was having the same issues)

> Cordova build only uses xcconfig with --device flag (please also enable without)
> --------------------------------------------------------------------------------
>                 Key: CB-8254
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CLI, iOS
>    Affects Versions: 3.5.0, 4.1.3
>         Environment: All (iOS)
>            Reporter: Geordie Jay
>            Assignee: Shazron Abdullah
>              Labels: easyfix
>             Fix For: 3.8.0
>   Original Estimate: 2h
>  Remaining Estimate: 2h
> I have written a plugin in Swift that won't build with a deployment target < iOS 7.0.
This breaks "cordova build ios":
> Swift is unavailable on iOS earlier than 7.0; please set IPHONEOS_DEPLOYMENT_TARGET to
7.0 or later (currently it is '6.0').
> (** BUILD FAILED **)
> I know I can `cordova prepare ios` and manually add the changes to my xcode project,
but as a plugin author this manual approach is unsatisfactory. Instead, I have added a hook
to my plugin that adds the required options to build.xcconfig:
> This allows the code to build with `cordova build ios --device`
> The problem is that `cordova build ios` alone doesn't pay any attention to the any of
the three build.xcconfig files, because there is no -xcconfig option present for EMULATOR
mode in the build script (see $PROJECT/platforms/ios/cordova/build).
> -------
> The solution:
> The ideal solution would be the option to provide custom build options to `cordova prepare
ios` that get directly integrated into the Xcode project. But I gather Apple doesn't provide
us the option to edit Xcode projects outside of Xcode (and 3rd party solutions are far from
> Which appears to leave us with two reasonable options:
> (1) Provide another Xcode project for Swift plugins. Back maybe this isn't so reasonable
after all: it's inconsistent, has the issue of setting a Bridging Header without knowing where
it is in advance. What happens when we add a swift plugin to an existing project. Does the
existing Xcode project get deleted?
> (2) Add the same -xcconfig param to the EMULATOR section at the bottom of the `ios/cordova/build`
file. This has the drawback of potentially confusing people when they open the Xcode project,
but I think this is favourable to having the project not build at all from the command line.
> Is there any reason that (2) couldn't be implemented effectively immediately?

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message