Liferay Screens speeds up and simplifies developing native mobile apps that use Liferay. Its power lies in its Screenlets. A Screenlet is a visual component that you insert into your native app to leverage Liferay Portal’s content and services. On iOS, Screenlets are available to log in to your portal, create accounts, submit forms, display content, and more. You can use any number of Screenlets in your app; they’re independent, so you can use them in modular fashion. Screenlets on iOS also deliver UI flexibility with pluggable Themes that implement elegant user interfaces. Liferay’s reference documentation for iOS Screenlets describes each Screenlet’s features and Themes.

You might be thinking, “These Screenlets sound like the greatest thing since taco Tuesdays, but what if they don’t fit in with my app’s UI? What if they don’t behave exactly how I want them to? What if there’s no Screenlet for what I want to do?” Fret not! You can customize Screenlets to fit your needs by changing or extending their UI and behavior. You can even write your own Screenlets! What’s more, Screens seamlessly integrates with your existing iOS projects.

screens-ios-intro.png

Figure 1: Here’s an app that uses a Liferay Screens Sign Up Screenlet.

Screenlets leverage the Liferay Mobile SDK to make server calls. The Mobile SDK is a low-level layer on top of the Liferay JSON API. To write your own Screenlets, you must familiarize yourself with Liferay’s remote services. If no existing Screenlet meets your needs, consider customizing an existing Screenlet, creating a Screenlet, or directly using the Mobile SDK. Creating a Screenlet involves writing Mobile SDK calls and constructing the Screenlet; if you don’t plan to reuse or distribute the implementation then you may want to forgo writing a Screenlet and, instead, work with the Mobile SDK. A benefit of integrating an existing Screenlet into your app, however, is that the Mobile SDK’s details are abstracted from you.

These tutorials show you how to use, customize, create, and distribute Screenlets for iOS. They show you how to create Themes too. There’s even a tutorial that explains the nitty-gritty details of the Liferay Screens architecture. No matter how deep you want to go, you’ll use Screenlets in no time. Start by preparing your iOS project to use Liferay Screens.

Preparing iOS Projects for Liferay Screens

To use Liferay Screens in your iOS project, you must install it, install its dependencies, and configure it. The steps differ depending on the iOS version your project supports. If your app only...

Read More

Using Screenlets in iOS Apps

Once you’ve prepared your iOS project to use Liferay Screens, you can use Screenlets in your app. There are plenty of Liferay Screenlets available, and they’re described in the Screenlet reference...

Read More

Using Themes in iOS Screenlets

Using a Liferay Screens Theme, you can set your Screenlet’s UI components, style, and behavior. They let you focus on a Screenlet’s UI and UX, without having to worry about its core functionality....

Read More

Using Offline Mode in iOS

Offline mode in Liferay Screens lets your apps function when connectivity is unavailable or intermittent. Even though the steady march of technology makes connections more stable and prevalent,...

Read More

Architecture of Liferay Screens for iOS

Liferay Screens separates its presentation and business-logic code using ideas from Model View Presenter, Model View ViewModel, and VIPER. However, Screens isn’t a canonical implementation of these...

Read More

Creating iOS Screenlets

The built-in Screenlets cover common use cases for mobile apps that use Liferay. They authenticate users, interact with Dynamic Data Lists, display assets, and more. What if, however, there’s no...

Read More

Supporting Multiple Themes in Your Screenlet

Themes let you present the same Screenlet with a different look and feel. For example, if you have multiple apps that use the same Screenlet, you can use different Themes to match the Screenlet’s...

Read More

Adding Screenlet Actions

With multiple Interactors, it’s possible for a Screenlet to have multiple actions. You must create an Interactor class for each action. For example, if your Screenlet needs to make two server...

Read More

Create and Use a Connector with Your Screenlet

In Liferay Screens, a Connector is a class that interacts asynchronously with local and remote data sources and Liferay instances. Recall that callbacks also make asynchronous service calls. So why...

Read More

Add a Screenlet Delegate

Screenlet delegates let other classes respond to your Screenlet’s actions. For example, Login Screenlet’s delegate lets the app developer implement methods that respond to login success or failure....

Read More

Using and Creating Progress Presenters

Many apps display a progress indicator while performing an operation. For example, you’ve likely seen the spinners in iOS apps that let you know the app is performing some kind of work. For more...

Read More

Creating and Using Your Screenlet’s Model Class

Liferay Screens typically receives entities from a Liferay instance as [String:AnyObject], where String is the entity’s attribute and AnyObject is the attribute’s value. Although you can use these...

Read More

Creating iOS List Screenlets

It’s very common for mobile apps to display lists. Liferay Screens lets you display asset lists and DDL lists in your iOS app by using Asset List Screenlet and DDL List Screenlet, respectively....

Read More

Using Custom Cells with List Screenlets

In most list Screenlets, including those that come with Liferay Screens, the Default Theme uses the default cells in iOS’s UITableView to show the list. The Theme creation steps in the list...

Read More

Sorting Your List Screenlet

To sort your list Screenlet, you must point it to a comparator class in your portal. A comparator class implements the logic that sorts your entities. You can create your own comparator class or...

Read More

Creating Complex Lists in Your List Screenlet

Most list Screenlets’ Themes use iOS’s UITableView to display simple lists. Although UITableView is great for this, it’s not so great for complex lists like grids or stacks. To create complex...

Read More

Creating iOS Themes

By creating your own Themes, you can customize your mobile app’s design and functionality. You can create them from scratch or use an existing Theme as a foundation. Themes include a View class for...

Read More

Packaging iOS Themes

Once you’ve created a Theme, you can package it up to install and use with its Screenlet. Your Theme is a code library that you can package using CocoaPods. Follow the steps below to package your...

Read More

Accessing the Liferay Session in iOS

A session is a conversation state between the client and server. It typically consists of multiple requests and responses between the two. To facilitate this communication, the session must have...

Read More

Adding Custom Interactors to iOS Screenlets

Interactors are Screenlet components that implement server communication for a specific use case. For example, the Login Screenlet’s interactor calls the Liferay Mobile SDK service that...

Read More

Rendering Web Content in Your iOS App

Liferay Screens provides several ways to render web content in your app. For historical reasons, web content articles are JournalArticle entities in Liferay. Using Web Content Display Screenlet is...

Read More

iOS Best Practices

When developing iOS projects with Liferay Screens, there are a few best practices that you should follow to ensure your code is as clean and bug-free as possible. This tutorial lists these. Note...

Read More
0 (0 Votes)
Liferay Screens for Android Troubleshooting and FAQs Previous