Skip to content

Commit 0c7034b

Browse files
authored
[MINI-5862] - Improve documentation (#515)
* Initial commit * Update USERGUIDE.md
1 parent c423588 commit 0c7034b

File tree

2 files changed

+76
-18
lines changed

2 files changed

+76
-18
lines changed

README.md

Lines changed: 45 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,57 @@
55
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
66
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
77

8-
# MiniApp
8+
# iOS Mini App SDK
9+
10+
The iOS Mini App SDK is a software development kit that allows you to integrate Mini Apps into your Native iOS applications.
11+
12+
## Table of Contents
913

10-
This open-source library allows you to integrate Mini App ecosystem into your iOS applications.
11-
Mini App SDK also facilitates communication between a mini app and the host app via a message bridge.
14+
- [What is a MiniApp?](#what-is-a-miniapp)
15+
- [How can we develop a MiniApp?](#how-can-we-develop-a-miniapp)
16+
- [How can we use this iOS SDK?](#how-does-the-ios-mini-app-sdk-support-loading-miniapps-in-native-host-applications)
17+
- [What this repository offers?](#what-this-repository-offers)
18+
- [Installation](#installation)
19+
- [Usage](#usage)
20+
- [Contributing](#contributing)
21+
- [License](#license)
22+
- [Changelog](#changelog)
23+
24+
## What is a MiniApp?
25+
26+
Mini apps leverage web technologies such as HTML, CSS, and JavaScript to create user interfaces and interact with platform-specific APIs. They can provide functionalities such as content display, data input, social sharing, payment processing, and more. Mini apps are typically developed using platform-specific frameworks or development kits provided by the platform or ecosystem they are built for.
27+
28+
The key advantages of mini apps include their lightweight nature, ease of use, and seamless integration with the hosting platform.
1229

13-
For instructions on implementing in an iOS application, see the [User Guide](https://rakutentech.github.io/ios-miniapp/).
30+
## How can we develop a MiniApp?
31+
32+
To develop a MiniApp, you can follow specific guidelines and best practices. There are several technologies that can be used to develop a mini app. For eg., React, Flutter, Vue.js, etc.,
33+
1434

15-
## Features
35+
## What this repository offers?
36+
This repository offers following things,
1637

17-
- Load MiniApp list
18-
- Load MiniApp metadata
19-
- Create a MiniApp view
20-
- Facilitate communication between host app and mini app
38+
* iOS Miniapp SDK that can be integrated into any Native iOS Applications. Check **[Installation](https://rakutentech.github.io/ios-miniapp#installation)**
39+
* Sample iOS native application to demonstrate the features of iOS Miniapp SDK
40+
* Documentation
2141

22-
All the MiniApp files downloaded by the MiniApp iOS library are cached locally.
42+
## How does the iOS Mini App SDK support loading MiniApps in Native Host applications?
43+
44+
The iOS Mini App SDK provides the necessary APIs and components to facilitate the seamless integration of MiniApps into native iOS applications. It offers functionalities such as MiniApp loading, navigation, data sharing, and permissions management, allowing developers to easily incorporate MiniApps into their iOS projects.
2345

24-
## Getting started
25-
26-
* [Requirements](https://rakutentech.github.io/ios-miniapp#requirements)
27-
* [Documentation & User Guide](https://rakutentech.github.io/ios-miniapp/)
28-
* [Installation](https://rakutentech.github.io/ios-miniapp#installation)
29-
* [Configuration](https://rakutentech.github.io/ios-miniapp#configuration)
30-
* [Usage](https://rakutentech.github.io/ios-miniapp#usage)
46+
* Loading Miniapps from **[Rakuten Miniapp platform](https://developers.rakuten.com/miniapp/)** - Miniapps can be loaded using our **[Rakuten Miniapp platform](https://developers.rakuten.com/miniapp/)** which offers wide range of options to upload, manage a miniapp and also many other exciting features
47+
* Loading Miniapps from Bundle - Our SDK also supports loading a miniapp from Local as well(bundle)
48+
49+
50+
## Installation
51+
52+
To install and set up the iOS Mini App SDK,
53+
check this **[Installation](https://rakutentech.github.io/ios-miniapp#installation)** file for more info.
54+
55+
## Usage
3156

57+
See the **[USAGE](https://rakutentech.github.io/ios-miniapp#usage)** file for more info.
58+
3259
## Contributing
3360

3461
See the [SDK Developer Guide](https://github.com/rakutentech/ios-miniapp/blob/master/DEV.md) and the [Contribution guide](https://github.com/rakutentech/ios-miniapp/blob/master/.github/CONTRIBUTING.md).
@@ -39,4 +66,4 @@ See the *[LICENSE](https://github.com/rakutentech/ios-miniapp/blob/master/LICENS
3966

4067
## Changelog
4168

42-
See the full [CHANGELOG](https://github.com/rakutentech/ios-miniapp/blob/master/CHANGELOG.md).
69+
See the full [CHANGELOG](https://github.com/rakutentech/ios-miniapp/blob/master/CHANGELOG.md).

USERGUIDE.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ Config.userDefaults?.set("MY_CUSTOM_ID", forKey: Config.Key.subscriptionKey.rawV
113113

114114
* [Configure MiniApp](#configure-mini-app)
115115
* [Create a MiniApp](#create-mini-app)
116+
* [Loading a Miniapp from Bundle](#load-a-mini-app-from-bundle)
116117
* [Mini App Features](#mini-app-features)
117118
* [Retrieving Unique ID](#retrieve-unique-id)
118119
* [Requesting Location Permissions](#request-location-permission)
@@ -203,6 +204,36 @@ miniAppView.load { success in
203204
}
204205
```
205206

207+
<a id="load-a-mini-app-from-bundle"></a>
208+
209+
### Load a MiniApp for Bundle
210+
---
211+
Miniapps can be loaded from Bundle now,
212+
213+
The following is a simplified example:
214+
215+
1. Provide the filname of the bundle, followed by MiniApp ID and VersionID
216+
```swift
217+
MiniApp.unzipMiniApp(fileName: "js-miniapp-sample", miniAppId: "mini-app-testing-appid", versionId: "mini-app-testing-versionid")
218+
```
219+
2. Your Miniapp will be extracted to the default location where all Miniapps are downloaded
220+
3. Load Miniapp from Bundle
221+
222+
```swift
223+
224+
// notice the new parameter for ads delegation
225+
let params = MiniAppParameters.default(
226+
config: MiniAppConfig(config: Config.current(), adsDisplayer: self, messageInterface: self),
227+
appId: "mini-app-testing-appid",
228+
version: "mini-app-testing-versionid"
229+
)
230+
let miniAppView = MiniAppView(params: params)
231+
view.loadFromBundle {
232+
// Returns a MiniAppWebView to load
233+
}
234+
```
235+
236+
206237
<a id="mini-app-features"></a>
207238

208239
### Mini App Features

0 commit comments

Comments
 (0)