NSRemoteView generates a strange message in the Log

前端 未结 2 1257
情话喂你
情话喂你 2021-01-31 16:57

When I run my sandboxed application in macOS Sierra, I find this message in the Log :

2016-09-21 12:08:42.787003 MyApp[1505:63581] warning: 

        
相关标签:
2条回答
  • 2021-01-31 17:39

    Try to find answers here:

    • Accessibility API stops working after sandboxing
    • Sandbox entitlement to script iTunes via NSAppleScript
    • 'xattr' command not working inside sandbox app

    Also, may help:

    <key>com.apple.security.scripting-targets</key>
        <dict>
            <key>com.apple.security.temporary-exception.apple-events</key>
            <array>
                <string>com.apple.terminal</string>
                <string>com.googlecode.iterm2</string>
                <string>com.apple.finder</string>
            </array>
        </dict>
        <key>com.apple.security.temporary-exception.shared-preference.read-write</key>
        <array>
            <string>com.apple.finder</string>
        </array>
        <key>com.apple.security.temporary-exception.apple-events</key>
        <array>
            <string>com.apple.terminal</string>
            <string>com.googlecode.iterm2</string>
            <string>com.apple.finder</string>
        </array>
    </dict>
    

    !!! If you try to submit to AppStore be informed that apple do not allow do this:

    • com.apple.security.temporary-exception.apple-events and
    • com.apple.security.temporary-exception.apple-events
    0 讨论(0)
  • 2021-01-31 17:46

    macOS applications follow the pattern of sandbox. This means that you need to explicitly allow your application to read/write files, otherwise you encounter a permission problem that trigger some errors (one of them is in the form of the warning that you have underlined).

    On the Capabilities tab of your application, be sure to enable at least one of the file access methods.

    0 讨论(0)
提交回复
热议问题