Platforms to show: All Mac Windows Linux Cross-Platform
NSBundleMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Cocoa | MBS MacBase Plugin | 9.8 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
NSBundle objects locate program resources, dynamically load and unload executable code, and assist in localization. You build a bundle in Xcode using one of these project types: Application, Framework, plug-ins.
Although bundle structures vary depending on the target platform and the type of bundle you are building, the NSBundle class hides this underlying structure in most (but not all) cases. Many of the methods you use to load resources from a bundle automatically locate the appropriate starting directory and look for resources in known places.
- property Handle as Integer
- 32 methods
- method builtInPlugInsFolder as folderitem
- method builtInPlugInsPath as string
- method bundleFolder as folderitem
- method bundleIdentifier as string
- method bundlePath as string
- method Constructor(path as folderitem)
- method Constructor(path as string)
- method developmentLocalization as string
- method executableArchitectures as Integer()
- method executableFile as folderitem
- method executablePath as string
- method infoDictionary as dictionary
- method isLoaded as boolean
- method load as boolean
- method localizations as string()
- method localizedInfoDictionary as dictionary
- method localizedStringForKey(key as string, value as string="", tableName as string="") as string
- method pathForImageResource(name as string) as folderitem
- method pathForResource(name as string, extension as string) as folderitem
- method pathForResource(name as string, extension as string, subpath as string) as folderitem
- method pathForResource(name as string, extension as string, subpath as string, localizationName as string) as folderitem
- method pathForSoundResource(name as string) as folderitem
- method preferredLocalizations as string()
- method privateFrameworksFolder as folderitem
- method privateFrameworksPath as string
- method resourceFolder as folderitem
- method resourcePath as string
- method sharedFrameworksFolder as folderitem
- method sharedFrameworksPath as string
- method sharedSupportFolder as folderitem
- method sharedSupportPath as string
- method unload as boolean
- 6 shared methods
- shared method allBundles as NSBundleMBS()
- shared method allFrameworks as NSBundleMBS()
- shared method bundleWithIdentifier(identifier as string) as NSBundleMBS
- shared method bundleWithPath(path as folderitem) as NSBundleMBS
- shared method bundleWithPath(path as string) as NSBundleMBS
- shared method mainBundle as NSBundleMBS
- 5 constants
Architectures
Constant | Value | Description |
---|---|---|
NSBundleExecutableArchitectureARM64 | &h0100000c |
Specifies the 64-bit ARM architecture. |
NSBundleExecutableArchitectureI386 | 7 |
Specifies the 32-bit Intel architecture. Available in Mac OS X v10.5 and later. |
NSBundleExecutableArchitecturePPC | &h12 |
Specifies the 32-bit PowerPC architecture. Available in Mac OS X v10.5 and later. |
NSBundleExecutableArchitecturePPC64 | &h01000012 |
Specifies the 64-bit PowerPC architecture. Available in Mac OS X v10.5 and later. |
NSBundleExecutableArchitectureX86_64 | &h01000007 |
Specifies the 64-bit Intel architecture. Available in Mac OS X v10.5 and later. |
This class has no sub classes.
Some methods using this class:
- NSAppearanceMBS.appearanceNamed(name as string, bundle as NSBundleMBS) as NSAppearanceMBS
- NSHelpManagerMBS.registerBooksInBundle(bundle as NSBundleMBS) as boolean
Some examples using this class:
Blog Entries
- MBS Xojo Plugins, version 23.3pr2
- MBS Xojo Plugins, version 20.6pr1
- NSBundleMBS and NSDirectoryEnumeratorMBS
Release notes
- Version 23.3
- Changed pathForSoundResource and pathForImageResource to be marked macOS only in NSBundleMBS class.
- Version 21.0
- Added NSBundleExecutableArchitectureARM64 constant for NSBundleMBS and NSWorkspaceMBS classes.
The items on this page are in the following plugins: MBS MacBase Plugin.