Blank initial screen with iOS TestFlight

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
billhemsley
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 22
Joined: Wed Sep 21, 2011 12:24 pm

Blank initial screen with iOS TestFlight

Post by billhemsley » Mon Jul 17, 2017 1:32 pm

Hi,

I have an iOS app that works fine on [EDIT: DELETE "the emulator and"] local testing, and has been approved by Apple for release.

However, on TestFlight the first screen does not appear and we get a blank black screen instead. (Also this phase seems to run a lot more slowly than in other environments, but this might be a separate problem.)

A pseudocode shortening of a few hundred lines of code across two cards is:

Code: Select all

# preOpenStack

set a few variables, rendering properties and the like
go to Card 1

# Card 1

if local sqLite database not present then
    use revExecuteSQL to create table
end if
if data not in local sqLite database then
    mobileBusyIndicatorStart
    use "put URL theURL into newData" to get data from remote server
    mobileBusyIndicatorStop
    use revExecuteSQL to put data in local sqLite database
end if
use revDataFromQuery to get data from local sqLite database
go to Card 2

# Card 2

display the data
After the blank screen (replacing Card 1), Card 2 appears and things work as expected.

Does anyone have any experience of something like this and, more importantly, have any idea of what might be going on?

Thanks!

Bill
Last edited by billhemsley on Thu Aug 03, 2017 5:33 pm, edited 1 time in total.

billhemsley
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 22
Joined: Wed Sep 21, 2011 12:24 pm

Re: Blank initial screen with iOS TestFlight

Post by billhemsley » Wed Jul 19, 2017 8:02 pm

Further to my post, the suspicion has now fallen on a wait command on Card 1, which may be causing blocking and should probably either not be there have "with messages". The app has been rebuilt without it and I will report back.

billhemsley
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 22
Joined: Wed Sep 21, 2011 12:24 pm

Re: Blank initial screen with iOS TestFlight

Post by billhemsley » Thu Aug 03, 2017 5:47 pm

Problem solved, so I'm posting this in case anyone else comes across the issue.

The cause of the trouble was

Code: Select all

wait for 30 ticks


at the start of Card 1, which was intended to ensure the display of an opening message. This was causing some kind of blocking of the display, though not of the app loading data and moving to the next card.

The answer was to add another card to display the message before Card 1 appears and include the following:

Code: Select all

on openCard
    send "goToCard1" to me in 0.5 seconds
end openCard

on goToCard1
   go to card "Card 1"
end goToCard1
I can't explain why this works better than using wait, but it does!

Bill

Post Reply

Return to “iOS Deployment”