Asynchronous image loading framework.

Related tags

Image YYWebImage
Overview

YYWebImage

License MIT  Carthage compatible  CocoaPods  CocoaPods  Support  Build Status

ProgressiveBlur~

YYWebImage is an asynchronous image loading framework (a component of YYKit).

It was created as an improved replacement for SDWebImage, PINRemoteImage and FLAnimatedImage.

It use YYCache to support memory and disk cache, and YYImage to support WebP/APNG/GIF image decode.
See these project for more information.

Features

  • Asynchronous image load from remote or local URL.
  • Animated WebP, APNG, GIF support (dynamic buffer, lower memory usage).
  • Baseline/progressive/interlaced image decode support.
  • Image loading category for UIImageView, UIButton, MKAnnotationView and CALayer.
  • Image effect: blur, round corner, resize, color tint, crop, rotate and more.
  • High performance memory and disk image cache.
  • High performance image loader to avoid main thread blocked.
  • Fully documented.

Usage

Load image from URL

// load from remote url
imageView.yy_imageURL = [NSURL URLWithString:@"http://github.com/logo.png"];
	
// load from local url
imageView.yy_imageURL = [NSURL fileURLWithPath:@"/tmp/logo.png"];

Load animated image

// just replace `UIImageView` with `YYAnimatedImageView`
UIImageView *imageView = [YYAnimatedImageView new];
imageView.yy_imageURL = [NSURL URLWithString:@"http://github.com/ani.webp"];

Load image progressively

// progressive
[imageView yy_setImageWithURL:url options:YYWebImageOptionProgressive];
	
// progressive with blur and fade animation (see the demo at the top of this page)
[imageView yy_setImageWithURL:url options:YYWebImageOptionProgressiveBlur | YYWebImageOptionSetImageWithFadeAnimation];

Load and process image

// 1. download image from remote
// 2. get download progress
// 3. resize image and add round corner
// 4. set image with a fade animation
	
[imageView yy_setImageWithURL:url
   placeholder:nil
   options:YYWebImageOptionSetImageWithFadeAnimation
   progress:^(NSInteger receivedSize, NSInteger expectedSize) {
       progress = (float)receivedSize / expectedSize;
   }
   transform:^UIImage *(UIImage *image, NSURL *url) {
       image = [image yy_imageByResizeToSize:CGSizeMake(100, 100) contentMode:UIViewContentModeCenter];
       return [image yy_imageByRoundCornerRadius:10];
   }
   completion:^(UIImage *image, NSURL *url, YYWebImageFromType from, YYWebImageStage stage, NSError *error) {
       if (from == YYWebImageFromDiskCache) {
           NSLog(@"load from disk cache");
       }
   }];

Image Cache

YYImageCache *cache = [YYWebImageManager sharedManager].cache;
    
// get cache capacity
cache.memoryCache.totalCost;
cache.memoryCache.totalCount;
cache.diskCache.totalCost;
cache.diskCache.totalCount;
    
// clear cache
[cache.memoryCache removeAllObjects];
[cache.diskCache removeAllObjects];
    
// clear disk cache with progress
[cache.diskCache removeAllObjectsWithProgressBlock:^(int removedCount, int totalCount) {
   // progress
} endBlock:^(BOOL error) {
   // end
}];

Installation

CocoaPods

  1. Update cocoapods to the latest version.
  2. Add pod 'YYWebImage' to your Podfile.
  3. Run pod install or pod update.
  4. Import <YYWebImage/YYWebImage.h>.
  5. Notice: it doesn't include WebP subspec by default, if you want to support WebP format, you may add pod 'YYImage/WebP' to your Podfile. You may call YYImageWebPAvailable() to check whether the WebP subspec is installed correctly.

Carthage

  1. Add github "ibireme/YYWebImage" to your Cartfile.
  2. Run carthage update --platform ios and add the framework to your project.
  3. Import <YYWebImage/YYWebImage.h>.
  4. Notice: carthage framework doesn't include webp component, if you want to support WebP format, use CocoaPods or install manually. You may call YYImageWebPAvailable() to check whether the WebP library is installed correctly.

Manually

  1. Download all the files in the YYWebImage subdirectory.
  2. Add the source files to your Xcode project.
  3. Link with required frameworks:
    • UIKit
    • CoreFoundation
    • QuartzCore
    • AssetsLibrary
    • ImageIO
    • Accelerate
    • MobileCoreServices
    • sqlite3
    • libz
  4. Import YYWebImage.h.
  5. Notice: if you want to support WebP format, you may add Vendor/WebP.framework(static library) to your Xcode project.

