iPad touch area changes to 320x460 for no apparent reason, and only sometimes.

153 views
Skip to first unread message

ChrisR

unread,
Jun 13, 2012, 7:05:25 AM6/13/12
to rubym...@googlegroups.com
The area that my iPad app responds to touch events suddenly changes to 320x460 in the top left of the screen.  This can happen straight away when my app starts or it can be between 10-15 afterwards,  and about 50% of the time it never happens and everything works fine.  There seems to be no be no obvious trigger that can cause it to happen.

Has anyone seen this behavior before? 

Here is a pastie which includes my Rakefile and app_delegate.rb  : http://pastie.org/4079128

I'm new to iOS development so there's a good possibility i'm doing something stupid.

Chris


ChrisR

unread,
Jun 13, 2012, 8:25:50 AM6/13/12
to rubym...@googlegroups.com
Ok I've just created a new rubymotion application from scratch using the latest rubymotion 1.11 and I still get the same issue. 

Here is the full application, it's about as bare-bones as you can get :

$:.unshift("/Library/RubyMotion/lib")
require 'motion/project'

Motion::Project::App.setup do |app|
  # Use `rake config' to see complete project settings.
  app.name = 'ipadtest'

  app.device_family = [:ipad]
end

class AppDelegate
  def application(application, didFinishLaunchingWithOptions:launchOptions)
    @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
    @window.rootViewController = MyViewController.alloc.init
    @window.rootViewController.wantsFullScreenLayout = true
    @window.makeKeyAndVisible
    true
  end
end

class MyViewController < UIViewController
  def viewDidLoad
    view.backgroundColor = UIColor.blackColor
  end

  def touchesBegan(touches, withEvent:event)
    puts "Touched"
  end
end


I ran the application about 6 times before I first experienced the error. Only the top left 320x460 of the screen would respond to the touch event.  Most of the time it works fine. .

Could someone try it and see if they get the same effect?  After the application has launhced I wait a few seconds before clicking the mouse.  Be patient and try running the application several times. 

Thanks
Chris

Justin Campbell

unread,
Jun 13, 2012, 8:33:29 AM6/13/12
to rubym...@googlegroups.com
How are you running the app? Sometimes if I start the simulator with retina=true, and then start the app with just rake, my touch targets get messed up. I wonder if a similar thing is happening here. Maybe try explicitly running rake with some sort of iPad flag (device=ipad?).

-Justin

Sent from my iPhone

Justin Campbell

unread,
Jun 13, 2012, 8:39:31 AM6/13/12
to rubym...@googlegroups.com
rake device_family=ipad


-Justin

Sent from my iPhone

On Jun 13, 2012, at 8:25 AM, ChrisR <evilg...@gmail.com> wrote:

ChrisR

unread,
Jun 13, 2012, 8:41:20 AM6/13/12
to rubym...@googlegroups.com
I have only ever used "rake" to run the app. 

I just ran "rake device=ipad", but after 3 attempts of running the application I experienced the issue again.

I'm on Xcode 4.3 4E109

Chris

ChrisR

unread,
Jun 13, 2012, 8:53:54 AM6/13/12
to rubym...@googlegroups.com
Same issue with "rake device_family=ipad"


On Wednesday, June 13, 2012 12:05:25 PM UTC+1, ChrisR wrote:

Mac Fanatic

unread,
Jun 13, 2012, 12:23:28 PM6/13/12
to rubym...@googlegroups.com
I have issues where it seems that every time I launch the app after making a rb file that triggers compilation(ie, rake) my iPad app doesn't respond to touch events at all.  Sometimes it might take a good 3 minutes before it responds to touch events, if ever.  Looks like if there is no compilation changes, the app launches quickly & I have touches.

Anyone else experienced something similar?

Conrad Irwin

unread,
Jun 13, 2012, 12:30:01 PM6/13/12
to rubym...@googlegroups.com
I have exactly the same problem; every alternate use of "rake" results in this behavior, it's also noticeable that when you rotate the simulator, the outline of the device changes size to be small.

