I use both Xcode and AppCode in my development. I'm running the latest version of each and since I updated to Xcode 5.1 my builds work on the simulators (6.1 and 7.1), but fail weirdly on my iPad 3 when run via Xcode 5.1. AppCode refuses to run the build on the iPad with an error which I feel is the heart of the issue:
xcodebuild: error: Was unable to find a destination matching the arguments to the -destination flag:
The requested device could not be found because no available devices matched the request.
I'm guessing there is a strange build setting problem somewhere, but I'm damned if I can find it.
Here is how the issue shows itself. I have this fragment of code:
AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:ipRequest];
operation.responseSerializer = [AFJSONResponseSerializer serializer];
It works on the simulators. With my iPad 3 as the destination, which is still on 7.0.6, AppCode refuses to launch with the error above. Under Xcode 5.1 it will launch on the device, but will only work on a release build. On a debug build I get an exception that setResponseSerializer is an unknown selector. The only relevant setting I could find different between release and debug, was 'Build Active Architecture Only' which was YES for Debug. I set this to NO, did a full clean and build and then it ran without error. It still won't run under AppCode.
It really seems as if the build is being made for the wrong architecture. Does anyone have any ideas what could be going on?