我在Xcode 4.2中创建了一个基本的应用程序.应用非常简单,我没有改变过一件事.推送运行,您将获得标准的基本应用程序窗口.如果我为我的目标启用权利并点击运行,我没有得到任何调试器错误,但窗口永远不会出现.我用Console.app检查了日志,得到了以下内容:
我得到的第一个错误:
taskgated: killed com.alsbury.EntitlementsTest[pid 15903] because its use of the com.apple.developer.ubiquity-container-identifiers entitlement is not allowed
Run Code Online (Sandbox Code Playgroud)
删除iCloud容器"com.alsbury.EntitlementsTest"后,我收到此错误:
taskgated: killed com.alsbury.EntitlementsTest[pid 15903] because its use of the com.apple.developer.ubiquity-container-identifiers entitlement is not allowed
Run Code Online (Sandbox Code Playgroud)
由于iCloud类型的东西,我甚至在我的开发者帐户中添加了一个应用程序,一个配置文件并添加了我的机器.有什么想法吗?现在很困惑.
我想沙盒一个应用程序,它使用applescript联系safari来获取选项卡列表.然后我通过NSAppleEventDescriptor在目标c中找回那些数据.我已经将com.apple.security.temporary-exception.apple-events键与com.apple.safari一起添加到我的权利中.当我的应用程序没有沙盒时我没有问题,但当我尝试沙箱时,我只是得到"空"作为数据.
applescript列出选项卡并将其作为xml返回.
tell application "Safari"
set listeSite to {{"http://www.deezer.com", "deezer"}}
set resp to "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>"
repeat with aWindow in windows
repeat with aTab in tabs of aWindow
set URLTab to URL of aTab
repeat with aSite in listeSite
if URLTab starts with item 1 of aSite then
set oktabURL to URL of aTab
set oktabWindowID to id of aWindow
set resp to resp & "<site><url>" & oktabURL & "</url><windowID>" & oktabWindowID & "</windowID><type>" & item 2 of aSite & …Run Code Online (Sandbox Code Playgroud) 我需要在构建项目时自动获取Xcode生成的权利文件.
通常(即使您没有选择任何明确的功能),您可以找到一个$DERIVED_FILES_DIR/$PRODUCT_NAME.xcent,它包含有关您的团队和钥匙串访问的一般信息.
有没有人知道绕过构建阶段生成它的方法.我想弄清楚与指定显式授权文件或使用功能窗格指定它们的事实无关的流程.
也许我错过了一些明显的东西,任何信息都会非常感激.
我想在iPhone上测试我创建的iOS应用程序.构建成功但是当xamarin工作室尝试通过usb将文件传输到我的iPhone时,我收到以下错误:
VerifyingApplication: 70%
PercentComplete: 40
Status: VerifyingApplication
ApplicationVerificationFailed: Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.yNZx88/extracted/<APPName>.app : 0xe8008016 (The executable was signed with invalid entitlements.)
error MT1006: Could not install the application '/Users/<NAME>/Projects/<APPName>/<APPName>/bin/iPhone/Debug/device-builds/iphone8.2-10.2.1/<APPNamr>.app' on the device '<DEVICEName>': Your code signing/provisioning profiles are not correctly configured. Probably you have an entitlement not supported by your current provisioning profile, or your device is not part of the current provisioning profile. Please check the iOS Device Log for details (error: 0xe8008016).
--- inner exception …Run Code Online (Sandbox Code Playgroud) 当我尝试将我的应用程序上传到 Mac App Store 时,出现错误 -
iTunes Store 操作失败。
无效的代码签名权利。您的应用程序包的签名包含 Mac OS X 不支持的代码签名权利。具体来说,“com.MyCompany.mac”中密钥“com.apple.security.application-groups”的值“[group.MyCompany.MyProject]”。不支持 MyProject.pkg/Payload/MyProject.app/Contents/MacOS/MyProject'。该值应该是一个字符串或一个字符串数组,每个字符串都以您的 TEAMID 开头,后跟一个点“.”。.
但我读到共享组必须以group.前缀开头- 那么正确的方法是什么?
我正在尝试在 OSX 应用程序和命令行工具之间创建连接以处理分布式对象。
连接在命令行工具中注册是这样的
[NSConnection serviceConnectionWithName:@"server" rootObject:extManager];
Run Code Online (Sandbox Code Playgroud)
并尝试从应用程序连接到注册的连接对象,如下所示
self.serverConnection = [NSConnection connectionWithRegisteredName:@"server" host:nil];
Run Code Online (Sandbox Code Playgroud)
当应用程序没有被沙盒化时,连接就建立了。当应用程序被沙盒化时,connectionWithRegisteredName返回 nil。
我已尝试向权利添加密钥和值,并使用团队证书对工具和应用程序进行签名,但它不起作用
<key>com.apple.security.application-groups</key>
<array>
<string><TEAM ID>.AppSuite</string>
</array>
Run Code Online (Sandbox Code Playgroud)
在沙盒化时,我该怎么做才能使连接正常工作?
对于 macOS 沙箱,有两个授权密钥:
com.apple.security.device.audio-input
com.apple.security.device.microphone
Run Code Online (Sandbox Code Playgroud)
我测试了两者,都允许麦克风输入。
它们之间有什么区别?
macos audio-recording entitlements mac-app-store appstore-sandbox
我试图从沙盒macOS应用程序打开系统偏好设置,以便用户可以手动启用某个偏好设置.
AppleScript的
activate将应用程序带到前端,必要时启动它.
我正在运行macOS 10.13.6和Xcode 10.0.部署目标设置为OS X 10.11.
我从沙盒应用程序运行以下AppleScript:
let script = """
tell application "System Preferences"
activate
set current pane to pane id "com.apple.preferences.extensions"
end tell
"""
let appleScript = NSAppleScript(source: script)
var errorInfo: NSDictionary? = nil
appleScript?.executeAndReturnError(&errorInfo)
Run Code Online (Sandbox Code Playgroud)
我还添加了一个脚本目标Sandbox Entitlement,使系统首选项能够显示窗格:
<key>com.apple.security.scripting-targets</key>
<dict>
<key>com.apple.systempreferences</key>
<array>
<string>preferencepane.reveal</string>
</array>
</dict>
Run Code Online (Sandbox Code Playgroud)
一旦我添加了权利,这有点起作用.如果关闭系统首选项应用程序,则会启动它并打开正确的窗格.
该errorInfo词典是零,因此不会造成错误信息.
在控制台中,我看到一条消息,可能是不相关的日志垃圾邮件:
AppleEvents:收到mach msg,它不是getMemoryReference中预期的复杂类型.
但是,该应用程序不会激活."系统偏好设置"窗口未出现在前面.该应用程序导航到正确的选项卡,但不会作为activate状态的文档到达前台.它仍然在任何其他前景窗口后面.
在关闭"系统偏好设置"的情况下,应用程序会启动.但是,在您单击停靠图标之前,窗口不会添加到前景或背景中的屏幕上.然后出现窗口,已导航到正确的窗格.
是否还有其他需要的Sandbox Entitlements可以激活"系统偏好设置"窗口?
我正在尝试建立一个新项目,用 Catalina 的 DEXT 替换 KEXT。
Xcode 要求抱怨团队配置文件不包含 com.apple.developer.driverkit 权利。
我找不到将该权利添加到配置文件的正确程序。
在 XCode 项目中,我添加了权利文件。现在,如果我在该文件中添加任何值,例如。
com.apple.developer.pushkit.unrestricted-voip Bool 是的。
运行时报错。配置文件“开发”不包括 com.apple.developer.pushkit.unrestricted-VOIP 权利。
如何在权利条目的供应配置文件中添加值?
entitlements ×10
macos ×4
xcode ×3
applescript ×2
ios ×2
sandbox ×2
app-store ×1
appgroups ×1
cocoa ×1
iphone ×1
nsconnection ×1
objective-c ×1
pushkit ×1
voip ×1
xamarin.ios ×1
xcode4.2 ×1
xcode5 ×1