Patch: New setting IOS_SCREEN_RESOLUTION

Monkey Targets Forums/iOS/Patch: New setting IOS_SCREEN_RESOLUTION

michaelcontento(Posted 2012) [#1]
For Android there is ANDROID_SCREEN_ORIENTATION but this setting is sadly missing for the iOS target. Until now! This patch fills the gap and the new setting, IOS_SCREEN_ORIENTATION, can be set to either: portait, landscape or a blank string (both portait and landscape are allowed), which is the default setting.

Any suggestion? Bugs? I'm happy for any feedback :)

> EDIT: Damn .. wrong topic name. It should be IOS_SCREEN_ORIENTATION and not IOS_SCREEN_RESOLUTION


therevills(Posted 2012) [#2]
I thought this was already in Monkey... but its been awhile since I messed with iOS, and I think I recall having to change this in the XCode project.

Maybe state on how to use these patches?

I'm gussing we need to use:
IOS_SCREEN_ORIENTATION="portrait|landscape|null"


Small suggestion, change:
Die "Invalid IOS_SCREEN_ORIENTATION specified. Use one of: portrait, landscape"

To
Die "Invalid IOS_SCREEN_ORIENTATION specified. Use one of: portrait, landscape or empty string"



michaelcontento(Posted 2012) [#3]
Oh, right. The error message should clearly illustrate all possible settings! But, IMHO, "empty string" is not really user friendly, so I changed this state simply to "all". Just have a look at the updated patch (here).

All you have to do, after applying the patch, is:
IOS_SCREEN_ORIENTATION="portrait|landscape|all"

:)


Samah(Posted 2012) [#4]
Do you mind if I add these patches to the monkey-ext project on Google Code?
http://code.google.com/p/monkey-ext/


michaelcontento(Posted 2012) [#5]
First of all: I've updated the Gist to support Monket v62 :)

@Samah: No! Use it as you like. But .. What parts of Monkey are NOT licensed for public access? Because currently I manage all my patches in a private Github repository -- and there are more than the three I've published here. Maybe I could remove the non public files and open up the access to my repo? Is Mark fine / happy with this openness?


Samah(Posted 2012) [#6]
Michaelcontento: I already chatted with Mark about this, and he's cool with it; it's why monkey-ext exists. If you clone the repository on Google Code and push your changes, I'll merge them for you.


Samah(Posted 2012) [#7]
I've merged your changes (I think) with the development tip. Can you check that it all works? If so I'll merge with stable. You'll have to build trans
yourself as I don't build the Mac binary (too much effort...) ;)

http://code.google.com/p/monkey-ext/source/detail?r=591b035edac6732ef3a71135067ee7a24649017e&name=development


Grey Alien(Posted 2013) [#8]
Was this ever added officially?


ElectricBoogaloo(Posted 2013) [#9]
Surely you just click the buttons in XCode?


Grey Alien(Posted 2013) [#10]
Yes that's what I currently do, but it would be nicer if the Monkey source code sets those buttons for us. Otherwise we have to remember to do it every time we delete and remake the xcode project. The less stuff that has to be done "manually" after exporting from Monkey the better...


ElectricBoogaloo(Posted 2013) [#11]
I wrote myself a little checklist.
Hmm. Might make a nice waffling blog post, that, actually.


Oddball(Posted 2013) [#12]
I'd be interested in seeing that checklist. Just started doing some iOS stuff and it's all very confusing.