Post

Replies

Boosts

Views

Activity

Reply to Providing XCAssets Folder in Swift Package Xcode 12
Using the workaround suggested by Skyler_S and Nekitosss works! The only scenario in which it doesn't is when you are using the bundle in UI Tests. I've found that it's sufficient to add: swift Bundle(for: CurrentBundleFinder.self).resourceURL?.deletingLastPathComponent() to the list of candidates: swift let candidates = [ /* Bundle should be present here when the package is linked into an App. */ Bundle.main.resourceURL, /* Bundle should be present here when the package is linked into a framework. */ Bundle(for: CurrentBundleFinder.self).resourceURL, /* Bundle should be present here when the package is used in UI Tests. */ Bundle(for: CurrentBundleFinder.self).resourceURL?.deletingLastPathComponent(), /* For command-line tools. */ Bundle.main.bundleURL, /* Bundle should be present here when running previews from a different package (this is the path to "…/Debug-iphonesimulator/"). */ Bundle(for: CurrentBundleFinder.self).resourceURL?.deletingLastPathComponent().deletingLastPathComponent().deletingLastPathComponent(), Bundle(for: CurrentBundleFinder.self).resourceURL?.deletingLastPathComponent().deletingLastPathComponent() ]
May ’21
Reply to xcrun altool --validate-app fails unexpectedly
Same error happens not only from CLI, but also when archiving and validating the app directly using Xcode 13.0 from App Store and latest Xcode 13.2 (13C90) from Apple Developer. Tried several times, using different WiFi networks and also tethering from my iPhone, but I got the same error.
Replies
Boosts
Views
Activity
Jan ’22
Reply to Providing XCAssets Folder in Swift Package Xcode 12
Using the workaround suggested by Skyler_S and Nekitosss works! The only scenario in which it doesn't is when you are using the bundle in UI Tests. I've found that it's sufficient to add: swift Bundle(for: CurrentBundleFinder.self).resourceURL?.deletingLastPathComponent() to the list of candidates: swift let candidates = [ /* Bundle should be present here when the package is linked into an App. */ Bundle.main.resourceURL, /* Bundle should be present here when the package is linked into a framework. */ Bundle(for: CurrentBundleFinder.self).resourceURL, /* Bundle should be present here when the package is used in UI Tests. */ Bundle(for: CurrentBundleFinder.self).resourceURL?.deletingLastPathComponent(), /* For command-line tools. */ Bundle.main.bundleURL, /* Bundle should be present here when running previews from a different package (this is the path to "…/Debug-iphonesimulator/"). */ Bundle(for: CurrentBundleFinder.self).resourceURL?.deletingLastPathComponent().deletingLastPathComponent().deletingLastPathComponent(), Bundle(for: CurrentBundleFinder.self).resourceURL?.deletingLastPathComponent().deletingLastPathComponent() ]
Replies
Boosts
Views
Activity
May ’21