Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ANNOUNCEMENT] Status of Xcode 10 support #407

Closed
dpogue opened this issue Sep 14, 2018 · 158 comments · Fixed by #508
Closed

[ANNOUNCEMENT] Status of Xcode 10 support #407

dpogue opened this issue Sep 14, 2018 · 158 comments · Fixed by #508
Milestone

Comments

@dpogue
Copy link
Member

dpogue commented Sep 14, 2018

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

@sambegin
Copy link

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
Copy link

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

@neofuture
Copy link

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
Copy link

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

@janpio
Copy link
Member

janpio commented Sep 18, 2018

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

@DRneilC
Copy link

DRneilC commented Sep 19, 2018

@dpogue Thanks! The answer solved my problem.

@Birowsky

This comment has been minimized.

@tanvishah-syn
Copy link

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

@jeffreyramia
Copy link

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

@tanvishah-syn
Copy link

@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
Copy link

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

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

@tanvishah-syn
Copy link

@PeterStegnar I won't be run because info.plist not present in the /build directory.

@PeterStegnar
Copy link

@PeterStegnar I won't be run because info.plist not present in the /build directory.

Yes this happen if you are using new build system. If you say to compiler to build legacy build then it is OK. All you need to do it so use:

--buildFlag='-UseModernBuildSystem=0'

@newuser44
Copy link

newuser44 commented Sep 19, 2018

Just do document what I'm seeing
Build with no command seems to just stop in the middle of it. It seems like its trying to build for some large of phonesxs default.

Build with the new command
ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"

Seems to build just fine and was able to push a version to the phone.

For ionic I see a build.json file. I add the following to it.

{  
"ios": {
    "debug": {
      "developmentTeam": "898989",
      "buildFlag": [
        "-UseModernBuildSystem=0"
      ]
    },
    "release": {
      "developmentTeam": "89989898",
      "buildFlag": [
        "-UseModernBuildSystem=0"
      ]
    }
  }
}

It seems to look at the build.json, either I don't have it setup right or something because its not using the command.

Code Signing Error: Automatic signing is unable to resolve an issue with the "APP NAME" target's entitlements. Automatic signing can't add the aps-environment entitlement to your provisioning profile. Switch to manual signing and resolve the issue by downloading a matching provisioning profile from the developer website. Alternatively, to continue using automatic signing, remove this entitlement from your entitlements file and its associated functionality from your code.
Code Signing Error: Provisioning profile "iOS Team Provisioning Profile: com.app.dev.app" doesn't include the aps-environment entitlement.
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 12.0'

I don't think that error surprise us. But not sure why adding the command to build.json file doesn't seem to work.

@dpogue
Copy link
Member Author

dpogue commented Sep 19, 2018

I don't think that error surprise us. But not sure why adding the command to build.json file doesn't seem to work.

That error about code signing is unrelated to the new build system.
In your build.json you are not including the flags to use automatic provisioning, but you are also not specifying which provisioning profile to use. This probably wouldn't work in Xcode 9 either.

@newuser44
Copy link

Okay, so I don't have the build.json file really setup to be used. Other values would need to be in there. For now just have to use the command line.

@btate
Copy link

btate commented Sep 19, 2018

Is there any plan to support the modern build system?

@dpogue
Copy link
Member Author

dpogue commented Sep 19, 2018

Is there any plan to support the modern build system?

Yes, in the next major version, which we're currently working on. But we don't have a timeline for release beyond something before the end of the year.

@tanvishah-syn
Copy link

@PeterStegnar Thanks I am able to build and emulate app on ios with the help of --buildFlag='-UseModernBuildSystem=0' this flag. Does anyone have documentation link for this flag?
I have to explore it more.

@andrewmcewen
Copy link

Is anyone having trouble using the --livereload flag with --buildFlag='-UseModernBuildSystem=0'? If so any ideas how to enable livereload

@janpio
Copy link
Member

janpio commented Sep 24, 2018

--livereload is not part of Cordova. You will probably want to ask this question over at http://forum.ionicframework.com/ or one of their repositories, possibly Ionic CLI.

@BorntraegerMarc
Copy link

@andrewmcewen Yes: I get a lot of starting messages without the build actually starting.

@rolinger
Copy link

rolinger commented Jan 23, 2019

For a moment I was about to say "I can't believe Apple is going to force all development to Xcode 10 to support iOS 12.1 when there are so many outstanding issues." Then I realized..."Oh, its Apple...duh".

I too got the above March 19th WARNING when I submitted a new version of my app yesterday. If I upgrade to Xcode 10.1 to 'officially' support iOS 12.1, then what is the minimum version cordova-ios needed? I am currently on 4.5.4. If I move only to 4.5.5, what are the big gotchyas for trying to develop for 12.1?

It's all just a bunch of Rotten Apples. I LOATHE developing for iOS.

@erisu
Copy link
Member

erisu commented Jan 30, 2019

Keeping this ticket open until platform release.

@erisu erisu reopened this Jan 30, 2019
@Bloodsucker
Copy link

Is there any update regarding this issue? Using the UseModernBuildSystem workaround each run makes Cordova to kill and lunch the emulator.

@tjdesigner
Copy link

I tried the tutorial but getting the error:
[ERROR] An error occurred while running subprocess cordova.

Can someone help me?

@GeuntaeKim
Copy link

GeuntaeKim commented Feb 1, 2019

Anyone encountered wrong "text encoding" issue for localizable.strings, which now Xcode 10.1 doesn't allow to build project before fixed?

At first, I thought it's due to a corrupted file, then suspected a resource of third-party plugin, but seems any localizable.strings being added into ios platform are deemed to have wrong text encoding where their contents are actually UTF-8 (plain text file, English words). This can be fixed through Xcode but it's blocking me to auto-build using command line.

[ERROR]
could not decode input file using specified encoding: Central European (ISO Latin 2), and the file contents appear to be encoded in Unicode (UTF-8)

Any one can help please?

@majdi21
Copy link

majdi21 commented Feb 5, 2019

Hello,

Does anybody know when cordova-ios 5.0.0 will be available for production? What is the current state?

I'm obviously asking because of apple's decision to shutdown anything prior to xcode 10 soon. I'm not involved in the cordova-ios project. So any information would be appreciated.

If you happen to know how the process works for releasing a cordova version (for example, what determines if a build is production ready or not and where I can find such stats), I would greatly appreciate it.

Thank you

@Baadier-Sydow
Copy link

@majdi21 It looks like it has been released now 5.0.0

@erisu
Copy link
Member

erisu commented Feb 8, 2019

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

@Baadier-Sydow
Copy link

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

@xtianus79
Copy link

@dpogue you sir won the internet today!!!

@rolinger
Copy link

rolinger commented Feb 8, 2019

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
Copy link
Member

erisu commented Feb 9, 2019

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

Here is also the Cordova iOS 5.0.0 Release Blog Post.

@erisu erisu closed this as completed Feb 9, 2019
@dpogue dpogue unpinned this issue Feb 9, 2019
@fgilio
Copy link

fgilio commented Feb 9, 2019

Thanks to everyone involved!

@kkjhamb01
Copy link

kkjhamb01 commented Feb 9, 2019

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

@l3ender
Copy link

l3ender commented Feb 9, 2019

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
Copy link
Member Author

dpogue commented Feb 9, 2019

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
Copy link

@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
Copy link

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
Copy link
Member Author

dpogue commented Feb 11, 2019

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.

@apache apache locked as resolved and limited conversation to collaborators Feb 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.