File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,19 @@ public struct SwiftGenerator {
7777 if let packageName = packageName {
7878 return """
7979 let bundleName = " \( packageName) _ \( packageName) "
80- let candidates = [
80+ let overrides: [URL]
81+ #if DEBUG
82+ if let override = ProcessInfo.processInfo.environment[ " PACKAGE_RESOURCE_BUNDLE_PATH " ]
83+ ?? ProcessInfo.processInfo.environment[ " PACKAGE_RESOURCE_BUNDLE_URL " ] {
84+ overrides = [URL(fileURLWithPath: override)]
85+ } else {
86+ overrides = []
87+ }
88+ #else
89+ overrides = []
90+ #endif
91+
92+ let candidates = overrides + [
8193 /* Bundle should be present here when the package is linked into an App. */
8294 Bundle.main.resourceURL,
8395 /* Bundle should be present here when the package is linked into a framework. */
You can’t perform that action at this time.
0 commit comments