The following sections highlight the noteworthy enhancements and new features included in this update.
New Crosslight Sync Services
In the earlier release, Crosslight includes powerful data access services that allows you to easily working with remote data source in your apps, such as retrieving and updating data through a RESTful service. It also ships with a data synchronization service which lets you easily perform two-way data sync between the client and server. Currently, you will need to trigger the sync process manually, typically through pull-to-refresh gesture.
Crosslight 2.4 takes data sync to the next level by introducing an advanced sync service that runs in background at certain intervals. Unlike classic implementation, the sync service leverages native OS capabilities to perform the background syncing. In addition to manual sync, now you can also add automatic data sync based on certain intervals, or let the OS determines the best time automatically according to its network condition and resources.
To learn how to use the new Crosslight sync service, see Working with Background Sync Service.
Background Sync Support with Enhanced Push Notification
Along with the new sync service, this release also ships with enhanced push notifications to support silent notifications which can be used for data sync purpose. This feature lets you easily implement apps that trigger data sync anytime you prefer through push notifications sent from server. Combined with the powerful Crosslight background sync service, you can now create great enterprise apps that works in any conditions, either offline or online, and ensure data changes are always in sync.
For more information, see Using Push Notifications for Data Sync.
Major Improvements to Crosslight iOS
This release marks a significant milestone for Crosslight iOS components, particularly in the scrolling performance for table view and its core services such as image loader and resource cache services.
Many of the process in table view have now been refactored — complex operations are optimized, unnecessary implementation is removed, and CPU intensive operations are moved to asynchronous threads — to achieve a single objective: ultra-smooth scrolling performance.
To make the table view really smooth, we have also improved numerous services that are frequently consumed such as image loader and cache services. The image loader has been significantly fine-tuned so that none of its process interrupt the main UI thread when requesting and downloading the image from server, thanks to the enhanced image loader which now leverages iOS’s Grand Central Dispatch. At the same time, the cache service has also been optimized, allowing it to fetch a cache from a large cache session in just a fraction of second.
The combination of these various performance tweaks across iOS components and services resulted in an exceptional, ultra-smooth scrolling performance. The following video shows a table view with complex cell and image loader in action. Note that the demo was performed on the iOS simulator. In the actual device, the performance is considerably faster and smoother.
To enjoy these improvements, simply update the Crosslight assemblies with the latest release. There are no additional efforts or code changes required in your apps.
New Time-saving Features in Crosslight iOS
In addition to performance improvement, this new release also makes iOS development much easier by automating frequent tasks that were previously difficult or tedious to achieve.
Automatic Dynamic Cell Height Support
Implementing dynamic cell height in table view such as those in Twitter and Facebook are considerably difficult and complex which typically require a lot of code. With Crosslight 2.4, you don’t have to write any single line of code, thanks to the built-in AutoLayout support. The performance is also blazing fast, since the improved table view automatically calculate the height off the screen and cache them smartly.
The following illustration shows the table cell design as well as the result.
Automatic Row Height Detection Based on XIB
In the earlier release, you are required to create a custom table data source in order to use a custom table cell with static height. In this release, you just need to plug-in the XIB as the cell template as you would normally do, Crosslight automatically resolves the height for you at runtime — according to the height you specified in the Interface Designer.
Automatic Aspect Ratio Calculation in Thumbnail
In the earlier release, you must explicitly specify the width and height of the thumbnail when capturing a photo or choosing a photo from media service. However, in real world apps, you might need to capture thumbnails with a desired width but keep the aspect ratio for the height. Crosslight 2.4 now lets you easily achieve this by simply specifying the thumbnail height to -1. You’re all set.
The following code shows how to capture a photo from the camera service and returns a thumbnail with proportionally-set height.
The result can be seen in the illustration below, which also compares the result if the thumbnail height were set to a fixed value.
Automatic Selection Persistence in Navigation Drawer
In this release, the navigation drawer component has been improved to support wider range of scenarios. You can now easily show the selected item of the current visible navigation. When users tapped on other navigation item, or if you navigate to a ViewModel through API, the selection in the drawer will be automatically synchronized.
To use this feature, simply add one line of code to the drawer settings in the constructor of your drawer view controller.
In the view controller associated to the left-side navigation, make sure the configuration is appropriately set to support the selection visibility.
The following illustration shows the result of the selection appearance in navigation drawer.
Stability Improvements to Enterprise App Framework
In addition to new features, we also continually improve the Enterprise App Framework to support wider range of business scenarios. This release includes a number of important improvements related to performance and code refactoring, as well as support for Facebook’s new app-scoped ID that was recently introduced. More change log can be seen in the section below.
If you are using App Framework in your apps, we highly recommend you to upgrade your projects with the latest App Framework release.
Along with this release, all samples have been updated to reflect the changes and leverage the new features available in this release. Reported issues related to samples have also been fixed and committed to the master branch. Please download the latest samples from the master branch here.
Specifically, the new and updated samples are:
- Sync Samples
- Background OS Sync Samples
- Push Sync Samples
For more information about configuring samples in your development machine, see Configuring Samples.
API Documentation Updates
This release includes many new APIs across the Crosslight core frameworks and the platform-specific view components. To help you discover and learn more about the new API, the Crosslight API documentation has been updated to reflect the API changes in this release. Visit Crosslight API Documentation.
About Crosslight 2
This update is building on Crosslight 2 release which includes 200+ new features that make enterprise cross-platform apps development a breeze. Take a look at all the new features in the Crosslight 2.0 Release Notes and see what you are missing out on!
Updates and fixes in this release
This release includes the following updates and bug fixes: