Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19017] iOS: ViewProxy modules error on building with "error: expected ')'"

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2015-06-19T01:56:34.000+0000
Affected Version/sn/a
Fix Version/sRelease 4.1.0
ComponentsiOS
Labelsmodule
Reporterkosso
AssigneePedro Enrique
Created2015-06-14T21:05:43.000+0000
Updated2015-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 **

Comments

  1. kosso 2015-06-14

    The lines in TiProxy.h which the error is referring to have an interesting comment beneath them :
       
       void DoProxyDelegateChangedValuesWithProxy(UIView<TiProxyDelegate> * target, NSString * key, id oldValue, id newValue, TiProxy * proxy);
       void DoProxyDelegateReadValuesWithKeysFromProxy(UIView<TiProxyDelegate> * target, id<NSFastEnumeration> keys, TiProxy * proxy);
       //Why are these here? Because they can be commonly used between TiUIView and TiUITableViewCell.
       
       
  2. kosso 2015-06-14

    Comparing TiProxy.h from 4.0.x with 4.1.x I see that the line :
    #import "TiBase.h"
    .. is missing. Adding this has solved the module building issue. But I have no idea what else might have broken by doing so.
  3. Pedro Enrique 2015-06-16

    Try adding #import <UIKit/UIKit.h> to the module.pch - I think the latest version of Xcode, for whatever reason, requires that.
  4. kosso 2015-06-16

    @Pedro That seemed to do the trick!
  5. Pedro Enrique 2015-06-16

    [~kosso] cool! We'll need to update the module template
  6. Pedro Enrique 2015-06-18

    PR https://github.com/appcelerator/titanium_mobile/pull/6924
  7. Chee Kiat Ng 2015-06-19

    PR Merged!
  8. Wilson Luu 2015-07-07

    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

JSON Source