RestKit breaks build in archive mode - Xcode 8 - objective-c

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.

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.

Related

Xcode 12 Error : error: 'SVProgressHUD/SVProgressHUD.h' file not found #import <SVProgressHUD/SVProgressHUD.h>

after upgrading to Xcode 12 From App Store, the project not able to build and i get Errors :
error: 'SVProgressHUD/SVProgressHUD.h' file not found #import <SVProgressHUD/SVProgressHUD.h>
Showing Recent Messages
Failed to emit precompiled header '/Users/mohammedrezk/Library/Developer/Xcode/DerivedData/APPNAME-bxzcdxjpyvptvrdegichefojwviu/Build/Intermediates.noindex/PrecompiledHeaders/APPNAME-Bridging-Header-swift_2E6RO3XQ4PJKS-clang_AGVOYNG8YIID.pch' for bridging header '~/APPNAME-Bridging-Header.h'
I searched alot for issues with XCode 12 and I Updated Cocoa Pods to 1.10. because i found some answers related to Umbrella Header issue with Xcode 12 and CocoaPods, but still have the issue and not able to build and run the project
Please, any solution for this?
It confused me several days, finally I found the answer.Xcode12 set Architectures $(ARCHS_STANDARD) by default.If you select Any iOS Device or your iPhone, not simulator,the issue goes away.About the Architectures setting, you can see Xcode 12, building for iOS Simulator, but linking in object file built for iOS, for architecture arm64.

Could not build module 'Darwin' on xcode 7.1

I'm facing wired problem after installing Xcode 7.1. While I'm running existing project (Previously successfully built on Xcode 7) I'm getting error like this:
1. Could not build module 'Darwin' on #import <Availability.h>
2. Cannot open file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk/usr/include/mach/message.h': Invalid argument on #include <mach/arm/thread_state.h>
Just look at the screenshot you will find more.
I also removed the frameworks and imported the latest one avilable on Xcode 7.1 and iOS 9.1. But still I have the same issue.
Please help.

xCode 7.1: Could not build Objective-C module 'GoogleMaps'

I am using the GoogleMaps iOS SDK in my app and added it with cocoapods. However, after updating xCode from 7.0 to 7.1 I'm suddenly getting the following error: Could not build Objective-C module 'GoogleMaps'
In addition xCode also gives me an error in the GoogleMaps.h file in the GoogleMaps.framework:
Include of non-modular header inside framework module 'GoogleMaps'
I already deleted my DerivedData folder, updated cocoapods, reinstalled the GoogleMaps iOS SDK and cleaned and build the framework's scheme and my app's scheme. But nothing helped so far.
Answered in this similar question: xCode 7 error: include of non-modular header inside framework module with Google Maps
...but essentially you'll need to create an Objective-C bridging header file whereas you may not have needed one with Xcode 7.0. The why still eludes me.
you should open the .xcworkspace not .xcodeproj
once you added cocoa pods your project folder will contain the .xcworkspace file

incompatible SDK for ARC with mac osx 10.10

I am getting annoying warning messages for my targets after upgrading to osx 10.10, and the latest xcode (I can't remember which actually triggered it)
e.g: Incompatible SDK for ARC in target ApplicationName: macosx
If I change it from 'latest' to '10.10' then I get the same error:
Incompatible SDK for ARC in target ApplicationName: macosx10.10
Everything works and compiles, but still warning. The code is mixed swift and objective C, with ARC. Anyone else had this issue?
I had some older SDKs (10.5 and 10.6) from previous xcode versions that I had saved, in the xcode SDKs directory, which seemed to cause this error. I deleted these and replaced them with fresh ones downloaded from the apple website and the error went away.
I have same problem. But I found a solution:
In the Build Settings turn off the "Objective-C Automatic Reference Counting" paramter.

Static library(ARC) work on non ARC app, met error: dyld: lazy symbol binding failed: Symbol not found: _objc_retainAutoreleasedReturnValue

Xcode 4.3.2
I wrote a static library, using ARC.
When I put it into a project, and test on iOS 4.3 simulator. (base on iOS 5.1, deploy target 4.3)
If the project using ARC, it works fine.
If the project not using ARC, met errors, such as:
dyld: lazy symbol binding failed: Symbol not found: _objc_retainAutoreleasedReturnValue
Referenced from: /Users/cnzzmobile/Library/Application Support/iPhone Simulator/4.3.2/Applications/A4EEB0A0-AC16-402C-B426-46667225F66D/test.app/test
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/Foundation.framework/Foundation
dyld: Symbol not found: _objc_retainAutoreleasedReturnValue
Referenced from: /Users/cnzzmobile/Library/Application Support/iPhone Simulator/4.3.2/Applications/A4EEB0A0-AC16-402C-B426-46667225F66D/test.app/test
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/Foundation.framework/Foundation
I searched a lot, but can't find an answer can solve this problem.
I remove jsonobjcet which only supported by iOS5, and -fobjc-arc also doesn't work.
Thanks
I found add "-fobjc-arc" at "other linker flag" can solve this problem on Xcode 4.3.2 based on iOS 5.1. Because the xcode can't find the lib which support ARC to link.
Notice that: add "-fobjc-arc" at "other linker flag" not at "Compile sources".
But this still doesn't work on old version Xcode 4(snow leopard) based on iOS 4.3.
I found some lib can work on both ARC and non ARC project without adding any special setting. I'm still waiting for the answer how to do this. Write code using pure C?
_objc_retainAutoreleasedReturnValue is a function of iOS 5.x's version of arc. You are attempting to build this framework and run it on iOS 4.3, which requires you to specify and deploy it for iOS 4.x, which runs the "ArcLite" framework.