@novartc/expo-config-plugin-incall-manager 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -12
- package/package.json +2 -2
- package/plugin/withIncallManager.js +5 -5
package/README.md
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
# expo-config-plugin-incall-manager
|
|
2
2
|
|
|
3
|
-
📱 **A Config Plugin for integrating
|
|
3
|
+
📱 **A Config Plugin for integrating `@novartc/react-native-incall-manager` into Expo or React Native projects** — automatically adds required permissions, Podfile entries, and Android native linking.
|
|
4
4
|
|
|
5
5
|
## 🚀 Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install react-native-incall-manager expo-config-plugin-incall-manager
|
|
8
|
+
npm install @novartc/react-native-incall-manager @novartc/expo-config-plugin-incall-manager
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
or
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
yarn add react-native-incall-manager expo-config-plugin-incall-manager
|
|
14
|
+
yarn add @novartc/react-native-incall-manager @novartc/expo-config-plugin-incall-manager
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## 🧩 Usage (in app.json or app.config.js)
|
|
@@ -58,9 +58,9 @@ module.exports = {
|
|
|
58
58
|
✅ **Modifies settings.gradle and build.gradle to include:**
|
|
59
59
|
|
|
60
60
|
```gradle
|
|
61
|
-
include ':
|
|
62
|
-
project(':
|
|
63
|
-
implementation(project(':
|
|
61
|
+
include ':novartc_react-native-incall-manager'
|
|
62
|
+
project(':novartc_react-native-incall-manager').projectDir = new File(rootProject.projectDir, '../node_modules/@novartc/react-native-incall-manager/android')
|
|
63
|
+
implementation(project(':novartc_react-native-incall-manager'))
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
✅ **Updates MainApplication.java with:**
|
|
@@ -73,21 +73,21 @@ packages.add(new InCallManagerPackage());
|
|
|
73
73
|
✅ **Adds iOS Pod dependency:**
|
|
74
74
|
|
|
75
75
|
```ruby
|
|
76
|
-
pod 'ReactNativeIncallManager', :path => '../node_modules/react-native-incall-manager'
|
|
76
|
+
pod 'ReactNativeIncallManager', :path => '../node_modules/@novartc/react-native-incall-manager'
|
|
77
77
|
```
|
|
78
78
|
|
|
79
79
|
## ⚠️ Requirements
|
|
80
80
|
|
|
81
81
|
- Expo SDK 48+ or React Native 0.70+
|
|
82
82
|
- EAS Build (for managed workflow)
|
|
83
|
-
-
|
|
83
|
+
- `@novartc/react-native-incall-manager` installed in your project
|
|
84
84
|
|
|
85
85
|
## 📱 Usage in your React Native code
|
|
86
86
|
|
|
87
|
-
After installing and configuring the plugin, you can use
|
|
87
|
+
After installing and configuring the plugin, you can use `@novartc/react-native-incall-manager` in your app:
|
|
88
88
|
|
|
89
89
|
```javascript
|
|
90
|
-
import InCallManager from 'react-native-incall-manager';
|
|
90
|
+
import InCallManager from '@novartc/react-native-incall-manager';
|
|
91
91
|
|
|
92
92
|
// Start call management
|
|
93
93
|
InCallManager.start({media: 'audio'});
|
|
@@ -145,11 +145,11 @@ MIT © Ahsan Zia
|
|
|
145
145
|
### Plugin Not Working
|
|
146
146
|
- Make sure you've run `expo prebuild --clean` after adding the plugin
|
|
147
147
|
- Verify the plugin is listed in your `app.json` or `app.config.js`
|
|
148
|
-
- Check that
|
|
148
|
+
- Check that `@novartc/react-native-incall-manager` is installed as a dependency
|
|
149
149
|
|
|
150
150
|
### Need Help?
|
|
151
151
|
Open an issue on GitHub with:
|
|
152
152
|
- Your Expo SDK version
|
|
153
153
|
- Your React Native version
|
|
154
154
|
- Full error logs
|
|
155
|
-
- Your config file (`app.json` or `app.config.js`)
|
|
155
|
+
- Your config file (`app.json` or `app.config.js`)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@novartc/expo-config-plugin-incall-manager",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "Expo config plugin to integrate react-native-incall-manager in managed and bare workflow apps.",
|
|
3
|
+
"version": "1.1.3",
|
|
4
|
+
"description": "Expo config plugin to integrate @novartc/react-native-incall-manager in managed and bare workflow apps.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "echo \"No tests specified\" && exit 0",
|
|
@@ -63,10 +63,10 @@ function addAndroidNativeLinking(config) {
|
|
|
63
63
|
// --- settings.gradle ---
|
|
64
64
|
if (fs.existsSync(settingsGradlePath)) {
|
|
65
65
|
let settingsGradle = fs.readFileSync(settingsGradlePath, 'utf8');
|
|
66
|
-
if (!settingsGradle.includes("
|
|
66
|
+
if (!settingsGradle.includes("novartc_react-native-incall-manager")) {
|
|
67
67
|
settingsGradle += `
|
|
68
|
-
include ':
|
|
69
|
-
project(':
|
|
68
|
+
include ':novartc_react-native-incall-manager'
|
|
69
|
+
project(':novartc_react-native-incall-manager').projectDir = new File(rootProject.projectDir, '../node_modules/@novartc/react-native-incall-manager/android')
|
|
70
70
|
`;
|
|
71
71
|
fs.writeFileSync(settingsGradlePath, settingsGradle);
|
|
72
72
|
}
|
|
@@ -75,11 +75,11 @@ project(':react-native-incall-manager').projectDir = new File(rootProject.projec
|
|
|
75
75
|
// --- app/build.gradle ---
|
|
76
76
|
if (fs.existsSync(buildGradlePath)) {
|
|
77
77
|
let buildGradle = fs.readFileSync(buildGradlePath, 'utf8');
|
|
78
|
-
if (!buildGradle.includes("implementation(project(':
|
|
78
|
+
if (!buildGradle.includes("implementation(project(':novartc_react-native-incall-manager'))")) {
|
|
79
79
|
buildGradle = buildGradle.replace(
|
|
80
80
|
/(dependencies\s*{[\s\S]*?)(^\})/m,
|
|
81
81
|
(match, depsBlock, closingBrace) => {
|
|
82
|
-
return `${depsBlock} implementation(project(':
|
|
82
|
+
return `${depsBlock} implementation(project(':novartc_react-native-incall-manager'))\n${closingBrace}`;
|
|
83
83
|
}
|
|
84
84
|
);
|
|
85
85
|
fs.writeFileSync(buildGradlePath, buildGradle);
|