Posts

Showing posts from April, 2015

Reverting all Xcode settings to default settings

This is the officially recommended way to delta Xcode 5's preferences, type in Terminal.app: defaults delete com . apple . dt . Xcode   That should restore Xcode to the state of its first launch. (for older versions of Xcode the command was defaults delete com.apple.Xcode , i.e. without the dt in the middle).

Creating Custom URL schemes in iOS/iPhone

Image
iPhone apps can also specify their own custom URL scheme (for example, myapp://doStuff). When might you want to use a custom URL scheme for your app? To transfer data from your app to your  another app To allow other apps (or even web pages) to call your app (and send data to it) To handle callbacks for custom authentication (such as OAuth ) and third party API's Implementing a Custom URL Scheme   The first step is to create a custom URL scheme – start by locating and clicking on the project info.plist in the Xcode Project Navigator. With the plist displayed in the right pane, right click on the list and select Add Row : From the list presented scroll down and select URL types .  Select URL Types for the new item. Once that's added, click the grey arrow next to "URL Types" to show "Item 0". Set your URL identifier to a unique string - something like com.yourcompany.yourappname.    After you've set the URL identifier, sele