Documentation

Full API documentation is available on CocoaDocs.
You can also install documentation locally using appledoc.

Requirements

This library requires iOS 6.0+ and Xcode 8.0+.

License

YYWebImage is provided under the MIT license. See LICENSE file for details.



中文介绍

ProgressiveBlur~

YYWebImage 是一个异步图片加载框架 (YYKit 组件之一).

其设计目的是试图替代 SDWebImage、PINRemoteImage、FLAnimatedImage 等开源框架,它支持这些开源框架的大部分功能,同时增加了大量新特性、并且有不小的性能提升。

它底层用 YYCache 实现了内存和磁盘缓存, 用 YYImage 实现了 WebP/APNG/GIF 动图的解码和播放。
你可以查看这些项目以获得更多信息。

特性

  • 异步的图片加载,支持 HTTP 和本地文件。
  • 支持 GIF、APNG、WebP 动画(动态缓存,低内存占用)。
  • 支持逐行扫描、隔行扫描、渐进式图像加载。
  • UIImageView、UIButton、MKAnnotationView、CALayer 的 Category 方法支持。
  • 常见图片处理:模糊、圆角、大小调整、裁切、旋转、色调等。
  • 高性能的内存和磁盘缓存。
  • 高性能的图片设置方式,以避免主线程阻塞。
  • 每个类和方法都有完善的文档注释。

用法

从 URL 加载图片

// 加载网络图片
imageView.yy_imageURL = [NSURL URLWithString:@"http://github.com/logo.png"];
	
// 加载本地图片
imageView.yy_imageURL = [NSURL fileURLWithPath:@"/tmp/logo.png"];

加载动图

// 只需要把 `UIImageView` 替换为 `YYAnimatedImageView` 即可。
UIImageView *imageView = [YYAnimatedImageView new];
imageView.yy_imageURL = [NSURL URLWithString:@"http://github.com/ani.webp"];

渐进式图片加载

// 渐进式:边下载边显示
[imageView yy_setImageWithURL:url options:YYWebImageOptionProgressive];
	
// 渐进式加载,增加模糊效果和渐变动画 (见本页最上方的GIF演示)
[imageView yy_setImageWithURL:url options:YYWebImageOptionProgressiveBlur | YYWebImageOptionSetImageWithFadeAnimation];

加载、处理图片

// 1. 下载图片
// 2. 获得图片下载进度
// 3. 调整图片大小、加圆角
// 4. 显示图片时增加一个淡入动画,以获得更好的用户体验
	
[imageView yy_setImageWithURL:url
   placeholder:nil
   options:YYWebImageOptionSetImageWithFadeAnimation
   progress:^(NSInteger receivedSize, NSInteger expectedSize) {
       progress = (float)receivedSize / expectedSize;
   }
   transform:^UIImage *(UIImage *image, NSURL *url) {
       image = [image yy_imageByResizeToSize:CGSizeMake(100, 100) contentMode:UIViewContentModeCenter];
       return [image yy_imageByRoundCornerRadius:10];
   }
   completion:^(UIImage *image, NSURL *url, YYWebImageFromType from, YYWebImageStage stage, NSError *error) {
       if (from == YYWebImageFromDiskCache) {
           NSLog(@"load from disk cache");
       }
   }];

图片缓存

YYImageCache *cache = [YYWebImageManager sharedManager].cache;
    
// 获取缓存大小
cache.memoryCache.totalCost;
cache.memoryCache.totalCount;
cache.diskCache.totalCost;
cache.diskCache.totalCount;
    
// 清空缓存
[cache.memoryCache removeAllObjects];
[cache.diskCache removeAllObjects];
    
// 清空磁盘缓存,带进度回调
[cache.diskCache removeAllObjectsWithProgressBlock:^(int removedCount, int totalCount) {
   // progress
} endBlock:^(BOOL error) {
   // end
}];

安装

CocoaPods

  1. 将 cocoapods 更新至最新版本.
  2. 在 Podfile 中添加 pod 'YYWebImage'
  3. 执行 pod installpod update
  4. 导入 <YYWebImage/YYWebImage.h>。
  5. 注意:pod 配置并没有包含 WebP 组件, 如果你需要支持 WebP,可以在 Podfile 中添加 pod 'YYImage/WebP'。你可以调用 YYImageWebPAvailable() 来检查一下 WebP 组件是否被正确安装。

