App won't respond until rotation/2x occurs on iPad3 - iphone

I am wondering if anyone else has had this happen to them. I have a iPhone App that I have been updating for over a year and it has been working just fine on my iPad2, iPhone 3GS, as well as the 4G, 4GS, and 5. However, just recently I obtained an iPad3 to test the App on. Something very strange happens: When the App is loaded through Xcode in development it comes up and looks perfect - however, it won't respond to any touches at all. I have an alert that pops up on load and you can close that, but the actual main view controller will not react to any drag or touch gestures - it is essentially frozen. However! When I rotate the device and the App rotates correctly, it suddenly starts working just fine, even if I rotate it back! The simulator for the iPad running iOS6 in normal and retina does the same thing even though it works just fine on my iPad2. However, the simulator for the iPhone works just fine.
Like I said, this doesn't happen on any other device. Even loaded the same way all devices allow tapping like normal. Here is what I have been able to confirm:
iPad3 device: frozen
iPad-retina sim: frozen
iPad-normal sim: frozen
iPad2 device: normal
iPhone-retina sim: normal
iPhone-normal sim: normal
iPhone 4S device: normal
iPhone 4 device: normal
If all the iPhones worked and the iPads didn't, it would make some sense. But my ipad2 works just fine. Also, if I use the iPad3 open it, it is frozen. BUT! If I hit the 2X button, it starts working again even without rotation.
I also decided to test and see if it would work as a Universal App. On the iPad3 when I switch it over to Universal, it works just fine to begin with. So something weird must be going on with the simulator. Any ideas?
Thanks!!
-Mark

A view (in your case the whole thing) not accepting any input often means that one of the superviews has a frame smaller than its contents. This could be the case here, strangely only in specific situations, upon rotation the view frame gets the correct size and stays correct afterwards.
Did you solve this in the meantime? You can try to give the views different transparent background colors and/or make them clipToBounds, starting with the top view controller's view. That way you'll see if something is wrong with the frames.

Related

Iphone resolution on an Ipad

