Scoobing
Lost but trying
Profile
Posts: 19
Reg: Jun 18, 2013
Manchester, UK
6,590
06/27/13 07:38 AM (12 years ago)

New added screen not working.

Using a simple menu, with one row (Custom HTML) and all works fine. Added a new screen (Location map) added a row to the menu, Filled out map screen GPS co-ords (Lat and Long). When map row is selected I get a blank screen with a blank top navigation bar. No Back button and no Refresh button. Checked Configuration file, seems ok. Tried deleting BT_Config.txt in Xcode and replacing it with a copy from Buzztouch, still blank. Lastly I closed down Xcode and simulator. From Buzztouch I downloaded my project zip file, loaded it into Xcode and copied those folders in there too. Run, It all works fine. So, Everything was OK with my screens etc. Everything must have been defined correctly in Buzztouch for this to work so why wasn't my configuration data being passed to Xcode properly? Being new to all this I naturally thought I had done something wrong or not filled in a field definition. Hope one of you Guru chaps can shed some light on this. Barry in Manchester, UK Mac, 3.2Gz, Intel Core i5, 8GB Ram, OS X 10.8.4 Xcode Version 4.6.3 (4H1503), iOS Apps.
 
SGB
Android Fan
Profile
Posts: 56
Reg: Mar 26, 2013
Goes
1,160
like
06/27/13 07:56 AM (12 years ago)
Is it possible that the location map plugin wasn't available in your project file in Xcode. If you had an old version of your code from BT without the plugin, it will not work. Even though you made a new screen in BT with the locationmap plugin, it needs to be in your poject file in Xcode to work.
 
Scoobing
Lost but trying
Profile
Posts: 19
Reg: Jun 18, 2013
Manchester, UK
6,590
like
06/27/13 08:06 AM (12 years ago)
The map plugin was there. In fact I loaded it from BT control panel. What really fools me is that running it in the simulator and it not working then loading it into Xcode afresh from a new download and it works. This tells me that everything I needed was there and defined correctly in BT. Very strange. Thanks for your suggestion, it's good to know that people read these things and offer help. Barry
 
Scoobing
Lost but trying
Profile
Posts: 19
Reg: Jun 18, 2013
Manchester, UK
6,590
like
06/27/13 08:28 AM (12 years ago)
On reading about how BT updates the Xcode simulation it appears that when you load your project into Xcode for the first time and run it you get what you designed. It reads the config file and all is well. Then you make some changes in the BT control panel and when you refresh the simulator, Xcode reads the original config file then checks to see if a newer config file exists in BT. If it finds a newer config file it uses that one. This change of config file doesn't seem to show in the Xcode project folders list. The old config file is still listed but Xcode uses the newer one. This seems to generally work fine so I am wondering if something is stopping Xcode from checking if there is a newer config file. This can't be right because from what I have read Xcode will use the old config file if it can't find a newer one. Please could someone set me straight about this.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
06/27/13 11:44 AM (12 years ago)
Did you actually drag all the folders you downloaded, including the BT_Plugins folder, into Xcode? They are not automatically included when you double-click the project file to open it in Xcode. Also...if you are running this in the simulator, check the Debug Console to see what sort of errors there may be with respect to the refresh. You correctly understand the concept of how it's supposed to work. Mark
 
Scoobing
Lost but trying
Profile
Posts: 19
Reg: Jun 18, 2013
Manchester, UK
6,590
like
06/27/13 01:33 PM (12 years ago)
Hi @GoNorthWest, Thanks for replying. Yes, all five folders mentioned in the downloaded zipped project information.pdf were dropped into the left pane of Xcode. Just run it again in the simulator and there are no debug console lines saying error. The only line that might cause concern is this one... 2013-06-27 21:21:16.424 scoobing01[38909:c07] Application tried to push a nil view controller on target <MFMessageComposeViewController: 0xba08a90>. This doesn't sound like an error, more like a failed operation which is what I am getting. i.e. defining a screen associated with a row on the simple menu that produces nothing but a blank screen instead of producing an SMS message screen.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
06/27/13 02:14 PM (12 years ago)
In the control panel for your simple menu, you say the first menu item is linked to a Custom HTML screen, and that it works. I don't see anywhere where you say you linked the second menu item to the Location Map screen. Have you done that? Mark
 