Carthage

  1. 在 Cartfile 中添加 github "ibireme/YYWebImage"
  2. 执行 carthage update --platform ios 并将生成的 framework 添加到你的工程。
  3. 导入 <YYWebImage/YYWebImage.h>。
  4. 注意: carthage framework 并没有包含 webp 组件。如果你需要支持 WebP,可以用 CocoaPods 安装,或者手动安装。

手动安装

  1. 下载 YYWebImage 文件夹内的所有内容。
  2. 将 YYWebImage 内的源文件添加(拖放)到你的工程。
  3. 链接以下 frameworks:
    • UIKit
    • CoreFoundation
    • QuartzCore
    • AssetsLibrary
    • ImageIO
    • Accelerate
    • MobileCoreServices
    • sqlite3
    • libz
  4. 导入 YYWebImage.h
  5. 注意:如果你需要支持 WebP,可以将 Vendor/WebP.framework(静态库) 加入你的工程。你可以调用 YYImageWebPAvailable() 来检查一下 WebP 组件是否被正确安装。

文档

你可以在 CocoaDocs 查看在线 API 文档,也可以用 appledoc 本地生成文档。

系统要求

该项目最低支持 iOS 6.0Xcode 8.0

许可证

YYWebImage 使用 MIT 许可证,详情见 LICENSE 文件。

相关链接

移动端图片格式调研

iOS 处理图片的一些小 Tip

