Updating an Xcode project

Ran into a fun error today.  I am working on updating a iOS app for a client.  I have a project file from the old developer and while the project builds and runs fine its quite messy. Lots of unused classes and assets.  Its also an old project and rather than go and clean everything up I decided I was going to start with a new clean slate and import only the stuff I needed.

So I created a new project and set the bundle identifier to exactly the same as before. Also kept the display name identical.  It compiled fine. But when I ran it on my phone it installed the app but would crash immediately.   I would also see this error pop up.

“Could not change executable permissions on the application.”

Never seen that before and had no idea what it was.  Did some digging and thought it was just the naming of the app. Or the signing cert was wrong.  I made sure it was all the same except one thing… The .xcodeproj file was named different.  I didn’t think that would cause any issues.  But that was it.

The reason I named it different was the old project was named something generic. With a space. And it wasn’t in the bundleID. The bundle identifier was set manually.  So I named the project something new and tried setting the bundle identifier the same way.

So not only does the display name and Bundle identifier need to be the same. The project file needs to be the same also.


Exception breakpoint in Xcode

One of the things that I have been getting hung up on in Xcode is the debugger. It always seems like a bunch of gibberish when an error is thrown.

I have been watching the iTunes-U videos on iOS from Stanford and just watched the video on debugging.  The instructor gave one tip, among others, that turned a light on for me.

Exception breakpoints.  Now I can catch any errors when they occur rather than at the end of the stack. Amazing.

Here is how you can add this sweet little nugget of wisdom.

First open the debug panel on the left.

Then down at the bottom click the plus sign

Now add a new Exception breakpoint.

Then set it to break on all exceptions. 

Now when any error pops up you will be taken to where that error happened rather than main.  That always drove me nuts.

Pool Calculator

Released a new app on iOS. Its a simple pool water calculator. You can enter the values from your test kit and it will tell you the condition of your water.

I made this app to test the whole process. It was something simple enough that I can do quickly and get a feel for submitting a app. This way I can figure out any easy to fix gotchas now before submitting a more complex app.

It wasn’t as bad as I expected but wasn’t easy either. There are a few steps to submit your app.  From getting the certs from Apple to building your app to getting all the necessary  docs ready and finally sending in your app it takes some time.

Then you have to wait for it to be reviewed. For me this was about 6 working days.  Once it was in review the rest was very quick. Maybe two hours later it was on iTunes.

I have some more updates for this app also. I knew this before submitting the first version. I also wanted to test the update process so that will come next.

Anyway if you have a pool and need to know if your water is balanced give my app a try. I would love to hear any feedback or ideas for improvements. Like I said its only the first version and I already have some updates planned.