Platforms to show: All Mac Windows Linux Cross-Platform

Back to CFBundleMBS class.

CFBundleMBS.BuiltInPlugInsDirectory as CFURLMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
The built in plugins folder of the bundle.

Returns nil on any error.

Some examples using this method:

CFBundleMBS.Constructor   Private

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 14.1 ✅ Yes ❌ No ❌ No ✅ Yes All
The private constructor.

CFBundleMBS.DevelopmentRegion as CFStringMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
The development region of the bundle.

Returns nil on any error.

CFBundleMBS.ExecutableFile as CFURLMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
The executable file of the bundle.
Example
// The following code does not have any check for nil, so it may crash at any point!

dim f as FolderItem
dim c as CFBundleMBS
dim url as CFURLMBS

// Get Path to Mail
f=ApplicationsFolderMBS(-32766).Child("mail.app")

// Make a CFURL from the file
url=NewCFURLMBSFile(f)
// Create a bundle object
c=CreateBundleMBS(url)

// show the path
MsgBox c.ExecutableFile.file.NativePath

Returns nil on any error.

CFBundleMBS.GetInfoDictionary as CFDictionaryMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
The information dictionary for the bundle.

Returns nil on any error.

Some examples using this method:

CFBundleMBS.GetLocalInfoDictionary as CFDictionaryMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
The local information dictionary for the bundle.

Returns nil on any error.

Some examples using this method:

CFBundleMBS.GetValueForInfoDictionaryKey(key as CFStringMBS) as CFObjectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a value from the information dictionary for the given key.
Example
// lists the document types Mail.app can read

dim f as FolderItem
dim b as CFBundleMBS
dim u as CFURLMBS
dim s as string
dim a as CFArrayMBS
dim i as Integer
dim c as Integer
dim o as CFObjectMBS
dim d as CFDictionaryMBS
dim t(-1) as string

f=ApplicationsFolderMBS(-32766).Child("Mail.app")
u=NewCFURLMBSFile(f)
b=CreateBundleMBS(u)
o=b.GetValueForInfoDictionaryKey(NewCFStringMBS("CFBundleDocumentTypes"))

if o isa CFArrayMBS then
a=cfarraymbs(o)

c=a.Count-1
for i=0 to c
o=a.Item(i)
if o isa CFDictionaryMBS then
d=CFDictionaryMBS(o)
o=d.Value(NewCFStringMBS("CFBundleTypeName"))
if o isa CFStringMBS then
s=CFStringMBS(o).str
t.Append s
end if
end if
next
end if

s=Join(t,", ")
MsgBox s

Returns nil on any error.

Some examples using this method:

CFBundleMBS.Identifier as CFStringMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
The identifier for the bundle.

Returns nil on any error.

CFBundleMBS.LocalizedString(key as CFStringMBS) as CFStringMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 4.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Same as the other LocalizedString functions, but the default table and not value is always used.

See also:

CFBundleMBS.LocalizedString(key as CFStringMBS, value as CFStringMBS) as CFStringMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 4.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Same as the other LocalizedString functions, but the default table is always used.

See also:

CFBundleMBS.LocalizedString(key as CFStringMBS, value as CFStringMBS, TableName as CFStringMBS) as CFStringMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 4.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the localized string for the given key and table.

The table parameter is optional to specify which ".strings"-file to use.
without table or table="" the "Localizable.strings" file is used by Mac OS X.

key: The key for the localized string you wish to retrieve. This key will be used to look up the localized string in the strings file. Typically the key is identical to the value of the localized string in the development language.

value: A comment which might assist the translator. As used by the localized string macros and the genstrings tool, this value becomes an annotation in the generated strings file.

tableName: The name of the strings file you wish to search. The name should not include the strings filename extension.

Returns "" (empty string) on Mac OS Classic or Windows.

See also:

CFBundleMBS.PackageMacCreator as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
The Mac OS creator code for this bundle.

Returns "" on any error.

Some examples using this method:

CFBundleMBS.PackageMacType as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
The Mac OS file type code for this bundle.

Returns "" on any error.
Should be "APPL" for applications.

Some examples using this method:

CFBundleMBS.PrivateFrameworksDirectory as CFURLMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
The private framework folder of the bundle.

Returns nil on any error.

Some examples using this method:

CFBundleMBS.ResourceDirectory as CFURLMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
The resource folder of the bundle.

Returns nil on any error.

Some examples using this method:

CFBundleMBS.ResourceURL(resourceName as CFStringMBS, resourceType as CFStringMBS, subDirName as CFStringMBS) as CFURLMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 4.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Searches inside the application bundle for a file.
Example
dim b as CFBundleMBS
dim u as CFURLMBS
dim f as FolderItem

b=app.MainBundleMBS

u=b.ResourceURL(NewCFStringMBS("Photo"),NewCFStringMBS("tif"),nil)

f=u.file

MsgBox f.NativePath
// e.g. "Content/Resources/Photo.tif" inside your bundle.

ResourceName is the filename of the resource file.
ResourceType is the file extension.
SubDirectory is the name of the directory.
This function will take care for localization folders.

CFBundleMBS.ResourceURLForLocalization(resourceName as CFStringMBS, resourceType as CFStringMBS, subDirName as CFStringMBS, localizationName as CFStringMBS) as CFURLMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 4.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Searches inside the application bundle for a file with the given localization.

ResourceName is the filename of the resource file.
ResourceType is the file extension.
SubDirectory is the name of the directory.
localizationName is the name of the localization requested.
This function will take care for localization folders.

CFBundleMBS.ResourceURLsOfType(resourceType as CFStringMBS, subDirName as CFStringMBS) as CFArrayMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 4.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Searches inside the bundle like ResourceURL, but returns an array of all matching files.

CFBundleMBS.ResourceURLsOfTypeForLocalization(resourceType as CFStringMBS, subDirName as CFStringMBS, localizationName as CFStringMBS) as CFArrayMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 4.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Searches inside the bundle like ResourceURLForLocalization, but returns an array of all matching files.

CFBundleMBS.SharedFrameworksDirectory as CFURLMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
The shared framework folder of the bundle.

Returns nil on any error.

Some examples using this method:

CFBundleMBS.SharedSupportURL as CFURLMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 4.0 ✅ Yes ❌ No ❌ No ✅ Yes All
The shared support files folder of the bundle.

Returns nil on any error.

CFBundleMBS.SupportFilesDirectory as CFURLMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
The support files folder of the bundle.

Returns nil on any error.

Some examples using this method:

CFBundleMBS.URL as CFURLMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
The URL for the given bundle.

Returns nil on any error.

CFBundleMBS.Version as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
The version of the bundle.

Returns nil on any error.

The items on this page are in the following plugins: MBS MacCF Plugin.


The biggest plugin in space...