开发者

Turning Separate iPad/iPhone Targets into Universal App

When I started my universal application, I thought the one target option would be too much work,开发者_开发技巧 so i opted for separate targets. I realized halfway through making the iPad portion of the app, that making a universal application would be easier. The issue is, I can't use Apple's option to convert my iPhone target to Universal, as there are already separate targets. Is there a workaround that allows me to upgrade my iPhone target to Universal?


Okay, I made a test app, and tried deleting the iPad target...didn't work. Then, since there were two MainWindow.xib files, I realized that something special was done to the "Resources-iPad" folder. I moved all of the files in it to another group, and deleted the "Resources-iPad" folder. This enables the "Upgrade Current Target for iPad" selection. I ran it again, but picked Universal Application, and then moved the previous inhabitants of the "Resources-iPad" back to their original home.

To recap:

  1. Move Files in "Resources-iPad" group to somewhere else
  2. Delete "Resources-iPad" group and the iPad target
  3. Select iPhone target and go to Project => Upgrade Current Target for iPad
  4. Pick Universal Application
  5. Move iPad Resources back into the new "Resources-iPad" folder
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