Saturday, June 11, 2011

XCode 4.3 with IOS 5 beta

After downloading XCode 4.3 beta with the IOS 5 SDK, the Organizer function to share and archive stopped working with a cryptic error "No such file or directory found".
It turns out that this is related to having two different versions of codesign_allocate . To fix the problem, do the following in a terminal window.

sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate /usr/bin

After that you can share the IPA with organizer again.

You can also package from the Terminal window with the following commands in the directory containing your XCode project.

xcodebuild -target LocateCustomer -sdk iphoneos build


/usr/bin/codesign -f -vv -s "Divya Mahajan (5E58XNSTHR)" build/Release-iphoneos/LocateCustomer.app


xcrun -sdk iphoneos PackageApplication -v "build/Release-iphoneos/LocateCustomer.app" -o build/LocateCustomer.ipa --sign "iPhone Developer: K Developer (5E68XNSTHR)"

--- Here LocateCustomer  = Target name in the project.