RestKit Failed With Error clang failed with exit code 1 - ios5

I have RestKit 0.9.3 Version and XCode 4.2
Followed the instructions on RestKit for installing on XCode 4.x and i the error mentioned below.
I googled a lot, check many stack answers but none server my problem. I checked the linker flags, they are configured as per the tutorial.
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1
Error shown in the image:

if you're building for the iPhone, just make sure you don't have the RestKit.framework added to your target; in the 'Link Binary With Libraries'. HTH

I had this exact same issue. I eventually started a fresh Xcode project, since my project was small, and it worked fine. I suspect this is because I had just converted to Xcode 4.2, and enabled ARC via the tool, I think some things were missed. When I made a fresh Xcode project with 4.2 and put my sources, then ResKit in, it worked just fine.
If your project is small this is a fairly low cost solution. If big, well, hopefully it works!
Yeah, I hate not knowing why, but I also hate wasting time.

Related

Xcode 4.5 iOS 6 error uploading to itunes

I have recently upgraded to XCode 4.5 and have been trying to release a new version of my app. I went to the itunes connect portal and prepared it for upload. I changed the version numbers in my bundle. Now I archive it, and validate it. No problems here.
The problem is when I try to distribute it I get this error
Before you rip this question appart, I have already tried these fixes here, here, and by using the application loader
I am out of ideas. I really need to get this update out and I have no idea why I am getting this error. If anyone else has had this problem, especially with xcode 4.5 (which seems to have started this problem in the first place) please let me know
Ok, so I finally solved my problem. It is Java related as many of the other answers suggest, however their solutions didn't work for me. I got some help from this Apple Forum
That solution still did not work for me though, so I did a slight workaround by just moving the virtual machine file. You could always move it back when you're done.
sudo mv -f /Library/Java/JavaVirtualMachines/1.7*jdk ~
You can confirm that this worked by checking the current java version
java -version
Which should give you 1.6.x. This should fix the problem. Also note I still used Application Loader 2.7 to do this (Although I bet it would have worked either way).
How long have you had this problem for?
In this case, it's probably due to iTunes Connect scheduled maintenance.

After upgrading Xcode to 4.5, Restkit 10.0 project not compiling for iOS 5.1 device

Just upgraded to Xcode 4.5. Figured out after getting bugs in my app in the 6.0 simulator that I had to redownload the 5.1 simulator. Hurray, that worked! but....
When I went and tried to run against my iPad1 with iOS 5.1.1 on it, I get a whole bunch of restkit compile errors.
Getting : "Linker command failed with exit code 1"
Do I have to upgrade to Resktit 10.3 ? I don't see anything in the github history regarding Xcode 4.5 fixes...
Thanks!
OK, just noticed the following warning:
ignoring file /Users/.../Library/Developer/Xcode/DerivedData/PlascoTrac-ginlxeicfonetcaicpyggfpyuxrj/Build/Products/Debug-iphoneos/libRestKit.a, file was built for archive which is not the architecture being linked (armv7s): /Users/.../Library/Developer/Xcode/DerivedData/PlascoTrac-ginlxeicfonetcaicpyggfpyuxrj/Build/Products/Debug-iphoneos/libRestKit.a
so I went to the Restkit target and changed the architecture to
Standard (armv7, armv7s)
and voila!
Leaving this question and answer here because I don't see the exact equivalent here and it might be useful to others,
Cheers.

Xcode warning: application executable contains unsupported architecture(s):arm, arm (-19031)

