简体   繁体   English

Flutter Xcode 构建失败:“UIImage”没有可见的@interface 声明选择器“imageByPreparingForDisplay”

[英]Flutter Xcode Build Failure: no visible @interface for 'UIImage' declares the selector 'imageByPreparingForDisplay'

ARC Semantic Issue: no visible @interface for 'UIImage' declares the selector 'imageByPreparingForDisplay'

So I have been going through the difficult task of getting my client's Flutter app over to IOS and built.因此,我一直在完成将客户的 Flutter 应用程序转移到 IOS 并构建的艰巨任务。 I have been documenting a long thread here: What is a podfile target, and how to I specify Flutter modules for IOS version?我一直在这里记录一个长线程: What is a podfile target, and how to I specify Flutter modules for IOS version? after I was having a ton of difficulty getting all of my packages imported and the pods working.在我很难导入我的所有包并使 pod 正常工作之后。

Well I got those imported, and any pod warning fixed, but now the fatal error is coming from a pod package itself.好吧,我导入了那些,并且修复了任何 pod 警告,但现在致命错误来自 pod package 本身。 This snippet is taken right from the error log:此片段直接取自错误日志:

/Users/prime/Desktop/ticket_board-master/ticket_board-master/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCoderHelper.m:31:40: error: no visible @interface for 'UIImage' declares the selector 'imageByPreparingForDisplay'
        UIImage *decodedImage = [image imageByPreparingForDisplay];

Note that this app builds for Android, so I don't think its an issue with my existing code, but rather the package itself?请注意,此应用程序是为 Android 构建的,所以我认为这不是我现有代码的问题,而是 package 本身的问题? Maybe I need to change something between IOS and Android?也许我需要在 IOS 和 Android 之间更改一些内容? I tried just googling the error and searching here with no luck.我试着用谷歌搜索错误并在这里搜索但没有运气。 I found another thread here: Can't build on iOS - SDWebImage: ARC Semantic Issue That seems to be the same issue as mine, and nobody has answered it, aside from the last ditch effort of completely deleting and recreating the entire IOS folder.我在这里找到了另一个线程: 无法在 iOS 上构建 - SDWebImage:ARC 语义问题这似乎与我的问题相同,除了完全删除和重新创建整个 IOS 文件夹的最后努力之外,没有人回答它。 Which I tried and doesn't work for me.我试过但对我不起作用。

I also saw this thread here, which suggested going down a version, but also didn't work: https://bytemeta.vip/repo/miguelpruivo/flutter_file_picker/issues/1064我在这里也看到了这个线程,它建议降低一个版本,但也没有用: https://bytemeta.vip/repo/miguelpruivo/flutter_file_picker/issues/1064

I've actually seen several threads on this that go left unanswered.我实际上已经看到了 go 没有回答的几个主题。 I'll keep this updated if I find anything, but its not looking good.如果我发现任何东西,我会保持更新,但它看起来不太好。

This solution works here: https://bytemeta.vip/repo/miguelpruivo/flutter_file_picker/issues/1064此解决方案在这里有效: https://bytemeta.vip/repo/miguelpruivo/flutter_file_picker/issues/1064

However it is just a temporary fix until the newest version is properly fixed.但是,在正确修复最新版本之前,这只是一个临时修复。

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))

  pod 'SDWebImage', '5.12.6'
end

This HAS to go in the podfile.这在 podfile 中为 go。 You can't change the pod package version anywhere else.您无法在其他任何地方更改 pod package 的版本。 It won't work.它不会工作。 You then have to run pod update in your ios sub directory to install the older version.然后,您必须在 ios 子目录中运行pod update以安装旧版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 xcode错误:masterViewController没有可见的@interface声明选择器 - xcode error: No visible @interface for masterViewController declares the selector ____的可见@interface没有声明选择器 - No visible @interface for ____ declares the selector ARC 语义问题:“UIImage”没有可见的@interface 声明选择器 - ARC Semantic Issue : No visible @interface for 'UIImage' declares the selector 没有可见的@interface声明选择器 - No visible @interface declares the selector 'AFHTTPSessionManager' 没有可见的 @interface 声明了选择器 'POST:parameters:progress:success:failure:' - No visible @interface for 'AFHTTPSessionManager' declares the selector 'POST:parameters:progress:success:failure:' Xcode错误消息-ViewController没有可见的@interface声明选择器 - Xcode Error Message - No visible @interface for ViewController declares the selector 不可见的'MyController'的@interface声明了选择器 - Not visible @interface for 'MyController' declares the selector 'NSData'没有可见的@interface声明选择器 - No visible @interface for 'NSData' declares the selector “没有可见的@interface声明选择器”错误 - “No visible @interface declares the selector” error 没有可见的@interface声明选择器'deleteAllObjects' - No Visible @interface declares the selector 'deleteAllObjects'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM