Distributing your app on an alternative app marketplace
Design your app for alternative distribution from an alternative app marketplace.
Overview
To distribute your app from an alternative app marketplace, review and sign the necessary agreements. For your app to reside on an alternative app marketplace, it needs to run on one or more of the platforms that the target region supports. For information on the region-based agreements and platorms, see Participating in alternative distribution for specific regions.
App Store Connect ignores apps for platforms that the region doesn’t support. For example, when App Store Connect sends an alternative distribution package for your app to an alternative marketplace, it excludes any watchOS extensions or watch apps.
Apps on an alternative marketplace aren’t required to use MarketplaceKit, but you need to build your app with Xcode 14.1 or later and set the deployment target to greater than or equal to the earliest version of the OS that Xcode 14.1 supports. If your app does call MarketplaceKit methods, build your app with Xcode 15.3 or later.
Add the required target property
If your app offers the purchase of digital goods or services, add the MKSellsDigitalGoods property to your app’s target configuration in Xcode with a value of YES. Also, report each offered purchase to Apple using the TransactionReporting API. For more information, see Reporting transactions for the Core Technology Commission.
If your app doesn’t sell digital goods or services, you still need to add the MKSellsDigitalGoods property to your app’s target configuration with a value of NO.
Customize your app depending on the installation source
If your app installs from more than one source, you can implement conditional code to do something different, such as displaying a different graphic, depending on the source from which a person installs your app. Use MarketplaceKit’s app distributor’s static current property to determine the installation source:
App distributor | Installation source |
|---|---|
The App Store | |
TestFlight | |
Alternative app marketplace; the argument | |
The developer’s website | |
Enterprise or education developer programs |
In apps that people install from alternative marketplaces, use APIs that vary from apps on the App Store. Specifically, use:
AdAttributionKit for ads
A custom e-commerce solution; API that rely on Apple’s App Store, such as In-App Purchase and On Demand Resources, don’t support alternative app marketplaces.
Background Assets to download large files in the background
A social gaming network other than Game Center unless your app is also on the App Store
API availability varies depending on the source, so your app needs to check the current source at each launch — not just at the first launch — and adjust the APIs it uses accordingly.
In addition, for apps that aren’t marketplaces, use eligibilityRegion to determine if an Apple Account is signed in that has a region eligible for transaction reporting.
Enable your app to run on other platforms
Apps can run on platforms that MarketplaceKit doesn’t support, including macOS using Mac Catalyst or as-is on Apple silicon, and visionOS. To check the platform, use #if canImport(MarketplaceKit), which returns false for Mac apps built with Mac Catalyst and visionOS. Avoid importing MarketplaceKit on unsupported platforms, as follows:
#if canImport(MarketplaceKit)
import MarketplaceKit
#endifIf your app uses AppDistributor, check the platform first and avoid accessing MarketplaceKit on unsupported platforms. The following example uses #if canImport(MarketplaceKit) again to conditionalize access to AppDistributor:
func getDistributorName() async -> String {
#if canImport(MarketplaceKit)
do {
let currentDistributor = try await AppDistributor.current
switch currentDistributor {
case .appStore:
return "App Store"
case .testFlight:
return "TestFlight"
case .marketplace(let bundleId):
return "Alternative marketplace (\(bundleId))"
case .web:
return "Website"
case .other:
return "Other"
@unknown default:
return "Unknown"
}
} catch { return "Error" }
#else
return "Unavailable"
#endif
}To check for as-is apps that run on Apple silicon, use ProcessInfo.processInfo.isiOSAppOnMac:
if ProcessInfo.processInfo.isiOSAppOnMac {
distributorName = "Unavailable"
} else {
Task { currentDistributorName = await getCurrentDistributor() }
}Establish a marketplace relationship and enable notifications
To distribute your app on a particular alternative app marketplace, contact the marketplace directly and it provides you with a unique ID that you upload to App Store Connect. Apple verifies the ID with the marketplace’s public key to confirm your agreement, or relationship. For more information, see Manage distribution on an alternative app marketplace.
When you’re ready to submit your app for review, choose the App Store review type if you also intend to ship your app from the App Store in addition to an alternative app marketplace. To ship your app just from an alternative app marketplace, choose the Notarization review type (see Submit for Notarization).
When your app completes App Review or Notarization, your app becomes available for the marketplace to distribute. For distribution on an alternative app marketplace, App Store Connect provides your app in the form of an alternative distribution package after you’ve set up your marketplace relationship. The package contains instructions that the alternative app marketplace follows to assemble an installable version of your app. You can download the alternative distribution package and provide it to the marketplace manually or enable notifications in App Store Connect, which sends the package to the marketplace automatically. When notifications are on, App Store Connect keeps the marketplace up-to-date on the alternative distribution packages for all your latest app versions.
Test your app during development
Your app can install from an alternative marketplace app only after passing Notarization. To test your app beforehand, set the installation source for development builds. Setting the installation source enables you to simulate an installation from a marketplace in production.
Set your target’s Alternative Distribution - Marketplaces build setting to a list of marketplace bundle IDs for the alternative marketplaces from which your app can install.
[Image]
This build setting overrides the current property for development builds, which enables you to test any custom code branching your app might do, such as displaying a different image or offering different menu items.
[Image]
In your scheme’s Run task Options tab, Distribution selection menu, choose that marketplace’s bundle ID to simulate installation from that marketplace for runs on device through Xcode.
Similarly, to override the current distributor in a test plan, choose a marketplace bundle ID in the Distribution selection menu of your test plan’s configuration.
[Image]