[TIMOB-19017] iOS: ViewProxy modules error on building with "error: expected ')'"
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-06-19T01:56:34.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 4.1.0 |
Components | iOS |
Labels | module |
Reporter | kosso |
Assignee | Pedro Enrique |
Created | 2015-06-14T21:05:43.000+0000 |
Updated | 2015-07-07T00:39:11.000+0000 |
Description
Trying to build a module based on a simple ViewProxy as in the guide is now failing to build since the CI build SDK 4.1.x version. 4.0.x is fine.
To reproduce.
1. Make sure you have SDK 4.1.x selected
2. Follow the instructions to build the example 'Square' module in the documentation here : http://docs.appcelerator.com/platform/latest/#!/guide/iOS_Module_Quick_Start
3. Open in XCode. Clean and Build. (or run build.py)
This is the error I'm getting:
In file included from /Library/Application Support/Titanium/mobilesdk/osx/4.1.0.v20150601234429/iphone/include/TiModule.h:7:
/Library/Application Support/Titanium/mobilesdk/osx/4.1.0.v20150601234429/iphone/include/TiProxy.h:92:44: error: unknown type name 'UIView'
void DoProxyDelegateChangedValuesWithProxy(UIView<TiProxyDelegate> * target, NSString * key, id oldValue, id newValue, TiProxy * proxy);
^
/Library/Application Support/Titanium/mobilesdk/osx/4.1.0.v20150601234429/iphone/include/TiProxy.h:92:50: error: expected ')'
void DoProxyDelegateChangedValuesWithProxy(UIView<TiProxyDelegate> * target, NSString * key, id oldValue, id newValue, TiProxy * proxy);
^
/Library/Application Support/Titanium/mobilesdk/osx/4.1.0.v20150601234429/iphone/include/TiProxy.h:92:43: note: to match this '('
void DoProxyDelegateChangedValuesWithProxy(UIView<TiProxyDelegate> * target, NSString * key, id oldValue, id newValue, TiProxy * proxy);
^
/Library/Application Support/Titanium/mobilesdk/osx/4.1.0.v20150601234429/iphone/include/TiProxy.h:93:49: error: unknown type name 'UIView'
void DoProxyDelegateReadValuesWithKeysFromProxy(UIView<TiProxyDelegate> * target, id<NSFastEnumeration> keys, TiProxy * proxy);
^
/Library/Application Support/Titanium/mobilesdk/osx/4.1.0.v20150601234429/iphone/include/TiProxy.h:93:55: error: expected ')'
void DoProxyDelegateReadValuesWithKeysFromProxy(UIView<TiProxyDelegate> * target, id<NSFastEnumeration> keys, TiProxy * proxy);
^
/Library/Application Support/Titanium/mobilesdk/osx/4.1.0.v20150601234429/iphone/include/TiProxy.h:93:48: note: to match this '('
void DoProxyDelegateReadValuesWithKeysFromProxy(UIView<TiProxyDelegate> * target, id<NSFastEnumeration> keys, TiProxy * proxy);
^
4 errors generated.
** BUILD FAILED **
The lines in TiProxy.h which the error is referring to have an interesting comment beneath them :
Comparing TiProxy.h from 4.0.x with 4.1.x I see that the line :
.. is missing. Adding this has solved the module building issue. But I have no idea what else might have broken by doing so.
Try adding
#import <UIKit/UIKit.h>
to the module.pch - I think the latest version of Xcode, for whatever reason, requires that.@Pedro That seemed to do the trick!
[~kosso] cool! We'll need to update the module template
PR https://github.com/appcelerator/titanium_mobile/pull/6924
PR Merged!
Closing ticket as fixed. Verified there were no ViewProxy module errors when building with latest SDK. Tested on: Appcelerator Studio, build: 4.1.0.201507061507 Appc CLI NPM: 4.1.0-1 Appc CLI Core: 4.1.0-5 Arrow: 1.1.0-11 SDK: 4.1.0.v20150706111546 Node: v0.10.38 OS: Yosemite (10.10.4) Xcode: 6.4