---
title: "CFBundleOpenBundleResourceFiles(_:_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfbundleopenbundleresourcefiles(_:_:_:)"
---

# CFBundleOpenBundleResourceFiles(_:_:_:)

Opens the non-localized and localized resource files (if any) for a bundle in separate resource maps.

## Declaration

```swift
func CFBundleOpenBundleResourceFiles(_ bundle: CFBundle!, _ refNum: UnsafeMutablePointer<CFBundleRefNum>!, _ localizedRefNum: UnsafeMutablePointer<CFBundleRefNum>!) -> Int32
```

## Parameters

- `bundle`: The bundle whose resource map you want to open.
- `refNum`: On return, the reference number of the non-localized resource map.
- `localizedRefNum`: On return, the reference number of the localized resource map.

## Return Value

Return Value An error code. The function returns 0 (noErr) if successful. If the bundle contains more than one resource file, the function returns an error code only if none was opened. The most common error is resFNotFound, but the function may also pass through other errors returned from the Resource Manager.

## See Also

### Locating Bundle Resources

- [CFBundleCloseBundleResourceMap(_:_:)](corefoundation/cfbundleclosebundleresourcemap(_:_:).md)
- [CFBundleCopyResourceURL(_:_:_:_:)](corefoundation/cfbundlecopyresourceurl(_:_:_:_:).md)
- [CFBundleCopyResourceURLInDirectory(_:_:_:_:)](corefoundation/cfbundlecopyresourceurlindirectory(_:_:_:_:).md)
- [CFBundleCopyResourceURLsOfType(_:_:_:)](corefoundation/cfbundlecopyresourceurlsoftype(_:_:_:).md)
- [CFBundleCopyResourceURLsOfTypeInDirectory(_:_:_:)](corefoundation/cfbundlecopyresourceurlsoftypeindirectory(_:_:_:).md)
- [CFBundleCopyResourceURLForLocalization(_:_:_:_:_:)](corefoundation/cfbundlecopyresourceurlforlocalization(_:_:_:_:_:).md)
- [CFBundleCopyResourceURLsOfTypeForLocalization(_:_:_:_:)](corefoundation/cfbundlecopyresourceurlsoftypeforlocalization(_:_:_:_:).md)
- [CFBundleOpenBundleResourceMap(_:)](corefoundation/cfbundleopenbundleresourcemap(_:).md)
