在RubyMotion上下文中设置SystemCapabilities
字典通常由Xcode
文件中的project.pbxproj
自动设置的正确方法是什么。
我正在特别谈论这本词典。如何设置其子值,如附带的Xcode6截图所示。
SystemCapabilities = {
com.apple.ApplicationGroups.iOS = {
enabled = 1;
};
com.apple.BackgroundModes = {
enabled = 1;
};
com.apple.DataProtection = {
enabled = 1;
};
com.apple.GameCenter = {
enabled = 1;
};
com.apple.HealthKit = {
enabled = 1;
};
com.apple.HomeKit = {
enabled = 1;
};
com.apple.InAppPurchase = {
enabled = 1;
};
com.apple.InterAppAudio = {
enabled = 1;
};
com.apple.Keychain = {
enabled = 1;
};
com.apple.Maps.iOS = {
enabled = 1;
};
com.apple.OMC = {
enabled = 1;
};
com.apple.Passbook = {
enabled = 1;
};
com.apple.SafariKeychain = {
enabled = 1;
};
com.apple.VPNLite = {
enabled = 1;
};
com.apple.WAC = {
enabled = 1;
};
com.apple.iCloud = {
enabled = 1;
};
};
};
答案 0 :(得分:0)
rakefile中的Motion::Project::App.setup do |app|
块内部
app.entitlements['com.apple.developer.healthkit'] = true
对于某些功能,您还需要添加框架,并可以选择设置info_plist属性。
专门针对Healthkit,
app.frameworks << 'HealthKit'
app.info_plist['UIRequiredDeviceCapabilities'] = ['healthkit'] # This will limit supported to devices to iphone 5s+, and is optional