Scoobing
Lost but trying
Profile
Posts: 19
Reg: Jun 18, 2013
Manchester, UK
6,590
like
06/27/13 02:24 PM (12 years ago)
Yes. Second sentence down "(Location map) added a row to the menu".
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
06/27/13 02:27 PM (12 years ago)
OK, one thing eliminated! When you hit the refresh button in your app in the simulator, it should go out and look to see if there is an updated config file, and then download it and use if it there is. All that will be recorded in the Debug Console. Can you (1) clear the debug console and then (2) request a refresh via the app and check out the console to make sure it's actually going out to grab the new config file?
 
Scoobing
Lost but trying
Profile
Posts: 19
Reg: Jun 18, 2013
Manchester, UK
6,590
like
06/28/13 12:56 AM (12 years ago)
2013-06-28 08:40:21.186 scoobing01[39235:c07] scoobing01_appDelegate: downloadFileStarted: starting download... 2013-06-28 08:40:21.564 scoobing01[39235:c07] BT_fileManager: saveTextFileToCacheWithEncoding: cachedAppConfig.txt encodingFlag: -1 2013-06-28 08:40:21.565 scoobing01[39235:c07] scoobing01_appDelegate: downloadFileCompleted Yep it's going out and downloading the config.txt file. although thinking about it. It must be getting the new file otherwise how would I know that the new screen wasn't working. If the new screen didn't appear at all then downloading could be suspect. But the screen is there, so Xcode did download. That only seems to leaves the simulator, I wonder if BT have checked out their code compatability with the latest Xcode 4.3.6 I hope you don't mind the manner of my posts. I am not challenging your replies at all, they are very welcome. I don't want to be one of those who just asks a question and waits for an answer. I like to try and think the problem through and bouncing possible solutions with you has been a good help. Barry
 
Scoobing
Lost but trying
Profile
Posts: 19
Reg: Jun 18, 2013
Manchester, UK
6,590
like
06/28/13 04:01 AM (12 years ago)
The missing screen. I have just found a possible answer to this. I opened the downloaded zip file and looked in the BT_plugins folder and found that the missing screen plugin was not there. My simple menu, custom HTML and map plugins were but not the SMS message screen. That's why the SMS screen is missing from the simulation. The plugin is missing. The config file says… {"itemId":"63DEDE881749E6AD37A4D44", "itemType":"BT_sendSms", "itemNickname":"Message me", "textToNumber":"07834222696", "textMessage":"A question about your app...", "loginRequired":"0"} So BT knows about the message screen and the config file knows about the message screen It is just not being passed to Xcode.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
06/28/13 09:49 AM (12 years ago)
Hi Barry, You're not being challenging at all...it's all good! At least you're giving it a shot at debug, which is more than a lot of others do! Re the missing screen, that could be the issue. If you added the screen to your project AFTER you downloaded the source, and hadn't included that screen plugin in the download initially, it for sure won't work. You'd need to download the source again after adding any new screen where the plugin doesn't already exist. Make sense? You can easily check the BT_Plugins folder to see if it's there. They're pretty well labeled. Mark
 
