@momo-kits/native-kits 0.0.1-beta.5 → 0.89.1-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/android/.gradle/8.0/checksums/checksums.lock +0 -0
- package/android/.gradle/8.0/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/8.0/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.0/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.0/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.0/gc.properties +0 -0
- package/android/.gradle/config.properties +2 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.idea/gradle.xml +12 -0
- package/android/.idea/migrations.xml +10 -0
- package/android/.idea/misc.xml +10 -0
- package/android/.idea/vcs.xml +6 -0
- package/android/.idea/workspace.xml +50 -0
- package/android/build.gradle +35 -69
- package/android/local.properties +8 -0
- package/android/proguard-rules.pro +21 -0
- package/android/src/main/AndroidManifest.xml +2 -2
- package/android/src/main/java/com/momoplatform/nativekits/foundations/Button.kt +16 -0
- package/android/src/main/java/com/momoplatform/nativekits/libs/Logo.kt +63 -0
- package/android/src/main/java/com/momoplatform/nativekits/libs/TrustBanner.kt +246 -0
- package/android/src/main/res/drawable/ic_launcher_background.xml +170 -0
- package/android/src/main/res/drawable-v24/ic_launcher_foreground.xml +30 -0
- package/android/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +6 -0
- package/android/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +6 -0
- package/android/src/main/res/mipmap-hdpi/ic_launcher.webp +0 -0
- package/android/src/main/res/mipmap-hdpi/ic_launcher_round.webp +0 -0
- package/android/src/main/res/mipmap-mdpi/ic_launcher.webp +0 -0
- package/android/src/main/res/mipmap-mdpi/ic_launcher_round.webp +0 -0
- package/android/src/main/res/mipmap-xhdpi/ic_launcher.webp +0 -0
- package/android/src/main/res/mipmap-xhdpi/ic_launcher_round.webp +0 -0
- package/android/src/main/res/mipmap-xxhdpi/ic_launcher.webp +0 -0
- package/android/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp +0 -0
- package/android/src/main/res/mipmap-xxxhdpi/ic_launcher.webp +0 -0
- package/android/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp +0 -0
- package/android/src/main/res/values/colors.xml +10 -0
- package/android/src/main/res/values/strings.xml +3 -0
- package/android/src/main/res/values/themes.xml +3 -0
- package/android/src/main/res/values-night/themes.xml +3 -0
- package/android/src/main/res/xml/backup_rules.xml +13 -0
- package/android/src/main/res/xml/data_extraction_rules.xml +19 -0
- package/build.gradle.kts +18 -0
- package/compose/build.gradle.kts +82 -0
- package/compose/src/androidMain/AndroidManifest.xml +2 -0
- package/compose/src/androidMain/kotlin/vn/momo/kits/utils/Platform.kt +3 -0
- package/compose/src/androidMain/kotlin/vn/momo/kits/utils/SetMaskFilter.kt +8 -0
- package/compose/src/androidMain/kotlin/vn/momo/kits/utils/Utils.android.kt +14 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Components.kt +194 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/NavigationContainer.kt +197 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Screen.kt +133 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Badge.kt +62 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeDot.kt +27 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +288 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/CheckBox.kt +80 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Divider.kt +23 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Icon.kt +42 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/IconButton.kt +126 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +51 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +299 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +246 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +223 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +244 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +281 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PromotionPopup.kt +72 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Radio.kt +65 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Skeleton.kt +64 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Switch.kt +63 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tag.kt +73 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +42 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Colors.kt +150 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Radius.kt +12 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Spacing.kt +13 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +173 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +242 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Card.kt +2 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Item.kt +2 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Section.kt +2 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Shadow.kt +50 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Icons.kt +1321 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Platform.kt +3 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/SetMaskFilter.kt +5 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Utils.kt +97 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/utils/Platform.kt +3 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/utils/SetMaskFilter.kt +9 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/utils/Utils.ios.kt +18 -0
- package/gradle.properties +19 -0
- package/gradlew +240 -0
- package/gradlew.bat +91 -0
- package/ios/Button/Button.swift +9 -2
- package/ios/CalculatorKeyboard/CalculatorKeyboard.swift +126 -0
- package/ios/Colors+Radius+Spacing/Colors.swift +21 -19
- package/ios/Input/Input.swift +1 -0
- package/ios/OTPKeyboard/KeyboardButton.swift +12 -4
- package/ios/Popup/PopupDisplay.swift +72 -81
- package/ios/Popup/PopupInput.swift +96 -0
- package/ios/Popup/PopupPromotion.swift +52 -0
- package/ios/ScrollIndicator/ScrollIndicator.swift +79 -0
- package/ios/Template/Logo/Logo.swift +75 -0
- package/ios/Template/TrustBanner/TrustBanner.swift +189 -0
- package/ios/native-kits.podspec +1 -1
- package/local.properties +8 -0
- package/package.json +6 -6
- package/publish.sh +1 -10
- package/settings.gradle.kts +41 -0
- package/android/gradle.properties +0 -5
- package/android/src/main/java/com/momoplatform/nativekits/NativeKitsPackage.kt +0 -17
- package/android/src/main/java/com/momoplatform/nativekits/NativeKitsViewManager.kt +0 -20
- package/example/ios/Example/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -63
- package/example/ios/Example/Assets.xcassets/Background.colorset/Contents.json +0 -38
- package/example/ios/Example/Assets.xcassets/Border.colorset/Contents.json +0 -38
- package/example/ios/Example/Assets.xcassets/Card.colorset/Contents.json +0 -38
- package/example/ios/Example/Assets.xcassets/Contents.json +0 -6
- package/example/ios/Example/Assets.xcassets/Error.colorset/Contents.json +0 -38
- package/example/ios/Example/Assets.xcassets/Primary.colorset/Contents.json +0 -38
- package/example/ios/Example/Assets.xcassets/PrimaryDark.colorset/Contents.json +0 -38
- package/example/ios/Example/Assets.xcassets/PrimaryLight.colorset/Contents.json +0 -38
- package/example/ios/Example/Assets.xcassets/Secondary.colorset/Contents.json +0 -38
- package/example/ios/Example/Assets.xcassets/Success.colorset/Contents.json +0 -38
- package/example/ios/Example/Assets.xcassets/Text.colorset/Contents.json +0 -38
- package/example/ios/Example/Assets.xcassets/TextSecondary.colorset/Contents.json +0 -38
- package/example/ios/Example/Assets.xcassets/Warning.colorset/Contents.json +0 -38
- package/example/ios/Example/ComponentDetail.swift +0 -35
- package/example/ios/Example/ComponentItem.swift +0 -24
- package/example/ios/Example/ComponentModel.swift +0 -38
- package/example/ios/Example/ContentView.swift +0 -39
- package/example/ios/Example/Example.entitlements +0 -10
- package/example/ios/Example/Foundation/ButtonDemo.swift +0 -80
- package/example/ios/Example/Foundation/ImageDemo.swift +0 -43
- package/example/ios/Example/Foundation/Popup/ActionSheets.swift +0 -136
- package/example/ios/Example/Foundation/Popup/Floats.swift +0 -127
- package/example/ios/Example/Foundation/Popup/Popups.swift +0 -51
- package/example/ios/Example/Foundation/PopupDemo.swift +0 -389
- package/example/ios/Example/Foundation/TextInputDemo.swift +0 -36
- package/example/ios/Example/Foundation/TypographyDemo.swift +0 -53
- package/example/ios/Example/Foundation.swift +0 -26
- package/example/ios/Example/Info.plist +0 -18
- package/example/ios/Example/Library/CheckboxDemo.swift +0 -19
- package/example/ios/Example/Library/SwipeableDemo.swift +0 -105
- package/example/ios/Example/Library/SwitchDemo.swift +0 -19
- package/example/ios/Example/Library.swift +0 -26
- package/example/ios/Example/Main.swift +0 -27
- package/example/ios/Example/Overview.swift +0 -20
- package/example/ios/Example/Preview Content/Preview Assets.xcassets/Contents.json +0 -6
- package/example/ios/Example/Resource/SFProText-Black.ttf +0 -0
- package/example/ios/Example/Resource/SFProText-Bold.ttf +0 -0
- package/example/ios/Example/Resource/SFProText-Heavy.ttf +0 -0
- package/example/ios/Example/Resource/SFProText-Light.ttf +0 -0
- package/example/ios/Example/Resource/SFProText-Medium.ttf +0 -0
- package/example/ios/Example/Resource/SFProText-Regular.ttf +0 -0
- package/example/ios/Example/Resource/SFProText-Semibold.ttf +0 -0
- package/example/ios/Example/Resource/SFProText-Thin.ttf +0 -0
- package/example/ios/Example/Resource/SFProText-Ultralight.ttf +0 -0
- package/example/ios/Example/Resource/foundation.json +0 -33
- package/example/ios/Example/Resource/library.json +0 -18
- package/example/ios/Example/Utils.swift +0 -30
- package/example/ios/Example/ViewModifier/DarkViewModifier.swift +0 -22
- package/example/ios/Example.xcodeproj/project.pbxproj +0 -581
- package/example/ios/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- package/example/ios/Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/example/ios/Example.xcodeproj/project.xcworkspace/xcuserdata/wem.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/example/ios/Example.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
- package/example/ios/Example.xcworkspace/contents.xcworkspacedata +0 -10
- package/example/ios/Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/example/ios/Example.xcworkspace/xcuserdata/wem.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/example/ios/Example.xcworkspace/xcuserdata/wem.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +0 -6
- package/example/ios/Podfile +0 -7
- package/example/ios/Podfile.lock +0 -35
- package/example/ios/Pods/Local Podspecs/MoMoUIKits.podspec.json +0 -37
- package/example/ios/Pods/Manifest.lock +0 -35
- package/example/ios/Pods/Pods.xcodeproj/project.pbxproj +0 -2047
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/MoMoUIKits.xcscheme +0 -58
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/Pods-Example.xcscheme +0 -58
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/SDWebImage.xcscheme +0 -58
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/SDWebImageSwiftUI.xcscheme +0 -58
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/SkeletonUI.xcscheme +0 -58
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/xcschememanagement.plist +0 -46
- package/example/ios/Pods/SDWebImage/LICENSE +0 -20
- package/example/ios/Pods/SDWebImage/README.md +0 -352
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/NSButton+WebCache.h +0 -340
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/NSButton+WebCache.m +0 -172
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/NSData+ImageContentType.h +0 -63
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/NSData+ImageContentType.m +0 -165
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/NSImage+Compatibility.h +0 -67
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/NSImage+Compatibility.m +0 -120
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImage.h +0 -114
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImage.m +0 -392
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImagePlayer.h +0 -112
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImagePlayer.m +0 -420
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImageRep.h +0 -23
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImageRep.m +0 -133
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImageView+WebCache.h +0 -168
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImageView+WebCache.m +0 -79
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImageView.h +0 -110
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImageView.m +0 -540
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDDiskCache.h +0 -145
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDDiskCache.m +0 -326
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDGraphicsImageRenderer.h +0 -73
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDGraphicsImageRenderer.m +0 -256
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageAPNGCoder.h +0 -19
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageAPNGCoder.m +0 -58
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageAWebPCoder.h +0 -23
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageAWebPCoder.m +0 -98
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCache.h +0 -450
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCache.m +0 -1030
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCacheConfig.h +0 -153
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCacheConfig.m +0 -68
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCacheDefine.h +0 -156
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCacheDefine.m +0 -138
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCachesManager.h +0 -81
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCachesManager.m +0 -556
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCoder.h +0 -297
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCoder.m +0 -26
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCoderHelper.h +0 -153
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCoderHelper.m +0 -822
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCodersManager.h +0 -58
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCodersManager.m +0 -130
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageFrame.h +0 -36
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageFrame.m +0 -28
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageGIFCoder.h +0 -22
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageGIFCoder.m +0 -58
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageGraphics.h +0 -28
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageGraphics.m +0 -127
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageHEICCoder.h +0 -25
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageHEICCoder.m +0 -101
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageIOAnimatedCoder.h +0 -58
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageIOAnimatedCoder.m +0 -807
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageIOCoder.h +0 -30
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageIOCoder.m +0 -420
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageLoader.h +0 -146
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageLoader.m +0 -170
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageLoadersManager.h +0 -40
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageLoadersManager.m +0 -123
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageTransformer.h +0 -241
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageTransformer.m +0 -331
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDMemoryCache.h +0 -78
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDMemoryCache.m +0 -158
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageCacheKeyFilter.h +0 -32
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageCacheKeyFilter.m +0 -39
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageCacheSerializer.h +0 -36
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageCacheSerializer.m +0 -39
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageCompat.h +0 -95
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageCompat.m +0 -17
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDefine.h +0 -352
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDefine.m +0 -149
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloader.h +0 -314
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloader.m +0 -658
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderConfig.h +0 -113
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderConfig.m +0 -60
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderDecryptor.h +0 -49
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderDecryptor.m +0 -55
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderOperation.h +0 -191
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderOperation.m +0 -722
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderRequestModifier.h +0 -69
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderRequestModifier.m +0 -71
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderResponseModifier.h +0 -69
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderResponseModifier.m +0 -73
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageError.h +0 -32
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageError.m +0 -16
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageIndicator.h +0 -115
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageIndicator.m +0 -275
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageManager.h +0 -290
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageManager.m +0 -775
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageOperation.h +0 -27
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageOperation.m +0 -14
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageOptionsProcessor.h +0 -72
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageOptionsProcessor.m +0 -59
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImagePrefetcher.h +0 -143
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImagePrefetcher.m +0 -303
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageTransition.h +0 -131
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageTransition.m +0 -194
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIButton+WebCache.h +0 -387
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIButton+WebCache.m +0 -234
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+ExtendedCacheData.h +0 -24
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+ExtendedCacheData.m +0 -23
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+ForceDecode.h +0 -46
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+ForceDecode.m +0 -60
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+GIF.h +0 -26
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+GIF.m +0 -22
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+MemoryCacheCost.h +0 -27
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+MemoryCacheCost.m +0 -47
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+Metadata.h +0 -89
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+Metadata.m +0 -221
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+MultiFormat.h +0 -80
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+MultiFormat.m +0 -47
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+Transform.h +0 -146
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+Transform.m +0 -824
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImageView+HighlightedWebCache.h +0 -129
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImageView+HighlightedWebCache.m +0 -76
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImageView+WebCache.h +0 -194
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImageView+WebCache.m +0 -67
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIView+WebCache.h +0 -110
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIView+WebCache.m +0 -446
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIView+WebCacheOperation.h +0 -48
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIView+WebCacheOperation.m +0 -82
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/NSBezierPath+SDRoundedCorners.h +0 -24
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/NSBezierPath+SDRoundedCorners.m +0 -42
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDAssociatedObject.h +0 -14
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDAssociatedObject.m +0 -29
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDAsyncBlockOperation.h +0 -21
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDAsyncBlockOperation.m +0 -92
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDDeviceHelper.h +0 -18
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDDeviceHelper.m +0 -32
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDDisplayLink.h +0 -29
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDDisplayLink.m +0 -227
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDFileAttributeHelper.h +0 -19
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDFileAttributeHelper.m +0 -127
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDImageAssetManager.h +0 -23
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDImageAssetManager.m +0 -164
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDImageCachesManagerOperation.h +0 -21
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDImageCachesManagerOperation.m +0 -83
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDImageIOAnimatedCoderInternal.h +0 -39
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDInternalMacros.h +0 -122
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDInternalMacros.m +0 -13
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDWeakProxy.h +0 -20
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDWeakProxy.m +0 -79
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDWebImageTransitionInternal.h +0 -19
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDmetamacros.h +0 -667
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/UIColor+SDHexString.h +0 -18
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/UIColor+SDHexString.m +0 -42
- package/example/ios/Pods/SDWebImage/WebImage/SDWebImage.h +0 -89
- package/example/ios/Pods/SDWebImageSwiftUI/LICENSE +0 -19
- package/example/ios/Pods/SDWebImageSwiftUI/README.md +0 -690
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/AnimatedImage.swift +0 -870
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Backports/Backport.swift +0 -59
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Backports/OnChange.swift +0 -52
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Backports/Overlay.swift +0 -124
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Backports/StateObject.swift +0 -151
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Image.swift +0 -78
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/ImageManager.swift +0 -132
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/ImagePlayer.swift +0 -122
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/ImageViewWrapper.swift +0 -133
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Indicator/ActivityIndicator.swift +0 -82
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Indicator/Indicator.swift +0 -97
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Indicator/ProgressIndicator.swift +0 -114
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/SDWebImageSwiftUI.swift +0 -64
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/SwiftUICompatibility.swift +0 -92
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Transition/Transition.swift +0 -93
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/WebImage.swift +0 -509
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Module/SDWebImageSwiftUI.h +0 -15
- package/example/ios/Pods/SkeletonUI/LICENSE +0 -21
- package/example/ios/Pods/SkeletonUI/README.md +0 -137
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Angle/AngleInteractor.swift +0 -29
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Angle/AnglePresenter.swift +0 -7
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Animation/AnimationInteractor.swift +0 -56
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Appearance/AppearanceInteractor.swift +0 -58
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Appearance/AppearancePresenter.swift +0 -5
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/ClosedRange+Normalize.swift +0 -16
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/Image+OptionalType.swift +0 -102
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/ModifiedContent+SkeletonModifier.swift +0 -26
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/Optional+OptionalType.swift +0 -5
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/SecureField+OptionalType.swift +0 -19
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/Text+OptionalType.swift +0 -27
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/TextField+OptionalType.swift +0 -35
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/Toggle+OptionalType.swift +0 -29
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/UnitPoint+Angle.swift +0 -8
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/View+SkeletonModifier.swift +0 -8
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Modifiers/SkeletonModifier.swift +0 -52
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Multiline/MultilineInteractor.swift +0 -41
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Multiline/MultilinePresenter.swift +0 -9
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Opacity/OpacityInteractor.swift +0 -29
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Opacity/OpacityPresenter.swift +0 -7
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Position/PositionInteractor.swift +0 -29
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Position/PositionPresenter.swift +0 -7
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Protocols/OptionalType.swift +0 -4
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Radius/RadiusInteractor.swift +0 -29
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Radius/RadiusPresenter.swift +0 -7
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Shape/ShapeInteractor.swift +0 -33
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Shape/ShapePresenter.swift +0 -5
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Skeleton/SkeletonForEach.swift +0 -20
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Skeleton/SkeletonInteractor.swift +0 -27
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Skeleton/SkeletonList.swift +0 -20
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Skeleton/SkeletonPresenter.swift +0 -15
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Skeleton/SkeletonShape.swift +0 -64
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Skeleton/SkeletonView.swift +0 -25
- package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits-dummy.m +0 -5
- package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits-prefix.pch +0 -12
- package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits-umbrella.h +0 -16
- package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits.debug.xcconfig +0 -15
- package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits.modulemap +0 -6
- package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits.release.xcconfig +0 -15
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example-acknowledgements.markdown +0 -75
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example-acknowledgements.plist +0 -119
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example-dummy.m +0 -5
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example-umbrella.h +0 -16
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig +0 -15
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example.modulemap +0 -6
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example.release.xcconfig +0 -15
- package/example/ios/Pods/Target Support Files/SDWebImage/SDWebImage-dummy.m +0 -5
- package/example/ios/Pods/Target Support Files/SDWebImage/SDWebImage-prefix.pch +0 -12
- package/example/ios/Pods/Target Support Files/SDWebImage/SDWebImage-umbrella.h +0 -75
- package/example/ios/Pods/Target Support Files/SDWebImage/SDWebImage.debug.xcconfig +0 -14
- package/example/ios/Pods/Target Support Files/SDWebImage/SDWebImage.modulemap +0 -6
- package/example/ios/Pods/Target Support Files/SDWebImage/SDWebImage.release.xcconfig +0 -14
- package/example/ios/Pods/Target Support Files/SDWebImageSwiftUI/SDWebImageSwiftUI-dummy.m +0 -5
- package/example/ios/Pods/Target Support Files/SDWebImageSwiftUI/SDWebImageSwiftUI-prefix.pch +0 -12
- package/example/ios/Pods/Target Support Files/SDWebImageSwiftUI/SDWebImageSwiftUI-umbrella.h +0 -17
- package/example/ios/Pods/Target Support Files/SDWebImageSwiftUI/SDWebImageSwiftUI.debug.xcconfig +0 -17
- package/example/ios/Pods/Target Support Files/SDWebImageSwiftUI/SDWebImageSwiftUI.modulemap +0 -6
- package/example/ios/Pods/Target Support Files/SDWebImageSwiftUI/SDWebImageSwiftUI.release.xcconfig +0 -17
- package/example/ios/Pods/Target Support Files/SkeletonUI/SkeletonUI-dummy.m +0 -5
- package/example/ios/Pods/Target Support Files/SkeletonUI/SkeletonUI-prefix.pch +0 -12
- package/example/ios/Pods/Target Support Files/SkeletonUI/SkeletonUI-umbrella.h +0 -16
- package/example/ios/Pods/Target Support Files/SkeletonUI/SkeletonUI.debug.xcconfig +0 -12
- package/example/ios/Pods/Target Support Files/SkeletonUI/SkeletonUI.modulemap +0 -6
- package/example/ios/Pods/Target Support Files/SkeletonUI/SkeletonUI.release.xcconfig +0 -12
- package/ios/Extensions/View++.swift +0 -9
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* This file is part of the SDWebImage package.
|
|
3
|
-
* (c) Olivier Poitrey <rs@dailymotion.com>
|
|
4
|
-
*
|
|
5
|
-
* For the full copyright and license information, please view the LICENSE
|
|
6
|
-
* file that was distributed with this source code.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
#import "SDWebImageCompat.h"
|
|
10
|
-
|
|
11
|
-
@class SDAsyncBlockOperation;
|
|
12
|
-
typedef void (^SDAsyncBlock)(SDAsyncBlockOperation * __nonnull asyncOperation);
|
|
13
|
-
|
|
14
|
-
/// A async block operation, success after you call `completer` (not like `NSBlockOperation` which is for sync block, success on return)
|
|
15
|
-
@interface SDAsyncBlockOperation : NSOperation
|
|
16
|
-
|
|
17
|
-
- (nonnull instancetype)initWithBlock:(nonnull SDAsyncBlock)block;
|
|
18
|
-
+ (nonnull instancetype)blockOperationWithBlock:(nonnull SDAsyncBlock)block;
|
|
19
|
-
- (void)complete;
|
|
20
|
-
|
|
21
|
-
@end
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* This file is part of the SDWebImage package.
|
|
3
|
-
* (c) Olivier Poitrey <rs@dailymotion.com>
|
|
4
|
-
*
|
|
5
|
-
* For the full copyright and license information, please view the LICENSE
|
|
6
|
-
* file that was distributed with this source code.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
#import "SDAsyncBlockOperation.h"
|
|
10
|
-
|
|
11
|
-
@interface SDAsyncBlockOperation ()
|
|
12
|
-
|
|
13
|
-
@property (assign, nonatomic, getter = isExecuting) BOOL executing;
|
|
14
|
-
@property (assign, nonatomic, getter = isFinished) BOOL finished;
|
|
15
|
-
@property (nonatomic, copy, nonnull) SDAsyncBlock executionBlock;
|
|
16
|
-
|
|
17
|
-
@end
|
|
18
|
-
|
|
19
|
-
@implementation SDAsyncBlockOperation
|
|
20
|
-
|
|
21
|
-
@synthesize executing = _executing;
|
|
22
|
-
@synthesize finished = _finished;
|
|
23
|
-
|
|
24
|
-
- (nonnull instancetype)initWithBlock:(nonnull SDAsyncBlock)block {
|
|
25
|
-
self = [super init];
|
|
26
|
-
if (self) {
|
|
27
|
-
self.executionBlock = block;
|
|
28
|
-
}
|
|
29
|
-
return self;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
+ (nonnull instancetype)blockOperationWithBlock:(nonnull SDAsyncBlock)block {
|
|
33
|
-
SDAsyncBlockOperation *operation = [[SDAsyncBlockOperation alloc] initWithBlock:block];
|
|
34
|
-
return operation;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
- (void)start {
|
|
38
|
-
@synchronized (self) {
|
|
39
|
-
if (self.isCancelled) {
|
|
40
|
-
self.finished = YES;
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
self.finished = NO;
|
|
45
|
-
self.executing = YES;
|
|
46
|
-
|
|
47
|
-
if (self.executionBlock) {
|
|
48
|
-
self.executionBlock(self);
|
|
49
|
-
} else {
|
|
50
|
-
self.executing = NO;
|
|
51
|
-
self.finished = YES;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
- (void)cancel {
|
|
57
|
-
@synchronized (self) {
|
|
58
|
-
[super cancel];
|
|
59
|
-
if (self.isExecuting) {
|
|
60
|
-
self.executing = NO;
|
|
61
|
-
self.finished = YES;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
- (void)complete {
|
|
68
|
-
@synchronized (self) {
|
|
69
|
-
if (self.isExecuting) {
|
|
70
|
-
self.finished = YES;
|
|
71
|
-
self.executing = NO;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
- (void)setFinished:(BOOL)finished {
|
|
77
|
-
[self willChangeValueForKey:@"isFinished"];
|
|
78
|
-
_finished = finished;
|
|
79
|
-
[self didChangeValueForKey:@"isFinished"];
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
- (void)setExecuting:(BOOL)executing {
|
|
83
|
-
[self willChangeValueForKey:@"isExecuting"];
|
|
84
|
-
_executing = executing;
|
|
85
|
-
[self didChangeValueForKey:@"isExecuting"];
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
- (BOOL)isConcurrent {
|
|
89
|
-
return YES;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
@end
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* This file is part of the SDWebImage package.
|
|
3
|
-
* (c) Olivier Poitrey <rs@dailymotion.com>
|
|
4
|
-
*
|
|
5
|
-
* For the full copyright and license information, please view the LICENSE
|
|
6
|
-
* file that was distributed with this source code.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
#import <Foundation/Foundation.h>
|
|
10
|
-
#import "SDWebImageCompat.h"
|
|
11
|
-
|
|
12
|
-
/// Device information helper methods
|
|
13
|
-
@interface SDDeviceHelper : NSObject
|
|
14
|
-
|
|
15
|
-
+ (NSUInteger)totalMemory;
|
|
16
|
-
+ (NSUInteger)freeMemory;
|
|
17
|
-
|
|
18
|
-
@end
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* This file is part of the SDWebImage package.
|
|
3
|
-
* (c) Olivier Poitrey <rs@dailymotion.com>
|
|
4
|
-
*
|
|
5
|
-
* For the full copyright and license information, please view the LICENSE
|
|
6
|
-
* file that was distributed with this source code.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
#import "SDDeviceHelper.h"
|
|
10
|
-
#import <mach/mach.h>
|
|
11
|
-
|
|
12
|
-
@implementation SDDeviceHelper
|
|
13
|
-
|
|
14
|
-
+ (NSUInteger)totalMemory {
|
|
15
|
-
return (NSUInteger)[[NSProcessInfo processInfo] physicalMemory];
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
+ (NSUInteger)freeMemory {
|
|
19
|
-
mach_port_t host_port = mach_host_self();
|
|
20
|
-
mach_msg_type_number_t host_size = sizeof(vm_statistics_data_t) / sizeof(integer_t);
|
|
21
|
-
vm_size_t page_size;
|
|
22
|
-
vm_statistics_data_t vm_stat;
|
|
23
|
-
kern_return_t kern;
|
|
24
|
-
|
|
25
|
-
kern = host_page_size(host_port, &page_size);
|
|
26
|
-
if (kern != KERN_SUCCESS) return 0;
|
|
27
|
-
kern = host_statistics(host_port, HOST_VM_INFO, (host_info_t)&vm_stat, &host_size);
|
|
28
|
-
if (kern != KERN_SUCCESS) return 0;
|
|
29
|
-
return vm_stat.free_count * page_size;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
@end
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* This file is part of the SDWebImage package.
|
|
3
|
-
* (c) Olivier Poitrey <rs@dailymotion.com>
|
|
4
|
-
*
|
|
5
|
-
* For the full copyright and license information, please view the LICENSE
|
|
6
|
-
* file that was distributed with this source code.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
#import <Foundation/Foundation.h>
|
|
10
|
-
#import "SDWebImageCompat.h"
|
|
11
|
-
|
|
12
|
-
/// Cross-platform display link wrapper. Do not retain the target
|
|
13
|
-
/// Use `CADisplayLink` on iOS/tvOS, `CVDisplayLink` on macOS, `NSTimer` on watchOS
|
|
14
|
-
@interface SDDisplayLink : NSObject
|
|
15
|
-
|
|
16
|
-
@property (readonly, nonatomic, weak, nullable) id target;
|
|
17
|
-
@property (readonly, nonatomic, assign, nonnull) SEL selector;
|
|
18
|
-
@property (readonly, nonatomic) CFTimeInterval duration;
|
|
19
|
-
@property (readonly, nonatomic) BOOL isRunning;
|
|
20
|
-
|
|
21
|
-
+ (nonnull instancetype)displayLinkWithTarget:(nonnull id)target selector:(nonnull SEL)sel;
|
|
22
|
-
|
|
23
|
-
- (void)addToRunLoop:(nonnull NSRunLoop *)runloop forMode:(nonnull NSRunLoopMode)mode;
|
|
24
|
-
- (void)removeFromRunLoop:(nonnull NSRunLoop *)runloop forMode:(nonnull NSRunLoopMode)mode;
|
|
25
|
-
|
|
26
|
-
- (void)start;
|
|
27
|
-
- (void)stop;
|
|
28
|
-
|
|
29
|
-
@end
|
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* This file is part of the SDWebImage package.
|
|
3
|
-
* (c) Olivier Poitrey <rs@dailymotion.com>
|
|
4
|
-
*
|
|
5
|
-
* For the full copyright and license information, please view the LICENSE
|
|
6
|
-
* file that was distributed with this source code.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
#import "SDDisplayLink.h"
|
|
10
|
-
#import "SDWeakProxy.h"
|
|
11
|
-
#if SD_MAC
|
|
12
|
-
#import <CoreVideo/CoreVideo.h>
|
|
13
|
-
#elif SD_IOS || SD_TV
|
|
14
|
-
#import <QuartzCore/QuartzCore.h>
|
|
15
|
-
#endif
|
|
16
|
-
|
|
17
|
-
#if SD_MAC
|
|
18
|
-
static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeStamp *inNow, const CVTimeStamp *inOutputTime, CVOptionFlags flagsIn, CVOptionFlags *flagsOut, void *displayLinkContext);
|
|
19
|
-
#endif
|
|
20
|
-
|
|
21
|
-
#define kSDDisplayLinkInterval 1.0 / 60
|
|
22
|
-
|
|
23
|
-
@interface SDDisplayLink ()
|
|
24
|
-
|
|
25
|
-
#if SD_MAC
|
|
26
|
-
@property (nonatomic, assign) CVDisplayLinkRef displayLink;
|
|
27
|
-
@property (nonatomic, assign) CVTimeStamp outputTime;
|
|
28
|
-
@property (nonatomic, copy) NSRunLoopMode runloopMode;
|
|
29
|
-
#elif SD_IOS || SD_TV
|
|
30
|
-
@property (nonatomic, strong) CADisplayLink *displayLink;
|
|
31
|
-
#else
|
|
32
|
-
@property (nonatomic, strong) NSTimer *displayLink;
|
|
33
|
-
@property (nonatomic, strong) NSRunLoop *runloop;
|
|
34
|
-
@property (nonatomic, copy) NSRunLoopMode runloopMode;
|
|
35
|
-
@property (nonatomic, assign) NSTimeInterval currentFireDate;
|
|
36
|
-
#endif
|
|
37
|
-
|
|
38
|
-
@end
|
|
39
|
-
|
|
40
|
-
@implementation SDDisplayLink
|
|
41
|
-
|
|
42
|
-
- (void)dealloc {
|
|
43
|
-
#if SD_MAC
|
|
44
|
-
if (_displayLink) {
|
|
45
|
-
CVDisplayLinkRelease(_displayLink);
|
|
46
|
-
_displayLink = NULL;
|
|
47
|
-
}
|
|
48
|
-
#elif SD_IOS || SD_TV
|
|
49
|
-
[_displayLink invalidate];
|
|
50
|
-
_displayLink = nil;
|
|
51
|
-
#else
|
|
52
|
-
[_displayLink invalidate];
|
|
53
|
-
_displayLink = nil;
|
|
54
|
-
#endif
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
- (instancetype)initWithTarget:(id)target selector:(SEL)sel {
|
|
58
|
-
self = [super init];
|
|
59
|
-
if (self) {
|
|
60
|
-
_target = target;
|
|
61
|
-
_selector = sel;
|
|
62
|
-
#if SD_MAC
|
|
63
|
-
CVDisplayLinkCreateWithActiveCGDisplays(&_displayLink);
|
|
64
|
-
CVDisplayLinkSetOutputCallback(_displayLink, DisplayLinkCallback, (__bridge void *)self);
|
|
65
|
-
#elif SD_IOS || SD_TV
|
|
66
|
-
SDWeakProxy *weakProxy = [SDWeakProxy proxyWithTarget:self];
|
|
67
|
-
_displayLink = [CADisplayLink displayLinkWithTarget:weakProxy selector:@selector(displayLinkDidRefresh:)];
|
|
68
|
-
#else
|
|
69
|
-
SDWeakProxy *weakProxy = [SDWeakProxy proxyWithTarget:self];
|
|
70
|
-
_displayLink = [NSTimer timerWithTimeInterval:kSDDisplayLinkInterval target:weakProxy selector:@selector(displayLinkDidRefresh:) userInfo:nil repeats:YES];
|
|
71
|
-
#endif
|
|
72
|
-
}
|
|
73
|
-
return self;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
+ (instancetype)displayLinkWithTarget:(id)target selector:(SEL)sel {
|
|
77
|
-
SDDisplayLink *displayLink = [[SDDisplayLink alloc] initWithTarget:target selector:sel];
|
|
78
|
-
return displayLink;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
- (CFTimeInterval)duration {
|
|
82
|
-
#if SD_MAC
|
|
83
|
-
CVTimeStamp outputTime = self.outputTime;
|
|
84
|
-
NSTimeInterval duration = 0;
|
|
85
|
-
double periodPerSecond = (double)outputTime.videoTimeScale * outputTime.rateScalar;
|
|
86
|
-
if (periodPerSecond > 0) {
|
|
87
|
-
duration = (double)outputTime.videoRefreshPeriod / periodPerSecond;
|
|
88
|
-
}
|
|
89
|
-
#elif SD_IOS || SD_TV
|
|
90
|
-
#pragma clang diagnostic push
|
|
91
|
-
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
|
92
|
-
NSTimeInterval duration = 0;
|
|
93
|
-
if (@available(iOS 10.0, tvOS 10.0, *)) {
|
|
94
|
-
duration = self.displayLink.targetTimestamp - CACurrentMediaTime();
|
|
95
|
-
} else {
|
|
96
|
-
duration = self.displayLink.duration * self.displayLink.frameInterval;
|
|
97
|
-
}
|
|
98
|
-
#pragma clang diagnostic pop
|
|
99
|
-
#else
|
|
100
|
-
NSTimeInterval duration = 0;
|
|
101
|
-
if (self.displayLink.isValid && self.currentFireDate != 0) {
|
|
102
|
-
NSTimeInterval nextFireDate = CFRunLoopTimerGetNextFireDate((__bridge CFRunLoopTimerRef)self.displayLink);
|
|
103
|
-
duration = nextFireDate - self.currentFireDate;
|
|
104
|
-
}
|
|
105
|
-
#endif
|
|
106
|
-
if (duration <= 0) {
|
|
107
|
-
duration = kSDDisplayLinkInterval;
|
|
108
|
-
}
|
|
109
|
-
return duration;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
- (BOOL)isRunning {
|
|
113
|
-
#if SD_MAC
|
|
114
|
-
return CVDisplayLinkIsRunning(self.displayLink);
|
|
115
|
-
#elif SD_IOS || SD_TV
|
|
116
|
-
return !self.displayLink.isPaused;
|
|
117
|
-
#else
|
|
118
|
-
return self.displayLink.isValid;
|
|
119
|
-
#endif
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
- (void)addToRunLoop:(NSRunLoop *)runloop forMode:(NSRunLoopMode)mode {
|
|
123
|
-
if (!runloop || !mode) {
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
126
|
-
#if SD_MAC
|
|
127
|
-
self.runloopMode = mode;
|
|
128
|
-
#elif SD_IOS || SD_TV
|
|
129
|
-
[self.displayLink addToRunLoop:runloop forMode:mode];
|
|
130
|
-
#else
|
|
131
|
-
self.runloop = runloop;
|
|
132
|
-
self.runloopMode = mode;
|
|
133
|
-
CFRunLoopMode cfMode;
|
|
134
|
-
if ([mode isEqualToString:NSDefaultRunLoopMode]) {
|
|
135
|
-
cfMode = kCFRunLoopDefaultMode;
|
|
136
|
-
} else if ([mode isEqualToString:NSRunLoopCommonModes]) {
|
|
137
|
-
cfMode = kCFRunLoopCommonModes;
|
|
138
|
-
} else {
|
|
139
|
-
cfMode = (__bridge CFStringRef)mode;
|
|
140
|
-
}
|
|
141
|
-
CFRunLoopAddTimer(runloop.getCFRunLoop, (__bridge CFRunLoopTimerRef)self.displayLink, cfMode);
|
|
142
|
-
#endif
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
- (void)removeFromRunLoop:(NSRunLoop *)runloop forMode:(NSRunLoopMode)mode {
|
|
146
|
-
if (!runloop || !mode) {
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
149
|
-
#if SD_MAC
|
|
150
|
-
self.runloopMode = nil;
|
|
151
|
-
#elif SD_IOS || SD_TV
|
|
152
|
-
[self.displayLink removeFromRunLoop:runloop forMode:mode];
|
|
153
|
-
#else
|
|
154
|
-
self.runloop = nil;
|
|
155
|
-
self.runloopMode = nil;
|
|
156
|
-
CFRunLoopMode cfMode;
|
|
157
|
-
if ([mode isEqualToString:NSDefaultRunLoopMode]) {
|
|
158
|
-
cfMode = kCFRunLoopDefaultMode;
|
|
159
|
-
} else if ([mode isEqualToString:NSRunLoopCommonModes]) {
|
|
160
|
-
cfMode = kCFRunLoopCommonModes;
|
|
161
|
-
} else {
|
|
162
|
-
cfMode = (__bridge CFStringRef)mode;
|
|
163
|
-
}
|
|
164
|
-
CFRunLoopRemoveTimer(runloop.getCFRunLoop, (__bridge CFRunLoopTimerRef)self.displayLink, cfMode);
|
|
165
|
-
#endif
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
- (void)start {
|
|
169
|
-
#if SD_MAC
|
|
170
|
-
CVDisplayLinkStart(self.displayLink);
|
|
171
|
-
#elif SD_IOS || SD_TV
|
|
172
|
-
self.displayLink.paused = NO;
|
|
173
|
-
#else
|
|
174
|
-
if (self.displayLink.isValid) {
|
|
175
|
-
[self.displayLink fire];
|
|
176
|
-
} else {
|
|
177
|
-
SDWeakProxy *weakProxy = [SDWeakProxy proxyWithTarget:self];
|
|
178
|
-
self.displayLink = [NSTimer timerWithTimeInterval:kSDDisplayLinkInterval target:weakProxy selector:@selector(displayLinkDidRefresh:) userInfo:nil repeats:YES];
|
|
179
|
-
[self addToRunLoop:self.runloop forMode:self.runloopMode];
|
|
180
|
-
}
|
|
181
|
-
#endif
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
- (void)stop {
|
|
185
|
-
#if SD_MAC
|
|
186
|
-
CVDisplayLinkStop(self.displayLink);
|
|
187
|
-
#elif SD_IOS || SD_TV
|
|
188
|
-
self.displayLink.paused = YES;
|
|
189
|
-
#else
|
|
190
|
-
[self.displayLink invalidate];
|
|
191
|
-
#endif
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
- (void)displayLinkDidRefresh:(id)displayLink {
|
|
195
|
-
#if SD_MAC
|
|
196
|
-
// CVDisplayLink does not use runloop, but we can provide similar behavior for modes
|
|
197
|
-
// May use `default` runloop to avoid extra callback when in `eventTracking` (mouse drag, scroll) or `modalPanel` (modal panel)
|
|
198
|
-
NSString *runloopMode = self.runloopMode;
|
|
199
|
-
if (![runloopMode isEqualToString:NSRunLoopCommonModes] && ![runloopMode isEqualToString:NSRunLoop.mainRunLoop.currentMode]) {
|
|
200
|
-
return;
|
|
201
|
-
}
|
|
202
|
-
#endif
|
|
203
|
-
#pragma clang diagnostic push
|
|
204
|
-
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
|
|
205
|
-
[_target performSelector:_selector withObject:self];
|
|
206
|
-
#pragma clang diagnostic pop
|
|
207
|
-
#if SD_WATCH
|
|
208
|
-
self.currentFireDate = CFRunLoopTimerGetNextFireDate((__bridge CFRunLoopTimerRef)self.displayLink);
|
|
209
|
-
#endif
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
@end
|
|
213
|
-
|
|
214
|
-
#if SD_MAC
|
|
215
|
-
static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeStamp *inNow, const CVTimeStamp *inOutputTime, CVOptionFlags flagsIn, CVOptionFlags *flagsOut, void *displayLinkContext) {
|
|
216
|
-
// CVDisplayLink callback is not on main queue
|
|
217
|
-
SDDisplayLink *object = (__bridge SDDisplayLink *)displayLinkContext;
|
|
218
|
-
if (inOutputTime) {
|
|
219
|
-
object.outputTime = *inOutputTime;
|
|
220
|
-
}
|
|
221
|
-
__weak SDDisplayLink *weakObject = object;
|
|
222
|
-
dispatch_async(dispatch_get_main_queue(), ^{
|
|
223
|
-
[weakObject displayLinkDidRefresh:(__bridge id)(displayLink)];
|
|
224
|
-
});
|
|
225
|
-
return kCVReturnSuccess;
|
|
226
|
-
}
|
|
227
|
-
#endif
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// This file is from https://gist.github.com/zydeco/6292773
|
|
3
|
-
//
|
|
4
|
-
// Created by Jesús A. Álvarez on 2008-12-17.
|
|
5
|
-
// Copyright 2008-2009 namedfork.net. All rights reserved.
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
#import <Foundation/Foundation.h>
|
|
9
|
-
|
|
10
|
-
/// File Extended Attribute (xattr) helper methods
|
|
11
|
-
@interface SDFileAttributeHelper : NSObject
|
|
12
|
-
|
|
13
|
-
+ (nullable NSArray<NSString *> *)extendedAttributeNamesAtPath:(nonnull NSString *)path traverseLink:(BOOL)follow error:(NSError * _Nullable * _Nullable)err;
|
|
14
|
-
+ (BOOL)hasExtendedAttribute:(nonnull NSString *)name atPath:(nonnull NSString *)path traverseLink:(BOOL)follow error:(NSError * _Nullable * _Nullable)err;
|
|
15
|
-
+ (nullable NSData *)extendedAttribute:(nonnull NSString *)name atPath:(nonnull NSString *)path traverseLink:(BOOL)follow error:(NSError * _Nullable * _Nullable)err;
|
|
16
|
-
+ (BOOL)setExtendedAttribute:(nonnull NSString *)name value:(nonnull NSData *)value atPath:(nonnull NSString *)path traverseLink:(BOOL)follow overwrite:(BOOL)overwrite error:(NSError * _Nullable * _Nullable)err;
|
|
17
|
-
+ (BOOL)removeExtendedAttribute:(nonnull NSString *)name atPath:(nonnull NSString *)path traverseLink:(BOOL)follow error:(NSError * _Nullable * _Nullable)err;
|
|
18
|
-
|
|
19
|
-
@end
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// This file is from https://gist.github.com/zydeco/6292773
|
|
3
|
-
//
|
|
4
|
-
// Created by Jesús A. Álvarez on 2008-12-17.
|
|
5
|
-
// Copyright 2008-2009 namedfork.net. All rights reserved.
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
#import "SDFileAttributeHelper.h"
|
|
9
|
-
#import <sys/xattr.h>
|
|
10
|
-
|
|
11
|
-
@implementation SDFileAttributeHelper
|
|
12
|
-
|
|
13
|
-
+ (NSArray*)extendedAttributeNamesAtPath:(NSString *)path traverseLink:(BOOL)follow error:(NSError **)err {
|
|
14
|
-
int flags = follow? 0 : XATTR_NOFOLLOW;
|
|
15
|
-
|
|
16
|
-
// get size of name list
|
|
17
|
-
ssize_t nameBuffLen = listxattr([path fileSystemRepresentation], NULL, 0, flags);
|
|
18
|
-
if (nameBuffLen == -1) {
|
|
19
|
-
if (err) *err = [NSError errorWithDomain:NSPOSIXErrorDomain code:errno userInfo:
|
|
20
|
-
@{
|
|
21
|
-
@"error": [NSString stringWithUTF8String:strerror(errno)],
|
|
22
|
-
@"function": @"listxattr",
|
|
23
|
-
@":path": path,
|
|
24
|
-
@":traverseLink": @(follow)
|
|
25
|
-
}
|
|
26
|
-
];
|
|
27
|
-
return nil;
|
|
28
|
-
} else if (nameBuffLen == 0) return @[];
|
|
29
|
-
|
|
30
|
-
// get name list
|
|
31
|
-
NSMutableData *nameBuff = [NSMutableData dataWithLength:nameBuffLen];
|
|
32
|
-
listxattr([path fileSystemRepresentation], [nameBuff mutableBytes], nameBuffLen, flags);
|
|
33
|
-
|
|
34
|
-
// convert to array
|
|
35
|
-
NSMutableArray * names = [NSMutableArray arrayWithCapacity:5];
|
|
36
|
-
char *nextName, *endOfNames = [nameBuff mutableBytes] + nameBuffLen;
|
|
37
|
-
for(nextName = [nameBuff mutableBytes]; nextName < endOfNames; nextName += 1+strlen(nextName))
|
|
38
|
-
[names addObject:[NSString stringWithUTF8String:nextName]];
|
|
39
|
-
return names.copy;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
+ (BOOL)hasExtendedAttribute:(NSString *)name atPath:(NSString *)path traverseLink:(BOOL)follow error:(NSError **)err {
|
|
43
|
-
int flags = follow? 0 : XATTR_NOFOLLOW;
|
|
44
|
-
|
|
45
|
-
// get size of name list
|
|
46
|
-
ssize_t nameBuffLen = listxattr([path fileSystemRepresentation], NULL, 0, flags);
|
|
47
|
-
if (nameBuffLen == -1) {
|
|
48
|
-
if (err) *err = [NSError errorWithDomain:NSPOSIXErrorDomain code:errno userInfo:
|
|
49
|
-
@{
|
|
50
|
-
@"error": [NSString stringWithUTF8String:strerror(errno)],
|
|
51
|
-
@"function": @"listxattr",
|
|
52
|
-
@":path": path,
|
|
53
|
-
@":traverseLink": @(follow)
|
|
54
|
-
}
|
|
55
|
-
];
|
|
56
|
-
return NO;
|
|
57
|
-
} else if (nameBuffLen == 0) return NO;
|
|
58
|
-
|
|
59
|
-
// get name list
|
|
60
|
-
NSMutableData *nameBuff = [NSMutableData dataWithLength:nameBuffLen];
|
|
61
|
-
listxattr([path fileSystemRepresentation], [nameBuff mutableBytes], nameBuffLen, flags);
|
|
62
|
-
|
|
63
|
-
// find our name
|
|
64
|
-
char *nextName, *endOfNames = [nameBuff mutableBytes] + nameBuffLen;
|
|
65
|
-
for(nextName = [nameBuff mutableBytes]; nextName < endOfNames; nextName += 1+strlen(nextName))
|
|
66
|
-
if (strcmp(nextName, [name UTF8String]) == 0) return YES;
|
|
67
|
-
return NO;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
+ (NSData *)extendedAttribute:(NSString *)name atPath:(NSString *)path traverseLink:(BOOL)follow error:(NSError **)err {
|
|
71
|
-
int flags = follow? 0 : XATTR_NOFOLLOW;
|
|
72
|
-
// get length
|
|
73
|
-
ssize_t attrLen = getxattr([path fileSystemRepresentation], [name UTF8String], NULL, 0, 0, flags);
|
|
74
|
-
if (attrLen == -1) {
|
|
75
|
-
if (err) *err = [NSError errorWithDomain:NSPOSIXErrorDomain code:errno userInfo:
|
|
76
|
-
@{
|
|
77
|
-
@"error": [NSString stringWithUTF8String:strerror(errno)],
|
|
78
|
-
@"function": @"getxattr",
|
|
79
|
-
@":name": name,
|
|
80
|
-
@":path": path,
|
|
81
|
-
@":traverseLink": @(follow)
|
|
82
|
-
}
|
|
83
|
-
];
|
|
84
|
-
return nil;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// get attribute data
|
|
88
|
-
NSMutableData *attrData = [NSMutableData dataWithLength:attrLen];
|
|
89
|
-
getxattr([path fileSystemRepresentation], [name UTF8String], [attrData mutableBytes], attrLen, 0, flags);
|
|
90
|
-
return attrData;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
+ (BOOL)setExtendedAttribute:(NSString *)name value:(NSData *)value atPath:(NSString *)path traverseLink:(BOOL)follow overwrite:(BOOL)overwrite error:(NSError **)err {
|
|
94
|
-
int flags = (follow? 0 : XATTR_NOFOLLOW) | (overwrite? 0 : XATTR_CREATE);
|
|
95
|
-
if (0 == setxattr([path fileSystemRepresentation], [name UTF8String], [value bytes], [value length], 0, flags)) return YES;
|
|
96
|
-
// error
|
|
97
|
-
if (err) *err = [NSError errorWithDomain:NSPOSIXErrorDomain code:errno userInfo:
|
|
98
|
-
@{
|
|
99
|
-
@"error": [NSString stringWithUTF8String:strerror(errno)],
|
|
100
|
-
@"function": @"setxattr",
|
|
101
|
-
@":name": name,
|
|
102
|
-
@":value.length": @(value.length),
|
|
103
|
-
@":path": path,
|
|
104
|
-
@":traverseLink": @(follow),
|
|
105
|
-
@":overwrite": @(overwrite)
|
|
106
|
-
}
|
|
107
|
-
];
|
|
108
|
-
return NO;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
+ (BOOL)removeExtendedAttribute:(NSString *)name atPath:(NSString *)path traverseLink:(BOOL)follow error:(NSError **)err {
|
|
112
|
-
int flags = (follow? 0 : XATTR_NOFOLLOW);
|
|
113
|
-
if (0 == removexattr([path fileSystemRepresentation], [name UTF8String], flags)) return YES;
|
|
114
|
-
// error
|
|
115
|
-
if (err) *err = [NSError errorWithDomain:NSPOSIXErrorDomain code:errno userInfo:
|
|
116
|
-
@{
|
|
117
|
-
@"error": [NSString stringWithUTF8String:strerror(errno)],
|
|
118
|
-
@"function": @"removexattr",
|
|
119
|
-
@":name": name,
|
|
120
|
-
@":path": path,
|
|
121
|
-
@":traverseLink": @(follow)
|
|
122
|
-
}
|
|
123
|
-
];
|
|
124
|
-
return NO;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
@end
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* This file is part of the SDWebImage package.
|
|
3
|
-
* (c) Olivier Poitrey <rs@dailymotion.com>
|
|
4
|
-
*
|
|
5
|
-
* For the full copyright and license information, please view the LICENSE
|
|
6
|
-
* file that was distributed with this source code.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
#import <Foundation/Foundation.h>
|
|
10
|
-
#import "SDWebImageCompat.h"
|
|
11
|
-
|
|
12
|
-
/// A Image-Asset manager to work like UIKit/AppKit's image cache behavior
|
|
13
|
-
/// Apple parse the Asset Catalog compiled file(`Assets.car`) by CoreUI.framework, however it's a private framework and there are no other ways to directly get the data. So we just process the normal bundle files :)
|
|
14
|
-
@interface SDImageAssetManager : NSObject
|
|
15
|
-
|
|
16
|
-
@property (nonatomic, strong, nonnull) NSMapTable<NSString *, UIImage *> *imageTable;
|
|
17
|
-
|
|
18
|
-
+ (nonnull instancetype)sharedAssetManager;
|
|
19
|
-
- (nullable NSString *)getPathForName:(nonnull NSString *)name bundle:(nonnull NSBundle *)bundle preferredScale:(nonnull CGFloat *)scale;
|
|
20
|
-
- (nullable UIImage *)imageForName:(nonnull NSString *)name;
|
|
21
|
-
- (void)storeImage:(nonnull UIImage *)image forName:(nonnull NSString *)name;
|
|
22
|
-
|
|
23
|
-
@end
|