Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19303] iOS: Building modules errors out due to 'unknown type name 'UIView''

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-08-03T02:51:40.000+0000
Affected Version/sRelease 4.1.0
Fix Version/sRelease 4.1.1, Release 5.0.0
ComponentsiOS
Labelsqe-5.0.0
ReporterEwan Harris
AssigneeChee Kiat Ng
Created2015-07-31T17:47:29.000+0000
Updated2015-08-03T08:22:25.000+0000

Description

Description

When building an iOS module with an SDK later than 4.1.0.GA the build will fail with the following errors
/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.1.0.GA/iphone/include/TiProxy.h:92:44: error: unknown type name 'UIView'
void DoProxyDelegateChangedValuesWithProxy(UIView<TiProxyDelegate> * target, NSString * key, id oldValue, id newValue, TiProxy * proxy);
                                           ^
/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.1.0.GA/iphone/include/TiProxy.h:92:50: error: expected ')'
void DoProxyDelegateChangedValuesWithProxy(UIView<TiProxyDelegate> * target, NSString * key, id oldValue, id newValue, TiProxy * proxy);
                                                 ^
/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.1.0.GA/iphone/include/TiProxy.h:92:43: note: to match this '('
void DoProxyDelegateChangedValuesWithProxy(UIView<TiProxyDelegate> * target, NSString * key, id oldValue, id newValue, TiProxy * proxy);
                                          ^
/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.1.0.GA/iphone/include/TiProxy.h:93:49: error: unknown type name 'UIView'
void DoProxyDelegateReadValuesWithKeysFromProxy(UIView<TiProxyDelegate> * target, id<NSFastEnumeration> keys, TiProxy * proxy);
                                                ^
/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.1.0.GA/iphone/include/TiProxy.h:93:55: error: expected ')'
void DoProxyDelegateReadValuesWithKeysFromProxy(UIView<TiProxyDelegate> * target, id<NSFastEnumeration> keys, TiProxy * proxy);
                                                      ^
/Users/eharris/Library/Application Support/Titanium/mobilesdk/osx/4.1.0.GA/iphone/include/TiProxy.h:93:48: note: to match this '('
void DoProxyDelegateReadValuesWithKeysFromProxy(UIView<TiProxyDelegate> * target, id<NSFastEnumeration> keys, TiProxy * proxy);
It cannot find them because of [this commit](https://github.com/appcelerator/titanium_mobile/commit/7fc02cbfe17a8201dc71e604035aeb3191c9f0e0#diff-2ce52d8edb4096998bcad96ef6ef6211)

Steps To Reproduce

1. Clone a module such as [ti.paint](https://github.com/appcelerator-modules/ti.paint/) 2. cd into the ios folder 3. Open the titanium.xcconfig and change the SDK to 4.1.0.GA

Actual Result

The build will fail

Expected Result

The build should not fail

Comments

  1. Ben Bahrenburg 2015-08-01

    By adding back in TiBase.h this issue is resolved. Done conditionally to avoid any problems ~~~ #ifndef TI_BASE_H #import "TiBase.h" #endif ~~~ Included in this PR https://github.com/appcelerator/titanium_mobile/pull/6999
  2. Chris Barber 2015-08-01

    [~ben.bahrenburg@gmail.com] Did you happen to test the Titanium SDK after your change when building using the built-in JavaScriptCore?
       <?xml version="1.0" encoding="UTF-8"?>
       <ti:app xmlns:ti="http://ti.appcelerator.org">
           <ios>
               <use-jscore-framework>true</use-jscore-framework>
           </ios>
       </ti:app>
       
  3. Ben Bahrenburg 2015-08-03

    Tested using: * Ti 4.1.0 sample project https://github.com/appcelerator-developer-relations/appc-sample-ti410, which contains true * Targeting iOS 8.4 * Xcode 6.4 No issues found. Please note I did not test against Xcode 7 and iOS 9.
  4. Chee Kiat Ng 2015-08-03

    Just tested using the sample project on Xcode 7 beta 4, iOS 9, with jscore enabled / disabled. No issues either. Merging PR.
  5. Chee Kiat Ng 2015-08-03

    PRs merged. backport PR: https://github.com/appcelerator/titanium_mobile/pull/7001 Thanks [~ben.bahrenburg@gmail.com]!
  6. Satyam Sekhri 2015-08-03

    Tested the samples mentioned by Ewan and Ben. Tested with jscore enabled/disabled. Also tested on iOS 8.4 with Xcode 6.4 and iOS 9.0 with Xcode 7 Verified on: Mac OS 10.10.4 Ti SDK: 4.1.1.v20150802200935 , 4.2.0.v20150803003621 Appc CLI NPM: 4.1.0 Appc CLI Core: 4.1.2 Xcode: 6.4, 7.0-b4

JSON Source