diff --git a/JellyGif.podspec b/JellyGif.podspec index 48fe89c..bb20bca 100644 --- a/JellyGif.podspec +++ b/JellyGif.podspec @@ -12,8 +12,8 @@ Pod::Spec.new do |s| s.author = { 'Linh Ta' => 'linhtadev@gmail.com' } s.social_media_url = 'https://linhta.dev' - s.platform = :ios, '10.0' - s.ios.deployment_target = '10.0' - s.swift_version = '5.0' + s.platform = :ios, '9.0' + s.ios.deployment_target = '9.0' + s.swift_version = '4.2' s.ios.framework = 'UIKit' end \ No newline at end of file diff --git a/JellyGif.xcodeproj/project.pbxproj b/JellyGif.xcodeproj/project.pbxproj index 7699ddb..5e66a83 100644 --- a/JellyGif.xcodeproj/project.pbxproj +++ b/JellyGif.xcodeproj/project.pbxproj @@ -324,12 +324,13 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_STYLE = Automatic; DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = BMXC39C5SJ; + DEVELOPMENT_TEAM = 8JMM4RM96A; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = JellyGif/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -338,6 +339,7 @@ PRODUCT_BUNDLE_IDENTIFIER = linhta.JellyGif; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -350,12 +352,13 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_STYLE = Automatic; DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = BMXC39C5SJ; + DEVELOPMENT_TEAM = 8JMM4RM96A; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = JellyGif/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -364,6 +367,7 @@ PRODUCT_BUNDLE_IDENTIFIER = linhta.JellyGif; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; diff --git a/JellyGif.xcodeproj/project.xcworkspace/xcuserdata/batyrcan.xcuserdatad/UserInterfaceState.xcuserstate b/JellyGif.xcodeproj/project.xcworkspace/xcuserdata/batyrcan.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..6258226 Binary files /dev/null and b/JellyGif.xcodeproj/project.xcworkspace/xcuserdata/batyrcan.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/JellyGif.xcodeproj/xcuserdata/batyrcan.xcuserdatad/xcschemes/xcschememanagement.plist b/JellyGif.xcodeproj/xcuserdata/batyrcan.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..cb01731 --- /dev/null +++ b/JellyGif.xcodeproj/xcuserdata/batyrcan.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + JellyGif.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/JellyGif/Source/JellyGifAnimator.swift b/JellyGif/Source/JellyGifAnimator.swift index 8cd9130..1ea9a89 100644 --- a/JellyGif/Source/JellyGifAnimator.swift +++ b/JellyGif/Source/JellyGifAnimator.swift @@ -42,7 +42,12 @@ public class JellyGifAnimator { public private(set) lazy var displayLink: CADisplayLink = { let displayLinkProxy = DisplayLinkProxy(animator: self) let displayLink = CADisplayLink(target: displayLinkProxy, selector: #selector(DisplayLinkProxy.animateGif(displayLink:))) - displayLink.preferredFramesPerSecond = preferredAnimationQuality.preferredFramesPerSecond + if #available(iOS 10.0, *) { + displayLink.preferredFramesPerSecond = preferredAnimationQuality.preferredFramesPerSecond + } else { + // Fallback on earlier versions + displayLink.frameInterval = preferredAnimationQuality.preferredFramesPerSecond + } displayLink.add(to: .main, forMode: .common) return displayLink }() diff --git a/README.md b/README.md index 36ee7c3..dbae562 100644 --- a/README.md +++ b/README.md @@ -156,6 +156,6 @@ extension ViewController: JellyGifAnimatorDelegate { Measured on an iPhone Xs Max, iOS 13.3.1 and Xcode 11.3.1 ## Compatibility -- iOS 10.0+ +- iOS 9.0+ - Swift 5.0 - Xcode 10+