Skip to content

[ANNOUNCEMENT] Status of Xcode 10 support #407

Closed
@dpogue

Description

@dpogue

A few issues have started to come in regarding the state of Cordova projects on Xcode 10. This is a rough summary of the situation:

Xcode 10 uses a new build system by default (previously available on an opt-in basis in Xcode 9). The cordova-ios project structure is not compatible with this new build system and results in failures.
Officially, we do not claim to support Xcode 10.

Currently the best workaround is to opt-out of the new build system:

  • If you're building on the command-line, you can specify --buildFlag="-UseModernBuildSystem=0":

    # Cordova CLI
    cordova run ios --buildFlag='-UseModernBuildSystem=0'
    cordova build ios --buildFlag='-UseModernBuildSystem=0'
    
    # Ionic CLI
    ionic cordova run ios -- --buildFlag="-UseModernBuildSystem=0"
    ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"
    
  • If you're building with a build.json config file, you can add the following under the iOS release or debug config:

    "buildFlag": [
      "-UseModernBuildSystem=0"
    ]
  • If you are opening the project in the Xcode IDE, you need to change the build system in Workspace Settings to "Legacy Build System"

    Xcode example Workspace Settings is under the File menu Change the Build System option to Legacy Build System

    Thanks kitolog for the screenshots!

We're going to investigate what's required to make cordova-ios compatible with the new build system, and hope to include that in the next major version (cordova-ios@5.0.0).

Activity

sambegin

sambegin commented on Sep 17, 2018

@sambegin

Just note here that the build.json file should look like this :

  "ios": {
    "release": {
      "buildFlag": [
        "-UseModernBuildSystem=0"
      ]
    }
  }

not

  "iOS": {
    "release": {
      "buildFlag": [
        "-UseModernBuildSystem=0"
      ]
    }
  }

like "mentioned" in the previous comment ;p

SuperStar518

SuperStar518 commented on Sep 18, 2018

@SuperStar518

Thanks, @dpogue
I was really wondering about the workaround. Hope to fix it soon!
Cheers

neofuture

neofuture commented on Sep 18, 2018

@neofuture

is this why im getting this issue

ERROR ITMS-90174: "Missing Provisioning Profile - Apps must contain a provisioning profile in a file named embedded.mobileprovision."

is there a workaround ?

aceoliver

aceoliver commented on Sep 18, 2018

@aceoliver

@neofuture I am also encountering this after upgrading to XCode 10

janpio

janpio commented on Sep 18, 2018

@janpio
Member

Then open an issue please that has all available information on these failures @neofuture and @aceoliver. Thanks.

DRneilC

DRneilC commented on Sep 19, 2018

@DRneilC

@dpogue Thanks! The answer solved my problem.

Birowsky

Birowsky commented on Sep 19, 2018

@Birowsky
tanvishah-syn

tanvishah-syn commented on Sep 19, 2018

@tanvishah-syn

@sambegin Thanks for the workaround. Where is this build.json file is present in the app directory structure?

jeffreyramia

jeffreyramia commented on Sep 19, 2018

@jeffreyramia

Btw this worked for me:
ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"

tanvishah-syn

tanvishah-syn commented on Sep 19, 2018

@tanvishah-syn

@jeffreyramia with the help of your answer I am able to build an app but whenever I am trying to emulate it gives me an error as "platforms/ios/build/emulator/demo APP.app/Info.plist file not found.
[ERROR] An error occurred while running subprocess cordova."

PeterStegnar

PeterStegnar commented on Sep 19, 2018

@PeterStegnar

If you use pure cordova ios, you can run like:

cordova run --target='iPad-Air-2' --buildFlag='-UseModernBuildSystem=0'

199 remaining items

erisu

erisu commented on Feb 8, 2019

@erisu
Member

It is still currently in the middle of the release process. It is recommended to wait until it is released on NPM.

Baadier-Sydow

Baadier-Sydow commented on Feb 8, 2019

@Baadier-Sydow

@erisu My apologies. I assumed once it was tagged here we were good to go.

xtianus79

xtianus79 commented on Feb 8, 2019

@xtianus79

@dpogue you sir won the internet today!!!

rolinger

rolinger commented on Feb 8, 2019

@rolinger

Not to tick anyone off or insult anyone or the effort into making 5.0.0 happen, but how tested is the latest release - or can we all ignore my inquiry and just thank Apple for forcing us into bleeding edge?

For the record....its stuff like this...and a gazillion other things about Apple that tick me off. Nothing but a bunch of rotten Apples.

erisu

erisu commented on Feb 9, 2019

@erisu
Member

