Crosslight provides various samples to help you quickly getting started with the basic concepts, capabilities and features available in Crosslight. All Crosslight samples are now available online and can be downloaded from Intersoft Git server.
This page provides in-depth guides to configure and work with Crosslight samples through the following sections:
Getting Started with Crosslight Samples
Starting from Crosslight 2, all samples are now available online which can be downloaded directly from Intersoft Git server. The shifting to the online repo enables Crosslight product team to make changes and push new samples in agile fashion. As the results, you can obtain new sample updates faster without the hassles of re-installation.
There are two ways to obtain Crosslight samples depending on your preferences. If you have git installed, you can quickly clone the samples repo through the git command line or GUI. Otherwise, you can visit the Intersoft Git web interface and download the samples as a single zip file.
Download. Restore. Run.
Get up and running with Crosslight samples is easy and hassle-free. Since Crosslight 5 release, all samples have been configured with Crosslight NuGet packages, enabling you to simply download, restore the packages, and run. No additional effort is required.
To download the samples from Intersoft Git web interface, simply open your browser and point to this address: http://git.intersoftsolutions.com/projects/cs. Choose the samples of your interest, and download or clone them.
All Crosslight samples have been updated with latest Crosslight release providing code references and best practices for Crosslight mobile apps development. Here's the summary of the changes made in latest updates:
- Added Android.Material project — building on the new Crosslight.Android.v7 library.
- Dropped classic Android project.
- iOS project is now redesigned with universal storyboard instead of XIB.
- Core project has been much improved to comply with best practices and API introduced in Crosslight 5. For instance, setting Title can be simply done in ViewModel. The associated view in iOS and Android will automatically take that. This means less code to concern in the view.
- Core project now uses Profile78 as our new PCL standards. This will allow you to consume most BCL packages from Microsoft.
- Crosslight samples that use WebAPI can now run directly — no Windows required. By default, all WebAPI samples are now pointing to Intersoft’s public WebAPI endpoint. If you wish to change it to your local WebAPI, that’s just one property value to set.
- All projects have been updated to comply with latest platform standards, configuration and best practices.
Here's a 2 minute video demo to show the Crosslight sample experience.
Configuring WebAPI-enabled Crosslight Samples
Configuring WebAPI-enabled Crosslight Samples
This video explains how to configure WebAPI-enabled Crosslight samples such as the WebAPI-enabled Inventory Tracker and SynchronizationSample from start to finish. Visit our Developer Center at http://developer.intersoftpt.com for a comprehensive documentation on Crosslight. Also visit http://bit.ly/CrosslightSamples for a complete list of Crosslight samples. |
In addition to simple samples, Crosslight also provides samples that utilizes REST operations via WebAPI servers. Currently, you will need to have separate Windows machines to run the WebAPI servers to run the samples (if you only own a Mac). You will the run the WebAPI server on the Windows machine, then run the simulators/devices with the IP address pointing to the WebAPI server to perform various data operations.
After you have successfully opened up the WebAPI-enabled samples in Visual Studio, you will need to configure the IISExpress's applicationhost.config in order for your devices/emulators to be able to access the server. To do this, open up My Documents/IISExpress/config/applicationhost.config file.
Scroll down until you find the sample's WebAPI configuration. You will need to add a new binding with the * sign so that it can accept any requests coming not just from "localhost".
Save the file, then close it. You may need to restart Visual Studio and re-open the solution for the config to take effect. Then run the WebAPI project. You should now be able to run the WebAPI server. To test this, try connecting to your own IP and hit the WebAPI server. To find your IP, run Command Prompt and type in ipconfig.
The next step is to change the AppService.cs file contained in the Infrastructure folder of the Core project. You will need to change the AppSettings to the WebAPI server you have just successfully configured.
Now you're ready to run the WebAPI samples using device/simulators.
Please refer to the following links to learn more about Crosslight samples.
Related Topics