Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19000] Remove Titanium build call from Xcode pre-compile phase

GitHub Issuen/a
TypeImprovement
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-07-28T08:50:33.000+0000
Affected Version/sn/a
Fix Version/sRelease 5.0.0
ComponentsiOS, Tooling
Labelsn/a
ReporterChris Barber
AssigneeChris Barber
Created2015-06-11T19:52:53.000+0000
Updated2017-03-16T21:08:48.000+0000

Description

A long time ago, Titanium's iOS build was written in Python. The iOS build performed 3 major steps:

Create all Xcode related files in build dir

Run xcodebuild to compile project, which in turn fires the Xcode project's pre-compile phase script that calls the iOS build again to copy the Titanium-specific resources

Xcode builds the final app and signs it

It was done this way so that you could open the generated Xcode project, modify JS files, and build from Xcode. When we replaced they Python-based iOS build scripts with the Node.js version, there was a performance issue with Xcode calling the Titanium CLI to copy the Titanium resources. I changed things so that if you are building from the Titanium CLI, it would copy the Xcode project related files, then the Titanium related files, then finally call xcodebuild. This significantly sped things up. The problem today is that when you run appc run, it generates a Xcode project who's pre-compile script references the Titanium CLI. Users do not have the Titanium CLI installed by default and thus it will fail. Even if they did, the encryption method would vary. Also the Xcode project's pre-compile should be calling the appc run, not ti build. I'm proposing we remove the Xcode project's pre-compile script. Pros: * Remove cruft from the iOS build ** There's a lot of code that accommodates the ability for Titanium resources to be processed when building from Xcode that we could rip out ** As maintainers of the iOS build changes, not all of the knowledge is transferred and thus new contributors neglect the Xcode-specific build path * Speeds up builds when building from Xcode * Building from Xcode only really works when you have Titanium CLI installed * Building via appc run encrypts differently than ti build and thus building from Xcode would render the new encrypted files unused and bloat the app * Modifying Titanium JS files and building directly from Xcode is not officially supported Cons: * Deprecates a feature that has existed for years

Comments

  1. Ingo Muschenetz 2015-06-11

    [~bgrantges@appcelerator.com] [~rblalock] [~aleard] [~scottd] FYI. Any objections?
  2. Rick Blalock 2015-06-11

    There's gotta be more cons than that. :-) "Modifying Titanium JS files and building directly from Xcode is not officially supported" We've supported building from Xcode though. We've always had the ability, for example, to run Instruments with your app, which requires building from Xcode.
  3. Chris Barber 2015-06-11

    [~rblalock] Right and that won't change. What you won't be able to do is do a device build, change the app.js, build from Xcode and expect to see your changes. You will still be able to run instruments, profile the app, and package it for distribution.
  4. Rick Blalock 2015-06-11

    Kk so if you did a ti build compile only...open in Xcode and build to device...it'd work right?
  5. Chris Barber 2015-06-11

    [~rblalock] Correct.
  6. Bert Grantges 2015-06-12

    all of the above being true - then make it so!
  7. Chris Barber 2015-07-28

    This has been fixed as apart of TIMOB-18840.
  8. Lee Morris 2017-03-16

    Closing ticket as fixed.

JSON Source