edoctor-sendbird-calls 1.1.0-beta.0 → 1.1.0

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.
Files changed (2) hide show
  1. package/README.md +48 -82
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,134 +4,100 @@ React Native module for Sendbird Calls SDK.
4
4
 
5
5
  ## Installation
6
6
 
7
- ### 1. Install the npm package
8
-
9
7
  ```sh
10
8
  yarn add edoctor-sendbird-calls
11
- # or
12
- npm install edoctor-sendbird-calls
13
9
  ```
14
10
 
15
- ### 2. iOS setup (SPM + Pods)
16
-
17
- SendBirdCalls SDK is delivered via Swift Package Manager. The React Native bridge still comes from this pod.
18
-
19
- **Steps**
20
- 1) `cd ios && pod install`
21
- 2) Open your `.xcworkspace` in Xcode.
22
- 3) Add the SPM package: File → Add Package Dependencies… → `https://github.com/sendbird/sendbird-calls-ios` → version **1.11.1** or later.
23
- 4) In the “Add to Target” column, select **both**:
24
- - Your app target (e.g. `EdoctorSendbirdCallsExample`).
25
- - The pod target `edoctor-sendbird-calls` (Pods project). If it is not offered, add the package first to the workspace, then go to Pods.xcodeproj → target `edoctor-sendbird-calls` → Build Phases → Link Binary With Libraries → `+` → pick `SendBirdCalls`.
26
- 5) Ensure `SendBirdCalls.framework` is in Link Binary With Libraries for both targets and set to **Do Not Embed**.
11
+ ## iOS Setup
27
12
 
28
- > If you rerun `pod install`, Pods.xcodeproj is regenerated; re-check that the `edoctor-sendbird-calls` pod target still links `SendBirdCalls`.
13
+ **Requirements:** iOS 14.0+, Xcode 15.0+, CocoaPods 1.10.0+
29
14
 
30
- Starting from version 1.11.0, this library requires **SendBirdCalls** to be added via **Swift Package Manager (SPM)** in your main project. This reduces the npm package size significantly.
31
-
32
- #### Step-by-step SPM Integration:
33
- 1. Open your project in Xcode (`.xcworkspace`).
34
- 2. Go to **File** → **Add Package Dependencies...**.
35
- 3. Enter the package URL: `https://github.com/sendbird/sendbird-calls-ios`.
36
- 4. Select version **1.11.1** or later.
37
- 5. Click **Add Package**.
38
- 6. Select your main app target and click **Add Package**.
15
+ ### 1. Install Pod
16
+ ```sh
17
+ cd ios && pod install
18
+ ```
39
19
 
40
- #### Requirements:
41
- - **iOS**: 14.0 or later
42
- - **Xcode**: 15.0 or later
43
- - **CocoaPods**: 1.10.0 or later
20
+ ### 2. Add SendBirdCalls via SPM
21
+ 1. Open `.xcworkspace` in Xcode
22
+ 2. **File** **Add Package Dependencies**
23
+ 3. URL: `https://github.com/sendbird/sendbird-calls-ios`
24
+ 4. Version: **1.11.1** or later
25
+ 5. Add to **both** your app target and `edoctor-sendbird-calls` pod target
26
+ 6. Set framework to **Do Not Embed** in both targets
44
27
 
45
- #### Privacy Info:
46
- This library includes a `PrivacyInfo.xcprivacy` file as required by Apple.
28
+ > **Note:** After `pod install`, verify the pod target still links `SendBirdCalls` framework.
47
29
 
48
- #### Info.plist permissions:
49
- Add these keys to your `Info.plist`:
30
+ ### 3. Configure Permissions
50
31
 
32
+ **Info.plist:**
51
33
  ```xml
52
34
  <key>NSMicrophoneUsageDescription</key>
53
- <string>$(PRODUCT_NAME) needs access to the microphone for voice calls</string>
35
+ <string>$(PRODUCT_NAME) needs microphone access for voice calls</string>
54
36
  <key>NSCameraUsageDescription</key>
55
- <string>$(PRODUCT_NAME) needs access to the camera for video calls</string>
37
+ <string>$(PRODUCT_NAME) needs camera access for video calls</string>
56
38
  ```
