Commit Graph

156 Commits

Author SHA1 Message Date
DreamPiggy 7ddb75710c Add SDImageFormatHEIF represent mif1 && msf1 brands
Fix the current hard-coded system version checking with Image/IO source uttypes checking
2018-08-06 17:53:24 +08:00
DreamPiggy dd6e4a1d2e Follow App Store submit rule, upgrade the min Xcode version to Xcode 9.0
Using `@available` and `API_AVAILABLE` to check API availability
2018-07-06 12:57:43 +08:00
DreamPiggy 799ef18c06 Add the support for watchOS to use View Category method (sd_setImageWithURL:) on WKInterfaceImage 2018-05-31 11:32:52 +08:00
DreamPiggy 994bf0fe38 Add the support for watchOS to use View Category method (sd_setImageWithURL:) on WKInterfaceImage 2018-05-24 03:08:56 +08:00
DreamPiggy e9cf356e57 Renaming `SDWebImageProgressiveDownload` to `SDWebImageProgressiveLoad`. Which is more suitable for custom loader which also support progressive image loading. (No need to be download) 2018-04-26 21:42:25 +08:00
DreamPiggy 55e4ce35bd Replace all the demo project to use `#import <SDWebImage/SDWebImage.h>` module headers instead of massive headers 2018-04-19 17:25:39 +08:00
DreamPiggy f81480189d Add modulemap files for SDWebImage to support modular framework, move the WebP & GIF into subdirectory to make Podspec works 2018-04-19 17:25:39 +08:00
DreamPiggy 57db312cc5 Add `SDWebImageLoader` protocol for custom image loader. Also introduce the `SDWebImageLoadersManager` to manage multiple loaders with priority 2018-04-18 20:26:14 +08:00
DreamPiggy 9f770b6c19 Refactor to support custom image cache used for web manager. Supports caches manager with multiple caches and op policy 2018-04-18 14:40:56 +08:00
DreamPiggy 25b61bb5ae Refactor the cache path API. Only given the full cache path to allow user to choose to use filename or full path. And use a block instead of static array for additional cache path. 2018-04-13 11:10:14 +08:00
DreamPiggy 7d50d61b37 Update the NSImage+Addtions to allow specify a image orientation when using `CGImage`. Update all the place we use 2018-04-10 22:51:28 +08:00
DreamPiggy 407b708b38 Add shouldIncrementalLoad in SDAnimatedImageView to choose the animation behavior for progressive looading 2018-04-05 22:10:40 +08:00
DreamPiggy c3892d7d08 Move all download settings into SDWebImageDownloaderConfig, make it more easy to use with clear API.
Deprecate `createNewSessionWithConfiguration`, which make downloader not sync with URLSession. If user need to specify sharedDownloader config, just modify the defaultDownloaderConfig instead.
2018-04-05 00:15:53 +08:00
DreamPiggy 915278bfd8 Update the comments and demo for macOS 2018-03-29 19:43:34 +08:00
DreamPiggy 082c5af565 Add APNG coder to support static PNG & APNG rendering. Also update macOS's SDAnimatedImageRep 2018-03-29 17:45:56 +08:00
DreamPiggy 87bbcdc46f Introduce SDAnimatedImage and SDAnimatedImageView for high performance animated image rendering on iOS & macOS 2018-03-25 17:23:12 +08:00
DreamPiggy c9dfe39e36 Change all sharedInstance from method to class property 2018-03-11 16:08:33 +08:00
DreamPiggy 6f40adbaa0 Merge branch 'master' of https://github.com/rs/SDWebImage into 5.x
* 'master' of https://github.com/rs/SDWebImage:
  Add a delegate method to control the custom logic when blocking the failed url
  Clarify the block comment in SDWebImageManager
  Enable CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF

