-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,10 +47,18 @@ yarn add expo-share-intent | |
npm install expo-share-intent | ||
``` | ||
|
||
|
||
|
||
**Requirement: `patch-package`** | ||
|
||
For the moment this package need a post-install script | ||
For the moment this package needs a patch. | ||
|
||
There are two methods to achieve this. | ||
|
||
If you are using `yarn` or `npm`, you should use method 1 | ||
If you are using `pnpm`, you can only use method 2 | ||
|
||
## Method 1: post-install script | ||
- copy the [xcode patch](https://github.com/achorein/expo-share-intent/blob/main/example/basic/patches/xcode%2B3.0.1.patch) in you `patches` project directory (like example) | ||
- add post-install script to `package.json` | ||
|
||
|
@@ -69,6 +77,43 @@ yarn add patch-package | |
|
||
> More info in [#13](https://github.com/achorein/expo-share-intent/issues/13) and [FAQ](https://github.com/achorein/expo-share-intent/edit/main/README.md#config-sync-failed) | ||
## Method 2: pnpm patch | ||
|
||
pnpm provides a simple command to create a `node_module` patch. | ||
|
||
In your directory, run | ||
|
||
`pnpm install [email protected]` | ||
|
||
and then | ||
|
||
`pnpm patch [email protected]` | ||
|
||
You will now be prompted to make the patch changes. The file path should show up and look something like this: | ||
|
||
`/{YOUR_DIRECTORY}/node_modules/.pnpm_patches/[email protected]` | ||
|
||
Go into this file and change one line: | ||
|
||
``` | ||
- if (project.pbxGroupByName(group).path) | ||
+ if (project.pbxGroupByName(group)&&project.pbxGroupByName(group).path) | ||
``` | ||
|
||
As prompted, when you're done you will run a command to commit your changes: | ||
|
||
`pnpm patch-commit /{YOUR_DIRECTORY}/node_modules/.pnpm_patches/[email protected]` | ||
|
||
You should now have an entry in your `package.json` file that looks like this: | ||
|
||
``` | ||
"pnpm": { | ||
"patchedDependencies": { | ||
"[email protected]": "patches/[email protected]" | ||
} | ||
} | ||
``` | ||
|
||
**Requirement: `expo-linking`** | ||
|
||
Since Expo52, you also need to install `expo-linking` in your app : | ||
|