NimbleKit - fast iOS app development

NKOpenURLInSafari keep goto 127.0.0.1 on mobile device

Problem discussions

NKOpenURLInSafari keep goto 127.0.0.1 on mobile device

Postby waryea » Tue Apr 03, 2012 10:26 am

hi all,

been playing around with nimbitkit this 2 weeks,
currently, what ever i change my code to any url, as follow:

<script>
function goURL(){
NKOpenURLInSafari("http://nimblekit.com");
}
</script>

it just keep opening the link to 127.0.0.1 on both mobile device and iPhone simulator,
can any one please point out how to solve this problem? or what is wrong i am making.

thanks
waryea
 
Posts: 3
Joined: Tue Mar 20, 2012 11:41 am

Re: NKOpenURLInSafari keep goto 127.0.0.1 on mobile device

Postby rouillip » Tue Apr 03, 2012 10:42 pm

NimbleKit Registered user U885740601
User avatar
rouillip
NimbleKit Expert
 
Posts: 267
Joined: Wed Jan 13, 2010 9:38 am
Location: Paris 75018 (France)

Re: NKOpenURLInSafari keep goto 127.0.0.1 on mobile device

Postby waryea » Wed Apr 04, 2012 2:28 am

yea, i can make sure i have try to using all kind of url (including top domain www) to connect to the internet web page, but each time when i or my tester hit on the link, it pop up safari, and the address bar show some text (only show up when the apps launch first time, but it is too fast for reading) then safari redirect to 127.0.0.1.

please help, i already search though the forum and goolged, still no luck on finding any solution. or is there any chance that some other function can pop safari and handle external link?
waryea
 
Posts: 3
Joined: Tue Mar 20, 2012 11:41 am

Re: NKOpenURLInSafari keep goto 127.0.0.1 on mobile device

Postby rouillip » Wed Apr 04, 2012 8:14 am

Sorry, i never use NKOpenToSafari, as when i go to the web i don't like to leave the application with no retrun possibility
I use something like :
-------------------
<html>
<head>
<meta name = "viewport" content = "initial-scale = 1.0, user-scalable = no" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<script type="text/javascript" src="NKit.js"></script>

<link rel="stylesheet" media="all and (orientation:portrait)" href="styles_portrait.css">
<link rel="stylesheet" media="all and (orientation:landscape)" href="styles_landscape.css">

<style>
body {-webkit-text-size-adjust:none;}
</style>

<script>

var navBar = new NKNavigationController();
navBar.setImage('logo.png');
navBar.setTintColor(229,49,56);

</script>

</head>
<body>

<script type="text/javascript" src="NKit.js"></script>
<script type="text/javascript">
function NKIsPageSupportsAutoOrientation()
{return "yes";}

if (NKIsInternetAvailableViaWifi() != "1" && NKIsInternetAvailableViaCellularNetwork() != "1")
{

NKAlert("Error", "Internet Connection is required");
}
else
{
window.location.href='http://www.nimblekit.com';

}

</script>

</body>
</html>
--------------------------------
Hope this could help you
NimbleKit Registered user U885740601
User avatar
rouillip
NimbleKit Expert
 
Posts: 267
Joined: Wed Jan 13, 2010 9:38 am
Location: Paris 75018 (France)


Return to Troubleshooting

Who is online

Users browsing this forum: No registered users and 1 guest