youtube_player_flutter
youtube_player_flutter copied to clipboard
xcode build failure on xcode 15[BUG]
Describe the bug xcode build failure when running in ios 17 using xcode 15 with error Failed to build iOS app Error (Xcode): type argument 'nw_proxy_config_t' (aka 'struct nw_proxy_config *') is neither an Objective-C object nor a block type /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.0.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebsiteDataStore.h:119:46
Parse Issue (Xcode): Could not build module 'WebKit' /build/ios/Debug-iphonesimulator/flutter_inappwebview/flutter_inappwebview.framework/Headers/flutter_inappwebview-Swift.h:893:8
Could not build the application for the simulator. Error launching application on iPhone 15 Pro Max.
To Reproduce Steps to reproduce the behavior: update xcode to latest version 15 try to run the app on iphone ios 17 build will fail
Expected behavior A clear and concise description of what you expected to happen. I expect the app to run without issues but build fails
Screenshots If applicable, add screenshots to help explain your problem.
Technical Details:
- Device: [e.g. iPhone6] iPhone 15 pro max
- OS: [e.g. iOS8.1] IOS 17
- Version [e.g. 22]
Additional context Add any other context about the problem here.
I have the same problem
Temporary Fix, add this to dependency_overrides
flutter_inappwebview:
git:
url: https://github.com/Estrelio/flutter_inappwebview.git
ref: fix-xcode-17
Refere
Still showing the error:
Error (Xcode):
../../../.pub-cache/hosted/pub.dev/youtube_player_flutter-8.1.2/lib/src/player/raw_youtube_playe
r.dart:79:56: Error: The argument type 'Uri' can't be assigned to the parameter type 'WebUri?'.
I tried (and it worked) this temporary solution of hard-changing the file to accept iOS less than 18.
This problem is caused by this package's dependency flutter_inappwebview. They have released a v5.8.0 update that fixes this issue. Please update your dependency to resolve this issue. This is a high priority for us.
In the meantime, consumers of this package can resolve the build error by importing the higher version of the dependency explicitly in their pubspec.yaml
:
flutter_inappwebview: 5.8.0 # required for Xcode 15 until youtube_player_flutter updates its dependencies
@sarbagyastha please, accept the pull request. Thanks