Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25226] Xcode 9/10: Support using new build-system

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2018-08-01T08:19:36.000+0000
Affected Version/sn/a
Fix Version/sRelease 7.4.0
ComponentsiOS
Labelsn/a
ReporterHans Knöchel
AssigneeHans Knöchel
Created2017-09-04T17:15:50.000+0000
Updated2018-10-18T16:19:44.000+0000

Description

Xcode 9 includes the preview of the new build system, written entirely in Swift. In can be enabled in the project-settings or - what's more relevant for us - using the xcodebuild flag -UseNewBuildSystem=YES. We could introduce a new "use-new-build-system" property so users can try it out, input welcome!

Comments

  1. Hans Knöchel 2017-09-23

    Ok, so I have a prototype working locally that works the same as we handle autolayout/app-thinning/jscore/main-thread. If set, we inject the build-parameter into the arguments of xcodebuild, e.g. [here](https://github.com/appcelerator/titanium_mobile/blob/master/iphone/cli/commands/_build.js#L6496).
       if (this.useNewBuildSystem && appc.version.gte(this.xcodeEnv.version, '9.0')) {
         args.push('UseNewBuildSystem=YES');
       }
       
    Together with some validation and docs around it, this should be a small ticket. And as it's optional, it should not block 6.3.0, so moving it to 7.0.0.
  2. Eric Merriman 2017-10-30

    Since you have a prototype... assigning.
  3. Eric Merriman 2017-11-01

    Due to the schedule for 7.0.0 versus the remaining work, moving to 7.1.0
  4. Eric Merriman 2018-02-08

    [~hknoechel] Yes, meant to make it 7.1.0. Do you even want it for 7.1.0? We can move it or create tickets in CLI to support.
  5. Hans Knöchel 2018-02-13

    [~cbarber] What do you think? I'd propose a <use-new-build-system /> property in the <ios/> tag that, if enabled, just appends the new UseNewBuildSystem=YES flag to xcodebuild.
  6. Chris Barber 2018-02-15

    [~hknoechel] I prefer a property over a CLI option. I wish we had something like a <property> that was _not_ baked into the app. I proposed a new <setting> tag, but it never gained traction. There's still hope. Until then, I'm cool with a <use-new-build-system> tag under the <ios> section.
  7. Hans Knöchel 2018-07-16

    titanium_mobile/master: https://github.com/appcelerator/titanium_mobile/pull/10181 node-titanium-sdk/master: https://github.com/appcelerator/node-titanium-sdk/pull/40 * Using the new build system by default on Xcode 10+ (recommended by Apple) * Using the old build system by default on Xcode < 10 (legacy, for backwards compatibility) * If <use-new-build-system> is set in the <ios> section of the tiapp.xml, prioritize that one Tested with all 6 possible configurations and works fine. Also includes a fix to even be able to use the new build system on Xcode 10, which was caused by Apple require'ing the -scheme flag to be set when using xcodebuild clean.
  8. Hans Knöchel 2018-07-31

    Reopening to investigate one possible remaining issue: The incremental build may be broken by this:
       [INFO]  Forcing rebuild: use-new-build-system flag changed since last build
       [INFO]    Was: undefined
       [INFO]    Now: false
       
  9. Hans Knöchel 2018-08-01

    PR (fix): https://github.com/appcelerator/titanium_mobile/pull/10223
  10. Christopher Williams 2018-08-27

    cherry-picked the commits to 7_4_X...
  11. Eric Wieber 2018-08-28

    Verified fixed. Able to build using new and legacy systems and correctly with the new tag. Changes verified in SDK builds 7.4.0.v20180828081144 & 7.5.0.v20180828085558
  12. Juan Carlos Salinas Ojeda 2018-09-18

    i see this bug closed, but i still having this error in all my apps. I dont know if i must report it here.
  13. Chris Barber 2018-09-18

    [~jcsomac] What specific error are you seeing? Can you please verify that your app is using the latest Titanium SDK 7.4.0.GA and that you are building using iOS SDK 12.0. Paste the error into a comment. If the output is big, then please use a gist or pastebin.
  14. Juan Carlos Salinas Ojeda 2018-09-18

    @Chris Barber Here you have https://pastebin.com/embed_iframe/GGd3cBEC Thanks fot the help
  15. Hans Knöchel 2018-09-19

    There was a deprecated library used in Ti.Barcode causing this crash. We are pushing an update today morning!
  16. Juan Carlos Salinas Ojeda 2018-09-19

    Hi hans, thanks for the help. This app is not using any library ( just ti.cloud ) and the problem persist. https://pastebin.com/embed_iframe/g44nVPLs Again, thanks for the help.
  17. Juan Carlos Salinas Ojeda 2018-09-19

    I just testing again with no library with the same result.... i really dont know whats going on, thanks in advance.
  18. Hans Knöchel 2018-09-19

    [~jcsomac] You are using an outdated version (7.1.0) in your app, not 7.4.0. See the details in your log:
        Titanium SDK
          SDK Version                 = 7.1.0.GA
          SDK Path                    = /Users/salinasj/Library/Application Support/Titanium/mobilesdk/osx/7.1.0.GA
          Target Platform             = iphone
        
    Make sure to update your tiapp.xml key <version> to 7.4.0.GA as well .
  19. Juan Carlos Salinas Ojeda 2018-09-19

    So, from now on... i can't use a diferent versin of the SDK ? it must be 7.4.0+ ?
  20. Hans Knöchel 2018-09-19

    If you target Xcode 10 - yes. Because it includes the tooling support for it, but also improvements to handle iOS 12 best possible.
  21. Juan Carlos Salinas Ojeda 2018-09-19

    I understand.... thanks, i just downloaded the new Ti.Barcode and works fine. Thanks again.
  22. alejandro_capel 2018-09-27

    Hi Everybody, I've got the same problem. This is my log: 2018-9-27 07:27:51 Operating System Name = Mac OS X Version = 10.13.6 Architecture = 64bit # CPUs = 8 Memory = 8589934592 Node.js Node.js Version = 9.2.1 npm Version = 5.5.1 Titanium CLI CLI Version = 5.1.1 Titanium SDK SDK Version = 7.5.0.v20180924162121 SDK Path = /Users/alex/Library/Application Support/Titanium/mobilesdk/osx/7.5.0.v20180924162121 Target Platform = iphone [TRACE] [ioslib] Validating iOS Simulator UDID 53FAF..... [TRACE] [ioslib] Found iOS Simulator UDID 53FA...... [TRACE] [ioslib] Selected iOS Simulator: iPhone 6 [TRACE] [ioslib] UDID = 53FA...... [TRACE] [ioslib] iOS = 12.0 [TRACE] [ioslib] Autoselected Xcode: 10.0 ... ... [INFO] Cleaning Xcode derived data [DEBUG] Invoking: DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild clean -scheme app1 [ERROR] note: Using new build system Any ideas? As you can see I downloaded the latest SDK version. Thanks in advance
  23. Juan Carlos Salinas Ojeda 2018-10-17

    @alejandro_capel did you clean the project ?
  24. alejandro_capel 2018-10-18

    yes of course. Now we are here : TIMOB-26433 (same problem)

JSON Source