Tyroner
Aspiring developer
Profile
Posts: 175
Reg: Dec 26, 2012
Johannesburg, S...
4,200
02/24/18 09:01 AM (6 years ago)

App not loading: Solved

I have a test app loaded to an iPhone and iPad. It used to work without any problems. It suddenly stopped loading on my devices. On launching the app it seems like it is trying to locate the info to load then just comes up with a blank screen. Also not loading on the simulator when I run it via Xcode. Xcode says that the app is running on the device but screen is blank. There must be something wrong in the control panel because the app used to work perfectly. I am using BT Control panel on a MAC. Any ideas guys? It is not yet on the App Store.
 
Tyroner
Aspiring developer
Profile
Posts: 175
Reg: Dec 26, 2012
Johannesburg, S...
4,200
like
02/24/18 10:33 AM (6 years ago)
This post by David solved the problem: App loads White Screen, Seems Broken? I've been debugging a complaint we've heard several times recently. I've found / fixed an issue and think it may be affecting more than the folks that reported it. THIS FOLLOWING REMARKS OR MAY NOT CAUSE any issues in your app, but it could be? YOU MAY NEED TO RE-CREATE SOME MENUS in your app's control panel? --The symptom: App launches to white, blank screen, nothing shows. --The issue: In this app (a zillion things could cause this of course) the JSON data included in the XCode bundle was invalid. --The details: The BT_config_en.txt file included in the Xcode project has an array of BT_menus. This BT_menus array will be empty if the app doesn't have any menus configured. In this case it was not empty and the JSON data in the BT_menus structure was INVALID. Individual items in the BT_menus list are themselves JSON objects. Just like the screens list, themes list, etc. A valid menu item looks something like this: {"itemId":"1234", "itemType":"BT_menuItem", "titleText":"Row 1", "loadScreenWithItemId":"1234"} When debugging the app I was working on I found some INVALID items that looked like this: {"itemId":"1234", "itemType":"BT_menuItem", "titleText":"Row 1""loadScreenWithItemId":"1234"} Note the missing comma between the "titleText" and the "loadScreenWithItemId" keys. This breaks the entire structure. Not just the menu item itself but the entire BT_config_en.txt file becomes invalid. The joys of well structured data, it is or it isn't, there cannot be a "kind of structured" LOL. Fixing this fixed the app. So how did this happen? There was a problem in the control panel and the way it was formatting the JSON when adding / removing menu items. The test of course was tracking this down. If you added an item without also creating a new screen it worked fine. But, if you added an item and also created a new screen at the same time it didn't format the JSON. If you're having trouble and see any JSON errors in your projects you should remove any menu items and re-create them. Bet it fixes it. Lastly, and this is sometimes fun. Using a tool like JSON Lint .com to validate a JSON structure is useful, especially if you're app isn't behaving like you expect. Copy the past the app's Config Data into that tool, click Validate - it should turn green :-)
 
Calypso Kid
Aspiring developer
Profile
Posts: 780
Reg: Mar 09, 2012
Upstate New Yor...
18,200
like
02/24/18 04:32 PM (6 years ago)
Nice find!! Dave
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.