Is there a way to get the application id in runtime for Android and iOS in delphi XE7?
For android you can see the application id at: project options -> version info(Target Android) -> package and for iOS: project options -> version info(Target iOS) -> CFBundleName
Thanks in advance!
Reading Android package name:
uses
Androidapi.Helpers;
function PackageName: string;
begin
Result := JStringToString(SharedActivityContext.getPackageName);
end;
Reading iOS bundle name:
uses
Macapi.CoreFoundation, iOSApi.Foundation;
function PackageName: string;
begin
Result := TNSString.Wrap(CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle, kCFBundleIdentifierKey)).UTF8String;
end;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.