# Conflicts:
#	SDWebImage/SDImageCache.m
2018-03-09 16:52:46 +08:00
Scott Berrevoets 3ceb8308eb Enable CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF
This enables the CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF warning on all
targets. #2225 fixed a number of these, but a new one crept back in so
this fixes that issue as well.
2018-03-07 14:40:53 -08:00
DreamPiggy e7e3caae72 Merge branch 'master' of https://github.com/rs/SDWebImage into 5.x
* 'master' of https://github.com/rs/SDWebImage:
  Fix CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF warning
  Disable travis-ci email notification
  Fix prefetcher test to first clear the disk cache, and manager test to only fulfill the finished one
  Improve the travis-ci to not clean the build for dynamic framework to speed up the demo build
  Create a subclass of NSBitmapImageRep to fix the GIF frame duration issue on macOS
  Use lock instead of barrier queue to keep callbacks block thread-safe
  Decode the image in the operation level's queue instead of URLSession delegate queue. Because URLSession delegate queue is a barrier queue and shared between different operations
  Expose the read write to FLAnimatedImage associate to the UIImage to allow advanced feature like placeholder
  Fix that SDImageCacheQueryDataWhenInMemory should response cacheType to memory cache when the in-memory cache hit (#2218)
  Update the docs
  Improvement download operation for priority and some protect (#2208)
  Update the readme about macOS minimum deployment target version
  Fix the macOS wrong minimum deployment target version to 10.9. And also fix the warning on Xcode 9 by enable more warning options

# Conflicts:
#	SDWebImage.podspec
#	SDWebImage.xcodeproj/project.pbxproj
#	SDWebImage/SDImageCache.m
#	SDWebImage/SDWebImageDownloaderOperation.m
#	SDWebImage/SDWebImageFrame.h
2018-02-21 18:59:03 +08:00
DreamPiggy fc1fd0a74e Create a subclass of NSBitmapImageRep to fix the GIF frame duration issue on macOS 2018-02-18 17:52:13 +08:00
DreamPiggy e012b36679 Refactor the image indicator usage for UIView category. Use two protocol `SDWebImageIndicator` & `SDWebImageProgressIndicator` to make this more customizable. Implement two class about activity indicator and progress indicator for both UIKit/AppKit 2018-02-04 14:37:51 +08:00
DreamPiggy 7996b0dac8 Update macOS demo to add a clear cache button using NSButton category 2018-01-25 16:42:25 +08:00
DreamPiggy 829d54ff03 Add the image transition argument for all UIView+WebCache, make this easy for user to do some fade transition. It also reuse the current setImageBlock and make it easy to customize 2018-01-23 11:58:22 +08:00
DreamPiggy 8b3c4c2cde Fix Clang Static Analyzer warning for number nil check from Xcode 9.2 2017-12-29 12:52:29 +08:00
DreamPiggy 17616c999b Embedded SDWebImage framework to all platforms in our demo project to allow real device run because it’s a dynamic framework 2017-11-05 17:23:35 +08:00
DreamPiggy dfe68a5db6 Update demo to use modern way of image assets, and view layout for rotation 2017-11-05 15:23:32 +08:00
DreamPiggy 2dd61393ed Fix “linking against dylib not safe for use in application extensions” warning for watch extension demo 2017-11-05 07:58:44 +08:00
DreamPiggy 8e46c13bcd Add empty launch storyboard to allow view on iPhone X 2017-11-05 07:58:05 +08:00
DreamPiggy efb7c4ebf9 Update our iOS demo to modern way, add a UIProgressView to show image download progress 2017-11-05 07:22:26 +08:00
DreamPiggy 19f45a3cf4 Feature refactor built-in coders and support animated webp on macOS (#2082)
* Refactor code. Move the C global function to a new SDWebImageCoderHelper class.

1. Create two method for animated image parse. Provide the way to allow animates on macOS
2. Create a new class called SDWebImageFrame to allow abstract usage for animated image
3. Fix EXIF orientation method will crash on iOS 7 because it’s a iOS 8 above API

* Change sd_imageLoopCount to retrieve GIF loop count for NSImage on macOS

* Adopt the refactor code, change our build-in coder with that coder helper method to reduce complexity

* Update the demo project on macOS to show animated WebP
2017-10-31 20:34:05 +02:00
Bogdan Poplauschi f55635de1a Accidentally deleted a comma from an array declaration 2017-10-20 22:32:48 +03:00
Bogdan Poplauschi 86151183f6 Switched all the tests from using https://s3.amazonaws.com/fast-image-cache/demo-images/* images which are big and sometimes fail to arrive in 5 seconds (before the test can timeout) to smaller images, basically using http://via.placeholder.com/ like http://via.placeholder.com/50x50.jpg or http://via.placeholder.com/200x200.png
This should speed up the tests a bit and also avoid some of the random failures due to timeout
2017-10-20 20:29:18 +03:00
Bogdan Poplauschi ff0690547d Xcode 9 recommended settings applied 2017-10-06 20:58:44 +03:00
DreamPiggy a33d8dd7e0 Update macOS Demo deployment target to 10.10 to support build on Xcode 9 2017-09-26 13:56:35 +08:00
Bogdan Poplauschi 7b79c29a8c The docs say the progressBlock is called on a background queue, so when doing UI, we need to dispatch on the main queue
* @param progressBlock  A block called while image is downloading
* @note the progress block is executed on a background queue
2017-08-11 16:38:32 +03:00
Bogdan Poplauschi 1f4f371a7a Bumped libwebp submodule reference to version 0.6.0 2017-07-31 16:28:02 +03:00
DreamPiggy fecf4d28fd support animated GIF on macOS
use NSImage built-in method to maintain GIF on macOS
update README
2017-07-29 21:26:38 +08:00
Bogdan Poplauschi b1c3bb7e64 Updated copyright info - replaces #1806 2017-02-19 14:27:48 +02:00
Bogdan Poplauschi 8382899070 Merge pull request #984 from gztchan:master
Add url as param to progress block
2016-10-01 10:06:35 +03:00
Bogdan Poplauschi 17ae791953 Replaced #1640 - Added `sd_` prefix to the activity indicator related methods (`setShowActivityIndicatorView:`, `setIndicatorStyle:`, `showActivityIndicatorView`, `addActivityIndicator`, `removeActivityIndicator`) 2016-09-30 21:36:34 +03:00
Bogdan Poplauschi 2ec9dd7608 The iOS demo uses the dynamic framework instead of the static one 2016-09-30 21:16:48 +03:00
Bogdan Poplauschi 13ffb2327c Stopped the simulators from being too verbose 2016-09-30 21:07:44 +03:00
Bogdan Poplauschi 67e0719755 Update according to Xcode 8 recommended settings. Set the deployment target to iOS 8.0. No code signing. Enabled some warnings 2016-09-30 21:06:05 +03:00
Bogdan Poplauschi 2b721a6e30 Updated the image used by the watchOS demo 2016-09-30 10:12:58 +03:00
Bogdan Poplauschi 55e1e8c723 The watchOS demo uses the watch dynamic framework 2016-09-30 10:12:45 +03:00
Bogdan Poplauschi 3c4aa45f32 Fixed build due to latest animated WebP support that was not properly adapted for OSX. For OSX, this will not work because the `animatedImageWithImages:duration:` API does not have an equivalent there. 2016-09-30 09:32:34 +03:00
Bogdan Poplauschi 88b025a5fa Merge pull request #1438 from lianchengjiang/master
Animated webP support
2016-09-29 18:57:05 +03:00
Bogdan Poplauschi e1840c3262 Refactored all the duplicate code from our WebCache categories into a UIView+WebCache category. All the other categories will make calls to this one. Customization of setting the image is done via the setImageBlock and the operationKey 2016-09-25 19:44:52 +03:00
Bogdan Poplauschi a6316d1cce Fixed the demo project, `clearDisk` no longer exists 2016-09-23 21:15:38 +03:00
Bogdan Poplauschi 0869c6915d Added PNG image to demo app 2016-09-23 20:12:13 +03:00
Bogdan Poplauschi 5851f78aee Fixed issue "The value of CFBundleVersion in your WatchKit app's Info.plist (1) does not match the value in your companion app's Info.plist (1.0). There values are required to match" 2016-06-14 23:10:33 +03:00
Bogdan Poplauschi 8e81f4273f Added the osx platform to the podspec and set the osx deployment target to 10.8 because of some compiler issues (pod lib lint) 2016-06-13 09:47:09 +03:00
Bogdan Poplauschi 13cfa24cfe Proper file header copyright 2016-06-13 09:14:02 +03:00
Bogdan Poplauschi a4da728a08 Updated deployment targets for the Demo project (no longer project level iOS target, set watch to 2.0 and appletv to 9.0) 2016-06-13 08:55:05 +03:00
Bogdan Poplauschi ac36b84463 Update on the libSDWebImage.a rename to libSDWebImage iOS static.a 2016-06-13 01:23:39 +03:00
Bogdan Poplauschi f5171b3ba8 Added tvOS demo 2016-06-13 01:13:46 +03:00
Bogdan Poplauschi 683c7edce5 watchOS Demo, created a static watchos lib target, renamed static SDWebImage to "SDWebImage iOS static", added the webp files to all targets (as libwebp is compatible with all 4 platforms). Updated Travis CI 2016-06-13 00:53:08 +03:00
Bogdan Poplauschi 442b134206 OSX Example 2016-06-13 00:09:55 +03:00
Bogdan Poplauschi cc7fa8fd93 Projects cleanup, properly set targeted device family, sdkroot and supported platforms. Tried not to set things on the project level that need redefinition at the target level 2016-06-12 21:10:18 +03:00
Bogdan Poplauschi 7684fbd9a7 Merge branch '4.x' into gif
# Conflicts:
#	SDWebImage.xcodeproj/project.pbxproj
2016-06-07 08:39:17 +03:00
Bogdan Poplauschi 3364a981d5 Merge branch 'master' into 4.x
+ SDWebImageDownloader downloadImageWithURL:... properly use the weakself-strongself pattern

# Conflicts:
#	.travis.yml
#	Examples/SDWebImage Demo.xcodeproj/project.pbxproj
#	README.md
#	SDWebImage.xcodeproj/project.pbxproj
#	SDWebImage/SDWebImageDownloader.m
#	SDWebImage/SDWebImageDownloaderOperation.h
#	SDWebImage/SDWebImageDownloaderOperation.m
#	SDWebImage/SDWebImageManager.m
#	Tests/Podfile
#	Tests/SDWebImage Tests.xcodeproj/project.pbxproj
2016-06-07 08:36:45 +03:00
Bogdan Poplauschi 6545a3aba1 Bumped the deployment target to iOS 7 (due to NSURLSession) and also incremented the library version to 3.8.0 2016-06-02 19:10:31 +03:00
Bogdan Poplauschi 94c1ec3ed0 Revisited all copyright comments and decided for just one format 2016-06-01 15:53:08 +03:00
Bogdan Poplauschi 44cb993ee9 Successfull attempt to override the UIImageView(WebCache) methods in the FLAnimatedImageView(WebCache) category. This should make the integration easier. Not sure if it will always work 2016-06-01 10:11:46 +03:00
Bogdan Poplauschi 8a488d377b Updated the example project so it supports the animated images as well. 2016-06-01 10:06:37 +03:00
Bogdan Poplauschi f6cd50bb65 Converted our example xibs to the new Xcode format 2016-06-01 10:05:40 +03:00
Bogdan Poplauschi 64382b9100 Modern Objective-C syntax 2016-05-23 07:58:02 +03:00
Bogdan Poplauschi 2a29f4a0b7 Added the WebP files to the WebImage.framework target. Removed some old hack to define empty WebP methods (see #416), will re-add it if needed, right now it prevents the dynamic framework to build.
Sample app links the libSDWebImage.a
2016-05-08 22:41:33 +03:00
Bogdan Poplauschi b426975b9f Replaced the demo images from static2.dmcdn.net that were no longer working with the demo images from FastImageCache 2016-01-21 15:36:36 +02:00
jiangliancheng 1aefd45a6b add example for animated webP 2016-01-15 23:48:44 +08:00
Bogdan Poplauschi 32923fa2e8 Xcode 7.1 updates 2015-10-25 15:58:45 +02:00
Serban Mihai 7ba8208f17 iOS 9 App Transport Security Demo Target
fixed ios 9 load images caused by new App Transport Security feature
2015-10-15 16:46:40 +03:00
mythodeia c68d585e49 activity indicator added
```
[cell.imageView setShowActivityIndicatorView:YES];
[cell.imageView setIndicatorStyle:UIActivityIndicatorViewStyleGray];
```
2015-07-15 10:50:04 +03:00
Tony cee50eb648 Add url as param to progress block 2014-12-13 13:01:24 +08:00
Bogdan Poplauschi 6698910fe1 Revert "Loading Indicator view with 2 lines of code"
This reverts commit 2cfa5ccb88.
2014-11-06 19:59:27 +02:00
mythodeia 2cfa5ccb88 Loading Indicator view with 2 lines of code
added support for UIActivityIndicatorView while the image is
downloaded, without adding extra ‘setImageWithUrl’ methods to the
UIImageView+WebCache category.
I used [this pull
request](https://github.com/mythodeia/UIActivityIndicator-for-SDWebImage
), original author is [JJSaccolo](https://github.com/JJSaccolo), and
modded it a bit to support loading indicator while the image is
downloading.

the usage is basically this right before the usual sd_setImage...
methods:
```
        // show activity indicator
        [cell.imageView setShowActivityIndicatorView:YES];
        // choose indicator style
        [cell.imageView
setIndicatorStyle:UIActivityIndicatorViewStyleGray];
```
2014-11-06 19:26:44 +02:00
Bogdan Poplauschi 87384290a4 Moved all schemes to the workspace container plus created scheme for Tests 2014-11-04 12:45:04 +02:00
Bogdan Poplauschi 50c4d1d2eb Implemented NTLM auth support. Replaced deprecated auth challenge methods from `NSURLConnectionDelegate`. Replaces #711.
- added `username` and `password` properties on `SDWebImageDownloader`
- added `shouldUseCredentialStorage` and `credential` properties on `SDWebImageDownloaderOperation`
- `SDWebImageDownloaderOperation` conforms to `NSURLConnectionDataDelegate` (it used to implement the methods, but didn't stated the protocol in the declaration)
- removed deprecated methods: `- connection:canAuthenticateAgainstProtectionSpace:` and `- connection:didReceiveAuthenticationChallenge:` with `- connectionShouldUseCredentialStorage:` and `- connection:willSendRequestForAuthenticationChallenge:`
- updated demo project to download one image the requires HTTP auth
2014-06-23 21:57:33 +03:00
Bogdan Poplauschi e5faad0026 Reverted demo project referencing source files directly. Re-added SDWebImage project as subproject 2014-06-20 18:04:06 +03:00
Bogdan Poplauschi 60b043755f Created a SDWebImage workspace with the 2 existing projects, fixed the demo project so it directly references the source files. Shared a demo project scheme 2014-06-20 16:41:53 +03:00
Bogdan Poplauschi fe4b3a088a Fixed warnings from demo project (started using the new methods, the ones with the sd_ prefix). 2014-06-20 10:07:12 +03:00
Bogdan Poplauschi e4b9ef512b Fixed a warning in the demo project 2014-06-19 10:21:09 +03:00
Fabrice Aneche 8b16de2575 fix demo 2014-01-15 10:25:14 -08:00
Olivier Poitrey 5df0eafc92 Fix WebP target 2013-10-04 11:43:27 -07:00
Olivier Poitrey 04fa4c97b5 Add WebP format support (fix #410)
How awesome is that?! =)
2013-06-07 20:43:51 +02:00
Salvatore Randazzo 447f1ccc23 Custom image cache search paths
This is particularly useful if you are bundling images with your app that have been cached by SDWebImage. (ie. if you are 'seeding' your app with a core-data file that contains a lot of URL's to images and would like to also seed those images without having to copy every one of them over)

For example, you can tell SDImageCache to add '[[NSBundle mainBundle] resourcePath]' as a custom path, so that the main bundle will be queried for cached images.

This prevents the need for you to copy pre-cached images over to the caches/ImageCache folder that SDImageCache normally checks for.

The custom paths are read-only.
2013-06-07 17:57:28 +02:00
Andy LaVoy 3f98095704 support GIFs 2013-04-28 14:06:54 -07:00
Andrew Vyazovoy c77652755a Potential strong cycle fixed. 2013-03-27 23:44:47 +07:00
Andrew Vyazovoy ee9af6406c SDWebImageDownloaderQueueMode type renamed. Fixed typo. Added description for renamed type. Type renamed because "queue" notion is a FIFO only, but LIFO is a stack, and if we give the type a neutral name, we can avoid logical inconsistencies. 2013-03-27 23:43:42 +07:00
Olivier Poitrey 8cfd26f78b Disable duplicate disk cache prevention with SDWebImageRefreshCached to handle 302 caching correctly
See https://github.com/rs/SDWebImage/pull/326#issuecomment-14791505 for more info
2013-03-12 19:26:53 +01:00
Olivier Poitrey f024890ba7 Add (kinda) LIFO queue mode support for image downloading (fix #294) 2013-02-17 03:02:04 +01:00
Olivier Poitrey 6f198abd1b Add ability to set custom downloader HTTP headers (fix #171) 2013-02-16 23:33:41 +01:00
Olivier Poitrey 1ec36c7c99 Do not init an activity indictor if image isn't downloading in demo app (good practice) 2012-11-19 18:30:31 +01:00
Olivier Poitrey 6e99059007 Fix demo app regarding last changes 2012-11-19 16:58:45 +01:00
Olivier Poitrey 0920e7a001 Add activity indicator demo 2012-11-13 18:09:39 +01:00
Olivier Poitrey 73df9d7281 Track leaks 2012-11-05 23:05:54 +01:00
Olivier Poitrey f7d0f1d12f Fix example app 2012-11-05 20:38:31 +01:00
Olivier Poitrey 9df9bf8498 Fix example app 2012-11-02 01:24:09 +01:00
Olivier Poitrey ab07f23fbc Fix #200 crash on archived builds 2012-10-23 15:50:53 +02:00