About iOS Emulators (not Simulators)

70 views
Skip to first unread message

P5music

unread,
Mar 4, 2021, 8:12:13 AM3/4/21
to CodenameOne Discussions
I searched the internet to understand what can be done with iOS simulator and I stumbled upon the concept of iOS emulators, that they exist as far as I understand, also for Windows.
Even an official tool is provided by Apple, it seems:
I have to deepen my knowledge of these things and whether it's free stuff or not, 
but I would like to know what do you think about that

in regard to testing the iOS builds produced by CodenamenOne servers.

Thanks in advance

Dave Dyer

unread,
Mar 4, 2021, 7:31:50 PM3/4/21
to CodenameOne Discussions
If you're talking about testing, rather than debugging, I don't think emulators can
possibly substitute for actual hardware.   Ordinary debugging works pretty well
from the simulator built into eclipse (or netbeans).

OTOH if you're doing "desperation level" debugging of mysterious crashes, it works
to compile from the codename1 sources and use the emulator built into xcode
or a usb connection to a real device.

Shai Almog

unread,
Mar 4, 2021, 11:11:00 PM3/4/21
to CodenameOne Discussions
I'm not aware of any iOS emulators but things might have changed. If you have something in English that might be interesting but only as general knowledge.
Emulators are useless for day-day development. A device is a must have expense for these things. That's true for Android too which does have an emulator.

P5music

unread,
Mar 5, 2021, 2:59:22 AM3/5/21
to CodenameOne Discussions
@Shai Almog
Sorry the link was wrong both because it led to the italian version and it is not relevant for what I am asking.
Please consider this page (I found other ones in search results in fact) which talks about iOS emulators on Windows:
I just want to test the functionality of my CodenameOne app on a reasonably reliable emulator, not performance or debugging or special features, just cross-platform.
For example I could check the mouse events capture in the CEF BrowserComponent.

I have the possibility to test on a real device but via another tester, I would like to test on other Apple models too, and, finally, doing it myself is certainly better.
Regards

Dave Dyer

unread,
Mar 5, 2021, 4:20:09 PM3/5/21
to CodenameOne Discussions
At the level of "makes a picture and does something", any device is a pretty good indicator for all; but the
edges of the envelope where one device works perfectly and another does not are always pretty
close at hand.  Things like memory size, screen size, pixel density, and raw CPU power are wildly variable.
Adding an emulator to the mix of devices you test on won't add a lot.

Shai Almog

unread,
Mar 5, 2021, 11:48:42 PM3/5/21
to CodenameOne Discussions
That link is a SEO spam article that just writes nonsense to get clicks for specific keywords. I'm unfamiliar with most of those things but those I'm familiar with aren't emulators. E.g. the xamarin tool isn't an emulator. They have a tool where you can have a Mac in your office and then effectively debug on it with the simulator and remote screen mirroring. There are a lot of solutions like that out there that even have hosted physical devices in the cloud you can debug/test with.

P5music

unread,
Mar 6, 2021, 3:07:24 AM3/6/21
to CodenameOne Discussions
Maybe that page is well crafted as SEO spam, but it seems that some of those applications are true emulators.
For example appetize.io, it at least can run XCode bundles .app, and maybe it can run any iOS app.
Now I want to further read that article but it would be interesting to hear from you about the emulators from a technical perspective, for examples if the iOS builds from CodenameOne server can run on any of those emulators, or if a bundle could be created also as the build process output to take advantage of similar products.
Regards

Shai Almog

unread,
Mar 6, 2021, 9:17:01 PM3/6/21
to CodenameOne Discussions
I don't know if appetize uses an emulator or is like https://www.perfecto.io/ it doesn't really matter both are semantically the same. We produce an ipa that would work with perfector etc. and should work with anything that runs iOS.

P5music

unread,
Mar 7, 2021, 3:41:20 AM3/7/21
to CodenameOne Discussions
I read somewhere that in certain cases, the ipa file is a zip file that contains
also an .app file, so that it can be extracted and tested on a simulator.
Is it the case for CodenameOne builds too?
If not, could it be in the immediate future?
Regards

Shai Almog

unread,
Mar 7, 2021, 9:37:04 PM3/7/21
to CodenameOne Discussions
The ipa is a zip of an app

P5music

unread,
Mar 8, 2021, 3:13:13 AM3/8/21
to CodenameOne Discussions
Ok the ipa is a zip of an app.
Now let's deal with what I asked:
Is it possible that inside it there is an .app file,
that is
that kind of file that is runnable inside the iOS simulators
like XCode iOS simulator (Mac OS) or Microsoft iOS Simulator (Windows)?

It is not important that the .app file is inside the ipa.
I think that a different command on your Mac server can produce it and make the downloading possible from the dashboard. 
the same that is now for the ipa file.

