Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28152] iOS: Compile error when SDK forces a rebuild

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2020-10-02T14:25:13.000+0000
Affected Version/sRelease 9.2.0
Fix Version/sRelease 9.2.1
ComponentsCLI, iOS
Labelsn/a
ReporterEwan Harris
AssigneeEwan Harris
Created2020-09-24T12:55:06.000+0000
Updated2020-10-02T14:25:13.000+0000

Description

Description

When the SDK determines that a rebuild is needed (as opposed to a clean rebuild, or no rebuild) a compile error can occur. [This block](https://github.com/appcelerator/titanium_mobile/blob/818db6f3fae3ea0f2512950b8eb194b25b5d57a3/iphone/cli/commands/_build.js#L2743-L2902) determines if a rebuild is needed, it appears the following circumstances can trigger this error: * SDK path changes (i.e. SDK version changed from 9.2.0.v20200923092031 -> 9.2.0.GA as this technically isn't an SDK version change) The following do not: * Target changing (even if the same deploy type is maintained) * iOS SDK changing The error specifically is
[TRACE]  /Users/awam/git/testing_apps/kitchensink-v2/build/iphone/Classes/TiUIiOSSystemButtonProxy.m:41:28: error: use of undeclared identifier 'UITitaniumNativeItemSpinner'; did you mean 'UIKitchenSinkNativeItemSpinner'?
[TRACE]  MAKE_SYSTEM_PROP(ACTIVITY, UITitaniumNativeItemSpinner);
[TRACE]                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
[TRACE]                             UIKitchenSinkNativeItemSpinner
[TRACE]  In module 'TitaniumKit' imported from /Users/awam/git/testing_apps/kitchensink-v2/build/iphone/Classes/TiUIiOSSystemButtonProxy.h:9:
[TRACE]  /Users/awam/git/testing_apps/kitchensink-v2/build/iphone/build/Products/Debug-iphoneos/TitaniumKit.framework/Headers/TiBase.h:324:36: note: expanded from macro 'MAKE_SYSTEM_PROP'
[TRACE]      return [NSNumber numberWithInt:map]; \
[TRACE]                                     ^
[TRACE]  /Users/awam/git/testing_apps/kitchensink-v2/build/iphone/build/Products/Debug-iphoneos/TitaniumKit.framework/Headers/TiBase.h:420:3: note: 'UIKitchenSinkNativeItemSpinner' declared here
[TRACE]    UIKitchenSinkNativeItemSpinner = -2,
[TRACE]    ^
[TRACE]  /Users/awam/git/testing_apps/kitchensink-v2/build/iphone/Classes/TiUIiOSSystemButtonProxy.m:42:27: error: use of undeclared identifier 'UITitaniumNativeItemSpinner'; did you mean 'UIKitchenSinkNativeItemSpinner'?
[TRACE]  MAKE_SYSTEM_PROP(SPINNER, UITitaniumNativeItemSpinner);
[TRACE]                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
[TRACE]                            UIKitchenSinkNativeItemSpinner
[TRACE]  In module 'TitaniumKit' imported from /Users/awam/git/testing_apps/kitchensink-v2/build/iphone/Classes/TiUIiOSSystemButtonProxy.h:9:
[TRACE]  /Users/awam/git/testing_apps/kitchensink-v2/build/iphone/build/Products/Debug-iphoneos/TitaniumKit.framework/Headers/TiBase.h:324:36: note: expanded from macro 'MAKE_SYSTEM_PROP'
[TRACE]      return [NSNumber numberWithInt:map]; \
[TRACE]                                     ^
[TRACE]  /Users/awam/git/testing_apps/kitchensink-v2/build/iphone/build/Products/Debug-iphoneos/TitaniumKit.framework/Headers/TiBase.h:420:3: note: 'UIKitchenSinkNativeItemSpinner' declared here
[TRACE]    UIKitchenSinkNativeItemSpinner = -2,
[TRACE]    ^
[TRACE]  /Users/awam/git/testing_apps/kitchensink-v2/build/iphone/Classes/TiUIiOSSystemButtonProxy.m:43:30: error: use of undeclared identifier 'UITitaniumNativeItemInfoLight'; did you mean 'UIKitchenSinkNativeItemInfoLight'?
[TRACE]  MAKE_SYSTEM_PROP(INFO_LIGHT, UITitaniumNativeItemInfoLight);
[TRACE]                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[TRACE]                               UIKitchenSinkNativeItemInfoLight
[TRACE]  In module 'TitaniumKit' imported from /Users/awam/git/testing_apps/kitchensink-v2/build/iphone/Classes/TiUIiOSSystemButtonProxy.h:9:
[TRACE]  /Users/awam/git/testing_apps/kitchensink-v2/build/iphone/build/Products/Debug-iphoneos/TitaniumKit.framework/Headers/TiBase.h:324:36: note: expanded from macro 'MAKE_SYSTEM_PROP'
[TRACE]      return [NSNumber numberWithInt:map]; \
[TRACE]                                     ^
[TRACE]  /Users/awam/git/testing_apps/kitchensink-v2/build/iphone/build/Products/Debug-iphoneos/TitaniumKit.framework/Headers/TiBase.h:435:3: note: 'UIKitchenSinkNativeItemInfoLight' declared here
[TRACE]    UIKitchenSinkNativeItemInfoLight = -13,
[TRACE]    ^
[TRACE]  /Users/awam/git/testing_apps/kitchensink-v2/build/iphone/Classes/TiUIiOSSystemButtonProxy.m:44:29: error: use of undeclared identifier 'UITitaniumNativeItemInfoDark'; did you mean 'UIKitchenSinkNativeItemInfoDark'?
[TRACE]  MAKE_SYSTEM_PROP(INFO_DARK, UITitaniumNativeItemInfoDark);
[TRACE]                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
[TRACE]                              UIKitchenSinkNativeItemInfoDark
[TRACE]  In module 'TitaniumKit' imported from /Users/awam/git/testing_apps/kitchensink-v2/build/iphone/Classes/TiUIiOSSystemButtonProxy.h:9:
[TRACE]  /Users/awam/git/testing_apps/kitchensink-v2/build/iphone/build/Products/Debug-iphoneos/TitaniumKit.framework/Headers/TiBase.h:324:36: note: expanded from macro 'MAKE_SYSTEM_PROP'
[TRACE]      return [NSNumber numberWithInt:map]; \
[TRACE]                                     ^
[TRACE]  /Users/awam/git/testing_apps/kitchensink-v2/build/iphone/build/Products/Debug-iphoneos/TitaniumKit.framework/Headers/TiBase.h:436:3: note: 'UIKitchenSinkNativeItemInfoDark' declared here
[TRACE]    UIKitchenSinkNativeItemInfoDark = -14,
[TRACE]    ^
[TRACE]  /Users/awam/git/testing_apps/kitchensink-v2/build/iphone/Classes/TiUIiOSSystemButtonProxy.m:45:30: error: use of undeclared identifier 'UITitaniumNativeItemDisclosure'; did you mean 'UIKitchenSinkNativeItemDisclosure'?
[TRACE]  MAKE_SYSTEM_PROP(DISCLOSURE, UITitaniumNativeItemDisclosure);
[TRACE]                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[TRACE]                               UIKitchenSinkNativeItemDisclosure
[TRACE]  In module 'TitaniumKit' imported from /Users/awam/git/testing_apps/kitchensink-v2/build/iphone/Classes/TiUIiOSSystemButtonProxy.h:9:
[TRACE]  /Users/awam/git/testing_apps/kitchensink-v2/build/iphone/build/Products/Debug-iphoneos/TitaniumKit.framework/Headers/TiBase.h:324:36: note: expanded from macro 'MAKE_SYSTEM_PROP'
[TRACE]      return [NSNumber numberWithInt:map]; \
[TRACE]                                     ^
[TRACE]  /Users/awam/git/testing_apps/kitchensink-v2/build/iphone/build/Products/Debug-iphoneos/TitaniumKit.framework/Headers/TiBase.h:438:3: note: 'UIKitchenSinkNativeItemDisclosure' declared here
[TRACE]    UIKitchenSinkNativeItemDisclosure = -15,
[TRACE]    ^
[TRACE]  /Users/awam/git/testing_apps/kitchensink-v2/build/iphone/Classes/TiUIiOSSystemButtonProxy.m:46:31: error: use of undeclared identifier 'UITitaniumNativeItemContactAdd'; did you mean 'UIKitchenSinkNativeItemContactAdd'?
[TRACE]  MAKE_SYSTEM_PROP(CONTACT_ADD, UITitaniumNativeItemContactAdd);
[TRACE]                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[TRACE]                                UIKitchenSinkNativeItemContactAdd
[TRACE]  In module 'TitaniumKit' imported from /Users/awam/git/testing_apps/kitchensink-v2/build/iphone/Classes/TiUIiOSSystemButtonProxy.h:9:
[TRACE]  /Users/awam/git/testing_apps/kitchensink-v2/build/iphone/build/Products/Debug-iphoneos/TitaniumKit.framework/Headers/TiBase.h:324:36: note: expanded from macro 'MAKE_SYSTEM_PROP'
[TRACE]      return [NSNumber numberWithInt:map]; \
[TRACE]                                     ^
[TRACE]  /Users/awam/git/testing_apps/kitchensink-v2/build/iphone/build/Products/Debug-iphoneos/TitaniumKit.framework/Headers/TiBase.h:440:3: note: 'UIKitchenSinkNativeItemContactAdd' declared here
[TRACE]    UIKitchenSinkNativeItemContactAdd = -16
[TRACE]    ^
[TRACE]  6 errors generated.
[This](https://github.com/appcelerator/titanium_mobile/blob/b999f2716088d221bc9e146233cbb559776ad4df/iphone/TitaniumKit/TitaniumKit/Sources/API/TiBase.h#L417-L438) is how the code should look. It appears that one of the renames [here](https://github.com/appcelerator/titanium_mobile/blob/818db6f3fae3ea0f2512950b8eb194b25b5d57a3/iphone/cli/commands/_build.js#L3033-L3102) or [here](https://github.com/appcelerator/titanium_mobile/blob/818db6f3fae3ea0f2512950b8eb194b25b5d57a3/iphone/cli/commands/_build.js#L4709) is changing the Titanium portion of the enums to the app name.

Steps to reproduce

1. Install 9.2.0.v20200923092031 and 9.2.0.GA 2. Set your apps SDK to 9.2.0.v20200923092031 3. Run appc run -p ios -T device --build-only 4. Set your apps SDK to 9.2.0.GA 5. Run appc run -p ios -T device --build-only

Actual

Compile error

Expected

No compile error

Comments

  1. Ewan Harris 2020-09-24

    -Looks like the root cause is occurring during the first build, not the second build. But the problem only manifests in the second build- It seems to actually be expected that these values get scrubbed and Titanium replaced with the app name, I'm guessing the problem actually lies in the usage in the SDK not being replaced
  2. Ewan Harris 2020-09-25

    https://github.com/appcelerator/titanium_mobile/pull/12135
  3. Samir Mohammed 2020-09-29

    FR Passed, Waiting on Jenkins build and 9.2.1 Backport.
  4. Samir Mohammed 2020-10-02

    *Closing ticket*. Fix verified in SDK version 9.2.1.v20201001120538, and 9.3.0.v20201001144501. *Test and other information can be found at:* https://github.com/appcelerator/titanium_mobile/pull/12135

JSON Source