diff --git a/.gitignore b/.gitignore index 8551b5d..a90a130 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,9 @@ -# OS X +# macOS .DS_Store # Xcode build/ +DerivedData/ *.pbxuser !default.pbxuser *.mode1v3 @@ -13,30 +14,11 @@ build/ !default.perspectivev3 xcuserdata/ *.xccheckout -profile *.moved-aside -DerivedData -*.hmap -*.ipa -/.swiftpm -/.build +*.xcuserstate +*.xcscmblueprint -# Bundler -.bundle - -# Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts - -Carthage/Build - -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control -# -# Note: if you ignore the Pods directory, make sure to uncomment -# `pod install` in .travis.yml -# -# Pods/ -Example/Pods - -/Package.resolved +# Swift Package Manager +.build/ +.swiftpm/ +Package.resolved diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 85b93db..0000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -# references: -# * https://www.objc.io/issues/6-build-tools/travis-ci/ -# * https://github.com/supermarin/xcpretty#usage - -osx_image: xcode7.3 -language: objective-c -# cache: cocoapods -# podfile: Example/Podfile -# before_install: -# - gem install cocoapods # Since Travis is not always on latest version -# - pod install --project-directory=Example -script: -- set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/Nuke-Avif-Plugin.xcworkspace -scheme Nuke-Avif-Plugin-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty -- pod lib lint diff --git a/Example/Nuke-Avif-Plugin.xcodeproj/project.pbxproj b/Example/Nuke-Avif-Plugin.xcodeproj/project.pbxproj deleted file mode 100644 index 4e05c3c..0000000 --- a/Example/Nuke-Avif-Plugin.xcodeproj/project.pbxproj +++ /dev/null @@ -1,564 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 29965AAB27948D110004E341 /* PlumViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29965AAA27948D110004E341 /* PlumViewController.swift */; }; - 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; - 607FACD81AFB9204008FA782 /* FoxViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* FoxViewController.swift */; }; - 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; - 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; - 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; - 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; }; - 661BC023891FA66B5B6E916B /* libPods-Nuke-Avif-Plugin_Tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2CF851CE22906BF463664575 /* libPods-Nuke-Avif-Plugin_Tests.a */; }; - FC3F45D86C83C22ED4D6EB66 /* libPods-Nuke-Avif-Plugin_Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3971C18C091BB86D7B27B1A9 /* libPods-Nuke-Avif-Plugin_Example.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 607FACC81AFB9204008FA782 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 607FACCF1AFB9204008FA782; - remoteInfo = "Nuke-Avif-Plugin"; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 244ABA6369D0795E06AA7F76 /* Pods-Nuke-Avif-Plugin_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Nuke-Avif-Plugin_Example.release.xcconfig"; path = "Target Support Files/Pods-Nuke-Avif-Plugin_Example/Pods-Nuke-Avif-Plugin_Example.release.xcconfig"; sourceTree = ""; }; - 29965AAA27948D110004E341 /* PlumViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlumViewController.swift; sourceTree = ""; }; - 2CF851CE22906BF463664575 /* libPods-Nuke-Avif-Plugin_Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Nuke-Avif-Plugin_Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 3971C18C091BB86D7B27B1A9 /* libPods-Nuke-Avif-Plugin_Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Nuke-Avif-Plugin_Example.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 4822E77378633EB7B57CF642 /* Pods-Nuke-Avif-Plugin_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Nuke-Avif-Plugin_Example.debug.xcconfig"; path = "Target Support Files/Pods-Nuke-Avif-Plugin_Example/Pods-Nuke-Avif-Plugin_Example.debug.xcconfig"; sourceTree = ""; }; - 5D2B7EE74A57085A4BD4E540 /* Pods-Nuke-Avif-Plugin_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Nuke-Avif-Plugin_Tests.debug.xcconfig"; path = "Target Support Files/Pods-Nuke-Avif-Plugin_Tests/Pods-Nuke-Avif-Plugin_Tests.debug.xcconfig"; sourceTree = ""; }; - 607FACD01AFB9204008FA782 /* Nuke-Avif-Plugin_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Nuke-Avif-Plugin_Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 607FACD71AFB9204008FA782 /* FoxViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FoxViewController.swift; sourceTree = ""; }; - 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; - 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; - 607FACE51AFB9204008FA782 /* Nuke-Avif-Plugin_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Nuke-Avif-Plugin_Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; - 807F08735E2E2C9A7110429D /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; - 8BA7C4489C443B33D0F86533 /* Pods-Nuke-Avif-Plugin_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Nuke-Avif-Plugin_Tests.release.xcconfig"; path = "Target Support Files/Pods-Nuke-Avif-Plugin_Tests/Pods-Nuke-Avif-Plugin_Tests.release.xcconfig"; sourceTree = ""; }; - D03D8BB77334962A1059A345 /* Nuke-Avif-Plugin.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = "Nuke-Avif-Plugin.podspec"; path = "../Nuke-Avif-Plugin.podspec"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - E45D3B434D4ABCA97A28B92D /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 607FACCD1AFB9204008FA782 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - FC3F45D86C83C22ED4D6EB66 /* libPods-Nuke-Avif-Plugin_Example.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 607FACE21AFB9204008FA782 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 661BC023891FA66B5B6E916B /* libPods-Nuke-Avif-Plugin_Tests.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 13C298B93B44D0B41883A613 /* Pods */ = { - isa = PBXGroup; - children = ( - 4822E77378633EB7B57CF642 /* Pods-Nuke-Avif-Plugin_Example.debug.xcconfig */, - 244ABA6369D0795E06AA7F76 /* Pods-Nuke-Avif-Plugin_Example.release.xcconfig */, - 5D2B7EE74A57085A4BD4E540 /* Pods-Nuke-Avif-Plugin_Tests.debug.xcconfig */, - 8BA7C4489C443B33D0F86533 /* Pods-Nuke-Avif-Plugin_Tests.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; - 607FACC71AFB9204008FA782 = { - isa = PBXGroup; - children = ( - 607FACF51AFB993E008FA782 /* Podspec Metadata */, - 607FACD21AFB9204008FA782 /* Example for Nuke-Avif-Plugin */, - 607FACE81AFB9204008FA782 /* Tests */, - 607FACD11AFB9204008FA782 /* Products */, - 13C298B93B44D0B41883A613 /* Pods */, - 9B1591F6609DFA1AC89E2AA5 /* Frameworks */, - ); - sourceTree = ""; - }; - 607FACD11AFB9204008FA782 /* Products */ = { - isa = PBXGroup; - children = ( - 607FACD01AFB9204008FA782 /* Nuke-Avif-Plugin_Example.app */, - 607FACE51AFB9204008FA782 /* Nuke-Avif-Plugin_Tests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 607FACD21AFB9204008FA782 /* Example for Nuke-Avif-Plugin */ = { - isa = PBXGroup; - children = ( - 607FACD51AFB9204008FA782 /* AppDelegate.swift */, - 607FACD71AFB9204008FA782 /* FoxViewController.swift */, - 29965AAA27948D110004E341 /* PlumViewController.swift */, - 607FACD91AFB9204008FA782 /* Main.storyboard */, - 607FACDC1AFB9204008FA782 /* Images.xcassets */, - 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, - 607FACD31AFB9204008FA782 /* Supporting Files */, - ); - name = "Example for Nuke-Avif-Plugin"; - path = "Nuke-Avif-Plugin"; - sourceTree = ""; - }; - 607FACD31AFB9204008FA782 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 607FACD41AFB9204008FA782 /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 607FACE81AFB9204008FA782 /* Tests */ = { - isa = PBXGroup; - children = ( - 607FACEB1AFB9204008FA782 /* Tests.swift */, - 607FACE91AFB9204008FA782 /* Supporting Files */, - ); - path = Tests; - sourceTree = ""; - }; - 607FACE91AFB9204008FA782 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 607FACEA1AFB9204008FA782 /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { - isa = PBXGroup; - children = ( - D03D8BB77334962A1059A345 /* Nuke-Avif-Plugin.podspec */, - E45D3B434D4ABCA97A28B92D /* README.md */, - 807F08735E2E2C9A7110429D /* LICENSE */, - ); - name = "Podspec Metadata"; - sourceTree = ""; - }; - 9B1591F6609DFA1AC89E2AA5 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 3971C18C091BB86D7B27B1A9 /* libPods-Nuke-Avif-Plugin_Example.a */, - 2CF851CE22906BF463664575 /* libPods-Nuke-Avif-Plugin_Tests.a */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 607FACCF1AFB9204008FA782 /* Nuke-Avif-Plugin_Example */ = { - isa = PBXNativeTarget; - buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "Nuke-Avif-Plugin_Example" */; - buildPhases = ( - EE5AEE49B44361B3D1E5F1F7 /* [CP] Check Pods Manifest.lock */, - 607FACCC1AFB9204008FA782 /* Sources */, - 607FACCD1AFB9204008FA782 /* Frameworks */, - 607FACCE1AFB9204008FA782 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "Nuke-Avif-Plugin_Example"; - productName = "Nuke-Avif-Plugin"; - productReference = 607FACD01AFB9204008FA782 /* Nuke-Avif-Plugin_Example.app */; - productType = "com.apple.product-type.application"; - }; - 607FACE41AFB9204008FA782 /* Nuke-Avif-Plugin_Tests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "Nuke-Avif-Plugin_Tests" */; - buildPhases = ( - 6970F929F1CA5676EDA916CD /* [CP] Check Pods Manifest.lock */, - 607FACE11AFB9204008FA782 /* Sources */, - 607FACE21AFB9204008FA782 /* Frameworks */, - 607FACE31AFB9204008FA782 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 607FACE71AFB9204008FA782 /* PBXTargetDependency */, - ); - name = "Nuke-Avif-Plugin_Tests"; - productName = Tests; - productReference = 607FACE51AFB9204008FA782 /* Nuke-Avif-Plugin_Tests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 607FACC81AFB9204008FA782 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0830; - LastUpgradeCheck = 0830; - ORGANIZATIONNAME = CocoaPods; - TargetAttributes = { - 607FACCF1AFB9204008FA782 = { - CreatedOnToolsVersion = 6.3.1; - LastSwiftMigration = 0900; - }; - 607FACE41AFB9204008FA782 = { - CreatedOnToolsVersion = 6.3.1; - LastSwiftMigration = 0900; - TestTargetID = 607FACCF1AFB9204008FA782; - }; - }; - }; - buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "Nuke-Avif-Plugin" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - English, - en, - Base, - ); - mainGroup = 607FACC71AFB9204008FA782; - productRefGroup = 607FACD11AFB9204008FA782 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 607FACCF1AFB9204008FA782 /* Nuke-Avif-Plugin_Example */, - 607FACE41AFB9204008FA782 /* Nuke-Avif-Plugin_Tests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 607FACCE1AFB9204008FA782 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */, - 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, - 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 607FACE31AFB9204008FA782 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 6970F929F1CA5676EDA916CD /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Nuke-Avif-Plugin_Tests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - EE5AEE49B44361B3D1E5F1F7 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Nuke-Avif-Plugin_Example-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 607FACCC1AFB9204008FA782 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 607FACD81AFB9204008FA782 /* FoxViewController.swift in Sources */, - 29965AAB27948D110004E341 /* PlumViewController.swift in Sources */, - 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 607FACE11AFB9204008FA782 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 607FACE71AFB9204008FA782 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 607FACCF1AFB9204008FA782 /* Nuke-Avif-Plugin_Example */; - targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 607FACD91AFB9204008FA782 /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 607FACDA1AFB9204008FA782 /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { - isa = PBXVariantGroup; - children = ( - 607FACDF1AFB9204008FA782 /* Base */, - ); - name = LaunchScreen.xib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 607FACED1AFB9204008FA782 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 607FACEE1AFB9204008FA782 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 607FACF01AFB9204008FA782 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 4822E77378633EB7B57CF642 /* Pods-Nuke-Avif-Plugin_Example.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = "Nuke-Avif-Plugin/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MODULE_NAME = ExampleApp; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - 607FACF11AFB9204008FA782 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 244ABA6369D0795E06AA7F76 /* Pods-Nuke-Avif-Plugin_Example.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = "Nuke-Avif-Plugin/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MODULE_NAME = ExampleApp; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 5.0; - }; - name = Release; - }; - 607FACF31AFB9204008FA782 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5D2B7EE74A57085A4BD4E540 /* Pods-Nuke-Avif-Plugin_Tests.debug.xcconfig */; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(PLATFORM_DIR)/Developer/Library/Frameworks", - "$(inherited)", - ); - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = Tests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Nuke-Avif-Plugin_Example.app/Nuke-Avif-Plugin_Example"; - }; - name = Debug; - }; - 607FACF41AFB9204008FA782 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 8BA7C4489C443B33D0F86533 /* Pods-Nuke-Avif-Plugin_Tests.release.xcconfig */; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(PLATFORM_DIR)/Developer/Library/Frameworks", - "$(inherited)", - ); - INFOPLIST_FILE = Tests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Nuke-Avif-Plugin_Example.app/Nuke-Avif-Plugin_Example"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "Nuke-Avif-Plugin" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 607FACED1AFB9204008FA782 /* Debug */, - 607FACEE1AFB9204008FA782 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "Nuke-Avif-Plugin_Example" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 607FACF01AFB9204008FA782 /* Debug */, - 607FACF11AFB9204008FA782 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "Nuke-Avif-Plugin_Tests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 607FACF31AFB9204008FA782 /* Debug */, - 607FACF41AFB9204008FA782 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 607FACC81AFB9204008FA782 /* Project object */; -} diff --git a/Example/Nuke-Avif-Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example/Nuke-Avif-Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index eb36b07..0000000 --- a/Example/Nuke-Avif-Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Example/Nuke-Avif-Plugin.xcodeproj/xcshareddata/xcschemes/Nuke-Avif-Plugin-Example.xcscheme b/Example/Nuke-Avif-Plugin.xcodeproj/xcshareddata/xcschemes/Nuke-Avif-Plugin-Example.xcscheme deleted file mode 100644 index 65766a5..0000000 --- a/Example/Nuke-Avif-Plugin.xcodeproj/xcshareddata/xcschemes/Nuke-Avif-Plugin-Example.xcscheme +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Nuke-Avif-Plugin.xcworkspace/contents.xcworkspacedata b/Example/Nuke-Avif-Plugin.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 83d018d..0000000 --- a/Example/Nuke-Avif-Plugin.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/Example/Nuke-Avif-Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example/Nuke-Avif-Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/Example/Nuke-Avif-Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Example/Nuke-Avif-Plugin/AppDelegate.swift b/Example/Nuke-Avif-Plugin/AppDelegate.swift deleted file mode 100644 index a2cf8ec..0000000 --- a/Example/Nuke-Avif-Plugin/AppDelegate.swift +++ /dev/null @@ -1,47 +0,0 @@ -// -// AppDelegate.swift -// Nuke-Avif-Plugin -// -// Created by murakami on 05/27/2021. -// Copyright (c) 2021 murakami. All rights reserved. -// - -import UIKit -import NukeAvifPlugin - -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate { - - var window: UIWindow? - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - // Override point for customization after application launch. - AvifImageDecoder.enable() - return true - } - - func applicationWillResignActive(_ application: UIApplication) { - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. - } - - func applicationDidEnterBackground(_ application: UIApplication) { - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. - } - - func applicationWillEnterForeground(_ application: UIApplication) { - // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. - } - - func applicationDidBecomeActive(_ application: UIApplication) { - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. - } - - func applicationWillTerminate(_ application: UIApplication) { - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. - } - - -} - diff --git a/Example/Nuke-Avif-Plugin/Base.lproj/LaunchScreen.xib b/Example/Nuke-Avif-Plugin/Base.lproj/LaunchScreen.xib deleted file mode 100644 index 51b0f09..0000000 --- a/Example/Nuke-Avif-Plugin/Base.lproj/LaunchScreen.xib +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Nuke-Avif-Plugin/Base.lproj/Main.storyboard b/Example/Nuke-Avif-Plugin/Base.lproj/Main.storyboard deleted file mode 100644 index a75f33c..0000000 --- a/Example/Nuke-Avif-Plugin/Base.lproj/Main.storyboard +++ /dev/null @@ -1,275 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Nuke-Avif-Plugin/FoxViewController.swift b/Example/Nuke-Avif-Plugin/FoxViewController.swift deleted file mode 100644 index c87a281..0000000 --- a/Example/Nuke-Avif-Plugin/FoxViewController.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// FoxViewController.swift -// Nuke-Avif-Plugin -// -// Created by murakami on 05/27/2021. -// Copyright (c) 2021 murakami. All rights reserved. -// - -import UIKit -import Nuke -import RxSwift -import RxCocoa - -class FoxViewController: UIViewController { - @IBOutlet var imageView: UIImageView! - @IBOutlet var profile: UISegmentedControl! - @IBOutlet var bitDepth: UISegmentedControl! - @IBOutlet var format: UISegmentedControl! - @IBOutlet var monochrome: UISegmentedControl! - @IBOutlet var oddWidth: UISegmentedControl! - @IBOutlet var oddHeight: UISegmentedControl! - @IBOutlet var notFoundLabel: UILabel! - - private let disposeBag = DisposeBag() - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view, typically from a nib. - Observable - .combineLatest([profile, bitDepth, format, monochrome, oddWidth, oddHeight].map { $0.rx.selectedSegmentIndex }) - .subscribe(onNext: { [weak self] array in - let profile = ["0", "1", "2"][array[0]] - let bitDepth = ["8", "10", "12"][array[1]] - let format = ["yuv420", "yuv422", "yuv444"][array[2]] - let monochrome = ["", ".monochrome"][array[3]] - let oddWidth = ["", ".odd-width"][array[4]] - let oddHeight = ["", ".odd-height"][array[5]] - - let url = URL(string: "https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile\(profile).\(bitDepth)bpc.\(format)\(monochrome)\(oddWidth)\(oddHeight).avif")! - print(url.absoluteString) - guard let imageView = self?.imageView else { return } - Nuke.loadImage(with: url, into: imageView) { result in - if case let .failure(error) = result, case .dataLoadingFailed = error { - self?.notFoundLabel.isHidden = false - } else { - self?.notFoundLabel.isHidden = true - } - } - }) - .disposed(by: disposeBag) - } - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. - } - -} - diff --git a/Example/Nuke-Avif-Plugin/Images.xcassets/AppIcon.appiconset/Contents.json b/Example/Nuke-Avif-Plugin/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 7006c9e..0000000 --- a/Example/Nuke-Avif-Plugin/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" - }, - { - "idiom" : "ios-marketing", - "size" : "1024x1024", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/Example/Nuke-Avif-Plugin/Info.plist b/Example/Nuke-Avif-Plugin/Info.plist deleted file mode 100644 index eb18faa..0000000 --- a/Example/Nuke-Avif-Plugin/Info.plist +++ /dev/null @@ -1,39 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - - - diff --git a/Example/Nuke-Avif-Plugin/PlumViewController.swift b/Example/Nuke-Avif-Plugin/PlumViewController.swift deleted file mode 100644 index eecf452..0000000 --- a/Example/Nuke-Avif-Plugin/PlumViewController.swift +++ /dev/null @@ -1,56 +0,0 @@ -// -// PlumViewController.swift -// Nuke-Avif-Plugin -// -// Created by murakami on 05/27/2021. -// Copyright (c) 2021 murakami. All rights reserved. -// - -import UIKit -import Nuke -import RxSwift -import RxCocoa - -class PlumViewController: UIViewController { - @IBOutlet var imageView: UIImageView! - @IBOutlet var profile: UISegmentedControl! - @IBOutlet var bitDepth: UISegmentedControl! - @IBOutlet var format: UISegmentedControl! - @IBOutlet var monochrome: UISegmentedControl! - @IBOutlet var alpha: UISegmentedControl! - @IBOutlet var notFoundLabel: UILabel! - - private let disposeBag = DisposeBag() - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view, typically from a nib. - Observable - .combineLatest([profile, bitDepth, format, monochrome, alpha].map { $0.rx.selectedSegmentIndex }) - .subscribe(onNext: { [weak self] array in - let profile = ["0", "1", "2"][array[0]] - let bitDepth = ["8", "10", "12"][array[1]] - let format = ["yuv420", "yuv422", "yuv444"][array[2]] - let monochrome = ["", ".monochrome"][array[3]] - let alpha = [".alpha-full", ".alpha-limited"][array[4]] - - let url = URL(string: "https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile\(profile).\(bitDepth)bpc.\(format)\(alpha)\(monochrome).avif")! - print(url.absoluteString) - guard let imageView = self?.imageView else { return } - Nuke.loadImage(with: url, into: imageView) { result in - if case let .failure(error) = result, case .dataLoadingFailed = error { - self?.notFoundLabel.isHidden = false - } else { - self?.notFoundLabel.isHidden = true - } - } - }) - .disposed(by: disposeBag) - } - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. - } - -} - diff --git a/Example/Podfile b/Example/Podfile deleted file mode 100644 index c6b774c..0000000 --- a/Example/Podfile +++ /dev/null @@ -1,19 +0,0 @@ -install! 'cocoapods', :generate_multiple_pod_projects => true -platform :ios, '11.0' -use_modular_headers! - -target 'Nuke-Avif-Plugin_Example' do - pod 'Nuke-Avif-Plugin', :path => '../' - pod 'Nuke' - pod 'libavif/libdav1d-8bit', :podspec => 'https://raw.githubusercontent.com/link-u/libavif-Xcode/workaround/dav1d-static/libavif.podspec' - pod 'libdav1d/8bit', :git => 'git@github.com:link-u/libdav1d-static.git' - - pod 'RxSwift' - pod 'RxCocoa' - - target 'Nuke-Avif-Plugin_Tests' do - inherit! :search_paths - - - end -end diff --git a/Example/Podfile.lock b/Example/Podfile.lock deleted file mode 100644 index 5eb6521..0000000 --- a/Example/Podfile.lock +++ /dev/null @@ -1,69 +0,0 @@ -PODS: - - libaom (2.0.2): - - libvmaf - - libavif (0.8.1): - - libavif/libaom (= 0.8.1) - - libavif/core (0.8.1) - - libavif/libaom (0.8.1): - - libaom (>= 1.0.2) - - libavif/core - - libavif/libdav1d-8bit (0.8.1): - - libavif/core - - libdav1d/8bit - - libdav1d/8bit (0.0.7) - - libvmaf (2.2.0) - - Nuke (10.7.1) - - Nuke-Avif-Plugin (0.0.1): - - libavif - - Nuke (~> 10.0) - - RxCocoa (6.5.0): - - RxRelay (= 6.5.0) - - RxSwift (= 6.5.0) - - RxRelay (6.5.0): - - RxSwift (= 6.5.0) - - RxSwift (6.5.0) - -DEPENDENCIES: - - libavif/libdav1d-8bit (from `https://raw.githubusercontent.com/link-u/libavif-Xcode/workaround/dav1d-static/libavif.podspec`) - - "libdav1d/8bit (from `git@github.com:link-u/libdav1d-static.git`)" - - Nuke - - Nuke-Avif-Plugin (from `../`) - - RxCocoa - - RxSwift - -SPEC REPOS: - trunk: - - libaom - - libvmaf - - Nuke - - RxCocoa - - RxRelay - - RxSwift - -EXTERNAL SOURCES: - libavif: - :podspec: https://raw.githubusercontent.com/link-u/libavif-Xcode/workaround/dav1d-static/libavif.podspec - libdav1d: - :git: "git@github.com:link-u/libdav1d-static.git" - Nuke-Avif-Plugin: - :path: "../" - -CHECKOUT OPTIONS: - libdav1d: - :commit: cd8660c52db4286cdbb167f515b923214c8cdb60 - :git: "git@github.com:link-u/libdav1d-static.git" - -SPEC CHECKSUMS: - libaom: 9bb51e0f8f9192245e3ca2a1c9e4375d9cbccc52 - libavif: b317b1c7c3a11c84068e0305e082e94c12e7cdf1 - libdav1d: 094dc003778d1abb26cf6a077fea154e8951e198 - libvmaf: 8d61aabc2f4ed3e6591cf7406fa00a223ec11289 - Nuke: 279f17a599fd1c83cf51de5e0e1f2db143a287b0 - Nuke-Avif-Plugin: 50b782778f52b5e07f95d956789492f44e742f67 - RxCocoa: 94f817b71c07517321eb4f9ad299112ca8af743b - RxRelay: 1de1523e604c72b6c68feadedd1af3b1b4d0ecbd - RxSwift: 5710a9e6b17f3c3d6e40d6e559b9fa1e813b2ef8 - -PODFILE CHECKSUM: 72ffcb32a0aeed1025797d7b13314fe84b09209e - -COCOAPODS: 1.11.2 diff --git a/Example/Tests/Info.plist b/Example/Tests/Info.plist deleted file mode 100644 index ba72822..0000000 --- a/Example/Tests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/Example/Tests/Tests.swift b/Example/Tests/Tests.swift deleted file mode 100644 index 7362636..0000000 --- a/Example/Tests/Tests.swift +++ /dev/null @@ -1,28 +0,0 @@ -import XCTest -import NukeAvifPlugin - -class Tests: XCTestCase { - - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func testExample() { - // This is an example of a functional test case. - XCTAssert(true, "Pass") - } - - func testPerformanceExample() { - // This is an example of a performance test case. - self.measure() { - // Put the code you want to measure the time of here. - } - } - -} diff --git a/Nuke-Avif-Plugin.podspec b/Nuke-Avif-Plugin.podspec deleted file mode 100644 index e4772d5..0000000 --- a/Nuke-Avif-Plugin.podspec +++ /dev/null @@ -1,43 +0,0 @@ -# -# Be sure to run `pod lib lint Nuke-Avif-Plugin.podspec' to ensure this is a -# valid spec before submitting. -# -# Any lines starting with a # are optional, but their use is encouraged -# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html -# - -Pod::Spec.new do |s| - s.name = 'Nuke-Avif-Plugin' - s.version = '0.0.4' - s.summary = "Nuke's Plugin for Avif." - -# This description is used to generate tags and improve search results. -# * Think: What does it do? Why did you write it? What is the focus? -# * Try to keep it short, snappy and to the point. -# * Write the description between the DESC delimiters below. -# * Finally, don't worry about the indent, CocoaPods strips it! - - s.description = <<-DESC -TODO: Add long description of the pod here. - DESC - - s.homepage = 'https://github.com/link-u/Nuke-Avif-Plugin' - s.license = { :type => 'MIT', :file => 'LICENSE' } - s.author = { 'murakami' => 'zonaryfund@gmail.com' } - s.source = { :git => 'git@github.com:link-u/Nuke-Avif-Plugin.git', :tag => s.version.to_s } - - s.ios.deployment_target = '11.0' - - s.source_files = 'Nuke-Avif-Plugin/**/*' - s.dependency 'Nuke', '~> 10.0' - s.dependency 'libavif' - s.module_name = 'NukeAvifPlugin' - - # s.resource_bundles = { - # 'Nuke-Avif-Plugin' => ['Nuke-Avif-Plugin/Assets/*.png'] - # } - - # s.public_header_files = 'Pod/Classes/**/*.h' - # s.frameworks = 'UIKit', 'MapKit' - # s.dependency 'AFNetworking', '~> 2.3' -end diff --git a/Nuke-Avif-Plugin/ColorSpace.swift b/Nuke-Avif-Plugin/ColorSpace.swift index 54a2c02..a4086fe 100644 --- a/Nuke-Avif-Plugin/ColorSpace.swift +++ b/Nuke-Avif-Plugin/ColorSpace.swift @@ -10,12 +10,14 @@ import Accelerate import Foundation import libavif -private enum ColorSpaceCache { - private static let lock = NSLock() - private static var rgbColorSpaces: [CFString: CGColorSpace] = [:] - private static var monochromeColorSpaces: [String: CGColorSpace] = [:] +private final class ColorSpaceCache: @unchecked Sendable { + static let shared = ColorSpaceCache() - static func rgb(identifier: CFString, create: () -> CGColorSpace) -> CGColorSpace { + private let lock = NSLock() + private var rgbColorSpaces: [CFString: CGColorSpace] = [:] + private var monochromeColorSpaces: [String: CGColorSpace] = [:] + + func rgb(identifier: CFString, create: () -> CGColorSpace) -> CGColorSpace { lock.lock() defer { lock.unlock() } if let cached = rgbColorSpaces[identifier] { @@ -26,7 +28,7 @@ private enum ColorSpaceCache { return colorSpace } - static func monochrome(identifier: String, create: () throws -> CGColorSpace) throws -> CGColorSpace { + func monochrome(identifier: String, create: () throws -> CGColorSpace) throws -> CGColorSpace { lock.lock() defer { lock.unlock() } if let cached = monochromeColorSpaces[identifier] { @@ -82,7 +84,7 @@ func calcColorSpaceRGB(avif: avifImage) throws -> CGColorSpace { } func cachedColorSpace(identifier: CFString) -> CGColorSpace { - ColorSpaceCache.rgb(identifier: identifier) { + ColorSpaceCache.shared.rgb(identifier: identifier) { CGColorSpace(name: identifier)! } } @@ -159,7 +161,7 @@ func calcColorSpaceMonochrome(avif: avifImage) throws -> CGColorSpace { } func cachedColorSpace(identifier: String) throws -> CGColorSpace { - try ColorSpaceCache.monochrome(identifier: identifier) { + try ColorSpaceCache.shared.monochrome(identifier: identifier) { try createColorSpaceMonochrome( colorPrimaries: avif.colorPrimaries, transferCharacteristics: avif.transferCharacteristics diff --git a/Nuke-Avif-Plugin/Decoder.swift b/Nuke-Avif-Plugin/Decoder.swift index 8e7964b..69f2e71 100644 --- a/Nuke-Avif-Plugin/Decoder.swift +++ b/Nuke-Avif-Plugin/Decoder.swift @@ -65,7 +65,8 @@ public struct AvifImageDecoder: ImageDecoding { public extension AvifImageDecoder { static func enable() { Nuke.ImageDecoderRegistry.shared.register { context in - return context.data.isAvifData ? AvifImageDecoder() : nil + guard context.isCompleted, context.data.isAvifData else { return nil } + return AvifImageDecoder() } } } diff --git a/Package.swift b/Package.swift index a0e936f..80d7364 100644 --- a/Package.swift +++ b/Package.swift @@ -1,17 +1,17 @@ -// swift-tools-version:5.7 +// swift-tools-version:6.0 import PackageDescription let package = Package( name: "NukeAvifPlugin", platforms: [ - .iOS(.v14) + .iOS(.v15) ], products: [ .library(name: "NukeAvifPlugin", targets: ["NukeAvifPlugin"]), ], dependencies: [ - .package(url: "https://github.com/kean/Nuke.git", "12.0.0"..<"13.0.0"), // 12系までをサポートする - .package(url: "https://github.com/link-u/libavif-Xcode.git", .branch("dav1d_static_0.1.3")) // タグで指定 + .package(url: "https://github.com/kean/Nuke.git", "13.0.0"..<"14.0.0"), + .package(url: "https://github.com/link-u/libavif-Xcode.git", .branch("dav1d_static_0.1.3")) ], targets: [ .target( @@ -22,5 +22,11 @@ let package = Package( ], path: "Nuke-Avif-Plugin" ), + .testTarget( + name: "NukeAvifPluginTests", + dependencies: ["NukeAvifPlugin", "Nuke"], + path: "Tests/NukeAvifPluginTests", + resources: [.process("Fixtures")] + ), ] ) diff --git a/README.md b/README.md index a8be5fc..cfcb0c8 100644 --- a/README.md +++ b/README.md @@ -1,32 +1,55 @@ # Nuke-Avif-Plugin -[![CI Status](https://img.shields.io/travis/murakami/Nuke-Avif-Plugin.svg?style=flat)](https://travis-ci.org/murakami/Nuke-Avif-Plugin) -[![Version](https://img.shields.io/cocoapods/v/Nuke-Avif-Plugin.svg?style=flat)](https://cocoapods.org/pods/Nuke-Avif-Plugin) -[![License](https://img.shields.io/cocoapods/l/Nuke-Avif-Plugin.svg?style=flat)](https://cocoapods.org/pods/Nuke-Avif-Plugin) -[![Platform](https://img.shields.io/cocoapods/p/Nuke-Avif-Plugin.svg?style=flat)](https://cocoapods.org/pods/Nuke-Avif-Plugin) +[![Swift Package Manager compatible](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager) -## Example +Nuke plugin for decoding AVIF images. + +## Requirements + +- iOS 15+ +- Xcode 16+ (Swift 6) +- [Nuke](https://github.com/kean/Nuke) 13.x + +## Installation + +Add the package to your `Package.swift`: ```swift -import NukeAvifPlugin +dependencies: [ + .package(url: "https://github.com/link-u/Nuke-Avif-Plugin.git", from: "1.0.0"), +] +``` -AvifImageDecoder.enable() +Then add `NukeAvifPlugin` to your target dependencies: + +```swift +.target( + name: "YourTarget", + dependencies: [ + .product(name: "NukeAvifPlugin", package: "Nuke-Avif-Plugin"), + ] +) ``` -## Requirements +In Xcode: **File → Add Package Dependencies…** and enter the repository URL. -## Installation +## Usage -Nuke-Avif-Plugin is available through [CocoaPods](https://cocoapods.org). To install -it, simply add the following line to your Podfile: +Call `AvifImageDecoder.enable()` once at app launch (e.g. in `AppDelegate` or `@main` App init) before loading AVIF images: + +```swift +import NukeAvifPlugin -```ruby -pod 'Nuke-Avif-Plugin' +AvifImageDecoder.enable() ``` -## Author +After that, use Nuke as usual — AVIF URLs are decoded automatically via `ImageDecoderRegistry`. + +To decode AVIF data manually: -murakami, zonaryfund@gmail.com +```swift +let container = try AvifImageDecoder().decode(data) +``` ## License diff --git a/Tests/NukeAvifPluginTests/AvifImageDecoderTests.swift b/Tests/NukeAvifPluginTests/AvifImageDecoderTests.swift new file mode 100644 index 0000000..7d0b8bd --- /dev/null +++ b/Tests/NukeAvifPluginTests/AvifImageDecoderTests.swift @@ -0,0 +1,176 @@ +import XCTest +import Nuke +@testable import NukeAvifPlugin + +/// AvifImageDecoder および ImageDecoderRegistry 連携の回帰テスト。 +/// +/// フィクスチャ: +/// - 本番相当: manga-up CDN 由来の cavif / avifenc × gray / yuv420 / yuv422 / yuv444(8種) +/// - エッジケース: fox(monochrome, odd-size)— 本番 8 種ではカバーしないレイアウト境界用 +final class AvifImageDecoderTests: XCTestCase { + /// manga-up 検証用 AVIF(Tests/NukeAvifPluginTests/Fixtures に同梱) + private enum ProductionFixture: String, CaseIterable { + case cavifGray = "test_cavif_gray" + case cavifYUV420 = "test_cavif_yuv420" + case cavifYUV422 = "test_cavif_yuv422" + case cavifYUV444 = "test_cavif_yuv444" + case avifencGray = "test_avifenc_gray" + case avifencYUV420 = "test_avifenc_yuv420" + case avifencYUV422 = "test_avifenc_yuv422" + case avifencYUV444 = "test_avifenc_yuv444" + } + + private static let foxFixtureName = "fox.profile0.8bpc.yuv420.monochrome.odd-width.odd-height" + private static let registrySampleFixture = ProductionFixture.cavifYUV420 + + private var foxAvifData: Data! + private var jpegHeaderData: Data! + private var pngHeaderData: Data! + + /// 各テスト実行前に共通データを読み込む。 + /// - foxAvifData: 奇数サイズ monochrome エッジケース用(fox 専用テストのみ使用) + /// - jpegHeaderData / pngHeaderData: 非 AVIF 判定用の先頭バイト列 + override func setUpWithError() throws { + foxAvifData = try loadFixture(named: Self.foxFixtureName) + jpegHeaderData = Data([0xFF, 0xD8, 0xFF, 0xE0]) + pngHeaderData = Data([0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A]) + } + + /// Bundle から AVIF フィクスチャを読み込む。 + private func loadFixture(named resourceName: String) throws -> Data { + let fixtureURL = try XCTUnwrap( + Bundle.module.url(forResource: resourceName, withExtension: "avif") + ) + return try Data(contentsOf: fixtureURL) + } + + // MARK: - Production fixtures (8種) + + /// 本番相当 8 種すべてで `Data.isAvifData` が true になることを検証する。 + /// + /// cavif / avifenc それぞれの gray・yuv420・yuv422・yuv444 が + /// libavif の `avifPeekCompatibleFileType` で AVIF と判定されることを確認する。 + func testIsAvifDataReturnsTrueForProductionFixtures() throws { + for fixture in ProductionFixture.allCases { + let data = try loadFixture(named: fixture.rawValue) + try XCTContext.runActivity(named: fixture.rawValue) { _ in + XCTAssertTrue(data.isAvifData) + } + } + } + + /// 本番相当 8 種すべてを `AvifImageDecoder.decode` できることを検証する。 + /// + /// - type が `.avif` であること + /// - プレビューではないこと (`isPreview == false`) + /// - 画像サイズが 0 より大きいこと + func testDecodeProducesImageContainerForProductionFixtures() throws { + let decoder = AvifImageDecoder() + + for fixture in ProductionFixture.allCases { + let data = try loadFixture(named: fixture.rawValue) + try XCTContext.runActivity(named: fixture.rawValue) { _ in + let container = try decoder.decode(data) + + XCTAssertEqual(container.type, AssetType.avif) + XCTAssertFalse(container.isPreview) + XCTAssertGreaterThan(container.image.size.width, 0) + XCTAssertGreaterThan(container.image.size.height, 0) + } + } + } + + /// 本番相当 8 種すべてで registry が AvifImageDecoder を返し、デコードできることを検証する。 + /// + /// ダウンロード完了 (`isCompleted == true`) かつ AVIF データの場合に + /// Nuke 13 の registry → decode フローが通ることを確認する。 + func testRegistryDecodesProductionFixtures() throws { + ImageDecoderRegistry.shared.clear() + AvifImageDecoder.enable() + + for fixture in ProductionFixture.allCases { + let data = try loadFixture(named: fixture.rawValue) + try XCTContext.runActivity(named: fixture.rawValue) { _ in + let context = ImageDecodingContext( + request: ImageRequest(url: URL(string: "https://example.com/\(fixture.rawValue).avif")!), + data: data, + isCompleted: true + ) + + let decoder = try XCTUnwrap(ImageDecoderRegistry.shared.decoder(for: context)) + XCTAssertTrue(decoder is AvifImageDecoder) + + let container = try decoder.decode(data) + XCTAssertEqual(container.type, AssetType.avif) + XCTAssertGreaterThan(container.image.size.width, 0) + XCTAssertGreaterThan(container.image.size.height, 0) + } + } + } + + // MARK: - Registry edge cases + + /// ダウンロード途中 (`isCompleted == false`) の AVIF では、プログレッシブ非対応のため registry が nil を返すことを検証する。 + /// Nuke 13 推奨: 完了前はデコーダーを登録しない。代表として本番相当フィクスチャ 1 種で確認する。 + func testRegistryReturnsNilForPartialAvifContext() throws { + ImageDecoderRegistry.shared.clear() + AvifImageDecoder.enable() + + let data = try loadFixture(named: Self.registrySampleFixture.rawValue) + let context = ImageDecodingContext( + request: ImageRequest(url: URL(string: "https://example.com/\(Self.registrySampleFixture.rawValue).avif")!), + data: data, + isCompleted: false + ) + + XCTAssertNil(ImageDecoderRegistry.shared.decoder(for: context)) + } + + /// ダウンロード完了でも非 AVIF データの場合、registry が nil を返すことを検証する。 + /// JPEG 等が誤って AvifImageDecoder に渡らないことを確認する。 + func testRegistryReturnsNilForCompletedNonAvifContext() { + ImageDecoderRegistry.shared.clear() + AvifImageDecoder.enable() + + let context = ImageDecodingContext( + request: ImageRequest(url: URL(string: "https://example.com/image.jpg")!), + data: jpegHeaderData, + isCompleted: true + ) + + XCTAssertNil(ImageDecoderRegistry.shared.decoder(for: context)) + } + + // MARK: - Format detection + + /// JPEG / PNG / 空データに対して `Data.isAvifData` が false を返すことを検証する。 + /// 誤って AVIF デコーダーが選択されないためのネガティブテスト。 + func testIsAvifDataReturnsFalseForNonAvifData() { + XCTAssertFalse(jpegHeaderData.isAvifData) + XCTAssertFalse(pngHeaderData.isAvifData) + XCTAssertFalse(Data().isAvifData) + } + + // MARK: - Fox edge case (odd-size monochrome) + + /// fox フィクスチャに対して `Data.isAvifData` が true を返すことを検証する。 + /// 奇数 width/height の monochrome AVIF でもフォーマット判定が通ることを確認する。 + func testIsAvifDataReturnsTrueForFoxFixture() { + XCTAssertTrue(foxAvifData.isAvifData) + } + + /// fox フィクスチャを `AvifImageDecoder.decode` できることを検証する。 + /// + /// 本番 8 種ではカバーしない odd-width / odd-height monochrome の decode 経路を確認する。 + /// - type が `.avif` であること + /// - プレビューではないこと (`isPreview == false`) + /// - 画像サイズが 0 より大きいこと + func testDecodeProducesImageContainerForFoxFixture() throws { + let container = try AvifImageDecoder().decode(foxAvifData) + + XCTAssertEqual(container.type, AssetType.avif) + XCTAssertFalse(container.isPreview) + XCTAssertGreaterThan(container.image.size.width, 0) + XCTAssertGreaterThan(container.image.size.height, 0) + } +} diff --git a/Tests/NukeAvifPluginTests/Fixtures/fox.profile0.8bpc.yuv420.monochrome.odd-width.odd-height.avif b/Tests/NukeAvifPluginTests/Fixtures/fox.profile0.8bpc.yuv420.monochrome.odd-width.odd-height.avif new file mode 100644 index 0000000..5bfc8e7 Binary files /dev/null and b/Tests/NukeAvifPluginTests/Fixtures/fox.profile0.8bpc.yuv420.monochrome.odd-width.odd-height.avif differ diff --git a/Tests/NukeAvifPluginTests/Fixtures/test_avifenc_gray.avif b/Tests/NukeAvifPluginTests/Fixtures/test_avifenc_gray.avif new file mode 100644 index 0000000..fa1ff52 Binary files /dev/null and b/Tests/NukeAvifPluginTests/Fixtures/test_avifenc_gray.avif differ diff --git a/Tests/NukeAvifPluginTests/Fixtures/test_avifenc_yuv420.avif b/Tests/NukeAvifPluginTests/Fixtures/test_avifenc_yuv420.avif new file mode 100644 index 0000000..a4327b4 Binary files /dev/null and b/Tests/NukeAvifPluginTests/Fixtures/test_avifenc_yuv420.avif differ diff --git a/Tests/NukeAvifPluginTests/Fixtures/test_avifenc_yuv422.avif b/Tests/NukeAvifPluginTests/Fixtures/test_avifenc_yuv422.avif new file mode 100644 index 0000000..4d9a5c6 Binary files /dev/null and b/Tests/NukeAvifPluginTests/Fixtures/test_avifenc_yuv422.avif differ diff --git a/Tests/NukeAvifPluginTests/Fixtures/test_avifenc_yuv444.avif b/Tests/NukeAvifPluginTests/Fixtures/test_avifenc_yuv444.avif new file mode 100644 index 0000000..f2b790f Binary files /dev/null and b/Tests/NukeAvifPluginTests/Fixtures/test_avifenc_yuv444.avif differ diff --git a/Tests/NukeAvifPluginTests/Fixtures/test_cavif_gray.avif b/Tests/NukeAvifPluginTests/Fixtures/test_cavif_gray.avif new file mode 100644 index 0000000..2e9fb5b Binary files /dev/null and b/Tests/NukeAvifPluginTests/Fixtures/test_cavif_gray.avif differ diff --git a/Tests/NukeAvifPluginTests/Fixtures/test_cavif_yuv420.avif b/Tests/NukeAvifPluginTests/Fixtures/test_cavif_yuv420.avif new file mode 100644 index 0000000..953e892 Binary files /dev/null and b/Tests/NukeAvifPluginTests/Fixtures/test_cavif_yuv420.avif differ diff --git a/Tests/NukeAvifPluginTests/Fixtures/test_cavif_yuv422.avif b/Tests/NukeAvifPluginTests/Fixtures/test_cavif_yuv422.avif new file mode 100644 index 0000000..8ffe83d Binary files /dev/null and b/Tests/NukeAvifPluginTests/Fixtures/test_cavif_yuv422.avif differ diff --git a/Tests/NukeAvifPluginTests/Fixtures/test_cavif_yuv444.avif b/Tests/NukeAvifPluginTests/Fixtures/test_cavif_yuv444.avif new file mode 100644 index 0000000..f30c020 Binary files /dev/null and b/Tests/NukeAvifPluginTests/Fixtures/test_cavif_yuv444.avif differ diff --git a/_Pods.xcodeproj b/_Pods.xcodeproj deleted file mode 120000 index 3c5a8e7..0000000 --- a/_Pods.xcodeproj +++ /dev/null @@ -1 +0,0 @@ -Example/Pods/Pods.xcodeproj \ No newline at end of file