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

[iOS AppClip] Swift UI say error when use this URLImage #111

Closed jerryzhoujw closed 3 years ago

jerryzhoujw commented 3 years ago

Summary and/or background SwiftUI say error when use this URLImage. Update: Looks like it related to App Clip's problem.

OS and what device you are using

Version of URLImage library 0.9.19

What you expected would happen no error

What actually happens error

Screen Shot 2020-11-12 at 9 29 52 AM Screen Shot 2020-11-12 at 9 30 00 AM

Update:

dyld: Library not loaded: @rpath/URLImage.framework/URLImage
  Referenced from: /Users/jerryzhou/Library/Developer/CoreSimulator/Devices/DA48EB2D-2380-4840-82AD-36078504344C/data/Containers/Bundle/Application/FB835749-60AF-4C43-9383-0E7F1DB6ABDA/testClip.app/testClip
  Reason: image not found
dyld: launch, loading dependent libraries
DYLD_SHARED_CACHE_DIR=/Users/jerryzhou/Library/Developer/CoreSimulator/Caches/dyld/19H2/com.apple.CoreSimulator.SimRuntime.iOS-14-1.18A8394
DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot
DYLD_LIBRARY_PATH=/Users/jerryzhou/Documents/code/flutter/github/g_swiftUI/imageWithUrlTest/testAppClip/testAppClip/DerivedData/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection
DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libBacktraceRecording.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/
Message from debugger: Terminated due to signal 6

Sample code

import SwiftUI
import URLImage

struct TreeRow: View {
  var _url = URL(fileURLWithPath: "https://cdn.britannica.com/95/6795-050-A2505A05/Bottle-tree.jpg")

  var body: some View {
    HStack{
      URLImage(_url) { (imageProxy:ImageProxy)  in
        imageProxy.image.resizable()
      }
      Text("Course !2")
      Text("Course 23")
    }
  }
}

struct CourseRow_Previews: PreviewProvider {
    static var previews: some View {
      TreeRow()
    }
}

Test data https://cdn.britannica.com/95/6795-050-A2505A05/Bottle-tree.jpg

Additional information:

jerryzhoujw commented 3 years ago

https://github.com/Alamofire/Alamofire/issues/3051#issuecomment-580003683

it's closed with this comment.