Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: Some General advice on how to move forward. ios and Tokyo



Permlink Replies: 11 - Last Post: Jan 25, 2018 5:26 AM Last Post By: Richard Stevens
Keith Marbach

Posts: 69
Registered: 8/21/01
Some General advice on how to move forward. ios and Tokyo
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 11, 2018 10:55 AM
Any pointers very much appreciated...

I have a few android apps that work well enough compiled using Berlin 10.1. My company now wants those apps on ios.

Q1 - Will I be able to do this using Tokyo? What are the pitfalls? Any white papers or in depth sources of info?
Q2 - Should I expect my android versions to recompile and run well under Tokyo? Same need for documentation/examples.
Q3 - I would like to understand FMX Styles and the Stylebook but haven't found any good tutorials. Can you point me to one?

Thanks for any feedback.

Keith Marbach
Brian Hamilton ...

Posts: 556
Registered: 10/14/04
Re: Some General advice on how to move forward. ios and Tokyo
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 12, 2018 4:43 PM   in response to: Keith Marbach in response to: Keith Marbach
Keith Marbach wrote:
Any pointers very much appreciated...

I have a few android apps that work well enough compiled using Berlin 10.1. My company now wants those apps on ios.

Q1 - Will I be able to do this using Tokyo? What are the pitfalls? Any white papers or in depth sources of info?
Q2 - Should I expect my android versions to recompile and run well under Tokyo? Same need for documentation/examples.
Q3 - I would like to understand FMX Styles and the Stylebook but haven't found any good tutorials. Can you point me to one?

Thanks for any feedback.

Keith Marbach
you can use compiler directives for iOS , i.e so same code base
the latest update and patch is OK for Android from what I understand
Francisco Peris

Posts: 91
Registered: 1/5/15
Re: Some General advice on how to move forward. ios and Tokyo
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 15, 2018 2:08 PM   in response to: Keith Marbach in response to: Keith Marbach
Considering my experience, you will not have any big problem.

The idea of Firemonkey is doing that.

In my apps, for example, I have to take care of the locations of the files that the app is reading/writing, tat are different for each platform. So you have to use the compiler directives to specify the different locations.

The rest of the code is very common.

You will enjoy a lot!
Robert [NL] Mit...

Posts: 100
Registered: 5/23/04
Re: Some General advice on how to move forward. ios and Tokyo
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 16, 2018 2:57 AM   in response to: Keith Marbach in response to: Keith Marbach
Q1 - Will I be able to do this using Tokyo? What are the pitfalls? Any white papers or in depth sources of info?

Yes, you will.
The important pitfall is the effort needed to set up certificates and profiles for iOS. You can't blame Embarcadero for this, it is mainly an Apple thing.
It is important to make good notes of which certificates and profiles you have made, since they will expire after a year or so, and than you have to do the proces all over again.
Also you need a Mac machine to deploy iOS apps.
The first time I was really supprised that my original FMX Android app was also running quite well on iOS.

Q2 - Should I expect my android versions to recompile and run well under Tokyo? Same need for documentation/examples.

I did my migration some weeks ago (I waited for 10.2.2) and it did well. Only an issue for TTabControl which I could work around.

Q3 - I would like to understand FMX Styles and the Stylebook but haven't found any good tutorials. Can you point me to one?

I hardly use them anymore. They are complex and badly documented.
Richard Stevens

Posts: 52
Registered: 5/1/00
Re: Some General advice on how to move forward. ios and Tokyo
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 16, 2018 2:10 PM   in response to: Robert [NL] Mit... in response to: Robert [NL] Mit...
Q3 - I would like to understand FMX Styles and the Stylebook but haven't found any good tutorials. Can you point me to one?

I hardly use them anymore. They are complex and badly documented.

Agree completely with this. You can do a perfectly good interface without having to use styles that will look fine on ios and Android.
Keith Marbach

Posts: 69
Registered: 8/21/01
Re: Some General advice on how to move forward. ios and Tokyo
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 23, 2018 6:01 PM   in response to: Robert [NL] Mit... in response to: Robert [NL] Mit...
Robert [NL] Mittendorff wrote:
Q1 - Will I be able to do this using Tokyo? What are the pitfalls? Any white papers or in depth sources of info?

