Skip to content

Releases: ruby-native/gem

v0.10.20

Choose a tag to compare

@joemasilotti joemasilotti released this 14 Jul 20:07

Added

  • @ruby-native/react and @ruby-native/vue now ship TypeScript declarations. Importing a component gives you autocomplete and prop checking with no @types package to install; NativeIcons, NativeButtonPosition, and NativeHapticFeedback are exported as types. The declarations are generated from the package source at publish, so they can't drift from the components.
  • Pop the navigation stack from React and Vue with NativeBackButton. The counterpart of native_back_button_tag: renders a chevron unless given children, and forwards extra props to the underlying button.
  • Check the current platform from React and Vue with nativePlatform(). Returns "ios", "android", or null on the web, matching the native_platform Rails helper.
  • File links now open in-app in QuickLook instead of ejecting to a logged-out browser. A PDF, image, or other attachment opened by a link tap or window.open used to open a session-less browser showing a login screen; it now downloads with the app's session and previews in QuickLook. Covers link taps and window.open in Normal Mode and window.open in Advanced Mode. iOS only.

Fixed

  • Normal Mode no longer crashes on popups that open a non-web URL. A window.open targeting a mailto:, tel:, or auth-provider scheme (like a Sign in with Apple popup) crashed the app because the in-app browser rejects non-http(s) URLs; these now hand off to the system handler while web URLs still open in the in-app browser. iOS only.

v0.10.14

Choose a tag to compare

@joemasilotti joemasilotti released this 03 Jul 21:17

Added

  • Configure how push finds the signed-in user with RubyNative.current_user_resolver. Defaults to current_user; set it to a method name or a callable like -> { Current.person } so apps that expose the current user another way don't need a current_user alias just for push.

Changed

  • Inline navbars now read with <%= in ERB. The navbar and menu builder methods return a blank string, so <%= navbar.button %> renders nothing extra and passes erb_lint, which flags a bare <% call as an unused expression. Existing <% usage still works.

Fixed

  • Microphone capture now actually starts on Android. getUserMedia cleared the permission but failed with NotReadableError because the app didn't declare MODIFY_AUDIO_SETTINGS, which Chromium's WebView needs to open the audio device. Apps that opt into the microphone now declare it. Applies to both Normal and Advanced Mode.
  • The file-input camera option now works in Advanced Mode on Android. Tapping Camera in a file picker silently did nothing because the app declared CAMERA but never requested it at runtime; the picker now requests the camera permission first, matching the getUserMedia flow.

v0.10.12

Choose a tag to compare

@joemasilotti joemasilotti released this 02 Jul 16:04

Added

  • Add segments to the navigation bar with navbar.segment. Render up to a few segmented buttons in the bar to switch between closely related pages (iOS only for now); mark the current page's segment selected. Switching segments replaces history instead of stacking it, so the back button doesn't step through the switches.

Fixed

  • Microphone and camera capture now work in Advanced Mode on Android. Web getUserMedia requests were silently denied with no permission prompt; they now request the native runtime permission and grant the web view, matching Normal Mode and iOS.
  • native_version now reports the real version in Android apps. The Android User-Agent hardcoded the version, so the helper always returned 0.1.0; it now reflects the installed build, matching iOS.
  • Advanced Mode tab bar no longer has extra padding below it on Android. The gesture inset was applied twice, leaving an empty band beneath the tab labels; it now sits flush against the gesture bar, matching Normal Mode.

v0.10.11

Choose a tag to compare

@joemasilotti joemasilotti released this 26 Jun 19:28

Added

  • Add a launch splash screen on iOS with appearance.splash. Set enabled: true to show your launch icon and background_color with an activity indicator until the first screen loads, instead of flashing to a blank web view.

v0.10.10

Choose a tag to compare

@joemasilotti joemasilotti released this 26 Jun 16:32

Added

  • Brand the navigation bar with appearance.navbar. Set a centered logo, bar background_color/foreground_color, and a status_bar style (light/dark) to brand the bar across the whole app; the logo replaces the page title on every screen.
  • config/ruby_native.yml is now evaluated as ERB. Interpolate Rails helpers into your config, most usefully logo: "<%= image_url('logo.png') %>" so the navbar logo points at a fingerprinted asset the app downloads once and caches.

