Created
January 1, 2025 16:55
-
-
Save delasign/7137b27fe1f9289c919c53961bf37577 to your computer and use it in GitHub Desktop.
Sample code for debugging bundle resources
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if let resourcePath = BUNDLE_NAME.resourcePath { | |
let resources = try? FileManager.default.contentsOfDirectory(atPath: resourcePath) | |
print("Resource path: \(resourcePath)") | |
print("Resources in bundle: \(resources ?? [])") | |
} else { | |
print("Bundle.module.resourcePath is nil") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment