Looking for a framework programatically

Discussion in 'Mac Programming' started by satyam90, Dec 1, 2008.

  1. satyam90 macrumors regular

    satyam90

    Joined:
    Jul 30, 2007
    Location:
    Bangalore, India
    #1
    I am using some Mono functionality along with Cocoa. So, when my applications starts, I want to check whether Mono framework (along with particular version or above) is available on my Mac or not. Is there any method to look for a framework on Mac?
     
  2. Soulstorm macrumors 68000

    Soulstorm

    Joined:
    Feb 1, 2005
    #2
    If I remember correctly, Mono installs a .framework file inside the system Library, along with other things. If that is indeed the case, use NSFileManager to check wether that framework exists in the computer.
     
  3. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #3
    If you're linking against the framework directly, you'd have to change it to a weak link, or write a little wrapper app that checks it directly, and launches the main app if found.
     
  4. satyam90 thread starter macrumors regular

    satyam90

    Joined:
    Jul 30, 2007
    Location:
    Bangalore, India
    #4
    But how to check for the version of the framework. "mono -V" gives the version of mono installed on Mac.
     
  5. Catfish_Man macrumors 68030

    Catfish_Man

    Joined:
    Sep 13, 2001
    Location:
    Portland, OR
    #5
    Use NSBundle perhaps? Not sure if that works.

    <edited> Correcting my overconfidence ;) </edit>
     
  6. satyam90 thread starter macrumors regular

    satyam90

    Joined:
    Jul 30, 2007
    Location:
    Bangalore, India
    #6
    Can you please help me in writing wrapper?
    Is the wrapper to be written in form of apple scrip or shell script or XCode item itself?
     

Share This Page