mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-03 22:49:56 +08:00
[WatchKit] fix info.plist in WatchKit extension and app
This commit is contained in:
@@ -38,6 +38,7 @@ module Motion; module Project
|
||||
sh "/usr/bin/ibtool --errors --warnings --notices --module #{config.escaped_storyboard_module_name} --minimum-deployment-target #{config.sdk_version} --output-partial-info-plist /tmp/Interface-SBPartialInfo.plist --auto-activate-custom-fonts --output-format human-readable-text --compilation-directory '#{config.app_bundle(platform)}' watch_app/Interface.storyboard"
|
||||
|
||||
# Create bundle/Info.plist.
|
||||
config.info_plist['WKCompanionAppBundleIdentifier'] = config.identifier.sub('.watchapp', '')
|
||||
generate_info_plist(config, platform)
|
||||
end
|
||||
|
||||
|
||||
@@ -135,6 +135,8 @@ EOS
|
||||
plist = super
|
||||
plist['UIDeviceFamily'] << '4' # Probably means Apple Watch device?
|
||||
plist['WKWatchKitApp'] = true
|
||||
plist.delete('UIBackgroundModes')
|
||||
plist.delete('UIStatusBarStyle')
|
||||
plist
|
||||
end
|
||||
|
||||
|
||||
@@ -13,6 +13,9 @@ Motion::Project::App.setup do |app|
|
||||
app.name = '<%= name %> WatchKit Extension'
|
||||
app.frameworks << "WatchKit"
|
||||
app.info_plist['NSExtension'] = {
|
||||
'NSExtensionAttributes' => {
|
||||
'WKAppBundleIdentifier' => app.identifier + '.watchapp'
|
||||
},
|
||||
'NSExtensionPointIdentifier' => 'com.apple.watchkit'
|
||||
}
|
||||
app.info_plist['RemoteInterfacePrincipalClass'] = 'InterfaceController'
|
||||
|
||||
Reference in New Issue
Block a user