开发者

Accessing Apple Authorization Services with MacRuby

I'm working on a MacRuby application that needs to make updates to config files in the /etc directory. In the command line version of the application, this prompts a password and then allows the access.

But now I'm converting the application to a GUI app and I can't figure out how to integrate authorization services into the Ruby application开发者_StackOverflow社区. The example on Apple's Developer website uses Obj-C and C. A large part of the reason I'm using MacRuby is because of how simple file access is in Ruby. I'd rather not have to convert that portion of my application to Obj-C/C. Does anyone have a good example of how to use Authorization Services with MacRuby?


I haven't look into the Authorization Services but the Macruby Introductory Tutorial explains how to access plain C structs and functions in the section "Accessing Static APIs".

You might also take a look at the internals of the Address book example/wrapper because a lot of the address book functionality is plain C.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