My App shows only a black screen on iPod

半城伤御伤魂 提交于 2019-12-04 03:22:30

问题


My app is in productions an works correctly in all devices except the iPod touch, which only shows a black screen when start the app. Does any body knows which could be the problem? The iPod touch is running with the 4.2.1 iOS version. Thnks


回答1:


As @ValentiGoClimb mentioned in the comment, Xcode has bad defaults when generating the Info.plist file; it only sets the Storyboard keys for iPads and iPhones, not iPod Touches.

<key>UIMainStoryboardFile~ipad</key>
<string>iPadStoryboardFileName</string>
<key>UIMainStoryboardFile~iphone</key>
<string>iPhoneStoryboardFileName</string>

I haven't found a good way to edit this under the General Project settings screen in Xcode (which is why this problem most likely exists), so adding the key manually in the Info.plist file works well.

<key>UIMainStoryboardFile</key>
<string>iPhoneStoryboardFileName</string>



回答2:


Your iPod is supposed to have the retina display.

so just try using Default@2x.png .

And also please make sure to have this in resources.




回答3:


Try this -

  1. Open your mainwindow's xib file
  2. select window in xib file
  3. in inspector window select first tab
  4. check mark the "visible at launch"



回答4:


For me, I’m using XIB not Storyboard. But with Xcode 10 it’s set as “MainStoryBoard” as Main Interface in target setting.

So I have changed from “MainStoryBoard” to “MainWindow” and worked for me.



来源:https://stackoverflow.com/questions/6290345/my-app-shows-only-a-black-screen-on-ipod

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!