Skip to content

Missing Bindings for UIAccessibilityTraits. #735

@sinceredevotion

Description

@sinceredevotion

Issue details

When setting traits of a UIAccessibilityElement, this is the error that I get:

Error: class java.lang.UnsatisfiedLinkError, Optional @globalvalue method org/robovm/apple/uikit/UIAccessibilityTraits.NoneValue()J not bound

Reproduction steps/code

Here is a snippet of code:

UIAccessibilityElement accessibilityElement = new UIAccessibilityElement(iosAccessibility);

    accessibilityElement.setAccessibilityFrame(new CGRect(x, y, width, height));

    if (item.GetName() != null)
        accessibilityElement.setAccessibilityLabel(item.GetName());
    else
        accessibilityElement.setAccessibilityLabel("Default Name");

    if (item.GetDescription() != null)
        accessibilityElement.setAccessibilityHint(item.GetDescription());
    else
        accessibilityElement.setAccessibilityHint("Default Description");

    if (item.GetAccessibilityCode() == item.Get_Libraries_Interface_Item__NOT_ACCESSIBLE_())
        accessibilityElement.setAccessibilityElement(false);
    else
        accessibilityElement.setAccessibilityElement(true);

    UIAccessibilityTraits traits = UIAccessibilityTraits.AllowsDirectInteraction; // The line that is crashing
    accessibilityElement.setAccessibilityTraits(traits);

    // Add the accessibility element to the list
    accessibilityElements.add(accessibilityElement);

    // Inform iOS that the accessibility elements have changed
    UIAccessibilityGlobals.postNotification(UIAccessibilityNotification.LayoutChangedNotification, accessibilityElement);

Configuration

2.3.19

Build Tools:

  • Gradle plugin

Versions:

Please provide the version of RoboVM, XCode and JDK used

  • Robovm: 2.3.19
  • Xcode: 14.3.1
  • JDK: 1.8

Build Targets:
iPhone 14 Pro Max iOS 16.

Stacktrace

//Please provide the stacktrace if applicable 

Error: class java.lang.UnsatisfiedLinkError, Optional @GlobalValue method org/robovm/apple/uikit/UIAccessibilityTraits.NoneValue()J not bound
   file: IOSAccessibility.java,  class: plugins.quorum.Libraries.Interface.Accessibility.IOSAccessibility,  action: Add,  line: 154 
   file: IOSAccessibility.quorum,  class: Libraries.Interface.Accessibility.IOSAccessibility,  action: Add,  line: -1 
   file: Layer2D.quorum,  class: Libraries.Game.Layer2D,  action: Add,  line: 249 
   file: Game.quorum,  class: Libraries.Game.Game,  action: Add,  line: 615 
   file: Main.quorum,  class: ChartTest2,  action: Add,  line: -1 
   file: Main.quorum,  class: ChartTest2,  action: CreateGame,  line: 31 
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions