When I tried to create an Archive built, I got this error: WebRTC/WebRTC.h' file not found
Error log
...
#if TARGET_OS_IPHONE
#import <Flutter/Flutter.h>
#elif TARGET_OS_OSX
#import <FlutterMacOS/FlutterMacOS.h>
#endif
#import <Foundation/Foundation.h>
#import <WebRTC/WebRTC.h>
@class FlutterRTCVideoRenderer;
@class FlutterRTCFrameCapturer;
typedef void (^CompletionHandler)(void);
typedef void (^CapturerStopHandler)(CompletionHandler handler);
@interface FlutterWebRTCPlugin : NSObject<FlutterPlugin, RTCPeerConnectionDelegate, FlutterStreamHandler
#if TARGET_OS_OSX
, RTCDesktopMediaListDelegate, RTCDesktopCapturerDelegate
#endif
...
...
@property (nonatomic, strong) RTCPeerConnectionFactory *peerConnectionFactory;
@property (nonatomic, strong) NSMutableDictionary<NSString *, RTCPeerConnection *> *peerConnections;
@property (nonatomic, strong) NSMutableDictionary<NSString *, RTCMediaStream *> *localStreams;
@property (nonatomic, strong) NSMutableDictionary<NSString *, RTCMediaStreamTrack *> *localTracks;
@property (nonatomic, strong) NSMutableDictionary<NSNumber *, FlutterRTCVideoRenderer *> *renders;
@property (nonatomic, strong) NSMutableDictionary<NSString *, CapturerStopHandler> *videoCapturerStopHandlers;
#if TARGET_OS_IPHONE
@property (nonatomic, retain) UIViewController *viewController;/*for broadcast or ReplayKit */
#endif
...
TX205:churchevent2 user219740$ flutter build ios
In file included from /Users/user219740/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_webrtc-0.9.6/ios/Classes/FlutterWebRTC Plugin.m:1: /Users/user219740/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_webrtc-0.9.6/ios/Classes/FlutterWebRTC Plugin.h:8:9: fatal error: 'WebRTC/WebRTC.h' file not found #import <WebRTC/WebRTC.h> ^~~~~~~~~~~~~~~~~ 1 error generated. note: Using new build system note: Planning note: Build preparation complete note: Building targets in dependency order warning: None of the architectures in ARCHS (arm64) are valid. Consider setting ARCHS to $(ARCHS_STANDARD) or updating it to include at least one value from VALID_ARCHS (arm64, arm64e, armv7, armv7s) which is not in EXCLUDED_ARCHS (arm64). (in target 'Runner' from project 'Runner') /Users/user219740/Documents/churchevent2/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.5.99. (in target 'leveldb-library' from project 'Pods') /Users/user219740/Documents/churchevent2/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.5.99. (in target 'ReachabilitySwift' from project 'Pods') /Users/user219740/Documents/churchevent2/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.5.99. (in target 'OrderedSet' from project 'Pods')
Result bundle written to path: /var/folders/l1/hsjw7__j1l33s4q_6rp1b3dh0000ht/T/flutter_tools.EMuCP2/flutter_ios_build_temp_dirZXWjcX/temporary_xcres ult_bundle
Lexical or Preprocessor Issue (Xcode): 'WebRTC/WebRTC.h' file not found /Users/user219740/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_webrtc-0.9.6/ios/Classes/FlutterWebRTCPlug in.h:7:8
Encountered error while building for device.
TX205:ios user219740$ flutter doctor -v [✓] Flutter (Channel beta, 3.3.0-0.1.pre, on macOS 12.5.1 21G83 darwin-arm, locale en-US) • Flutter version 3.3.0-0.1.pre on channel beta at /Users/user219740/development/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision d952ca86d6 (6 weeks ago), 2022-07-27 10:33:00 -0700 • Engine revision fd131c385e • Dart version 2.18.0 (build 2.18.0-271.4.beta) • DevTools version 2.15.0
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0) • Android SDK at /Users/user219740/Library/Android/sdk • Platform android-33, build-tools 33.0.0 • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840) • All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 13F100 • CocoaPods version 1.11.3
[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
[✓] VS Code (version 1.70.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.48.0
[✓] Connected device (3 available) • iPhone 13 (mobile) • 523B0455-7538-4495-85D9-2249B2CC14A6 • ios • com.apple.CoreSimulator.SimRuntime.iOS-15-5 (simulator) • macOS (desktop) • macos • darwin-arm64 • macOS 12.5.1 21G83 darwin-arm • Chrome (web) • chrome • web-javascript • Google Chrome 105.0.5195.102
[✓] HTTP Host Availability • All required HTTP hosts are available
• No issues found!
I have this at the end of my Podfile: ...
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
# snippet begin
if target.name == "WebRTC-SDK"
target.build_configurations.each do |build_configuration|
build_configuration.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = '$(inherited) i386'
end
end
# snippet end
end
end
...
Here is my pubspec.yaml flutter_webrtc: ^0.9.1
I changed it to flutter_webrtc: ^0.9.6 ...
Failed to build iOS app
Error output from Xcode build:
↳
2022-09-10 19:52:14.274 xcodebuild[81276:1436856] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension
Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-09-10 19:52:14.274 xcodebuild[81276:1436856] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension
Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **
Xcode's output:
↳
Writing result bundle at path:
/var/folders/l1/hsjw7__j1l33s4q_6rp1b3dh0000ht/T/flutter_tools.DnnhPF/flutter_ios_build_temp_diriYrd1g/temporary_xcresult_bundle
warning: [CP] WebRTC.xcframework: Unable to find matching slice in 'ios-arm64_x86_64-simulator ios-arm64' for the current build architectures (arm64 armv7) and platform (-iphoneos).
Command CompileSwiftSources failed with a nonzero exit code
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
Command CompileSwiftSources failed with a nonzero exit code
In file included from /Users/user219740/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_webrtc-0.9.6/ios/Classes/FlutterWebRTCPlugin.m:1:
/Users/user219740/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_webrtc-0.9.6/ios/Classes/FlutterWebRTCPlugin.h:8:9: fatal error: 'WebRTC/WebRTC.h' file not found
#import <WebRTC/WebRTC.h>
^~~~~~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
/Users/user219740/Documents/churchevent2/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.5.99. (in target 'leveldb-library' from project 'Pods')
/Users/user219740/Documents/churchevent2/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.5.99. (in target 'ReachabilitySwift' from project 'Pods')
/Users/user219740/Documents/churchevent2/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.5.99. (in target 'OrderedSet' from project 'Pods')
warning: None of the architectures in ARCHS (arm64) are valid. Consider setting ARCHS to $(ARCHS_STANDARD) or updating it to include at least one value from VALID_ARCHS (arm64, arm64e, armv7, armv7s)
which is not in EXCLUDED_ARCHS (arm64). (in target 'Runner' from project 'Runner')
Result bundle written to path:
/var/folders/l1/hsjw7__j1l33s4q_6rp1b3dh0000ht/T/flutter_tools.DnnhPF/flutter_ios_build_temp_diriYrd1g/temporary_xcresult_bundle
Uncategorized (Xcode): Command CompileSwiftSources failed with a nonzero exit code
Lexical or Preprocessor Issue (Xcode): 'WebRTC/WebRTC.h' file not found
/Users/user219740/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_webrtc-0.9.6/ios/Classes/FlutterWebRTCPlugin.h:7:8
Encountered error while building for device.
...
Please help me... I tried many suggestions from the web, but I still get the same error.