Posts Tagged Xcode 5

Unit and system testing

I’ve been way behind the curve with looking into whether I should be going down the unit test approach.

I’ve finally started looking into what approach to use for testing during the process of development for MovingImages that will work best.

My first efforts at finding out about using test driven development and Xcode 5 were frustrating. Xcode 5 comes with XCTest but there is very little documentation in relation to unit testing and Xcode 5. I found some Apple sample code which demonstrates the use of unit testing, unfortunately it uses SenTestingKit which was Apple’s former unit testing framework that has been replaced by XCTest in Xcode 5. There is a migrator tool that you can use to move your pre Xcode 5 testing code to Xcode 5. But still not much help with documentation.

Read the rest of this entry »

Tags: , ,

Codesigning, Xcode 5 and Mavericks

Code signing in Xcode 5 has changed and is problematic.

This is about signing Mac Applications for distribution outside the Mac AppStore and meeting gatekeeper requirements. I’ve not done anything with entitlements.

There has been some discussion on this on the Apple developer forums.

Some notes as a conclusion was reached have been published on this blog here.

A useful command is:

spctl -a -vvvv Path/To/App/

The code signing identity that needs to be used is Developer ID Application: K Meaney (U6T…).

I’ve applied that developer id at the project level and allowed each of the targets to inherit the code signing identity except the test target which has had the code signing identity scrubbed.

I had problems that my mac developer id was behaving like it was generated from the iPhone provisioning profile. I couldn’t work out from the many key chain identities/certificates/public and private keys which one it was that was causing the problem. So I scrubbed all the developer related keys/certificates/identities from my keychain. Then in Xcode in the accounts section of the Preferences I clicked View details, then clicked on the Mac Team Provisioning Profile then clicked on the + symbol and selected “Developer ID Distribution” which then created a “Developer ID Application” signing identity. It is this signing identity that I used to code sign moving images.

The Validate button in the organiser window is pointless for my purposes as it won’t deal with application or any package that contains multiple bundles. That is why the spctl -a -vvvv command is useful as it allows you to test that you have code signed your application successfully.

The last issue I had to deal with was that Apple’s timestamp service is often down. There is no sensible array around this.

Gatekeeper, codesign, code sign, codesigning, code signing.

Tags: , , , ,