Comments
  • 发现一个问题就是YYWebImageFromType 状态不对,已经缓存到磁盘中,但是读取的时候直接从内存中读取

    发现一个问题就是YYWebImageFromType 状态不对,已经缓存到磁盘中,但是读取的时候直接从内存中读取

    [imageView yy_setImageWithURL:[NSURL URLWithString:photoImage.smallImage]
                          placeholder:[UIImage createImageWithColor:VSD_COLOR_FROM_HEX(0xfcfaf9, 1.0)]
                              options:YYWebImageOptionSetImageWithFadeAnimation
                           completion:^(UIImage *image, NSURL *url, YYWebImageFromType from, YYWebImageStage stage, NSError *error) {
                               NSLog(@"from : %d", from) ;
                               NSLog(@"url:%@ ---> image: %@",url, image) ;
                               UIImage *i = [[YYWebImageManager sharedManager].cache getImageForKey:url.absoluteString] ;
                               NSLog(@"image ---- : %@", i ) ;
                           }] ;
    

    重新滑动一下cell就好了,数据就看到了

    bug 
    opened by af8229 20
  • 可能的图片错误问题

    可能的图片错误问题

    图片的Url和对应的UIImage不一致。 目前不确定是不是YYWebImage的问题,请帮忙提供一些思路。 涉及到的代码片段如下:

    [itemView yy_setImageWithURL:[NSURL URLWithString:imageUrl] placeholder:self.defaultImage];
    
    let manager = YYWebImageManager.sharedManager()
    manager.requestImageWithURL(url, options: .AllowBackgroundTask, progress: nil, transform: nil, completion: {
                image, url, from, stage, error in
                completion?()
            })
    
    let manager = YYWebImageManager.sharedManager()
    let imageUrl = NSURL(string: urlString.encodeUrlByUTF8())
    return manager.requestImageWithURL(imageUrl, options: .IgnoreImageDecoding, progress: nil,  transform: nil, completion: {
                image, url, from, stage, error in
                Async.main {
                    if error == nil && image != nil {
                        successCallback(image)
                    } else {
                        failCallback?(error)
                    }
                }
            })
    
    self.requestImageWithURL(URL, options: .AllowBackgroundTask, progress: { receivedSize, expectedSize in
                if downloadProgressBlock != nil {
                    dispatch_async(callbackQueue ?? dispatch_get_main_queue(), {
                        let progress = CGFloat(receivedSize) / CGFloat(expectedSize)
                        downloadProgressBlock?(progress)
                    })
                }
                }, transform: nil, completion: {
                    image, url, from, stage, error in
                    if error != nil {
                        dispatch_async(callbackQueue ?? dispatch_get_main_queue(), {
                            completion?(nil, error)
                        })
                        return
                    }
                    if stage == .Finished {
                        dispatch_async(callbackQueue ?? dispatch_get_main_queue(), {
                            completion?(image.CGImage, error)
                        })
                    }
            })
    

    由于调用的位置和方法都不同,而发生了同样的问题,因此我们猜测问题不是调用层造成的。 除此此外,是否可能与图片的格式有关?

    opened by yxztj 15
  • iphone6上加载大图显示模糊

    iphone6上加载大图显示模糊

    开发中遇到一个问题,同一张图片,在iphone6p上显示是没有问题的但是在iphone6上就会很模糊,后来换成SDWebImage两个机型上都没有问题,不知道有没有人遇到过同样的问题 用的是这个方法做的请求

    • (void)loadYYWebImageWithURL:(NSString *)url placeholderImage:(UIImage *)placeholder { [self yy_setImageWithURL:[NSURL URLWithString:url] placeholder:placeholder options:YYWebImageOptionSetImageWithFadeAnimation progress:^(NSInteger receivedSize, NSInteger expectedSize) {

      } transform:nil completion:^(UIImage * _Nullable image, NSURL * _Nonnull url, YYWebImageFromType from, YYWebImageStage stage, NSError * _Nullable error) {

      }]; }

    opened by zyi1992 8
  • Cache question about `[UIImageView yy_setImageWithURL:placeholder:options:progress:transform:completion:]`

    Cache question about `[UIImageView yy_setImageWithURL:placeholder:options:progress:transform:completion:]`

    Thanks for the lib.

    I have a question on the [UIImageView yy_setImageWithURL:placeholder:options:progress:transform:completion:] method.

    It seems that the method will cache the original image download from network. If I defined some transform action such as adding corner radius, will the new image be cached? If not, how about the list performance?

    Thanks.

    question 
    opened by xilin 8
  • 用yy_cancelCurrentImageRequest取消当前图片的请求似乎不起作用

    用yy_cancelCurrentImageRequest取消当前图片的请求似乎不起作用

    我在UICollectionViewCell里面用下面代码加载图片

    [imageView yy_setImageWithURL:[NSURL URLWithString:avatarUrl] placeholder:[UIImage imageNamed:@"ic_message_del_robot"] options:YYWebImageOptionAvoidSetImage progress:nil transform:nil completion:^(UIImage * _Nullable image, NSURL * _Nonnull url, YYWebImageFromType from, YYWebImageStage stage, NSError * _Nullable error) {
      if (!error && stage == YYWebImageStageFinished) {
        imageView.image = image;
        imageView.backgroundColor = [UIColor clearColor];
      }
    }];
    

    在prepareForReuse里面取消加载

    [imageView yy_cancelCurrentImageRequest];
    

    可是我发现有时候一个图片已经取消了结果还是得到回调了,在网络慢的时候就有可能出现前一个图片已经取消,结果在后一个图片回调之后运行前一个图片的回调,结果就是图片错了

    bug 
    opened by ufosky 7
  • 使用YYWebImage加载图片完成后,退到后台再回来刷新一下页面图片重新load时图片会闪一下

    使用YYWebImage加载图片完成后,退到后台再回来刷新一下页面图片重新load时图片会闪一下

    如题,正常的使用会出现这种问题,个人考虑到应该是退到后台,memory cache 被清除了,再次加载时,memory cache里找不到图片,这个时候图片里的内容换成了placeholder,之后又有一些操作导致后面从disk cache里加载出来图片有一定延时,从而导致图片出现一定的空白期 我个人的改法是 NSString *key = [[YYWebImageManager sharedManager] cacheKeyForURL:[NSURL URLWithString:url]]; UIImage *lastPreviousCachedImage = [[YYWebImageManager sharedManager].cache getImageForKey:key]; [self yy_setImageWithURL:[NSURL URLWithString:url] placeholder:lastPreviousCachedImage?lastPreviousCachedImage:placeholder options:0 progress:^(NSInteger receivedSize, NSInteger expectedSize) { } transform:^UIImage * _Nullable(UIImage * _Nonnull image, NSURL * _Nonnull url) { return image; } completion:^(UIImage * _Nullable image, NSURL * _Nonnull url, YYWebImageFromType from, YYWebImageStage stage, NSError * _Nullable error) { if (completed) { completed(image,error,url,NO); } }]; 这个也是SDWebImage里的一种做法 ,这个会解决闪的问题,但是我的疑问是为什么不能直接用disk cache里的图片 比如这样 NSString *key = [[YYWebImageManager sharedManager] cacheKeyForURL:[NSURL URLWithString:url]]; UIImage *lastPreviousCachedImage = [[YYWebImageManager sharedManager].cache getImageForKey:key]; if(lastPreviousCachedImage){ self.image = lastPreviousCachedImage; }else { [self yy_setImageWithURL:[NSURL URLWithString:url] placeholder:placeholder options:0 progress:^(NSInteger receivedSize, NSInteger expectedSize) { } transform:^UIImage * _Nullable(UIImage * _Nonnull image, NSURL * _Nonnull url) { return image; } completion:^(UIImage * _Nullable image, NSURL * _Nonnull url, YYWebImageFromType from, YYWebImageStage stage, NSError * _Nullable error) { if (completed) { completed(image,error,url,NO); } }]; } 这样操作会有什么问题吗,个人的理解可能有些肤浅,希望得到你的回复?

    opened by zyi1992 7
  • 请教关于内存泄漏的问题

    请教关于内存泄漏的问题

    您好,

    不好意思,又打扰了。

    我在测试YYWebImageExample时发现类似“内存泄露”的问题:如果创建大量的图片,并反复对YYWebImageExample进行pushViewController和返回(我修改了程序让每次push后下载和显示不同的图片)。这样内存使用量会快速上升。

    我尝试在viewDidDisappear中调用[[YYImageCache sharedCache].memoryCache removeAllObjects]释放内存,“返回”后内存是降下来了,但是还不是完全释放。而且,随着不断多次的push、返回再push这样下去(即下载大量的图片之后),内存的使用量就非常可观了。

    我在viewDidDisappear中还将所有visibleCells的webImageView设为nil,也没有效果。

    请问这种情况内存是被消耗在哪里呢?是否有办法在离开显示图片的viewCtr尽量释放全部内存?我的应用场景需要显示大量图片,内存的有效控制比读取速度更重要(从磁盘读取的速度完全够)。

    谢谢!

    opened by speedpursuer 7
  • yy_setImageWithURL not working properly with YYAnimatedImageView

    yy_setImageWithURL not working properly with YYAnimatedImageView

    I'm trying to make a collection view filled with animated GIFs:

    The custom cell looks like this:

    @interface GifCollectionViewCell : UICollectionViewCell
    @property (nonatomic) YYAnimatedImageView *imageView;
    @end
    

    And I'm using yy_setImageWithURL to set the image:

    if ([cell isKindOfClass:[GifCollectionViewCell class]]) {
        [_cell.imageView yy_setImageWithURL:[self getImageURLForIndexPath:indexPath] options:YYWebImageOptionProgressiveBlur];
    }
    

    The images shows but are not animation any more. Just still pictures.

    Is this supposed to happen?

    discussion 
    opened by skyline75489 7
  • +[YYWebImageOperation _networkThreadMain:] crash

    +[YYWebImageOperation _networkThreadMain:] crash

    麻烦解决下这个问题,

     0
    CoreFoundation
    0x00000001fe9577c8
    CFDataGetLength + 16 + 456648 
    1
    CFNetwork
    0x00000001ff13cb40
    invocation function for block in URLConnectionClient_Classic::_delegate_didReceiveDataArray() + 236 + 1633088 
    2
    CFNetwork
    0x00000001ff13bc94
    invocation function for block in URLConnectionClient_Classic::_withDelegateAsync(char const*, void (_CFURLConnection*, CFURLConnectionClientCurrent_VMax const*) block_pointer) + 108 + 1629332 
    3
    libdispatch.dylib
    0x00000001fe43e484
    0x1fe3dd000 + 398468 
    4
    libdispatch.dylib
    0x00000001fe3e1e20
    0x1fe3dd000 + 20000 
    5
    CFNetwork
    0x00000001ff21b06c
    RunloopBlockContext::_invoke_block(void const*, void*) + 36 + 2543724 
    6
    CoreFoundation
    0x00000001fe9336dc
    CFArrayApplyFunction + 80 + 308956 
    7
    CFNetwork
    0x00000001ff21af20
    RunloopBlockContext::perform() + 128 + 2543392 
    8
    CFNetwork
    0x00000001ff21c0f4
    MultiplexerSource::perform() + 312 + 2547956 
    9
    CFNetwork
    0x00000001ff21be54
    MultiplexerSource::_perform(void*) + 60 + 2547284 
    10
    CoreFoundation
    0x00000001fe9941cc
    __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24 + 704972 
    11
    CoreFoundation
    0x00000001fe99414c
    __CFRunLoopDoSource0 + 88 + 704844 
    12
    CoreFoundation
    0x00000001fe993a30
    __CFRunLoopDoSources0 + 176 + 703024 
    13
    CoreFoundation
    0x00000001fe98e8fc
    __CFRunLoopRun + 1040 + 682236 
    14
    CoreFoundation
    0x00000001fe98e1cc
    CFRunLoopRunSpecific + 436 + 680396 
    15
    Foundation
    0x00000001ff383404
    -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 300 + 33796 
    16
    Foundation
    0x00000001ff3bedf4
    -[NSRunLoop(NSRunLoop) run] + 88 + 278004 
    17
    XXLife
    0x000000010590fb18
    +[YYWebImageOperation _networkThreadMain:] (in YppLife) (YYWebImageOperation.m (Line 197)) + 15792920 
    18
    Foundation
    0x00000001ff4b61ac
    __NSThread__start__ + 1040 + 1290668 
    19
    libsystem_pthread.dylib
    0x00000001fe61f2ac
    0x1fe614000 + 45740 
    20
    libsystem_pthread.dylib
    0x00000001fe61f20c
    _pthread_start + 45580 
    
    opened by zhzDeveloper 6
  • 使用了 YYWebImage 导致了CPU 使用率过高的问题。

    使用了 YYWebImage 导致了CPU 使用率过高的问题。

    • 在一个列表界面中的图片展示使用的是 YYWebImage,滑动的很流畅,但是发现 CPU 的使用率过高,峰值在 release 的情况下能达到110,在 Prifile 中定位了一下,都是
    - (void)setImage:(UIImage *)image imageData:(NSData *)imageData forKey:(NSString *)key withType:(YYImageCacheType)type 
    

    这个方法非常耗时,请问能否有降低的方法。

    opened by mitchell-dream 6
  • 如果图片正在下载,是否可以返回当前状态?

    如果图片正在下载,是否可以返回当前状态?

    您好,

    正如YYWebImageExample中的例子,如果在前面的图片还没有下载完成时,用户滚动到下面,再回到上面,前面正在下载的图片又会重新下载,而不是返回下载中的状态继续,导致重复下载。

    对于这种情况(利用UITableView减少内存使用),又希望所有正在下载的图片都保持下载完成(或显示失败),有什么好的办法?

    多谢指点!

    opened by speedpursuer 6
  • semaphore_wait_trap crash

    semaphore_wait_trap crash

    崩溃日志

    Incident Identifier: A21B2E2E-51BA-47CB-9A13-47B9DC071374 Hardware Model: iPhone11,6 Process: Xxxxx [315] Path: /private/var/containers/Bundle/Application/85052CC9-676A-47F1-8A67-4D75FECCAFC3/Xxxxx.app/Xxxxx Identifier: XXXX Version: 4.6.0 (3691) AppStoreTools: 13F15 AppVariant: 1:iPhone11,6:15 Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: XXXXX [476]

    Date/Time: 2022-05-25 23:46:18.3391 +0530 Launch Time: 2022-05-25 23:43:52.0309 +0530 OS Version: iPhone OS 15.4.1 (19E258) Release Type: User Baseband Version: 4.03.02 Report Version: 104

    Exception Type: EXC_CRASH (SIGKILL) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Reason: FRONTBOARD 2343432205 <RBSTerminateContext| domain:10 code:0x8BADF00D explanation:[application:315] failed to terminate gracefully after 5.0s ProcessVisibility: Background ProcessState: Running WatchdogEvent: process-exit WatchdogVisibility: Background WatchdogCPUStatistics: ( "Elapsed total CPU time (seconds): 22.090 (user 22.090, system 0.000), 71% CPU", "Elapsed application CPU time (seconds): 3.278, 11% CPU" ) reportType:CrashLog maxTerminationResistance:Interactive>

    Triggered by Thread: 0

    Kernel Triage: VM - pmap_enter failed with resource shortage VM - Compressor failed a blocking pager_get VM - Compressor failed a blocking pager_get VM - Compressor failed a blocking pager_get VM - Compressor failed a blocking pager_get

    Thread 0 name: Thread 0 Crashed: 0 libsystem_kernel.dylib 0x00000001f1f4a51c semaphore_wait_trap + 8 1 libdispatch.dylib 0x00000001ba248fc8 dispatch_sema4_wait + 28 (lock.c:139) 2 libdispatch.dylib 0x00000001ba249670 dispatch_semaphore_wait_slow + 132 (semaphore.c:132) 3 Xxxxx 0x0000000104f0d968 -[YYDiskCache containsObjectForKey:] + 52 (YYDiskCache.m:214) 4 Xxxxx 0x0000000104f7ece4 -[YYImageCache containsImageForKey:withType:] + 88 (YYImageCache.m:179) 5 Xxxxx 0x00000001036de568 VipAudiencesCheckInListView.append(message:) + 1244 (VipAudiencesCheckInListView.swift:134) 6 Xxxxx 0x00000001036dbf78 VipAudiencesCheckInListView.appendMessageData(message:) + 220 (VipAudiencesCheckInListView.swift:123) 7 Xxxxx 0x0000000101b098f8 WatchRtmDriver.append(message:) + 35088 (WatchRtmDriver.swift:889) 8 Xxxxx 0x0000000101afd9d0 WatchRtmDriver.receiveMessage(message:) + 64592 (WatchRtmDriver.swift:481) 9 Xxxxx 0x0000000102411a8c protocol witness for RTMMessageReceiceDelegate.receiveMessage(message:) in conformance LiveRtmDriverBase + 36 (:0) 10 Xxxxx 0x000000010281be40 closure #1 in closure #1 in closure #1 in RtmManagerAnswer.dispatchBatchRtmMessage(messageArr:) + 148 (RtmManager.swift:676) 11 Xxxxx 0x00000001048e5cf4 closure #1 in WeakReferenceArray.excuteObject(:) + 288 (WeakReferenceArray.swift:49) 12 libswiftCore.dylib 0x00000001bf0dd3d8 Sequence.forEach(:) + 748 (Sequence.swift:758) 13 Xxxxx 0x00000001048e5ba8 WeakReferenceArray.excuteObject(_:) + 408 (WeakReferenceArray.swift:48) 14 Xxxxx 0x000000010281bd88 closure #1 in closure #1 in RtmManagerAnswer.dispatchBatchRtmMessage(messageArr:) + 248 (RtmManager.swift:675) 15 Xxxxx 0x00000001013213f4 0x100f6c000 + 3888116 16 libdispatch.dylib 0x00000001ba246e68 _dispatch_call_block_and_release + 32 (init.c:1517) 17 libdispatch.dylib 0x00000001ba248a2c _dispatch_client_callout + 20 (object.m:560) 18 libdispatch.dylib 0x00000001ba256f48 _dispatch_main_queue_drain + 928 (inline_internal.h:2622) 19 libdispatch.dylib 0x00000001ba256b98 _dispatch_main_queue_callback_4CF + 44 (queue.c:7770) 20 CoreFoundation 0x00000001ba59a2f0 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 16 (CFRunLoop.c:1795) 21 CoreFoundation 0x00000001ba5541f4 __CFRunLoopRun + 2532 (CFRunLoop.c:3144) 22 CoreFoundation 0x00000001ba5676b8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268) 23 GraphicsServices 0x00000001d6601374 GSEventRunModal + 164 (GSEvent.c:2200) 24 UIKitCore 0x00000001bcecce88 -[UIApplication _run] + 1100 (UIApplication.m:3511) 25 UIKitCore 0x00000001bcc4e5ec UIApplicationMain + 364 (UIApplication.m:5064) 26 Xxxxx 0x0000000101170d50 0x100f6c000 + 2116944 27 dyld 0x0000000108319ce4 start + 520 (dyldMain.cpp:879)

    opened by 405092901 0
  • 当我获取缓存到本地图片的地址时,发现返回的地址和实际的缓存地址不相符。

    当我获取缓存到本地图片的地址时,发现返回的地址和实际的缓存地址不相符。

    NSString *key = [[YYWebImageManager sharedManager] cacheKeyForURL:[NSURL URLWithString:url]]; return [[YYWebImageManager sharedManager].cache.diskCache cachePathForKey:key]; 使用此代码获取本地图片地址在: Library/Caches/com.ibireme.yykit/images/0cafbf7b0ed13b05fd202a69ce29f1ad 但是实际的地址在: Library/Caches/com.ibireme.yykit/images/data/0cafbf7b0ed13b05fd202a69ce29f1ad

    opened by ericdayang 0
