Project: titanium
Issue TIMOB-19000: Remove Titanium build call from Xcode pre-compile phase
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
Story points: 8