8

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

Screenshot for error

Screenshot for error

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'

Appstore error

Why did this occur all of sudden? How to fix it?

RestKit Build settings

Jayprakash Dubey
  • 35,723
  • 18
  • 170
  • 177
  • Checked RestKit is available in build phases? If not then add it in your project. – Sudha Tiwari Nov 17 '14 at 11:06
  • Quick fix: Remove reference from project and add RestKit framework again. – Kampai Nov 17 '14 at 11:06
  • @Sudha OP has mention it in question – Kampai Nov 17 '14 at 11:07
  • @Kampai : This one not working. I tried it. – Jayprakash Dubey Nov 17 '14 at 11:37
  • What version of RestKit are you using? How did you install it (manual or pod)? What is the build setting for the RestKit project? What have you set header and framework search paths to? Is the build error for both debug and release builds? – Wain Jan 10 '15 at 10:19
  • @Wain : This is an pre-existing app (probably designed in Xcode 4.6). My responsibility is to make some functionality changes. How do I come to n=know version of RestKit being used? Build settings for RestKit check new screenshot in question. Header and Framework Search Path for RestKit or Project or Target? Yes Build error for both debug and release. – Jayprakash Dubey Jan 12 '15 at 06:49
  • In the RestKit folder you should find a version file. Compare the RestKit target and your target architecture settings. Your target search paths. – Wain Jan 12 '15 at 07:48

7 Answers7

4

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.

comrade
  • 4,590
  • 5
  • 33
  • 48
3

You have not properly changed Architecture , if you have done properly than it will show you like this,

Proper Architecture setting:

enter image description here

So again properly change Architecture and try again.

This is your Architecture Setting

enter image description here

Naeem
  • 789
  • 1
  • 10
  • 23
  • Have yo added 'arm64' in Valid Architectures? – Naeem Jan 13 '15 at 12:15
  • After confirming the correct architectures, make sure your device is NOT connected to your computer when ARCHIVING the final build to submit to the App Store. The reason this warning appears is because the DEVICE you have connected is probably not arm64 compatible. – Naeem Jan 13 '15 at 12:16
  • I have submitted app on Appstore with 32-bit architecture since using 64-bit standard architecture always created an error 'Reskit.h file not found' – Jayprakash Dubey Jan 13 '15 at 13:06
  • Let us know if apple gives you warning after 1st Feb 2015 for this 32-bit architecture app. – Naeem Jan 14 '15 at 04:13
  • Thanks for the pointer, changed Valid Architecture to "armv7, armv7s, arm64, i386" (without quotes) seemed to resolve. – Claytog Sep 05 '19 at 03:44
1

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.

Jayprakash Dubey
  • 35,723
  • 18
  • 170
  • 177
0

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.

enter image description here

Also you may try just #import "RestKit.h"

LoGoCSE
  • 558
  • 5
  • 13
0

I had solved this in many cases by deleting the contents of DerivedData folder. See the following questions on how to do this:

Community
  • 1
  • 1
Legoless
  • 10,942
  • 7
  • 48
  • 68
0

If you have Pods configured then and if you have upgraded recently your Xcode, try reinstalling cocoapod and all the reinstall all required pods.

vishal dharankar
  • 7,536
  • 7
  • 57
  • 93
  • Project has been built on Xcode 4.6 by outsourced team. Now, I have made functionality changes using Xcode 6.1.1. How to reinstall Cocoapod and also which other pods needs to be reinstalled? – Jayprakash Dubey Jan 12 '15 at 06:53
0

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.

Mani Apple
  • 63
  • 7