react-native-agora icon indicating copy to clipboard operation
react-native-agora copied to clipboard

4.0.0-rc.1 fails to compile on M1 iOS simulator

Open radko93 opened this issue 2 years ago • 11 comments

Hi, I've installed the new SDK 4.0.0-rc.1. It works on Android but fails to compile on M1 iOS simulator for me on React Native 0.69. Hermes and flipper disabled.

This line fails: #import <AgoraRtcWrapper/iris_rtc_cxx_api.h>

'AgoraRtcWrapper/iris_rtc_cxx_api.h' file not found

Seems like cocoapods are not configured probably.

radko93 avatar Sep 15 '22 11:09 radko93

@LichKing-2234

radko93 avatar Sep 19 '22 08:09 radko93

You need to do this thing: cd ios & pod install

Are you apple chip?

player0x3 avatar Sep 19 '22 08:09 player0x3

I did the installation many times. Yes I'm on Apple chip. But there's no problem with the old SDK.

radko93 avatar Sep 19 '22 09:09 radko93

How to reproduce:

  1. Create an new RN project (currently 0.70.1).
  2. Disable Hermes and Flipper on iOS in pod file.
  3. Install agora 4.0.
  4. Try to build

Repro https://github.com/radko93/TestAgora (just do yarn install and the pod install).

radko93 avatar Sep 19 '22 10:09 radko93

Have you checked whether your "pod install" is Success? Maybe you can look at this article, which will show you how to run react native under Apple chip: https://medium.com/@alberto.schiabel/how-to-fix-pod-install-error-in-react-native-on-mac-m1-5d79dc52f7e8

About uninstall cocoapods (Maybe you installed the wrong cocoapods ): https://superuser.com/questions/686317/how-to-fully-uninstall-the-cocoapods-from-the-mac-machine

(I can run your Repro in my m1 macbook)

player0x3 avatar Sep 19 '22 10:09 player0x3

Yes my pod install is successful, as for all different projects I run. I don't have Rosetta cocoapods version because it's not required.

Last thing that comes to my mind: are you running on Xcode 14 and iOS16?

radko93 avatar Sep 19 '22 11:09 radko93

image image AgoraRctWrapper inside AgoraIrisRTC_iOS pod has not iOS simulator support under M1.

radko93 avatar Sep 19 '22 11:09 radko93

I can confirm it's working on real device. But why was the support removed?

radko93 avatar Sep 19 '22 11:09 radko93

It will support in the next version.

LichKing-2234 avatar Sep 20 '22 06:09 LichKing-2234

I have the same issue (also have a M1 Pro apple chip). My app works on an iOS device but simulator build fails on 'AgoraRtcWrapper/iris_rtc_cxx_api.h' file not found

I just tried version 4.0.0 that was released earlier today but I still get the same error. Was a the simulator support supposed to be included in that release @LichKing-2234 ?

hronnro avatar Sep 28 '22 13:09 hronnro

it will support at 4.1.0 version

LichKing-2234 avatar Sep 28 '22 14:09 LichKing-2234

it will support at 4.1.0 version

when will 4.1.0 Version release.? Thanks

salmanrajz avatar Oct 31 '22 11:10 salmanrajz

@salmanrajz The end of November

LichKing-2234 avatar Nov 01 '22 01:11 LichKing-2234

@LichKing-2234 will the 4.1.0 be released this week? 😊 My team is currently doing planning for the next month and this release plays a big part in our decisions 🙏

hronnro avatar Nov 28 '22 10:11 hronnro

@LichKing-2234 will the 4.1.0 be released this week? 😊 My team is currently doing planning for the next month and this release plays a big part in our decisions 🙏

I will publish a prerelease version, it is already at the final stage.

LichKing-2234 avatar Nov 29 '22 02:11 LichKing-2234

the 4.1.0-rc.1 version has been released.

LichKing-2234 avatar Nov 29 '22 04:11 LichKing-2234

First uninstall agora: npm uninstall react-native-agora Then install pods: cd ios && pod install Now install agora latest version: npm install [email protected] Now install pods again: cd ios && pod install

You are good to go :)

muhammad-talha-3 avatar Nov 29 '22 08:11 muhammad-talha-3