2

I'm using Xcode 5.1.1 and AppCode 2.5.2 to develop an iOS 7 application. My project uses a static library which includes this line:

NSData* data = [NSJSONSerialization dataWithJSONObject:dict options:nil error:&err];

When I use simulator, there's no problem with both IDEs. However I get something weird when debug deploying to device. Xcode compiles it nicely without warning (have to say that I did not updated project to latest recommended settings) while AppCode returns me error on that line.

How is this possible? I know that AppCode uses xcodebuild but I do now know how this differs from the Xcode compiler. Moreover I would know if there's some project setting that allows Xcode to stop on that kind of lines.

giampaolo
  • 6,906
  • 5
  • 45
  • 73
  • 1
    Any way of viewing the error given? It might help at debugging its cause. – Lord Zsolt Jun 17 '14 at 19:33
  • One note is that you're building an iOS app and referencing the OS X documentation (a similar, but not the same, SDK). This shouldn't be causing this specific issue, but will in the future. Here's the docs you should be viewing: https://developer.apple.com/library/ios/documentation/foundation/reference/nsjsonserialization_class/Reference/Reference.html – wjl Jun 17 '14 at 19:54
  • thanks @wjl. Initially I thought that this was the cause. Anyway, that row is the one that causes the problem. If I remove it compilation runs right. Going to edit. – giampaolo Jun 17 '14 at 21:04
  • @LordZsolt, I do not have the compilation log at the moment, but I will complete my question as soon as I am in front of the IDE. At the moment I remember that a double click on the error was not giving me other information. – giampaolo Jun 17 '14 at 21:07
  • The more I think about this, the more I'm perplexed. Does AppCode show you the xcodebuild invocation? What happens if you go on the terminal and invoke xcodebuild directly? I think it's something like `xcodebuild -sdk iphoneos`, or list the SDKs with `xcodebuild -showsdks`. My thinking is if you can replicate this issue from xcodebuild directly you've removed the blame from AppCode. https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcodebuild.1.html – wjl Jun 18 '14 at 15:14
  • @giampaolo here is an issue for this - http://youtrack.jetbrains.com/issue/OC-10311. Next time you have a problem with AppCode feel free to write there or to appcode-support@jetbrains.com - it's much faster. Thanks. – hoha Jul 01 '14 at 13:32
  • @hoha: there was an answer pointing to that bug. While I was going to accept it, I discovered it was deleted. Anycase, I never thought it could be an AppCode error. In my world IDE have no bugs :) – giampaolo Jul 01 '14 at 14:54

0 Answers0