Closed adamayoung closed 4 years ago
Sounds little strange.
Did you mean: When I create a dependent WatchKit App with SwiftUI (The Host WatchOS App is not gray), this cause the import issue ?
Can you have a quick test with other Package Manager like Carthage and CocoaPods, to test whether SwiftPM cause issues ?
And, please do a clean build between you switch Xcode scheme, I doubt this is because some cache issues ?
Tried the clean build, and deleted the derived data directory, but no joy.
Here's the commit it's happening on
https://github.com/adamayoung/Movies/tree/641d17534a99aab103499103e818eba0fa3fa135
I've created an independent watch app now, and it's working as expected.
Instructions to reproduce:
Create new Xcode iOS Project
Add SDWebImageSwiftUI as a Swift Package dependency and include in iOS target
import SDWebImageSwiftUI in a file in the iOS target
Build - should be fine
Add a new target - 'Watch App for iOS App'
Link SDWebImageSwiftUI library in watch extension target
import SDWebImageSwiftUI in a file in the watch extension target
Build watch scheme - should be fine
Change back to the iOS app scheme
Build - Should get error 'No such module 'SDWebImage'
Can not reproduce on Xcode 13.1 ? Any extra steps ? I use the dependent WatchOS App as well.
Build - should be fine ✅
Add a new target - 'Watch App for iOS App' ✅
Link SDWebImageSwiftUI library in watch extension target ✅
import SDWebImageSwiftUI in a file in the watch extension target ✅
Build watch scheme - should be fine ✅
Change back to the iOS app scheme ✅
Build - Should get error 'No such module 'SDWebImage' ❌ ---> Build Fine for me
I also hit this error, but only on the XCode 11.4 Beta.
@joeycarmello @adamayoung Does Xcode 11.4 Beta 2 solve this issue ? https://developer.apple.com/documentation/xcode_release_notes/xcode_11_4_beta_2_release_notes?language=objc
On Xcode 11.4 Beta 2 I get the following while attempting to resolve packages:
Source files for target SDWebImageMapKit should be located under DerivedData/[X]/SourcePackages/checkouts/SDWebImage
DerivedData/[X]/SourcePackages/checkouts/SDWebImage/Package.swift: target 'SDWebImageMapKit' referenced in product 'SDWebImageMapKit' is empty
I should add this is currently from the 1.0.0-beta2
release.
Edit: My issue seems to be this: https://github.com/SDWebImage/SDWebImage/issues/2941
@joeycarmello @adamayoung
This issue seems been solved by Xcode 11.4-Beta3.
Check SDWebImage/SDWebImage#2941
I am getting this issue in XCode 12, tried both SPM as well as Cocoapods. I added a new WatchOS target to my existing iOS app and later on I get the error No such module 'SDWebImageSwiftUI'
Both the projects fails to build ... any clue?
Afraid I'm seeing this in XCode 13. Note that the project does compile and run correctly; the bug seems to be in Tests iOS
, and interrupts SwiftUI previews.
Afraid I'm seeing this in XCode 13. Note that the project does compile and run correctly; the bug seems to be in
Tests iOS
, and interrupts SwiftUI previews.
I was also struggling with this breaking my SwiftUI previews. I was able to resolve it by ensuring the test target host application was set correctly:
I hope that helps!
I am getting this issue in XCode 12, tried both SPM as well as Cocoapods. I added a new WatchOS target to my existing iOS app and later on I get the error
No such module 'SDWebImageSwiftUI'
Both the projects fails to build ... any clue?
@anoop4real Did you ever get this figured out? I'm getting this in Xcode 13 as well?
^ if you are getting error in XCTests or XCUITest then select your test targate and perform this
^ if you are getting error in XCTests or XCUITest then select your test targate and perform this
Thanks. This worked for me
Not sure if this is an SDWebImageSwiftUI/SDWebImage issue, or a Swift Package Manager issue, but when I have an iOS app with an accompanying watchOS app, and include SDWebImageSwiftUI in both the iOS app and watchOS app extension (via SPM), building the watchOS app using the watchOS app scheme succeeds, but when trying to build the iOS app, the watchOS app build fails with an error in the SDWebImageSwiftUI library:
If I remove the SDWebImageSwiftUI library from the watchOS app extension, I get an error in the watchOS app extension: