File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,10 @@ @implementation RCTTwilio {
30
30
}
31
31
}
32
32
33
+ RCT_EXPORT_METHOD (initWithToken:(NSString *) token) {
34
+ _phone = [[TCDevice alloc ] initWithCapabilityToken: token delegate: self ];
35
+ }
36
+
33
37
RCT_EXPORT_METHOD (connect:(NSDictionary *) params) {
34
38
_connection = [_phone connect: params delegate: self ];
35
39
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " react-native-twilio" ,
3
- "version" : " 0.1.1 " ,
3
+ "version" : " 0.1.2 " ,
4
4
"description" : " A React Native wrapper for the Twilio mobile SDK" ,
5
5
"repository" : {
6
6
"type" : " git" ,
Original file line number Diff line number Diff line change 1
1
# A React Native wrapper for the [ Twilio] ( https://www.twilio.com ) mobile SDK
2
2
3
+ [ ![ npm version] ( https://badge.fury.io/js/react-native-twilio.svg )] ( https://badge.fury.io/js/react-native-twilio )
4
+
3
5
## Installation iOS
4
6
5
7
1 . Run ` npm install react-native-twilio --save ` in your project directory
@@ -22,6 +24,8 @@ const Twilio = require('react-native-twilio');
22
24
23
25
componentWillMount () {
24
26
Twilio .initWithTokenUrl (' https://example.com/token' );
27
+ // or
28
+ Twilio .initWithToken (' sometoken' );
25
29
Twilio .addEventListener (' deviceDidStartListening' , this ._deviceDidStartListening );
26
30
Twilio .addEventListener (' deviceDidStopListening' , this ._deviceDidStopListening );
27
31
Twilio .addEventListener (' deviceDidReceiveIncoming' , this ._deviceDidReceiveIncoming );
You can’t perform that action at this time.
0 commit comments