You are not logged in.
Hi,
I am working with the iOS application. I am using latest mORMotNightlyBuild version.
On the client side when I am trying to compile through an activated iOS Simulator, I got an error- File not found:'Contnrs.dcu'.
And also, do we have any example for iOS application using mORMot client and server?
Could anyone help me regarding this issue?
Thanks in advance.
Offline
Hi AB!
I have already used these 2 units under my Uses section: SynCrossPlatformREST, SynCrossPlatformSpecific
FYI: These are my units in the Uses section of Client side other than standard Firemonkey units:
SynCommons,
mORMot,
SynCrossPlatformREST, SynCrossPlatformSpecific,
mORMotHttpClient, // HTTP client to a mORMot RESTful server
RESTModel; // data model unit, shared between server and client
Last edited by aruncs08 (2014-12-01 14:21:31)
Offline
Thanks, but another Error popped up: File not found: 'Windows.dcu'
This error is shown under 'SynCrossPlatformSpecific' class.
Now I have removed mORMotHttpClient and using only SynCrossPlatformREST.
Any suggestions?
Last edited by aruncs08 (2014-12-02 09:42:42)
Offline
Are you sure your SynCrossplatform.inc file is up-to-date?
The following lines:
{$if CompilerVersion >= 23.0}
{$define ISDELPHIXE2} // e.g. for Vcl.Graphics
{$ifndef MSWINDOWS}
{$define USETMONITOR}
{$endif}
{$ifend}
are needed to define USETMONITOR, which would use TMonitor instead of the fastest Windows API when run in cross-platform mode.
Online
Had the same error.
Does it pass above part of the .inc? Isn't it catched by the NEXTGEN section for iOS...
Offline
Indeed.
This was a regression.
Should be fixed by http://synopse.info/fossil/info/b9a67c7917
Thanks Wim for the report!
Online
I have updated the fix now. But again, it's shows an Error: [DCC Fatal Error] SynCommons.pas(675): F1026 File not found: 'Contnrs.dcu'
Still, it hasn't solved. Any other suggestions please.
Btw, Thanks AB and Wim314 .
Offline
@aruncs08
I guess your project is mixing units.
If you use SynCrossPlatform* units, you should NOT link SynCommons.pas to your application.
All the needed types (e.g. RawUTF8 or TModTime) are defined in SynCrossPlatformREST, not in SynCommons, when using cross-platform clients.
Online
@AB: Yes, I understood and fixed in the Client side and Model class. But how can I use only SynCrossPlatform* units in the mORMot Server side program?
It says Error on these lines when trying to compile mORmot Server. If I try to remove any of the Uses classes in the code below, then the error increases.
FYI, I am using MSSQL as a backend database.
Uses
SynLog, mORMot, mORMotSQLite3, SynSQLite3Static, mORMotDB, mORMotHttpServer, SynDB, SynDBODBC, mORMotWrappers, SynOleDB, SynCrossPlatformREST, RESTModel;
VirtualTableExternalRegister(aModel, TWareHouses, aProps); // my aModel class uses only SynCrossPlatform* units
try
aRestServer := TSQLRestServerDB.Create(aModel,':memory:',false);
aRestServer.AcquireExecutionMode[execORMGet] := amBackgroundORMSharedThread;
aRestServer.AcquireExecutionMode[execORMWrite] := amBackgroundORMSharedThread;
aRestServer.CreateMissingTables;
AddToServerWrapperMethod(aRestServer, ['..\..\..\CrossPlatform\templates','..\..\..\..\CrossPlatform\templates']);
aHttpServer := TSQLHttpServer.Create(SERVER_PORT,[aRestServer],'+',useHttpApiRegisteringURI);
try
aHttpServer.AccessControlAllowOrigin := '*';
writeln('Background server is running.'#10);
write('Press [Enter] to close the server.');
readln;
finally
aHttpServer.Free;
end;
finally
aRestServer.Free;
end;
I know that I am not using appropriate methods or classes in this mORMot server side, but I don't know what are they?
Kindly help me to fix this. Any available example for the Server side program for iOS/mobile applications?
Thanks in advance.
Last edited by aruncs08 (2014-12-04 09:45:12)
Offline
Just use any mORMot server...
You have examples in folder "27 - CrossPlatform Clients".
For instance Project27ServerTest.dpr or Project14ServerHttpWrapper.dpr or even RegressionTestsServer.dpr
Online