Search code examples
objective-cswiftxcoderestkitarchive

RestKit breaks build in archive mode - Xcode 8


I'm using Xcode 8.2.1 with CocoaPods 1.1.1. I've got a iOS application using RestKit 0.27, with Objective-C and Swift 3 code. Everything builds and works flawlessly in simulator and on the device, but the project won't compile when archiving it for distribution:

/Users/***/MyProject-Bridging-Header.h:16:9: note: in file included from /Users/***/MyProject-Bridging-Header.h:16:
#import "CustomRKObjectRequestOperation.h"
        ^
/Users/***/Services/CustomRKObjectRequestOperation.h:10:9: error: 'RestKit/RestKit.h' file not found
#import <RestKit/RestKit.h>
        ^
<unknown>:0: error: failed to import bridging header '/***/MyProject-Bridging-Header.h'

I found a similar issue here: https://forums.developer.apple.com/message/79355#79355, but suggested fix doesn't work, probably because it's for Xcode 7.1.


Solution

  • It turns out FRAMEWORK_SEARCH_PATHS in Release configuration did not have any references to any of the Pods frameworks. Everything is working fine now, nothing to do with RestKit.