microsoft / appcenter-sdk-react-native

Development repository for the App Center SDK for React Native

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

'AppCenter/MSACAppCenter.h' file not found

SergeiVeit opened this issue · comments

Description

/Users/<path_here>/node_modules/appcenter-analytics/ios/AppCenterReactNativeAnalytics/AppCenterReactNativeAnalytics.m:24:9: fatal error: 'AppCenter/MSACAppCenter.h' file not found
#import <AppCenter/MSACAppCenter.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Repro Steps

Please list the steps used to reproduce your issue.

  1. open https://docs.microsoft.com/en-us/appcenter/sdk/getting-started/react-native and do by guide
  2. "react-native run-ios" or build from XCode

on android it works correctly

Details

  1. Which version of the App Center SDK are you using?
    4.0.2

  2. Run the following command and paste the output below: react-native info

info Fetching system and libraries information...
System:
    OS: macOS 10.15.7
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 48.28 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 14.16.0 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.11 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
  IDEs:
    Android Studio: 4.1 AI-201.8743.12.41.6858069
    Xcode: 12.4/12D4e - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0 
    react-native: 0.61.5 => 0.61.5

  1. If you're developing for React Native iOS, run the following command and paste the output below: pod --version

1.8.4

  1. Please enable verbose logging for your app using [MSAppCenter setLogLevel: MSLogLevelVerbose]; before your call to [AppCenterReactNative register]; (or any other SDK registration). For Android, use AppCenter.setLogLevel(android.util.Log.VERBOSE); before your SoLoader.init call (you will need to import com.microsoft.appcenter.AppCenter;). Include the logs here:

Hi! Thanks for getting in touch with us!
Could you please clarify that you:

  • Added App Center dependencies above the #if DEBUG or #ifdef FB_SONARKIT_ENABLED declaration?
  • Performed npm i and pod install?
  • Clean and rebuild your project?

Also, from the 4.0.2 version of App Center SDK we increased the minor version. Please try to update CocoaPods to the 1.10+ version to consume the latest version of SDK.

[Feature] Use XCFramework format for the binary distribution via CocoaPods. CocoaPods version 1.10+ is a requirement now.

Hi,

Added App Center dependencies above the #if DEBUG or #ifdef FB_SONARKIT_ENABLED declaration?
image

Performed npm i and pod install
Yes, several times. It doesn't resolve issue.

Clean and rebuild your project?
it doesn't help


I did rollback to 4.0.0 version, but have the same issue.
And I can't upgrade CocoaPods (I don't understand why) and use 1.8 version.

Could you please confirm that these imports are located above the #if DEBUG or #ifdef FB_SONARKIT_ENABLED declaration?

#import <AppCenterReactNative.h>
#import <AppCenterReactNativeAnalytics.h>
#import <AppCenterReactNativeCrashes.h>

image
I confirm that

I tried to reproduce this issue locally but all works well for me. Could you please clarify which version of App Center SDK you use before? Can you reproduce this issue on an empty project?

I tried to reproduce this issue locally but all works well for me. Could you please clarify which version of App Center SDK you use before? Can you reproduce this issue on an empty project?

I used 4.0.0 previously.
Interesting situation here in only one: it is a new project, without code and some additional pods. It works fine on android and doesn't want on IOS

Now I add additional pods - works fine without AppCenter. And the same situation with it..

commented

Hi @SergeiVeit

I was able to reproduce your issue using a similar environment to what you have.
The cocoapods version 1.8 seems to be the reason.
I was able to build and run the ios app when I updated cocoapods to version 1.9.
Note that we are distributing AppCenter SDK via XCFramework when using pods. And cocoapods started supporting XCFrameowrks from version 1.9 (see this article).

Even though you would be able to run an ios app using pods v1.9, I would recommend to use version 1.10.1+ if possible.

Please update the cocoapods to version 1.9+ and let me know if it helps.

Hi, @DmitriyKirakosyan
I did update CocoaPods (it was hard) and add appcenter sdk. It works fine.
Thank you for your time.