edoctor-sendbird-calls 1.0.4 → 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.
package/README.md CHANGED
@@ -1,24 +1,106 @@
1
1
  # edoctor-sendbird-calls
2
2
 
3
- hello
3
+ React Native module for Sendbird Calls SDK.
4
4
 
5
5
  ## Installation
6
6
 
7
7
  ```sh
8
- npm install edoctor-sendbird-calls
8
+ yarn add edoctor-sendbird-calls
9
9
  ```
10
10
 
11
+ ## iOS Setup
12
+
13
+ **Requirements:** iOS 14.0+, Xcode 15.0+, CocoaPods 1.10.0+
14
+
15
+ ### 1. Install Pod
16
+ ```sh
17
+ cd ios && pod install
18
+ ```
19
+
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
27
+
28
+ > **Note:** After `pod install`, verify the pod target still links `SendBirdCalls` framework.
29
+
30
+ ### 3. Configure Permissions
31
+
32
+ **Info.plist:**
33
+ ```xml
34
+ <key>NSMicrophoneUsageDescription</key>
35
+ <string>$(PRODUCT_NAME) needs microphone access for voice calls</string>
36
+ <key>NSCameraUsageDescription</key>
37
+ <string>$(PRODUCT_NAME) needs camera access for video calls</string>
38
+ ```
39
+
40
+ **Background Modes:**
41
+ Xcode → **Signing & Capabilities** → **+ Capability** → **Background Modes**
42
+ Enable:
43
+ - Audio, AirPlay, and Picture in Picture
44
+ - Voice over IP
45
+
46
+ ## Android Setup
47
+
48
+ Ensure `minSdkVersion >= 24` in `android/build.gradle`.
49
+
11
50
  ## Usage
12
51
 
52
+ ### Initialize & Authenticate
13
53
 
14
- ```js
15
- import { multiply } from 'edoctor-sendbird-calls';
54
+ ```javascript
55
+ import { SendBirdCalls } from 'edoctor-sendbird-calls';
16
56
 
17
- // ...
57
+ await SendBirdCalls.initSendBird('YOUR_APP_ID');
58
+ const result = await SendBirdCalls.authenticate(userId, accessToken);
59
+ ```
60
+
61
+ ### Make a Call
62
+
63
+ ```javascript
64
+ const dialResult = await SendBirdCalls.dial(
65
+ targetUserId,
66
+ isVideoCall, // boolean
67
+ isVideoEnabled, // boolean
68
+ isAudioEnabled // boolean
69
+ );
70
+ ```
71
+
72
+ ### Handle Events
73
+
74
+ ```javascript
75
+ import { SendBirdCallsEvents } from 'edoctor-sendbird-calls';
18
76
 
19
- const result = await multiply(3, 7);
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();
20
91
  ```
21
92
 
93
+ ### Video Component
94
+
95
+ ```javascript
96
+ import { SendBirdCallsVideo } from 'edoctor-sendbird-calls';
97
+
98
+ <SendBirdCallsVideo
99
+ callId={callId}
100
+ local={false} // false: remote, true: local preview
101
+ style={{ flex: 1 }}
102
+ />
103
+ ```
22
104
 
23
105
  ## Contributing
24
106
 
@@ -10,12 +10,26 @@ Pod::Spec.new do |s|
10
10
  s.license = package["license"]
11
11
  s.authors = package["author"]
12
12
 
13
- s.platforms = { :ios => min_ios_version_supported }
14
- s.source = { :git => "https://git.9vil.com/edoctor/app/mobile-core/sendbird-sdk", :tag => "#{s.version}" }
13
+ # SendBirdCalls 1.11.1 requires iOS 14.0+
14
+ s.platforms = { :ios => '14.0' }
15
+ s.source = { :git => "https://git.9vil.com/edoctor/app/mobile-core/sendbird-sdk", :tag => s.version.to_s }
15
16
 
16
- s.source_files = "ios/**/*.{h,m,mm,swift}"
17
+ s.source_files = "ios/*.{h,m,mm,swift}", "ios/Extensions/**/*.{h,m,mm,swift}"
17
18
  s.resource_bundles = {'edoctor-sendbird-calls_PrivacyInfo' => ['ios/PrivacyInfo.xcprivacy'] }
18
- s.dependency "SendBirdCalls"
19
+
20
+ s.static_framework = true
21
+
22
+ s.dependency "React-Core"
23
+
24
+ s.frameworks = "UIKit", "Foundation", "AVFoundation", "AudioToolbox", "CoreMedia", "CoreTelephony", "Network", "SystemConfiguration", "VideoToolbox", "CallKit", "CoreVideo", "CoreGraphics", "GLKit", "Metal", "MetalKit", "QuartzCore", "PushKit", "AVKit", "MediaPlayer"
25
+ s.libraries = "c++", "sqlite3", "z"
26
+
27
+ s.pod_target_xcconfig = {
28
+ 'DEFINES_MODULE' => 'YES',
29
+ 'SWIFT_COMPILATION_MODE' => 'wholemodule',
30
+ 'FRAMEWORK_SEARCH_PATHS' => '$(inherited) $(BUILT_PRODUCTS_DIR)/PackageFrameworks',
31
+ 'OTHER_LDFLAGS' => '$(inherited) -framework SendBirdCalls -framework WebRTC'
32
+ }
19
33
 
20
34
  # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
21
35
  # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
@@ -11,12 +11,8 @@ import UIKit
11
11
  extension CXProviderConfiguration {
12
12
  // The app's provider configuration, representing its CallKit capabilities
13
13
  static var `default`: CXProviderConfiguration {
14
- let providerConfiguration: CXProviderConfiguration
15
- if #available(iOS 14.0, *) {
16
- providerConfiguration = CXProviderConfiguration()
17
- } else {
18
- providerConfiguration = CXProviderConfiguration(localizedName: "eDoctor")
19
- }
14
+ // iOS 14.0+ is now required (SendBirdCalls 1.11.1)
15
+ let providerConfiguration = CXProviderConfiguration()
20
16
  if let image = UIImage(named: "icLogoSymbolInverse") {
21
17
  providerConfiguration.iconTemplateImageData = image.pngData()
22
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edoctor-sendbird-calls",
3
- "version": "1.0.4",
3
+ "version": "1.1.0",
4
4
  "description": "edoctor-sendbird-calls",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/module/index.js",