none
none

Reputation: 65

Programming on iOS with FPC

Tell me please where can I get information about developing on iOS with FPC? I don't mean Firemonkey iOS Applications. How can I get access to iPhone enviroment with FPC? For example to GPS or Accelerometer etc. I use RAD Studio XE2 and virtual machine with Snow Leopard. For example

{$IFDEF FPC}
UIApplication.sharedApplication.openUrl(NSUrl.URLWithString(
NSSTR(PChar('http://stackoverflow.com'))));
{$ENDIF}

I didn't have an experience how to work with this. I just know how to use Objective-C but I need this.

Upvotes: 0

Views: 489

Answers (1)

FreePascal site has a Wiki with some documentation on the topic (namely Targeting Darwin and iPhone Development).

To address your particular question:

First you can download source code of FreePascal libraries and look into libraries source code. This is vital for development as FPC has no documentation on libraries (source code is the source of docs as well :). Next, if you don't have functions to access the API, you can import them from system dylibs. This is exactly the same as you do on Windows when there's no declaration or function in Delphi libraries available.

Upvotes: 2

Related Questions