diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 46eb69e..fb712dc 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3f68494..558b039 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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' @@ -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 diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 3fcc620..df25462 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 02daf4a..267c0f4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/LICENSE.md b/LICENSE.md index aad03b6..ad32b91 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -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. \ No newline at end of file diff --git a/android/src/main/java/io/ionic/portals/reactnative/ReactNativePortalManager.kt b/android/src/main/java/io/ionic/portals/reactnative/ReactNativePortalManager.kt index f01c559..fa729e9 100644 --- a/android/src/main/java/io/ionic/portals/reactnative/ReactNativePortalManager.kt +++ b/android/src/main/java/io/ionic/portals/reactnative/ReactNativePortalManager.kt @@ -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 @@ -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 { diff --git a/example/src/App.tsx b/example/src/App.tsx index e7f5613..6649959 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -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', diff --git a/ios/PortalsConfig.swift b/ios/PortalsConfig.swift index 42a367f..92d645c 100644 --- a/ios/PortalsConfig.swift +++ b/ios/PortalsConfig.swift @@ -11,6 +11,5 @@ import IonicLiveUpdates import IonicPortals struct PortalsConfig: Decodable { - var registrationKey: String? var secureLiveUpdatesPublicKey: String? } diff --git a/ios/PortalsReactNative.swift b/ios/PortalsReactNative.swift index 97f83c9..4f56a5f 100644 --- a/ios/PortalsReactNative.swift +++ b/ios/PortalsReactNative.swift @@ -19,10 +19,6 @@ 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) @@ -30,7 +26,6 @@ public class PortalsReactNative: NSObject { } @objc func register(_ key: String, resolver: RCTPromiseResolveBlock, rejector: RCTPromiseRejectBlock) { - PortalsRegistrationManager.shared.register(key: key) resolver(()) } diff --git a/src/index.tsx b/src/index.tsx index a32fc6c..9a9aca4 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -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 + * @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 => { - return IONPortalsReactNative.register(key); -}; +export const register = async (_key: string): Promise => {}; /** * The configuration of a web application to be embedded in a React Native application.