Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27792] iOS: Remove python dependency from SDK build

GitHub Issuen/a
TypeImprovement
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2020-05-26T15:29:28.000+0000
Affected Version/sn/a
Fix Version/sRelease 9.1.0
ComponentsiOS
Labelsbuild, ios, python, sdk
ReporterEwan Harris
AssigneeEwan Harris
Created2020-03-06T07:03:00.000+0000
Updated2020-07-27T13:13:06.000+0000

Description

Description

When building the iOS portion of the SDK, we use [a python script](https://github.com/appcelerator/titanium_mobile/blob/cc1b0554a72c271ed2050b3e7ee4ce27627804e3/support/dev/localecompiler.py) to do some handling of i18n files. We should rewrite this in the same timeframe as the Android changes (TIMOB-27719) to allow us to remove the python dependency at the same time

Comments

  1. Ewan Harris 2020-03-09

    [~jquick] question for you. This script appears to only be used by iOS right now, but it looks like it also could/used to [handle android](https://github.com/appcelerator/titanium_mobile/blob/05db45790d457cb41783b46f5e95ba4bb1571339/support/dev/localecompiler.py#L131-L134), should that be kept? Would having this script be of use to an Android dev?
  2. Joshua Quick 2020-03-09

    We don't need this on Android. If we were to localize SDK strings, we would do it the native way. I'm questioning if we need this for iOS SDK builds. It looks like this python script is used to localize the following folder's i18n files, but it only contains a "Hello World" string as a test. [titanium_mobiile/iphone/i18n](https://github.com/appcelerator/titanium_mobile/tree/master/iphone/i18n) I'm thinking we should just delete this python script and remove it from the Xcode prebuild step. Our app build script "_build.js" for both Android and iOS already have separate code for converting i18n files to their native equivalents. [Android - _build.js - generateI18N()](https://github.com/appcelerator/titanium_mobile/blob/9950ccec933d716ee96c0272031f26999d595ea9/android/cli/commands/_build.js#L3221) [iOS - _build.js - writeI18NFiles()](https://github.com/appcelerator/titanium_mobile/blob/9950ccec933d716ee96c0272031f26999d595ea9/iphone/cli/commands/_build.js#L6299)
  3. Ewan Harris 2020-03-09

    I'm kind of in agreement, if it reused the code from the SDK to do the building of the files to kind of act as a test of that then I'd see value in it but right now it doesn't seem super useful to me. [~vijaysingh] what do you think?
  4. Vijay Singh 2020-03-09

    I think we can remove the python script. But we have to write a function in '[scons-xcode-project-build.js](https://github.com/appcelerator/titanium_mobile/blob/master/build/scons-xcode-project-build.js)' similar to ['writeI18NFiles'](https://github.com/appcelerator/titanium_mobile/blob/9950ccec933d716ee96c0272031f26999d595ea9/iphone/cli/commands/_build.js#L6299) which will create .lproj files and copy it in app directory (Titanium.app/) .
  5. Ewan Harris 2020-05-21

    PR: https://github.com/appcelerator/titanium_mobile/pull/11725
  6. Christopher Williams 2020-05-26

    Merged to master for 9.1.0 target (though this is really an internal dev ticket)
  7. Samir Mohammed 2020-07-27

    Closing ticket. Fix verified in SDK version 9.1.0.v20200724110711, 9.2.0.v20200724112452 and 9.3.0.v20200724114100. Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/11725

JSON Source