Few cents about my commits

AltPods: Versioning changed, v1.56 released

|

There are two major updates regarding AltPods:

  • v1.56.0 was released to Maven Central.
  • The approach to versioning has changed.

Breaking Changes: Migration from bundle versions to individual pod versions

Previous drawbacks:

  • A single version number was used for all modules within an alt-pod release. For example, alt-pods v1.56.0 contained Firebase Crashlytics v1.56.0, even though the actual bindings corresponded to 12.7.0.
  • All modules were released under the new alt-pods version, even if no changes were made to them.
  • Incompatible binding versions were sometimes grouped under a single alt-pods umbrella (e.g., an ads library might not be compatible with the Google Ads mediator if the latest version wasn’t available yet).

What has changed:

  • Each module now has its own version built from the binary version. For example, if SomeFramework is vA.B.C, the pod version will be vA.B.C.0. The .0 suffix allows for future patch versions.
  • Each module is now independent and can be deployed separately.
  • There is no longer a need to deploy pods that haven’t received updates.
  • Snapshot versions will no longer be used for periodic updates. Only new frameworks currently under testing might be deployed as snapshots.

The artifacts for v1.56.0 have already been deployed under their own independent versions to Maven Central and are ready for testing.
The upcoming v1.57.0 delivery is a work in progress, as it requires script adaptations, but it is expected to be available for testing later this week.

View the migration source code on GitHub

Please open an issue if you encounter any bugs.

AltPods: pods updated - 1.56.0-SNAPSHOT

|

AltPods v1.55.0 were released to Maven central.
New scan performed to sync with recent releases and available for testing as v1.56.0-SNAPSHOT.

Updated pods (ones with API changed)

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

AltPods: pods updated - 1.55.0-SNAPSHOT

|

AltPods v1.54.0 were released to Maven central. New scan performed to sync with recent releases and available for testing as v1.55.0-SNAPSHOT.

Updated pods (ones with API changed)

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

ObjC interop: state lost - concurrency issues under heavy duty load

|

As continue of investigating deadlock:

Thread #17 also displays strange stacktrace that normally should not happen:

  • native(ObjC code) calls [myObject description];
  • tries to marshal pointer(handle) to Java object in toObjCObject;
  • it doesn’t find it in peer map and creates new Java instance/wrapper using ObjCObject.createInstance.

What is completely wrong here:

ObjC interop: deadlock — concurrency issues under heavy load

|

Due to a deadlock, a synchronization object in ObjC-related code became unavailable, causing the application to hang while trying to acquire a lock on it. It could also crash if the garbage collector (GC) was involved at that moment:

[ERROR] android.System: com.example.TestObject.finalize() timed out after 10 seconds
[ERROR] android.System: java.util.concurrent.TimeoutException: com.example.TestObject.finalize() timed out after 10 seconds
    at org.robovm.objc.ObjCObject$ObjectOwnershipHelper.release(ObjCObject.java:525)
    at org.robovm.objc.ObjCRuntime.void_objc_msgSend(Native Method)
    at org.robovm.apple.foundation.NSObject.release(NSObject.java:228)
    at org.robovm.apple.foundation.NSObject.doDispose(NSObject.java:212)
    at org.robovm.objc.ObjCObject.dispose(ObjCObject.java:148)
    at org.robovm.objc.ObjCObject.finalize(ObjCObject.java:135)
    at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:172)
    at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:155)
    at java.lang.Thread.run(Thread.java:869)

Getting the stack traces

AltPods: pods updated - 1.54.0-SNAPSHOT

|

AltPods were updated to v1.54.0-SNAPSHOT to sync with recent releases.

Updated pods (ones with API changed)

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

Tracking slipped NPE, but in Crashlytics v11.15.0

|

Few months since last Tracking slipped NPE and here we go again:

  • same user reported;
  • same scenario (code that handles a lot of NPE in try/catch);
  • this time with Crashlytics.

Time for dissection…

Debugger: "Could not initialize class" when running debug build

|

There was a report in MobiVM matrix channel for crash that is happening only during running under debugger:

java.lang.NoClassDefFoundError: Could not initialize class com.sample.mobile.ios.network.RoboVmNetzwerkStatusController
        at com.sample.mobile.ios.Main.didFinishLaunching(Main.java:208)
        at com.sample.mobile.ios.Main.$cb$application$didFinishLaunchingWithOptions$(Main.java)
        at org.robovm.apple.uikit.UIApplication.main(Native Method)
        at org.robovm.apple.uikit.UIApplication.main(UIApplication.java:442)
        at com.sample.mobile.ios.Main.main(Main.java:314)

TLTR: Fix and workaround

AltPods: pods updated - 1.53.0-SNAPSHOT

|

AltPods were updated to v1.53.0-SNAPSHOT to sync with recent releases.

Updated pods (ones with API changed)

Updates without any API change

  • Google Mobile Ads updated to v12.8.0 -> v12.9.0
  • Firebase updated to v12.1.0 -> v12.2.0
  • UnityAds updated: v4.16.0 -> v4.16.1

  • These pods were pushed to https://central.sonatype.com/repository/maven-snapshots/ maven repo under 1.53.0-SNAPSHOTS version. Source code @github

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

Swift: missing _OBJC_CLASS_$_RvmProduct_PurchaseOption case

|

issue#813 was reported as an issue with storekit2 bindings.

Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘+[missing_RvmProduct_PurchaseOption appAccountToken:]: unrecognized selector sent to class 0x1332748a0’

With comments that simulator works but app fails on real device.
Lets investigate.