Kingfisher: 关于 UIWebView

Created on 11 Mar 2020  ·  7Comments  ·  Source: onevcat/Kingfisher

ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs

/**
Get the cache path for the key.
It is useful for projects with UIWebView or anyone that needs access to the local file path.

i.e. Replace the `<img src='path_for_key'>` tag in your HTML.

- Note: This method does not guarantee there is an image already cached in the path. It just returns the path
  that the image should be.
  You could use `isImageCached(forKey:)` method to check whether the image is cached under that key.
*/
open func cachePath(forKey key: String, processorIdentifier identifier: String = "") -> String {
    let computedKey = key.computedKey(with: identifier)
    return cachePath(forComputedKey: computedKey)
}

这个 会不会是在影响呢? 打包 苹果提示 用到了 UIWebview

Most helpful comment

@EmDee

If there is a NUL character anywhere in the file, grep will consider it as a binary file.

So I guess if you use that command, not only dSYM files of Kingfisher, but also all your other dependencies would report the same "Binary file matches" error.

Use this to confirm the existing of usage for UIWebView:

nm -a Kingfisher.framework/Kingfisher | grep UIWebView

(And also all your other dependencies to check which is using UIWebView)

All 7 comments

Kingfisher is not using anything related to UIWebView, I am pretty sure that it is not caused by Kingfisher.

我这边也是出现这个警告,我检索了工程所有的UIWebView,除了kingfisher,其他地方并没有使用UIWebView @onevcat

Kingfisher 是开源项目,所有的源码都在这个 repo。如果您找到使用了 UIWebView 的地方,欢迎您直接发 PR 来修正。

我这边也是出现这个警告,我检索了工程所有的UIWebView,除了kingfisher,其他地方并没有使用UIWebView

我检测出是友盟,kf确实没有

@onevcat My Chinese is unfortunately non-existent, so I just want to make sure I understand correctly. We're also seeing the deprecation warning for our app and I ran grep -r "UIWebView" . on the project and it seems to find a matches in Kingfisher's dSYMs:

Binary file ./Carthage/Build/iOS/Kingfisher.framework.dSYM/Contents/Resources/DWARF/Kingfisher matches

Binary file ./Carthage/Build/iOS/KingfisherSwiftUI.framework.dSYM/Contents/Resources/DWARF/KingfisherSwiftUI matches

Any ideas why grep would find matches in those files?

@EmDee

If there is a NUL character anywhere in the file, grep will consider it as a binary file.

So I guess if you use that command, not only dSYM files of Kingfisher, but also all your other dependencies would report the same "Binary file matches" error.

Use this to confirm the existing of usage for UIWebView:

nm -a Kingfisher.framework/Kingfisher | grep UIWebView

(And also all your other dependencies to check which is using UIWebView)

@onevcat Thanks for the pointer! Just for reference: It turns out the Bolts framework was the actual culprit (luckily a new version has just been released with a fix: https://github.com/BoltsFramework/Bolts-ObjC/releases/tag/1.9.1).

Was this page helpful?
0 / 5 - 0 ratings