简体   繁体   English

iPad \\ iPhone应用程序结构

[英]iPad\iPhone application structure

I am going to build an iOS application that will have different iPad\\iPhone views, but will share some business logic. 我将构建一个iOS应用程序,该应用程序将具有不同的iPad \\ iPhone视图,但将共享一些业务逻辑。 I want to develop the application in different XCode projects, not in a universal mode (as this will require less development and testing). 我想在不同的XCode项目中开发应用程序,而不是在通用模式下开发(因为这将需要更少的开发和测试)。

I understood from the 'iPad Programming Guide', that "Creating a universal application allows you to sell one application that supports all device types". 我从“ iPad编程指南”中了解到,“创建通用应用程序可让您出售支持所有设备类型的应用程序”。

I would like to allow this behavior, but still develop on two different XCode projects (iPad and iPhone). 我想允许这种行为,但是仍然在两个不同的XCode项目(iPad和iPhone)上进行开发。 Is there a way to do so? 有办法吗? Maybe using the same application id? 也许使用相同的应用程序ID?

Do not split the app into separate iPhone and iPad apps, unless you are adding some significant functionality to the iPad app to warrant it as a completely separate app. 除非将某些重要功能添加到iPad应用程序中以保证它是完全独立的应用程序, 否则 请勿将应用程序拆分为单独的iPhone和iPad应用程序。

I say this because I just did this - (I had an existing app, and release a separate iPad version of it.) Apple rejected the application for this reason. 我之所以这样说,是因为我只是这样做-(我有一个现有的应用程序,并发布了单独的iPad版本。)Apple出于这个原因拒绝了该应用程序。

See Apple's guidlines: https://developer.apple.com/appstore/resources/approval/guidelines.html 请参阅苹果公司的指导方针: https : //developer.apple.com/appstore/resources/approval/guidelines.html

There is also info on creating universal apps here: 这里也提供有关创建通用应用程序的信息:

http://devimages.apple.com/iphone/resources/introductiontouniversalapps.pdf http://devimages.apple.com/iphone/resources/introductiontouniversalapps.pdf

You can just develop one app specifically for the iPad, and one specifically for the iPhone/iPod Touch. 您可以只开发一个专门用于iPad的应用程序,另一个专门开发用于iPhone / iPod Touch的应用程序。 Many apps do this, including Things and Things for iPad. 许多应用程序都可以做到这一点,包括“物联网”和“ iPad物联网”。 Creating two separate apps could increase your revenue, as well, since some people have both devices; 创建两个独立的应用程序也可以增加您的收入,因为有些人拥有两种设备。 if they really like your app, they will purchase it twice. 如果他们真的喜欢您的应用,他们将购买两次。

I would recommend against splitting the projects... That's because when you develop a universal application, it comes as one myApp.app bundle that gets loaded on the phone. 我建议不要拆分项目...这是因为,当您开发通用应用程序时,它作为一个myApp.app捆绑包出现在手机上。 It's actually rather trivial to code for the different platforms, and just a matter of screen resolution changes/a different nib. 实际上,为不同的平台编写代码相当简单,只需更改屏幕分辨率/更改笔尖即可。 Basic logic and underlying code should remain the same. 基本逻辑和底层代码应保持不变。

Ray Wenderlich has posted a great tutorial on how to do this. 雷·温德利希(Ray Wenderlich )发布了有关如何执行此操作的出色教程。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM