开发者

Creating a Device Driver with Xcode Cocoa Application

开发者 https://www.devze.com 2023-04-12 19:33 出处:网络
Hi Friends.. I am tryto create a Device driver Application In X-Code, From This Link:- http://developer.apple.com/library/mac/#documentation/Darwin/Conceptual/KEXTConce开发者_StackOverflow社区pt/KEXTC
    Hi Friends..
    I am try  to create a Device driver Application In X-Code, From This Link:- http://developer.apple.com/library/mac/#documentation/Darwin/Conceptual/KEXTConce开发者_StackOverflow社区pt/KEXTConceptIOKit/iokit_tutorial.html I Got little bit Idea. Based on that I completed 

1)Create a New Project
    2)Edit the Information Property List
    3)Fill in the Header File
    4)Implement the Driver’s Entry Points.

    The Fifth Step is:  **Add Library Declarations**
    That mention like this .
    At this stage of creating your driver, you need to find out what those libraries are. The best way to do so is to run the kextlibs tool on your built kext and copy its output into your kext’s Info.plist file.

    But I a can't understand this lines,more over I can't fount $MyDriver/Build/Debug Folder. I opened Info.Plist file On Terminal I got Kext File . now I trying this in X-Code 4.

If Any one having idea about this please give some tips.. Thanks For Your Replay


Note that running kextlibs will only work once you have implemented the code for your driver, and it builds successfully. Once you have got that far, in XCode:

  • build your kext
  • in the project's file tree, find the kext under 'products'
  • open up a terminal window, type kextlibs followed by a space.
  • drag the kext from XCode and drop it onto the Terminal window
  • press Enter and after a few seconds you should get some output like the following:
    For all architectures:
        com.apple.iokit.IOStorageFamily = 1.6.3
        com.apple.kpi.bsd = 10.8
        com.apple.kpi.iokit = 10.8
        com.apple.kpi.libkern = 10.8
        com.apple.kpi.mach = 10.8

You then add those library identifiers and versions to the Info.plist and rebuild. Note that if you want the kext to work on older versions of Mac OS X than your running system, you'll need to supply older library versions. (ideally by running kextlibs on your oldest supported version)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号