IPod Touch 4G considers iPad

I have a universal app that works and works great on iPad, iPhone 4G, 3GS and 3G, but it won’t work properly when launched on iPod Touch 4G.

I don’t have an iPod Touch for testing, but I was told by the beta tester that it installs on the device, but when it starts it shows Default.png from the iPad version of the application, compressed to the screen at startup, then just black from there. When the application forcibly quits (using the application switcher) and restarts, it does the same again.

I double-checked that the target device family is the iPhone / iPad, and a clean build was done, etc., but still no dice.

+4
source share
4 answers

So, after some trial and error, I found out what the problem is (there are actually two separate but related problems):

In my info.plist I used two keys to assign different MainWindow files:

Main nib file base name (iPad)

and

Main nib file base name (iPhone)

I mistakenly thought that the second key applies to iPod Touch, since there is no Main nib file base name (iPodTouch) . This turns out to be wrong, and iPod Touch is actually looking for the Main nib file base name key. So now I have this setup:

alt text

.. and it works great in 3.1.3 and 4.2. (Note that application:didFinishLaunchingWithOptions not called if the device cannot find MainWindow to use, as I developed the problem).

I suspect the same thing applies to the Launch image (iPad) , Launch image (iPhone) and Launch image keys, which explains why iPod Touch uses the iPad launcher, but I haven't been able to try it yet.

+8
source

Make sure Default.png correctly named:

  • Default.png (default)
  • Default~iphone.png (iPhone or iPod touch)
  • Default~ipad.png (iPad)

For iPad resources, you can also specify specific PNGs by default for each orientation.

0
source

I'm not sure if this will work, but it may help you.

Make sure that the attribute (visibleAtLaunch) is set in the InterfaceBuilder in the main window.

Several times, if it is not installed, it displays a black screen.

0
source

There is currently a jailbreak technology that uses some iPad firmware to install on an iPhone or iPod Touch. Theoretically, this should not affect anything, but I never did it myself, so I can not vouch for it. You may ask if this tester is on a jailbreak device, and if so, try a device that is not associated with a jailbreak.

0
source

Source: https://habr.com/ru/post/1332577/


All Articles