Xcode Archives

How to fix “No unexpired provisioning profiles found that contain any of the keychain’s signing certificates” in Xcode 4

I understand there can be many reasons for this error message. Xcode needs a distribution profile with the same Bundle Identifier as the app. Even though this seemed to have worked in the past, Xcode 4.6.3 has gotten more pernickety as of late. Let’s fix this. Provisioning Portal Head over to the Apple Provisioning Portal […]

How to define Preprocessor Macros in Xcode

I’ve often wondered how to use those efficiently, and I’ve just found out how to do it. As always, they’re not difficult to implement – but not documented in a way that simple folk like me can understand it. Be that as it may… Preprocessor Macros can be useful if you’d like to compile two […]

What is an Exception Breakpoint

Sometimes Xcode just throws an error message that isn’t very helpful. That’s usually when we have to try and figure out why something didn’t go the way we expected it. Other times however, Xcode tells us very clearly which element it isn’t happy with – we fix it and our app progresses. Why can’t it […]

Hilarious Xcode Error Message

Xcode_iconI’ve been working on an iOS App recently which deals with several date methods. Usually when something goes wrong Xcode displays very dry messages such as “Array out of bounds” or something rather unhelpful (like the complete stack output with no clue as to what actually went wrong).

I was accidentally passing nil into an NSDateComponents method – and instead of crashing (which is what I would have expected), Xcode displayed this super funny message in the log console:

[__NSCFCalendar components:fromDate:toDate:options:]:

toDate cannot be nil

I mean really, what do you think that operation is supposed to mean with a nil toDate?

An exception has been avoided for now. A few of these errors are going to be reported with this complaint, then further violations will simply silently do whatever random thing results from the nil.

It made me smile 🙂

Read more

How to fix “this class is not key value coding-compliant” after accidentally adding an IBOutlet instead of an IBAction

It has happened to us all: you’re in a storyboard, you’re using the Assistant Editor, you want to control-drag from a button into your code and create an action. But sadly you forget to select “Action” from the drop down menu and instead create an outlet. No biggie you think, deleting the outlet code. You […]

When Xcode 4.5 suddenly stops running your app on a device (could not launch app)

I’ve had this problem that Xcode 4.5 would run my app fine in the simulator, but didn’t do so anymore on the device. Something about the “derived data folder was not found”. I checked, it was definitely there. Then I found this post on Stackoverflow to show some suggestions: http://stackoverflow.com/questions/11456312/xcode-suddenly-stopped-running-project-on-hardware-could-not-launch-xxx-app This solution worked for me […]

How to use Xcode with a remote Git server

Xcode_iconImagine you’ve created a project in Xcode with a local Git repository. Now you’d like to put this online so that others can collaborate with you. How do you do that?

This has been puzzling me for a while, and there doesn’t seem to be a clear documentation on this subject – so I’ve decided to take some notes as I figured it out. Here are step by step instructions on how to make it work.

All we need is a server running Git and SSH credentials to that server to get started.

Read more