20 Jan 2021
|
fix
swift
Background:
First time issue was reported on gitter
libswiftCoreMIDI.dylib is not found in swift paths
Later it was communicated that workaround doesn’t work during submition to Apple:
ERROR ITMS-90209: “Invalid Segment Alignment. The app binary at ‘SwiftSupport/iphoneos/libswiftCoreMIDI.dylib’ does not have proper segment alignment. Try rebuilding the app with the latest Xcode version.”
Issues:
- RoboVM can detect swift dependencies only in dynamic frameworks. For static libraries/frameworks workaround was introduced.
- Today dynamic framworks might link again runtime swift libraries – these should not be copied to
.app/Frameworks
folder. These dependecies can be observed using otool -L
command:
/usr/lib/swift/libswiftWebKit.dylib (compatibility version 1.0.0, current version 610.1.28, weak)
@rpath/libswiftAVFoundation.dylib (compatibility version 1.0.0, current version 1991.1.1, weak)
there libswiftWebKit.dylib
is from runtime location(and RoboVM can’t copy it) and libswiftAVFoundation.dylib
to be bundled into application (have to be bundled).
Solutions:
12 Jan 2021
|
bro-gen
binding
robopods
altpods
AltPods were updated to v1.14.0-SNAPSHOT to sync with recent releases.
New pods
Updated pods
These pods were pushed to https://oss.sonatype.org/content/repositories/snapshots
maven repo under 1.14.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.
09 Jan 2021
|
fix
@vaaneeunbnd reported an issue at gitter:
I am using GLKMatrix4 as a modelviewmatrix in my robovm app but whenever I try to apply translation to it:
modelViewMatrix.createTranslation(0.0f, 0.0f, -1.0f);
It crashes without a debug log, can someone please help me with this
But diagnostic report contains a crash log:
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000106a416e0
Exception Note: EXC_CORPSE_NOTIFY
VM Regions Near 0x106a416e0:
--> __TEXT 106a18000-106a48000
0 Java_libcore_io_Memory_pokeInt + 11
1 [J]libcore.io.Memory.pokeInt(JIZ)V + 119
2 [j]libcore.io.Memory.pokeInt(JIZ)V[clinit] + 71
3 [j]libcore.io.Memory.pokeInt(JIZ)V[Invokestatic(java/nio/MemoryBlock)] + 14
4 [J]java.nio.MemoryBlock.pokeInt(IILjava/nio/ByteOrder;)V + 184 (MemoryBlock.java:220)
5 [j]java.nio.MemoryBlock.pokeInt(IILjava/nio/ByteOrder;)V[Invokevirtual(java/nio/Dire
6 [J]java.nio.DirectByteBuffer.putFloat(IF)Ljava/nio/ByteBuffer; + 393 (DirectByteBuffer.java
7 [j]java.nio.ByteBuffer.putFloat(IF)Ljava/nio/ByteBuffer;[Invokevirtual(java/nio/Byte
8 [J]java.nio.ByteBufferAsFloatBuffer.put(IF)Ljava/nio/FloatBuffer; + 208 (Byt
9 [j]java.nio.FloatBuffer.put(IF)Ljava/nio/FloatBuffer;[Invokevirtual(org/robovm/apple/glki
10 [J]org.robovm.apple.glkit.GLKMatrix4.createTranslation(FFF)Lorg/robovm/apple/glkit/GLKM
11 [j]org.robovm.apple.glkit.GLKMatrix4.createTranslation(FFF)Lorg/robovm/apple/glkit/GLKM
12 [j]org.robovm.apple.glkit.GLKMatrix4.createTranslation(FFF)Lorg/robovm/apple/glkit/GLKMatrix4;[Invokestatic(com/mycompany/myapp/MyViewController)] + 9
And code that triggered it looks like the bellow:
02 Dec 2020
|
bro-gen
It is a follow up of previous post: bro-gen: static methods and polymorphism.
CocoaTouch was regenerated with updated bro-gen
and it caused 1000+ changes in source code. There are massive supportsSecureCoding()
, getLayerClass()
and also it exposed not available before constructors and APIs.
The changes proposed as PR543 and targeted to 2.3.13 version of RoboVM.
30 Nov 2020
|
bro-gen
There is one binding trick related to inherited class methods/properties in objc code. Polymorphism is not available for static methods in Java and compiler resolves target for static call during compilation time. Following obj-c code and Java binding demostrate the issue:
@interface Abstract : NSObject
+(void) test;
@end
@interface TestObject : Abstract
@end
Corresponding binding:
public class Abstract extends NSObject {
public Abstract() {}
@Method(selector = "test")
public static native void test();
}
public class TestObject extends Abstract {
public TestObject() {}
}
Java call TestObject.test()
will fail while obj-c call [TestObject test]
is not. Root case – static method invocation is resolved compilation time and test()
method is present in Abstract
. This produces Abstract.test()
call that corresponds to obj-c call [Abstract test]
.
The fix
Is to copy all static methods/properties from super-classes/protocols into target class. Bro-gen script was updated to do this automatically.
05 Nov 2020
|
bro-gen
binding
robopods
altpods
AltPods were updated to v1.13.0-SNAPSHOTS to sync with recent releases.
New pods
Updated pods
These pods were pushed to https://oss.sonatype.org/content/repositories/snapshots
maven repo under 1.13.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.
23 Oct 2020
|
whatsnew
Available at Idea Marketplace (for AndroidStudio as well), also IDE plugins are available for download.
2.3.11: What’s new
Mostly maintenance release:
- fixed: ios14 device session hang (restart didn’t work) PR520
- fixed: debugger session hang if class was loaded during stepping PR521
2.3.12-SNAPSHOT:
Includes functionality currently in testing:
- iOS14 bindings PR515
- support for entitlements for Simulator target PR535
Installing SNAPSHOT from custom plugin repository
In settings dialog:
- select
Manage Plugin Repositories
;
- add
https://dkimitsa.github.io/assets/mobivm-snapshot.xml
for installing the latest snapshot;
Then switch to Market place
search for MobiVM
;
Happy coding!
Please report any issue to tracker.
19 Oct 2020
|
idea
workaround
tutorial
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
;
08 Oct 2020
|
bro-gen
binding
robopods
altpods
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.
06 Oct 2020
|
runtime
libcore10
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:
- build from source code
- Download pre-build Idea plugin from Releases section of smoke-test repository and install manually;
- 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;