Fixed

  • Advanced Mode tab bar icons now render on Android. Configured Material Symbols (icons.android) previously fell back to a blank placeholder for all but a few names; each tab now draws its icon, matching Normal Mode and iOS.

Changed

  • Tab labels now always show in Advanced Mode on Android. With four or more tabs, Android hid the label on unselected tabs; every tab now shows its title, matching iOS and Normal Mode.

v0.10.9

Choose a tag to compare

@joemasilotti joemasilotti released this 25 Jun 17:07

Added

  • navbar.share_button adds a native share button to the nav bar. Tapping it opens the iOS share sheet for the current page, or a custom url:.

Fixed

  • Muted background videos no longer force fullscreen on iOS. Web views now enable allowsInlineMediaPlayback, so playsinline video plays inline in both Normal and Advanced Mode.
  • [data-native-app] is now reliably set on Android in Normal Mode. The marker applies at document start, matching iOS, so CSS keyed to it (like .native-hidden and the safe-area inset fallbacks) takes effect.
  • Microphone and camera capture (getUserMedia) now works on Android. Media requests bridge to a native runtime permission instead of being silently denied, matching iOS; opt in per app with the usage descriptions in your app settings.

v0.10.8

Choose a tag to compare

@joemasilotti joemasilotti released this 22 Jun 22:22

Added

  • The native error and offline screens are now customizable and localized. Set per-state icons (offline for no connectivity, generic for any other load failure) in config/ruby_native.yml under errors:, using the same icon:/icons: form as tabs, and put title, message, and shared retry copy in your app's own locale files under the ruby_native.errors.* namespace. Copy follows the device language and falls back to bundled English, so you override only what you want.

v0.10.6

Choose a tag to compare

@joemasilotti joemasilotti released this 16 Jun 20:35

Fixed

  • The floating action button and native nav bar now render in apps without a tab bar. When config/ruby_native.yml had no tabs: section, the iOS bridge only reported native signals on pages that declared a tab bar, so a tab-less app's FAB and nav bar never appeared. The bridge now reports whenever any native signal is present (FAB, nav bar, form, or push), and the Normal Mode FAB anchors to the bottom safe area when there is no tab bar to sit above.
  • A presented modal no longer removes the Advanced Mode FAB. Opening a modal (a /new or /edit screen) whose page declared no FAB tore down the underlying tab's FAB, and dismissing the modal did not bring it back. The FAB is now keyed to the tab's own web view, so a modal session can no longer remove it.

v0.10.4

Choose a tag to compare

@joemasilotti joemasilotti released this 12 Jun 19:28

Changed

  • Relaxed the jwt dependency to >= 2.0, < 4 so apps on jwt 3 (for example, anything using Intercom's JWT helper) can install the gem. The previous ~> 2.0 pin forced a resolution conflict. The Apple IAP webhook decoder now passes algorithms: ["ES256"], which behaves identically on jwt 2 and 3.

Fixed

  • The native tab bar no longer resets to the first tab during SPA navigation. Inertia and Turbo briefly drop the data-native-tabs element on each page change; the iOS Normal Mode runtime now debounces the signal to ignore the transient drop.
  • The floating action button (native_fab_tag) now follows the visible tab. In tab-based apps it could vanish when you returned to its tab and then stick on every tab after a pull-to-refresh, in both Advanced and Normal Mode.
  • The Advanced Mode navbar submit button keeps its enabled state after a form submit in another tab. A background tab reloading could repoint the navbar.submit_button disabled toggle and leave the visible form's button stuck.

v0.10.3

Choose a tag to compare

@joemasilotti joemasilotti released this 06 Jun 18:38

Fixed

  • Advanced Mode navbar buttons now appear on the first paint after a modal dismisses. When a modal's form redirected to a new screen, the destination's buttons were dropped until a manual pull-to-refresh because the view controller wasn't on screen when the signal arrived. The navbar now retries briefly until the screen settles.
  • OAuth callback paths in auth.oauth_paths no longer trip a native sign-in loop. Listing a provider's callback next to its authorize path made the iOS app treat the callback as a sign-in entry point and loop. The gem now drops any callback that duplicates a listed authorize path and warns; list only authorize paths.