Phonegap targeting only iPhone (not iPad)?

后端 未结 2 1900
长发绾君心
长发绾君心 2021-02-01 19:54

How can I make Phonegap Build to target my app only for iPhone (not iPad)? Is it possible?

I\'m not using XCode. It\'s an HTML5/JS app built with Phonegap.

相关标签:
2条回答
  • 2021-02-01 20:12

    Xcode is the offical tool from apple to make build for iOS devices.

    Specifying the Targeted Devices

    The Devices setting identifies the type of devices you want the app to run on. There are two device types: iPhone and iPad. The iPhone type includes iPhone and iPod touch devices. The iPad type includes iPad devices.

    To specify the device families on which you want your app to be able to run:

    1. In the project navigator, select the project.
    2. From the target list in the project editor, select the target that builds your app, and click Summary.
    3. From the Devices pop-up menu, choose iPhone, iPad, or Universal (to target both families).

    enter image description here For more information on configuring your app for iPhone, iPad, or both device families, see “Advanced App Tricks”.

    Now talk about second option

    i.e. to submit your project to phonegap build program, you have to follow this blog.

    In this blog they clearly mention:

    "We're now able to offer support for building to iOS devices through Adobe® PhoneGap™ Build. The process for completing iOS builds is slightly different than that for other platforms: all iOS builds need to be signed by a developer certificate and a provisioning profile, that is tied to your Apple developer account and the device you wish to test on. This document covers how to set this up.

    Note: Since PhoneGap Build uses Apple's standard development process to build applications, you will need to sign up for their developer program to build iOS applications on PhoneGap Build. You will also need a Mac to configure your certificate and provisioning profile."

    You have to mention device detail in config.xml and phonegap team also uses xcode to make iOS build for us.

    0 讨论(0)
  • 2021-02-01 20:18

    I know this is old, but the correct answer isn't here; so I'm adding it. I got here with the same problem and below is the solution you're looking for:

    In your config.xml:

    <preference name="target-device" value="handset" />
    
    0 讨论(0)
提交回复
热议问题