#1 2012-05-10 22:08:46

BrentG
Member
Registered: 2012-04-05
Posts: 31

How to get mORMot working for iOS using XE2?

I don't know how far along you guys are with iOS, but I'd like to use mORMot in an iOS app for iPhone/iPad using Delphi XE2.

The iPhone app should be able to create a SQLite database on the iPhone where the user can enter data through forms (local data) and display the data in a listbox/form etc. (CRUD).  The iPhone app should also be able to access a mORMot web service running on a Windows machine via HTTP. I'd like to use MVC on the iPhone so I can isolate the logic away from the form. I think mORMot would be perfect for this. smile

How much of this is possible today? Any demos?
And how long will it take for the rest?

TIA
Brent

Offline

#2 2012-05-11 05:13:36

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: How to get mORMot working for iOS using XE2?

Sadly, mORMot is working only on Windows up to now.

The code was already prepared for other targets - see http://blog.synopse.info/post/2011/08/0 … FireMonkey
But it is not working properly yet.

In order to work on iOS, it will need compatibility with the FPC compiler.
The latest version increased the compatibility with FPC. It now compiles without any problem.
But there are still some errors at execution, due to a specific RTTI layout.

So it is not possible today to use mORMot with Delphi XE2 when targetting iOS.
You can use mORMot on the server side, then code your client in plain Objective C or a PhoneGap-based solution like Smart (in Object pascal).
Benefit of Smart is that it will work also on Android phone, and rich Web clients.

Offline

#3 2012-05-11 14:25:41

BrentG
Member
Registered: 2012-04-05
Posts: 31

Re: How to get mORMot working for iOS using XE2?

Thanks for your reply.

So if Delphi XE2/3 ever dropped its dependency on FPC and used its own compiler to create iOS apps, then mORMot would reliably on iOS?

TIA
Brent

Offline

#4 2012-05-11 14:57:50

mpv
Member
From: Ukraine
Registered: 2012-03-24
Posts: 1,571
Website

Re: How to get mORMot working for iOS using XE2?

Now mORMot (server part) use IOCP - it is only Windows technology. Anybody know - something similar exist in iOS?

Offline

#5 2012-05-11 15:17:27

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: How to get mORMot working for iOS using XE2?

In iOS, you need only the client part.

And it can use plain sockets API, on iOS, for the client connection.

Offline

#6 2012-05-12 14:55:12

BrentG
Member
Registered: 2012-04-05
Posts: 31

Re: How to get mORMot working for iOS using XE2?

::: In iOS, you need only the client part.
:::: And it can use plain sockets API, on iOS, for the client connection.

Can we see a sample app of an iOS client (using Delphi FM) connecting to a mORMot Windows server?
Is it possible to have a secure connection between the two other than using SSL on the server?

TIA
Brent

Offline

#7 2012-05-13 06:27:46

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: How to get mORMot working for iOS using XE2?

1. I do not have time to do such a sample App yet - but maybe some other users are able to do this.
You'll need to write a dedicated set of classes for the client, since the client part of mORMot won't compile (Delphi XE2 uses FPC for compiler on iOS).

2. Security in mORMot, when it deals with connection, is at several levels:
- You can use HTTPS (from http.sys);
- You have http://blog.synopse.info/post/2011/05/2 … entication
- You have a custom compression scheme (SynLZ - much faster than Zip/deflate), and you can add any compression layer at the communication level. This this require low-level hacking of SynCrtSock events handlers.
IMHO best is to use HTTPS + RESTful authentication.
Only RESTful authentication has a strong pattern of security. If you do not need to encrypt the content, just secure the access, it will be enough. Our interface-based SOA has a per interface / per method access pattern.

Offline

Board footer

Powered by FluxBB