Note that there are some explanatory texts on larger screens.

plurals
  1. POopenURL not being called from mail app
    text
    copied!<p>I want to be able to have my app called from the email app when the users selects to open an attachment with a custom URL. It seems that IOS does recognize the registration but still does not call the application delegate to open the URL.</p> <p>I've registered my app to support a custom URL by adding this to info.plist;</p> <pre><code>&lt;key&gt;UTExportedTypeDeclarations&lt;/key&gt; &lt;array&gt; &lt;dict&gt; &lt;key&gt;UTTypeConformsTo&lt;/key&gt; &lt;array&gt; &lt;string&gt;public.plain-text&lt;/string&gt; &lt;string&gt;public.text&lt;/string&gt; &lt;/array&gt; &lt;key&gt;UTTypeDescription&lt;/key&gt; &lt;string&gt;TecNotes Data File&lt;/string&gt; &lt;key&gt;UTTypeIdentifier&lt;/key&gt; &lt;string&gt;com.bringardner.textext&lt;/string&gt; &lt;key&gt;UTTypeTagSpecification&lt;/key&gt; &lt;dict&gt; &lt;key&gt;public.filename-extension&lt;/key&gt; &lt;string&gt;testext&lt;/string&gt; &lt;key&gt;public.mime-type&lt;/key&gt; &lt;string&gt;application/vnd.testext+xml&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;/array&gt; </code></pre> <p>This is the code for the application delegate;</p> <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. if( launchOptions == nil) { NSLog(@"nil options"); } else { NSLog(@"Have options"); NSObject *obj = [launchOptions objectForKey:UIApplicationLaunchOptionsURLKey]; NSLog(@"url? %@",obj); } return YES; } -(BOOL) application:(UIApplication *)application handleOpenURL:(NSURL *)url { NSLog(@"handle %@",url); return YES; } - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { NSLog(@"open %@",url); return YES; } -(BOOL) application:(UIApplication *)application willFinishLaunchingWithOptions:(NSDictionary *)launchOptions { NSLog(@"willFinishLaunchingWithOptions "); return YES; } </code></pre> <p>Prior to adding the entries in info.plist I get the following message from the email app; <img src="https://i.stack.imgur.com/0QETU.png" alt="email error"> After adding entries to info.plist the email application opens a blank page but none of the application delegate methods are called. <img src="https://i.stack.imgur.com/Up9a8.png" alt="After image"> </p> <p>I've seen several similar questions but nothing I've attempted has solved the problem. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload