Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/extensions/Variables/includes/ExtVariables.php on line 198

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/extensions/Variables/includes/ExtVariables.php on line 198

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/extensions/Variables/includes/ExtVariables.php on line 198

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/extensions/Variables/includes/ExtVariables.php on line 198
CoreFoundation.framework: Difference between revisions - iPhone Development Wiki

CoreFoundation.framework: Difference between revisions

From iPhone Development Wiki
(Created page with '{{infobox Framework | since = 1.0 | classID = CF }} '''CoreFoundation''' is a cross-platform C-based API that provides reference-counted data structures, IPC facilities, run loo…')
 
 
(12 intermediate revisions by 4 users not shown)
Line 5: Line 5:


'''CoreFoundation''' is a cross-platform C-based API that provides reference-counted data structures, IPC facilities, run loops, etc. A subset of it is open-sourced as "CF-Lite".
'''CoreFoundation''' is a cross-platform C-based API that provides reference-counted data structures, IPC facilities, run loops, etc. A subset of it is open-sourced as "CF-Lite".
This framework also provides some crucial Objective-C classes such as NSObject, NSString, NSArray, etc.
For one example of using CoreFoundation version numbers, see [[Updating extensions for iOS 7#Detecting iOS 7]].
== Versions ==
{{CoreFoundation Version Table}}
== Parameters for CoreFoundation applications ==
CoreFoundation recognizes the following special command-line arguments:
{| class="wikitable"
|-
! Flag
! Purpose
|-
| <tt>-AppleLanguages</tt> "(''lang1'', ''lang2'', ...)"
| Set the list of languages for localization.
|}
== Environment variables ==
Application built with CoreFoundation will recognize the following environment variables
{| class="wikitable sortable"
|-
! Name !! Default !! Purpose
|-
| __CF_USER_TEXT_ENCODING<ref name="tn2228">http://developer.apple.com/library/mac/technotes/tn2228/_index.html#//apple_ref/doc/uid/DTS40007991-CH1-SUBSECTION15</ref>
| <tt>0x1f5:0:0</tt> (mobile) or <tt>0x0:0:0</tt> (root)
| Override the default text encoding.
|-
| CFFIXED_USER_HOME || NULL || The home directory recognized by CoreFoundation. (Note that the system environment variable HOME is also in use.)
|-
| CFPREFERENCES_LOG_EQUAL_VALUES || false || Displays a debug-level log when trying to set an unmodified value in preferences (NSUserDefaults).
|-
| CFBundleDisableStringsSharing || false || Do not share <tt>*.strings</tt> files. (?)
|-
| IPHONE_SIMULATOR_DEVICE || <tt>iPhone</tt>
| Used by the internal <tt>_CFGetProductName</tt> to get the current platform. This environment variable will be checked only when <tt>sysctl hw.machine</tt> returns a value other than <tt>iPhone</tt>, <tt>iPod</tt> or <tt>iPad</tt> (what about AppleTV?).
|-
| CFPropertyListAllowImmutableCollections || false || Force collections (array, dictionary) parsed from property lists to be immutable.
|-
| CFUUIDVersionNumber<ref>http://www.monen.nl/DevDoc/releasenotes/CoreFoundation/RN-CoreFoundation/index.html#//apple_ref/doc/uid/TP40000994-DontLinkElementID_4</ref>
| 4
| UUID version to use. Only supports 1 or 4.
|-
| __CF_DEBUG_EXPANDED_SET<br />CFCharacterSetCheckForExpandedSet
| false
| Enable check for expanded character sets. When an expanded set is detected, a warning "An expanded CFMutableCharacter has been detected.  Recommend to compact with CFCharacterSetCreateCopy" will be printed.
|-
| OAKeepAllocationStatistics<ref>http://gcc.gnu.org/ml/gcc/2002-08/msg01225.html</ref> || false || ?
|-
| NSObjCMessageLoggingEnabled<ref>http://developer.apple.com/library/mac/technotes/tn2004/tn2124.html#SECOBJECTIVEC</ref> || <tt>no</tt> || -
|-
| NSZombieEnabled<ref name="tn">http://developer.apple.com/mac/library/technotes/tn2004/tn2124.html#SECFOUNDATION</ref><ref>http://www.cocoadev.com/index.pl?NSZombieEnabled</ref>
| <tt>no</tt>
| rowspan="3" | Use "zombies" for easier detection on misusing deallocated objects.
|-
| NSDeallocateZombies<ref name="tn" />
| no
|-
| CFZombieLevel<ref>http://www.cocoadev.com/index.pl?CFZombie</ref>
| 0
|-
| CFStringDisableROM || false || ?
|-
| CFLOG_FORCE_STDERR || false || Stream error from [[CFLog]] to stderr too.
|-
| CFNETWORK_LIBRARY_PATH || <tt>/System/Library/Frameworks/CFNetwork.framework/CFNetwork</tt> || Manually set the path of the CFNetwork binary.
|-
| NSAutoreleaseHaltOnFreedObject || <tt>no</tt> || Kill the process immediately when calling <tt>-autorelease</tt> on a freed object.
|-
| NSAutoreleaseHaltOnNoPool || <tt>no</tt> || Kill the process immediately when calling <tt>-autorelease</tt> without a pool.
|-
| CFBundleUseDYLD || ? || Use low-level <tt>dyld(3)</tt> functions instead of <tt>dlopen(3)</tt>/etc. to check if a bundle is loaded or not.
|-
| CFProcessPath ||  - || Manually set the process path.
|-
| USER<br />HOME<br />PATH<br />DYLD_IMAGE_SUFFIX<br />TZFILE<br />TZ || - || Various CF functions depend on these info.
|}
== References ==
<references />


{{Navbox Classes}}
{{Navbox Classes}}
{{Navbox Frameworks}}
{{Navbox Frameworks}}

Latest revision as of 00:24, 14 January 2015

CoreFoundation.framework
Public Framework
Availabile 1.0 – present
Class Prefix CF
Headers [headers.cynder.me]


CoreFoundation is a cross-platform C-based API that provides reference-counted data structures, IPC facilities, run loops, etc. A subset of it is open-sourced as "CF-Lite".

This framework also provides some crucial Objective-C classes such as NSObject, NSString, NSArray, etc.

For one example of using CoreFoundation version numbers, see Updating extensions for iOS 7#Detecting iOS 7.

Versions

Firmware CoreFoundation version
2.0 478.23
2.1 478.26.1
2.2 478.29
3.0 478.47.7
3.1 478.52
3.2 478.61
4.0 550.32
4.1 550.38.1
4.2 550.52
4.3 550.58.1
5.0 675.00
5.1 690.10
6.0 793.00
6.1 793.00
7.0 847.20
7.1 847.24
8.0 1140.10
8.1 1141.14
8.2 1142.16
8.3 1144.17
8.4 1145.15
9.0 1240.10
9.1 1241.11
9.2 1242.13
9.3 1280.38
10.0 1348.00
10.1 1348.00
10.2 1348.22
10.3 1349.56
11.0 1443.00
11.1 1445.32
11.2 1450.14
11.3 1452.23
11.4 1452.23
12.0 1556.00
12.1 1560.10
12.2 1570.15
12.3 1575.13
12.4 1575.17
12.5 1575.23
13.0 1665.15
13.1 1671.101
13.2 1673.126
13.3 1674.102
13.4 1675.129
13.5 1676.104
13.6 1677.104
13.7 1677.104
14.0 1751.108
14.1 1751.108
14.2 1770.106
14.3 1770.300
14.4 1774.101
14.5 1775.118
14.6 1776.103
14.7 1777.103
14.8 1778.101
15.0 1854
15.1 1855.105
15.2 1856.105
15.3 1856.105
15.4 1858.112

Parameters for CoreFoundation applications

CoreFoundation recognizes the following special command-line arguments:

Flag Purpose
-AppleLanguages "(lang1, lang2, ...)" Set the list of languages for localization.

Environment variables

Application built with CoreFoundation will recognize the following environment variables

Name Default Purpose
__CF_USER_TEXT_ENCODING[1] 0x1f5:0:0 (mobile) or 0x0:0:0 (root) Override the default text encoding.
CFFIXED_USER_HOME NULL The home directory recognized by CoreFoundation. (Note that the system environment variable HOME is also in use.)
CFPREFERENCES_LOG_EQUAL_VALUES false Displays a debug-level log when trying to set an unmodified value in preferences (NSUserDefaults).
CFBundleDisableStringsSharing false Do not share *.strings files. (?)
IPHONE_SIMULATOR_DEVICE iPhone Used by the internal _CFGetProductName to get the current platform. This environment variable will be checked only when sysctl hw.machine returns a value other than iPhone, iPod or iPad (what about AppleTV?).
CFPropertyListAllowImmutableCollections false Force collections (array, dictionary) parsed from property lists to be immutable.
CFUUIDVersionNumber[2] 4 UUID version to use. Only supports 1 or 4.
__CF_DEBUG_EXPANDED_SET
CFCharacterSetCheckForExpandedSet
false Enable check for expanded character sets. When an expanded set is detected, a warning "An expanded CFMutableCharacter has been detected. Recommend to compact with CFCharacterSetCreateCopy" will be printed.
OAKeepAllocationStatistics[3] false ?
NSObjCMessageLoggingEnabled[4] no -
NSZombieEnabled[5][6] no Use "zombies" for easier detection on misusing deallocated objects.
NSDeallocateZombies[5] no
CFZombieLevel[7] 0
CFStringDisableROM false ?
CFLOG_FORCE_STDERR false Stream error from CFLog to stderr too.
CFNETWORK_LIBRARY_PATH /System/Library/Frameworks/CFNetwork.framework/CFNetwork Manually set the path of the CFNetwork binary.
NSAutoreleaseHaltOnFreedObject no Kill the process immediately when calling -autorelease on a freed object.
NSAutoreleaseHaltOnNoPool no Kill the process immediately when calling -autorelease without a pool.
CFBundleUseDYLD ? Use low-level dyld(3) functions instead of dlopen(3)/etc. to check if a bundle is loaded or not.
CFProcessPath - Manually set the process path.
USER
HOME
PATH
DYLD_IMAGE_SUFFIX
TZFILE
TZ
- Various CF functions depend on these info.

References