youtube_player_flutter icon indicating copy to clipboard operation
youtube_player_flutter copied to clipboard

xcode build failure on xcode 15[BUG]

Open AmgadMahmoud opened this issue 1 year ago • 6 comments

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.

AmgadMahmoud avatar Sep 26 '23 05:09 AmgadMahmoud

I have the same problem

manhhaiphp avatar Sep 27 '23 13:09 manhhaiphp

Temporary Fix, add this to dependency_overrides

flutter_inappwebview:
  git:
    url: https://github.com/Estrelio/flutter_inappwebview.git
    ref: fix-xcode-17  

mechaadi avatar Sep 28 '23 09:09 mechaadi

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

rusfearuth avatar Oct 02 '23 06:10 rusfearuth

I tried (and it worked) this temporary solution of hard-changing the file to accept iOS less than 18.

luizKorg avatar Oct 03 '23 01:10 luizKorg

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

babbage avatar Oct 04 '23 21:10 babbage

@sarbagyastha please, accept the pull request. Thanks

jagiro avatar Oct 16 '23 14:10 jagiro