New in version 0.30.0

Released one year ago

Please remember to uno clean your projects after upgrading Fuse.

Highlights
  • New, faster, text renderer, with better support for bidirectional text, ligatures and colored glyphs
  • New, simpler and safer event system for many FuseJS modules, such as Push, GeoLocation and more
  • Major clean-up, deprecating a lot of old stuff. This applies to the legacy iOS / Android bindings, out-dated build targets, importers and more. Please see the Deprecations section for details
  • Each now has Offset and Limit to limit the number of items being displayed
New text renderer

Added a new text renderer, which can be used for Text on both desktop and on device, and for TextInput/TextView on desktop. The renderer is currently disabled by default and can be enabled by building with -DUSE_HARFBUZZ. The new renderer brings the following features:

  • Support for complex text. The new text renderer can handle bidirectional text, ligatures, and colored glyphs.
  • Speed. The new text renderer is normally about 50% faster than the OS-specific text rendering we previously used on mobile devices, and can be up to 10x faster on some devices.
  • Asynchronous loading. Text elements now have an experimental LoadAsync property which, when set to true, enables loading of the text element on a background thread.

Note that the new text renderer currently does not pass Apple's App Store testing. Therefore it should not be used for iOS release builds. This will be fixed in an upcoming Fuse release.

FuseJS event system overhaul
  • The FuseJS modules that use events (GeoLocation, InterApp, LocalNotifications, Push, and Lifecycle) have gotten a new event subscription system. These modules are now instances of a class called EventEmitter, which is based on the API of Node's EventEmitter class. Though the old way remains working, the recommended way to subscribe to events has changed from Module.onSomeEvent = myHandler to Module.on('someEvent', myHandler). With the new event system there's no longer a risk of overwriting the handler that someone else set. There's also several convenience methods like once, observe, and promiseOf. Check out the docs!
Each
  • Added Each.Offset and Each.Limit that allow limiting the number of items being displayed.
  • Fixed issues where certain route transitions would result in multiple active pages. This was a cache error that came up when using embedded Navigator objects and switching to/from the embedded pages.
TextInput
  • Fixed issue where databinding to the same Observable on two different <TextInput/>s could end up in an infinite ValueChanged loop
  • Fixed issue where tapping a <TextInput /> in an area outside the bounds of the text would not focus the <TextInput />
JavaScript implementations
  • Optimised passing Uno byte[]s to and from JavaScript when running on iOS 10 using newly available functionality in the JavaScriptCore framework. The performance of this operation under iOS 10 now more closely matches the other JavaScript engines.
  • Fixed bug in btoa, atob implementation.
  • Fixed issue "Uncaught ReferenceError: setTimeout is not defined" that appeared in some cases.
  • Fixed memory leak in V8 when using HTTP.
FuseJS/Base64 module
  • Exposed functions encodeLatin1 and decodeLatin1.
  • Added decodeBuffer and encodeBuffer functions to decode between ArrayBuffer and Base64
NativeModule
  • Removed SetModuleFunction from the NativeModule interface. Use Module.CreateExportsObject instead.
TcpListener
  • Added Uno.Net.Sockets.TcpListener helper-class for hosting TCP servers. It's a subset of .NETs System.Net.Sockets.TcpListener class, and resolves to that implementation for .NET-targets.
Uno Syntax sugar
  • Three new literal types are added in Uno: Points, pixels & hex color codes.
#000         float3(0,0,0)
#FFFF        float4(1,1,1,1)
#FF0000      float3(1,0,0)
#FF0000FF    float4(1,0,0,1)
24.0px       new Uno.UX.Size(24.0f, Uno.UX.Unit.Pixels)
32.0pt       new Uno.UX.Size(32.0f, Uno.UX.Unit.Points)
Deprecations
Deprecation of Legacy Bindings

Before Foreign Code there was Bindings. The bindings were an attempt to bring Android and iOS functionality into Uno based on the best practices of the time. During the course of the implementation we found many shortcomings with those approaches and this eventually culminated in the creation of Foreign Code (see this medium article for the full story).

Foreign Code has since proved it's worth, it handles all that our Legacy Bindings could and plenty more.

Since January we have put forward Foreign Code as the standard way of interacting with native APIs, and a couple of releases back we officially deprecated the legacy Bindings.

The next release of Fuse will not ship with the legacy Bindings.

While foreign code is the way to go these days we understand that there might still be codebases out there based on the Bindings. If this affects you then feel free to reach out to us, we are happy to offer advice on how you can refactor to foreign code.

Deprecation of build targets

The following build targets will generate a warning if used:

uno build webgl
uno build ffos

We're deprecating build targets based on JavaScript & WebGL exports because our JavaScript backend is no longer maintained. (Note: this has absolutely nothing to do with the use of JS in your mobile apps - that'll still work as before.)

Deprecated packages
  • Quite a few packages and classes have been marked as obsolete. This means that they are still available, but will produce warnings on use. In a future release, these may get removed fully.
  • The packages Fuse.Drawing.Batching, Fuse.Drawing.Meshes and Fuse.Entities, as well as the classes Cube, WireCube, SolidCube, Cylinder and Sphere from Fuse.Drawing.Primitives and Trackball from Fuse.Gestures have been marked as obsolete. This is undocumented code that implement very basic 3D rendering, but haven't been in use for a long time, and is largely unmaintained at this point.
  • Fuse.Drawing.Polygons, Fuse.Drawing.Paths as well as Ellipse, Path, Star and RegularPolygon from Fuse.Controls.Primitives has been marked as obsolete. This is either undocumented code that implement very basic path-rendering, but is known to be broken in many simple cases, and is largely unmaintained at this point.
  • To avoid that new code accidentally starts using the above code in the case where the user doesn't notice or ignores the warnings, Fuse.Drawing.Paths, Fuse.Drawing.Polygons and Fuse.Entities no longer gets forwarded through the Fuse-package. If you're using one of these, you can add these packages manually to your project while transitioning.
Deprecation of importers

The following will now generate a warning if compiled:

import Uno.Array<T>()
import Uno.Buffer()
import Uno.Content.Fonts.FontFace()
import Uno.Content.Fonts.SfdFont()
import Uno.Content.Fonts.SpriteFont()
import Uno.Content.Models.Model()
apply Uno.Content.Models.Model()
import Uno.Graphics.IndexBuffer()
import Uno.Graphics.Texture2D()
import Uno.Graphics.TextureCube()
import Uno.Graphics.VertexBuffer()

These APIs are scheduled for removal in an upcoming release, because we no longer want to maintain dependencies to the proprietary FBX SDK from Autodesk in our core product.