Categories
ErrorFix Mac

Xcode Can’t Ignore UserInterfaceState.xcuserstate

Running version control in Xcode can give some troubles when setting up in an existing project. Having an existing project added to a new Git repository the Xcode keep saying UserInterfaceState.xcuserstate has changes. The working copy “helloworld” has uncommitted changes. Commit or discard the changes and try again. Committing the changes doesn’t help as it keep […]

Categories
Mac Tips and Tricks

DerivedData for Xcode 4.5

When updating Xcode to 4.5 the DerivedData has disappear it seems. Though it has just been moved to another location. Now it’s at: ~/Library/Developer/Xcode/DerivedData/— You can find the location in Xcode 4.5 by looking at Preferences->Location. This shows where your Derived Data location actually is on the File System.

Categories
Mac Tips and Tricks

Xcode Toggle between header and main file

The shortcuts has changed a bit in each Xcode. In Xcode 4.0 and up the shortcut for toggling between your main and header files are, the .h and .m files: Ctrl + Cmd + [arrow up or down]

Categories
Mac

Xcode Could Not Launch App No Such File Or Directory Error

Developing in Xcode can give a lot of different errors. Here’s yet another one: Could not launch app – No such file or directory. Then a path to Users/App/Library/Developer/Xcode/DerivedData/etc… Running into this problem on multiple occasions there have been two solutions depending on the situation. First issue is right during publishing and the scheme is set […]

Categories
Mac Tips and Tricks

Xcode Use Image On UINavigationbar

You can set an image to the UINavigationbar in Xcode for iPhone like this: UINavigationBar *navBar = [[self navigationController] navigationBar]; UIImage *backgroundImage = [UIImage imageNamed:@”nav-bar-background-normal”]; [navBar setBackgroundImage:backgroundImage forBarMetrics:UIBarMetricsDefault]; Works from iOS 5 and up.

Categories
ErrorFix Mac

Xcode background-568h@2x.png Not Working

background-568h@2x.png does not work! This is intended, sadly. It’s worth noting that [UIImage imageNamed:@”background.png”] will still only load either “background.png” or “background@2x.png”, it will not load “background-568h@2x.png” if it exists. To get a background use a proper size for iPhone 5, the infamous 1136×640 you have to change is programmatically. Do this at runtime: CGRect screenBounds […]

Categories
Mac Tips and Tricks

Xcode Develop Apps For iPhone 5 Screen Resolution

Developing for iPhone 5 screen resolution isn’t very obvious and there is (for now) no good official documentation about how to be compatible with the new 1136×640 size. There are a few steps to take before you are iPhone 5 compatible. First Download and install Xcode 4.5. Set a 4-inch launch image for your app. To adapt your app to the new […]

Categories
Mac Tips and Tricks

Xcode Create Git Repository From Existing Project

Creating git repository for you existing xcode project can be done as follow: Use the cdcommand to switch to your project directory, making it the current working directory. Enter git init to create an empty repository. Enter git add . to copy your project files into the repository. Enter git commit -m “Initial commit”to commit all the files. For more details […]

Categories
Mac Tips and Tricks

Xcode Create SVN Repository From Existing Project

Creating repository for your xcode project can be a pain if you didn’t do it when you first created the project. It is possible with some command-line commands. The steps are as follow: Use the mkdircommand to create a directory with three subdirectories named branches,tags, and trunk to hold a temporary copy of your project. Copy the project directory […]

Categories
Mac Tips and Tricks

Xcode Add iPhone 5 Dimension?

If you want to add iPhone 5 dimension remember to update to the newest iOS 6 sdk. When you compile you might run into this error first, Xcode Missing Retina 4 Launch Image. To enable your apps to work with iPhone 5, you need to add a retina version of the launcher image. It should be […]