Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27330] Xcode 11: Cannot build to device

GitHub Issuen/a
TypeBug
PriorityCritical
StatusResolved
ResolutionNot Our Bug
Resolution Date2019-08-22T08:50:33.000+0000
Affected Version/sRelease 8.2.0
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterHans Knöchel
AssigneeChris Barber
Created2019-08-12T06:45:45.000+0000
Updated2019-12-02T23:06:32.000+0000

Description

When using Xcode 11 B5, I cannot build for device anymore. Production builds work fine. The following error is shown, indicating certificate issues, which is not true since all certs are valid and can be used with Xcode 10:
[TRACE] error: Signing certificate is invalid. Signing certificate "Apple Development: ORG_NAME (TEAM_ID)", serial number "SERIAL_NO", is not valid for code signing. It may have been revoked or expired. (in target 'test_app' from project 'test_app')
To reproduce, build a simple app for device in Xcode 10 and then Xcode 11.

Comments

  1. Hans Knöchel 2019-08-12

    After some investigation, it seems like the provisioning profile itself is fine, but the CLI injects "iPhone Developer" instead of the actual signing identity, e.g. "iPhone Developer: Hans Knoechel (TEAM_ID)" to the field "CODE_SIGN_IDENTITY". For Xcode 10, it works as expected. It is injected in [these lines](https://github.com/appcelerator/titanium_mobile/blob/master/iphone/cli/commands/_build.js#L3125-L3129), indicating that earlier it worked automatically. I think changing it to the actual signing identity behind the used profile will fix this immediately. *EDIT*: I just confirmed that changing the "CODE_SIGN_IDENTITY" to the actual signing identity, it works fine. The only tricky part will be how to to this automatically. I hope there is some reference to that signing identity in the build already, so it can be reused.
  2. Hans Knöchel 2019-08-12

    Pull (timob/master): https://github.com/appcelerator/titanium_mobile/pull/11133 Pull (ioslib/1_7_X): https://github.com/appcelerator/ioslib/pull/91
  3. Chris Barber 2019-08-12

    I cannot reproduce this with Xcode 11 beta 5 and Titanium SDK 8.2.0 (master). I don't mind adding the teamId to the cert info in ioslib. The CODE_SIGN_IDENTITY should be set to "iPhone Developer" so that Xcode will select the correct certificate. We used to append the certificate name, but that was removed [Nov 2017](https://github.com/appcelerator/titanium_mobile/commit/3749f14383f24499e51b599d16544948b465f8c0). So given I can't reproduce and this issue occurs for a beta Xcode release, I would like to A) have someone from QE try to reproduce and B) see if the issue persists with Xcode 11 RC. I'm fine with the ioslib addition. [~lchoudhary] could you please try building a new app for iOS device with Xcode 11 beta 5? Thank you!
  4. Hans Knöchel 2019-08-12

    Thanks for the feedback! Btw: There is a new cert type in Xcode 11 called "Apple Developer" which will be default / top positioned in the list of available certificate types. It's used to be able to develop both iOS and macOS apps
  5. Chris Barber 2019-08-12

    Hmm, interesting. I'll look into it. Thanks!
  6. Hans Knöchel 2019-08-12

    This might be a good motivation to move to automatic signing btw. Looking at the required pbxproj diff to use it, it doesn't seem too complicated
  7. Hans Knöchel 2019-08-22

    See my comment in the Git repo.
  8. Chris Barber 2019-08-29

    [~hknoechel] FYI, TIMOB-27358 for Apple developer cert support!

JSON Source