We have an app that has been rejected in the review process by the Apple app review people. The cause for the rejection is that the app is not scaling properly when run on an Ipad.
The app was never meant to be run on an Ipad, but there seems to be no point in arguing with them about that.
Apple sent us a couple of screenshots that show our app being run on an Ipad with the top portion of the view cut off. Notice how the app is run in some mode where it looks like an Iphone app and does not fill out the entire display area. When we bring up the app on an Ipad, it fills out the screen and does so without any edges cut off.
Can anyone please tell me how to run the app on an Ipad the way the Apple guys have - Iphone-sized? We believe we have a fix for the issue but we need to reproduce the error and then be able to verify that the fix solves the issue.
(the logotypes in the images are intentionally blurred)
I just went through this myself and here is how I resolved it:
Go into info.plist and see if any of the supported interface orientations are set for iPad. Despite selecting iPhone only, I had iPad supported orientations for four (portrait, portrait upside down, landscape left, landscape right). I deleted those.
I also deleted any reference to the launch screen in the info.plist. My app is pretty simple and there's no preloading of data so I don't really need a launch screen. If you do, you could go old school and make your first VC the launch screen.
I then made these changes in Target-->General-->App Icons and Launch Images
That was the only way I could get it in the sim to run the app at iPhone resolution while running an iPad (iPad2, iPad Air).
If Apple is going to force developers to ensure an app runs on an iPad even if it is made just for iPhone, they should eliminate the iPhone Only and Universal options and just have iPad Only as an option.
To run an iPhone app on an iPad, you just need to:
Acquire an iPad (you can also use the simulator)
Set the target device family in Xcode (it's under your target) to iPhone
Connect your iPad, perform any necessary certificate dances
Run the app on the iPad.
As long as the target device family is set to iPhone, the iPad will show your app in this mode.
Apple is likely running your app on a simulator, not on a real device. Notice the "2X" on the top right. In XCode - you should run the app on iPad Retina Simulator. On the bottom right you will see a button that you can toggle from 1X to 2X.
If you place the simulator in "2X" mode, you will see what Apple is seeing.
What OS are you running on your iPad? Things have changed in iOS 8 - and that's likely why you're not seeing what Apple is seeing. My guess is that your are running an app that was initially developed for iOS 7 or earlier - which means that you need to upgrade from scaled resolution to native resolutions to resolve this issue. Here is how you do it:
How to enable native resolution for apps on iPhone 6 and 6 Plus?

Black cocos2d spritesheet in iPhone4

I've got a weird issue that is reported by one of my app users. My app is using UIKit and Cocos2d (the latter for basically just one scene, the rest is all UIKit). The CC scene uses a 2048x2048 spritesheet. The user says that on his iPhone4 running iOS6, the sprites appear black. The app works, no crashes or anything.
I have an iPhone4S to test on hand and all works fine. Looking at the specs, the IPhone4 should be able to support this size for a spritesheet. Only the iPhone3G is not able to, according to the specs (1024x1024 max. size for spritesheets it seems). But since the user is saying that he is running iOS6, he can't be using a 3G, right?
So I'm baffled. He's the only one reporting this issue, too. Is there anything else that could be causing memory or other issues and cause a black spritesheet in an iPhone4?

Iphone app doesn't respond after starting in landscape

I've got a very strange behavior in my iPhone app.
The app should run in any orientation. Plist keys are all set and shouldAutorotateToInterfaceOrientation always returns YES.
Also, it's an iPhone only app, but at this moment I can test it only on the iPad.
Now, when I start it in portrait mode, everything works fine. However, if it launches in landscape mode, the view doesn't receive any touch input, buttons and gestures simply don't work. This is happening as long as the window remains unaltered. If I rotate the app and then rotate it back to landscape, it works. Moreover, if I press the "2x" button on the iPad, the app also starts to work normally.
I've checked all view frames and everything is drawn correctly.
When run in simulator, it ignores the initial orientation and draws itself in portrait mode.
What can be the reason and how to solve it?
I have found that this is unique to iOS 6 (you'll see this on iPads running iOS 6 and even the iOS 6 iPad simulator, but not devices/simulator running iOS 5). If you remove all of the entries under "Supported interface orientation" in the app's plist, this problem seems to go away. Alternatively, if you check the "Hide during application launch" option for the "Status Bar" settings on the Summary screen of the Target settings, this also fixes it:
It makes no sense why either of these should fix the bug, but they appear to.
If you use the "Supported Orientations" tweak, in iOS 6, you can still programmatically control the permitted interface orientations via supportedInterfaceOrientations (in iOS 5, you can still useshouldAutorotateToInterfaceOrientation:).

Launch image displayed upside down on iPad.

I wonder if you have any idea of why my Launch image get displayed upside down when using the iPhone application/storyboard on the iPad simulator. After the launch image the orientation is correct.
Running on iPad device also has the correct orientation. It is only the when running iPhone application on iPad it does not work. iPhone all works fine.
Any ideas?
I had the same problem today without having changed the UISupportedOrientation-key (my app supports all 4 orientations) while I was changing values in the summary view (Xcode 4.2). The app started to do strange behaviours while loading the launch image, it changed the orientation to upsideDown. I solved the problem by just by changing the sequence of the 4 different orientation levels. 1st element was somehow PortraitUpsideDown and the 4th element Portrait, I swapped these two values and then it was working smooth again.

iPhone game display is off the screen by 10 pixels or so on the device

I recently deployed my first iPhone app, a simple game, to my testing iPhone for the first time. Everything looks and runs fine on the simulator in Xcode, but on the iPhone the whole image is shifted up about 10 pixels or so. So the gameplay goes slightly offscreen on top and has a slim white/grey bar at the bottom. Has anyone encountered this before? I do have the status bar display turned off, I'm wondering if the device handles that flag differently than the simulator. I also have the rotation hardcoded to be in portraitRight mode at all times, and I have an extra line in the code to make the simulator do that automatically that's apparently not necessary on the device.
Everything is very simple, so I'm not sure where this glitch is coming from or even where to look.
Did you use Interface Builder to create your UI? If you did, then go and check each and every XIB file(s) objects' Size & Position as well as Autosizing in Size Inspector (command-3).
It's very important to check both: your coordinates might have gone wrong after some change you did and autoscaling works in weird ways unless you attach to correct edges. Apple documentation should help http://developer.apple.com/iphone/library/documentation/DeveloperTools/Conceptual/IB_UserGuide/Layout/Layout.html