Releases(1.0.4)
Owner
null
LCWebImage - An asynchronous image loading framework based on AFNetworking.

LCWebImage is an asynchronous image loading framework based on AFNetworking, which supports memory and disk caching, and provides functions such as custom caching, custom image decoding, and custom network configuration.

LiuChang 27 Jul 23, 2022
Twitter Image Pipeline is a robust and performant image loading and caching framework for iOS clients

Twitter Image Pipeline (a.k.a. TIP) Background The Twitter Image Pipeline is a streamlined framework for fetching and storing images in an application

Twitter 1.8k Dec 17, 2022
Asynchronous image downloader with cache support as a UIImageView category

This library provides an async image downloader with cache support. For convenience, we added categories for UI elements like UIImageView, UIButton, M

null 24.4k Jan 5, 2023
DGImageView - Asynchronous image downloader with cache. Supports gif too

DGImageView Installation Usage DGImageView Asynchronous image downloader with cache. Supports gif, memory cache, disk cache features. Installation Xco

donggyu 1 Jan 1, 2022
SwiftUI Image loading and Animation framework powered by SDWebImage

SDWebImageSwiftUI What's for SDWebImageSwiftUI is a SwiftUI image loading framework, which based on SDWebImage. It brings all your favorite features f

null 1.6k Jan 6, 2023
EbImagesSwiftUI - SDWebImageSwiftUI - a SwiftUI image loading framework, which based on SDWebImage

