Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React/RCTDefines.h not found #326

Merged
merged 2 commits into from
Sep 12, 2018
Merged

React/RCTDefines.h not found #326

merged 2 commits into from
Sep 12, 2018

Conversation

mmiani
Copy link
Contributor

@mmiani mmiani commented Jun 10, 2018

I'm having this issue: React/RCTDefines.h not found after upgrading CocoaPods to v 1.5.3
According to their changelog

CocoaPods will no longer add all header search paths for each xcconfig generated and instead, it only adds the header search paths for the dependencies of the pod.

So I tried adding React as a dependency in the podspec and that fixed the issue

@msftclas
Copy link

msftclas commented Jun 10, 2018

CLA assistant check
All CLA requirements met.

@dhei
Copy link
Member

dhei commented Jun 10, 2018

Hey @mmiani,

Thanks for the PR.

I just tried react-native link a brand new app created by react-native init to link latest version of appcenter sdk with cocoapods v1.5.3 and I don't see any issues. Can you describe a repro step of this issue?

The PR itself looks fine except it's missing a change in appcenter-analytics/ios/appcenter-push.podspec. Please make sure you also update that file.

@mmiani
Copy link
Contributor Author

mmiani commented Jun 11, 2018

My iOS project is not the standard one created by react-native init.
My problem is that react-native link links the appcenter projects into the project "Libraries folder" but my project consumes dependencies via cocoapods and not project references.
Since your last version (PR), it's possible to use cocoapods without react-native link so I've configured all the appcenter packages via cocoapods. (it would be good to include this case in the documentation)

My pod file looks like this:

pod 'appcenter', path: '../node_modules/appcenter/ios'
pod 'appcenter-analytics', path: '../node_modules/appcenter-analytics/ios'
pod 'appcenter-crashes', path: '../node_modules/appcenter-crashes/ios'

I've added the missing change to appcenter-push, please let me know if you need any further clarification.

@dhei dhei self-assigned this Jun 11, 2018
@dhei
Copy link
Member

dhei commented Jun 11, 2018

@mmiani, I struggled to setup a react native project that neither use "react-native link" or "Libraries folder", but only use cocoapods. My problem is when I removed all references in Libraries folder from Xcode, it doesn't know where to find reference.

Can you share a stripped down version of your RN.iOS app not using "Libraries folder" so that I can reproduce? It could much appreciate to see how to convert a "standard" RN.iOS app create via react-native init to your flavor. Thanks.

@dhei
Copy link
Member

dhei commented Jun 12, 2018

@mmiani, a caveat of not using "react-native link": AppCenter SDKs use prompt during "react-native link" to ask for information:

(1) AppSecret which will be recorded in AppCenter-Config.plist;
(2) [AppCenterReactNative register] AppCenter start code in AppDelegate.m.

In other words, without "react-native link", users have to add those code themselves. Basically the last 2 steps from integrate-the-ios-sdk-manually.

But still, I am interested to see what exactly is required to integrate AppCenter SDKs without "react-native link" even with slightly worse user experience.

@mmiani
Copy link
Contributor Author

mmiani commented Jul 3, 2018

Unfortunately, I can't share my iOS project, I'll try to generate a clean iOS project with RN integrated and some dependencies configured via CocoaPods so you can have an idea

@oblador
Copy link

oblador commented Aug 6, 2018

I'm having the same issue with a fresh app using the CocoaPods integration mentioned here: https://facebook.github.io/react-native/docs/integration-with-existing-apps

@dhei
Copy link
Member

dhei commented Aug 6, 2018

@oblador, have you tried Integrate the iOS SDK manually doc and still having the same issue?

@oblador
Copy link

oblador commented Aug 6, 2018

@dhei Try with your own BrownfieldTestApp project to reproduce the issue.

@oblador
Copy link

oblador commented Aug 16, 2018

@dhei Did you manage to recreate this using your own example app?

@DulMephistos
Copy link

Any updates on this? Having the same issue now with CocoaPods 1.6.0.beta.1

@guperrot guperrot closed this Sep 6, 2018
@guperrot guperrot reopened this Sep 6, 2018
@bmourat
Copy link
Contributor

bmourat commented Sep 11, 2018

I've managed to reproduce this, and I can confirm that this PR resolves that issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants