iOS Question Error opening stream when debug

skrjabin

Active Member
Licensed User
Sometimes when starting work I get strange errors after debug (using Hosted Mac Builder). The App is compiled and after Installing errors like this:
Application_Start
Error occurred on line: 16 (FrmMsg)
Error opening stream (/private/var/mobile/Containers/Data/Application/.../tmp/virtual_assets/viewfrmmsg.bil): Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory" UserInfo={_kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=2}
Stack Trace: (
CoreFoundation <redacted> + 152
...

The line 16 is:
pg.RootPanel.LoadLayout("viewFrmMsg")

Ofcourse the Layout File is NOT missing. Sometimes it helps to "clean project", but sometimes it only helps to remove the app in the iPhone before. But with that I lose all the data in the sqlite DB of the app. Is there a better way, I could try?
With "BuildReleaseApp" it is ok, only when Debug (F5).
 

skrjabin

Active Member
Licensed User
OK, if this happens I usualy first save the app data making a data backup with iTunes. Than do "clean project" and delete the app in iPhone. Than it works with b4i and I also can set the app data back with iTunes. But it takes time, so I hope there will be in future better ways to recorrect the debug app "assets" file database. May be some tools, that make this steps automaticly, like un- and reinstall asset files?
 

Erel

Administrator
Staff member
Licensed User
I've found one case where this issue happens. It happens when you add files to the files folder directly and then run the program. In most cases it will crash as the file case is incorrect. Pressing on the Sync button or adding the file to the files tab will not help at this point.

This is fixed for the next update.
 
Top