Jump to content
Sign in to follow this  
Krzy

Using iosApi.Foundation

Recommended Posts

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
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

When I wrote in Delphi:

 

uses
  iOSapi.Foundation;

I got "identifier iOSapi not found".
This is a main problem.



Capture.PNG

Share this post


Link to post
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×