Temp work around issue with UIDeviceFamily for release/profile.

The Info.plist is forced to be recreated on each build and uses ints for
UIDeviceFamily when profiling and strings otherwise.

http://hipbyte.myjetbrains.com/youtrack/issue/RM-305
This commit is contained in:
Eloy Durán
2013-11-02 17:10:05 +01:00
parent 81c4b7a2b8
commit ae4fe2dddc
2 changed files with 16 additions and 2 deletions

View File

@@ -39,11 +39,19 @@ task :build => ['build:simulator', 'build:device']
namespace :build do
desc "Build the simulator version"
task :simulator do
# TODO: Ensure Info.plist gets regenerated on each build so it has ints for
# Instruments and strings for normal builds.
rm_f File.join(App.config.app_bundle('iPhoneSimulator'), 'Info.plist')
App.build('iPhoneSimulator')
end
desc "Build the device version"
task :device do
# TODO: Ensure Info.plist gets regenerated on each build so it has ints for
# Instruments and strings for normal builds.
rm_f File.join(App.config.app_bundle('iPhoneOS'), 'Info.plist')
App.build('iPhoneOS')
App.codesign('iPhoneOS')
end
@@ -197,7 +205,10 @@ task :profile => ['profile:simulator']
namespace :profile do
desc "Run a build on the simulator through Instruments"
task :simulator => 'build:simulator' do
task :simulator do
ENV['__USE_DEVICE_INT__'] = '1'
Rake::Task['build:simulator'].invoke
plist = App.config.profiler_config_plist('iPhoneSimulator', ENV['args'], ENV['template'], IOS_SIM_INSTRUMENTS_TEMPLATES)
plist['com.apple.xcode.simulatedDeviceFamily'] = App.config.device_family_ints.first
plist['com.apple.xcode.SDKPath'] = App.config.sdk('iPhoneSimulator')
@@ -218,6 +229,8 @@ namespace :profile do
desc "Run a build on the device through Instruments"
task :device do
ENV['__USE_DEVICE_INT__'] = '1'
# Create a build that allows debugging but doesnt start a debugger on deploy.
App.config.entitlements['get-task-allow'] = true
ENV['install_only'] = '1'

View File

@@ -344,7 +344,8 @@ module Motion; module Project;
}
},
'UIAppFonts' => fonts,
'UIDeviceFamily' => device_family_ints.map { |x| x.to_s },
# TODO temp hack to get ints for Instruments, but strings for normal builds.
'UIDeviceFamily' => device_family_ints.map { |x| ENV['__USE_DEVICE_INT__'] ? x.to_i : x.to_s },
'UISupportedInterfaceOrientations' => interface_orientations_consts,
'UIStatusBarStyle' => status_bar_style_const,
'UIBackgroundModes' => background_modes_consts,