Unable to determine the installation source via MarketplaceKit AppDistributor.current

I am trying to determine the installation source of my iOS app. According to the documentation https://developer.apple.com/documentation/appdistribution/distributing-your-app-on-an-alternative-marketplace#Customize-your-app-depending-on-the-installation-source, MarketplaceKit AppDistributor static property current should be used. But build fails due to the error 'Cannot find 'AppDistributor' in scope'.

Is MarketplaceKit available for apps that install from an alternative app marketplace?

Accepted Reply

import UIKit causes the build error 'Cannot find 'AppDistributor' in scope'.

Call AppDistributor.current in the file that doesn't import UIKit.

Replies

import UIKit causes the build error 'Cannot find 'AppDistributor' in scope'.

Call AppDistributor.current in the file that doesn't import UIKit.