RestKit - Lipo Error: can't open input file in Xcode5 - ios

I have an iOS application that i need to upgrade on iOS7. I am using RestKit version 0.10.2. While archiving i get following error.
/Applications/Xcode 2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: /Users/khawarshahzad/Library/Developer/Xcode/DerivedData/MyAPP-fcvmsuowvnqkdseskmuetssnxoww/Build/Intermediates/ArchiveIntermediates/MyAPP/IntermediateBuildFilesPath/MyAPP.build/Release-iphoneos/MyAPP.build/Objects-normal/armv7s/MyAPP (No such file or directory)
Previously i had fixed this error for iOS6 by following instructions on
https://github.com/RestKit/RestKit/issues/930
But now its not working for iOS7. Here is screenshot for current RestKit.xcodeproj Architectures settings.
Any suggestion is appreciated.

Huh! finally found the solution. If you are not using any specific feature of arm64 architecture, then just kick it off.
Go to project -> target (your project name) -> build settings and change architectures to standard architectures (armv7, armv7s), and valid architectures to armv7, armv7s. Set Build Active Architecture Only to Yes
Repeat same for RestKit.xcodeproj
Clean your project and Archive.
Best of Luck :)

I had the same Issue and couldn't fix it, so I just removed the restkit files and all its build settings. after that i used Cocoapods for restkit and other frameworks. its much better to work with and all these kinda errors are gone. I'm using it since iOS5 and last week I fixed my app for iOS7

