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
IOKit.framework: Difference between revisions - iPhone Development Wiki

IOKit.framework: Difference between revisions

From iPhone Development Wiki
mNo edit summary
(undoing edit that changed the meaning of the sentence, and editing the result to make more sense)
 
(4 intermediate revisions by 2 users not shown)
Line 5: Line 5:
}}
}}


[http://en.wikipedia.org/wiki/I/O_Kit '''I/O Kit'''] is a low-level framework communicating with hardware or kernel services. Although it is a public framework, Apple discourages anyone using it, and will be rejected from AppStore.
[http://en.wikipedia.org/wiki/I/O_Kit '''I/O Kit'''] is a low-level framework communicating with hardware or kernel services. Although it is a public framework, Apple discourages developers from using it, and any apps using it will be rejected from App Store.


== IOService ==
== IOService ==
Line 50: Line 50:
|-
|-
! Firmware
! Firmware
| 2.0    || 2.1    || 2.2      || 3.0      || 3.1      || 3.2
| 2.0    || 2.1    || 2.2      || 3.0      || 3.1      || 3.2     || 4.0      || 4.1    || 4.2    || 4.3
|-
|-
! Version
! SourceCache version
| 388.35 || 388.46 || 388.46.7 || 499.0.37 || 499.0.49 || 514.7.2
| 388.35 || 388.46 || 388.46.7 || 499.0.37 || 499.0.49 || 514.7.6 || 514.36.1 || 514.43 || 514.49 || 608.9
|-
! dylib version
| colspan="10" | 275
|}
|}


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

Latest revision as of 08:26, 22 January 2014

IOKit.framework
Public Framework
Availabile 1.0 – present
Class Prefix IO, OS
Headers [headers.cynder.me]


I/O Kit is a low-level framework communicating with hardware or kernel services. Although it is a public framework, Apple discourages developers from using it, and any apps using it will be rejected from App Store.

IOService

Code using I/O Kit usually follows this pattern:

// Get the service named "AppleNANDFTL".
CFMutableDictionaryRef matching = IOServiceMatching("AppleNANDFTL");
io_service_t service = IOServiceGetMatchingService(kIOMasterPortDefault, matching);

// Open a connection to the AppleNANDFTL service
io_connect_t connect;
kern_return_t errcode = IOServiceOpen(service, mach_task_self(), 0, &connect);

// Send some message to the service and get the result.
// using one of the IOConnectCall*** methods.
if (errcode == 0) {
  size_t infoSize;
  size_t osize = sizeof(infoSize);
  errcode = IOConnectCallStructMethod(
               connect, 0xFE000200, // selector
               NULL, 0,             // input
               &infoSize, &osize);  // output
  if (errcode == 0) {
    void* info = malloc(infoSize);
    IOConnectCallStructMethod(connect, 0xFE000100, NULL, 0, info, &infoSize);
    // do_something_with(info);
    free(info);
  }

  IOServiceClose(connect);
}

IOObjectRelease(service);

The selectors and input/output depends on the service.

Non-IOService

Besides IOService functions, the user-land I/O Kit also contains other hardware and kernel-related functions, e.g. IOHID (human interface device), OSKext (kernel extension), etc.

Versions

Firmware 2.0 2.1 2.2 3.0 3.1 3.2 4.0 4.1 4.2 4.3
SourceCache version 388.35 388.46 388.46.7 499.0.37 499.0.49 514.7.6 514.36.1 514.43 514.49 608.9
dylib version 275