[MacRuby-devel] A little NSStatusBar app - Gmail Notifr

James Chen ashchan at gmail.com
Fri Nov 19 15:05:02 PST 2010


Eloy,

Yes both works.  Currently it depends on MacRuby 0.8 and BS preview (when
the app is ready for use if MacRuby is still not shipped with OSX, I believe
it could require both MacRuby and BridgeSupport).

Sent from my iPhone

On 2010/11/20, at 5:26, Eloy Duran <eloy.de.enige at gmail.com> wrote:

I don't think you need the BS preview for that. I can create a BS file with:
$ gen_bridge_metadata -f Security -o Security.bridgesupport

On 19 nov 2010, at 20:39, Joshua Ballanco wrote:

Hey James,

The C API for the Keychain is not annotated with a bridge support file by
default in SnowLeopard, so the first thing you'll need to do is install the
BridgeSupport preview. Then you need to know what to put in for the 4
parameters to the method call, which unfortunately is not documented at
developer.apple.com (at least, not that I could find). There is, however,
headerdoc for the method in
/System/Library/Frameworks/Security.framework/Headers/SecKeychainItem.h:

 /*!
         @function SecKeychainItemModifyAttributesAndData
         @abstract Updates an existing keychain item after changing its
attributes or data.
         @param itemRef A reference to the keychain item to modify.
         @param attrList The list of attributes to modify, along with their
new values. Pass NULL if you don't need to modify any attributes.
         @param length The length of the buffer pointed to by data.
         @param data Pointer to a buffer containing the data to store. Pass
NULL if you don't need to modify the data.
         @result A result code. See "Security Error Codes" (SecBase.h).
         @discussion The keychain item is written to the keychain's
permanent data store. If the keychain item has not previously been added to
a keychain, a call to the SecKeychainItemModifyContent function does nothing
and returns
 noErr.
 */

So, I'm not sure if that's what you're looking for. Hopefully it's at least
a start. The projects look awesome, and if/when I have some more time I'd
love to help you out :-)

Cheers,

Josh

On Fri, Nov 19, 2010 at 9:36 AM, James Chen <ashchan at gmail.com> wrote:

> Hi guys,
>
> Gmail Notifr was originally written in RubyCocoa, which runs as a little
> NSStatusBar app and checks your gmail feeds at specified intervals. I
> started updating it to MacRuby last month.
>
> Most changes were just simply updating method_arg1_arg2 to
> method(arg1:arg2). Since this app saves account/password in Keychain, I also
> extracted the keychain access code to a separate project. Still have some
> difficulties on Security.framework's C methods. I also need to make the
> growl notification work later.
>
> I know many guys are interested in how to make menu bar (NSStatusBar)
> application so I guess this in progress project might help a little. The
> project repository is: https://github.com/ashchan/gmail-notifr , and the
> keychain access wrapper project is here:
> https://github.com/ashchan/macruby-keychain-wrapper .
>
> Regarding the C methods calling, the keychain wrapper has to access this
> API:
>
>     SecKeychainItemModifyAttributesAndData
>
> It would be really great if anyone knows how to construct
> SecKeychainAttributeList and other necessary parameters for this API and
> offers some help.
>
> ---
> James Chen
> ashchan.com | @ashchan <http://twitter.com/ashchan>
>
>
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
_______________________________________________
MacRuby-devel mailing list
MacRuby-devel at lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


_______________________________________________
MacRuby-devel mailing list
MacRuby-devel at lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20101120/c832c06a/attachment.html>


More information about the MacRuby-devel mailing list