Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20495] iOS: Build error caused by missing define statements

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2016-03-02T04:34:00.000+0000
Affected Version/sRelease 6.0.0
Fix Version/sRelease 5.2.1
ComponentsiOS
Labelsqe-5.2.1
ReporterBen Bahrenburg
AssigneeAngel Petkov
Created2016-03-01T23:41:32.000+0000
Updated2016-03-08T17:25:46.000+0000

Description

Currently master is broken. This is a result of the following commit https://github.com/appcelerator/titanium_mobile/commit/9e209ca9ef3541ab23a0975627be2bc487464cbe#diff-2c9944d65132833cd5df17dcdd3ebc3a The reason is my code doesn't use any attrributed strings, which means the below define statements are not applied #if defined (USE_TI_UIATTRIBUTEDSTRING) || defined(USE_TI_UIIOSATTRIBUTEDSTRING) If these statements are not defined, you are unable to compile the code. You get the following error from Studio. If I remove the define statements I'm able to compile without any issues. [ERROR] : ** BUILD FAILED ** [ERROR] : The following build commands failed: [ERROR] : CompileC build/Intermediates/myProject.build/Release-iphoneos/myProject.build/Objects-normal/armv7/TiUILabel.o Classes/TiUILabel.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler [ERROR] : (1 failure)

Comments

  1. Chee Kiat Ng 2016-03-01

    If this commit is really the key issue, it should be happening on 5_2_X as well, kindly check and back port a fix for that too.
  2. Angel Petkov 2016-03-02

    [~ben.bahrenburg@gmail.com] I've ran code since implementing this feature that have labels with no attributed string. Are you by chance adding an event listener for 'link' on the label ? if not could you please send me the code in which you reproducing this issue ?
  3. Ben Bahrenburg 2016-03-02

    Steps to re-create: 1) Create a new Alloy project 2) Associate the Alloy project with a latest build from master. In my case I'm using mobilesdk-5.4.0.v20160301134309-osx.zip 3) Create an Ad Hoc / Enterprise Build via Studio 4) You will see the below error: [ERROR] : ** BUILD FAILED ** [ERROR] : The following build commands failed: [ERROR] : CompileC build/Intermediates/IssueTester.build/Release-iphoneos/IssueTester.build/Objects-normal/armv7/TiUILabel.o Classes/TiUILabel.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler [ERROR] : (1 failure) 5) If you open the xcode project you will see the issue with the define not being set correctly. Other comments: It looks as though the TiUiLabel code that references the attributed project isn't in a comment out macro if the attributed define is not set. I believe this means that (a) the code should be wrapped in such a macro (b) the attributed proxy should be treated as a required dependency of TiUiLabel and the define conditional at the top of the TiUiLabel.m file should be removed, just keeping the reference.
  4. Ben Bahrenburg 2016-03-02

    I have a sample project if it will help, but as it errors with the default alloy template I thought easier to use that for testing purposes.
  5. Angel Petkov 2016-03-02

    I was able to re-produced the issue once i tried packaging the project as oppose to running. Thank you for the very detailed and precise comment :) . PR(master): https://github.com/appcelerator/titanium_mobile/pull/7792 PR(5_2_X): https://github.com/appcelerator/titanium_mobile/pull/7793
  6. Chee Kiat Ng 2016-03-02

    PRs approved and merged!
  7. Josh Longton 2016-03-07

JSON Source