AgoraRtcKit/AgoraRtcEngineKit.h' file not found When running in iOS
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:
- Create new flutter project
- Added agora_rtc_engine: 5.3.0 and run the
flutter pub get - Run the project on iOS
- 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
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
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.
Facing the same issue
Any update regarding this issue? Facing the same.
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: @.***>
I am getting the same error in Flutter.
@itskishankumar Did downgrading the sdk help you?
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
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: @.***>
Looks like the issue with debug build, When I created profile build with the certificates using the command
flutter build ios --profileIt's working
y,the emulator can't
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.
Downgrading to 5.2.0 worked for me.
Try adding the following line to your ios/Podfile file
https://github.com/AgoraIO/Agora-Flutter-SDK/blob/master/example/ios/Podfile#L56-L58
Looks like the issue with debug build, When I created profile build with the certificates using the command
flutter build ios --profileIt's workingy,the emulator can't
hello what do you mean by this?
Just try to run on real ios device, not emulator. It works for me
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?
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.
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.
Same problem can't work on iOS Simulator
Same problem doesn't work on emulator. 5.2.0 and 5.3.0. Flutter 3.0.5.
Try adding the following line to your
ios/Podfilefile 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, :(
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.
Any luck on this?
Not working for me on emulator but works on real device.
Try adding the following line to your
ios/Podfilefile 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.
Not working for me on emulator but works on real device.
I downgrade agora version and try still it's not working
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"

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.
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.