Code Monkey home page Code Monkey logo

Comments (15)

BretJohnson avatar BretJohnson commented on May 18, 2024 1

@keshavkaul Thanks for that info. That's good to know.
I'm curious though--why did $(inherited) for FRAME_SEARCH_PATHS get removed from your targets? Were you maybe playing around with those settings, adding other frameworks, and removed inherited by mistake or thinking it wasn't used? Mostly I'm wondering how often other users may fall into this. Thanks.

from appcenter-sdk-react-native.

lukewlms avatar lukewlms commented on May 18, 2024 1

I see - I missed the pod repo update step in the docs. Executed that, linked again, ran the app, we have data now. Thanks!

from appcenter-sdk-react-native.

BretJohnson avatar BretJohnson commented on May 18, 2024

Hi. Did you do the react-native link step, in the SDK setup instructions?
If so, that looks like it could be an issue with the CocoaPods install on your machine, for some reason.
Does this file exist? <app-root>/ios/Pods/Headers/Public/MobileCenter/MobileCenterCrashes/MobileCenterCrashes.h
That's installed by CocoaPods, triggered by the react-native link.
And are you able the reproduce the problem with a new React Native project? If so, what are the steps you followed there?
Thanks.

from appcenter-sdk-react-native.

keshavkaul avatar keshavkaul commented on May 18, 2024

@BretJohnson The file does indeed exist. This issue isn't there on latest react-native version 0.45.1. I'm using version 0.43.0 in my project

from appcenter-sdk-react-native.

BretJohnson avatar BretJohnson commented on May 18, 2024

@keshavkaul Thanks. I don't think this issue has to do with React Native version. But just to confirm you could do react-native init --version="0.43.0" MyNewApp to create a new RN app on 0.43.0. I just did that, for instance, and it seemed ok.
Does this file exist for you as well? <app-root>/ios/Pods/MobileCenter/MobileCenter-SDK-iOS/MobileCenterCrashes.framework/MobileCenterCrashes
You could also try redo-ing the pod install:

cd MyApp/ios
pod install

To confirm that all works ok.

If none of that helps, maybe you could compare the working project (newly created) with yours, to try to see what's different there, at least in terms of MobileCenterCrashes stuff.
Also did you integrate Mobile Center analytics as well? But you don't see an error that the @import of MobileCenterAnalytics is missing? Those should be pretty much the same. That could be another clue.

from appcenter-sdk-react-native.

keshavkaul avatar keshavkaul commented on May 18, 2024

@BretJohnson Thanks, I figured out the issue. Mainly to do with not having $(inherited) value present in FRAMEWORK_SEARCH_PATHS and OTHER_LDFLAGS in my app targets, DemoApp, DemoApp-tvOS, and DemoAppTests.

When running pod install i got these warnings which made me correct them and the app could then be built and run.

Pod installation complete! There are 2 dependencies from the Podfile and 2 total pods installed.

[!] The `DemoApp [Debug]` target overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp.debug.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The `DemoApp [Release]` target overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp.release.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The `DemoApp-tvOS [Debug]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods-DemoApp-tvOS/Pods-DemoApp-tvOS.debug.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The `DemoApp-tvOS [Release]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods-DemoApp-tvOS/Pods-DemoApp-tvOS.release.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The `DemoAppTests [Debug]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods-DemoAppTests/Pods-DemoAppTests.debug.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The `DemoAppTests [Release]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods-DemoAppTests/Pods-DemoAppTests.release.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

from appcenter-sdk-react-native.

keshavkaul avatar keshavkaul commented on May 18, 2024

@BretJohnson I can remember adding a few framework search paths but not removing $(inherited) from them.
I started the project in RN version 0.42.0 and upgraded to 0.43.0.
After writing a few native AWS libraries that required adding to framework search path, is when I changed it.

Thanks for the help!

from appcenter-sdk-react-native.

andrerfneves avatar andrerfneves commented on May 18, 2024

I also used the $(inherited) fix for FRAMEWORK_SEARCH_PATHS and solved my issue

from appcenter-sdk-react-native.

BretJohnson avatar BretJohnson commented on May 18, 2024

@andrerfneves do you have any idea what may have caused $(inherited) to get removed from FRAMEWORK_SEARCH_PATHS in your case?

from appcenter-sdk-react-native.

andrerfneves avatar andrerfneves commented on May 18, 2024

@BretJohnson not sure. The only way I could see that being removed is when I run react-native link but I've inspected my commits and there's no FRAMEWORK_SEARCH_PATHS changes involved.

from appcenter-sdk-react-native.

vitorebatista avatar vitorebatista commented on May 18, 2024

I had the same issue and I fixed using in $(inherited) in FRAMEWORK_SEARCH_PATHS and OTHER_LDFLAGS. So I run react-native link mobile-center-crashes and solved my issue

from appcenter-sdk-react-native.

lukewlms avatar lukewlms commented on May 18, 2024

@BretJohnson I'm experiencing an identical issue, but I don't have a /ios/pods/headers/public/mobile* directory.

pod install succeeds, react-native link succeeds, react-native link mobile-center-crashes succeeds.

Out call stack is a bit different (below). Can you point out where else we may be going wrong?

Edit Searching the ios dir, don't find any instances of FRAMEWORK_SEARCH_PATHS so I'm not sure if we can apply the same fix the other commenters here used with success.

Edit I do find these in HEADER_SEARCH_PATHS:

"$(SRCROOT)/../node_modules/mobile-center/ios/RNMobileCenter",
"$(SRCROOT)/../node_modules/mobile-center-analytics/ios/RNAnalytics",
"$(SRCROOT)/../node_modules/mobile-center-crashes/ios/RNCrashes",

Thank you and I appreciate your engagement with the community to find the root of the issue!

/Projects/ClientPOC/node_modules/mobile-center/ios/RNMobileCenter/RNMobileCenter.m:19:9: fatal error: module 'MobileCenter' not found
@import MobileCenter;
 ~~~~~~~^~~~~~~~~~~~
1 error generated.

from appcenter-sdk-react-native.

lukewlms avatar lukewlms commented on May 18, 2024

I noticed the link command is actually issuing an error:

(node:31801) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error:
  Error: Could not find a "# Pods for" comment in your Podfile. Please add a "# Pods for Mobile Center" line
  in /Users/Luke/Projects/ClientPOC/ios/Podfile, inside
  the "target" section, then rerun the react-native link. Mobile Center pods will be added below the 
comment.

I manually added the suggested line inside of the ios/Podfile target section, and then ran link again, and now the two pod targets have been added:

# Pods for Mobile Center
pod 'RNMobileCenterShared', '~> 0.7.0'
pod 'MobileCenter', '~> 0.10.1'

Not sure why that was necessary, but the error message was clear at least.

Now however I get this:

[!] Unable to find a specification for `RNMobileCenterShared (~> 0.7.0)`

from appcenter-sdk-react-native.

guperrot avatar guperrot commented on May 18, 2024

Hi, glad to see your app is fixed.

from appcenter-sdk-react-native.

SamiChab avatar SamiChab commented on May 18, 2024

This answer helped me! #236 (comment)

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.