Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/outsystems/oscore-ios

Library for iOS
https://github.com/outsystems/oscore-ios

engineering odc snyk-mobile ssdlc-rules

Last synced: 4 days ago
JSON representation

Library for iOS

Awesome Lists containing this project

README

        

# Swift protocol for stack agnostic plugin implementation

## Index

- [Motivation](#motivation)
- [Supported Platforms](#supported-platforms)
- [Usage](#usage)
- [Methods](#methods)

## Motivation

This repository contains a protocol that interfaces business logic with iOS platform.

Developers are able to create their own integrations of `PlatformProtocol` for their target mobile framework.



This structure allows us to develop native plugins, portable between techonological stacks (ie: Cordova, React-native, Flutter...)

## Supported Platforms
- iOS

## Usage

1. Include the `POD_NAME` pod in your project.

2. Create an extension that implements `PlatformProtocol`.
```swift
extension CordovaInterface: PlatformProtocol {
func sendResult(result: String?, error: NSError?, callBackID: String) {
// ... processes and sends a response back to Cordova
}

func trigger(event: String, data: String) {
// ... triggers an event on the Cordova webview
}
}
```

## Methods

- `sendResult(result: String?, error: NSError?, callBackID: String)` will send messages back to the mobile framework.

- `trigger(event: String, data: String)` will trigger an event on the mobile framework's webview.