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?

Answered by Vika in 787350022

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

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

Accepted Answer

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

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

Unable to determine the installation source via MarketplaceKit AppDistributor.current
 
 
Q