Closed amirrajan closed 8 years ago
I think this is related to this line : https://github.com/HipByte/motion-game/blob/master/lib/motion-game/ios.rb#L13
I have slow internet atm I will check next week
I looked at the source and saw that too (which is how I figured out that's what you needed to use).
Maybe it didn't work because of the previously-set orientation in the default config file? (I assumed that by default MG projects should be in landscape, maybe I'm wrong here and we could remove this).
No, I think most people will want landscape to be the default.
btw, but, it's more a RubyMotion concern, I think, something like
app.supported_orientations = [:landscape, :portrait]
Could be awesome to replace app.info_plist['UISupportedInterfaceOrientations']
on iOS and
app.manifest.child('application').child('activity') do |main_activity|
main_activity['android:screenOrientation'] = 'portrait'
end
on Android
in ios I just set:
Motion::Project::App.setup do |app|
app.name = 'testapp'
app.interface_orientations = [:portrait]
app.info_plist['UISupportedInterfaceOrientations'] = ['UIInterfaceOrientationPortrait']
end
That way works for my.
Random code snippet that took me a minute to figure out:
In
config/ios.rb
In previous apps I've done
which didn't work for this project.