Code Signing error

This has got to be one of the most frustrating (and desperate?) things while working with xcode. In case you run into the same issue, here are the steps I followed and worked.

1. Close all your stuff except your webpage that should be logged into App Dev center.

2. Open Xcode. Click WINDOW > ORGANIZER. Then click the Devices tab and select “Provisioning Profiles” on the left. That should bring up your provisioning profiles. Highlight and delete all of them. (To have a fresh clean start)

3. In your web browser, go to “iOS PROVISIONING PORTAL”. On the left side, click CERTIFICATES. You are now in the Development tab, and you probably have just one certificate. Then click REVOKE. Click OK to verify that’s what you want to do. Similarly, in the Distribution tab, REVOKE your distribution certificate.

4. Then go through the usual key_chain way to request for new certificates (.cer files). (I am assuming you went through all that already). Then you should have the new certificates installed.

5. With the new certificates, you will need to renew your provisioning profiles. In your browser, click PROVISIONING on the left, then go through both the development and distribution tabs to renew your two provisioning profiles. Then download and install them.

6. Finally, if everything goes well, fire up xcode, then in your target summary code signing section you should be able to see both of your provisioning profiles.


Now you will need to create an archive. Make sure you pick your device not a simulator. Then Product -> Archive. Then go to your organizer, click on archive, and submit your app there.

Xcode keeps freezing?

My xcode version is currently 4.6.1. If after a fresh install, you notice the beach ball keeps coming back while xcode is open, it may be because xcode is trying to do indexing. You can turn that off by issuing the following in a terminal.

defaults write IDEIndexDisable 1

You just need to do it once. The freezing should then stop happening.


AdMob error

I got this mysterious runtime error below while trying to integrate AdMob into my xcode project.

2013-03-21 22:02:32.646 my_app[41152:c07] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[GADObjectPrivate changeState:]: unrecognized selector sent to instance 0x95945e0′
*** First throw call stack:
(0x19a6012 0x1719e7e 0x1a314bd 0x1995bbc 0x199594e 0x217d2 0x2307e 0x20d87 0x90ce 0x6248c3 0x624323 0x632668 0x621b73 0x172d6b0 0x62d7b3 0x62f264 0x62feb8 0x1e7a53f 0x1e8c014 0x1e7c7d5 0x194caf5 0x194bf44 0x194be1b 0x27ae7e3 0x27ae668 0x66165c 0x2cbd 0x2be5)
libc++abi.dylib: terminate called throwing an exception

It turns out there is a flag to be added… argh…

You can read more from this link, or just add the -ObjC flag like the screenshot shows.

Keep pressing on!