openurl

UIApplication openURL background

夙愿已清 提交于 2019-12-17 16:29:08
问题 In my iOS 4 application, I need to open a URL from the background, at a time specified from the user. However, for some reason, I cannot launch a URL from the background for some reason. Here is my code for opening a URL: if (![[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.stackoverflow.com"]]) { // the URL wasn't opened. we will ignore this for now. } That code is all being launched from a daemon thread created earlier. I have tested this code on the simulator,

How to use openURL for making a phone call in Swift?

家住魔仙堡 提交于 2019-12-17 07:23:59
问题 I have converted the code for making a phone call from Objective-C to Swift, but in Objective-C, we can set the type of the URL that we like to open (e.g. telephone, SMS, web) like this: @"tel:xx" @"mailto:info@example.es" @"http://stackoverflow.com" @"sms:768number" The code in Swift is: UIApplication.sharedApplication().openURL(NSURL(string : "9809088798") I read that have not released any scheme parameter for tel: , but I don't know if Swift can detect if the string is for making a phone

Prompt when trying to dial a phone number using tel:// scheme on iOS 10.3

断了今生、忘了曾经 提交于 2019-12-17 06:11:24
问题 After updating to 10.3, my app no longer automatically dials a phone number after pressing the call button in my app using the openURL: options: completionHandler: method. Instead, a prompt comes up every time to confirm the user's intentions. As per the Apple Documentation: The tel URL scheme is used to launch the Phone app on iOS devices and initiate dialing of the specified phone number. When a user taps a telephone link in a webpage, iOS displays an alert asking if the user really wants

Refresh Safari page with openURL:?

依然范特西╮ 提交于 2019-12-12 12:58:55
问题 I am opening a web page in Safari using openURL: method, but if that page is already open in Safari and I call openURL: , iOS display the already opened page. It should refresh or should get open in new tab. Is it possible? 回答1: I don't think there's a way to do that. A possible easy solution, if you can, is implement a SFSafariViewController and open your URL within the app. At this stage you can control it like a UIWebView. Plus you have a better UX! - (void)openLink:(NSString *)url { NSURL

QDesktopServices::openUrl with selecting specified file in explorer

独自空忆成欢 提交于 2019-12-12 09:41:31
问题 In most coding programs, you can right click on the item and click show in explorer and it shows the file in explorer with the item selected. How would you do that in Qt with QDesktopServices? (or any way to do it in QT) 回答1: you can use this method to select file on Windows or MacOS ,if you want select on linux you can find a way in QtCreator sources. void select(const QString& path){ #if defined(Q_OS_WIN) const QString explorer = "explorer"; QStringList param; if (!QFileInfo(path).isDir())

Possible to open iPhone Safari and target a specific window?

邮差的信 提交于 2019-12-12 09:24:02
问题 I have an app that uses OAuth to authenticate, which means the user must be directed to the website to authorize the application. I prefer to make it obvious to the user that they are using a standard browser to authorize at the original site rather than just using a web view to show the content within my app. However, every time they are directed to Safari (via openURL), it launches a new Safari window and once Safari has 8 windows open, it simply fails to work at all. I'm wondering if there

Send authentication token to Safari from iOS App to Safari

丶灬走出姿态 提交于 2019-12-12 09:01:22
问题 I have some URLs in my app which takes the user to Safari browser through openURL API. My aim is to sent the auth token to Safari from the app, so that user will be logged in by using this token. Our server requires this ticket to be sent as part of header information. Is there any possibility to sent custom headers along with NSURL ? I have checked the below link which talks about query components but the server doesn't handle it, they prefer a different solution. Android is having some

How to get Source URL from -(bool) application openURL?

对着背影说爱祢 提交于 2019-12-12 06:22:16
问题 I have an app that opens a PDF from an HTTP url using -(BOOL)application:openURL: . So I go to Safari, open PDF in Safari, and then use [Open in "MyAPP"] I want to save the URL, so that when the user closes the app and opens it again, the PDF can be opened up again. -(BOOL)application:(UIApplication *)application openURL:(NSURL *)url { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; // to store [defaults setObject:[url absoluteString] forKey:@"LastPDFURL"]; [defaults

How to open default music app into my application

偶尔善良 提交于 2019-12-12 06:12:10
问题 In my app I need to open message app and music app in tapping on button. For open message I used code: [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"sms:"]]; Please, suggest me what should I write to open music app. Any help would be appreciated. Thanks. 回答1: The URL scheme for Music app is music:// . 来源: https://stackoverflow.com/questions/29207883/how-to-open-default-music-app-into-my-application

canOpenUrl fail “org-appextension-feature-password-management” (PayPal)

天大地大妈咪最大 提交于 2019-12-12 04:43:44
问题 PayPal payment not working as I get failure on opening a URL -canOpenURL: failed for URL: "org-appextension-feature-password-management://" - error: "(null)" In accordance with the documentation I added org-appextension-feature-password-management to my info.plist, but I still get the below error. Ideas what I might have overlooked? 回答1: Seems to be a bug in PayPal SDK. The error only occurs in the PayPalEnvironmentNoNetwork setting . When you switch over to PayPalEnvironmentSandbox or