开发者

Universal application has black iPad screen

开发者 https://www.devze.com 2023-04-10 06:51 出处:网络
I\'ve just finished my app for iPhone and it is working fine.I now want to make the app universal but am getting a black screen when running it on the iPad simulator.Here is what I have done so far:

I've just finished my app for iPhone and it is working fine. I now want to make the app universal but am getting a black screen when running it on the iPad simulator. Here is what I have done so far:

  • When electing to make universal, I allowed xCode to create my "-iPad" version of my main nib; Therefore, I have MainWindow.xib for iPhone and MainWindow-iPad.xib for iPad. I have checked my plist file and have confirmed that both entries are present
  • Have double checked each UI component in the new iPad version to make sure all connect开发者_StackOverflowions are made identically to the iPhone version. I also double check that the classes are correct
  • I have made sure that the "visible at launch" and "full screen at launch" options are selected
  • I read somewhere that removing the "-" worked for someone and have tried renaming my nib and plist entries

I am assuming that my app would then load the proper nib. Obviously I'm either wrong or have some configuration not right

On the other hand, if I need to make some change in my didFinishLoadingWithOptions to force they selection between my nibs - well I must admit I don't know how to accomplish this either.

Thanks!


If the app doesn't crash, than it means it can find the black screen. Truncating the cache is done in Product -> Clean and also what you could try is "Reset" on the iOS simulator.

Further more, what you could check is if the "view" is linked correctly in your nib. (see image).

Universal application has black iPad screen


OK, after much trial and error, I have gotten this to work; Although, I'm not quite sure which exact steps solved the problem, I have a sneaking feeling it was some of the settings I had for the versioning of the app.

I created a new test app for iPhone and then converted it to iPad. Of course this worked unlike my app. I then compared everything I could think of between the apps. I changed the supported version from 3.1 to 4.0 on the Target -> Summary tab. I then check my build settings and changed everything in there to 4.0 as well. Finally, for each .xib file I set the deployment to "Project SDK Version (iOS 4.3) and the Development to "Interface Builder 3.1" because that is what my test app was set to. To be honest, I don't even recall altering these or do I really even know if this has an impact all I know is that I did change them as described. Did a project clean, reset the simulator and now it is working. I'm wondering if it was the 3.1 was too early for the iPad...

Anyway thanks.

0

精彩评论

暂无评论...
验证码 换一张
取 消