升级到iOS 17后无法“flutter run --release”

bgibtngc  于 2023-10-22  发布在  Flutter
关注(0)|答案(2)|浏览(541)

我刚刚升级到Xcode 15.0和iOS 17,然后我遇到了这个问题。如何解决?

Unable to locate DeviceSupport directory with suffix 'DeveloperDiskImage.dmg'. This probably means you don't have Xcode installed, you will need to launch the app manually and logging output will not be shown!
Could not run build/ios/iphoneos/Runner.app on 00008110-0018494802D0401E.
Try launching Xcode and selecting "Product > Run" to fix the problem:
  open ios/Runner.xcworkspace
a8jjtwal

a8jjtwal1#

临时解决方法为IOS.17,请注意以下步骤将使应用程序的建设和运行在IOS.17,XCode.15.
1.将以下内容添加到pdfile:
安装后执行|安装程序|
installer.pods_project.targets.each do|目标|

flutter_additional_ios_build_settings(target) 

target.build_configurations.each do |config| 

  xcconfig_path = config.base_configuration_reference.real_path 

  xcconfig = File.read(xcconfig_path) 

  xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR") 

  File.open(xcconfig_path, "w") { |file| file << xcconfig_mod } 

  config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0' 

end



1.将以下内容添加到pubspec.yaml:
dependency_overrides:
flutter_inappwebview:

git: 

  url: https://github.com/vixez/flutter_inappwebview.git 

  ref: fix-xcode-17

1.在Xcode中更新以下内容

  • 在XCODE中打开IOS文件夹
  • 选择流道
  • 转到生成设置
  • 搜索“用户脚本沙盒”
  • 将其值从“yes”更改为“NO”

a.在XCODE中打开IOS文件夹

b. select Runnner 

c. go to Build Settings 

d. search for "User Script Sandboxing" 

e. change its value from "yes" to "NO"
d7v8vwbk

d7v8vwbk2#

我遇到了这个问题,并通过在我的iPhone上升级iOS版本修复了它。

相关问题