使用“App Lock”时出错配置配置文件设置(也称为“kiosk模式”)与iPad / iOS6.0 [英] Error using the "App Lock" configuration profile setting (aka "kiosk mode") with an iPad/iOS6.0
问题描述
背景:
Apple为iPad提供自助服务终端模式,作为iOS6的一部分,将设备锁定在一个应用程序中(甚至可以直接引导到应用程序中) 。非常适合在零售/餐厅等使用iPad。
Apple provides a "kiosk mode" for their iPads as part of iOS6 which locks the device into one application (even boots directly into the app too). Great for using iPads in retail/restaurants/etc.
为了使用它,首先必须使用Apple Configurator将设备设置为监督设备。然后,您将一个特殊条目添加到名为App Lock的配置文件中。我最近关注了更新的配置文件文档。基本上,您只需将PayloadType设置为'com.apple.app.lock'并添加一个名为'Identifier'的属性,该属性设置为应用程序的包ID的值。
In order to use this, the device first has to be setup as a "Supervised" device using Apple Configurator. You then add a special entry to a configuration profile called "App Lock". I followed the recently-updated configuration profile document. Essentially, you just set the PayloadType as 'com.apple.app.lock' and add a property called 'Identifier' which is set to the value of your application's bundle ID.
当我尝试将配置文件添加到iPad时(无论是通过Safari链接,MDM还是Apple Configurator),它拒绝它。
When I try to add the config profile to the iPad (whether through a Safari link, MDM, or Apple Configurator), it rejects it.
控制台输出Xcode显示以下内容:
The console output in Xcode shows the following:
Sep 24 17:51:56 Test-iPad mc_mobile_tunnel[487] <Notice>: (Note ) MDM: Attempting to perform Supervised request: ProfileList
Sep 24 17:51:56 Test-iPad installd[30] <Error>: 0x2ff9f000 filter_attributes: Info.plist keys requested via MobileInstallationLookup/Browse in client Apple Configurator (via mobile_installation_proxy) were not found in MobileInstallation's cache. Please file a bug requesting that these keys be added: <CFBasicHash 0x1e58b0b0 [0x3d8f2100]>{type = mutable set, count = 1,
entries =>
2 : <CFString 0x3d8de564 [0x3d8f2100]>{contents = "CFBundleSignature"}
}
Sep 24 17:51:57 Test-iPad mc_mobile_tunnel[492] <Notice>: (Error) MC: MCAppWhitelistPayload Can't parse payload: NSError:
Desc : The payload "Test Profile" is invalid.
Sugg : The field "App" is invalid.
US Desc: The payload "Test Profile" is invalid.
US Sugg: The field "App" is invalid.
Domain : MCPayloadErrorDomain
Code : 2000
Type : MCFatalError
Params : (
"Test Profile"
)
...Underlying error:
NSError:
Desc : The field "App" is invalid.
US Desc: The field "App" is invalid.
Domain : MCPayloadErrorDomain
Code : 2003
Type : MCFatalError
Params : (
App
)
Sep 24 17:51:57 Test-iPad mc_mobile_tunnel[492] <Notice>: (Error) MC: Payload "(null)" contains ignored fields. They are: <CFBasicHash 0x20819140 [0x3d8f2100]>{type = mutable dict, count = 1,
entries =>
1 : <CFString 0x1f527bd0 [0x3d8f2100]>{contents = "Identifier"} = <CFString 0x1f527c10 [0x3d8f2100]>{contents = "com.hubworks.myapp"}
}
Sep 24 17:51:57 Test-iPad mc_mobile_tunnel[492] <Notice>: (Error) MC: Cannot create profile of type "com.apple.app.lock". Error: NSError:
Desc : The payload "Test Profile" is invalid.
Sugg : The field "App" is invalid.
US Desc: The payload "Test Profile" is invalid.
US Sugg: The field "App" is invalid.
Domain : MCPayloadErrorDomain
Code : 2000
Type : MCFatalError
Params : (
"Test Profile"
)
...Underlying error:
NSError:
Desc : The field "App" is invalid.
US Desc: The field "App" is invalid.
Domain : MCPayloadErrorDomain
Code : 2003
Type : MCFatalError
Params : (
App
)
Sep 24 17:51:57 Test-iPad mc_mobile_tunnel[492] <Notice>: (Error) MC: Profile MCConfigurationProfile 0x1f526100, version 1:
Display Name: "Test Profile"
Identifier : home-macbook-air.local.2A8DC5A2-937E-4246-B2AF-7C756C30C447
UUID : E06A5B33-9CD3-40CB-8611-0479E642B427
Is Stub : No
Locked : No
Encrypted : No
Trusted : 2
Signed : Yes
Signed by : Apple Configurator (58:55:CA:F7:24:B9)
Can't parse profile: NSError:
Desc : The profile "Test Profile" is invalid.
Sugg : The payload "Test Profile" is invalid.
US Desc: The profile "Test Profile" is invalid.
US Sugg: The payload "Test Profile" is invalid.
Domain : MCProfileErrorDomain
Code : 1000
Type : MCFatalError
Params : (
"Test Profile"
)
...Underlying error:
NSError:
Desc : The payload "Test Profile" is invalid.
Sugg : The field "App" is invalid.
US Desc: The payload "Test Profile" is invalid.
US Sugg: The field "App" is invalid.
Domain : MCPayloadErrorDomain
Code : 2000
Type : MCFatalError
Params : (
"Test Profile"
)
...Underlying error:
NSError:
Desc : The field "App" is invalid.
US Desc: The field "App" is invalid.
Domain : MCPayloadErrorDomain
Code : 2003
Type : MCFatalError
Params : (
App
)
Extra info:
{
isPrimary = 1;
}
Sep 24 17:51:57 Test-iPad mc_mobile_tunnel[492] <Notice>: (Error) MC: Failed to parse profile data. Error: NSError:
Desc : The profile "Test Profile" is invalid.
Sugg : The payload "Test Profile" is invalid.
US Desc: The profile "Test Profile" is invalid.
US Sugg: The payload "Test Profile" is invalid.
Domain : MCProfileErrorDomain
Code : 1000
Type : MCFatalError
Params : (
"Test Profile"
)
...Underlying error:
NSError:
Desc : The payload "Test Profile" is invalid.
Sugg : The field "App" is invalid.
US Desc: The payload "Test Profile" is invalid.
US Sugg: The field "App" is invalid.
Domain : MCPayloadErrorDomain
Code : 2000
Type : MCFatalError
Params : (
"Test Profile"
)
...Underlying error:
NSError:
Desc : The field "App" is invalid.
US Desc: The field "App" is invalid.
Domain : MCPayloadErrorDomain
Code : 2003
Type : MCFatalError
Params : (
App
)
Extra info:
{
isPrimary = 1;
}
推荐答案
我认为它我要么误解了它,要么Apple在他们的配置文件参考。为了避免错误,Identifier/ bundleId键/值对必须包含在字典中,字典本身是名为App的键的值。见下文:
I figured it out! I'm either misreading it or Apple left out a little detail in their configuration profile reference . In order to avoid the error, the "Identifier"/bundleId key/value pair has to be wrapped in a dictionary, itself the value of a key named "App". See below:
<?xml version="1.0"?>
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>App</key>
<dict>
<key>Identifier</key>
<string>bundle_identifier_of_the_app</string>
</dict>
<key>PayloadType</key>
<string>com.apple.app.lock</string>
<key>PayloadIdentifier</key>
<string>#######-#######-#######-######</string>
<key>PayloadUUID</key>
<string>#######-#######-#######-######</string>
<key>PayloadVersion</key>
<integer>#</integer>
</dict>
</array>
<key>PayloadType</key>
<string>Configuration</string>
<key>PayloadDisplayName</key>
<string>##########</string>
<key>PayloadIdentifier</key>
<string>######-#####-######-#####</string>
<key>PayloadUUID</key>
<string>######-######-#####-#####</string>
<key>PayloadVersion</key>
<integer>#</integer>
</dict>
</plist>
这篇关于使用“App Lock”时出错配置配置文件设置(也称为“kiosk模式”)与iPad / iOS6.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!