dmytro-anokhin / url-image

AsyncImage before iOS 15. Lightweight, pure SwiftUI Image view, that displays an image downloaded from URL, with auxiliary views and local cache.
MIT License
1.1k stars 96 forks source link

Carthage support #141

Closed Lavmint closed 3 years ago

Lavmint commented 3 years ago

Cartfile

github "evgenyneu/keychain-swift" ~> 19.0
github "SDWebImage/SDWebImageSwiftUI" ~> 2.0
github "Lavmint/url-image" "feature/carthage-support"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" ~> 6.33
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseCrashlyticsBinary.json" ~> 6.33
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMessagingBinary.json" ~> 6.33
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseProtobufBinary.json" ~> 6.33

Output

➜  carthage update --use-xcframeworks --platform ios
*** Downloading binary-only framework FirebaseMessagingBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMessagingBinary.json"
*** Fetching url-image
*** Downloading binary-only framework FirebaseAnalyticsBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json"
*** Downloading binary-only framework FirebaseCrashlyticsBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseCrashlyticsBinary.json"
*** Fetching SDWebImageSwiftUI
*** Downloading binary-only framework FirebaseProtobufBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseProtobufBinary.json"
*** Fetching keychain-swift
*** Fetching SDWebImage
*** Checking out url-image at "eeea2050c05be43e58d58221f856cd2bffa7fb73"
*** Checking out keychain-swift at "19.0.0"
*** Checking out SDWebImageSwiftUI at "2.0.2"
*** Checking out SDWebImage at "5.10.4"
*** xcodebuild output can be found in /var/folders/h_/srry_t7j20g15nqt41qtggsr0000gn/T/carthage-xcodebuild.BPgs1F.log
*** Downloading binary-only framework FirebaseAnalyticsBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json"
*** Downloading binary-only framework FirebaseCrashlyticsBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseCrashlyticsBinary.json"
*** Downloading binary-only framework FirebaseMessagingBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMessagingBinary.json"
*** Downloading binary-only framework FirebaseProtobufBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseProtobufBinary.json"
*** Building scheme "KeychainSwift" in KeychainSwift.xcodeproj
*** Building scheme "SDWebImage" in SDWebImage.xcodeproj
*** Building scheme "SDWebImageMapKit" in SDWebImage.xcodeproj
*** Building scheme "SDWebImageSwiftUI" in SDWebImageSwiftUI.xcodeproj
*** Building scheme "URLImage-Package" in URLImage.xcodeproj

Content of Carthage/Build folder:

KeychainSwift.xcframework 

//all this stuff is SDWebImageSwiftUI
SDWebImageSwiftUI.xcframework
SDWebImage.xcframework     
SDWebImageMapKit.xcframework

//all this stuff is URLImage
DownloadManager.xcframework   
Common.xcframework           
ImageDecoder.xcframework
PlainDatabase.xcframework   
RemoteContentView.xcframework 
FileIndex.xcframework         
Log.xcframework               
URLImage.xcframework

//location of old `*.framework` (firebase)
iOS

Example of integration to target project with xcodegen Basically how it will be integrated to target project if up to user, I prefer xcodegen

targetTemplates:
  URLImage:
    dependencies:
      - framework: "Carthage/Build/DownloadManager.xcframework"
      - framework: "Carthage/Build/Common.xcframework"
      - framework: "Carthage/Build/ImageDecoder.xcframework"
      - framework: "Carthage/Build/PlainDatabase.xcframework"
      - framework: "Carthage/Build/RemoteContentView.xcframework"
      - framework: "Carthage/Build/FileIndex.xcframework"
      - framework: "Carthage/Build/Log.xcframework"
      - framework: "Carthage/Build/URLImage.xcframework"
dmytro-anokhin commented 3 years ago

There is no plan to add Carthage support to the package. Issue for the reference: #140