Agora-Flutter-SDK icon indicating copy to clipboard operation
Agora-Flutter-SDK copied to clipboard

AgoraRtcKit/AgoraRtcEngineKit.h' file not found When running in iOS

Open devsideal opened this issue 3 years ago • 24 comments

Describe the bug Getting below error when running in iOS:

Lexical or Preprocessor Issue (Xcode): 'AgoraRtcKit/AgoraRtcEngineKit.h' file not found
/Users/macbook/flutter/.pub-cache/hosted/pub.dartlang.org/agora_rtc_engine-5.3.0/ios/Classes/Base/RtcEnginePlugin.h:1:8

Lexical or Preprocessor Issue (Xcode): 'AgoraRtcKit/AgoraRtcEngineKit.h' file not found
/Users/macbook/flutter/.pub-cache/hosted/pub.dartlang.org/agora_rtc_engine-5.3.0/ios/Classes/AgoraRtcEnginePlugin.h:1:8

Could not build the application for the simulator.
Error launching application on iPhone 11.

To Reproduce Steps to reproduce the behavior:

  1. Create new flutter project
  2. Added agora_rtc_engine: 5.3.0 and run the flutter pub get
  3. Run the project on iOS
  4. Getting above given error

Smartphone (please complete the following information):

  • Device: iPhone11, iOS8.15.2]
  • Agora: agora_rtc_engine: 5.3.0
  • Flutter: 3.0.1

devsideal avatar Jul 27 '22 10:07 devsideal

I believe you should run flutter build ios command first. https://docs.flutter.dev/development/packages-and-plugins/developing-packages#step-2c-add-ios-platform-code-swifthm

littleGnAl avatar Jul 28 '22 05:07 littleGnAl

I'm using Android Studio and trying to run on iOS Simulator, as you suggest i tried to run the command:

Macbooks-MacBook-Pro:flutter_agora_ex MyMac$ flutter build ios --no-codesign
Warning: Building for device with codesigning disabled. You will have to manually codesign before deploying to device.
Building com.devs.agoraex.flutterAgoraEx for device (ios-release)...
Running Xcode build...                                                  
 └─Compiling, linking and signing...                      1,285ms
Xcode build done.                                            8.1s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **
Xcode's output:
↳
    Writing result bundle at path:
        /var/folders/kb/b1k1wt9j1fx7z3l4p_k8v_2h0000gn/T/flutter_tools.19fuOy/flutter_ios_build_temp_dirhjHI5x/temporary_xcresult_bundle

    ld: framework not found Pods_Runner
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    ld: framework not found Pods_Runner
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in dependency order
    /Users/macbook/FlutterProjects/flutter_agora_ex/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to
    8.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target 'AgoraIrisRTC_iOS' from project 'Pods')
    /Users/macbook/FlutterProjects/flutter_agora_ex/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to
    8.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target 'AgoraRtcEngine_iOS' from project 'Pods')

    Result bundle written to path:
        /var/folders/kb/b1k1wt9j1fx7z3l4p_k8v_2h0000gn/T/flutter_tools.19fuOy/flutter_ios_build_temp_dirhjHI5x/temporary_xcresult_bundle

Error (Xcode): Framework not found Pods_Runner
Encountered error while building for device.

devsideal avatar Jul 28 '22 09:07 devsideal

Facing the same issue

itskishankumar avatar Jul 29 '22 09:07 itskishankumar

Any update regarding this issue? Facing the same.

Nitish145 avatar Jul 29 '22 11:07 Nitish145

I just downgraded the sdk version man

On Fri, Jul 29, 2022 at 5:01 PM Nitish Aggarwal @.***> wrote:

Any update regarding this issue? Facing the same.

— Reply to this email directly, view it on GitHub https://github.com/AgoraIO/Agora-Flutter-SDK/issues/727#issuecomment-1199173063, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALGHABR2SNXVL3PEQD25KYLVWO6KBANCNFSM54ZETMXQ . You are receiving this because you commented.Message ID: @.***>

itskishankumar avatar Jul 29 '22 11:07 itskishankumar

I am getting the same error in Flutter.

Khurshidddbek avatar Jul 31 '22 10:07 Khurshidddbek

@itskishankumar Did downgrading the sdk help you?

Khurshidddbek avatar Jul 31 '22 10:07 Khurshidddbek

Looks like the issue with debug build, When I created profile build with the certificates using the command flutter build ios --profile It's working

devsideal avatar Aug 01 '22 05:08 devsideal

Yes downgrading it made it work for me

On Mon, Aug 1, 2022 at 11:25 AM IdealItTechnoDevs @.***> wrote:

Looks like the issue with debug build, When I created profile build with the certificates using the command flutter build ios --profile It's working

