Not getting clicks in iPad version of my iPhone application - iphone

Using the latest SDK from Apple, I noticed that while running on the iPhone works fine, the iPad version of my application doesn't "accept clicks" on any view/widget that is outside the "bounds" of the standard iPhone screen.
Any idea?
Thanks,
Reuven

Vanilla iPhone apps will only accept touches within that little bounds, to reproduce that fact that the iPhone resolution is only 320×480.
To fix it, upgrade your app for iPad.
(Also, make sure you don't hard-code any numbers. For example, use [UIScreen mainScreen].bounds.)

OK - found it...
All I needed to do was to open MainWindow.xib in Interface Bulder, and in the Window Attributeds palette, to check "Full Screen at Launch".

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?

Why does the iPhone Simulator show parts of the springboard behind the app?

While revising one of my apps to work with the latest iPhone dimensions I noticed the simulator was (wrongly) displaying icons behind the app like the app wasn't sized correctly for the new 1136 x 640 dimensions. I couldn't find anywhere in my Cocos2d 2.0 code that affected this issue and changing the size of the white background image did nothing. When I told the simulator to go "Home" and then relaunched the app, it appeared normal. This only happened when testing localization languages like German in the following image.
Sounds like a bug to me. Maybe report this to Apple?
Yes this is definetly a bug, if not then apple will help
Reset your simulato.
then run your project.
Removing all references to armv6 eliminated this issue.

UIGetScreenImage with iPhone app used on iPad

My app uses the UIGetscreenImage () method to take a Screenshot, which works perfectly fine using iPhone simulator or an iPhone.
Now I wanted to use my app, that is targeted for iPhone on my iPad too.
Doing so, the Screenshot will only be the upper right corner of the iPad display, in the size of an iPhone display.
Changing the app target to iPad would fix the problem, but screws the complete UI, so it is a rather bad fix.
You know some other way to fix the problem?
Using the UIGetScreenImage method is no problem, as it isn't targeted for the AppStore, and I like the advantage of the statusbar included in the screenshot.
But if their is no other way to fix it I can also use another method for making screenshots.
thx for your help :)

Safari: how to size the browser for the iPhone size (or some other solution)?

I am coding a web app for an iPhone and I'm wondering how best to use Safari to develop for the iPhone, the main problem being that I've got is that Safari apparently cannot be resized to the narrow 320 pixels of width. How can I do that?
Any other tips and tricks?
If you are looking for an environment to test, Ripple emulator seems a nice option.
I had the same problem and solved it quickly and simply by using a 320x480-sized iframe. Additionally, I added options to change the size (iPhone portrait, landscape, iPad, status bar or not, ...) and presto! an iPhone “simulator”!
Edit: that also allows the use of the Web Developer tools, they're invaluable in Safari or Chrome (I prefer to use the latter, but both are Webkit-powered).
The absolute best way is to use a real device - iPhone or iPod touch - so you get a proper feel for how the device responds. If you're doing hefty animations, for example, testing on a desktop computer may leave you scrambling once you realize the entire page lags horribly on a real device the day before launch.
Barring that, you should use the iOS Simulator that comes with the xCode iOS SDK.
You can use a browser extention or plug-in. For Safari there is ResponsiveResize for instance. You can donwload it here. It allows you to use a predefined browser size, or use any custom size you'd like.

Dynamic (Default.png) splashscreen in 3.0 [iPhone SDK]

I know it's possible to create a dynamically changable Default.png by creating a symbolic link. But that's not possible in iPhone SDK 3.0 anymore (only in 2.0).
How can I make this in 3.0, or is this impossible?
Tim
This worked on iPhone OS 2.0 http://collison.ie/blog/2008/11/dynamic-defaultpng-files-on-the-iphone but not on iPhone OS 3.0 anymore. The default-screen is always black.
I can change the default-screen in the documents-folder and the symbolic-link does link to that file. I tested that by browsing to the app-folder from the Simulator. I saw the right file in the documents-directory and I saw that the symbolic link points to that (the right) file.
It's not possible in 3.0. It was only possible on 2.0 because it was an exploitable bug. The bug was fixed in 3.0 which is why it's not possible.
Apple don't intend the Default.png to be a "splash screen".
If you read the HIG, you'll see that the Default.png is suppose to represent your user interface as it would be "empty" - without any content. It is intended to give the user the illusion of an "near instant" launch.
Check out all of the Apple apps on the iPhone and you'll see how the default.png is meant to be used properly.
Apple frown upon using the Default.png as a splash screen. They say that it is really only appropriate for apps such as games that don't use the standard UI elements that are provided in the SDK.
That being said - lots of apps these days are using this feature to show splash screens, and seems Apple aren't really enforcing this guideline.
Long story short, you can do a splash screen, but it can't be dynamic - not anymore.
Use a blank Default.png and then in your app delegate's -applicationDidFinishLaunching: method, load a UIView that contains your dynamic content. This solution sidesteps any conflicts with Apple's SDK terms as well as all technical problems.