2 Replies
      Latest reply: Sep 15, 2016 6:35 AM by Macho Man Randy Savage RSS
      Macho Man Randy Savage Level 3 Level 3 (255 points)

        I have a framework. Some things need to be stripped out to deal with Mac app sandboxing when the framework is embedded in sandboxed apps. Now I know I could create another target for the framework to use for sandboxed apps, but I kind of don't want to .

         

        Right now, I just have the main sandboxed app set an environment variable in main, which corresponds to a string constant declared publicly by the framework. The framework simply looks for the prescense of this environment variable, if it's there, it deals with the sandbox, if it's not, it assumes the app isn't sandboxed.

         

        Is there any official, reliable API to determine if the app is sandboxed at runtime? I did search around, found some code that does this, though using the code was discouraged.