SDWebImageSwiftUI What's for SDWebImageSwiftUI is a SwiftUI image loading framew

An Tran 1 Jan 6, 2022
PublisherKit - An open source implementation of Apple's Combine framework for processing asynchronous events over time

Publisher Kit Overview PublisherKit provides a declarative Swift API for processing asynchronous events over time. It is an open source version of App

null 5 Feb 22, 2022
Image loading system

Image Loading System Nuke ILS provides an efficient way to download and display images in your app. It's easy to learn and use thanks to a clear and c

Alexander Grebenyuk 7k Dec 31, 2022
Lazy image loading for SwiftUI

A missing piece in SwiftUI that provides lazy image loading.

Alexander Grebenyuk 9 Dec 26, 2022
Lightweight and customisable async image loading in SwiftUI. Supports on-disk storage, placeholders and more!

Asyncrounously download and display images in Swift UI. Supports progress indicators, placeholders and image transitions. RemoteImageView Asyncrounous

Callum Trounce 192 Dec 7, 2022
SwiftUI project to show ActivityIndicator above Image while loading

ImageWithActivityIndicatorDemo SwiftUI project to show ActivityIndicator above Image while loading ImageWithActivityIndicatorDemo is a demo app that s

Ali Adam 4 May 27, 2021
SwiftUI view that download and display image from URL and displaying Activity Indicator while loading .

