[TIMOB-19000] Remove Titanium build call from Xcode pre-compile phase
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-07-28T08:50:33.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 5.0.0 |
Components | iOS, Tooling |
Labels | n/a |
Reporter | Chris Barber |
Assignee | Chris Barber |
Created | 2015-06-11T19:52:53.000+0000 |
Updated | 2017-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 runappc 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
[~bgrantges@appcelerator.com] [~rblalock] [~aleard] [~scottd] FYI. Any objections?
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.
[~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.
Kk so if you did a
ti build
compile only...open in Xcode and build to device...it'd work right?[~rblalock] Correct.
all of the above being true - then make it so!
This has been fixed as apart of TIMOB-18840.
Closing ticket as fixed.