[TIMOB-23124] iOS: Autolayout does not work with latest master / Build fails
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-04-05T09:37:22.000+0000 |
Affected Version/s | Release 5.4.0 |
Fix Version/s | Release 5.4.0 |
Components | iOS |
Labels | autolayout, ios, qe-5.4.0, scrollableview |
Reporter | Hans Knöchel |
Assignee | Chee Kiat Ng |
Created | 2016-03-30T13:25:16.000+0000 |
Updated | 2016-06-09T17:40:45.000+0000 |
Description
Nothing more to say. Copy
<use-app-thinning>true</use-app-thinning>
in the <ios>
section of your tiapp.xml and run the project. Make sure you use a 5.4.0 build (scons'd or from the build server).
The build will fail with the following error:
[ERROR] ** BUILD FAILED **
[ERROR] The following build commands failed:
[ERROR] CompileC build/Intermediates/test.build/Debug-iphonesimulator/test.build/Objects-normal/i386/TiUIScrollableView.o Classes/TiUIScrollableView.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
[ERROR] (1 failure)
It can be traced to here:
[TRACE] /Users/hans/Desktop/test/build/iphone/Classes/TiUIScrollableView.m:634:33: error: use of undeclared identifier 'scrollview'; did you mean '_scrollView'?
[TRACE] if (showPageControl && (scrollview!=nil) && ([[scrollview subviews] count]>0)) {
[TRACE] ^~~~~~~~~~
[TRACE] _scrollView
[TRACE] In file included from /Users/hans/Desktop/test/build/iphone/Classes/TiUIScrollableView.m:11:
[TRACE] /Users/hans/Desktop/test/build/iphone/Classes/TiUIScrollableView.h:17:19: note: '_scrollView' declared here
[TRACE] UIScrollView* _scrollView;
[TRACE] ^
[TRACE] /Users/hans/Desktop/test/build/iphone/Classes/TiUIScrollableView.m:634:56: error: use of undeclared identifier 'scrollview'; did you mean '_scrollView'?
[TRACE] if (showPageControl && (scrollview!=nil) && ([[scrollview subviews] count]>0)) {
[TRACE] ^~~~~~~~~~
[TRACE] _scrollView
[TRACE] In file included from /Users/hans/Desktop/test/build/iphone/Classes/TiUIScrollableView.m:11:
[TRACE] /Users/hans/Desktop/test/build/iphone/Classes/TiUIScrollableView.h:17:19: note: '_scrollView' declared here
[TRACE] UIScrollView* _scrollView;
[TRACE] ^
[TRACE] /Users/hans/Desktop/test/build/iphone/Classes/TiUIScrollableView.m:646:33: error: use of undeclared identifier 'scrollview'; did you mean '_scrollView'?
[TRACE] if (showPageControl && (scrollview!=nil) && ([[scrollview subviews] count]>0)) {
[TRACE] ^~~~~~~~~~
[TRACE] _scrollView
[TRACE] In file included from /Users/hans/Desktop/test/build/iphone/Classes/TiUIScrollableView.m:11:
[TRACE] /Users/hans/Desktop/test/build/iphone/Classes/TiUIScrollableView.h:17:19: note: '_scrollView' declared here
[TRACE] UIScrollView* _scrollView;
[TRACE] ^
[TRACE] /Users/hans/Desktop/test/build/iphone/Classes/TiUIScrollableView.m:646:56: error: use of undeclared identifier 'scrollview'; did you mean '_scrollView'?
[TRACE] if (showPageControl && (scrollview!=nil) && ([[scrollview subviews] count]>0)) {
[TRACE] ^~~~~~~~~~
[TRACE] _scrollView
[TRACE] In file included from /Users/hans/Desktop/test/build/iphone/Classes/TiUIScrollableView.m:11:
[TRACE] /Users/hans/Desktop/test/build/iphone/Classes/TiUIScrollableView.h:17:19: note: '_scrollView' declared here
[TRACE] UIScrollView* _scrollView;
[TRACE] ^
[TRACE] 4 errors generated.
Which is suspicious, because the related code is only generated if the #ifdef TI_USE_AUTOLAYOUT
is added and it *is* added by our build CLI.
As it's related to the ScrollableView, it might already be obsolete, because [~cng] is working on major bugfixes & improvements in that class. But we should leave it here to be tracked.
That's correct. on hold for this ticket please I believe I have a PR coming up that may have relation to this.
Demo
PR approved!
Verified as fixed, using the demo code provided, and setting AutoLayout to
true
and