Skip to content

extend package_info plugin to return installer info #67739

@ekuleshov

Description

@ekuleshov

This is a feature request for package_info plugin to return installer info in the PackageInfo structure.

For Android it is returned from PackageManager.getInstallerPackageName

PackageManager pm = applicationContext.getPackageManager();
String installerPackage = pm.getInstallerPackageName(applicationContext.getPackageName());
map.put("installer", installerPackage);

For iOS it is either Apple store or TestFlight

NSString *appStoreReceipt = [[[NSBundle mainBundle] appStoreReceiptURL] path];
...
@"installer" : [appStoreReceipt containsString:@"CoreSimulator"] ? @"com.apple.simulator"
    : [appStoreReceipt containsString:@"sandboxReceipt"] ? @"com.apple.testflight" : @"com.apple"

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterp: package_infoThe PackageInfo pluginpackageflutter/packages repository. See also p: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions