开发者

iOS: How to Have an Application Launched with [UIApplication sharedApplication] from My App Return Control Back To My App

开发者 https://www.devze.com 2023-02-16 05:25 出处:网络
Right now I\'m able to launch something like the mail app 开发者_开发百科with this call: NSURL* mailURL = [NSURL URLWithString: @\"emailAddress@example.com?cc=&subject=Feedback\"];

Right now I'm able to launch something like the mail app 开发者_开发百科with this call:

NSURL* mailURL = [NSURL URLWithString: @"emailAddress@example.com?cc=&subject=Feedback"];
        [[UIApplication sharedApplication] openURL: mailURL];

However, what I'd like is for mail to return control back to my app automatically once the user finishes sending an email. Is this possible?


This is not possible at the moment.

There has been a bit of an effort to try and get apps to accept a url callback parameter that would indicate which app control should be returned to.

See http://x-callback-url.com/

The goal of the x-callback-url specification is to provide a standardized means for iOS developers to expose and document the methods they make available to other apps. Using x-callback-url’s source apps can launch other apps passing data and context information, and also provide parameters instructing the target app to return data and control back to the source app after executing an action. Specific supported actions will be dependent on the individual apps and will not be discussed in the specification.

but obviously without an 'official' solution you'd never get control back from mail.app.


I've written up the various strategies for integrating iOS applications in some detail today. It sounds like MFMailComposeView is all you need, but in case anyone else comes to read this question on more general integration grounds: http://blog.codiform.com/2011/04/integrating-applications-in-ios-and-x.html

X-callback-url is definitely the promising (but relatively new) entrant to the return-to-caller model you'd otherwise need.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号