Yes, you will.

To be clear, you are saying that with Tokyo 10.2.2 I should be able to create and deploy android apps that are stable? My initial experience with Tokyo, even with latest update, is that it is not good with screen rendering of many things.

Secondly, I have (finally) had success deploying to iphone (5s) and ipad (ios 9.x). I used:

Berlin update 2
Mac Sierra (not High Sierra)
The Emb patch for PAServer on Sierra
xcode 7.3

The ios version generates access violations just from trying to enter into an edit field, or scrolling a tscrollbox... nothing that makes any sense, or that I can trace back to my code.

So my question is, what versions of Delphi, MacOS, xcode and other software should I be using? A knowledgeable and proven answer to that question would be worth a lot, and save me and others from very much wasted time with software versions that don't work well together or are just downright buggy.

Thanks for the feedback, it might just save one man's sanity :)
Richard Stevens

Posts: 52
Registered: 5/1/00
Re: Some General advice on how to move forward. ios and Tokyo
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 24, 2018 1:55 AM   in response to: Keith Marbach in response to: Keith Marbach
So my question is, what versions of Delphi, MacOS, xcode and other software should I be using? A knowledgeable and proven answer to that question would be worth a lot, and save me and others from very much wasted time with software versions that don't work well together or are just downright buggy.

Keith, for what it's worth:

I predominately develop apps for ios, but find Android convenient and easier for testing during development. We do test on ios of course, but if you want to quickly see how it looks on an actual device, running it on an Android phone is just a little quicker, particularly if I'm tinkering with something at home when I don't have a Mac to hand.

I am still on Berlin Update 2 for now, with XCode 8.2 on the Mac. This works fine for all ios versions so far, and I find it a mostly stable environment.

But... Berlin is now getting on for 2 years old, and I know before long that the newer versions of ios and Xcode won't be supported for it. I have kept one eye on Tokyo and have to say that I'm disappointed that, coming up to a year after development, there still seem to be some reported issues with FMX on it. The reports seem to me to be predominately on the Android side of things - not aware of significant ios bugs.

I have Tokyo installed in a VM and I'm going to try to deploy one of my ios apps from it in the next few days. I'll report back.

I should also say the feedback on my apps (which are internal business apps) has been very positive and overall I like the Delphi Mobile experience very much. If Embarcadero were just a little bit better on quality, and considerably faster at getting hotfixes out, I would have no reservations at all. But as it is - there's always that faint feeling of anxiety that one day we're going to get really left in the lurch for a long time.

Regards
Richard

Edited by: Richard Stevens on Jan 24, 2018 2:16 AM
Robert [NL] Mit...

Posts: 100
Registered: 5/23/04
Re: Some General advice on how to move forward. ios and Tokyo
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 24, 2018 6:04 AM   in response to: Keith Marbach in response to: Keith Marbach
I use Delphi 10.2.2, PAServer 10.2.1.10, XCode 9.2, macOS Sierra (MacinCloud).

I've already got my app (15.000 lines, 15+ forms, 50+ frames) stable (enough) under Delphi Berlin. When I migrated to Tokyo 10.2.2 last month, I had only few problems to get it also work under Tokyo.
The app is now running some weeks in production (Android and iOS) with a couple of 100 users and I did not get complaints sofar.

But yes, Delphi/Firemonkey is far from perfect. Since I started developping FMX with XE8 two years ago, I have put several components on my black list, because they were too buggy. I use now alternatives for my specific needs, or I just do not use them at all. Maybe Embarcadero has impproved them by now, I didn't check, I now use my alternatives.

So it is not easy to give you an absolute answer, it strongly depends on what components you use and how you handle things.

Regarding screen rendering, I don't have problems with it. Maybe you can create a new post with more details, so we can have a closer look.
I use TEdit in my app, but I don't use the buildin keyboard. I've developped my custom keyboard. No problems with that.
I use TVertScrollBox a lot, no problems with them (if you add controls to them dynamically, remember to do it to the Content property, not directly to the scrollbox itself, that was my pitfall when I start using them).

