Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ runs:
using: composite
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version-file: .nvmrc

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup
uses: ./.github/actions/setup
Expand All @@ -27,7 +27,7 @@ jobs:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# uses: actions/checkout@v5

# - name: Setup
# uses: ./.github/actions/setup
Expand All @@ -39,7 +39,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup
uses: ./.github/actions/setup
Expand All @@ -53,7 +53,7 @@ jobs:
TURBO_CACHE_DIR: .turbo/android
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup
uses: ./.github/actions/setup
Expand All @@ -76,7 +76,7 @@ jobs:

- name: Install JDK
if: env.turbo_cache_hit != 1
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
TURBO_CACHE_DIR: .turbo/ios
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup
uses: ./.github/actions/setup
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
increment-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-node@v4
- uses: actions/setup-node@v5
with:
node-version-file: .nvmrc
- name: Assign version to RELEASE_VERSION environment variable
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
publish-to-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version-file: .nvmrc
- name: Publish package
Expand Down
170 changes: 103 additions & 67 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,103 @@
# Ionic Portals License 1.0.0

Based on the text of the licenses in the Polyform Project with new account registration conditions.

## Acceptance

In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.

## Copyright License

The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it, but only so long as you comply with the Account Registration Feature requirement below. However, you may only distribute the software according to [Distribution License](#distribution-license) and make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license).

## Account Registration Feature

You must preserve, and you must not remove or modify, the Account Registration Feature in the software.

## Distribution License

The licensor grants you an additional copyright license to distribute copies of the software, but only so long as you comply with the Account Registration Feature requirement above and the Notice requirement below. Your license to distribute covers distributing the software with changes and new works permitted by [Changes and New Works License](#changes-and-new-works-license).

## Notices

You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with `Required Notice:` that the licensor provided with the software. For example:

> Required Notice: Copyright Yoyodyne, Inc. (http://example.com)

## Changes and New Works License

The licensor grants you an additional copyright license to make changes and new works based on the software, but only so long as you comply with the Account Registration Feature requirement above.

## Patent License

The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.

## Fair Use

You may have "fair use" rights for the software under the law. These terms do not limit them.

## No Other Rights

These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.

## Patent Defense

If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.

## Violations

The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 30 days of receiving notice. Otherwise, all your licenses end immediately.

## No Liability

***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***

## Definitions

The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.

**You** refers to the individual or entity agreeing to these terms.

**Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.

**Your licenses** are all the licenses granted to you for the software under these terms.

**Use** means anything you do with the software requiring one of your licenses.

**Account Registration Feature** is the portion of the software marked by the licensor as the Account Registration Feature in the software. The Account Registration Feature may be a license key, token, or any other such mechanism designated by the licensor.
# Ionic Portals License 2.0.0


Based on the text of the licenses in the Polyform Project with new conditions requiring a separate commercial agreement.


## Acceptance


In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.


## Copyright License


The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it, but only so long as you comply with the Separate Commercial Agreement requirement below. However, you may only distribute the software according to [Distribution License](#distribution-license) and make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license).


## Separate Commercial Agreement


You must have a valid and active Separate Commercial Agreement in place with Drifty Co., d/b/a Ionic, under which you have purchased or otherwise received rights to use Ionic Portals.


## Distribution License


The licensor grants you an additional copyright license to distribute copies of the software, but only so long as you comply with the Separate Commercial Agreement requirement above and the Notice requirement below. Your license to distribute covers distributing the software with changes and new works permitted by [Changes and New Works License](#changes-and-new-works-license).


## Notices


You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with `Required Notice:` that the licensor provided with the software. For example:


> Required Notice: Copyright Yoyodyne, Inc. (http://example.com)


## Changes and New Works License


The licensor grants you an additional copyright license to make changes and new works based on the software, but only so long as you comply with the Separate Commercial Agreement requirement above.


## Patent License


The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.


## Fair Use


You may have "fair use" rights for the software under the law. These terms do not limit them.


## No Other Rights


These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.


## Patent Defense


If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.


## Violations


The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 30 days of receiving notice. Otherwise, all your licenses end immediately.


## No Liability


***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***


## Order of Precedence


To the extent there is a conflict between the scope of license rights defined in the Separate Commercial Agreement and in this license, the Separate Commercial Agreement shall take precedence.


## Definitions


The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.


**You** refers to the individual or entity agreeing to these terms.


**Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.


**Your licenses** are all the licenses granted to you for the software under these terms.


**Use** means anything you do with the software requiring one of your licenses.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ internal object RNPortalManager {
private lateinit var reactApplicationContext: ReactApplicationContext
private var usesSecureLiveUpdates = false

fun register(key: String) = manager.register(key)
fun register(key: String) = Unit

fun createPortal(map: ReadableMap): RNPortal? {
val name = map.getString("name") ?: return null
Expand Down Expand Up @@ -162,10 +162,6 @@ internal object RNPortalManager {
throw Error("Portals config data is malformed. Aborting.", e)
}

val registrationKey =
if (!configJson.isNull("registrationKey")) configJson.getString("registrationKey") else null
registrationKey?.let(::register)

val liveUpdatesKey =
if (!configJson.isNull("liveUpdatesKey")) configJson.getString("liveUpdatesKey") else null
liveUpdatesKey?.let {
Expand Down
5 changes: 0 additions & 5 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,11 @@ import { StyleSheet, View } from 'react-native';
import {
PortalView,
addPortal,
register,
registerWebVitals,
type Portal,
} from '@ionic/portals-react-native';
import { useEffect } from 'react';

register(
'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIzMDU2ZjBlNC1kYTFkLTQ1YWMtYWJjZi1hNDg3MzMyZTQwNGYifQ.0H_gnwXCL1Z-GtFCwQ3J9YrybMxQO56CYo3PFGzoueB56DMvKT4jiQhLzhDYKEE5GwlqX-r0H_qklYKg_jtMyK9QZ_-kTNWi6LyjrJTcgFVwxjz27PZaqZPoKWyJLotSIbBhN8BF5flunCGW8kWL4_nY6FUmswatPDgcvyPmOydr9InbEHHDUVvi9mGwy_G78BjDrl9bThezpGRseBTOI7KH5FUdXwH9DCZJ2RC4_ukTNKMqaKFh-OcD8KDBUIdSP8GE0quO7zL4qSINvxMMzpupTdQKf3Td5B1mvLlrS4kF_8VPoQtvB8JqMrmH2fa8f31fCiz1EV4Wkngb_5yC7w'
);

var portal: Portal = {
name: 'button',
startDir: 'portals/buttonapp',
Expand Down
1 change: 0 additions & 1 deletion ios/PortalsConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@ import IonicLiveUpdates
import IonicPortals

struct PortalsConfig: Decodable {
var registrationKey: String?
var secureLiveUpdatesPublicKey: String?
}
5 changes: 0 additions & 5 deletions ios/PortalsReactNative.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,13 @@ public class PortalsReactNative: NSObject {
let portalsConfig = try? JSONDecoder().decode(PortalsConfig.self, from: configData)
else { fatalError("Portals config data is malformed. Aborting.") }

if let registrationKey = portalsConfig.registrationKey {
PortalsRegistrationManager.shared.register(key: registrationKey)
}

if let publicKeyPath = portalsConfig.secureLiveUpdatesPublicKey {
guard let publicKeyUrl = Bundle.main.url(forResource: publicKeyPath, withExtension: nil) else { fatalError("Public key not found at \(publicKeyPath)") }
Self.lum = SecureLiveUpdateManager(named: "secure-updates", publicKeyUrl: publicKeyUrl)
}
}

@objc func register(_ key: String, resolver: RCTPromiseResolveBlock, rejector: RCTPromiseRejectBlock) {
PortalsRegistrationManager.shared.register(key: key)
resolver(())
}

Expand Down
8 changes: 2 additions & 6 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,9 @@ export type WebVitals = {
};

/**
* Validates that a valid registration key has been procured from http://ionic.io/register-portals
* @param key The registration key
* @returns Promise<void>
* @deprecated Registration keys are no longer required. This function is a no-op and will be removed in a future release.
*/
export const register = async (key: string): Promise<void> => {
return IONPortalsReactNative.register(key);
};
export const register = async (_key: string): Promise<void> => {};

/**
* The configuration of a web application to be embedded in a React Native application.
Expand Down
Loading