Krzy 1 Posted January 20, 2023 How to add the iosapi.foundation to delphi 11.2 ? I would like to get app version iOS app like below: uses Macapi.Helpers, iOSapi.Foundation; <<<<<< This is my problem function GetAppVersion: string; var LValueObject: Pointer; begin Result := ''; LValueObject := TNSBundle.Wrap(TNSBundle.OCClass.mainBundle).infoDictionary.objectForKey(StringToID('CFBundleVersion')); if LValueObject <> nil then Result := NSStrToStr(TNSString.Wrap(LValueObject)); end; Share this post Link to post
Dave Nottage 557 Posted January 20, 2023 4 minutes ago, Krzy said: This is my problem Except you do not say what the actual problem is. Your code compiles OK here. Share this post Link to post
Krzy 1 Posted January 20, 2023 When I wrote in Delphi: uses iOSapi.Foundation; I got "identifier iOSapi not found". This is a main problem. Share this post Link to post
Dave Nottage 557 Posted January 20, 2023 1 minute ago, Krzy said: I got "identifier iOSapi not found". The error message in the image says: " ',' or ':' expected, but identifier 'iOSapi' found..". You need to look at the code that comes before it, which you cut off in the image Share this post Link to post
Krzy 1 Posted January 20, 2023 Of course, there was a comma missing !!! Thank you so much Share this post Link to post