Edited by: Robert [NL] Mittendorff on Jan 24, 2018 6:20 AM
Keith Marbach

Posts: 69
Registered: 8/21/01
Re: Some General advice on how to move forward. ios and Tokyo
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 24, 2018 7:43 AM   in response to: Robert [NL] Mit... in response to: Robert [NL] Mit...
I use Delphi 10.2.2, PAServer 10.2.1.10, XCode 9.2, macOS Sierra (MacinCloud).

Thank you Richard and Robert! Do you deploy only 64 bit on ios? And which version of ios? And do you know if Berlin will work with xcode 9.2?

I'm new to ios and some things I read worry me... for one, I've read that if your app spends too much time processing something that the app might be forced closed. So the recommendation is to run things in background threads, which I've tried but never seem to get them to work right, main problem being simultaneous access to an sqlite database from thread and from the main app.

Another thing I've read is that apple is pushing everything to ipv6. I'm not familiar with that, I've only ever lived in ipv4.

Also 32-bit is no longer supported. Hence my question about if you deploy only 64 bit for ios.

My app allows users to take photos and submit them to our server. I'm using datasnap server for now.

On android I feel like I have a good chance to get a stable app working, but on ios I'm not so sure. I sincerely appreciate you taking the time to provide feedback like this.

Keith
Richard Stevens

Posts: 52
Registered: 5/1/00
Re: Some General advice on how to move forward. ios and Tokyo
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 25, 2018 12:36 AM   in response to: Keith Marbach in response to: Keith Marbach
Thank you Richard and Robert! Do you deploy only 64 bit on ios? And which version of ios? And do you know if Berlin will work with xcode 9.2?

Yes, deploy to 64 only. Pretty sure Berlin would work with 9.2 but as I said I'm still on 8.2

Note that despite what it says here, I can produce apps that work fine on ios11 (I'm using ios 10.2 SDK): http://docwiki.embarcadero.com/PlatformStatus/en/Main_Page

I'm new to ios and some things I read worry me... for one, I've read that if your app spends too much time processing something that the app might be forced closed. So the recommendation is to run things in background threads, which I've tried but never seem to get them to work right, main problem being simultaneous access to an sqlite database from thread and from the main app.

Not had a problem with this, but I would say make sure your app does as little as possible on startup - I have had apps closed if they're doing too much early on, ie. before the main screen shows.

The biggest challenge with ios is the murky swamp of provisioning profiles, distribution certificates, keychains etc that I only briefly understand for a few minutes every now and again and then it slips away. Make sure you have at least two Macs, as when you get one that's working you won't want to mess with it - you can then use the other for testing new versions etc.

Richard
Keith Marbach

Posts: 69
Registered: 8/21/01
Re: Some General advice on how to move forward. ios and Tokyo
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 25, 2018 5:24 AM   in response to: Richard Stevens in response to: Richard Stevens
The biggest challenge with ios is the murky swamp of provisioning profiles, distribution certificates, keychains etc that I only briefly understand for a few minutes every now and again and then it slips away. Make sure you have at least two Macs, as when you get one that's working you won't want to mess with it - you can then use the other for testing new versions etc.

In 2015 I waded through the Mac/xcode/provisioning/etc swamp and was able to make apps that worked for about 5 iphones where I work. So I got through that with my friend Frodo. Got through it again over the last 2 weeks, and deploying on 2 different ios devices, but the both just crash often and randomly. No 3rd party components. No threading. SQL lite database for synchronous access only. There is some serious memory overwrite/exception but I have no idea how to track it down.

I will keep reading and watching threads to see if I can figure it out. I've told people at work I cannot do this now , lack of s upport from Emb and not eno ugh examples of others with success stories. but I sure would like to come thro ugh with t his.

Thanks again for your feedback.
Richard Stevens

Posts: 52
Registered: 5/1/00
Re: Some General advice on how to move forward. ios and Tokyo
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 25, 2018 5:26 AM   in response to: Keith Marbach in response to: Keith Marbach
I've not used SQLite. All my data storage on the phones has been with TClientDatasets, which are more limited but I'm very comfortable with them and - touch wood - they've worked well.

Richard
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02