Open
Description
When trying to do the following:
print(Bundle.module.url(forResource: "Info", withExtension: "plist", subdirectory: "Resources"))
the fatalError
at https://github.com/apple/swift-corelibs-foundation/blob/main/Sources/Foundation/NSCFString.swift#L118-L120 is triggered.
This is due to Bundle.url(forResource:withException:subdirectory:)
invoking CFBundleCopyResourceURL
, which in turn invokes _CFBundleCopyFindResources
, which will run the following:
if (realSubdirectory) CFRelease(realSubdirectory);