cordova-ios@5.0.0 is now officially released to NPM.

Here is also the Cordova iOS 5.0.0 Release Blog Post.

unpinned this issue on Feb 9, 2019
fgilio

fgilio commented on Feb 9, 2019

@fgilio

Thanks to everyone involved!

kkjhamb01

kkjhamb01 commented on Feb 9, 2019

@kkjhamb01

Good to hear. Thanks. It is really appreciated for your hard work.

l3ender

l3ender commented on Feb 9, 2019

@l3ender

I'm slightly confused about the release. Does it mean if I update to 5.0.0, using UseModernBuildSystem=0 is no longer required?

Thanks!

dpogue

dpogue commented on Feb 9, 2019

@dpogue
MemberAuthor

I'm slightly confused about the release. Does it mean if I update to 5.0.0, using UseModernBuildSystem=0 is no longer required?

That's correct

giladrom

giladrom commented on Feb 10, 2019

@giladrom

@dpogue It seems as though setting UseModernBuildSystem=1 is still behaving like it used to, even after upgrading to 5.0.0. Can you show a sample output of a build process using the new build system?

kkjhamb01

kkjhamb01 commented on Feb 11, 2019

@kkjhamb01

After adding cordova-ios@5.0.0, can't add onesingal plugin.

It shows this issue:

cordova plugin add onesignal-cordova-plugin --save
Installing "onesignal-cordova-plugin" for ios
"framework" tag with type "podspec" is deprecated and will be removed. Please use the "podspec" tag.
Failed to install 'onesignal-cordova-plugin': undefined
CordovaError: Promise rejected with non-error: '/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:439:in help!\': \u001b[31m[!] You cannot run CocoaPods as root.\u001b[39m (CLAide::Help)\n\n\u001b[4mUsage:\u001b[24m\n\n $ \u001b[32mpod\u001b[39m \u001b[32mCOMMAND\u001b[39m\n\n CocoaPods, the Cocoa library package manager.\n\n\u001b[4mCommands:\u001b[24m\n\n \u001b[32m+ cache\u001b[39m Manipulate the CocoaPods cache\n \u001b[32m+ env\u001b[39m Display pod environment\n \u001b[32m+ init\u001b[39m Generate a Podfile for the current directory\n \u001b[32m+ install\u001b[39m Install project dependencies according to versions from a\n Podfile.lock\n \u001b[32m+ ipc\u001b[39m Inter-process communication\n \u001b[32m+ lib\u001b[39m Develop pods\n \u001b[32m+ list\u001b[39m List pods\n \u001b[32m+ outdated\u001b[39m Show outdated project dependencies\n \u001b[32m+ repo\u001b[39m Manage spec-repositories\n \u001b[32m+ setup\u001b[39m Setup the CocoaPods environment\n \u001b[32m+ spec\u001b[39m Manage pod specs\n \u001b[32m+ update\u001b[39m Update outdated project dependencies and create new Podfile.lock\n\n\u001b[4mOptions:\u001b[24m\n\n \u001b[34m--silent\u001b[39m Show nothing\n \u001b[34m--version\u001b[39m Show the version of the tool\n \u001b[34m--verbose\u001b[39m Show more debugging information\n \u001b[34m--no-ansi\u001b[39m Show output without ANSI codes\n \u001b[34m--help\u001b[39m Show help banner of specified command\n\tfrom /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/command.rb:47:in run'\n\tfrom /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/bin/pod:55:in <top (required)>\'\n\tfrom /usr/local/bin/pod:22:in load'\n\tfrom /usr/local/bin/pod:22:in `

'\n'
at cli.catch.err (/usr/local/lib/node_modules/cordova/bin/cordova:30:15)
at process._tickCallback (internal/process/next_tick.js:68:7)
[ERROR] An error occurred while running subprocess cordova.

    cordova plugin add onesignal-cordova-plugin --save exited with exit code 1.
    
    Re-running this command with the --verbose flag may provide more information.
dpogue

dpogue commented on Feb 11, 2019

@dpogue
MemberAuthor

Firstly, [!] You cannot run CocoaPods as root.
Secondly, Cocoapod support was refactored in cordova-ios 5.0.0, which is one of the reasons it's a major version bump. Some plugins might not (yet) be compatible with it.

I'm going to lock discussion on this issue, since it is closed. Please open new issues for problems that you find with cordova-ios@5.0.0.

locked as resolved and limited conversation to collaborators on Feb 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      Participants

      @sgruhier@shazron@PeterStegnar@janpio@dpogue

      Issue actions

        [ANNOUNCEMENT] Status of Xcode 10 support · Issue #407 · apache/cordova-ios