This minor release focuses on all around performance improvements in iOS and Android.
Please note that some of the changes in the new framework require manual migration. Please take the steps outlined in the following sections for migration.
AsyncTask can be used in cases where UI thread can cause performance issues. AsyncTask creates a different thread to overcome this.
Performance of Router & Navigator is improved. Now, there is no need to require a page when it's being added to the Router (or a Navigator instance). This eliminates the overhead of the require method.
SF-core 3.0.2 to 3.1.0 Migration Guide
Page will be "require"d in the background when Router.go or myNavigator.go runs.
Before version 3.1.0JavaScript
Router.add("page1", require("./pages/page1"));Router.go("page1");var myNavigator = new Navigator();myNavigator.add("page2", require("./pages/page2"));myNavigator.go("page2");
On or After version 3.1.0JavaScript
// Absolute path must be givenRouter.add("page1", "pages/page1");Router.go("page1");var myNavigator = new Navigator();myNavigator.add("page2", "pages/page2");myNavigator.go("page2");
Minimum supported iOS and Android versions versions are updated as specified in our previous release notes. Please keep an eye on the release notes for any updates regarding minimum supported OS versions.
Overhead of the Image.createFromFile now can be eliminated. When creating an ImageView, path of the image can be set as the image property. If you do so, Picasso library is used in the background for increased performance. This is highly recommended although both usages are supported.
When image property is set as string, ImageView's width & height or at least flexGrow parameter must be set.
Before SF-core version 3.1.0JavaScript
new ImageView({image: Image.createFromFile("images://smartface.png")});
On or After SF-core version 3.1.0JavaScript
new ImageView({image: "images://smartface.png"});
Each library component has a source code under the scripts/components folder. You can now define custom properties for each component using the Object.defineProperty.
Just type defineProperty and click enter. Then type your property name. Your snippet is ready.
Changelog
added: [Framework] Center logo support for HeaderBar
added: [Framework] Dialog with StatusBar
added: [Framework] Send email without leaving the app
added: [Framework] Fade parameter for loadFromURL & loadFromFile methods of ImageView
added: [Framework] Border properties for HeaderBarItem.Badge
added: [Framework] Option to set visibility of the HeaderBar border
added: [Framework] Large title support for iOS
added: [Framework] AsyncTask for time consuming and non UI operations
added: [UI Editor] borderVisibility property of the HeaderBar
added: [UI Editor] Object.defineProperty snippet
improved: [Framework] Router performance
improved: [Framework] SwipeView performance in Android
improved: [Framework] MapView lazy loading
improved: [Framework] It is no longer necessary to set the ID property to all children of a ListViewItem
fixed: [Framework] Calculated layout of a ScrollView will take the size of the ScrollView in minimum
fixed: [UI Editor] Autosize of the ScrollView
fixed: [UI Editor] Image scaling for iPhoneX when using the emulator
fixed: [UI Editor] Go to Code feature when no component is selected
known: [Framework] Clustering on MapView