ViewWithActivityIndicator ViewWithActivityIndicator is a SwiftUI view that download and display image from URL and displaying Activity Indicator while

Ali Adam 28 Feb 3, 2022
APNGKit is a high performance framework for loading and displaying APNG images in iOS and macOS.

APNGKit is a high performance framework for loading and displaying APNG images in iOS and macOS. It's built on top of a modified version of libpng wit

Wei Wang 2.1k Dec 30, 2022
Advanced framework for loading, caching, processing, displaying and preheating images.

Advanced framework for loading, caching, processing, displaying and preheating images. This framework is no longer maintained. Programming in Swift? C

Alexander Grebenyuk 1.2k Dec 23, 2022
📷 A composable image editor using Core Image and Metal.

Brightroom - Composable image editor - building your own UI Classic Image Editor PhotosCrop Face detection Masking component ?? v2.0.0-alpha now open!

Muukii 2.8k Jan 3, 2023
An image download extension of the image view written in Swift for iOS, tvOS and macOS.

Moa, an image downloader written in Swift for iOS, tvOS and macOS Moa is an image download library written in Swift. It allows to download and show an

Evgenii Neumerzhitckii 330 Sep 9, 2022
📷 A composable image editor using Core Image and Metal.

Brightroom - Composable image editor - building your own UI Classic Image Editor PhotosCrop Face detection Masking component ?? v2.0.0-alpha now open!

Muukii 2.8k Jan 2, 2023
AsyncImage before iOS 15. Lightweight, pure SwiftUI Image view, that displays an image downloaded from URL, with auxiliary views and local cache.

URLImage URLImage is a SwiftUI view that displays an image downloaded from provided URL. URLImage manages downloading remote image and caching it loca

Dmytro Anokhin 1k Jan 4, 2023
AYImageKit is a Swift Library for Async Image Downloading, Show Name's Initials and Can View image in Separate Screen.

AYImageKit AYImageKit is a Swift Library for Async Image Downloading. Features Async Image Downloading. Can Show Text Initials. Can have Custom Styles

Adnan Yousaf 11 Jan 10, 2022