[TIMOB-6748] iOS: Can't build to iOS device when using Database features
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Critical |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2011-12-27T13:25:15.000+0000 |
| Affected Version/s | Release 1.8.0.1 |
| Fix Version/s | Release 1.7.6, Release 1.8.0.1, Sprint 2011-51, Release 2.0.0, Release 1.8.1 |
| Components | iOS |
| Labels | module_filesystem, qe-testadded |
| Reporter | Brad Weber |
| Assignee | Stephen Tramer |
| Created | 2011-12-13T15:06:16.000+0000 |
| Updated | 2012-02-02T16:55:44.000+0000 |
Description
Build succeeds to the iOS 5 Simulator, but fails to an attached iPad and ad hoc build with the error below when the app utilizes Database features.
[ERROR] build/iphone/Classes/TiDatabaseProxy.m:250:3: error: expected a type [1]
[ERROR] build/iphone/Classes/TiDatabaseProxy.m:252:11: error: use of undeclared identifier 'TiFilesystemFileProxy' [3]
[ERROR]
[ERROR] Error: Traceback (most recent call last):
File "/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1.v20111212195727/iphone/builder.py", line 1418, in main
execute_xcode("iphoneos%s" % iphone_version,args,False)
File "/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1.v20111212195727/iphone/builder.py", line 1180, in execute_xcode
output = run.run(args,False,False,o)
File "/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1.v20111212195727/iphone/run.py", line 39, in run
sys.exit(rc)
SystemExit: 65
It looked like this recent pull (6 days ago) might be related...
https://github.com/appcelerator/titanium_mobile/pull/860
This bug seems to occur when your app uses the database module, but not the filesystem module. The filesystem code is conditionally included using #ifdefs. That pull request (https://github.com/appcelerator/titanium_mobile/pull/860) added a filesystem dependency to the database module. You can workaround the issue by using Ti.Filesystem somewhere in your app. I'm doing something like:
Ti.API.debug(Ti.Filesystem.applicationDataDirectory); // Workaround bug in 1.8.0.1Test code:
You *MUST* build for device in Studio to ensure that both the original bug is valid, and that the fix works. Copy thevar d = Ti.Database.open('testdb.db'); var f = d.file; Ti.API.info(f.path);testdb.dbfile from Kitchen Sink into this project'sResourcesbefore running.I am having the same Problem on 1.7.6.v20111220130134. Error Message: use of undeclared identifier 'TiFilesystemFileProxy' Seems it's not fixed in the current 1.7.6 version.
This needs to be merged to 1_7_X as well.
Noting backpatch to 1.7.6 here.
Closing issue Tested with Ti Studio 1.0.8.201201101928 Ti Mob SDK 1.9.0.v20120111233134 OSX Lion iPhone 4S, iPad 2 Expected result is shown