ReactiveObjC icon indicating copy to clipboard operation
ReactiveObjC copied to clipboard

#import "<ReactiveObjC/ReactiveObjC.h>" file not found

Open liaodalin19903 opened this issue 7 years ago • 9 comments

Issue: in my .pch file

#import "<ReactiveObjC/ReactiveObjC.h>" file not found

In Podfile

pod 'ReactiveObjC', '~> 2.1.0'

liaodalin19903 avatar Dec 12 '16 08:12 liaodalin19903

me too

ztiandan avatar Dec 21 '16 09:12 ztiandan

It should be #import <ReactiveObjC/ReactiveObjC.h>

mdiep avatar Dec 21 '16 23:12 mdiep

@mdiep I do not want to create new issue, so decided to ask here.

Does ReactiveObjC support use_frameworks! and import as a module, like @import ReactiveObjC?

I cannot make it work in this way, getting plenty of errors, like it was while using ReactiveCocoa, "~> 2.5": https://github.com/ReactiveCocoa/ReactiveCocoa/issues/2495 or "Duplicate declaration" errors occur for me.

Clearing derived data, deleting pods and reinstalling all of them for project did not help.

Dev env:

  • cocoapods 1.1.1
  • Xcode 8.2.1
  • Obj-C project mainly with a bit of Swift code --> need to use use_frameworks! for pods
  • ReactiveObjC v2.1.2

A bit of images with project config and corresponding errors: screenshot 2017-03-02 12 07 57 leads to: screenshot 2017-03-02 12 08 14

while this screenshot 2017-03-02 12 10 22 leads to lots of errors like screenshot 2017-03-02 12 08 37

Please let me know if there is any workaround for this or this is a limitation or I should open new issue.

Thank you, Sergii

sergii-frost avatar Mar 02 '17 11:03 sergii-frost

It should work as a framework, but I'm not a cocoa pods expert.

mdiep avatar Mar 02 '17 12:03 mdiep

@mdiep thanks for quick reply. I have tried to create new ObjC-based project in Xcode 8 and added ReactiveObjC pod (as a framework/module) and it seems to work. Will dig into my current project settings then.

sergii-frost avatar Mar 02 '17 13:03 sergii-frost

@sergii-frost did you compiling issue got resolved? I have the exact same issue here

xialisun avatar Jun 29 '17 19:06 xialisun

@xialisun yes.

I am using this combination of pods and versions to make ReactiveObjc, Obj-C and Swift friends again:

use_frameworks!
...
pod 'ReactiveObjC', '~> 2.1'
pod 'ReactiveObjCBridge', '~> 1.0'
pod 'ReactiveSwift', '~> 1.1'
...

Enabled Modules in project settings should be YES as well.

sergii-frost avatar Jun 30 '17 08:06 sergii-frost

I had the same issue, and I solved it by adding the ReactiveObjc to TARGETS -> General -> Linked frameworks and libraries, then error was gone.

reactiveobjc_not_found

Mylittleswift avatar Nov 01 '17 04:11 Mylittleswift

I just used @import and my project Build Setting's "Enable Modules" was 'YES'.

@import ReactiveObjC;

developforapple avatar Jan 04 '18 10:01 developforapple