【问题标题】:Audiokit crashes when enabling sandbox in OS X在 OS X 中启用沙盒时 Audiokit 崩溃
【发布时间】:2018-08-13 09:09:32
【问题描述】:

我使用 Audiokit 的应用程序在没有沙盒的情况下也能完美运行。但是,一旦我在 Xcode 中启用沙盒,应用程序就会在尝试初始化麦克风访问时崩溃。 (该应用在 iOS 的 App Store 上,但现在我正尝试作为 OS X 应用提交到 Mac Store,但我需要启用沙盒)

有没有人能够将带有 Audiokit 的 Mac 应用程序提交到 Mac App Store?

错误: >avae> AVAudioEngine.mm:275: AttachNode: 必需条件 是假的:node != nil

【问题讨论】:

  • 您能发布您的权利文件吗?
  • 请提供您在哪里以及如何初始化麦克风节点的代码。要检查来自沙盒的错误,您必须检查 Xcode 之外的控制台日志。

标签: swift macos microphone appstore-sandbox audiokit


【解决方案1】:

要在 App Store 沙盒中启用麦克风访问权限,您需要添加以下权限:

com.apple.security.device.audio-input

reference of Sandbox: Enabling Hardware Access

【讨论】:

  • 对我不起作用。我仍然得到同样的错误。我还添加了 com.apple.security.microphone,仍然遇到同样的崩溃
【解决方案2】:

这个权利文件确实对我有用。但它并没有涵盖所有情况。 详情请查看 Apple 文档https://developer.apple.com/library/archive/technotes/tn2312/_index.html

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>com.apple.security.app-sandbox</key>
  <true/>
  <key>com.apple.security.device.audio-input</key>
  <true/>
  <key>com.apple.security.device.audio-video-bridging</key>
  <true/>
  <key>com.apple.security.files.bookmarks.document-scope</key>
  <true/>
  <key>com.apple.security.network.client</key>
  <true/>
  <key>com.apple.security.temporary-exception.audio-unit-host</key>
  <true/>
  <key>com.apple.security.temporary-exception.mach-lookup.global-name</key>
  <array>
    <string>com.apple.midiserver</string>
    <string>com.apple.midiserver.io</string>
  </array>
</dict>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-04-30
    • 2020-01-19
    • 2014-06-30
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多