If you need this fix for building from the command line - and you don't have an *.xcodeproj then this will fix it:
Change:
(cd $BUILDDIR/i386; "$SIM_DEV_DIR/ar" crus some.a obj/*.o; )
To:
# have to take ar from ARM_DEV_DIR in xcode 5
(cd $BUILDDIR/i386; "$ARM_DEV_DIR/ar" crus some.a obj/*.o; )
IOW: In xCode5 ar has moved from $SIM_DEV_DIR/ar to $ARM_DEV_DIR/ar

Related

restkit.h file not found when archiving using xcode 6

i need your help everyone. i am having an error when archiving an app with restkit. On build it is perfectly ok, but when archiving it generates an error below:
[App location...]/AppDelegate.m:3:9: 'RestKit/RestKit.h' file not found
[App location...]/RestKit/Code/CoreData/CoreData.h:22:9: 'ObjectMapping.h' file not found
Cheers!
If you can, switch to using CocoaPods.
Update your release header search paths to include "$(SRCROOT)/Build/Headers" and "$(BUILD_ROOT)/../".
Problem solved! the cause is that my Build Settings > Architecture is not set properly.
Here's what i did:
App submission: arm64 and armv7
Simulator: armv7
Device: arm64
I have fixed this issue, to change the Header Search Path
"$(SOURCE_ROOT)/RestKit-RestKit-c19a500/Build"
Note : "RestKit-RestKit-c19a500" this is my RestKit folder name.
For future readers, if you're using Core Data mappings, make sure to check if your Search Paths (Your Project -> Build Settings -> Search Paths -> Release) folders really exist. If not, just update them to the real folder.
Don't forget to include "${PODS_ROOT}/Headers/Public/RestKit/CoreData" folder, as setting the recursive flag on Headers/Public/RestKit doesn't seem to work!

Apple LLVM 6.0 Error After Changing Architectures

I have been working on reviving an older open source project, and when I updated the architecture from $(ARCHS_STANDARD_32_BIT) to $(ARCHS_STANDARD), Xcode gave me a very long error with the title Apple LLVM 6.0 Error which ended with the line Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1. I tried undoing the architecture change, but it still gave the error when I ran it again.
The previous build worked perfectly, and the only changes that were made on the erroneous build were:
1) I moved the project to Dropbox
2) I changed the architecture
Here is the full error: http://pastebin.com/huLnWc7v
Try This , It may solve your problem.
Issue: Compiler unable to locate .pch file. This is because Location of Prefix Header file .pch in Project Target is incorrect.
The location is defined in Project Target/Build setting. You will need to go to: Project Target -> Build Settings Tab -> Scroll down and Look for "Apple LLVM Compiler 6.0 - Language" Underneath this node -> You will find the key/value setting for Prefix Header file.
Normally Prefix header file is located under "Supporting File" Folder in your project
Reference : Anbu.Karthik
I was trying to compile ARM code as if it were ARM64. Since it's just an app and not an extension, I don't need to do that. So, under Project>Target>Build Settings> Architectures I changed the Architectures key I standard architectures, and the Valid Architectures key to armv7.

Restkit/Restkit.h file not found Xcode 6.1

I was working on Project in Xcode 6.1. It was working fine and all of sudden it prompted an error 'Restkit/Restkit.h file not found'. I'm getting error after changing Architectures from $(ARCHS_STANDARD_32_BIT) to Standard architectures (armv7,arm64) - $(ARCHS_STANDARD) which is recommended by Apple Check Link
I have tried following approaches :
1.'Cleaning' project and rebuilding
2. Checked for missing framework in Target -> Build Phases
3. Fixed 'Framework Search Path' of Target
4. I have build Restkit XcodeProject and Targets separately. It builds without error.
I was getting below error while submitting to App Store and hence changed architecture to 'Standard architecture'
Why did this occur all of sudden? How to fix it?
Just to be here. There is similar issue in newest Xcode 7+. You can observe "RestKit/RestKit.h file not found" failure on archive build. You could compile and run apps on emulator but archive would fail.
To fix this you need to add one line to "Header Search Paths" in Build Settings:
"$(BUILD_DIR)/../IntermediateBuildFilesPath/Headers"
Be sure to include the surrounding quotes.
You have not properly changed Architecture , if you have done properly than it will show you like this,
Proper Architecture setting:
So again properly change Architecture and try again.
This is your Architecture Setting
I had used third-party static library in project named libNuance.a. It seems that this static library works fine for 32-bit architecture but failed for 64-bit architecture.
I downloaded updated version of libNuance.a library from their official site and changed architecture to Standard architectures (armv7,arm64) - $(ARCHS_STANDARD).
Vola! build succeeded without any error.
First you can try, look for it in project navigator(left side) and delete if it is red.After that add the RestKit again.Be sure when adding check the copy if needed box and packages contains headers.
Also you may try just #import "RestKit.h"
I had solved this in many cases by deleting the contents of DerivedData folder. See the following questions on how to do this:
Can I safely delete contents of Xcode Derived data folder?
How can I safely delete in my ~/Library/Developer/Xcode/DerivedData directory?
If you have Pods configured then and if you have upgraded recently your Xcode, try reinstalling cocoapod and all the reinstall all required pods.
I fixed this issue, to change the Header Search Path
"$(SOURCE_ROOT)/RestKit-RestKit-c19a500/Build"
Note : "RestKit-RestKit-c19a500" this is my RestKit folder name.

Undefined symbols for architecture x86_64 on Xcode 6.1

All of a sudden Xcode threw me this error at compilation time:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_Format", referenced from:
objc-class-ref in WOExerciseListViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
After doing some research, I may understand that a library I'm using is not compatible with 64 bit version. But this is very strange since I've been working with the same libraries for at least a week without having a single compilation problem during that time. The two libraries are just composed of a bunch of classes, and when I removed them from my project I got the same issue. Since I have never created libraries myself, I have no idea how I can find wether the ones I'm using are compatible with 64 bit (?)
I also tried the following changes for architectures under the target panel :
added $(ARCHS_STANDARD_INCLUDING_64_BIT) to the Architectures
build active architecture only -> set to 'NO'
for 'valid architectures' -> set to arm64, armv7 and armv7s
deleted the DerivedData folder and its contents, cleaned and built again
But none of these changes work. Please, does someone have a clue on this?
Thanks
Apparently, your class "Format" is involved in the problem. Check your declaration of this class, especially if you did it inside another class you probably forgot the #implementation or something similar.
Check if that file is included in Build Phases -> Compiled Sources
Make sure the WOExerciseListViewController is a Target Member; that worked for me!
Yes, I think the library you are using is not compatible with 64 bit version but you can solve the problem -
Just navigate to Build Settings>Architectures & replace $(ARCHS_STANDARD) to $(ARCHS_STANDARD_32_BIT)
So that your xcode build your project with 32 bit supported version.
I just had this error when I opened a (quite) old project, created in Xcode 4~ish, in Xcode 6.4. While the linked Frameworks were visible in the Project sidebar, I overlooked that there were no linked libraries in the Target Build Phases tab. Once I fixed that, it compiled fine.
It turned out I forgot to write my #implementation part.
I simply wasn't linking the libraries in the "Link Binary with Libraries" section.
I solved the same issue by going to Xcode Build Settings and in Architectures, I changed
the Xcode 6.1.1 standard architecture to:-
$(ARCHS_STANDARD_32_BIT)
I just had the exact same error, and solved it by restarting xcode.
For me the issue occurred after an svn update, the file in question was added to the projects folder, but it never appeared in xcode(9.3.1) – until I restarted it.
Same error when I copied/pasted a class and forgot to rename it in .m file.
I solved the problem by deleting reference to the file and adding it again in project. In my case it works.
this setting worked for me:
Architectures=$(ARCHS_STANDARD_32_BIT)
Build Active Architecture Only:YES
Valid Architectures armv6 armv7 armv7s arm64
Delete the $(ARCHS_STANDARD) and add the $(ARCHS_STANDARD_32_BIT).

iOS project builds for armv6 when armv7 is specified (target is iOS 5.1)

I get a long list of errors that spit out (for every source file I have) linker errors to the .o files (stemming from said sources). The error for every one basically resolves to this:
CompiledSource.o, file was built for i386 which is not the architecture being linked (armv7)
Except that the issue is actually warning, technically. However, at the end of compilation/linking phase the project refuses to build with a simple Linker command failed with exit code 1 error.
I've been spending the past 2 hours trying to figure this one out.
In Targets->ProjectName->Architectures->Valid Architectures I have both armv6 and armv7 selected. I ALSO have my build target set for iOS 5.1.
In my Targets->ProjectName->Build Phases->Copy Bundle Resources, I have all of my resources added (I assume this is where resources such as image and nib/xib files are added).
Is there anything I can do about this? I've tried cleaning the project, removing all files from DataDerived folder in XCode root, and even cleaning out /var/folders. Admittedly, this project hasn't been touched since at the very latest 2011.
I should note that I'm pretty new to iOS stuff (as well as Xcode). Unfortunately, this project is under an NDA as well so I can't reveal too much info. However, if anyone has any questions I will answer the best I can.
Are you sure its an iOS application? Because that sounds like its linked to a custom framework that got build for i386 (OSX-intel) which would probably never work on iOS.
Did you try to Product->Clean? or [alt] Product->Clean Build Folder ?
Maybe have a look at some example code from apple and see how these iOS projects are struktured.

Resources