Making a .swiftpm app iPad only?

Is there a way to make a .swiftpm app only available on the iPad? I can see where I would restrict it in the autogenerated Package.swift, but there's nowhere in the Swift Playgrounds or Xcode 14 interface that I can find that will let me restrict it to iPad only.

It's causing my app to get rejected by the App Store team, as the iPhone version is too crowded... but it's designed for iPad... I just need to be able to specify that somewhere...

Replies

Yes, you can make a .swiftpm app only available on the iPad. Here are the steps:

  1. In your Xcode project, go to the General tab of your target.
  2. Under Deployment Info, select iPad as the Devices option.
  3. You can also specify the iOS version required for your app to run on iPad.
  4. Once you have made these changes, build and run your app to ensure that it only runs on iPad.

If you are submitting your app to the App Store, make sure that you have specified the required devices in the app's metadata. Here are the steps:

  1. Go to App Store Connect and select your app.
  2. Go to the App Information section and scroll down to the General Information section.
  3. Under Devices, select iPad.
  4. Save your changes and submit your app for review.
  5. With these steps, your app will only be available on iPad and not on iPhones or other devices.

If you need help with mobile app development, you should contact the experts in mobile app development https://tech-stack.com/services/mobile-development

With a .swiftpm-based project there is no Deployment Info option in the General tab. In the end, I edited the Package.swift file to add a entry like this:

            supportedDeviceFamilies: [
                .pad
            ],

But thanks for the help.