* * *

Author Topic: IOS  (Read 3999 times)

zogtrog

  • New member
  • *
  • Posts: 12
IOS
« on: July 25, 2015, 08:27:26 am »
I wish to develop an application for ios using lazarus is this feasible.

Pas4ios   appears to be dead as there is no web site and no wiki.

What's the best way to go ?

Thaddy

  • Hero Member
  • *****
  • Posts: 4429
Re: IOS
« Reply #1 on: July 25, 2015, 08:49:01 am »
IOS is fully supported in both 64bit and 32bit flavors in FPC trunk. 32bit is supported in 3.0.1.
So I suggest you download trunk and build cross-compilers for AARCH64-IOS and ARM-IOS on your favorite platform. (I myself have no experience building for AARCH64). It may even be possible you can run Lazarus on the device itself. Ofcourse you also need the Apple toolchain and also a developers license from Apple.
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

Leledumbo

  • Hero Member
  • *****
  • Posts: 7649
  • Programming + Glam Metal + Tae Kwon Do = Me

zogtrog

  • New member
  • *
  • Posts: 12
Re: IOS
« Reply #3 on: July 28, 2015, 08:28:53 am »
Thanks for the info.

I was going to write an app to control my raspberry pi natively from IOS over bluetooth.  This isn't possible as IOS doesn't support the blue tooth serial port profile on a standard phone.

Jack

simon

  • New member
  • *
  • Posts: 6
Re: IOS
« Reply #4 on: September 03, 2015, 04:58:11 pm »

Hi -

I'm new to FreePascal and would like to use it for iOS and Android development.

I've successfully created the necessary cross-compiler flavours of FPC by following the instructions from http://blog.naver.com/simonsayz/220305479793 but have run into a problem.

I'm trying to use iOS 8.4. I'm at step 7.1:

Meteor:iPhoneAll simon$ sudo /usr/local/lib/fpc/3.1.1/ppcrossarm -Cparmv7 -Cfvfpv3 -dIPHONEALL -FD/Applications/Xcode.app/Contents/Developer iPhoneAll.pas
Free Pascal Compiler version 3.1.1 [2015/09/03] for arm
Copyright (c) 1993-2015 by Florian Klaempfl and others
Target OS: Darwin for ARM
Compiling iPhoneAll.pas
Compiling CFNetwork.pas
Compiling CoreFoundation.pas
CFBase.inc(260,3) Fatal: Syntax error, "identifier" expected but "CONST" found
Fatal: Compilation aborted

Line 260 in CFBase.inc reads:

const struct CF_BRIDGED_TYPE = function (CFNullGetTypeID(void: NSNull) __CFNull* CFNullRef;CF_EXPORTCFTypeID): ; cdecl;

Any ideas what the issue may be?

many thanks

Simon

Cooler

  • Newbie
  • Posts: 4
Re: IOS
« Reply #5 on: January 22, 2016, 10:56:48 pm »
How do you build 64-bit code for ARM?
I've created an empty program and ppca64 compiles it, but can't link because there is no libc.dylib for ARM64 architecture. I searched over the whole drive (I have IOS 9 SDK installed with XCode 7) and found some libc.dylib but just for simulator platform, not iPhoneOS platform.

ppcarm works fine for ARMv7 architecture, but Apple requires 64-bit code, so it's not enough.

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 556
Re: IOS
« Reply #6 on: January 24, 2016, 10:13:46 pm »
How do you build 64-bit code for ARM?
I've created an empty program and ppca64 compiles it, but can't link because there is no libc.dylib for ARM64 architecture. I searched over the whole drive (I have IOS 9 SDK installed with XCode 7) and found some libc.dylib but just for simulator platform, not iPhoneOS platform.

ppcarm works fine for ARMv7 architecture, but Apple requires 64-bit code, so it's not enough.
You have to tell the compiler the location of the SDK to use with the -XR parameter. The reason is that by default, the compiler tries to link the system versions of the libraries, which do not contain AArch64 code (although they don't contain ARM code either, so I'm not sure why that work for you). Normally,
Code: [Select]
-XR/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdkshould work (both for ARM and AArch64/ARM64).

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus