IOS URL Schemes

Source: Internet
Author: User
<span id="Label3"></p><p><p>To add a URL schemes step:</p></p><p><p>1. Open the Info.plist file.</p></p><p><p>2. Click the "+" sign to add, or click the right mouse button on the list to select Add Row.</p></p><p><p>3. Select URL types.</p></p><p><p>4. Click the triangle to expand, locate the URL identifier, and add COM to its right. your company Name. Project Name.</p></p><p><p>5. In "item 0" click on "+" sign add, select URL schemes.</p></p><p><p>6. Add a character (any) to the right of the URL Schemes.</p></p><p><p>7. Right-click on plist and select Show Raw keys/values to see the Effect.</p></p><p><p>8. Verify that the bundle ID that calls your app is legitimate and add code in Appdelegate:</p></p><pre>-(BOOL) application: (uiapplication *) application openURL: (nsurl *<span style="color: #000000;"><span style="color: #000000;">) URL sourceapplication: (nsstring</span></span>*) sourceapplication annotation: (<span style="color: #0000ff;"><span style="color: #0000ff;">ID</span></span><span style="color: #000000;"><span style="color: #000000;">) Annotation {</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">if</span></span>([sourceapplication isequaltostring:<span style="color: #800000;"><span style="color: #800000;">@"</span></span><span style="color: #800000;"><span style="color: #800000;">COM.FDS.DC</span></span><span style="color: #800000;"><span style="color: #800000;">"</span></span><span style="color: #000000;"><span style="color: #000000;">]) {NSLog (</span></span><span style="color: #800000;"><span style="color: #800000;">@"</span></span><span style="color: #800000;"><span style="color: #800000;">calling application Bundle ID:%@</span></span><span style="color: #800000;"><span style="color: #800000;">"</span></span><span style="color: #000000;"><span style="color: #000000;">, sourceapplication); NSLog (</span></span><span style="color: #800000;"><span style="color: #800000;">@"</span></span><span style="color: #800000;"><span style="color: #800000;">URL scheme:%@</span></span><span style="color: #800000;"><span style="color: #800000;">"</span></span><span style="color: #000000;"><span style="color: #000000;">, [url scheme]); NSLog (</span></span><span style="color: #800000;"><span style="color: #800000;">@"</span></span><span style="color: #800000;"><span style="color: #800000;">URL query:%@</span></span><span style="color: #800000;"><span style="color: #800000;">"</span></span><span style="color: #000000;"><span style="color: #000000;">, [url query]); </span></span><span style="color: #0000ff;"><span style="color: #0000ff;">return</span></span><span style="color: #000000;"><span style="color: #000000;">YES; } </span></span><span style="color: #0000ff;"><span style="color: #0000ff;">Else</span></span><span style="color: #000000;"><span style="color: #000000;"> { </span></span><span style="color: #0000ff;"><span style="color: #0000ff;">return</span></span><span style="color: #000000;"><span style="color: #000000;">NO; }} </span></span></pre><p><p></p></p><p><p>IOS URL Schemes</p></p></span>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.