I know that your paid accounts are different from free ones
but
in this case it's not like having the XCode project
instead 
it is just having
a file that can be loaded into an iOS simulator.
Instead of running on a physical device or an emulator.

Regards

Dave Dyer

unread,
Mar 8, 2021, 1:29:07 PM3/8/21
to CodenameOne Discussions
IOS apps are integrated bundles of executable and other resources. 
The naked executable will fail when it looks for the first external resource
and doesn't find it.

Shai Almog

unread,
Mar 8, 2021, 9:49:33 PM3/8/21
to CodenameOne Discussions
iOS simulator is a completely different target and an x86 platform. I don't understand what you're trying to do.

P5music

unread,
Mar 9, 2021, 2:43:46 AM3/9/21
to CodenameOne Discussions
Yes it is not the original question but
I am saying to create a new CN menu entry "Send build to iOS simulator".
It's matter of having a new command-line compilation script and let the user download the product that is compatible with the iOS simulators.
Regards

Shai Almog

unread,
Mar 9, 2021, 10:25:50 PM3/9/21
to CodenameOne Discussions
How would you run the iOS simulator without a Mac?
What's the purpose of doing this?
You have include source which lets you run in the iOS simulator and debug there: https://www.codenameone.com/how-do-i---use-the-include-sources-feature-to-debug-the-native-code-on-iosandroid-etc.html

P5music

unread,
Mar 10, 2021, 2:00:54 AM3/10/21
to CodenameOne Discussions
As you can read in the above comments, I clearly said that a Microsoft iOS simulator is available
where I think it is possible to load and run the .app file as it is on the Mac and the iOS simulator.

Regards

P5music

unread,
Mar 10, 2021, 4:17:20 AM3/10/21
to CodenameOne Discussions
Update:
please also read my previous post and the new thread

Shai Almog

unread,
Mar 10, 2021, 10:30:03 PM3/10/21
to CodenameOne Discussions
Do you mean the Xamarin one?
That's not an emulator/simulator. Anyway, we don't have plans for that flow and don't have the resources to pick it up.

Dave Dyer

unread,
Mar 12, 2021, 1:23:55 PM3/12/21
to CodenameOne Discussions
I think you overestimate the utility of the free tier; and your partition of capabilities into the
basic and premium tiers is barely tolerable.  I'd love to make more use of codename1 and
less use of your build servers if you made that possible: but you have boxed desktop, javascript,
and offline builds into premium pricing tiers.

Shai Almog

unread,
Mar 12, 2021, 11:44:48 PM3/12/21
to CodenameOne Discussions
You can use the source code to build and always could. Apps like our Uber clone etc. fit well under the 1mb base limit before the increase we did a couple of years ago.
Also the new Maven build will make building offline easier in the free tier. It will also include a partial desktop target (jar executable) not the full installer we have in the server based build which is more challenging but pretty much enough for that.

Dave Dyer

unread,
Mar 13, 2021, 12:09:59 AM3/13/21
to CodenameOne Discussions
It's true you "can" build, but there's no decent interface to do so, and there's no script to go from
producing the sources to a finished apk.  Your build servers are very convenient, but you don't
make that functionality available standalone.

Shai Almog

unread,
Mar 13, 2021, 10:05:21 PM3/13/21
to CodenameOne Discussions
Did you read what I said?
Going from the generated sources to the finished version isn't too hard. You just open them in xcode or in Android Studio and press Play.

Dave Dyer

unread,
Mar 14, 2021, 2:56:27 PM3/14/21
to CodenameOne Discussions
I haven't tried the exercise for android, but for IOS I had to study your source code and cobble together
a very obscure invocation of the code generator.  If it were friendly, there would be a "generate source code for Android"
option, right beside the "send build" option.

Of course, I'm disappointed that codename1 isn't arranged specifically for my benefit, but I understand
your need to have a viable business.

Shai Almog

unread,
Mar 14, 2021, 10:11:33 PM3/14/21
to CodenameOne Discussions
I specifically wrote that we made it simpler in the upcoming maven build. You would be able to convert your ant project to maven and it would be easier to use Codename One without the build servers in that case.

Dave Dyer

unread,
Mar 15, 2021, 2:36:17 AM3/15/21
to CodenameOne Discussions
Thanks, I’ll be watching.  Are there any changes in the availability of desktop and JavaScript builds?

Shai Almog

unread,
Mar 15, 2021, 10:34:11 PM3/15/21
to CodenameOne Discussions
You would be able to build a desktop jar. Not the full Mac/Windows installer build.
As a separate thing we plan to let everyone build a preview version of the JavaScript build. This wouldn't be licensed for redistribution and would have a watermark but you'd be able to see the results.

Dave Dyer

unread,
Mar 16, 2021, 1:41:21 PM3/16/21
to CodenameOne Discussions
Cool.  I imagine my app will be extremely stressful to the js port.
Reply all
Reply to author
Forward
0 new messages