Goal - Create a framework "F" with UI Component and Image assets inside framework. I am using SwiftUI Framework returns a UI component with some images to user of this framework. User doesn't need to know anything what image he is going to get from framework.
Expectation - When User integrate this framework using Carthage and call UI api from framework he should get a UI view with some text and image.
Actual - User is getting the text but Images are not coming up.
Error - TestApp[87355:3127354] [SwiftUI] No image named 'Apple' found in asset catalog for /Users/AT09/Library/Developer/CoreSimulator/Devices/C6BCA75A-DE25-4F7D-992F-AED8412B483C/data/Containers/Bundle/Application/B7E13C38-0ED0-4565-AC4B-3527582DEB09/TestApp.app
I tried creating bundle as suggested in this thread, but it doesn't work.
Code to load Image in Framework, "Apple" is Image in .xcassests in framework
Image("Apple") .renderingMode(.original) .resizable() .scaledToFit() .padding(.vertical, 20).padding(.horizontal, 20) .frame(width: 80, height: 80, alignment: .center)
UPDTAE :
If I add TestApp in target membership of Assets.xcassets, Image is loading. (TestApp is in Framework project so it was feasible) But once this Framework is shipped to client they won't be able to access xcassets. client will just get .framework