GithubHelp home page GithubHelp logo

Comments (14)

BretJohnson avatar BretJohnson commented on July 28, 2024 1

@barnabyc. I've been looking at this more, trying to understand why you guys are seeing this and reproduce, but I haven't been able.

First, can you confirm that you are building with the .xcworkspace in xcode, not the .xcodeproj file. After adding CocoaPods you need to switch to using the workspace it creates.

Also, who are you seeing that imports RCTBridgeDelegate.h? RNCrashes and RNAnalytics never #import that directly; it only should be other React files themselves that import it.

If you create a new project with react-native init and add Mobile Center to it, do you see the same issues? That can be a useful comparison sometimes. But again, that works OK for me with RN 0.42.2.

As for the steps to use the framework ZIPs directly, not using CocoaPods: MobileCenter and RNMobileCenter (the core functionality) are the only thing in CocoaPods / framework zips. RNCrashes itself always comes from npm, node_modules/mobile-center-crashes/ios/RNCrashes.xcodeproj, added by the react-native-link. That's why you didn't see it in the zip.

Finally, if you're willing, would you mind inviting the MobileCenterBuildSupport github user, granting read access to your repo. That would allow me to play with your source repo itself to help troubleshoot. And you can of course remove access when done troubleshooting. That can make it easier to get to the bottom of this, but if you'd rather not do it, that's OK too.

In any case, I would like to understand better exactly why you guys ran into this. And please keep the Mobile Center feedback coming, with any other issues / suggestions. Also feel free to use the Intercom link (button right support button) in the website to chat with us, especially for suggestions or non-SDK issues.

from appcenter-sdk-react-native.

hojberg avatar hojberg commented on July 28, 2024

It seems to me that you've worked to fix those issue, but not release a new version to npm/cocoapods?

from appcenter-sdk-react-native.

axemclion avatar axemclion commented on July 28, 2024

cc @BretJohnson

from appcenter-sdk-react-native.

BretJohnson avatar BretJohnson commented on July 28, 2024

@hojberg The header location changed in 0.40 and we rolled out a fix to handle that several weeks back. So I'm not sure why you are seeing this. What version of the npm components do you have installed currently?

from appcenter-sdk-react-native.

barnabyc avatar barnabyc commented on July 28, 2024

@BretJohnson We're using [email protected] which pulled in [email protected]

We're seeing 'RNCrashes/RNCrashes.h' file not found in our main project, along with 'React/RCTBridgeDelegate.h' file not found within RNCrashes itself.

(I'm working on the same project as @hojberg.)

from appcenter-sdk-react-native.

barnabyc avatar barnabyc commented on July 28, 2024

I was able to get rid of the first error by re-running react-native link, but 'React/RCTBridgeDelegate.h' file not found persists.

from appcenter-sdk-react-native.

barnabyc avatar barnabyc commented on July 28, 2024

Adding further confusion; the react-native link command adds RNCrashes to the project and updates AppDelegate.m (and thus the build error mentioned above).

When we tried to manually install RNMobileCenter, we can't find RNCrashes in the SDK zip files and the manual steps docs don't mention it at all.

We're a little confused as to what should/should not work right now with regards to using the crash service with React Native.

from appcenter-sdk-react-native.

barnabyc avatar barnabyc commented on July 28, 2024

[Back to using react-native link approach.]
When I try to build RNCrashes directly within my project (selecting Libraries > RNCrashes, hitting ⌘B), I'm seeing:
'React/RCTBridgeDelegate.h' file not found
within
Pods > Development Pods > React > Core > React > Base > RCTBridge.h.

from appcenter-sdk-react-native.

barnabyc avatar barnabyc commented on July 28, 2024

Success!

We added an additional Header Search Path to RNCrashes: $(SRCROOT)/../../../ios/Pods/Headers/Public and now we're able to build and run.

Not sure how to differentiate whether the target project has pulled React in via Cocoapods vs a Library as the former won't resolve without this additional search path.

from appcenter-sdk-react-native.

barnabyc avatar barnabyc commented on July 28, 2024

@BretJohnson Thanks for the thoughtful reply.

Our project includes React via CocoaPods, not npm, prior to introducing MobileCenter. Because of that, the default header search path in RNCrashes could not locate the RCTBridge headers.

We added: $(SRCROOT)/../../../ios/Pods/Headers/Public (in addition to the existing $(SRCROOT)/../../react-native/React). As soon as we added that, everything compiled.

I left a lot of noisey feedback in this thread so may have inadvertently lost that detail.

from appcenter-sdk-react-native.

BretJohnson avatar BretJohnson commented on July 28, 2024

@barnabyc Why do you guys include React via CocoaPods, not npm? That seems like a pretty nonstandard configuration, but maybe you guys have special needs here. I would like to understand it better though. Thanks.

from appcenter-sdk-react-native.

BretJohnson avatar BretJohnson commented on July 28, 2024

Closing. @barnabyck, @hojberg, and team - please feel free to ping us if you still have any problems here. For feedback, writing up another GitHub issue is fine or you can also ping us on Intercom inside of Mobile Center (the Conversations bubble in the bottom right after you log in) just mention my name & we can chat some there.

from appcenter-sdk-react-native.

barnabyc avatar barnabyc commented on July 28, 2024

@BretJohnson - thanks for closing this out now that we're unblocked.

I don't think we had any particular reason for using React via CocoaPods vs npm other than that was the iOS package manager we were using elsewhere, and as React was available and working well, we had no need to use npm. If an additional search path is simple to include, would it be feasible to add it to future versions of the MC SDK? Just in case anyone else is non-standard CocoaPods like us.

Definitely will use Intercom, already had a good discussion there regarding code-push and JS source maps support for crash symbols.

from appcenter-sdk-react-native.

BretJohnson avatar BretJohnson commented on July 28, 2024

@barnabyc Do you think you can share the steps to create a new React Native app, using CocoaPods, that demonstrates this problem. I just want to make sure I understand the exact scenario. Thanks.

from appcenter-sdk-react-native.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.