I filed a "motion support" a while ago, but didn't hear back.

Conrad

ChrisR

unread,
Jun 13, 2012, 1:45:07 PM6/13/12
to rubym...@googlegroups.com
Conrad,
Is that in response to mine or Mac's post?  Does the touch sensitive area reduce down to 320x460?

Conrad Irwin

unread,
Jun 13, 2012, 1:50:21 PM6/13/12
to rubym...@googlegroups.com


On Wednesday, June 13, 2012 at 10:45 AM, ChrisR wrote:

> Conrad,
> Is that in response to mine or Mac's post? Does the touch sensitive area reduce down to 320x460?


Sorry, that was in response to your post.

Exactly every other time I run the simulator, only a small portion of the screen is clickable (though I haven't measured it). When this happens rotating the simulator will cause it to appear broken too: http://jelzo.com/stuff/rotated-simulator.png.

Mac Fanatic

unread,
Jun 20, 2012, 10:40:03 PM6/20/12
to rubym...@googlegroups.com
I'm working on an iPad app, so the broken simulator looks slightly different, but I would imagine we are suffering from the same scenario.

This has not been resolved for me at this time.

ChrisR

unread,
Jun 21, 2012, 6:22:50 AM6/21/12
to rubym...@googlegroups.com
It works fine when I run it on my device, so I guess it's just an issue with the simulator?


On Wednesday, June 13, 2012 12:05:25 PM UTC+1, ChrisR wrote:

Christopher Pappas

unread,
Jun 21, 2012, 11:00:56 PM6/21/12
to rubym...@googlegroups.com
I'm dealing with a really trying iPhone / iPad simulator issue as well:

Developing for a universal app, I basically have to build it twice.  Even though it looks like it's the iPad view, the touch area is for iPhone; building again it works correctly.  This is repeatable every single time.  It even happens if there is no iPhone storyboard nor iPhone target specified.  

Christopher Pappas

unread,
Jun 30, 2012, 6:25:18 PM6/30/12
to rubym...@googlegroups.com
I've also filed a 'motion support' ticket.  Still waiting on a response.

I also went ahead and filed an issue on GitHub under hipbyte/rubymotion:


Has anyone found a way to fix this issue? Any hacks?  


Thanks,
-Desperate (and deadline stressed) in Seattle

Christopher Pappas

unread,
Jul 1, 2012, 5:47:06 PM7/1/12
to rubym...@googlegroups.com
This bug is seriously murdering me over here, having to compile twice before I can view any change.

Anyone?  Any suggestions?

Christopher Pappas

unread,
Jul 1, 2012, 8:30:02 PM7/1/12
to rubym...@googlegroups.com
As I'm not the brightest guy in the world, this JUST occurred to me, after a week of dealing with this bug:  quit the simulator after every build = problem solved.  

Joel Bryan Juliano

unread,
Jul 2, 2012, 4:38:39 AM7/2/12
to rubym...@googlegroups.com
I just recently opened up Xcode and it greeted me with Xcode Component
Installation
with a new 'Mobile Device Framework' update, have you tried updating
maybe this might solve
the problem with the simulator.

Another note is in the Rakefile (pasted code), the default value for
interface_orientations does not include :portrait_upside_down, you
need to specify it if you are somewhat using that orientation in iPad
which I think is possible.

Also, in Xcode, you can install other versions of simulator by going
to Xcode -> Preferences -> Downloads -> Components. Xcode 4.3 has the
iOS 5.1 simulator shipped. You might try a different simulator
versions by specifying the sdk_version and deployment_version in the
Rakefile.

ChrisR

unread,
Jul 5, 2012, 1:20:48 PM7/5/12
to rubym...@googlegroups.com
Good find! This will lower my stress levels somewhat.
Reply all
Reply to author
Forward
0 new messages