Reading a big file on launching --> "failed to launch in time"

Dear all,

I am experiencing a problem and any help would be appreciate. I am building a game that uses a dictionary that is a file containing 48000 lines. For protecting purpose this text file is encoded, with an in house algorithm. I have to read this file and put its contents in an 3 dimensions array at the launching of my app. This process takes around 6 seconds in the simulator. When i run it on my Ipad, it crashes with “Failed to launch in time” error. The function for reading/decoding is quite optimized.

Does anybody has experienced reading big file ?

Many thanks in advance,

Best regards,
Jérôme. [import]uid: 96703 topic_id: 21268 reply_id: 321268[/import]

There is a function in iOS that must be reached within a certain amount of time before the os thinks the app has frozen. Try not loading the file until your app has completely loaded. [import]uid: 119420 topic_id: 21268 reply_id: 84255[/import]

I currently have difficulty with submitting my app. Apple has rejected it several times because they say that it launches to a blank gray screen. I have attempted to correct this issue with a Default.png. I have tested this on my device and all seems good, but in the simulator, then is a mili second of a delay between the time you launch the app and the actual home screen.

Can anyone help??? [import]uid: 23812 topic_id: 21268 reply_id: 84276[/import]

If your having these issues.

Create a loading screen, that simply displays your default.png

Then have it go to your menu/or whatever after a 500>1000 millisecond delay.

That will get you around the launch in time issue [import]uid: 84637 topic_id: 21268 reply_id: 84289[/import]

Is there an example you could give about how to create a loading screen to load the default?

[import]uid: 23812 topic_id: 21268 reply_id: 84301[/import]

Thanks for your answer guys, it works just fine :slight_smile:
Best,
Jérôme. [import]uid: 96703 topic_id: 21268 reply_id: 84445[/import]

@ wesam this is a simple scene :

[code]

local loadingImage = display.newImage(“Default.png”)
group:insert(loadingImage)

local function changeToScene(event)
–change scene here
end

timer.performWithDelay(800, changeToScene) [import]uid: 84637 topic_id: 21268 reply_id: 84447[/import]