2
votes

Just starting to play with FM after almost 20 years of VCL, so please bear with me... What makes an XE5 application mobile vs. FM HD? I cannot add OSX target to a mobile project (even though Win32 works), and I cannot add iOS/Android target to a Win32/Win64/OSX project. From what I can tell the same units are referenced, so why can't I have a single project for all supported platforms?

Thanks!

2
Have you got the Mac environment set up correctly? You need a network connection between the Mac and PC, and the proper certificates and SDKs set up for OSX and iOS. See the help contents, RAD Studio, RAD Studio Topics, Cross-Platform Applications, Steps in Creating..., Working with a Mac and a PC. Also see the same Steps in Creating..., Adding a Mac OS X or iOS Device SDK.Ken White
Why do you want the forms have the same look and feel for desktop/tablets/smartphones? Did you ever see a MainMenuBar at mobile applications? If talking about a single code base for different targets then this is not related to the presentation partSir Rufo
Isn't that the premise of FM to have the same UI code for all platforms? I am perfectly fine with dynamically adjusting the display due to the differences in the platforms or for factors (besides the skinning done by FM itself), but I would rather prefer to have a single project with multiple target platforms.Dmitry Streblechenko
If you are developing a desktop application you can select all desktop os as target. If you are developing a mobile application you can select all mobile os as target. If you want to develop a desktop and mobile application, create a project group containing the desktop and mobile projects. The only difference is the UI for that targets. All of the non-UI code can be reused. So keep your non-UI code away from the formsSir Rufo
Yes, I can do that, but what exactly in the dproj file makes Delphi IDE treat my project one way or another?Dmitry Streblechenko

2 Answers

2
votes

You cannot add desktop mobile target to mobile. The main reason, because desktop platform have more space of screen and has another ideom of building UI. So, of course, you can make window UI on mobile device, but it is not conveniently for using and doesn't respond mobile UI Guildline doc. Also Apple guaranteed doens't apply your application into App Store.

However, you can create two project with one code base.

  1. Create Mobile project
  2. Create Desktop project
  3. Separate buisness logic from UI
  4. You can create custom form for each projects or use exists (Only add your common form to mobile or desktop projects).

Thank you

-1
votes

I cannot add OSX target to a mobile project (even though Win32 works), and I cannot add iOS/Android target to a Win32/Win64/OSX project.

Different project types have different backend dependences. It does not make sense to allow OSX in a mobile project, so it is disabled. It does not make sense to allow iOS/Android in a desktop project, so they are disabled. The only reason Win32 is allowed in a mobile app is to help facilitate local testing without using a device/emulator, but you should not deploy without doing some device/emulator tests first.