Few cents about my commits

RoboVM and AndroidStudio 4.1

|

Dealing with Android Studio always tricky, v4.1 brings another set of issues to solve.

Installing the plugin

2.3.10 is available in JetBrains marketplace and can be installed directly from plugin settings dialog. But due wrong configuration it is not visible in Android studio. There are few options for Android studio:

Install manually

Download .zip file from MobiVM site and use Install Pluging From Disk... option.
Important: Safari will automatically unpack .zip file, it should be downloaded without unpacking and installed as .zip!

Install from custom plugin repository

These custom repositories point to files located at MobiVM site.
In settings dialog:

  • select Manage Plugin Repositories;
  • add https://dkimitsa.github.io/assets/mobivm-release.xml for installing the latest release;
  • or add https://dkimitsa.github.io/assets/mobivm-snapshot.xml for installing the latest snapshot;

Then switch to Market place search for MobiVM;

Not working RoboVM/New Project(Module) menu

AltPods: pods updated - 1.12.0-SNAPSHOT

|

AltPods were updated to v1.12.0-SNAPSHOTS to sync with recent releases.

Updated pods

These pods were pushed to https://oss.sonatype.org/content/repositories/snapshots maven repo under 1.12.0-SNAPSHOTS version. Source code @github

Updates are not fully tested, please open issue if bug found.

NB: AltPods – are robopods kept at my personal standalone repo. This is done to prevent main robopods repo from turning into code graveyard. As these pods have low interest of community and low chances to be updated.

Libcore 10: Java Runtime from Android 10

|

RoboVM is currently using runtime from Android 4.4 and it is being a pain for a long time due lack of Java 8 classes such as stream and outdated native components (like OpenSSL). Long term solution would be migration to JDK15+ but it would require updating compiler to understand Java language level 9+. For now biggest problem is DynamicInvoke support as RoboVM doesn’t implement it and uses simplified RetroLambda approach. Issue 514 inspired to quick test a possibility. It was way simpler that migrate to JDK base and took only month to get working minimal vitable product.

Libcore 10 overview

Highlights:

  • Same as Android 10 Runtime library;
  • NIO2, Streams and other Java8 API;
  • OpenSSL replaced with BoringSSL that enables TLS1.3;

What is missing

RoboVM native VM implementations (Android 4.4 based) and Android 10 have lot of differences and lot of things are not compatible. Quickes way was to minimize amount of changes in VM.
Process was simplified by using RoboVM’s core classes such as:

  • java.lang.Class;
  • java.lang.Object;
  • java.lang.Thread;
  • java.lang.ClassLoader;
  • and few more (21 in total);

These classes might not provide recent Android 10 API and modern functionality (like compressed Strings). Probably each of these will be reviewed and reverted in future.

What is working

Currently it as tested with basic code for both Console MacOSX and iOS.
Sample test code was deployed to repository robovm-libcore10-smoketest.

Test builds and updates

Code was modified a bit to not conflict with production builds:

  • version set to 10.0.xx;
  • it will use ~/robovmx/cache folder for produced .o files;

Builds will be deployed to release section of robovm-libcore10-smoketest repository. Please check that repository for future updates and fixes.

There are several options to get test build:

  1. build from source code
  2. Download pre-build Idea plugin from Releases section of smoke-test repository and install manually;
  3. Setup Custom plugin repository as described by link:
  • add repository: https://dkimitsa.github.io/assets/updatePlugins.xml as custom plugin repository in Idea, and then enter `` and install from there.
  • in marketplace’s search bar enter repository: https://dkimitsa.github.io/assets/updatePlugins.xml;
  • install RoboVM - Libcore 10 plugin from there.

Issue reporting

Please open the issue in the tracker of robovm-libcore10-smoketest repository;

AltPods: pods updated - 1.11.0-SNAPSHOT

|

AltPods were updated to v1.11.0-SNAPSHOTS to sync with recent releases. Part of list didn’t receive any API update hovewer bindings were re-generated against recent version of frameworks. Update list look as bellow:

New pods

Updated pods

These pods were pushed to https://oss.sonatype.org/content/repositories/snapshots maven repo under 1.11.0-SNAPSHOTS version. Source code @github

Updates are not fully tested, please open issue if bug found.

NB: AltPods – are robopods kept at my personal standalone repo. This is done to prevent main robopods repo from turning into code graveyard. As these pods have low interest of community and low chances to be updated.

RoboVM 2.3.10 release

|

Available at Maven and IDE plugins are available for download.

Known issues

Release requires Xcode 11.4+, if running previous one following error is expected:

[ERROR] Undefined symbols for architecture arm64:
[ERROR]   "___darwin_check_fd_set_overflow", referenced from:

