如何在应用程序中将 com.apple.security.smartcard 权利设置为是
how to set com.apple.security.smartcard entitlement to yes in application
我正在尝试构建一个应用程序来处理 mac 上的智能卡,但是当我尝试使用 TKSmartCardSlotManager 的 defaultManager 读取智能卡时,它 returns 为 nil 因为 com.apple.secuirty.smartcard entitlement is not set to true that what I read in the mac TKSmartCard.h file in the comments 但我在处理 mac 时很陌生,不知道如何设置它通过调用应用程序为真。
任何帮助将不胜感激。
编辑:
到目前为止,我尝试的是创建一个 属性 列表文件并将其添加到项目中,然后使用该项目构建它,但它似乎仍然没有添加所需的权利。这是我添加的文件:
<?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.smartcard</key>
<true/>
</dict>
</plist>
答案只是编写一个包含以下内容的 .entitlements 文件:
<?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.smartcard</key>
<true/>
</dict>
</plist>
然后将我的 project.entitlements 添加到 Xcode 构建设置中的代码签名权利。
我正在尝试构建一个应用程序来处理 mac 上的智能卡,但是当我尝试使用 TKSmartCardSlotManager 的 defaultManager 读取智能卡时,它 returns 为 nil 因为 com.apple.secuirty.smartcard entitlement is not set to true that what I read in the mac TKSmartCard.h file in the comments 但我在处理 mac 时很陌生,不知道如何设置它通过调用应用程序为真。 任何帮助将不胜感激。
编辑: 到目前为止,我尝试的是创建一个 属性 列表文件并将其添加到项目中,然后使用该项目构建它,但它似乎仍然没有添加所需的权利。这是我添加的文件:
<?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.smartcard</key>
<true/>
</dict>
</plist>
答案只是编写一个包含以下内容的 .entitlements 文件:
<?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.smartcard</key>
<true/>
</dict>
</plist>
然后将我的 project.entitlements 添加到 Xcode 构建设置中的代码签名权利。