Scoobing
Lost but trying
Profile
Posts: 19
Reg: Jun 18, 2013
Manchester, UK
6,590
like
06/28/13 10:33 AM (12 years ago)
Acting on what you say above I started a new project from fresh. One simple menu screen with one row and that row... "BT_screens":[{"itemId":"3BB6A0588FCCA9FF60A7AF8", "itemType":"BT_screen_menuListSimple", "itemNickname":"Home Screen Menu", "navBarTitleText":"Home", "childItems": when pressed called an SMS message screen... [{"itemId":"B84F14834C27C4B46BEC8E2", "itemType":"BT_menuItem", "loadScreenWithItemId":"8EE800BFD41EFFBC794165B","titleText":"Message SMS"}]}, {"itemId":"8EE800BFD41EFFBC794165B", "itemType":"BT_sendSms", "itemNickname":"Message SMS", "textToNumber":"07734342696", "textMessage":"My question about your app...", "loginRequired":"0"} Double checked to make sure both screens were defined correctly. Downloaded the zip file, and what do you know, in the BT_plugins folder, only one plugin, the simple menu one. NO BT_sendSms plugin. Just like you said, if the plugin isn't there it's not going to work. All we need now is to find why BT is not including the BT_sendSms plugin in the zip file. Do you think I need to contact BT staff about this or will I need more evidence.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
06/28/13 10:37 AM (12 years ago)
Before you downloaded the project, did you verify that the BT_sendSms plugin was selected for download as well? There's a portion of the download screen that lets you select all the plugins you want/need. If you have that screen added to your control panel, it should select that plugin for download by default. If it's not, that's a bug, and I can notify the team. This document explains what I'm talking about: https://www.buzztouch.com/files/howtos/How_To_Download_Your_buzztouch_Project.pdf Mark
 
Scoobing
Lost but trying
Profile
Posts: 19
Reg: Jun 18, 2013
Manchester, UK
6,590
like
06/28/13 11:04 AM (12 years ago)
Done as you said. On the plugin selection screen it said 2 plugins required. Two were already checked (the correct two as well). I noticed that in the full description of the BT_sendSMS plugin by David, the last rev was in 2012 to sort out error messages in Xcode 4.5. I am running Xcode 4.6.3. Do you think David might need to look at his code again? I am getting that prickly feeling in the back of my neck. The kind David (Old Testament) had as he was about to slay Goliath.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
06/28/13 11:07 AM (12 years ago)
OK, sounds like a bug then. It should be included. Let me verify, then I'll get David's ear and we'll get it taken care of. Mark
 
Scoobing
Lost but trying
Profile
Posts: 19
Reg: Jun 18, 2013
Manchester, UK
6,590
like
06/28/13 11:19 AM (12 years ago)
Thanks Mark, you really have been a gem of a helper with this. I'll wait to hear from you later. Barry
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
06/28/13 12:30 PM (12 years ago)
This may be working as designed. I created a test app, added the same two screens as you did, and got the same results. Made sure both plugins were selected during project download. No SMS plugin. So, I went to the Plugins page and read up on it. Here's what it says for iOS: iOS ----------------- [BT_viewController handleTapToLoadScreen] fires the [BT_viewControllerManager sendTextMessageWithScreenData] method. Not all iOS devices can send SMS messages, including most simulators. I was unsure if this meant that it calls the method from another file, so I downloaded the self-hosted version of the plugin. No specific .m or .h files there either. So, I think it's all good from a download perspective. If you are testing this from a simulator, then I suspect the "Not all iOS devices can send SMS messages, including most simulators" message is probably the culprit. Have you tried this on a real device yet? Mark
 
Scoobing
Lost but trying
Profile
Posts: 19
Reg: Jun 18, 2013
Manchester, UK
6,590
like
06/28/13 12:39 PM (12 years ago)
Not on a real device. Yet when you see David's picture of this it shows a small blue window saying that SMS can't be run on this simulator. Our test of this plugin doesn't show this. In fact it doesn't even fill in the nav bar at the top. Thinking about it the comment re not all phones can send SMS. BT doesn't know what phone the end user of the app will be using so how can it decide wether to add the plugin or not. It should add the plugin if used and leave it to the device to use it if able. I still think its a bug.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
06/28/13 12:43 PM (12 years ago)
The plugin is actually part of the BT_viewController and BT_viewControllerManager files, which are in the BT_Layout folder. That's the point I was trying to get across. It's not a "standard" plugin like the rest, that have their own .m and .h files. Changes have been made to the code to deal with evolving iOS since that screenshot was created. I would suggest trying it on a real device and see if it works. Lots of people use this feature, and to the best of my knowledge, nobody has reported that it doesn't work on an actual device. Do you have the ability to test on a device? Mark
 
Scoobing
Lost but trying
Profile
Posts: 19
Reg: Jun 18, 2013
Manchester, UK
6,590
like
06/28/13 12:55 PM (12 years ago)
No, I am not able to do this. Maybe I'll never know. It seems so strange that I can add a screen and not see it in the simulator even if it won't actually send SMS. The email plugin lets you see how it looks.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
06/28/13 12:57 PM (12 years ago)
Lots of weird caveats when using a simulator for sure. Simulators are great for getting a general idea on how something works, but every app for should be tested thoroughly on a real device when possible. I'll try and load this test app into my phone and verify that it works. I'll report back to you later! Mark
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
06/28/13 04:48 PM (12 years ago)
Just tried your exact configuration above - simple menu linked to an SMS screen - and it works exactly as expected! I'd chalk this up to a simulator issue. Mark
 
Scoobing
Lost but trying
Profile
Posts: 19
Reg: Jun 18, 2013
Manchester, UK
6,590
like
06/29/13 12:08 AM (12 years ago)
Well we got there in the end. Simulator issue as you say. Really enjoyed tracking this down and learned a lot along the way. Thanks Mark. Barry
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
06/29/13 12:09 AM (12 years ago)
Yep! I always enjoy a good debug session, especially when I walk away knowing something I didn't know before. Don't hesitate to start a new thread for any other issues you might come across! Mark
 

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.