57
39
 
58
- #### Enable Background Modes:
59
- In your Xcode project, go to **Signing & Capabilities** → **+ Capability** → **Background Modes**, then enable:
60
- - **Audio, AirPlay, and Picture in Picture**
61
- - **Voice over IP**
40
+ **Background Modes:**
41
+ Xcode **Signing & Capabilities** → **+ Capability** → **Background Modes**
42
+ Enable:
43
+ - Audio, AirPlay, and Picture in Picture
44
+ - Voice over IP
62
45
 
63
- ### 3. Android Setup
46
+ ## Android Setup
64
47
 
65
- The library handles most configuration automatically. Ensure your `minSdkVersion` is at least **24** in `android/build.gradle`.
48
+ Ensure `minSdkVersion >= 24` in `android/build.gradle`.
66
49
 
67
50
  ## Usage
68
51
 
69
- ### 1. Initialize and Authenticate
52
+ ### Initialize & Authenticate
70
53
 
71
54
  ```javascript
72
55
  import { SendBirdCalls } from 'edoctor-sendbird-calls';
73
56
 
74
- // Initialize
75
57
  await SendBirdCalls.initSendBird('YOUR_APP_ID');
76
-
77
- // Authenticate
78
58
  const result = await SendBirdCalls.authenticate(userId, accessToken);
79
- if (result.succeeded) {
80
- console.log('User authenticated:', result.userId);
81
- }
82
59
  ```
83
60
 
84
- ### 2. Making a Call
61
+ ### Make a Call
85
62
 
86
63
  ```javascript
87
- // Dial a call
88
64
  const dialResult = await SendBirdCalls.dial(
89
- targetUserId,
90
- isVideoCall, // boolean
91
- true, // isVideoEnabled
92
- true // isAudioEnabled
65
+ targetUserId,
66
+ isVideoCall, // boolean
67
+ isVideoEnabled, // boolean
68
+ isAudioEnabled // boolean
93
69
  );
94
-
95
- if (dialResult.succeeded) {
96
- console.log('Call started with ID:', dialResult.callId);
97
- }
98
70
  ```
99
71
 
100
- ### 3. Handling Events
72
+ ### Handle Events
101
73
 
102
74
  ```javascript
103
75
  import { SendBirdCallsEvents } from 'edoctor-sendbird-calls';
104
76
 
105
- useEffect(() => {
106
- const ringingListener = SendBirdCallsEvents.listenerRinging((data) => {
107
- console.log('Incoming call:', data.callId);
108
- });
109
-
110
- const connectedListener = SendBirdCallsEvents.listenerConnected((data) => {
111
- console.log('Call connected');
112
- });
113
-
114
- const endedListener = SendBirdCallsEvents.listenerEnded((data) => {
115
- console.log('Call ended');
116
- });
117
-
118
- return () => {
119
- ringingListener.remove();
120
- connectedListener.remove();
121
- endedListener.remove();
122
- };
123
- }, []);
77
+ const ringingListener = SendBirdCallsEvents.listenerRinging((data) => {
78
+ console.log('Incoming call:', data.callId);
79
+ });
80
+
81
+ const connectedListener = SendBirdCallsEvents.listenerConnected((data) => {
82
+ console.log('Call connected');
83
+ });
84
+
85
+ const endedListener = SendBirdCallsEvents.listenerEnded((data) => {
86
+ console.log('Call ended');
87
+ });
88
+
89
+ // Cleanup
90
+ ringingListener.remove();
124
91
  ```
125
92
 
126
- ### 4. Video Component
93
+ ### Video Component
127
94
 
128
95
  ```javascript
129
96
  import { SendBirdCallsVideo } from 'edoctor-sendbird-calls';
130
97
 
131
- // In your render function
132
98
  <SendBirdCallsVideo
133
99
  callId={callId}
134
- local={false} // false for remote view, true for local preview
100
+ local={false} // false: remote, true: local preview
135
101
  style={{ flex: 1 }}
136
102
  />
137
103
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edoctor-sendbird-calls",
3
- "version": "1.1.0-beta.0",
3
+ "version": "1.1.0",
4
4
  "description": "edoctor-sendbird-calls",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/module/index.js",