openurl

ios app hits straight shouldstartloadwithrequest after coming from background instead

心已入冬 提交于 2019-12-12 01:32:38
问题 I have a webview in my mainviewcontroller and i am laoding a webpage in viewdidload method as below: - (void)viewDidLoad { [super viewDidLoad]; NSURLRequest *requestObj = [NSURLRequest requestWithURL:url]; [_loginWebView loadRequest:requestObj]; } and in the shouldstartloadwithrequest method, i check if the url contains "itunes" and i have the following code for it: - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType

How to detect a call made using openUrl() is ended in ios

回眸只為那壹抹淺笑 提交于 2019-12-11 17:56:50
问题 In my application, there is an option to make a call when the user taps a phone number. I'm implementing this as shown below: if let url = URL(string:"tel://\(String(describing: Util.checkForNullString(contactNo)))"), UIApplication.shared.canOpenURL(url){ if #available(iOS 10, *) { UIApplication.shared.open(url) } else { UIApplication.shared.openURL(url) } } I want to do another action soon after the user finishes the call. But how to get notified when the call is finished ? 来源: https:/

Xcode openURL doesn't read link

China☆狼群 提交于 2019-12-11 17:32:17
问题 I have an animal list and special button. When I press the button, I would like to go to Wikipedia and read about this animal more. So I wrote this code: -(IBAction)goWiki:(id)sender { NSString *wikiUrl = "http://ru.wikipedia.org/wiki/"; NSString *url = [NSString stringWithFormat:@"%@%@",wikiUrl,animalTitle]; [[UIApplication sharedApplication]openURL:[NSURL URLWithString:url]]; NSLog(@"%@",url); } NSLog shows that url was written correctly, however, nothing happened. I am 99,9% sure its

Open a local html file with url params through applescript

时光怂恿深爱的人放手 提交于 2019-12-11 08:47:47
问题 I need some help with a very simple applescript. I need it to open a local URL on mac with a url parameter. set str to "open -a 'Firefox' file:///Users/bob/Desktop/someFolder/index.html?val=28" do shell script str I can't find a way to get the webpage to open with the parameters, it always just opens the .html. Can someone help? Thanks 回答1: You may want to use Safari, which is scriptable: tell application "Safari" make new document with properties {URL:"http://stackoverflow.com/questions

End call, don't return to app automatic in iphone 3.1 version

隐身守侯 提交于 2019-12-11 08:37:55
问题 my app use openURL to have a call, but when I end call, it will not return to my app automatic in iphone 3.1 Anyone know that?It's a bug of iphone 3.1? Thank you very much! 回答1: It's not a bug, it's how it works. Once you use openURL to transfer control to another app such as the Phone, SMS, Mail or Safari, your app is closed and control transferred to the app you specified in your URL. When the user is done with the app you invoked, closing it will not reopen your application. You may modify

Unity send SMS message

℡╲_俬逩灬. 提交于 2019-12-10 18:52:03
问题 I'm currently using Unity for developing an application for Android and IOS and I'm able to use the function: Application.OpenURL("mailto:" + email_address + "?subject=Email&body=msg from Unity"); to send emails from within my application, and I know you can use a similar function to open up the mobile devices SMS system however I'm unsure on how to actually go about this. If anyone can please advise how I can open up the native SMS system through "Application.OpenURL()" that'd be fantastic.

UIApplication's openURL Crashes My App

…衆ロ難τιáo~ 提交于 2019-12-10 15:37:53
问题 I'm using UIApplication's openURL: method to open a website in Safari. When the user came back to the app (fast switching), it relaunched. It means that my app was quit instead of going to the background. Does anyone have the same issue? Any ideas? Thank you in advance. 回答1: It may be possible that you need to retain the URL object. That was once the issue for me 回答2: make sure that you are using - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *

Unable to search in iTunes Store on iOS8

给你一囗甜甜゛ 提交于 2019-12-08 10:00:51
问题 I'm using this code to open iTunes Store app and search for specific music: NSString *iTunesLink = [NSString stringWithFormat:@"http://search.itunes.apple.com/WebObjects/MZSearch.woa/wa/search?entity=album&media=all&page=1&restrict=true&startIndex=0&term=TERM_NAME"]; NSURL *url = [NSURL URLWithString:iTunesLink]; [[UIApplication sharedApplication] openURL:url]; Code works fine on iOS7, by changing TERM_NAME value I can search whatever I want. The issue on iOS8 is that somehow search term is

Is it possible to go back automatically into the application after calling a Number?

半世苍凉 提交于 2019-12-08 06:15:04
问题 In my application I have some phone numbers, so that the users can call the numbers. When the users tap the numbers it push them out of the application to call the number they tapped. What I want is that the application should get the users back to the application after that the conversation is finished. In Mailing mode you can use MFMailComposeController , and then switch back to the previous view. So When you use the MFMailComposeController You never get out of the application. public

How to dynamically change the openURL implementation in my app?

倖福魔咒の 提交于 2019-12-08 01:37:06
问题 In my app, I have implemented a private method in my AppDelegate to override the default openURL: method in order to open links inside my app within UIWebView . But now I need the default functionalities in place too. Here's what I did: @implementation UIApplication (Private) - (BOOL)customOpenURL:(NSURL*)url { AppDelegate *MyWatcher = (AppDelegate *)[[UIApplication sharedApplication] delegate]; if (MyWatcher.currentViewController) { [MyWatcher.currentViewController handleURL:url]; return YES