Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24453] iOS: Don't include metadata.json when no assets, utilize module version as a compiler flag

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusResolved
ResolutionFixed
Resolution Date2017-04-14T13:48:23.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterHans Knöchel
AssigneeHans Knöchel
Created2017-03-05T16:24:01.000+0000
Updated2017-04-14T13:48:23.000+0000

Description

There are many use-cases where developers want the module version inside the module.xcconfig (e.g. when manually linking frameworks like [here](https://github.com/appcelerator-modules/ti.facebook/blob/master/ios/module.xcconfig#L12) or [here](https://github.com/hansemannn/ti.googlesignin/blob/master/iphone/module.xcconfig#L9). Module developers usually bump the version in both the manifest and this file, which can easily cause problems when they forget it (I did twice as well). Long story short, we would add the compiler flag TI_MODULE_VERSION to the generated module.xcconfig, so people can use the flag with $(TI_MODULE_VERSION). Another thing was that we should only generate the metadata.json when there are JS files to encrypt. Otherwise, it will generate an empty json file that isn't required and also not generated when using the old build.py (rot in hell).

Comments

  1. Hans Knöchel 2017-03-05

    PR: https://github.com/appcelerator/titanium_mobile/pull/8861 To test:

    Create a new iOS module with appc new -t -p ios

    Build the module with appc run -p ios --build-only

    Unzip the generated module

    Inspect the modules/iphone/<module-name>/1.0.0/module.xcconfig to include the TI_MODULE_VERSION compiler flag at the top of the file

JSON Source