I've been receiving this warning since I loaded my project in last Xcode 4 preview. There was no warning before that but now I can't get rid of it even in Xcode 3.2. I've been googling but nobody seems to have the same error.
My project and target settings are correct (IMHO): Architectures: Standard (armv6 armv7), Base SDK: Latest iOS (currently set to iOS 4.2), Build Active Architecture Only: FALSE, Valid Architectures: armv6 armv7.
I compared every project setting with other projects and and found no differences. I even have recreated the project starting from scratch and copying classes, resources and frameworks with the same result.
I must say that the warning is not shown when I set Debug configuration.
I hope someone can help me because I don't know what to do. Thanks in advice.
I kept getting this error and it was driving me crazy. Then I realized I was building the project for Simulator instead of Device. Once I made the change, I was able to upload the app without a problem.
Several things spring to mind. Firstly that there is some file lurking around in the build directory. But I presume you have deleted the build directory. Secondly, that there is something lurking in your library directories. I think xcode puts some tempt files down in them now. Thirdly that something has gone funny is the core xcode setup.
So here's what I would try (the emphasis here is "try" - I don't know if any of this will work :-)
Make sure you have deleted the build directory.
Do a full un-installation of code. Clear out any developer directories and then re-install.
SOLVED!. Not a good solution though.
After a thousand tests I uninstalled Xcode 3.2.5 and installed 3.2.4. Everything went ok since then. Now I'm afraid of upgrade to last version again. :/

What could be the reason for the error? Please see detail showing image of error

I am keep getting this error while uploading..I have no idea what this error are and how to resolve them...my build was successful(there are some warnings) my application is tested on iOS 4.1...any help is highly appreciated.
Thanks
It appears that Apple's servers may be having issues this weekend. I got a similar error. You should check iTunesConnect to see if the binary was uploaded, and perhaps send email to ITC support confirming.
I had this issue as well and was able to get around it by using Fink.
Basically, the issue was that Application Loader.app was expecting to find servlet.jar in my classpath & by not finding it, was throwing a Java error. I tried with both the iOS 4.1 version of Xcode & Application Loader.app and the iOS 4.2 versions.
Solution:
Download fink & install.
fire up Terminal.app
fink install jakarta-servletapi
quit Terminal.app & relaunch it (it should automatically update your shell)
cd /Developer/Applications/Utilities/Application Loader.app/Contents/MacOS/ (assuming you have installed the dev tools to the standard location)
./Application\ Loader
smile
This is what worked for me, hope it helps? You can probably achieve the same thing using other tools (such as DarwinPorts?), but I have chosen Fink given that's what I first picked years ago... :)
The local installation of XCode seems to be broken. Uploading the file from an other system does not show any problems.
I try to reinstall XCode and hope that fixes my problem.

Building iPhone Code using xcodebuild and running LLVM/Clang Static Analyzer

I followed the steps in Finding memory leaks with the LLVM/Clang Static Analyzer but I was unable to run static analyzer on my project.
When I try to run xcodebuild on my project (1. Open Terminal, 2. Go to Project Directly, 3. > xcodebuild), I get this error:
=== BUILDING NATIVE TARGET XProject OF PROJECT XProject WITH THE DEFAULT
CONFIGURATION (Release) ===
Checking Dependencies... CodeSign
error: no certificate found in
keychain for code signing identity
'iPhone Developer'
\** BUILD FAILED \**
How can I run this tool on my code? - I'm testing with simulator. Thanks.
I'm the author of the blog post that you reference in your question. If codelogic's comments are not enough to point you in the right direction you can wait until a bit later today and I will update the blog post with some more information about running xcodebuild against iPhone projects.
-- Michael
--
Alright, I've updated the post with a section titled iPhone Usage. Hope this helps!
Finding Memory Leaks With The LLVM/Clang Static Analyzer
I haven't used the tool in question but the issue you're seeing appears to be a bothced xcodebuild command. Ensure that your target is the Simulator and not the device (-target command line argument).
It can be tricky to set the base sdk. I like this approach:
I would have sworn that I had already set the sdk via the more traditional 'Build' tab, but hey... The 'Build' tab approach failed me (who know what I did wrong), but this worked great.
Good luck.
[Edit - I just visited the link posted in the Question - which repeats, but does not emphasize, what I'm claiming here.]
It looks strange but I've switched active Configuration to Debug EVERYWHERE but still got same error (like Release is active). Xcode 3.1.3 version.
I was able to fix problem just after removing Release configuration at all from active target.