简体   繁体   English

为与iPhone和Ipad相同的应用程序上传两个不同的xcode文件

[英]Uploading Two different xcode files for the Same application as iPhone and Ipad

I have created an ipad application. 我已经创建了一个iPad应用程序。 I still haven't uploaded it to the app store, this application has a specific bundle ID. 我仍然没有将其上传到应用商店,此应用具有特定的捆绑包ID。

Meanwhile, I was creating the same application content and features but compatible only with iPhone/Ipod devices.This application has a different bundle ID and a different Xcode file. 同时,我正在创建相同的应用程序内容和功能,但仅与iPhone / iPod设备兼容。此应用程序具有不同的捆绑软件ID和不同的Xcode文件。

So, now i have two Xcode files, one for the iPad and the other one for iPhone, each one with different bundle IDs. 因此,现在我有两个Xcode文件,一个用于iPad,另一个用于iPhone,每个文件具有不同的包ID。

The next step would be uploading this application to the app store, so the situation is , how can i upload it and link two different xcode files together, one for ipad and the other for iPhone 下一步是将该应用程序上传到应用商店,因此情况是,我该如何上传它并将两个不同的xcode文件链接在一起,一个用于ipad,另一个用于iPhone。

keeping in mind, this is a paid application, so if the user has paid for it on his iPad, he should get the iphone version for free ( on the same App ID ) . 请记住,这是一个付费应用程序,因此,如果用户在其iPad上付费,则应该免费获得iphone版本(使用相同的App ID)。

You cannot upload two versions of the same app to the app store. 您不能将同一应用程序的两个版本上载到应用程序商店。

I suggest consolidating into 1 file, a universal file that will work for BOTH iPhone or iPad. 我建议合并为1个文件,这是一个通用文件,适用于iPhone或iPad。

Other option, would be to create a new app under a different name for iPad or iPhone / iPad only. 另一种选择是仅以iPad或iPhone / iPad的不同名称创建一个新应用。

Excerpt from Apple's programming guide: 苹果编程指南节选:

Creating a Universal App 创建通用应用

A universal app is a single app that is optimized for iPhone, iPod touch, and iPad devices. 通用应用程序是针对iPhone,iPod touch和iPad设备进行了优化的单个应用程序。 Providing a single binary that adapts to the current device offers the best user experience but, of course, involves extra work on your part. 提供适合当前设备的单个二进制文件可提供最佳的用户体验,但是当然,这需要您付出额外的工作。 Because of the differences in device screen sizes, most of your window, view, and view controller code for iPad is likely to be very different from the code for iPhone and iPod touch. 由于设备屏幕尺寸的差异,iPad的大多数窗口,视图和视图控制器代码可能与iPhone和iPod touch的代码完全不同。 In addition, there are things you must do to ensure your app runs correctly on each device type. 此外,还必须执行一些操作以确保您的应用在每种设备类型上都能正确运行。

Xcode provides built-in support for configuring universal apps. Xcode提供了用于配置通用应用程序的内置支持。 When you create a new project, you can select whether you want to create a device-specific project or a universal project. 创建新项目时,可以选择要创建设备特定项目还是通用项目。 After you create your project, you can change the supported set of devices for your app target using the Summary pane. 创建项目后,可以使用“摘要”窗格更改应用程序目标所支持的设备集。 When changing from a single-device project to a universal project, you must fill in the information for the device type for which you are adding support. 从单设备项目更改为通用项目时,必须填写要为其添加支持的设备类型的信息。

Read the full version HERE 此处阅读完整版本

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

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