Discussion Forums  >  Config Data, JSON, App Refresh

Replies: 4    Views: 150

peterj
Apple Fan
Profile
Posts: 113
Reg: Jun 19, 2011
location unknow...
6,630
10/31/14 05:04 AM (4 years ago)

Xcode debug messages showing old JSON data

The title of this post could also be "app is getting old JSON from somewhere".

I have a couple of "menu with image" screens that I've changed the itemNickname of.

The itemNickname used to be "Videos (With Icon)", and I changed it to "Videos".

The new nickname appears on the screen's page in my BT control panel.

It appears in the Config.txt file.

Also, the app works fine.

However, when I test the app in the Xcode simulator, the debug message shows the OLD nickname.

For example, when I tap on a screen, the console says: "screen of type "menu with image" and itemNickname "Videos (With Icon)"..."

The reason I found this is because I was making some custom code that is based on the itemNickname, and when I found my code wasn't working, I looked in the console and found that for some reason the app is thinking this screen's nickname is this older JSON. That JSON used to exist, but it doesn't anymore.

I searched my entire config.txt file (both in the project and in the control panel); I searched the entire Xcode project, and there is no instance anywhere of "Videos (With Icon)", so I don't know how it could still be getting that. I thought it might be the simulator caching something, so I selected a different device, and still got the problem. I've cleaned the project, and restarted Xcode, the simulator, and my computer.

Anyone ever see their app somehow reference old JSON data?
 
chris1
Code is Art
Profile
Posts: 3860
Reg: Aug 10, 2012
Oklahoma City, ...
50,100
like
10/31/14 06:04 AM (4 years ago)
Have you 'published changes' on the control panel?
 
peterj
Apple Fan
Profile
Posts: 113
Reg: Jun 19, 2011
location unknow...
6,630
like
10/31/14 06:43 AM (4 years ago)
Great question - I actually have that off - meaning the config file is set to "Design" (I didn't know about that new feature when I released this app a year or so ago, so it wasn't set to Live). So there's only one config file, and that config file has no reference to the itemNickname that the app claims to be finding.

The config file says: "itemNickname: Videos".

The app (via console)says: "itemNickname: Videos (With Icon)".

Same itemID.
 
Niraj Shah
buzztouch Evangelist
Profile
Posts: 2937
Reg: Jul 11, 2012
Cerritos
37,870
like
10/31/14 07:04 AM (4 years ago)
Reset the simulator. That will delete all the apps and make it load the app's new build.
 
peterj
Apple Fan
Profile
Posts: 113
Reg: Jun 19, 2011
location unknow...
6,630
like
10/31/14 12:48 PM (4 years ago)
Fixed it. Embarrassing - forgot I was pulling config from Dropbox during testing. Sorry!
 

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.