— Reply to this email directly, view it on GitHub https://github.com/AgoraIO/Agora-Flutter-SDK/issues/727#issuecomment-1200742573, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALGHABVNYLKH7DKN4LKHVK3VW5RFBANCNFSM54ZETMXQ . You are receiving this because you were mentioned.Message ID: @.***>

itskishankumar avatar Aug 01 '22 05:08 itskishankumar

Looks like the issue with debug build, When I created profile build with the certificates using the command flutter build ios --profile It's working

y,the emulator can't

dujinxin avatar Aug 02 '22 09:08 dujinxin

Yes downgrading it made it work for me

Ok. Thanks bro. but it didn't work for me. I tried downgrading to 3.0.0 and 2.10.4.

Khurshidddbek avatar Aug 02 '22 09:08 Khurshidddbek

Downgrading to 5.2.0 worked for me.

KestasVenslauskas avatar Aug 02 '22 11:08 KestasVenslauskas

Try adding the following line to your ios/Podfile file https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/example/ios/Podfile#L56-L58

littleGnAl avatar Aug 02 '22 15:08 littleGnAl

Looks like the issue with debug build, When I created profile build with the certificates using the command flutter build ios --profile It's working

y,the emulator can't

hello what do you mean by this?

DamilolaDami avatar Aug 04 '22 15:08 DamilolaDami

Just try to run on real ios device, not emulator. It works for me

PolischukIO avatar Aug 05 '22 11:08 PolischukIO

On Fri, Aug 5, 2022 at 12:19 PM PolischukIO @.***> wrote:

Just try to run on real ios device, not emulator. It works for me

— Reply to this email directly, view it on GitHub https://github.com/AgoraIO/Agora-Flutter-SDK/issues/727#issuecomment-1206335316, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALQYYDYUAAC2CQ5UFBZ2CCLVXT2DHANCNFSM54ZETMXQ . You are receiving this because you commented.Message ID: @.***>

On real device or shows black screen Remote view display Any idea why?

DamilolaDami avatar Aug 05 '22 17:08 DamilolaDami

On Fri, Aug 5, 2022 at 12:19 PM PolischukIO @.> wrote: Just try to run on real ios device, not emulator. It works for me — Reply to this email directly, view it on GitHub <#727 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALQYYDYUAAC2CQ5UFBZ2CCLVXT2DHANCNFSM54ZETMXQ . You are receiving this because you commented.Message ID: @.> On real device or shows black screen Remote view display Any idea why?

Maybe you have problems with your Agora account, check id and token of your agora app in your project.

PolischukIO avatar Aug 05 '22 20:08 PolischukIO

It worked in the following environment.

Flutter: 3.0.5 Xcode: 13.3.1 macOS: 12.4 Real Device: iPhone 12 mini, iOS 15.6

I couldn't work if only Real Device is changed to iOS Simulator iPhone 13, iOS 15.4 in the same environment.

b4tchkn avatar Aug 06 '22 06:08 b4tchkn

Same problem can't work on iOS Simulator

zhangtao7740 avatar Aug 27 '22 18:08 zhangtao7740

Same problem doesn't work on emulator. 5.2.0 and 5.3.0. Flutter 3.0.5.

JSBmanD avatar Sep 01 '22 15:09 JSBmanD

Try adding the following line to your ios/Podfile file https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/example/ios/Podfile#L56-L58

Error (Xcode): Building for iOS Simulator, but linking in dylib built for iOS, :(

utkudenis avatar Sep 18 '22 13:09 utkudenis

Our integration test is running on the ios simulator on GitHub action, so it should work fine with the ios simulator, I believe there's some missing config causing the issue.

It's better to raise a new issue and provide a reproducible demo so we can take a look.

littleGnAl avatar Sep 19 '22 02:09 littleGnAl

Any luck on this?

Not working for me on emulator but works on real device.

phodonou avatar Sep 21 '22 22:09 phodonou

Try adding the following line to your ios/Podfile file https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/example/ios/Podfile#L56-L58

I did this.

Then I downgraded to 5.2.0. And I did a flutter clean. My app started now.

phodonou avatar Sep 21 '22 22:09 phodonou

Not working for me on emulator but works on real device.

akanksha820 avatar Sep 28 '22 11:09 akanksha820

I downgrade agora version and try still it's not working

deepak9166 avatar Nov 20 '22 14:11 deepak9166

I fixed this issue by add these two line in pod file.

config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES' config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "i386"

image

deepak9166 avatar Nov 21 '22 19:11 deepak9166

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. If you find this problem please file a new issue with the same description, what happens, logs and the output. All system setups can be slightly different so it's always better to open new issues and reference the related ones. Thanks for your contribution.

github-actions[bot] avatar Nov 17 '23 05:11 github-actions[bot]

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please raise a new issue.

github-actions[bot] avatar Nov 24 '23 06:11 github-actions[bot]