UNPKG

@bubblewrap/core

Version:

Core Library to generate, build and sign TWA projects

51 lines (46 loc) 1.82 kB
<?xml version="1.0" encoding="utf-8"?> <!-- Copyright 2021 Google Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <resources> <% if (additionalTrustedOrigins.length > 0) { %> <string-array name="additional_trusted_origins"> <% for (const additionalOrigin of additionalTrustedOrigins) { %> <item>https://<%= additionalOrigin %></item> <% } %> </string-array> <% } %> <!-- This variable below expresses the relationship between the app and the site, as documented in the TWA documentation at https://developers.google.com/web/updates/2017/10/using-twa#set_up_digital_asset_links_in_an_android_app and is injected into the AndroidManifest.xml --> <string name="assetStatements"> [{ \"relation\": [\"delegate_permission/common.handle_all_urls\"], \"target\": { \"namespace\": \"web\", \"site\": \"https://<%= host %>\" } }] <% for (const additionalOrigin of additionalTrustedOrigins) { %> ,[{ \"relation\": [\"delegate_permission/common.handle_all_urls\"], \"target\": { \"namespace\": \"web\", \"site\": \"https://<%= additionalOrigin %>\" } }] <% } %> </string> </resources>