Consider the following iPhone scenario:
Select Settings->General->Reset->Reset Location & Privacy (just to ensure all warnings are cleared as a preparation to this test)
Open Safari and point to http://maps.google.com
Select OK when ["Safari" would like to use your current location] message appears.
Select OK again when ["https://maps.google.com" would like to use your current location] message appears right after.
So far so good. Now scroll up so you can see the URL box of Safari, and select the reload button (the rounded arrow next to the URL). This will resubmit the form and will cause the message on step 4 to appear again! (at least on my iOS 6, iPhone 5 device)
Any idea why message appears again after I already confirmed "https://maps.google.com" to use my current location? Is this a known issue?
I encountered this issue in my iPhone based app using UIWebView so I decided to check the same scenario using the built-in Safari app. I was very surprised to find out that this happens with Safari app as well...
Any help will be most appreciated.
I believe it's because of 2 different types of geo location firing. First you have the native w3c with the safari request and then the Phonegap call from within the browser. I'm having the same issue.
My problem is that he geolocation in google maps will only once after resetting the location and privacy settings. Figured out that google has set some restrictions in the fine print. Exploring some open source mappi g options right now (Openstreetmap) which will accept my google kml files.
Related
Has anyone noticed that the Simulator in the Actions on Google Console has been updated and it no longer is an accurate simulation of the assistant app on devices?
They added a display tab but it seems to not show all the output. My application often includes 2 chat bubbles in one response and the new simulator only displays one even though the tts for both is heard in the audio.
I have the same problem. Hope they don't remove the ability to add to responses. It would look terrible with only one line.
I have an iPhone 4s with iOS7 that doesn't have the Google Maps app installed on it. Whenever I try to navigate to a location link on it, it flashes an error at me that says:
Cannot Open Page
Safari cannot open the page because the address is invalid
But then the error goes away (without having to hit OK) and the map shows up, and all subsequent Google Maps links load without this error. When I clear my cache, the error shows up again, but only for the first time, and again disappears on its own.
This is the link in question that I am using, but I have tested it with multiple links and the problem seems to be persistent:
https://www.google.com/maps/place/Kraftwork/#39.971494,-75.127336,17z/data=!3m1!4b1!4m2!3m1!1s0x0:0x6db3f86eca2f8b45?hl=en
Any idea what's causing this problem?
To be specific, this problem exists as a result of straight html and just attempting to click a maps link.
I treid to paste to link in the Safari directly and do it programmatically in both iOS 7 and iOS 8 with iPhone 4s, both work for me. Maybe you can try it with iOS 8 simulator with your XCode too.
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: #"https://www.google.com/maps/place/Kraftwork/#39.971494,-75.127336,17z/data=!3m1!4b1!4m2!3m1!1s0x0:0x6db3f86eca2f8b45?hl=en"]];
I hope this may be duplicate question. But none of the answers didn't hard help me. I am trying to open a link from my iOS application. When I press the button, It opens the safari app and it always says an alert "Safari cannot open the page because the address is invalid". Here it is a link looks like the same https://itunes.apple.com/gb/app/app_name/id(appId) .
I don't think it is a good place to post the exact the app link. So the above link is dummy link exactly look like mine. Why the error always happening when I try to open the link. I tried in simulator and also in iPod. Same error occurs. If I try the same link with Safari in MAC OS then it works.
Here it is a code I am using to open the safari from my app with a link.
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"https://itunes.apple.com/gb/app/app_name/id(appId)"]];
I am from India. The above link contains gb. Is that link can only open from Great Britain??
UPDATE:
I have good working network. And I tried one more thing. I opened my safari app in simulator and search my app in google and clicking that link shows the same error. Is that a problem with that link in apple side itself??
Kjuly's answer is 90% correct (and +1 to Kjuly!).
If you look at the at the Appirater code,
and in the .m file that has the function that opens up the app store (it's the "rateApp:" method) I see this bit of code:
+ (void)rateApp {
#if TARGET_IPHONE_SIMULATOR
NSLog(#"APPIRATER NOTE: iTunes App Store is not supported on the iOS simulator. Unable to open App Store page.");
#else
So no matter what you try, you are not going to be able to open the App Store app within the simulator. The App Store app does not exist in the simulator, so that's why you get a "not found" error when your web view attempts to redirect to it. This should work fine on the actual device that has the App Store app installed.
Take a try with this URL:
http://itunes.apple.com/app/<appId>
Note: Replace <appId> with your desire App's ID, e.g. id543028543.
That is a possibility as you are specifying the region to which the app belongs or is hosted on the app store under. Try loading the the url without the region 'gb'.
I was having same problem. Links in email not opening, links to App Store not working and App Store not searching or loading apps. I called Appke support. A reset worked! Go to settings to find how the reset under general. It doesn't delete anything either.
I've extensively searched the web, and everything I've found suggests that I can use 'applicationDidEnterBackground' to detect that a screenshot is about to be taken, hide the relevant controls, and then show them again in 'applicationWillEnterForeground'.
Circumvent screenshot for iOS 4
Unfortunately, I can't seem to get this message to be sent to my app when I take a screenshot on the device. I've even created a brand new template app, and tried that, and they are still not sent.
The only thing I can think of is that I'm running iOS 5.0.1 on my device, and all of the web pages I've found have referred to iOS 4.
Can anyone verify they have it working on iOS 5, and if so, what do I need to do to get it working in my app?
Please help.
The srceenshot talked about in the thread you mentioned is the one used when app is send to the background when the user presses the home button.
It is the screen that the user will see when you start the app when it is already running.
You arre talking about the screenshot when the user is pressing the home and power button are pressed at the same time.
The screenshot with this methods (home + power button) can't be detected by my knowledge.
We're developing an html5 offline webapp for the ipod touch/iphone. We have the manifests and everything working correctly, but we can't figure out why our app will not reopen after the 'tab' in iphone safari is closed.
For example's sake, here's what works:
1) open the url to the offline-enabled html file in safari on the ipod touch
2) exit safari, turn wifi off
3) go back into safari where the dynamic webapp is in a window, hit refresh
4) app works offline!
however, if we do this, the offline app dissapears:
5) add a bookmark to the app's url (or a home screen icon)
6) close the 'tab' or window in safari
7) open the bookmark or the home screen icon
8) error message: "Cannot Open Page: Safari cannot open page because it is not connected to the internet."
I've googled on the issue a bit, and you know how it goes, I'll find the answer 2 seconds after hitting 'post' here.. but anyway my gut feeling is that the current latest iphone OS version of safari is trying to dns lookup on the url and erroring out rather than realizing it has the locally stored app already on the device.
anyone run into this? is there some flag i can set in my manifest or something to fix this?
You probably do not have your server properly configured. The Apple docs do not make this clear.
If your server is running Apache (most likely), you need to edit this file: /user/local/apache2/conf/mime.types
Add this line to the end:
text/cache-manifest manifest
You will need to restart Apache so the settings take effect. Could be something like
restart_apache from the shell.
What's happening here is that the server needs to return the cache file back to you with the proper content type set. If you don't do this, the file will probably come back as 'text'. If set properly, it will come back with a type of 'cache-manifest'.
To test what mime type a document is being returned as, use web-sniffer.net. Enter the url to your manifest file - you will see the result displayed in Content-Type:
Tip: Check that whenever you make changes to the files in the manifest that you change something in the manifest itself to indicate that those files need to be downloaded. And watch out for cached files that might not be checked for changes based on their expiration settings
It seems Safari (and thus the iPhone) expects all files to be listed in the manifest - even the main file of the app. I was using default.asp as the main page of my app and not including this in the manifest. My app was run from mydomain.com/myapp/ and thus the browser never saw the "default.asp". Also, according to the HTML5 spec, the main page need not be in the manifest but apparently Safari sees that a little differently.
My solution was to avoid using default.asp and calling my app app.asp and adding "app.asp" to the manifest. Hope this helps.