What’s changed

  • support for iOS14 devices
  • iOS13.6 bindings
  • build system updated to work on recent JDK versions (was working only on JDK8)
  • compiler: generic class arguments and @Block parameters pr419
  • compiler: support for non-static @Bridge method in enums classes pr420
  • compiler: support for @Block member in structs pr421
  • fixed: compilation failed on @Bridge annotate covariant return synthetic method pr422
  • Support for Struct.offsetOf in structs pr431
  • workaround for missing objc classes(ObjCClassNotFoundException) pr442
  • added: experimental and formal bitcode support, pr443
  • fixed: error code -34018 when using Security API on simulator: pr447
  • idea: fixed: annoying Android gradle faced #242
  • idea: migrated to gradle build system
  • idea: “no Xcode dialog” is not blocking anymore pr434
  • idea: disabled generate separate IDEA module per source set pr449
  • debugger: various crash fixes (more stable now)
  • added: workaround to support static libraries that use swift pr474
  • added: frameworkPath/extensionPath can be qualified (temporal support for xcframeworks) pr484
  • fixed: OOM on class with huge number of fields pr485
  • new icons for Idea plugin !

Other notes

Idea plugin now is a .zip file and Safari will unpack it (by default) which will make it not functional. It has to be downloaded as .zip file and installed using .zip file, not with .jar file inside zip/unpacked folder.

Happy coding! Please report any issue to tracker.

iOS 14 bindings preview (beta6)

|

iOS 14

Bindings have been proposed as PR515.
All CocoaTouch APIs were processed based on Xcode12 BETA 6.
This update introduces changes to existing api and this might break existing code. Please open issue/communicate any problem.
Beside existing API update it introduces support for following new frameworks:

  • UniformTypeIdentifiers
  • Accessibility
  • AppClip
  • AppTrackingTransparency
  • ClockKit
  • MediaSetup
  • MetalPerformanceShadersGraph
  • MLCompute
  • NearbyInteraction
  • OSLog
  • ScreenTime
  • SensorKit
  • WidgetKit
  • DeveloperToolsSupport

AltPods: pods updated - 1.10.0-SNAPSHOT

|

AltPods were updated to v1.10.0-SNAPSHOTS to sync with recent releases. Part of list didn’t receive any API update hovewer bindings were re-generated against recent version of frameworks. Update list look as bellow:

Updated pods

These pods were pushed to https://oss.sonatype.org/content/repositories/snapshots maven repo under 1.9.0-SNAPSHOTS version. Source code @github

Updates are not fully tested, please open issue if bug found.

NB: AltPods – are robopods kept at my personal standalone repo. This is done to prevent main robopods repo from turning into code graveyard. As these pods have low interest of community and low chances to be updated.

fix 509 + tutorial: how to generate icudt51l from source

|

issue 509 says that Collator api fails. Short investigations shows that the root case is missing files for collator/normalizer in icu.dat. Simple solution for user is to generate user files and use it as part of application. But icu data customizer is not available anymore online and python scripts for customization are not available for old v51.
icu.dat was built manualy and delivered as PR510. Steps how to do it described bellow.

Tutorial. Building icu.dat from sources

fix: JNI_OnLoad case

|

Subsurfer reported several issues related to JNI. Quick test exposed two issues:

Issue 1

JNI FindClass was not successful when was called from JNI_OnLoad (as result of System.loadLibrary for example) root case: top java class on the stack was java.lang.Runtime and its classLoader was NULL (corresponds to BootClassLoader). As result user class was looked in BC list and failed. fix: use systemClassLoader in case as top java class is BC class. issue is similar to robovm/robovm#352

Issue 2

If application uses a dynamic framework or library that exposes JNI_OnLoad it being called in context of application image. This happens as dyld loads all symbols from libraries referenced by LC_LOAD_DYLIB command. as result library JNI_OnLoad got called on early state while JNI is not initialized yet. This caused GPF due null pointer de-reference. fix: ignore JNI_OnLoad for application image

Fix was delivered as PR507.

AltPods: pods updated - 1.9.0-SNAPSHOT

|

AltPods were updated to v1.9.0-SNAPSHOTS to sync with recent releases. Part of list didn’t receive any API update hovewer bindings were re-generated against recent version of frameworks. Update list look as bellow:

New frameworks

Updated pods

Other changes

  • FIRCrashlytics.registerDefaultJavaUncaughtExceptionHandler that acts similar to same method in NSException but convert stack traces to FIRExceptionModel (check post for details)

These pods were pushed to https://oss.sonatype.org/content/repositories/snapshots maven repo under 1.9.0-SNAPSHOTS version. Source code @github

Updates are not fully tested, please open issue if bug found.

NB: AltPods – are robopods kept at my personal standalone repo. This is done to prevent main robopods repo from turning into code graveyard. As these pods have low interest of community and low chances to be updated.