BMI Calculator Example in iOS simulator
Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller
BMI Calculator Example in iOS simulator
I worked through the interactive welcome that shows how to build the BMI Calculator app.
When I try running this in the iOS simulator, I figured out that I have to include the headerBar widget on the Copy Files of the Standalone Application Settings in order for the the title and the clear button to appear at the top of the window.
Similarly, I have to include navbar widget for the navigation bar to appear at the bottom of the screen.
If I enter amounts in the height and weight boxes and then click Calculate BMI, nothing happens even though it works great in LC and in a standalone Mac app.
Also, even though I've included the browser widget in Copy Files, the browser loads nothing in the iOS simulator (works in the Mac standalone) and I verified that Safari works just fine in the simulator.
Any one know why the calculate bmi button doesn't seem to do anything in the iOS simulator? And, why the browser never loads the web page in the simulator?
I'm using LC 8.0.1 Indy and I have XCode 7.3.1 w/ iOS SDK 9.3 installed.
EDIT: The clear button does work, just not the calculate bmi button. I changed this post to reflect this.
When I try running this in the iOS simulator, I figured out that I have to include the headerBar widget on the Copy Files of the Standalone Application Settings in order for the the title and the clear button to appear at the top of the window.
Similarly, I have to include navbar widget for the navigation bar to appear at the bottom of the screen.
If I enter amounts in the height and weight boxes and then click Calculate BMI, nothing happens even though it works great in LC and in a standalone Mac app.
Also, even though I've included the browser widget in Copy Files, the browser loads nothing in the iOS simulator (works in the Mac standalone) and I verified that Safari works just fine in the simulator.
Any one know why the calculate bmi button doesn't seem to do anything in the iOS simulator? And, why the browser never loads the web page in the simulator?
I'm using LC 8.0.1 Indy and I have XCode 7.3.1 w/ iOS SDK 9.3 installed.
EDIT: The clear button does work, just not the calculate bmi button. I changed this post to reflect this.
Re: BMI Calculator Example in iOS simulator
A little more investigation on my part has figured out that events are firing but that any communication with the outside world isn't working. This seems to prevent the browser object from loading a web page and also doesn't allow the getBMI function to get results back via HTTP. Is there some setting I'm missing that will allow and app to communicate via http in the iOS simulator?
-
- VIP Livecode Opensource Backer
- Posts: 5775
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: BMI Calculator Example in iOS simulator
Did you add libURL to the inclusions in standalone settings?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: BMI Calculator Example in iOS simulator
No, and I'm not 100% sure how to do this when building for iOS. Is it as simple as choosing "Internet" in the "Script Libraries" on the General page?Did you add libURL to the inclusions in standalone settings?
-
- VIP Livecode Opensource Backer
- Posts: 5775
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: BMI Calculator Example in iOS simulator
It sounds like you're still using LC 7 or less. If I remember right, simple http calls should work on their own but it can't hurt to turn on Internet in inclusions. I can't recall now if that is necessary; in LC 8.1 it is turned on in the Inclusions pane by default but if it isn't, do that. You might also try moving to LC 8.x and see if that works out better.
Another thing to test is whether the app works on a real device rather than the simulator. The simulator has its own set of quirks.
Another thing to test is whether the app works on a real device rather than the simulator. The simulator has its own set of quirks.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Posts: 135
- Joined: Thu Sep 13, 2012 10:25 pm
Re: BMI Calculator Example in iOS simulator
You might also want to check the "Settings" app while running the simulator. There's an option (sorry, I don't remember where just now) that asks whether or not you want the simulator to have network connectivity (or something like that). In the past, checking that option has been a big help.
Peace.
Joel
Peace.
Joel