Skip to content

Instantly share code, notes, and snippets.

@delasign
Created January 1, 2025 16:55
Show Gist options
  • Save delasign/7137b27fe1f9289c919c53961bf37577 to your computer and use it in GitHub Desktop.
Save delasign/7137b27fe1f9289c919c53961bf37577 to your computer and use it in GitHub Desktop.
Sample code for debugging bundle resources
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