24
Views
5
Comments
Live Activities- How to implement live activities using outsystem
Application Type
Mobile
Platform Version
11.38.0 (Build 45971)

I want to implement ios live activities feature for my mobile app using outsystem.

The feature is like uber where it shows journey progress in lock screen , device home screen and in dynamic islan of phone.


I have gone thorough the below documentation

https://developer.apple.com/design/human-interface-guidelines/live-activities

https://documentation.onesignal.com/docs/en/live-activities-developer-setup

https://github.com/OneSignal/OneSignal-Cordova-SDK/issues/877

https://documentation.onesignal.com/docs/en/cross-platform-live-activity-setup

https://www.reactnative.university/blog/live-activities-unleashed

https://medium.com/@varunkukade999/part-1-ios-live-activities-in-react-native-3e7a76418743


But not sure how to implement or start with outsystem to develop this feature. 

Team could you please guide me that would be a great help.

2023-12-26 10-35-28
OutSystems Neo
Staff
AI Generated
This answer was AI-generated. Please read it carefully and use the forums for clarifications
UserImage.jpg
Tamal Mondal
ios live activities implementation
2023-12-26 10-35-28
OutSystems Neo
Staff
AI Generated

Implementing iOS Live Activities for an OutSystems mobile app, similar to the journey progress display seen in Uber’s app, involves the use of native iOS functionality paired with the ability of OutSystems mobile apps to integrate with custom plugins and third-party frameworks. Here’s how you could proceed step-by-step:


1. Understand iOS Live Activities Basics

Before starting, ensure you understand Apple's Live Activities framework. Live Activities are part of the ActivityKit framework and allow apps to display updates on the lock screen, home screen, or Dynamic Island in near real-time. Core documentation like Human Interface Guidelines for Live Activities is a key resource and a must-read for the design and functionality considerations.

To implement Live Activities, your app will:

  • Define relevant UI for the Live Activity.
  • Use ActivityKit to manage live activities.
  • Update the activity data in near real-time.

2. Use OutSystems Mobile Architecture

Since OutSystems apps use a hybrid model with Cordova at their core, you’ll need to integrate native iOS-specific functionality by creating or using a pre-existing Cordova plugin. Native functionality required for Live Activities will be enabled from this plugin.

To get started with adding plugins, refer to Forge modules like "OutSystems Cordova Plugin Library" for examples or use custom plugin development steps like in the following guide: Launch to specific screen of OutSystems mobile app from native iOS and Android app.


3. Build a Custom Cordova Plugin for ActivityKit

Since there’s no direct OutSystems support for ActivityKit yet:

  • Create a custom Cordova plugin leveraging the iOS ActivityKit framework features.
  • The custom plugin should expose functions that your OutSystems app can call (e.g., to start, update, and stop the Live Activity).

To write a plugin, use Apple's Swift-based ActivityKit APIs:

  • Define the LiveActivityView using SwiftUI for the progress UI.
  • Define parameters and logic to initialize the Live Activity with data.
  • Define update functions to send new data to the activity.

A template for creating custom plugins can be found in the Plugin Development documentation.


4. Update and Maintain Live Activities

  • Once the plugin is created, call the plugin from OutSystems client-side actions using JavaScript blocks.
  • Update Live Activities with real-time data by creating external API integrations or background tasks for triggering updates to the ActivityKit functions.
  • Use the Background Mode plugins from Forge for maintaining updates even when the app is in the background: Backgroundmode-plugin.

5. Testing and Deployment

  • Test the Live Activities functionality extensively on different iOS devices, considering system constraints, app lifecycle, and battery management.
  • Apple has specific guidelines regarding the appropriate use of Live Activities, so ensure compliance to meet App Store requirements.

6. Alternative Option: Explore Existing Forge Components

Review any relevant components in the OutSystems Forge that might simplify or fast-track development. As of now, there may not be a pre-built Live Activities plugin, but existing Cordova or integration plugins might serve as a starting point.


7. Apple Developer Account

Ensure you have an Apple Developer Account configured for:

  • Setting up the necessary entitlements for Live Activities.
  • Configuring push notifications for real-time updates in the Xcode project generated by OutSystems.

Key References

Using custom Cordova plugins backed by Apple's native frameworks allows you to successfully implement Live Activities in OutSystems. Although this feature requires significant custom work, leveraging tools like Forge or pre-built plugins can simplify the process. Let me know if you'd like deeper guidance on any step.

This answer was AI-generated. Please read it carefully and use the forums for clarifications
2024-07-12 05-57-50
Gourav Shrivastava
Champion
2026-02-19 17-47-40
Carlos Costa

Hello, 

Did you try Firebase to have live information?
And for notifications, you can use One Signal. Check One Signal API Documentation

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.