mirror of
https://github.com/expo/config-plugins.git
synced 2026-11-13 20:28:07 -10:00
Compare commits
104
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
39a9e63fe9 | ||
|
|
7ffc38a808 | ||
|
|
97dcf1aca6 | ||
|
|
4dcc613a70 | ||
|
|
b07ab9e848 | ||
|
|
7411365343 | ||
|
|
e6e8745f05 | ||
|
|
e9f737cfeb | ||
|
|
b0cfebadb4 | ||
|
|
eb957dec79 | ||
|
|
eb4927760b | ||
|
|
3719d67596 | ||
|
|
df9ac710d5 | ||
|
|
73109da98d | ||
|
|
c904bc6a5f | ||
|
|
1374ab2bf4 | ||
|
|
429dcdc1d0 | ||
|
|
5de4ae3e61 | ||
|
|
537afa4c7d | ||
|
|
ada8b99f32 | ||
|
|
546da1c354 | ||
|
|
71c0aa1387 | ||
|
|
8414fda99b | ||
|
|
95c1f0fcd0 | ||
|
|
718c3f9347 | ||
|
|
2591fe2de7 | ||
|
|
39a88c3703 | ||
|
|
1bc203e66e | ||
|
|
352e887b21 | ||
|
|
96fbab5b2a | ||
|
|
4b7192f364 | ||
|
|
7896eccf49 | ||
|
|
ab8076adf5 | ||
|
|
4affbbb7cc | ||
|
|
831546f34b | ||
|
|
90b841d285 | ||
|
|
99acdc71d2 | ||
|
|
d656142bd0 | ||
|
|
063e812b0b | ||
|
|
4a3de37e9c | ||
|
|
0e2ad56f15 | ||
|
|
cf5c3fe7c4 | ||
|
|
119e31edf1 | ||
|
|
379edcd74c | ||
|
|
88e0cd0ccf | ||
|
|
ec2bbedf8b | ||
|
|
0ccc22771d | ||
|
|
df98474d79 | ||
|
|
8694389f12 | ||
|
|
8ed4e44aee | ||
|
|
c88609a866 | ||
|
|
597ffc3bd7 | ||
|
|
d0b32ce4a1 | ||
|
|
57d589ba8a | ||
|
|
ebb86666d6 | ||
|
|
31ed9978ca | ||
|
|
a98a6e022f | ||
|
|
1ac233eb43 | ||
|
|
e1159b4021 | ||
|
|
ae66cac141 | ||
|
|
71e429b77f | ||
|
|
ef50c05892 | ||
|
|
904741a3bd | ||
|
|
01ca879ca3 | ||
|
|
7f0dd05fdc | ||
|
|
d0e018601c | ||
|
|
0b06baa2b4 | ||
|
|
1de3e74d19 | ||
|
|
2dcf5394d8 | ||
|
|
642fc37966 | ||
|
|
e1176398ec | ||
|
|
136c428d07 | ||
|
|
179ef7824f | ||
|
|
dd40467e2b | ||
|
|
90ff4ab4d6 | ||
|
|
1f851b2931 | ||
|
|
ca5ce46616 | ||
|
|
7f3e49b873 | ||
|
|
3021b3e5bc | ||
|
|
1f9becb8e0 | ||
|
|
1b11be1c6b | ||
|
|
217e2a6ad6 | ||
|
|
e02d8752f5 | ||
|
|
e2e643655f | ||
|
|
c45a2eb620 | ||
|
|
60a657c5d0 | ||
|
|
aff6fc544c | ||
|
|
63621acc3f | ||
|
|
e758d8f047 | ||
|
|
996ec84a15 | ||
|
|
8a8528a60d | ||
|
|
81e959db3e | ||
|
|
8f14b3e2a0 | ||
|
|
c9317db090 | ||
|
|
46b7ef9182 | ||
|
|
199dee9542 | ||
|
|
c248895ce9 | ||
|
|
7b77b4351d | ||
|
|
be438e00c1 | ||
|
|
d2f1837284 | ||
|
|
bb43bbe8b7 | ||
|
|
58b042ab57 | ||
|
|
25c2d8da82 | ||
|
|
8526273bfa |
No files matched your search
@@ -0,0 +1,81 @@
|
|||||||
|
name: "\U0001F41B Expo Config Plugin Bug Report"
|
||||||
|
description: Report a reproducible bug with one of the Expo Config Plugins.
|
||||||
|
labels: bug
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: >-
|
||||||
|
Thanks for taking the time to file a bug report! Please fill out this
|
||||||
|
form as completely as possible.
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: >-
|
||||||
|
If you leave out sections there is a high likelihood your issue will be
|
||||||
|
closed. If you have a question, not a bug report, please post it on our
|
||||||
|
[forums](https://forums.expo.dev/) instead.
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Summary
|
||||||
|
description: Describe the issue in 1 or 2 sentences
|
||||||
|
placeholder: >-
|
||||||
|
Clearly describe what the expected behavior is vs. what is actually
|
||||||
|
happening. This should be as short as possible, while still
|
||||||
|
communicating all the necessary information. If your summary is just 'X
|
||||||
|
library/method isn't working', then you need to continue debugging
|
||||||
|
yourself and provide more information.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: dropdown
|
||||||
|
attributes:
|
||||||
|
label: Config Plugin
|
||||||
|
options:
|
||||||
|
- '@config-plugins/android-jsc-intl'
|
||||||
|
- '@config-plugins/detox'
|
||||||
|
- '@config-plugins/ffmpeg-kit-react-native'
|
||||||
|
- '@config-plugins/ios-stickers'
|
||||||
|
- '@config-plugins/react-native-adjust'
|
||||||
|
- '@config-plugins/react-native-ble-plx'
|
||||||
|
- '@config-plugins/react-native-blob-util'
|
||||||
|
- '@config-plugins/react-native-callkeep'
|
||||||
|
- '@config-plugins/react-native-dynamic-app-icon'
|
||||||
|
- '@config-plugins/react-native-google-cast'
|
||||||
|
- '@config-plugins/react-native-pdf'
|
||||||
|
- '@config-plugins/react-native-quick-actions'
|
||||||
|
- '@config-plugins/react-native-webrtc'
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: dropdown
|
||||||
|
attributes:
|
||||||
|
label: What platform(s) does this occur on?
|
||||||
|
multiple: true
|
||||||
|
options:
|
||||||
|
- Android
|
||||||
|
- iOS
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: SDK Version
|
||||||
|
description: What version of the Expo SDK are you using?
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Reproducible demo
|
||||||
|
description: >-
|
||||||
|
This should include as little code as possible, do not simply link your
|
||||||
|
entire project. If a reproducible demo is not provided, it is very
|
||||||
|
likely your issue will be closed. Read [here more
|
||||||
|
guidance](https://stackoverflow.com/help/mcve).
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: >-
|
||||||
|
Please make sure contributors can run your code and follow the steps
|
||||||
|
your provided in order to reproduce the bug.
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: >-
|
||||||
|
**Realize that it is up to you to debug your code and be as certain as
|
||||||
|
possible that the bug is with Expo, not with your own app.** [Here's an
|
||||||
|
excellent guide to debugging you can
|
||||||
|
follow](https://gist.github.com/brentvatne/5ac00cba0c70b7a06b89a56787d6bc4a).
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
---
|
||||||
|
blank_issues_enabled: false
|
||||||
|
contact_links:
|
||||||
|
- name: "\U0001F914 Question about an Expo Config Plugin"
|
||||||
|
about: >-
|
||||||
|
If you have a question about an Expo Config Plugin, please ask it on the
|
||||||
|
forums, discord, Twitter, or Stack Overflow.
|
||||||
|
url: 'https://forums.expo.io/'
|
||||||
|
- about: E2E tests and automation for mobile
|
||||||
|
name: "\U0001F4E6 detox issues"
|
||||||
|
url: 'https://github.com/wix/Detox/issues'
|
||||||
|
- about: FFmpeg Kit for React Native
|
||||||
|
name: "\U0001F4E6 ffmpeg-kit-react-native issues"
|
||||||
|
url: 'https://github.com/tanersener/ffmpeg-kit/issues'
|
||||||
|
- about: Adjust React Native SDK
|
||||||
|
name: "\U0001F4E6 react-native-adjust issues"
|
||||||
|
url: 'https://github.com/adjust/react_native_sdk/issues'
|
||||||
|
- about: React Native Bluetooth Low Energy library
|
||||||
|
name: "\U0001F4E6 react-native-ble-plx issues"
|
||||||
|
url: 'https://github.com/Polidea/react-native-ble-plx/issues'
|
||||||
|
- about: >-
|
||||||
|
A module provides upload, download, and files access API. Supports file
|
||||||
|
stream read/write for process large files.
|
||||||
|
name: "\U0001F4E6 react-native-blob-util issues"
|
||||||
|
url: 'https://github.com/RonRadtke/react-native-blob-util/issues'
|
||||||
|
- about: iOS 10 CallKit and Android ConnectionService Framework For React Native
|
||||||
|
name: "\U0001F4E6 react-native-callkeep issues"
|
||||||
|
url: 'https://github.com/react-native-webrtc/react-native-callkeep/issues'
|
||||||
|
- about: Programmatically change the app icon in React Native.
|
||||||
|
name: "\U0001F4E6 react-native-dynamic-app-icon issues"
|
||||||
|
url: 'https://github.com/idearockers/react-native-dynamic-app-icon/issues'
|
||||||
|
- about: React Native wrapper for the Google Cast SDK for iOS and Android
|
||||||
|
name: "\U0001F4E6 react-native-google-cast issues"
|
||||||
|
url: >-
|
||||||
|
https://github.com/react-native-google-cast/react-native-google-cast/issues
|
||||||
|
- about: 'A react native PDF view component, support ios and android platform'
|
||||||
|
name: "\U0001F4E6 react-native-pdf issues"
|
||||||
|
url: 'https://github.com/wonday/react-native-pdf/issues'
|
||||||
|
- about: A react-native interface for Touch 3D home screen quick actions
|
||||||
|
name: "\U0001F4E6 react-native-quick-actions issues"
|
||||||
|
url: 'https://github.com/jordanbyron/react-native-quick-actions/issues'
|
||||||
|
- about: WebRTC for React Native
|
||||||
|
name: "\U0001F4E6 react-native-webrtc issues"
|
||||||
|
url: 'https://github.com/react-native-webrtc/react-native-webrtc/issues'
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
name: "⭐️ Config Plugin Request"
|
||||||
|
description: "Suggest an idea for a new Expo Config Plugin."
|
||||||
|
labels: enhancement
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: "This repo is used for publishing out-of-tree plugins that should eventually be upstreamed in a particular package. If the plugin is a utility or used to improve some particular workflow i.e. updates version numbers, than it's probably better suited for a personal repo or utility package."
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: Library
|
||||||
|
description: What package does this Config Plugin configure.
|
||||||
|
placeholder: URL to a React Native package.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Summary
|
||||||
|
description: Add some info on why this integration is important.
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Any existing examples?
|
||||||
|
placeholder: Have you already created a local plugin for the requested library?
|
||||||
@@ -2,7 +2,7 @@ name: Check Markdown links
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
push:
|
push:
|
||||||
branches: [master]
|
branches: [main]
|
||||||
paths:
|
paths:
|
||||||
- .github/workflows/lint-md.yml
|
- .github/workflows/lint-md.yml
|
||||||
- "**.md"
|
- "**.md"
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
name: PR Title
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- "*"
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- reopened
|
||||||
|
- edited
|
||||||
|
- synchronize
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
main:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: aslafy-z/[email protected]
|
||||||
|
# continue-on-error: true
|
||||||
|
id: title-check
|
||||||
|
with:
|
||||||
|
success-state: PR title is valid
|
||||||
|
failure-state: "PR title does not follow the conventional commit spec: https://www.conventionalcommits.org/en/v1.0.0/"
|
||||||
|
context-name: pr-title
|
||||||
|
preset: conventional-changelog-angular@latest
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
name: Release
|
||||||
|
# https://github.com/bent10/monorepo-starter/blob/main/docs/recipes/release-automation.md
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
name: Releasing
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
|
||||||
|
- uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: "**/node_modules"
|
||||||
|
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
|
||||||
|
- run: yarn install --frozen-lockfile --check-files
|
||||||
|
- run: yarn lerna run prepare --stream
|
||||||
|
|
||||||
|
# If the dry run fails then it will prevent us from automatically breaking the repo.
|
||||||
|
- name: Semantic release (dry run)
|
||||||
|
run: npx multi-semantic-release --dry-run --ignore-private-packages
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
- name: Semantic release
|
||||||
|
# use `--ignore-packages` to ignore packages on bumping process
|
||||||
|
# npx multi-semantic-release --ignore-packages=packages/a/**,packages/b/**
|
||||||
|
run: npx multi-semantic-release --ignore-private-packages
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
name: Test Packages
|
name: Test Packages
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [master]
|
branches: [main]
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, synchronize]
|
types: [opened, synchronize]
|
||||||
|
|
||||||
@@ -37,6 +37,7 @@ jobs:
|
|||||||
# Manually add packages here
|
# Manually add packages here
|
||||||
detox,
|
detox,
|
||||||
ffmpeg-kit-react-native,
|
ffmpeg-kit-react-native,
|
||||||
|
ios-stickers,
|
||||||
react-native-ble-plx,
|
react-native-ble-plx,
|
||||||
react-native-blob-util,
|
react-native-blob-util,
|
||||||
react-native-google-cast,
|
react-native-google-cast,
|
||||||
|
|||||||
@@ -0,0 +1,62 @@
|
|||||||
|
// From @byCedric https://github.com/expo/expo-github-action/blob/main/.releaserc.js
|
||||||
|
|
||||||
|
const rules = [
|
||||||
|
{ type: "feat", release: "minor", title: "Features" },
|
||||||
|
{ type: "fix", release: "patch", title: "Bug Fixes" },
|
||||||
|
{ type: "test", release: "patch", title: "Tests" },
|
||||||
|
{ type: "ci", release: "patch", title: "Continuous Integration" },
|
||||||
|
{ type: "refactor", release: "patch", title: "Code Refactoring" },
|
||||||
|
{ type: "chore", release: "patch", title: "Other chores" },
|
||||||
|
{ type: "docs", release: "patch", title: "Documentation changes" },
|
||||||
|
];
|
||||||
|
|
||||||
|
// Simple mapping to order the commit groups
|
||||||
|
const sortMap = Object.fromEntries(
|
||||||
|
rules.map((rule, index) => [rule.title, index])
|
||||||
|
);
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
branches: ["main"],
|
||||||
|
tagFormat: "${version}",
|
||||||
|
repositoryUrl: "https://github.com/expo/config-plugins.git",
|
||||||
|
plugins: [
|
||||||
|
[
|
||||||
|
"@semantic-release/commit-analyzer",
|
||||||
|
{
|
||||||
|
preset: "conventionalcommits",
|
||||||
|
releaseRules: [
|
||||||
|
{ breaking: true, release: "major" },
|
||||||
|
{ revert: true, release: "patch" },
|
||||||
|
].concat(
|
||||||
|
rules.map(({ type, release, breaking }) => ({
|
||||||
|
type,
|
||||||
|
release,
|
||||||
|
breaking,
|
||||||
|
}))
|
||||||
|
),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"@semantic-release/release-notes-generator",
|
||||||
|
{
|
||||||
|
preset: "conventionalcommits",
|
||||||
|
presetConfig: {
|
||||||
|
types: rules.map(({ type, title }) => ({ type, section: title })),
|
||||||
|
},
|
||||||
|
writerOpts: {
|
||||||
|
commitGroupsSort: (a, z) => sortMap[a.title] - sortMap[z.title],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@semantic-release/changelog",
|
||||||
|
"@semantic-release/npm",
|
||||||
|
[
|
||||||
|
"@semantic-release/git",
|
||||||
|
{
|
||||||
|
message: "chore: ${nextRelease.version}\n\n${nextRelease.notes}",
|
||||||
|
assets: ["package.json", "CHANGELOG.md", "build/*"],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@semantic-release/github",
|
||||||
|
],
|
||||||
|
};
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# Contributing to Expo Config Plugins
|
||||||
|
|
||||||
|
## Submitting a pull request
|
||||||
|
|
||||||
|
To submit a pull request:
|
||||||
|
|
||||||
|
1. Fork the [repository](https://github.com/expo/config-plugins) and create a feature branch. (Existing contributors can create feature branches without forking. Prefix the branch name with `@your-github-username/`.)
|
||||||
|
2. Use [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) including in the PR tile.
|
||||||
|
3. Fill out the entire PR template. Ensure your code is tested locally and has continuous tests in CI.
|
||||||
|
4. Make sure all tests pass on GitHub Actions.
|
||||||
|
5. Wait for a review and adjust the code if necessary.
|
||||||
|
|
||||||
|
## Publishing a release
|
||||||
|
|
||||||
|
All publishing should be handled automatically whenever code is merged to `main`.
|
||||||
+2
-2
@@ -4,6 +4,6 @@
|
|||||||
// export { default } from './src/react-native-google-cast/App';
|
// export { default } from './src/react-native-google-cast/App';
|
||||||
// export { default } from './src/detox/App';
|
// export { default } from './src/detox/App';
|
||||||
// export { default } from './src/react-native-ble-plx/App';
|
// export { default } from './src/react-native-ble-plx/App';
|
||||||
// export { default } from './src/react-native-webrtc/App';
|
export { default } from './src/react-native-webrtc/App';
|
||||||
// export { default } from './src/android-jsc-intl/App';
|
// export { default } from './src/android-jsc-intl/App';
|
||||||
export { default } from './src/ffmpeg-kit-react-native/App';
|
// export { default } from './src/ffmpeg-kit-react-native/App';
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
### @expo/app [1.0.1](https://github.com/expo/config-plugins/compare/@expo/[email protected]...@expo/[email protected]) (2022-03-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **ci:** use correct internal versions ([ab8076a](https://github.com/expo/config-plugins/commit/ab8076adf51e9ba0439eba60b153d729a0996b8d))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
|
||||||
|
* **@config-plugins/android-jsc-intl:** upgraded to 1.0.1
|
||||||
|
* **@config-plugins/detox:** upgraded to 1.0.1
|
||||||
|
* **@config-plugins/react-native-adjust:** upgraded to 1.0.0
|
||||||
|
* **@config-plugins/react-native-ble-plx:** upgraded to 1.0.0
|
||||||
|
* **@config-plugins/react-native-blob-util:** upgraded to 1.0.1
|
||||||
|
* **@config-plugins/react-native-branch:** upgraded to 1.0.0
|
||||||
|
* **@config-plugins/react-native-callkeep:** upgraded to 1.0.0
|
||||||
|
* **@config-plugins/react-native-dynamic-app-icon:** upgraded to 1.0.0
|
||||||
|
* **@config-plugins/react-native-google-cast:** upgraded to 1.0.0
|
||||||
|
* **@config-plugins/react-native-pdf:** upgraded to 1.0.0
|
||||||
|
* **@config-plugins/react-native-quick-actions:** upgraded to 1.0.0
|
||||||
|
* **@config-plugins/react-native-webrtc:** upgraded to 1.0.0
|
||||||
|
|
||||||
|
## @expo/app 1.0.0 (2022-03-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* create react-native-branch plugin ([0b06baa](https://github.com/expo/config-plugins/commit/0b06baa2b486c5e02d433a4ac785960934f403b9))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* respect old config from expo-branch ([d0e0186](https://github.com/expo/config-plugins/commit/d0e018601c09c0e92191a4eb2998ab0e6fa1c6ec))
|
||||||
|
|
||||||
|
|
||||||
|
### Other chores
|
||||||
|
|
||||||
|
* added start-metro script ([4a7d707](https://github.com/expo/config-plugins/commit/4a7d707b200a3e499d9d71caf49ad4fc1d0a89e0))
|
||||||
|
* update script ([dcf61a9](https://github.com/expo/config-plugins/commit/dcf61a9b9542851095954d84c9054c97c5400dc9))
|
||||||
|
* upgrade to latest react-native-branch ([df98474](https://github.com/expo/config-plugins/commit/df98474d79ed139b42ddd698d13100160c656c26))
|
||||||
|
|
||||||
|
|
||||||
|
### Documentation changes
|
||||||
|
|
||||||
|
* add android-jsc-intl example ([d96c0b2](https://github.com/expo/config-plugins/commit/d96c0b2888da3808d7c4e2dd7993129711ba717d))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
|
||||||
|
* **@config-plugins/android-jsc-intl:** upgraded to 1.0.0
|
||||||
|
* **@config-plugins/detox:** upgraded to 1.0.0
|
||||||
|
* **@config-plugins/ffmpeg-kit-react-native:** upgraded to 1.0.0
|
||||||
|
* **@config-plugins/ios-stickers:** upgraded to 1.0.0
|
||||||
|
* **@config-plugins/react-native-adjust:** upgraded to 1.0.0
|
||||||
|
* **@config-plugins/react-native-ble-plx:** upgraded to 1.0.0
|
||||||
|
* **@config-plugins/react-native-blob-util:** upgraded to 1.0.0
|
||||||
|
* **@config-plugins/react-native-branch:** upgraded to 1.0.0
|
||||||
|
* **@config-plugins/react-native-callkeep:** upgraded to 1.0.0
|
||||||
|
* **@config-plugins/react-native-dynamic-app-icon:** upgraded to 1.0.0
|
||||||
|
* **@config-plugins/react-native-google-cast:** upgraded to 1.0.0
|
||||||
|
* **@config-plugins/react-native-pdf:** upgraded to 1.0.0
|
||||||
|
* **@config-plugins/react-native-quick-actions:** upgraded to 1.0.0
|
||||||
|
* **@config-plugins/react-native-webrtc:** upgraded to 1.0.0
|
||||||
+18
-7
@@ -13,18 +13,26 @@
|
|||||||
"updates": {
|
"updates": {
|
||||||
"fallbackToCacheTimeout": 0
|
"fallbackToCacheTimeout": 0
|
||||||
},
|
},
|
||||||
"assetBundlePatterns": [
|
"assetBundlePatterns": ["**/*"],
|
||||||
"**/*"
|
|
||||||
],
|
|
||||||
"ios": {
|
"ios": {
|
||||||
"supportsTablet": true,
|
"supportsTablet": true,
|
||||||
"bundleIdentifier": "com.bacon.app"
|
"bundleIdentifier": "dev.bacon.app",
|
||||||
|
"config": {
|
||||||
|
"branch": {
|
||||||
|
"apiKey": "key_live_f9f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"android": {
|
"android": {
|
||||||
"adaptiveIcon": {
|
"adaptiveIcon": {
|
||||||
"foregroundImage": "./assets/adaptive-icon.png",
|
"foregroundImage": "./assets/adaptive-icon.png",
|
||||||
"backgroundColor": "#FFFFFF"
|
"backgroundColor": "#FFFFFF"
|
||||||
},
|
},
|
||||||
|
"config": {
|
||||||
|
"branch": {
|
||||||
|
"apiKey": "key_live_f9f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8"
|
||||||
|
}
|
||||||
|
},
|
||||||
"package": "com.bacon.app"
|
"package": "com.bacon.app"
|
||||||
},
|
},
|
||||||
"web": {
|
"web": {
|
||||||
@@ -52,11 +60,14 @@
|
|||||||
]
|
]
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"@config-plugins/ffmpeg-kit-react-native", {
|
"@config-plugins/ffmpeg-kit-react-native",
|
||||||
"package": "min",
|
{
|
||||||
|
"package": "min"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"@config-plugins/detox",
|
"@config-plugins/detox",
|
||||||
|
"@config-plugins/react-native-adjust",
|
||||||
|
"@config-plugins/react-native-branch",
|
||||||
"@config-plugins/react-native-google-cast",
|
"@config-plugins/react-native-google-cast",
|
||||||
"@config-plugins/react-native-ble-plx",
|
"@config-plugins/react-native-ble-plx",
|
||||||
"@config-plugins/react-native-webrtc",
|
"@config-plugins/react-native-webrtc",
|
||||||
@@ -87,4 +98,4 @@
|
|||||||
]
|
]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
import "react-native-gesture-handler";
|
|
||||||
import { registerRootComponent } from "expo";
|
import { registerRootComponent } from "expo";
|
||||||
|
|
||||||
import Constants from "expo-constants";
|
import Constants from "expo-constants";
|
||||||
|
|||||||
+25
-24
@@ -21,47 +21,48 @@
|
|||||||
"android": "expo run:android"
|
"android": "expo run:android"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@config-plugins/android-jsc-intl": "^0.0.1",
|
"@config-plugins/android-jsc-intl": "*",
|
||||||
"@config-plugins/detox": "^1.0.0",
|
"@config-plugins/detox": "*",
|
||||||
"@config-plugins/ffmpeg-kit-react-native": "^0.0.0",
|
"@config-plugins/ffmpeg-kit-react-native": "*",
|
||||||
"@config-plugins/ios-stickers": "^0.0.4",
|
"@config-plugins/ios-stickers": "*",
|
||||||
"@config-plugins/react-native-ble-plx": "^0.0.2",
|
"@config-plugins/react-native-adjust": "*",
|
||||||
"@config-plugins/react-native-callkeep": "^0.0.1",
|
"@config-plugins/react-native-ble-plx": "*",
|
||||||
"@config-plugins/react-native-dynamic-app-icon": "^0.0.2",
|
"@config-plugins/react-native-blob-util": "*",
|
||||||
"@config-plugins/react-native-google-cast": "^0.1.0",
|
"@config-plugins/react-native-branch": "*",
|
||||||
"@config-plugins/react-native-quick-actions": "^0.0.1",
|
"@config-plugins/react-native-callkeep": "*",
|
||||||
"@config-plugins/react-native-webrtc": "^1.0.1",
|
"@config-plugins/react-native-dynamic-app-icon": "*",
|
||||||
"@config-plugins/react-native-pdf": "^0.0.0",
|
"@config-plugins/react-native-google-cast": "*",
|
||||||
"@config-plugins/react-native-blob-util": "^0.0.0",
|
"@config-plugins/react-native-pdf": "*",
|
||||||
"expo": "^43.0.0",
|
"@config-plugins/react-native-quick-actions": "*",
|
||||||
"expo-localization": "~11.0.0",
|
"@config-plugins/react-native-webrtc": "*",
|
||||||
"expo-splash-screen": "~0.13.5",
|
"expo": "^44.0.0",
|
||||||
"expo-status-bar": "~1.1.0",
|
"expo-localization": "~12.0.0",
|
||||||
"expo-updates": "~0.10.13",
|
"expo-splash-screen": "~0.14.0",
|
||||||
|
"expo-status-bar": "~1.2.0",
|
||||||
|
"expo-updates": "~0.11.2",
|
||||||
|
"fbjs": "^0.8.18",
|
||||||
"ffmpeg-kit-react-native": "^4.5.0",
|
"ffmpeg-kit-react-native": "^4.5.0",
|
||||||
"i18n-js": "^3.8.0",
|
"i18n-js": "^3.8.0",
|
||||||
"luxon": "^1.27.0",
|
"luxon": "^1.27.0",
|
||||||
"react": "17.0.1",
|
"react": "17.0.1",
|
||||||
"react-dom": "17.0.1",
|
"react-dom": "17.0.1",
|
||||||
"react-native": "0.64.3",
|
"react-native": "0.64.3",
|
||||||
"react-native-pdf": "^6.4.0",
|
"react-native-adjust": "^4.29.5",
|
||||||
"react-native-blob-util": "^0.13.17",
|
"react-native-blob-util": "^0.13.17",
|
||||||
"fbjs": "^0.8.18",
|
|
||||||
"react-native-callkeep": "^4.2.0",
|
"react-native-callkeep": "^4.2.0",
|
||||||
|
"react-native-branch": "^5.3.0",
|
||||||
"react-native-dynamic-app-icon": "^1.1.0",
|
"react-native-dynamic-app-icon": "^1.1.0",
|
||||||
"react-native-gesture-handler": "~1.10.2",
|
|
||||||
"react-native-google-cast": "^4.1.2",
|
"react-native-google-cast": "^4.1.2",
|
||||||
|
"react-native-pdf": "^6.4.0",
|
||||||
"react-native-quick-actions": "^0.3.13",
|
"react-native-quick-actions": "^0.3.13",
|
||||||
"react-native-reanimated": "~2.2.0",
|
|
||||||
"react-native-safe-area-context": "3.3.2",
|
"react-native-safe-area-context": "3.3.2",
|
||||||
"react-native-screens": "~3.8.0",
|
|
||||||
"react-native-web": "0.17.1",
|
"react-native-web": "0.17.1",
|
||||||
"react-native-webrtc": "^1.89.3"
|
"react-native-webrtc": "^1.89.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.12.9",
|
"@babel/core": "^7.12.9",
|
||||||
"@babel/plugin-syntax-jsx": "^7.16.0",
|
"@babel/plugin-syntax-jsx": "^7.16.0",
|
||||||
"@expo/metro-config": "~0.3.0",
|
"@expo/metro-config": "~0.3.7",
|
||||||
"@expo/xcpretty": "^4.1.0",
|
"@expo/xcpretty": "^4.1.0",
|
||||||
"@types/jest": "^26.0.19",
|
"@types/jest": "^26.0.19",
|
||||||
"@types/luxon": "^1.27.1",
|
"@types/luxon": "^1.27.1",
|
||||||
@@ -69,7 +70,7 @@
|
|||||||
"@types/react-native": "~0.64.12",
|
"@types/react-native": "~0.64.12",
|
||||||
"babel-jest": "~25.2.6",
|
"babel-jest": "~25.2.6",
|
||||||
"detox": "^19.1.0",
|
"detox": "^19.1.0",
|
||||||
"jest": "^26.5.0",
|
"jest": "^26.6.3",
|
||||||
"jest-circus": "^26.5.2",
|
"jest-circus": "^26.5.2",
|
||||||
"ts-jest": "^26.4.4",
|
"ts-jest": "^26.4.4",
|
||||||
"typescript": "~4.3.5"
|
"typescript": "~4.3.5"
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
import React from "react";
|
||||||
|
import { SafeAreaView, Text, StyleSheet } from "react-native";
|
||||||
|
import { Adjust, AdjustConfig } from "react-native-adjust";
|
||||||
|
|
||||||
|
export default function App() {
|
||||||
|
React.useEffect(() => {
|
||||||
|
const adjustConfig = new AdjustConfig(
|
||||||
|
"APP_TOKEN",
|
||||||
|
AdjustConfig.EnvironmentSandbox
|
||||||
|
);
|
||||||
|
Adjust.create(adjustConfig);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<SafeAreaView style={styles.container}>
|
||||||
|
<Text>Adjust SDK</Text>
|
||||||
|
</SafeAreaView>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
container: {
|
||||||
|
flex: 1,
|
||||||
|
justifyContent: "center",
|
||||||
|
alignItems: "center",
|
||||||
|
},
|
||||||
|
});
|
||||||
+18
-1
@@ -1,9 +1,13 @@
|
|||||||
{
|
{
|
||||||
|
"name": "@config-plugins/repo",
|
||||||
|
"version": "1.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "expo-yarn-workspaces check-workspace-dependencies",
|
"postinstall": "expo-yarn-workspaces check-workspace-dependencies",
|
||||||
"gen": "ts-node ./scripts/generate-plugin.ts",
|
"gen": "ts-node ./scripts/generate-plugin.ts",
|
||||||
"start": "lerna run build --parallel -- --watch"
|
"update-issue-template": "ts-node ./scripts/gh-issues-config.ts",
|
||||||
|
"start": "lerna run build --parallel -- --watch",
|
||||||
|
"prepare": "lerna run prepare --parallel"
|
||||||
},
|
},
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"apps/*",
|
"apps/*",
|
||||||
@@ -11,8 +15,21 @@
|
|||||||
],
|
],
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@expo/package-manager": "^0.0.43",
|
"@expo/package-manager": "^0.0.43",
|
||||||
|
"@semantic-release/changelog": "^6.0.1",
|
||||||
|
"@semantic-release/commit-analyzer": "^9.0.2",
|
||||||
|
"@semantic-release/error": "^3.0.0",
|
||||||
|
"@semantic-release/exec": "^6.0.3",
|
||||||
|
"@semantic-release/git": "^10.0.1",
|
||||||
|
"@semantic-release/github": "^8.0.2",
|
||||||
|
"@semantic-release/npm": "^9.0.1",
|
||||||
|
"@semantic-release/release-notes-generator": "^10.0.3",
|
||||||
|
"conventional-changelog-conventionalcommits": "^4.6.3",
|
||||||
|
"multi-semantic-release": "^2.11.1",
|
||||||
|
"semantic-release": "^19.0.2",
|
||||||
|
"@types/js-yaml": "^4.0.5",
|
||||||
"@types/prompts": "^2.0.13",
|
"@types/prompts": "^2.0.13",
|
||||||
"expo-yarn-workspaces": "^1.5.1",
|
"expo-yarn-workspaces": "^1.5.1",
|
||||||
|
"js-yaml": "^4.1.0",
|
||||||
"lerna": "3.4.1",
|
"lerna": "3.4.1",
|
||||||
"prettier": "^2.2.1",
|
"prettier": "^2.2.1",
|
||||||
"prompts": "^2.4.1",
|
"prompts": "^2.4.1",
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
### @config-plugins/android-jsc-intl [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||||
|
|
||||||
|
|
||||||
|
### Continuous Integration
|
||||||
|
|
||||||
|
* fix versions [skip ci] ([#53](https://github.com/expo/config-plugins/issues/53)) ([5de4ae3](https://github.com/expo/config-plugins/commit/5de4ae3e6182c32b7aa24d70ccd23a11663bb089))
|
||||||
|
|
||||||
|
### @config-plugins/android-jsc-intl [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **ci:** use correct internal versions ([ab8076a](https://github.com/expo/config-plugins/commit/ab8076adf51e9ba0439eba60b153d729a0996b8d))
|
||||||
|
|
||||||
|
## @config-plugins/android-jsc-intl 1.0.0 (2022-03-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Intl support for android via withAndroidJscIntl ([eb6642c](https://github.com/expo/config-plugins/commit/eb6642c0e7b37d6d9baf196ec40cc520f559e665))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* remove createPluginOnce ([68cf1c0](https://github.com/expo/config-plugins/commit/68cf1c07b2c48249cbbd0732668ea95455636a0b))
|
||||||
|
* run expo prepare ([8d364ed](https://github.com/expo/config-plugins/commit/8d364ed99ea4b0e0e3af73dbcc780819bf55d6c2))
|
||||||
|
|
||||||
|
|
||||||
|
### Other chores
|
||||||
|
|
||||||
|
* upgrade @expo/config-plugins ([#49](https://github.com/expo/config-plugins/issues/49)) ([119e31e](https://github.com/expo/config-plugins/commit/119e31edf110409272ace750f02d651124e1a22d))
|
||||||
|
|
||||||
|
|
||||||
|
### Documentation changes
|
||||||
|
|
||||||
|
* clarify readme ([b524633](https://github.com/expo/config-plugins/commit/b5246338cb37ae41d138bc6253703b0d438fc3e3))
|
||||||
@@ -6,7 +6,7 @@ Adding this plugin lets you use `Intl` in your Android app, without using Hermes
|
|||||||
|
|
||||||
## Expo installation
|
## Expo installation
|
||||||
|
|
||||||
> Tested against Expo SDK 43
|
> Tested against Expo SDK 44
|
||||||
|
|
||||||
This package cannot be used in the "Expo Go" app because [it requires custom native code](https://docs.expo.io/workflow/customizing/).
|
This package cannot be used in the "Expo Go" app because [it requires custom native code](https://docs.expo.io/workflow/customizing/).
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "@config-plugins/android-jsc-intl",
|
"name": "@config-plugins/android-jsc-intl",
|
||||||
"version": "0.0.1",
|
"version": "1.0.2",
|
||||||
"description": "Config plugin for android-jsc-intl package",
|
"description": "Config plugin for android-jsc-intl package",
|
||||||
"main": "build/withAndroidJscIntl.js",
|
"main": "build/withAndroidJscIntl.js",
|
||||||
"types": "build/withAndroidJscIntl.d.ts",
|
"types": "build/withAndroidJscIntl.d.ts",
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/expo/config-plugins.git",
|
||||||
|
"directory": "packages/android-jsc-intl"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "expo-module build",
|
"build": "expo-module build",
|
||||||
"clean": "expo-module clean",
|
"clean": "expo-module clean",
|
||||||
@@ -26,9 +31,9 @@
|
|||||||
"preset": "expo-module-scripts"
|
"preset": "expo-module-scripts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@expo/config-plugins": "^4.0.7"
|
"@expo/config-plugins": "^4.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"expo-module-scripts": "^2.0.0"
|
"expo-module-scripts": "^2.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
### @config-plugins/detox [1.2.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||||
|
|
||||||
|
|
||||||
|
### Continuous Integration
|
||||||
|
|
||||||
|
* fix versions [skip ci] ([#53](https://github.com/expo/config-plugins/issues/53)) ([5de4ae3](https://github.com/expo/config-plugins/commit/5de4ae3e6182c32b7aa24d70ccd23a11663bb089))
|
||||||
|
|
||||||
|
### @config-plugins/detox 1.2.0
|
||||||
@@ -8,14 +8,15 @@ Ensure you use versions that work together!
|
|||||||
|
|
||||||
| `expo` | `detox` | `@config-plugins/detox` |
|
| `expo` | `detox` | `@config-plugins/detox` |
|
||||||
| ------ | ------- | ----------------------- |
|
| ------ | ------- | ----------------------- |
|
||||||
| 43.0.0 | 19.1.0 | 1.0.0 |
|
| 44.0.0 | 19.1.0 | ^1.1.0 |
|
||||||
| 40.0.0 | 18.6.2 | 0.0.0 |
|
| 43.0.0 | 19.1.0 | ~1.0.0 |
|
||||||
|
| 40.0.0 | 18.6.2 | ~0.0.0 |
|
||||||
|
|
||||||
Most notably, the minimum required Kotlin version changed from `1.3.50` in SDK 40 to `1.4.21` in SDK 43. Failure to use the correct versioning could result in Android build errors like `Execution failed for task ':react-native-screens:compileDebugKotlin'.` or `Execution failed for task ':expo:compileDebugKotlin'.`.
|
Most notably, the minimum required Kotlin version changed from `1.3.50` in SDK 40 to `1.4.21` in SDK 43. Failure to use the correct versioning could result in Android build errors like `Execution failed for task ':react-native-screens:compileDebugKotlin'.` or `Execution failed for task ':expo:compileDebugKotlin'.`.
|
||||||
|
|
||||||
### Add the package to your npm dependencies
|
### Add the package to your npm dependencies
|
||||||
|
|
||||||
> Tested against Expo SDK 43
|
> Tested against Expo SDK 44
|
||||||
|
|
||||||
```
|
```
|
||||||
yarn add detox @config-plugins/detox
|
yarn add detox @config-plugins/detox
|
||||||
@@ -52,6 +53,29 @@ Detox is an end-to-end (e2e) testing library for iOS and Android. You can use it
|
|||||||
- Generate the native code `expo prebuild`
|
- Generate the native code `expo prebuild`
|
||||||
- Run `yarn detox init -r jest`
|
- Run `yarn detox init -r jest`
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
The plugin provides props for extra customization. Every time you change the props or plugins, you'll need to rebuild (and `prebuild`) the native app. If no extra properties are added, defaults will be used.
|
||||||
|
|
||||||
|
- `skipProguard` (_boolean_): Disable adding proguard minification to the `app/build.gradle`. Defaults to `false`.
|
||||||
|
- `subdomains` (_string[] | '\*'_): Hostnames to add to the network security config. Pass `'*'` to allow all domains. Defaults to `['10.0.2.2', 'localhost']`.
|
||||||
|
|
||||||
|
`app.config.js`
|
||||||
|
|
||||||
|
```ts
|
||||||
|
export default {
|
||||||
|
plugins: [
|
||||||
|
[
|
||||||
|
"@config-plugins/detox",
|
||||||
|
{
|
||||||
|
skipProguard: false,
|
||||||
|
subdomains: ["10.0.2.2", "localhost"],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
],
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
## FAQ
|
## FAQ
|
||||||
|
|
||||||
If the following commands fail, you can get better debug info by running a subset command:
|
If the following commands fail, you can get better debug info by running a subset command:
|
||||||
|
|||||||
+3
-1
@@ -1,4 +1,5 @@
|
|||||||
import { ConfigPlugin } from "@expo/config-plugins";
|
import { ConfigPlugin } from "@expo/config-plugins";
|
||||||
|
import { SubdomainsType } from "./withNetworkSecurityConfig";
|
||||||
declare const _default: ConfigPlugin<void | {
|
declare const _default: ConfigPlugin<void | {
|
||||||
/**
|
/**
|
||||||
* Disable adding proguard minification to the `app/build.gradle`.
|
* Disable adding proguard minification to the `app/build.gradle`.
|
||||||
@@ -9,9 +10,10 @@ declare const _default: ConfigPlugin<void | {
|
|||||||
/**
|
/**
|
||||||
* Subdomains to add to the network security config.
|
* Subdomains to add to the network security config.
|
||||||
* Pass `['10.0.3.2', 'localhost']` to use Genymotion emulators instead of Google emulators.
|
* Pass `['10.0.3.2', 'localhost']` to use Genymotion emulators instead of Google emulators.
|
||||||
|
* Pass `*` to allow all domains.
|
||||||
*
|
*
|
||||||
* @default ['10.0.2.2', 'localhost'] // (Google emulators)
|
* @default ['10.0.2.2', 'localhost'] // (Google emulators)
|
||||||
*/
|
*/
|
||||||
subdomains?: string[] | undefined;
|
subdomains?: SubdomainsType | undefined;
|
||||||
}>;
|
}>;
|
||||||
export default _default;
|
export default _default;
|
||||||
+3
-2
@@ -1,8 +1,9 @@
|
|||||||
import { ConfigPlugin } from "@expo/config-plugins";
|
import { ConfigPlugin } from "@expo/config-plugins";
|
||||||
export declare function getTemplateFile(subdomains: string[]): string;
|
export declare type SubdomainsType = string[] | "*";
|
||||||
|
export declare function getTemplateFile(subdomains: SubdomainsType): string;
|
||||||
/**
|
/**
|
||||||
* [Step 6](https://github.com/wix/Detox/blob/master/docs/Introduction.Android.md#6-enable-clear-text-unencrypted-traffic-for-detox). Link the `network_security_config.xml` file to the `AndroidManifest.xml`.
|
* [Step 6](https://github.com/wix/Detox/blob/master/docs/Introduction.Android.md#6-enable-clear-text-unencrypted-traffic-for-detox). Link the `network_security_config.xml` file to the `AndroidManifest.xml`.
|
||||||
*/
|
*/
|
||||||
export declare const withNetworkSecurityConfigManifest: ConfigPlugin<{
|
export declare const withNetworkSecurityConfigManifest: ConfigPlugin<{
|
||||||
subdomains: string[];
|
subdomains: SubdomainsType;
|
||||||
} | void>;
|
} | void>;
|
||||||
+21
-6
@@ -27,16 +27,27 @@ const config_plugins_1 = require("@expo/config-plugins");
|
|||||||
const path = __importStar(require("path"));
|
const path = __importStar(require("path"));
|
||||||
const fs = __importStar(require("fs"));
|
const fs = __importStar(require("fs"));
|
||||||
const assert_1 = __importDefault(require("assert"));
|
const assert_1 = __importDefault(require("assert"));
|
||||||
function getTemplateFile(subdomains) {
|
function getTemplateConfigContent(subdomains) {
|
||||||
return `<?xml version="1.0" encoding="utf-8"?>
|
if (subdomains === "*") {
|
||||||
<network-security-config>
|
// allow all domains
|
||||||
|
return '<base-config cleartextTrafficPermitted="true" />';
|
||||||
|
}
|
||||||
|
return `
|
||||||
<domain-config cleartextTrafficPermitted="true">
|
<domain-config cleartextTrafficPermitted="true">
|
||||||
${subdomains
|
${subdomains
|
||||||
.map((subdomain) => `<domain includeSubdomains="true">${subdomain}</domain>`)
|
.map((subdomain) => `<domain includeSubdomains="true">${subdomain}</domain>`)
|
||||||
.join("")}
|
.join("")}
|
||||||
</domain-config>
|
</domain-config>
|
||||||
</network-security-config>
|
`;
|
||||||
`;
|
}
|
||||||
|
function getTemplateFile(subdomains) {
|
||||||
|
const content = getTemplateConfigContent(subdomains);
|
||||||
|
return `
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<network-security-config>
|
||||||
|
${content}
|
||||||
|
</network-security-config>
|
||||||
|
`;
|
||||||
}
|
}
|
||||||
exports.getTemplateFile = getTemplateFile;
|
exports.getTemplateFile = getTemplateFile;
|
||||||
/**
|
/**
|
||||||
@@ -65,6 +76,10 @@ const withNetworkSecurityConfigManifest = (config, props) => {
|
|||||||
// https://developer.android.com/training/articles/security-config
|
// https://developer.android.com/training/articles/security-config
|
||||||
props = { subdomains: ["10.0.2.2", "localhost"] };
|
props = { subdomains: ["10.0.2.2", "localhost"] };
|
||||||
}
|
}
|
||||||
|
if (typeof props.subdomains === "object" && !props.subdomains.length) {
|
||||||
|
// if subdomains is an empty array, skip network config mod
|
||||||
|
return config;
|
||||||
|
}
|
||||||
config = withNetworkSecurityConfigFile(config, props);
|
config = withNetworkSecurityConfigFile(config, props);
|
||||||
return config_plugins_1.withAndroidManifest(config, (config) => {
|
return config_plugins_1.withAndroidManifest(config, (config) => {
|
||||||
const application = config_plugins_1.AndroidConfig.Manifest.getMainApplicationOrThrow(config.modResults);
|
const application = config_plugins_1.AndroidConfig.Manifest.getMainApplicationOrThrow(config.modResults);
|
||||||
|
|||||||
@@ -1,10 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "@config-plugins/detox",
|
"name": "@config-plugins/detox",
|
||||||
"version": "1.1.0",
|
"version": "1.2.1",
|
||||||
"description": "Config plugin to auto configure detox on prebuild",
|
"description": "Config plugin to auto configure detox on prebuild",
|
||||||
"main": "build/withDetox.js",
|
"main": "build/withDetox.js",
|
||||||
"types": "build/withDetox.d.ts",
|
"types": "build/withDetox.d.ts",
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/expo/config-plugins.git",
|
||||||
|
"directory": "packages/detox"
|
||||||
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"build",
|
"build",
|
||||||
"app.plugin.js"
|
"app.plugin.js"
|
||||||
@@ -25,9 +30,10 @@
|
|||||||
"e2e"
|
"e2e"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@expo/config-plugins": "^4.0.7"
|
"@expo/config-plugins": "^4.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"expo-module-scripts": "^2.0.0"
|
"expo-module-scripts": "^2.0.0"
|
||||||
}
|
},
|
||||||
|
"upstreamPackage": "detox"
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`getTemplateFile returns domain-config when subdomains is an array 1`] = `
|
||||||
|
"
|
||||||
|
<?xml version=\\"1.0\\" encoding=\\"utf-8\\"?>
|
||||||
|
<network-security-config>
|
||||||
|
|
||||||
|
<domain-config cleartextTrafficPermitted=\\"true\\">
|
||||||
|
<domain includeSubdomains=\\"true\\">localhost</domain>
|
||||||
|
</domain-config>
|
||||||
|
|
||||||
|
</network-security-config>
|
||||||
|
"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`getTemplateFile returns only base-config when subdomains is '*' 1`] = `
|
||||||
|
"
|
||||||
|
<?xml version=\\"1.0\\" encoding=\\"utf-8\\"?>
|
||||||
|
<network-security-config>
|
||||||
|
<base-config cleartextTrafficPermitted=\\"true\\" />
|
||||||
|
</network-security-config>
|
||||||
|
"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`withNetworkSecurityConfigManifest doesn't modify config if subdomains is an empty array 1`] = `
|
||||||
|
Object {
|
||||||
|
"name": "foo",
|
||||||
|
"slug": "bar",
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`withNetworkSecurityConfigManifest modifies config if subdomains is not empty 1`] = `
|
||||||
|
Object {
|
||||||
|
"mods": Object {
|
||||||
|
"android": Object {
|
||||||
|
"dangerous": [Function],
|
||||||
|
"manifest": [Function],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"name": "foo",
|
||||||
|
"slug": "bar",
|
||||||
|
}
|
||||||
|
`;
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
import {
|
||||||
|
getTemplateFile,
|
||||||
|
withNetworkSecurityConfigManifest,
|
||||||
|
} from "../withNetworkSecurityConfig";
|
||||||
|
|
||||||
|
describe(getTemplateFile, () => {
|
||||||
|
it(`returns only base-config when subdomains is '*'`, () => {
|
||||||
|
const content = getTemplateFile("*");
|
||||||
|
expect(content).toMatchSnapshot();
|
||||||
|
expect(content).toMatch(/base\-config/);
|
||||||
|
expect(content).not.toMatch(/domain\-config/);
|
||||||
|
});
|
||||||
|
it(`returns domain-config when subdomains is an array`, () => {
|
||||||
|
const content = getTemplateFile(["localhost"]);
|
||||||
|
expect(content).toMatchSnapshot();
|
||||||
|
expect(content).toMatch(/domain\-config/);
|
||||||
|
expect(content).toMatch(/localhost/);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
const exp = { name: "foo", slug: "bar" };
|
||||||
|
|
||||||
|
describe(withNetworkSecurityConfigManifest, () => {
|
||||||
|
it(`doesn't modify config if subdomains is an empty array`, () => {
|
||||||
|
const applied = withNetworkSecurityConfigManifest(exp, {
|
||||||
|
subdomains: [],
|
||||||
|
});
|
||||||
|
expect(applied).toMatchSnapshot();
|
||||||
|
expect(applied).toStrictEqual(exp);
|
||||||
|
});
|
||||||
|
it(`modifies config if subdomains is not empty`, () => {
|
||||||
|
const applied = withNetworkSecurityConfigManifest(exp, {
|
||||||
|
subdomains: ["10.0.2.2"],
|
||||||
|
});
|
||||||
|
expect(applied).toMatchSnapshot();
|
||||||
|
expect(applied).toHaveProperty("mods.android");
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -8,7 +8,7 @@ import withDetoxProjectGradle from "./withDetoxProjectGradle";
|
|||||||
import withDetoxTestAppGradle from "./withDetoxTestAppGradle";
|
import withDetoxTestAppGradle from "./withDetoxTestAppGradle";
|
||||||
import { withDetoxTestClass } from "./withDetoxTestClass";
|
import { withDetoxTestClass } from "./withDetoxTestClass";
|
||||||
import withKotlinGradle from "./withKotlinGradle";
|
import withKotlinGradle from "./withKotlinGradle";
|
||||||
import { withNetworkSecurityConfigManifest } from "./withNetworkSecurityConfig";
|
import { withNetworkSecurityConfigManifest, SubdomainsType } from "./withNetworkSecurityConfig";
|
||||||
import withProguardGradle from "./withProguardGradle";
|
import withProguardGradle from "./withProguardGradle";
|
||||||
|
|
||||||
const withDetox: ConfigPlugin<{
|
const withDetox: ConfigPlugin<{
|
||||||
@@ -21,10 +21,11 @@ const withDetox: ConfigPlugin<{
|
|||||||
/**
|
/**
|
||||||
* Subdomains to add to the network security config.
|
* Subdomains to add to the network security config.
|
||||||
* Pass `['10.0.3.2', 'localhost']` to use Genymotion emulators instead of Google emulators.
|
* Pass `['10.0.3.2', 'localhost']` to use Genymotion emulators instead of Google emulators.
|
||||||
|
* Pass `*` to allow all domains.
|
||||||
*
|
*
|
||||||
* @default ['10.0.2.2', 'localhost'] // (Google emulators)
|
* @default ['10.0.2.2', 'localhost'] // (Google emulators)
|
||||||
*/
|
*/
|
||||||
subdomains?: string[];
|
subdomains?: SubdomainsType;
|
||||||
} | void> = (config, { skipProguard, subdomains } = {}) => {
|
} | void> = (config, { skipProguard, subdomains } = {}) => {
|
||||||
return withPlugins(
|
return withPlugins(
|
||||||
config,
|
config,
|
||||||
|
|||||||
@@ -8,28 +8,41 @@ import * as path from "path";
|
|||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
import assert from "assert";
|
import assert from "assert";
|
||||||
|
|
||||||
export function getTemplateFile(subdomains: string[]): string {
|
export type SubdomainsType = string[] | "*";
|
||||||
return `<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<network-security-config>
|
function getTemplateConfigContent(subdomains: SubdomainsType) {
|
||||||
|
if (subdomains === "*") {
|
||||||
|
// allow all domains
|
||||||
|
return '<base-config cleartextTrafficPermitted="true" />';
|
||||||
|
}
|
||||||
|
return `
|
||||||
<domain-config cleartextTrafficPermitted="true">
|
<domain-config cleartextTrafficPermitted="true">
|
||||||
${subdomains
|
${subdomains
|
||||||
.map(
|
.map(
|
||||||
(subdomain) =>
|
(subdomain) =>
|
||||||
`<domain includeSubdomains="true">${subdomain}</domain>`
|
`<domain includeSubdomains="true">${subdomain}</domain>`
|
||||||
)
|
)
|
||||||
.join("")}
|
.join("")}
|
||||||
</domain-config>
|
</domain-config>
|
||||||
</network-security-config>
|
`;
|
||||||
`;
|
}
|
||||||
|
|
||||||
|
export function getTemplateFile(subdomains: SubdomainsType): string {
|
||||||
|
const content = getTemplateConfigContent(subdomains);
|
||||||
|
return `
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<network-security-config>
|
||||||
|
${content}
|
||||||
|
</network-security-config>
|
||||||
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create `network_security_config.xml` resource file.
|
* Create `network_security_config.xml` resource file.
|
||||||
*/
|
*/
|
||||||
const withNetworkSecurityConfigFile: ConfigPlugin<{ subdomains: string[] }> = (
|
const withNetworkSecurityConfigFile: ConfigPlugin<{
|
||||||
config,
|
subdomains: SubdomainsType;
|
||||||
{ subdomains }
|
}> = (config, { subdomains }) => {
|
||||||
) => {
|
|
||||||
return withDangerousMod(config, [
|
return withDangerousMod(config, [
|
||||||
"android",
|
"android",
|
||||||
async (config) => {
|
async (config) => {
|
||||||
@@ -53,14 +66,22 @@ const withNetworkSecurityConfigFile: ConfigPlugin<{ subdomains: string[] }> = (
|
|||||||
/**
|
/**
|
||||||
* [Step 6](https://github.com/wix/Detox/blob/master/docs/Introduction.Android.md#6-enable-clear-text-unencrypted-traffic-for-detox). Link the `network_security_config.xml` file to the `AndroidManifest.xml`.
|
* [Step 6](https://github.com/wix/Detox/blob/master/docs/Introduction.Android.md#6-enable-clear-text-unencrypted-traffic-for-detox). Link the `network_security_config.xml` file to the `AndroidManifest.xml`.
|
||||||
*/
|
*/
|
||||||
export const withNetworkSecurityConfigManifest: ConfigPlugin<{
|
export const withNetworkSecurityConfigManifest: ConfigPlugin<
|
||||||
subdomains: string[];
|
{
|
||||||
} | void> = (config, props) => {
|
subdomains: SubdomainsType;
|
||||||
|
} | void
|
||||||
|
> = (config, props) => {
|
||||||
if (!props || !props.subdomains) {
|
if (!props || !props.subdomains) {
|
||||||
// (*) 10.0.2.2 for Google emulators, 10.0.3.2 for Genymotion emulators.
|
// (*) 10.0.2.2 for Google emulators, 10.0.3.2 for Genymotion emulators.
|
||||||
// https://developer.android.com/training/articles/security-config
|
// https://developer.android.com/training/articles/security-config
|
||||||
props = { subdomains: ["10.0.2.2", "localhost"] };
|
props = { subdomains: ["10.0.2.2", "localhost"] };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (typeof props.subdomains === "object" && !props.subdomains.length) {
|
||||||
|
// if subdomains is an empty array, skip network config mod
|
||||||
|
return config;
|
||||||
|
}
|
||||||
|
|
||||||
config = withNetworkSecurityConfigFile(config, props);
|
config = withNetworkSecurityConfigFile(config, props);
|
||||||
return withAndroidManifest(config, (config) => {
|
return withAndroidManifest(config, (config) => {
|
||||||
const application = AndroidConfig.Manifest.getMainApplicationOrThrow(
|
const application = AndroidConfig.Manifest.getMainApplicationOrThrow(
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
### @config-plugins/ffmpeg-kit-react-native [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||||
|
|
||||||
|
|
||||||
|
### Continuous Integration
|
||||||
|
|
||||||
|
* fix versions [skip ci] ([#53](https://github.com/expo/config-plugins/issues/53)) ([5de4ae3](https://github.com/expo/config-plugins/commit/5de4ae3e6182c32b7aa24d70ccd23a11663bb089))
|
||||||
|
|
||||||
|
## @config-plugins/ffmpeg-kit-react-native 1.0.0 (2022-03-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Other chores
|
||||||
|
|
||||||
|
* upgrade @expo/config-plugins ([#49](https://github.com/expo/config-plugins/issues/49)) ([119e31e](https://github.com/expo/config-plugins/commit/119e31edf110409272ace750f02d651124e1a22d))
|
||||||
@@ -4,7 +4,7 @@ Config plugin to auto configure ffmpeg-kit-react-native when the native code is
|
|||||||
|
|
||||||
## Expo installation
|
## Expo installation
|
||||||
|
|
||||||
> Tested against Expo SDK 43. Only the `min` package appeared to work on Android. Most packages worked on iOS.
|
> Tested against Expo SDK 44. Most packages worked on iOS. Not all packages have been tested on Android.
|
||||||
|
|
||||||
> This package cannot be used in the "Expo Go" app because [it requires custom native code](https://docs.expo.io/workflow/customizing/).
|
> This package cannot be used in the "Expo Go" app because [it requires custom native code](https://docs.expo.io/workflow/customizing/).
|
||||||
> First install the package with yarn, npm, or [`expo install`](https://docs.expo.io/workflow/expo-cli/#expo-install).
|
> First install the package with yarn, npm, or [`expo install`](https://docs.expo.io/workflow/expo-cli/#expo-install).
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.updateDeploymentTargetXcodeProject = exports.updateDeploymentTargetPodfile = exports.withIosDeploymentTarget = void 0;
|
exports.updateDeploymentTargetXcodeProject = exports.updateDeploymentTargetPodfile = exports.withIosDeploymentTarget = void 0;
|
||||||
|
// Copied from https://github.com/expo/expo-cli/blob/main/packages/install-expo-modules/src/plugins/ios/withIosDeploymentTarget.ts
|
||||||
const config_plugins_1 = require("@expo/config-plugins");
|
const config_plugins_1 = require("@expo/config-plugins");
|
||||||
const fs_1 = __importDefault(require("fs"));
|
const fs_1 = __importDefault(require("fs"));
|
||||||
const path_1 = __importDefault(require("path"));
|
const path_1 = __importDefault(require("path"));
|
||||||
|
|||||||
@@ -1,10 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "@config-plugins/ffmpeg-kit-react-native",
|
"name": "@config-plugins/ffmpeg-kit-react-native",
|
||||||
"version": "0.0.0",
|
"version": "1.0.1",
|
||||||
"description": "Config plugin to auto configure FFMPEG on prebuild",
|
"description": "Config plugin to auto configure FFMPEG on prebuild",
|
||||||
"main": "build/withFFMPEG.js",
|
"main": "build/withFFMPEG.js",
|
||||||
"types": "build/withFFMPEG.d.ts",
|
"types": "build/withFFMPEG.d.ts",
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/expo/config-plugins.git",
|
||||||
|
"directory": "packages/ffmpeg-kit-react-native"
|
||||||
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"build",
|
"build",
|
||||||
"app.plugin.js"
|
"app.plugin.js"
|
||||||
@@ -27,11 +32,12 @@
|
|||||||
"preset": "expo-module-scripts"
|
"preset": "expo-module-scripts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@expo/config-plugins": "^4.0.7",
|
"@expo/config-plugins": "^4.1.0",
|
||||||
"semver": "^7.3.5"
|
"semver": "^7.3.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/semver": "^7.3.9",
|
"@types/semver": "^7.3.9",
|
||||||
"expo-module-scripts": "^2.0.0"
|
"expo-module-scripts": "^2.0.0"
|
||||||
}
|
},
|
||||||
|
"upstreamPackage": "ffmpeg-kit-react-native"
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
### @config-plugins/ios-stickers [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||||
|
|
||||||
|
|
||||||
|
### Continuous Integration
|
||||||
|
|
||||||
|
* fix versions [skip ci] ([#53](https://github.com/expo/config-plugins/issues/53)) ([5de4ae3](https://github.com/expo/config-plugins/commit/5de4ae3e6182c32b7aa24d70ccd23a11663bb089))
|
||||||
|
|
||||||
|
|
||||||
|
### Documentation changes
|
||||||
|
|
||||||
|
* **ios-stickers:** add doc block ([#55](https://github.com/expo/config-plugins/issues/55)) ([c904bc6](https://github.com/expo/config-plugins/commit/c904bc6a5f410645696a0356b5c188b94f80c231))
|
||||||
|
|
||||||
|
## @config-plugins/ios-stickers 1.0.0 (2022-03-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Other chores
|
||||||
|
|
||||||
|
* upgrade @expo/config-plugins ([#49](https://github.com/expo/config-plugins/issues/49)) ([119e31e](https://github.com/expo/config-plugins/commit/119e31edf110409272ace750f02d651124e1a22d))
|
||||||
@@ -4,7 +4,7 @@ Config plugin to auto configure iOS iMessage stickers
|
|||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
> Tested against Expo SDK 43
|
> Tested against Expo SDK 44
|
||||||
|
|
||||||
```
|
```
|
||||||
yarn add @config-plugins/ios-stickers
|
yarn add @config-plugins/ios-stickers
|
||||||
|
|||||||
Generated
+58
@@ -0,0 +1,58 @@
|
|||||||
|
{
|
||||||
|
"title": "@config-plugins/ios-stickers options",
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"$ref": "#/definitions/Props",
|
||||||
|
"definitions": {
|
||||||
|
"Props": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"stickers": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/Sticker"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"icon": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"columns": {
|
||||||
|
"type": "number",
|
||||||
|
"enum": [
|
||||||
|
2,
|
||||||
|
3,
|
||||||
|
4
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false
|
||||||
|
},
|
||||||
|
"Sticker": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"image": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"accessibilityLabel": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"image"
|
||||||
|
],
|
||||||
|
"additionalProperties": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
@@ -1,4 +1,5 @@
|
|||||||
import { ConfigPlugin } from "@expo/config-plugins";
|
import { ConfigPlugin } from "@expo/config-plugins";
|
||||||
|
/** Dangerously applies sticker assets to the iOS project. */
|
||||||
export declare const withStickerAssets: ConfigPlugin<{
|
export declare const withStickerAssets: ConfigPlugin<{
|
||||||
icon?: string;
|
icon?: string;
|
||||||
size: string;
|
size: string;
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ function createSticker({ stickerpackPath, name, imageBuffer, extension, accessib
|
|||||||
name: stickerName,
|
name: stickerName,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
/** Dangerously applies sticker assets to the iOS project. */
|
||||||
const withStickerAssets = (config, { stickers, icon, size }) => {
|
const withStickerAssets = (config, { stickers, icon, size }) => {
|
||||||
// Default to using the app icon
|
// Default to using the app icon
|
||||||
if (!icon) {
|
if (!icon) {
|
||||||
|
|||||||
+6
-1
@@ -4,6 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.normalizeStickersProps = void 0;
|
exports.normalizeStickersProps = void 0;
|
||||||
|
const schema_utils_1 = require("schema-utils");
|
||||||
|
const options_json_1 = __importDefault(require("./options.json"));
|
||||||
const withStickerAssets_1 = require("./withStickerAssets");
|
const withStickerAssets_1 = require("./withStickerAssets");
|
||||||
const withStickerInfoPlist_1 = require("./withStickerInfoPlist");
|
const withStickerInfoPlist_1 = require("./withStickerInfoPlist");
|
||||||
const withStickerXcodeTarget_1 = require("./withStickerXcodeTarget");
|
const withStickerXcodeTarget_1 = require("./withStickerXcodeTarget");
|
||||||
@@ -29,7 +31,10 @@ function normalizeStickersProps(props = []) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.normalizeStickersProps = normalizeStickersProps;
|
exports.normalizeStickersProps = normalizeStickersProps;
|
||||||
const withStickerPack = (config, { stickers, icon, name, columns = 3 } = {}) => {
|
const withStickerPack = (config, options = {}) => {
|
||||||
|
// Perform option validation.
|
||||||
|
schema_utils_1.validate(options_json_1.default, options);
|
||||||
|
const { stickers, icon, name, columns = 3 } = options;
|
||||||
const size = sizeColumnMap[columns] || "regular";
|
const size = sizeColumnMap[columns] || "regular";
|
||||||
if (!size) {
|
if (!size) {
|
||||||
throw new Error(`Column size "${columns}" is invalid. Expected one of: ${Object.keys(sizeColumnMap).join(", ")}`);
|
throw new Error(`Column size "${columns}" is invalid. Expected one of: ${Object.keys(sizeColumnMap).join(", ")}`);
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
module.exports = require('expo-module-scripts/jest-preset-plugin');
|
||||||
@@ -1,10 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "@config-plugins/ios-stickers",
|
"name": "@config-plugins/ios-stickers",
|
||||||
"version": "0.0.4",
|
"version": "1.0.1",
|
||||||
"description": "Config plugin to auto configure iOS iMessage stickers",
|
"description": "Config plugin to auto configure iOS iMessage stickers",
|
||||||
"main": "build/withStickerPack.js",
|
"main": "build/withStickerPack.js",
|
||||||
"types": "build/withStickerPack.d.ts",
|
"types": "build/withStickerPack.d.ts",
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/expo/config-plugins.git",
|
||||||
|
"directory": "packages/ios-stickers"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "expo-module build",
|
"build": "expo-module build",
|
||||||
"clean": "expo-module clean",
|
"clean": "expo-module clean",
|
||||||
@@ -18,12 +23,10 @@
|
|||||||
"react",
|
"react",
|
||||||
"expo"
|
"expo"
|
||||||
],
|
],
|
||||||
"jest": {
|
|
||||||
"preset": "expo-module-scripts"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@expo/config-plugins": "^4.0.7",
|
"@expo/config-plugins": "^4.1.0",
|
||||||
"@expo/image-utils": "^0.3.17",
|
"@expo/image-utils": "^0.3.17",
|
||||||
|
"schema-utils": "^4.0.0",
|
||||||
"xcode": "^3.0.1"
|
"xcode": "^3.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
import withStickerPack from "../withStickerPack";
|
||||||
|
|
||||||
|
const exp = { name: "foo", slug: "bar" };
|
||||||
|
describe(withStickerPack, () => {
|
||||||
|
it("should not throw when options are valid", () => {
|
||||||
|
expect(() =>
|
||||||
|
withStickerPack(exp, {
|
||||||
|
name: "test",
|
||||||
|
stickers: [{ image: "test.png" }],
|
||||||
|
columns: 2,
|
||||||
|
icon: "test.png",
|
||||||
|
})
|
||||||
|
).not.toThrow();
|
||||||
|
});
|
||||||
|
it("should not throw when no options are provided", () => {
|
||||||
|
expect(() => withStickerPack(exp, {})).not.toThrow();
|
||||||
|
});
|
||||||
|
it("should throw if columns is not a number", () => {
|
||||||
|
expect(() => {
|
||||||
|
withStickerPack(exp, {
|
||||||
|
stickers: [],
|
||||||
|
icon: "",
|
||||||
|
name: "",
|
||||||
|
columns: "3",
|
||||||
|
} as any);
|
||||||
|
}).toThrowErrorMatchingInlineSnapshot(`
|
||||||
|
"Invalid options object. @config-plugins/ios-stickers has been initialized using an options object that does not match the API schema.
|
||||||
|
- options.columns should be one of these:
|
||||||
|
2 | 3 | 4"
|
||||||
|
`);
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
{
|
||||||
|
"title": "@config-plugins/ios-stickers options",
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"$ref": "#/definitions/Props",
|
||||||
|
"definitions": {
|
||||||
|
"Props": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"stickers": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/Sticker"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"icon": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"columns": {
|
||||||
|
"type": "number",
|
||||||
|
"enum": [
|
||||||
|
2,
|
||||||
|
3,
|
||||||
|
4
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false
|
||||||
|
},
|
||||||
|
"Sticker": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"image": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"accessibilityLabel": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"image"
|
||||||
|
],
|
||||||
|
"additionalProperties": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -68,6 +68,7 @@ function createSticker({
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Dangerously applies sticker assets to the iOS project. */
|
||||||
export const withStickerAssets: ConfigPlugin<{
|
export const withStickerAssets: ConfigPlugin<{
|
||||||
icon?: string;
|
icon?: string;
|
||||||
size: string;
|
size: string;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { ConfigPlugin } from "@expo/config-plugins";
|
import { ConfigPlugin } from "@expo/config-plugins";
|
||||||
|
import { validate } from "schema-utils";
|
||||||
|
import schema from "./options.json";
|
||||||
import { Props, Sticker, withStickerAssets } from "./withStickerAssets";
|
import { Props, Sticker, withStickerAssets } from "./withStickerAssets";
|
||||||
import { withStickersPlist } from "./withStickerInfoPlist";
|
import { withStickersPlist } from "./withStickerInfoPlist";
|
||||||
import { withStickerXcodeTarget } from "./withStickerXcodeTarget";
|
import { withStickerXcodeTarget } from "./withStickerXcodeTarget";
|
||||||
@@ -30,10 +31,12 @@ export function normalizeStickersProps(
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const withStickerPack: ConfigPlugin<Props> = (
|
const withStickerPack: ConfigPlugin<Props> = (config, options = {}) => {
|
||||||
config,
|
// Perform option validation.
|
||||||
{ stickers, icon, name, columns = 3 } = {}
|
validate(schema as any, options);
|
||||||
) => {
|
|
||||||
|
const { stickers, icon, name, columns = 3 } = options;
|
||||||
|
|
||||||
const size = sizeColumnMap[columns] || "regular";
|
const size = sizeColumnMap[columns] || "regular";
|
||||||
if (!size) {
|
if (!size) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
{
|
{
|
||||||
"extends": "expo-module-scripts/tsconfig.plugin",
|
"extends": "expo-module-scripts/tsconfig.plugin",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "./build"
|
"outDir": "./build",
|
||||||
|
"resolveJsonModule": true
|
||||||
},
|
},
|
||||||
"include": ["./src"],
|
"include": ["./src"],
|
||||||
"exclude": ["**/__mocks__/*", "**/__tests__/*"]
|
"exclude": ["**/__mocks__/*", "**/__tests__/*"]
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
// @generated by expo-module-scripts
|
||||||
|
module.exports = require('expo-module-scripts/eslintrc.base.js');
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
### @config-plugins/react-native-adjust [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||||
|
|
||||||
|
|
||||||
|
### Continuous Integration
|
||||||
|
|
||||||
|
* fix versions [skip ci] ([#53](https://github.com/expo/config-plugins/issues/53)) ([5de4ae3](https://github.com/expo/config-plugins/commit/5de4ae3e6182c32b7aa24d70ccd23a11663bb089))
|
||||||
|
|
||||||
|
## @config-plugins/react-native-adjust 1.0.0 (2022-03-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Other chores
|
||||||
|
|
||||||
|
* upgrade @expo/config-plugins ([#49](https://github.com/expo/config-plugins/issues/49)) ([119e31e](https://github.com/expo/config-plugins/commit/119e31edf110409272ace750f02d651124e1a22d))
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
# @config-plugins/react-native-adjust
|
||||||
|
|
||||||
|
Expo Config Plugin to auto configure [`react-native-adjust`](https://www.npmjs.com/package/react-native-adjust) when the native code is generated (`expo prebuild`).
|
||||||
|
|
||||||
|
## Expo installation
|
||||||
|
|
||||||
|
> Tested against Expo SDK 44
|
||||||
|
|
||||||
|
This package cannot be used in the "Expo Go" app because [it requires custom native code](https://docs.expo.io/workflow/customizing/).
|
||||||
|
|
||||||
|
- First install the package with yarn, npm, or [`expo install`](https://docs.expo.io/workflow/expo-cli/#expo-install).
|
||||||
|
|
||||||
|
```sh
|
||||||
|
expo install react-native-adjust @config-plugins/react-native-adjust
|
||||||
|
```
|
||||||
|
|
||||||
|
After installing this npm package, add the [config plugin](https://docs.expo.io/guides/config-plugins/) to the [`plugins`](https://docs.expo.io/versions/latest/config/app/#plugins) array of your `app.json` or `app.config.js`:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"expo": {
|
||||||
|
"plugins": ["@config-plugins/react-native-adjust"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
If you are targeting Android 12 and above (API level 31), you need to add it in the options of the plugin:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"expo": {
|
||||||
|
"plugins": [
|
||||||
|
"@config-plugins/react-native-adjust",
|
||||||
|
{ "targetAndroid12": true }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
This will add the [appropriate permission](https://github.com/adjust/react_native_sdk#add-permission-to-gather-google-advertising-id) for you.
|
||||||
|
|
||||||
|
Next, rebuild your app as described in the ["Adding custom native code"](https://docs.expo.io/workflow/customizing/) guide.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
module.exports = require("./build/withReactNativeAdjust");
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
import { ConfigPlugin } from "@expo/config-plugins";
|
||||||
|
declare const _default: ConfigPlugin<void | {
|
||||||
|
targetAndroid12?: boolean | undefined;
|
||||||
|
}>;
|
||||||
|
export default _default;
|
||||||
+92
@@ -0,0 +1,92 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
const config_plugins_1 = require("@expo/config-plugins");
|
||||||
|
const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode");
|
||||||
|
const withXcodeLinkBinaryWithLibraries = (config, { library, status }) => {
|
||||||
|
return config_plugins_1.withXcodeProject(config, (config) => {
|
||||||
|
const options = status === "optional" ? { weak: true } : {};
|
||||||
|
const target = config_plugins_1.IOSConfig.XcodeUtils.getApplicationNativeTarget({
|
||||||
|
project: config.modResults,
|
||||||
|
projectName: config.modRequest.projectName,
|
||||||
|
});
|
||||||
|
config.modResults.addFramework(library, {
|
||||||
|
target: target.uuid,
|
||||||
|
...options,
|
||||||
|
});
|
||||||
|
return config;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const addAndroidPackagingOptions = (src) => {
|
||||||
|
return generateCode_1.mergeContents({
|
||||||
|
tag: "react-native-play-services-analytics",
|
||||||
|
src,
|
||||||
|
newSrc: `
|
||||||
|
implementation 'com.google.android.gms:play-services-analytics:18.0.0'
|
||||||
|
implementation 'com.android.installreferrer:installreferrer:2.2'
|
||||||
|
`,
|
||||||
|
anchor: /dependencies(?:\s+)?\{/,
|
||||||
|
// Inside the dependencies block.
|
||||||
|
offset: 1,
|
||||||
|
comment: "//",
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const withGradle = (config) => {
|
||||||
|
return config_plugins_1.withAppBuildGradle(config, (config) => {
|
||||||
|
if (config.modResults.language === "groovy") {
|
||||||
|
config.modResults.contents = addAndroidPackagingOptions(config.modResults.contents).contents;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw new Error("Cannot add Play Services maven gradle because the project build.gradle is not groovy");
|
||||||
|
}
|
||||||
|
return config;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* Apply react-native-adjust configuration for Expo SDK +44 projects.
|
||||||
|
*/
|
||||||
|
const withAdjustPlugin = (config, _props) => {
|
||||||
|
const props = _props || {};
|
||||||
|
config = withXcodeLinkBinaryWithLibraries(config, {
|
||||||
|
library: "iAd.framework",
|
||||||
|
status: "optional",
|
||||||
|
});
|
||||||
|
config = withXcodeLinkBinaryWithLibraries(config, {
|
||||||
|
library: "AdServices.framework",
|
||||||
|
status: "optional",
|
||||||
|
});
|
||||||
|
config = withXcodeLinkBinaryWithLibraries(config, {
|
||||||
|
library: "AdSupport.framework",
|
||||||
|
status: "optional",
|
||||||
|
});
|
||||||
|
config = withXcodeLinkBinaryWithLibraries(config, {
|
||||||
|
library: "StoreKit.framework",
|
||||||
|
status: "optional",
|
||||||
|
});
|
||||||
|
config = withXcodeLinkBinaryWithLibraries(config, {
|
||||||
|
library: "AppTrackingTransparency.framework",
|
||||||
|
status: "optional",
|
||||||
|
});
|
||||||
|
if (props.targetAndroid12) {
|
||||||
|
config = config_plugins_1.AndroidConfig.Version.withBuildScriptExtMinimumVersion(config, {
|
||||||
|
name: "compileSdkVersion",
|
||||||
|
minVersion: 31,
|
||||||
|
});
|
||||||
|
config = config_plugins_1.AndroidConfig.Permissions.withPermissions(config, [
|
||||||
|
"com.google.android.gms.permission.AD_ID",
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
config = withGradle(config);
|
||||||
|
// Return the modified config.
|
||||||
|
return config;
|
||||||
|
};
|
||||||
|
const pkg = {
|
||||||
|
// Prevent this plugin from being run more than once.
|
||||||
|
// This pattern enables users to safely migrate off of this
|
||||||
|
// out-of-tree `@config-plugins/react-native-adjust` to a future
|
||||||
|
// upstream plugin in `react-native-adjust`
|
||||||
|
name: "react-native-adjust",
|
||||||
|
// Indicates that this plugin is dangerously linked to a module,
|
||||||
|
// and might not work with the latest version of that module.
|
||||||
|
version: "UNVERSIONED",
|
||||||
|
};
|
||||||
|
exports.default = config_plugins_1.createRunOncePlugin(withAdjustPlugin, pkg.name, pkg.version);
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"name": "@config-plugins/react-native-adjust",
|
||||||
|
"version": "1.0.1",
|
||||||
|
"description": "Config plugin to auto configure Adjust SDK on prebuild",
|
||||||
|
"main": "build/withReactNativeAdjust.js",
|
||||||
|
"types": "build/withReactNativeAdjust.d.ts",
|
||||||
|
"sideEffects": false,
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/expo/config-plugins.git",
|
||||||
|
"directory": "packages/react-native-adjust"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"build": "expo-module build",
|
||||||
|
"clean": "expo-module clean",
|
||||||
|
"lint": "expo-module lint",
|
||||||
|
"test": "expo-module test",
|
||||||
|
"prepare": "expo-module prepare",
|
||||||
|
"prepublishOnly": "expo-module prepublishOnly",
|
||||||
|
"expo-module": "expo-module"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"react",
|
||||||
|
"expo",
|
||||||
|
"config-plugins",
|
||||||
|
"prebuild",
|
||||||
|
"react-native-adjust",
|
||||||
|
"expo-44"
|
||||||
|
],
|
||||||
|
"jest": {
|
||||||
|
"preset": "expo-module-scripts"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@expo/config-plugins": "^4.1.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"expo-module-scripts": "^2.0.0"
|
||||||
|
},
|
||||||
|
"upstreamPackage": "react-native-adjust"
|
||||||
|
}
|
||||||
@@ -0,0 +1,124 @@
|
|||||||
|
import {
|
||||||
|
AndroidConfig,
|
||||||
|
createRunOncePlugin,
|
||||||
|
IOSConfig,
|
||||||
|
withXcodeProject,
|
||||||
|
withAppBuildGradle,
|
||||||
|
ConfigPlugin,
|
||||||
|
} from "@expo/config-plugins";
|
||||||
|
import { mergeContents } from "@expo/config-plugins/build/utils/generateCode";
|
||||||
|
|
||||||
|
const withXcodeLinkBinaryWithLibraries: ConfigPlugin<{
|
||||||
|
library: string;
|
||||||
|
status?: string;
|
||||||
|
}> = (config, { library, status }) => {
|
||||||
|
return withXcodeProject(config, (config) => {
|
||||||
|
const options = status === "optional" ? { weak: true } : {};
|
||||||
|
|
||||||
|
const target = IOSConfig.XcodeUtils.getApplicationNativeTarget({
|
||||||
|
project: config.modResults,
|
||||||
|
projectName: config.modRequest.projectName!,
|
||||||
|
});
|
||||||
|
|
||||||
|
config.modResults.addFramework(library, {
|
||||||
|
target: target.uuid,
|
||||||
|
...options,
|
||||||
|
});
|
||||||
|
|
||||||
|
return config;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const addAndroidPackagingOptions = (src: string) => {
|
||||||
|
return mergeContents({
|
||||||
|
tag: "react-native-play-services-analytics",
|
||||||
|
src,
|
||||||
|
newSrc: `
|
||||||
|
implementation 'com.google.android.gms:play-services-analytics:18.0.0'
|
||||||
|
implementation 'com.android.installreferrer:installreferrer:2.2'
|
||||||
|
`,
|
||||||
|
anchor: /dependencies(?:\s+)?\{/,
|
||||||
|
// Inside the dependencies block.
|
||||||
|
offset: 1,
|
||||||
|
comment: "//",
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const withGradle: ConfigPlugin = (config) => {
|
||||||
|
return withAppBuildGradle(config, (config) => {
|
||||||
|
if (config.modResults.language === "groovy") {
|
||||||
|
config.modResults.contents = addAndroidPackagingOptions(
|
||||||
|
config.modResults.contents
|
||||||
|
).contents;
|
||||||
|
} else {
|
||||||
|
throw new Error(
|
||||||
|
"Cannot add Play Services maven gradle because the project build.gradle is not groovy"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return config;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Apply react-native-adjust configuration for Expo SDK +44 projects.
|
||||||
|
*/
|
||||||
|
const withAdjustPlugin: ConfigPlugin<void | { targetAndroid12?: boolean }> = (
|
||||||
|
config,
|
||||||
|
_props
|
||||||
|
) => {
|
||||||
|
const props = _props || {};
|
||||||
|
|
||||||
|
config = withXcodeLinkBinaryWithLibraries(config, {
|
||||||
|
library: "iAd.framework",
|
||||||
|
status: "optional",
|
||||||
|
});
|
||||||
|
|
||||||
|
config = withXcodeLinkBinaryWithLibraries(config, {
|
||||||
|
library: "AdServices.framework",
|
||||||
|
status: "optional",
|
||||||
|
});
|
||||||
|
|
||||||
|
config = withXcodeLinkBinaryWithLibraries(config, {
|
||||||
|
library: "AdSupport.framework",
|
||||||
|
status: "optional",
|
||||||
|
});
|
||||||
|
|
||||||
|
config = withXcodeLinkBinaryWithLibraries(config, {
|
||||||
|
library: "StoreKit.framework",
|
||||||
|
status: "optional",
|
||||||
|
});
|
||||||
|
|
||||||
|
config = withXcodeLinkBinaryWithLibraries(config, {
|
||||||
|
library: "AppTrackingTransparency.framework",
|
||||||
|
status: "optional",
|
||||||
|
});
|
||||||
|
|
||||||
|
if (props.targetAndroid12) {
|
||||||
|
config = AndroidConfig.Version.withBuildScriptExtMinimumVersion(config, {
|
||||||
|
name: "compileSdkVersion",
|
||||||
|
minVersion: 31,
|
||||||
|
});
|
||||||
|
|
||||||
|
config = AndroidConfig.Permissions.withPermissions(config, [
|
||||||
|
"com.google.android.gms.permission.AD_ID",
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
config = withGradle(config);
|
||||||
|
|
||||||
|
// Return the modified config.
|
||||||
|
return config;
|
||||||
|
};
|
||||||
|
|
||||||
|
const pkg = {
|
||||||
|
// Prevent this plugin from being run more than once.
|
||||||
|
// This pattern enables users to safely migrate off of this
|
||||||
|
// out-of-tree `@config-plugins/react-native-adjust` to a future
|
||||||
|
// upstream plugin in `react-native-adjust`
|
||||||
|
name: "react-native-adjust",
|
||||||
|
// Indicates that this plugin is dangerously linked to a module,
|
||||||
|
// and might not work with the latest version of that module.
|
||||||
|
version: "UNVERSIONED",
|
||||||
|
};
|
||||||
|
|
||||||
|
export default createRunOncePlugin(withAdjustPlugin, pkg.name, pkg.version);
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"extends": "expo-module-scripts/tsconfig.plugin",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "./build"
|
||||||
|
},
|
||||||
|
"include": ["./src"],
|
||||||
|
"exclude": ["**/__mocks__/*", "**/__tests__/*"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
### @config-plugins/react-native-ble-plx [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||||
|
|
||||||
|
|
||||||
|
### Continuous Integration
|
||||||
|
|
||||||
|
* fix versions [skip ci] ([#53](https://github.com/expo/config-plugins/issues/53)) ([5de4ae3](https://github.com/expo/config-plugins/commit/5de4ae3e6182c32b7aa24d70ccd23a11663bb089))
|
||||||
|
|
||||||
|
## @config-plugins/react-native-ble-plx 1.0.0 (2022-03-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Other chores
|
||||||
|
|
||||||
|
* upgrade @expo/config-plugins ([#49](https://github.com/expo/config-plugins/issues/49)) ([119e31e](https://github.com/expo/config-plugins/commit/119e31edf110409272ace750f02d651124e1a22d))
|
||||||
@@ -4,7 +4,7 @@ Config plugin to auto configure `react-native-ble-plx` when the native code is g
|
|||||||
|
|
||||||
## Expo installation
|
## Expo installation
|
||||||
|
|
||||||
> Tested against Expo SDK 43
|
> Tested against Expo SDK 44
|
||||||
|
|
||||||
> This package cannot be used in the "Expo Go" app because [it requires custom native code](https://docs.expo.io/workflow/customizing/).
|
> This package cannot be used in the "Expo Go" app because [it requires custom native code](https://docs.expo.io/workflow/customizing/).
|
||||||
> First install the package with yarn, npm, or [`expo install`](https://docs.expo.io/workflow/expo-cli/#expo-install).
|
> First install the package with yarn, npm, or [`expo install`](https://docs.expo.io/workflow/expo-cli/#expo-install).
|
||||||
|
|||||||
@@ -1,10 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "@config-plugins/react-native-ble-plx",
|
"name": "@config-plugins/react-native-ble-plx",
|
||||||
"version": "0.0.2",
|
"version": "1.0.1",
|
||||||
"description": "Config plugin to auto configure react-native-ble-plx on prebuild",
|
"description": "Config plugin to auto configure react-native-ble-plx on prebuild",
|
||||||
"main": "build/withBLE.js",
|
"main": "build/withBLE.js",
|
||||||
"types": "build/withBLE.d.ts",
|
"types": "build/withBLE.d.ts",
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/expo/config-plugins.git",
|
||||||
|
"directory": "packages/react-native-ble-plx"
|
||||||
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"build",
|
"build",
|
||||||
"app.plugin.js"
|
"app.plugin.js"
|
||||||
@@ -26,9 +31,10 @@
|
|||||||
"preset": "expo-module-scripts"
|
"preset": "expo-module-scripts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@expo/config-plugins": "^4.0.7"
|
"@expo/config-plugins": "^4.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"expo-module-scripts": "^2.0.0"
|
"expo-module-scripts": "^2.0.0"
|
||||||
}
|
},
|
||||||
|
"upstreamPackage": "react-native-ble-plx"
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
### @config-plugins/react-native-blob-util [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||||
|
|
||||||
|
|
||||||
|
### Continuous Integration
|
||||||
|
|
||||||
|
* fix versions [skip ci] ([#53](https://github.com/expo/config-plugins/issues/53)) ([5de4ae3](https://github.com/expo/config-plugins/commit/5de4ae3e6182c32b7aa24d70ccd23a11663bb089))
|
||||||
|
|
||||||
|
### @config-plugins/react-native-blob-util [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **ci:** use correct internal versions ([ab8076a](https://github.com/expo/config-plugins/commit/ab8076adf51e9ba0439eba60b153d729a0996b8d))
|
||||||
|
|
||||||
|
## @config-plugins/react-native-blob-util 1.0.0 (2022-03-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Other chores
|
||||||
|
|
||||||
|
* upgrade @expo/config-plugins ([#49](https://github.com/expo/config-plugins/issues/49)) ([119e31e](https://github.com/expo/config-plugins/commit/119e31edf110409272ace750f02d651124e1a22d))
|
||||||
@@ -4,7 +4,7 @@ Config plugin to auto configure [`react-native-blob-util`][lib] when the native
|
|||||||
|
|
||||||
### Add the package to your npm dependencies
|
### Add the package to your npm dependencies
|
||||||
|
|
||||||
> Tested against Expo SDK 43
|
> Tested against Expo SDK 44
|
||||||
|
|
||||||
```
|
```
|
||||||
yarn add react-native-blob-util @config-plugins/react-native-blob-util
|
yarn add react-native-blob-util @config-plugins/react-native-blob-util
|
||||||
|
|||||||
@@ -1,10 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "@config-plugins/react-native-blob-util",
|
"name": "@config-plugins/react-native-blob-util",
|
||||||
"version": "0.0.0",
|
"version": "1.0.2",
|
||||||
"description": "Config plugin to auto configure react-native-blob-util on prebuild",
|
"description": "Config plugin to auto configure react-native-blob-util on prebuild",
|
||||||
"main": "build/withReactNativeBlobUtil.js",
|
"main": "build/withReactNativeBlobUtil.js",
|
||||||
"types": "build/withReactNativeBlobUtil.d.ts",
|
"types": "build/withReactNativeBlobUtil.d.ts",
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/expo/config-plugins.git",
|
||||||
|
"directory": "packages/react-native-blob-util"
|
||||||
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"build",
|
"build",
|
||||||
"app.plugin.js"
|
"app.plugin.js"
|
||||||
@@ -27,9 +32,10 @@
|
|||||||
"preset": "expo-module-scripts"
|
"preset": "expo-module-scripts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@expo/config-plugins": "^4.0.7"
|
"@expo/config-plugins": "^4.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"expo-module-scripts": "^2.0.0"
|
"expo-module-scripts": "^2.0.0"
|
||||||
}
|
},
|
||||||
|
"upstreamPackage": "react-native-blob-util"
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
// @generated by expo-module-scripts
|
||||||
|
module.exports = require('expo-module-scripts/eslintrc.base.js');
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
### @config-plugins/react-native-branch [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||||
|
|
||||||
|
|
||||||
|
### Continuous Integration
|
||||||
|
|
||||||
|
* fix versions [skip ci] ([#53](https://github.com/expo/config-plugins/issues/53)) ([5de4ae3](https://github.com/expo/config-plugins/commit/5de4ae3e6182c32b7aa24d70ccd23a11663bb089))
|
||||||
|
|
||||||
|
## @config-plugins/react-native-branch 1.0.0 (2022-03-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* create react-native-branch plugin ([0b06baa](https://github.com/expo/config-plugins/commit/0b06baa2b486c5e02d433a4ac785960934f403b9))
|
||||||
|
* support for universalLinkDomains ([01ca879](https://github.com/expo/config-plugins/commit/01ca879ca3f6cebac1177d74969337819a5fc72d))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* added expo-module.config.json to files ([57d589b](https://github.com/expo/config-plugins/commit/57d589ba8ad60e057b34ad7b2f404f67e85896ab))
|
||||||
|
* fixed MATCH_INIT for SDKv44 ([904741a](https://github.com/expo/config-plugins/commit/904741a3bdb02f5bb76ebcf44131f1698dad0831))
|
||||||
|
* fixed missing files when publish ([ebb8666](https://github.com/expo/config-plugins/commit/ebb86666d6e61a70838048839b144c7217886d73))
|
||||||
|
* removed proguard-rules.pro edit step ([e1159b4](https://github.com/expo/config-plugins/commit/e1159b4021ab722cf3998479e6a459374bdb5075))
|
||||||
|
* updates from code-reviews ([597ffc3](https://github.com/expo/config-plugins/commit/597ffc3bd76517ac96c39b77d8b76e6aee2609dd))
|
||||||
|
* **android:** added `onNewIntent` handler ([31ed997](https://github.com/expo/config-plugins/commit/31ed9978ca6c0a079341b5b4be5479a5e5633f79))
|
||||||
|
* rename module ([7f0dd05](https://github.com/expo/config-plugins/commit/7f0dd05fdc15293b84606cb000bcd7321b418de8))
|
||||||
|
* respect old config from expo-branch ([d0e0186](https://github.com/expo/config-plugins/commit/d0e018601c09c0e92191a4eb2998ab0e6fa1c6ec))
|
||||||
|
|
||||||
|
|
||||||
|
### Code Refactoring
|
||||||
|
|
||||||
|
* **android:** migrate to new expo modules system ([1ac233e](https://github.com/expo/config-plugins/commit/1ac233eb432eaeeb7ead6723a4a232f86cfc8e50))
|
||||||
|
* **ios:** migrate to new expo modules system ([a98a6e0](https://github.com/expo/config-plugins/commit/a98a6e022fc06f8b9c996e4e2b4a1d7aac830d8a))
|
||||||
|
* update plugin to use CodeMod ([ae66cac](https://github.com/expo/config-plugins/commit/ae66cac141847e33add62cc30375620e1a5cc1d0))
|
||||||
|
|
||||||
|
|
||||||
|
### Other chores
|
||||||
|
|
||||||
|
* apply suggestions from code review ([0ccc227](https://github.com/expo/config-plugins/commit/0ccc22771d5ecc97da7720c362ecf90a76e5de1c))
|
||||||
|
* cleanup android gitignore ([c88609a](https://github.com/expo/config-plugins/commit/c88609a8666be1b4137a3694bd844bb6a0f1ec12))
|
||||||
|
* latest cleanup ([ef50c05](https://github.com/expo/config-plugins/commit/ef50c05892b965e2ccd70418da962f2c3d96ab2e))
|
||||||
|
* rename files to avoid possible conflict ([d0b32ce](https://github.com/expo/config-plugins/commit/d0b32ce4a1c28060e61e7109f59be215c5f92f14))
|
||||||
|
* rename module ([71e429b](https://github.com/expo/config-plugins/commit/71e429b77fca05953e94636b31e9b1b8da2ddcb6))
|
||||||
|
* upgrade @expo/config-plugins ([#49](https://github.com/expo/config-plugins/issues/49)) ([119e31e](https://github.com/expo/config-plugins/commit/119e31edf110409272ace750f02d651124e1a22d))
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
# config-plugins/react-native-branch
|
||||||
|
|
||||||
|
Config plugin to auto configure `react-native-branch` when the native code is generated (`expo prebuild`).
|
||||||
|
|
||||||
|
## Expo installation
|
||||||
|
|
||||||
|
> Tested against Expo SDK 44
|
||||||
|
|
||||||
|
> This package cannot be used in the "Expo Go" app because [it requires custom native code](https://docs.expo.io/workflow/customizing/).
|
||||||
|
> First install the package with yarn, npm, or [`expo install`](https://docs.expo.io/workflow/expo-cli/#expo-install).
|
||||||
|
|
||||||
|
```sh
|
||||||
|
expo install react-native-branch @config-plugins/react-native-branch
|
||||||
|
```
|
||||||
|
|
||||||
|
After installing this npm package, add the [config plugin](https://docs.expo.io/guides/config-plugins/) to the [`plugins`](https://docs.expo.io/versions/latest/config/app/#plugins) array of your `app.json` or `app.config.js`:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"expo": {
|
||||||
|
"plugins": ["@config-plugins/react-native-branch"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Next, rebuild your app as described in the ["Adding custom native code"](https://docs.expo.io/workflow/customizing/) guide.
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
The plugin provides props for extra customization. Every time you change the props or plugins, you'll need to rebuild (and `prebuild`) the native app. If no extra properties are added, defaults will be used.
|
||||||
|
|
||||||
|
- `apiKey` (_string_): Branch API key. Optional.
|
||||||
|
- `iosAppDomain` (_string_): App Domain for iOS. Optional.
|
||||||
|
|
||||||
|
#### Example
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"expo": {
|
||||||
|
"plugins": [
|
||||||
|
[
|
||||||
|
"@config-plugins/react-native-branch",
|
||||||
|
{
|
||||||
|
"apiKey": "key_live_f9f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8",
|
||||||
|
"iosAppDomain": "awesome-alternate.app.link",
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# Gradle files
|
||||||
|
.gradle/
|
||||||
|
build/
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
apply plugin: 'com.android.library'
|
||||||
|
apply plugin: 'kotlin-android'
|
||||||
|
|
||||||
|
group = 'host.exp.exponent'
|
||||||
|
version = '0.0.1'
|
||||||
|
|
||||||
|
buildscript {
|
||||||
|
// Simple helper that allows the root project to override versions declared by this library.
|
||||||
|
ext.safeExtGet = { prop, fallback ->
|
||||||
|
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion', '1.4.21')}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdkVersion safeExtGet("compileSdkVersion", 30)
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
minSdkVersion safeExtGet("minSdkVersion", 21)
|
||||||
|
targetSdkVersion safeExtGet("targetSdkVersion", 30)
|
||||||
|
versionCode 1
|
||||||
|
versionName '1.1.0'
|
||||||
|
}
|
||||||
|
lintOptions {
|
||||||
|
abortOnError false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation project(':expo-modules-core')
|
||||||
|
implementation project(':react-native-branch')
|
||||||
|
|
||||||
|
//noinspection GradleDynamicVersion
|
||||||
|
implementation 'com.facebook.react:react-native:+'
|
||||||
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${safeExtGet('kotlinVersion', '1.4.21')}"
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<manifest package="expo.modules.adapters.branch">
|
||||||
|
</manifest>
|
||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
package expo.modules.adapters.branch
|
||||||
|
|
||||||
|
import android.app.Application
|
||||||
|
import android.content.Context
|
||||||
|
import expo.modules.core.interfaces.ApplicationLifecycleListener
|
||||||
|
import io.branch.rnbranch.RNBranchModule
|
||||||
|
|
||||||
|
class BranchApplicationLifecycleListener(context: Context?) : ApplicationLifecycleListener {
|
||||||
|
var context = context
|
||||||
|
|
||||||
|
override fun onCreate(application: Application) {
|
||||||
|
super.onCreate(application)
|
||||||
|
RNBranchModule.getAutoInstance(this.context)
|
||||||
|
}
|
||||||
|
}
|
||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
package expo.modules.adapters.branch
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import expo.modules.core.interfaces.ApplicationLifecycleListener
|
||||||
|
import expo.modules.core.interfaces.Package
|
||||||
|
import expo.modules.core.interfaces.ReactActivityLifecycleListener
|
||||||
|
|
||||||
|
class BranchPackage : Package {
|
||||||
|
override fun createApplicationLifecycleListeners(context: Context?): List<ApplicationLifecycleListener> {
|
||||||
|
return listOf(BranchApplicationLifecycleListener(context))
|
||||||
|
}
|
||||||
|
override fun createReactActivityLifecycleListeners(activityContext: Context): List<ReactActivityLifecycleListener> {
|
||||||
|
return listOf(BranchReactActivityLifecycleListener(activityContext))
|
||||||
|
}
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
package expo.modules.adapters.branch
|
||||||
|
|
||||||
|
import android.app.Activity
|
||||||
|
import android.content.Context
|
||||||
|
import android.content.Intent
|
||||||
|
import android.os.Bundle
|
||||||
|
import expo.modules.core.interfaces.ReactActivityLifecycleListener
|
||||||
|
import io.branch.rnbranch.RNBranchModule
|
||||||
|
|
||||||
|
|
||||||
|
class BranchReactActivityLifecycleListener(activityContext: Context) : ReactActivityLifecycleListener {
|
||||||
|
override fun onCreate(activity: Activity, savedInstanceState: Bundle?) {
|
||||||
|
RNBranchModule.initSession(activity.getIntent().getData(), activity);
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onNewIntent(intent: Intent?): Boolean {
|
||||||
|
if (intent != null) {
|
||||||
|
RNBranchModule.onNewIntent(intent);
|
||||||
|
}
|
||||||
|
return super.onNewIntent(intent)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
module.exports = require("./build/withBranch");
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
export declare type ConfigData = {
|
||||||
|
apiKey?: string;
|
||||||
|
iosAppDomain?: string;
|
||||||
|
iosUniversalLinkDomains?: string[];
|
||||||
|
};
|
||||||
+2
@@ -0,0 +1,2 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
+4
@@ -0,0 +1,4 @@
|
|||||||
|
import type { ConfigPlugin } from "@expo/config-plugins";
|
||||||
|
import type { ConfigData } from "./types";
|
||||||
|
declare const _default: ConfigPlugin<ConfigData>;
|
||||||
|
export default _default;
|
||||||
+23
@@ -0,0 +1,23 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
const config_plugins_1 = require("@expo/config-plugins");
|
||||||
|
const withBranchAndroid_1 = require("./withBranchAndroid");
|
||||||
|
const withBranchIOS_1 = require("./withBranchIOS");
|
||||||
|
const withBranch = (config, { apiKey, iosAppDomain, iosUniversalLinkDomains } = {}) => {
|
||||||
|
config = withBranchAndroid_1.withBranchAndroid(config, { apiKey });
|
||||||
|
config = withBranchIOS_1.withBranchIOS(config, {
|
||||||
|
apiKey,
|
||||||
|
iosAppDomain,
|
||||||
|
iosUniversalLinkDomains,
|
||||||
|
});
|
||||||
|
return config;
|
||||||
|
};
|
||||||
|
let pkg = {
|
||||||
|
name: "react-native-branch",
|
||||||
|
};
|
||||||
|
try {
|
||||||
|
const branchPkg = require("react-native-branch/package.json");
|
||||||
|
pkg = branchPkg;
|
||||||
|
}
|
||||||
|
catch (_a) { }
|
||||||
|
exports.default = config_plugins_1.createRunOncePlugin(withBranch, pkg.name, pkg.version);
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
import { AndroidConfig } from "@expo/config-plugins";
|
||||||
|
import type { ConfigPlugin } from "@expo/config-plugins";
|
||||||
|
import type { ExpoConfig } from "@expo/config-types";
|
||||||
|
export declare function getBranchApiKey(config: ExpoConfig): string | null;
|
||||||
|
export declare function setBranchApiKey(apiKey: string, androidManifest: AndroidConfig.Manifest.AndroidManifest): AndroidConfig.Manifest.AndroidManifest;
|
||||||
|
export declare const withBranchAndroid: ConfigPlugin<{
|
||||||
|
apiKey?: string;
|
||||||
|
}>;
|
||||||
+37
@@ -0,0 +1,37 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.withBranchAndroid = exports.setBranchApiKey = exports.getBranchApiKey = void 0;
|
||||||
|
const config_plugins_1 = require("@expo/config-plugins");
|
||||||
|
const { addMetaDataItemToMainApplication, getMainApplicationOrThrow, removeMetaDataItemFromMainApplication, } = config_plugins_1.AndroidConfig.Manifest;
|
||||||
|
const META_BRANCH_KEY = "io.branch.sdk.BranchKey";
|
||||||
|
function getBranchApiKey(config) {
|
||||||
|
var _a, _b, _c, _d;
|
||||||
|
return (_d = (_c = (_b = (_a = config.android) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.branch) === null || _c === void 0 ? void 0 : _c.apiKey) !== null && _d !== void 0 ? _d : null;
|
||||||
|
}
|
||||||
|
exports.getBranchApiKey = getBranchApiKey;
|
||||||
|
function setBranchApiKey(apiKey, androidManifest) {
|
||||||
|
const mainApplication = getMainApplicationOrThrow(androidManifest);
|
||||||
|
if (apiKey) {
|
||||||
|
// If the item exists, add it back
|
||||||
|
addMetaDataItemToMainApplication(mainApplication, META_BRANCH_KEY, apiKey);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Remove any existing item
|
||||||
|
removeMetaDataItemFromMainApplication(mainApplication, META_BRANCH_KEY);
|
||||||
|
}
|
||||||
|
return androidManifest;
|
||||||
|
}
|
||||||
|
exports.setBranchApiKey = setBranchApiKey;
|
||||||
|
const withBranchAndroid = (config, data) => {
|
||||||
|
var _a;
|
||||||
|
const apiKey = (_a = data.apiKey) !== null && _a !== void 0 ? _a : getBranchApiKey(config);
|
||||||
|
if (!apiKey) {
|
||||||
|
throw new Error("Branch API key is required");
|
||||||
|
}
|
||||||
|
config = config_plugins_1.withAndroidManifest(config, (config) => {
|
||||||
|
config.modResults = setBranchApiKey(apiKey, config.modResults);
|
||||||
|
return config;
|
||||||
|
});
|
||||||
|
return config;
|
||||||
|
};
|
||||||
|
exports.withBranchAndroid = withBranchAndroid;
|
||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
import type { ConfigPlugin, InfoPlist } from "@expo/config-plugins";
|
||||||
|
import type { ExpoConfig } from "@expo/config-types";
|
||||||
|
import type { ConfigData } from "./types";
|
||||||
|
export declare function getBranchApiKey(config: Pick<ExpoConfig, "ios">): string | null;
|
||||||
|
export declare function setBranchApiKey(apiKey: string, infoPlist: InfoPlist): InfoPlist;
|
||||||
|
export declare const withBranchIOS: ConfigPlugin<ConfigData>;
|
||||||
+52
@@ -0,0 +1,52 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.withBranchIOS = exports.setBranchApiKey = exports.getBranchApiKey = void 0;
|
||||||
|
const config_plugins_1 = require("@expo/config-plugins");
|
||||||
|
function getBranchApiKey(config) {
|
||||||
|
var _a, _b, _c, _d;
|
||||||
|
return (_d = (_c = (_b = (_a = config.ios) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.branch) === null || _c === void 0 ? void 0 : _c.apiKey) !== null && _d !== void 0 ? _d : null;
|
||||||
|
}
|
||||||
|
exports.getBranchApiKey = getBranchApiKey;
|
||||||
|
function setBranchApiKey(apiKey, infoPlist) {
|
||||||
|
if (apiKey === null) {
|
||||||
|
return infoPlist;
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
...infoPlist,
|
||||||
|
branch_key: {
|
||||||
|
live: apiKey,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
exports.setBranchApiKey = setBranchApiKey;
|
||||||
|
const withBranchIOS = (config, data) => {
|
||||||
|
var _a;
|
||||||
|
// Ensure object exist
|
||||||
|
if (!config.ios) {
|
||||||
|
config.ios = {};
|
||||||
|
}
|
||||||
|
const apiKey = (_a = data.apiKey) !== null && _a !== void 0 ? _a : getBranchApiKey(config);
|
||||||
|
if (!apiKey) {
|
||||||
|
throw new Error("Branch API key is required");
|
||||||
|
}
|
||||||
|
// Update the infoPlist with the branch key and branch domain
|
||||||
|
config = config_plugins_1.withInfoPlist(config, (config) => {
|
||||||
|
config.modResults = setBranchApiKey(apiKey, config.modResults);
|
||||||
|
if (data.iosAppDomain) {
|
||||||
|
config.modResults.branch_app_domain = data.iosAppDomain;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
delete config.modResults.branch_app_domain;
|
||||||
|
}
|
||||||
|
if (data.iosUniversalLinkDomains) {
|
||||||
|
config.modResults.branch_universal_link_domains =
|
||||||
|
data.iosUniversalLinkDomains;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
delete config.modResults.branch_universal_link_domains;
|
||||||
|
}
|
||||||
|
return config;
|
||||||
|
});
|
||||||
|
return config;
|
||||||
|
};
|
||||||
|
exports.withBranchIOS = withBranchIOS;
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"platforms": [
|
||||||
|
"android",
|
||||||
|
"ios"
|
||||||
|
],
|
||||||
|
"ios": {
|
||||||
|
"appDelegateSubscribers": ["BranchAppDelegate"]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
require 'json'
|
||||||
|
|
||||||
|
package = JSON.parse(File.read(File.join(__dir__, '..', 'package.json')))
|
||||||
|
|
||||||
|
Pod::Spec.new do |s|
|
||||||
|
s.name = 'ExpoAdapterBranch'
|
||||||
|
s.version = package['version']
|
||||||
|
s.summary = package['description']
|
||||||
|
s.description = package['description']
|
||||||
|
s.license = package['license']
|
||||||
|
s.author = package['author']
|
||||||
|
s.homepage = package['homepage']
|
||||||
|
s.platform = :ios, '12.0'
|
||||||
|
s.swift_version = '5.4'
|
||||||
|
s.source = { git: 'https://github.com/expo/config-plugins.git' }
|
||||||
|
s.static_framework = true
|
||||||
|
|
||||||
|
s.compiler_flags = %[-DRNBRANCH_VERSION=@\\"#{package["dependencies"]["react-native-branch"]}\\"]
|
||||||
|
|
||||||
|
s.dependency 'ExpoModulesCore'
|
||||||
|
s.dependency 'React-Core'
|
||||||
|
s.dependency 'react-native-branch'
|
||||||
|
|
||||||
|
# Swift/Objective-C compatibility
|
||||||
|
s.pod_target_xcconfig = {
|
||||||
|
'DEFINES_MODULE' => 'YES'
|
||||||
|
}
|
||||||
|
|
||||||
|
if !$ExpoUseSources&.include?(package['name']) && ENV['EXPO_USE_SOURCE'].to_i == 0 && File.exist?("#{s.name}.xcframework") && Gem::Version.new(Pod::VERSION) >= Gem::Version.new('1.10.0')
|
||||||
|
s.source_files = "#{s.name}/**/*.h"
|
||||||
|
s.vendored_frameworks = "#{s.name}.xcframework"
|
||||||
|
else
|
||||||
|
s.source_files = "#{s.name}/**/*.{h,m,swift}"
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
import ExpoModulesCore
|
||||||
|
import RNBranch
|
||||||
|
|
||||||
|
public class BranchAppDelegate: ExpoAppDelegateSubscriber {
|
||||||
|
public func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
|
||||||
|
RNBranch.initSession(launchOptions: launchOptions, isReferrable: true)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
public func application(_ application: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
|
||||||
|
return RNBranch.application(application, open:url, options:options)
|
||||||
|
}
|
||||||
|
|
||||||
|
public func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
|
||||||
|
return RNBranch.continue(userActivity)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
module.exports = require('expo-module-scripts/jest-preset-plugin');
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"name": "@config-plugins/react-native-branch",
|
||||||
|
"version": "1.0.1",
|
||||||
|
"description": "Config plugin to auto configure react-native-branch on prebuild",
|
||||||
|
"author": "650 Industries, Inc.",
|
||||||
|
"license": "MIT",
|
||||||
|
"homepage": "https://docs.expo.dev/versions/latest/sdk/branch/",
|
||||||
|
"main": "build/withBranch.js",
|
||||||
|
"types": "build/withBranch.d.ts",
|
||||||
|
"sideEffects": false,
|
||||||
|
"files": [
|
||||||
|
"android",
|
||||||
|
"app.plugin.js",
|
||||||
|
"build",
|
||||||
|
"expo-module.config.json",
|
||||||
|
"ios"
|
||||||
|
],
|
||||||
|
"scripts": {
|
||||||
|
"build": "expo-module build",
|
||||||
|
"clean": "expo-module clean",
|
||||||
|
"lint": "expo-module lint",
|
||||||
|
"test": "expo-module test",
|
||||||
|
"prepare": "expo-module prepare",
|
||||||
|
"prepublishOnly": "expo-module prepublishOnly",
|
||||||
|
"expo-module": "expo-module"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"expo",
|
||||||
|
"react-native",
|
||||||
|
"react-native-branch"
|
||||||
|
],
|
||||||
|
"jest": {
|
||||||
|
"preset": "expo-module-scripts"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@expo/config-plugins": "^4.1.0",
|
||||||
|
"@expo/config-types": "^43.0.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"expo-module-scripts": "^2.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
export type ConfigData = {
|
||||||
|
apiKey?: string;
|
||||||
|
iosAppDomain?: string;
|
||||||
|
iosUniversalLinkDomains?: string[];
|
||||||
|
};
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
import { createRunOncePlugin } from "@expo/config-plugins";
|
||||||
|
import type { ConfigPlugin } from "@expo/config-plugins";
|
||||||
|
|
||||||
|
import { withBranchAndroid } from "./withBranchAndroid";
|
||||||
|
import { withBranchIOS } from "./withBranchIOS";
|
||||||
|
import type { ConfigData } from "./types";
|
||||||
|
|
||||||
|
const withBranch: ConfigPlugin<ConfigData> = (
|
||||||
|
config,
|
||||||
|
{ apiKey, iosAppDomain, iosUniversalLinkDomains } = {}
|
||||||
|
) => {
|
||||||
|
config = withBranchAndroid(config, { apiKey });
|
||||||
|
config = withBranchIOS(config, {
|
||||||
|
apiKey,
|
||||||
|
iosAppDomain,
|
||||||
|
iosUniversalLinkDomains,
|
||||||
|
});
|
||||||
|
return config;
|
||||||
|
};
|
||||||
|
|
||||||
|
let pkg: { name: string; version?: string } = {
|
||||||
|
name: "react-native-branch",
|
||||||
|
};
|
||||||
|
try {
|
||||||
|
const branchPkg = require("react-native-branch/package.json");
|
||||||
|
pkg = branchPkg;
|
||||||
|
} catch {}
|
||||||
|
|
||||||
|
export default createRunOncePlugin(withBranch, pkg.name, pkg.version);
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
import { AndroidConfig, withAndroidManifest } from "@expo/config-plugins";
|
||||||
|
import type { ConfigPlugin } from "@expo/config-plugins";
|
||||||
|
import type { ExpoConfig } from "@expo/config-types";
|
||||||
|
|
||||||
|
const {
|
||||||
|
addMetaDataItemToMainApplication,
|
||||||
|
getMainApplicationOrThrow,
|
||||||
|
removeMetaDataItemFromMainApplication,
|
||||||
|
} = AndroidConfig.Manifest;
|
||||||
|
|
||||||
|
const META_BRANCH_KEY = "io.branch.sdk.BranchKey";
|
||||||
|
|
||||||
|
export function getBranchApiKey(config: ExpoConfig) {
|
||||||
|
return config.android?.config?.branch?.apiKey ?? null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function setBranchApiKey(
|
||||||
|
apiKey: string,
|
||||||
|
androidManifest: AndroidConfig.Manifest.AndroidManifest
|
||||||
|
) {
|
||||||
|
const mainApplication = getMainApplicationOrThrow(androidManifest);
|
||||||
|
|
||||||
|
if (apiKey) {
|
||||||
|
// If the item exists, add it back
|
||||||
|
addMetaDataItemToMainApplication(mainApplication, META_BRANCH_KEY, apiKey);
|
||||||
|
} else {
|
||||||
|
// Remove any existing item
|
||||||
|
removeMetaDataItemFromMainApplication(mainApplication, META_BRANCH_KEY);
|
||||||
|
}
|
||||||
|
|
||||||
|
return androidManifest;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const withBranchAndroid: ConfigPlugin<{ apiKey?: string }> = (
|
||||||
|
config,
|
||||||
|
data
|
||||||
|
) => {
|
||||||
|
const apiKey = data.apiKey ?? getBranchApiKey(config);
|
||||||
|
if (!apiKey) {
|
||||||
|
throw new Error("Branch API key is required");
|
||||||
|
}
|
||||||
|
|
||||||
|
config = withAndroidManifest(config, (config) => {
|
||||||
|
config.modResults = setBranchApiKey(apiKey, config.modResults);
|
||||||
|
return config;
|
||||||
|
});
|
||||||
|
|
||||||
|
return config;
|
||||||
|
};
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
import { withInfoPlist } from "@expo/config-plugins";
|
||||||
|
import type { ConfigPlugin, InfoPlist } from "@expo/config-plugins";
|
||||||
|
import type { ExpoConfig } from "@expo/config-types";
|
||||||
|
import type { ConfigData } from "./types";
|
||||||
|
|
||||||
|
export function getBranchApiKey(config: Pick<ExpoConfig, "ios">) {
|
||||||
|
return config.ios?.config?.branch?.apiKey ?? null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function setBranchApiKey(
|
||||||
|
apiKey: string,
|
||||||
|
infoPlist: InfoPlist
|
||||||
|
): InfoPlist {
|
||||||
|
if (apiKey === null) {
|
||||||
|
return infoPlist;
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
...infoPlist,
|
||||||
|
branch_key: {
|
||||||
|
live: apiKey,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export const withBranchIOS: ConfigPlugin<ConfigData> = (config, data) => {
|
||||||
|
// Ensure object exist
|
||||||
|
if (!config.ios) {
|
||||||
|
config.ios = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
const apiKey = data.apiKey ?? getBranchApiKey(config);
|
||||||
|
if (!apiKey) {
|
||||||
|
throw new Error("Branch API key is required");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update the infoPlist with the branch key and branch domain
|
||||||
|
config = withInfoPlist(config, (config) => {
|
||||||
|
config.modResults = setBranchApiKey(apiKey, config.modResults);
|
||||||
|
if (data.iosAppDomain) {
|
||||||
|
config.modResults.branch_app_domain = data.iosAppDomain;
|
||||||
|
} else {
|
||||||
|
delete config.modResults.branch_app_domain;
|
||||||
|
}
|
||||||
|
if (data.iosUniversalLinkDomains) {
|
||||||
|
config.modResults.branch_universal_link_domains =
|
||||||
|
data.iosUniversalLinkDomains;
|
||||||
|
} else {
|
||||||
|
delete config.modResults.branch_universal_link_domains;
|
||||||
|
}
|
||||||
|
return config;
|
||||||
|
});
|
||||||
|
|
||||||
|
return config;
|
||||||
|
};
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"extends": "expo-module-scripts/tsconfig.plugin",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "build",
|
||||||
|
"rootDir": "src"
|
||||||
|
},
|
||||||
|
"include": ["./src"],
|
||||||
|
"exclude": ["**/__mocks__/*", "**/__tests__/*"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
### @config-plugins/react-native-callkeep [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||||
|
|
||||||
|
|
||||||
|
### Continuous Integration
|
||||||
|
|
||||||
|
* fix versions [skip ci] ([#53](https://github.com/expo/config-plugins/issues/53)) ([5de4ae3](https://github.com/expo/config-plugins/commit/5de4ae3e6182c32b7aa24d70ccd23a11663bb089))
|
||||||
|
|
||||||
|
## @config-plugins/react-native-callkeep 1.0.0 (2022-03-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Other chores
|
||||||
|
|
||||||
|
* upgrade @expo/config-plugins ([#49](https://github.com/expo/config-plugins/issues/49)) ([119e31e](https://github.com/expo/config-plugins/commit/119e31edf110409272ace750f02d651124e1a22d))
|
||||||
@@ -4,7 +4,7 @@ Config plugin to auto configure react-native-callkeep when the native code is ge
|
|||||||
|
|
||||||
### Add the package to your npm dependencies
|
### Add the package to your npm dependencies
|
||||||
|
|
||||||
> Tested against Expo SDK 43
|
> Tested against Expo SDK 44
|
||||||
|
|
||||||
```
|
```
|
||||||
yarn add react-native-callkeep @config-plugins/react-native-callkeep
|
yarn add react-native-callkeep @config-plugins/react-native-callkeep
|
||||||
|
|||||||
+1
-1
@@ -94,7 +94,7 @@ const withCallkeep = (config) => {
|
|||||||
};
|
};
|
||||||
const withXcodeLinkBinaryWithLibraries = (config, { library, status }) => {
|
const withXcodeLinkBinaryWithLibraries = (config, { library, status }) => {
|
||||||
return config_plugins_1.withXcodeProject(config, (config) => {
|
return config_plugins_1.withXcodeProject(config, (config) => {
|
||||||
const options = status === "optional" ? { settings: { ATTRIBUTES: ["Weak"] } } : {};
|
const options = status === "optional" ? { weak: true } : {};
|
||||||
const target = config_plugins_1.IOSConfig.XcodeUtils.getApplicationNativeTarget({
|
const target = config_plugins_1.IOSConfig.XcodeUtils.getApplicationNativeTarget({
|
||||||
project: config.modResults,
|
project: config.modResults,
|
||||||
projectName: config.modRequest.projectName,
|
projectName: config.modRequest.projectName,
|
||||||
|
|||||||
@@ -1,10 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "@config-plugins/react-native-callkeep",
|
"name": "@config-plugins/react-native-callkeep",
|
||||||
"version": "0.0.1",
|
"version": "1.0.1",
|
||||||
"description": "Config plugin to auto configure callkeep on prebuild",
|
"description": "Config plugin to auto configure callkeep on prebuild",
|
||||||
"main": "build/withCallkeep.js",
|
"main": "build/withCallkeep.js",
|
||||||
"types": "build/withCallkeep.d.ts",
|
"types": "build/withCallkeep.d.ts",
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/expo/config-plugins.git",
|
||||||
|
"directory": "packages/react-native-callkeep"
|
||||||
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"build",
|
"build",
|
||||||
"app.plugin.js"
|
"app.plugin.js"
|
||||||
@@ -26,9 +31,10 @@
|
|||||||
"preset": "expo-module-scripts"
|
"preset": "expo-module-scripts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@expo/config-plugins": "^4.0.7"
|
"@expo/config-plugins": "^4.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"expo-module-scripts": "^2.0.0"
|
"expo-module-scripts": "^2.0.0"
|
||||||
}
|
},
|
||||||
|
"upstreamPackage": "react-native-callkeep"
|
||||||
}
|
}
|
||||||
@@ -130,7 +130,7 @@ export const withXcodeLinkBinaryWithLibraries: ConfigPlugin<{
|
|||||||
}> = (config, { library, status }) => {
|
}> = (config, { library, status }) => {
|
||||||
return withXcodeProject(config, (config) => {
|
return withXcodeProject(config, (config) => {
|
||||||
const options =
|
const options =
|
||||||
status === "optional" ? { settings: { ATTRIBUTES: ["Weak"] } } : {};
|
status === "optional" ? { weak: true } : {};
|
||||||
|
|
||||||
const target = IOSConfig.XcodeUtils.getApplicationNativeTarget({
|
const target = IOSConfig.XcodeUtils.getApplicationNativeTarget({
|
||||||
project: config.modResults,
|
project: config.modResults,
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
### @config-plugins/react-native-dynamic-app-icon [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||||
|
|
||||||
|
|
||||||
|
### Continuous Integration
|
||||||
|
|
||||||
|
* fix versions [skip ci] ([#53](https://github.com/expo/config-plugins/issues/53)) ([5de4ae3](https://github.com/expo/config-plugins/commit/5de4ae3e6182c32b7aa24d70ccd23a11663bb089))
|
||||||
|
|
||||||
|
## @config-plugins/react-native-dynamic-app-icon 1.0.0 (2022-03-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Other chores
|
||||||
|
|
||||||
|
* upgrade @expo/config-plugins ([#49](https://github.com/expo/config-plugins/issues/49)) ([119e31e](https://github.com/expo/config-plugins/commit/119e31edf110409272ace750f02d651124e1a22d))
|
||||||
@@ -4,7 +4,7 @@ Config plugin to auto configure `react-native-dynamic-app-icon`
|
|||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
> Tested against Expo SDK 43
|
> Tested against Expo SDK 44
|
||||||
|
|
||||||
```
|
```
|
||||||
yarn add react-native-dynamic-app-icon @config-plugins/react-native-dynamic-app-icon
|
yarn add react-native-dynamic-app-icon @config-plugins/react-native-dynamic-app-icon
|
||||||
|
|||||||
@@ -1,10 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "@config-plugins/react-native-dynamic-app-icon",
|
"name": "@config-plugins/react-native-dynamic-app-icon",
|
||||||
"version": "0.0.2",
|
"version": "1.0.1",
|
||||||
"description": "Config plugin to auto configure react-native-dynamic-app-icon",
|
"description": "Config plugin to auto configure react-native-dynamic-app-icon",
|
||||||
"main": "build/index.js",
|
"main": "build/index.js",
|
||||||
"types": "build/index.d.ts",
|
"types": "build/index.d.ts",
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/expo/config-plugins.git",
|
||||||
|
"directory": "packages/react-native-dynamic-app-icon"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "expo-module build",
|
"build": "expo-module build",
|
||||||
"clean": "expo-module clean",
|
"clean": "expo-module clean",
|
||||||
@@ -22,11 +27,12 @@
|
|||||||
"preset": "expo-module-scripts"
|
"preset": "expo-module-scripts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@expo/config-plugins": "^4.0.7",
|
"@expo/config-plugins": "^4.1.0",
|
||||||
"@expo/image-utils": "^0.3.17",
|
"@expo/image-utils": "^0.3.17",
|
||||||
"xcode": "^3.0.1"
|
"xcode": "^3.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"expo-module-scripts": "^2.0.0"
|
"expo-module-scripts": "^2.0.0"
|
||||||
}
|
},
|
||||||
|
"upstreamPackage": "react-native-dynamic-app-icon"
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
### @config-plugins/react-native-google-cast [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||||
|
|
||||||
|
|
||||||
|
### Continuous Integration
|
||||||
|
|
||||||
|
* fix versions [skip ci] ([#53](https://github.com/expo/config-plugins/issues/53)) ([5de4ae3](https://github.com/expo/config-plugins/commit/5de4ae3e6182c32b7aa24d70ccd23a11663bb089))
|
||||||
|
|
||||||
|
## @config-plugins/react-native-google-cast 1.0.0 (2022-03-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Other chores
|
||||||
|
|
||||||
|
* upgrade @expo/config-plugins ([#49](https://github.com/expo/config-plugins/issues/49)) ([119e31e](https://github.com/expo/config-plugins/commit/119e31edf110409272ace750f02d651124e1a22d))
|
||||||
@@ -4,7 +4,7 @@ Config plugin to auto configure react-native-google-cast when the native code is
|
|||||||
|
|
||||||
## Expo installation
|
## Expo installation
|
||||||
|
|
||||||
> Tested against Expo SDK 43
|
> Tested against Expo SDK 44
|
||||||
|
|
||||||
> This package cannot be used in the "Expo Go" app because [it requires custom native code](https://docs.expo.io/workflow/customizing/).
|
> This package cannot be used in the "Expo Go" app because [it requires custom native code](https://docs.expo.io/workflow/customizing/).
|
||||||
> First install the package with yarn, npm, or [`expo install`](https://docs.expo.io/workflow/expo-cli/#expo-install).
|
> First install the package with yarn, npm, or [`expo install`](https://docs.expo.io/workflow/expo-cli/#expo-install).
|
||||||
|
|||||||
@@ -1,10 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "@config-plugins/react-native-google-cast",
|
"name": "@config-plugins/react-native-google-cast",
|
||||||
"version": "0.1.0",
|
"version": "1.0.1",
|
||||||
"description": "Config plugin to auto configure Google Cast on prebuild",
|
"description": "Config plugin to auto configure Google Cast on prebuild",
|
||||||
"main": "build/withGoogleCast.js",
|
"main": "build/withGoogleCast.js",
|
||||||
"types": "build/withGoogleCast.d.ts",
|
"types": "build/withGoogleCast.d.ts",
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/expo/config-plugins.git",
|
||||||
|
"directory": "packages/react-native-google-cast"
|
||||||
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"build",
|
"build",
|
||||||
"app.plugin.js"
|
"app.plugin.js"
|
||||||
@@ -26,9 +31,10 @@
|
|||||||
"preset": "expo-module-scripts"
|
"preset": "expo-module-scripts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@expo/config-plugins": "^4.0.7"
|
"@expo/config-plugins": "^4.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"expo-module-scripts": "^2.0.0"
|
"expo-module-scripts": "^2.0.0"
|
||||||
}
|
},
|
||||||
|
"upstreamPackage": "react-native-google-cast"
|
||||||
}
|
}
|
||||||
Loaded 100 of 115 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user