How to register a custom app opening URL scheme with Xcode 4?

ios, ipad, iphone, xcode4

Solution

- Open "Supporting Files" (folder) on left and click the "YourAppName-Info.plist"

- Choose a row like "Bundle creator OS Type Code" and mouse over row and click the (+) symbol

- This creates a new row and type "URL types"

- Click the arror to left and see Item 0 and you'll rename the value in Item 0 to "URL Schemes" as shown

- Then edit the field in Item 0 and type in your prototocol; I typed in "goomzee" as shown

Now if I install this app on my simulator, and open Safari and type "goomzee://" in the address bar it will launch my app.

Problem

Xcode4 is asking for a huge number of arguments just to make this simple thing possible: ``` NSString *stringURL = @"twitterriffic://"; NSURL *url = [NSURL URLWithString:stringURL]; [[UIApplication sharedApplication] openURL:url]; ``` What are all these properties for? Why an image? Must I repeat the app identifier here? What role to choose if I want anyone to be able to call this URL to open my app? And what are these Additional url type properties for? I found no Xcode4-related tutorial how to register such an URL scheme with Xcode 4.

Original source

Related problems