Skip to content

Commit d6d2861

Browse files
Update to React Native 0.40 (#8)
* use include quotes instead of angled ones * set the platform in the Podfile example and format it * add link to the full Podfile example in the readme * Add logLevel constants and empty setLogLevelMethod * update the client documentation specifying setLogLevel is iOS only * Fix spacing * make compatible with react-native 0.40.0 * Update package.json Updated version to 0.3.0 * removed iOS only note for setLogLevel * removed Android note from setLogLevel * removed old ip-messaging files * updated access manager docs * update to channel docs * updated client docs also fixed android not sending an object for userInfoChanged event * corrected readme's use of IP Messaging * removed references to ip-messaging * Removing manual instructions for now These still require you to use CocoaPods, ideally these would be fully manual without needing CP by installing the SDK directly from twilio. See #2 and #20.
1 parent e7eb0db commit d6d2861

File tree

6 files changed

+33
-20
lines changed

6 files changed

+33
-20
lines changed

Example/ios/Podfile

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,34 @@
11
# Uncomment this line to define a global platform for your project
2-
# platform :ios, '9.0'
2+
# NOTE: The underlying Twilio SDKs require a minimum deployment target of 8.1
3+
platform :ios, '8.1'
4+
5+
source 'https://github.com/CocoaPods/Specs.git'
6+
source 'https://github.com/twilio/cocoapod-specs'
37

48
target 'ReactNativeTwilioIPMessagingExample' do
59
# Uncomment this line if you're using Swift or would like to use dynamic frameworks
610
# use_frameworks!
711

812
# Pods for ReactNativeTwilioIPMessagingExample
913
inherit! :search_paths
10-
source 'https://github.com/CocoaPods/Specs.git'
11-
pod 'React', :subspecs => ['Core', 'RCTActionSheet', 'RCTGeolocation', 'RCTImage', 'RCTLinkingIOS', 'RCTNetwork', 'RCTText', 'RCTSettings', 'RCTAnimation', 'RCTVibration', 'RCTWebSocket'], :path => '../node_modules/react-native'
14+
15+
# Import required Lib from react-native
16+
# https://facebook.github.io/react-native/docs/integration-with-existing-apps.html#podfile
17+
pod 'React', :path => '../node_modules/react-native', :subspecs => [
18+
'Core',
19+
'RCTActionSheet',
20+
'RCTGeolocation',
21+
'RCTImage',
22+
'RCTLinkingIOS',
23+
'RCTNetwork',
24+
'RCTText',
25+
'RCTSettings',
26+
'RCTVibration',
27+
'RCTWebSocket'
28+
]
1229

1330
pod 'RCTTwilioChat', :path => '../node_modules/react-native-twilio-chat/ios'
1431
source 'https://github.com/twilio/cocoapod-specs'
1532
pod 'TwilioChatClient', '~> 0.16.0'
1633
pod 'TwilioAccessManager', '~> 0.1.1'
17-
18-
end
34+
end

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
npm install --save react-native-twilio-chat
1313
```
1414

15-
### iOS
16-
Install the Twilio Programable Chat SDK and this package via CocoaPods.
15+
### iOS - CocoaPods
16+
Install the Twilio Chat SDK and this package via CocoaPods. See the [full Podfile example](./Example/ios/Podfile) for more details.
1717

1818
```ruby
1919
pod 'React', :subspecs => ['Core', /* any other subspecs you require */], :path => '../node_modules/react-native'
@@ -25,8 +25,8 @@ pod 'TwilioAccessManager', '~> 0.1.3'
2525
```
2626
**Note: the underlying Twilio SDKs require a minimum deployment target of `8.1`**. If your project's target is less than this you will get a CocoaPods install error (`Unable to satisfy the following requirements...`).
2727

28-
Make sure that you add the `$(inherited)` value to `Other Linker Flags` and `Framework Search Paths` for your target's Build Settings.
29-
28+
Make sure that you add the `$(inherited)` value to `Other Linker Flags` and `Framework Search Paths` for your target's Build Settings. This is also assuming you have already loaded React via CocoaPods as well.
29+
3030
### Android
3131
In `android/settings.gradle`:
3232

@@ -71,7 +71,7 @@ android {
7171
dexOptions {
7272
javaMaxHeapSize "2048M"
7373
}
74-
74+
7575
defaultConfig {
7676
...
7777
minSdkVersion 19

docs/AccessManager.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# AccessManager
2-
The AccessManager is Twilio's separation of authenticating your instance of Twilio from the functionality of Programable Chat. It is optional in the lastest release of the SDKs.
2+
The AccessManager is Twilio's abstraction of authenticating your instance of Twilio from the functionality of Programable Chat. It is optional in the lastest release of the SDKs.
33

44
## `new AccessManager(token)`
55
|Name |Type |Description |
@@ -10,7 +10,6 @@ The AccessManager is Twilio's separation of authenticating your instance of Twil
1010
|Name |Type |Description |
1111
|--- |--- |--- |
1212
|*token*|String|The current token
13-
|*isExpired*|Boolean|Whether or not the token has expired
1413
|*expires*|Date|The timestamp of when the token will expire
1514

1615
### Methods
@@ -31,7 +30,7 @@ Updates the token associated with the Access Manager.
3130
You can specify handlers for events on the `accessManager` instance itself. For example, if you wanted to listen to the token expiration event, you would set `accessManager.onTokenExpired = function() { console.log('Token expired') }`.
3231

3332
#### `onTokenExpired()`
34-
Fired when the current token expires.
33+
Fired when the current token has expired.
3534

3635
#### `onTokenWillExpire()`
3736
Fired 3 minuts before the current token will expire.

docs/Client.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ client.onClientSynchronized = () => {
3131
|Name |Type |Description |
3232
|--- |--- |--- |
3333
|*token*|String|The Access Token provided by your server
34-
|*synchronizationStrategy*|Constants.TCHClientSynchronizationStrategy|Optional. The synchronization strategy to use during client initialization. Default: ChannelsList [See Twilio Docs](https://media.twiliocdn.com/sdk/ios/ip-messaging/releases/0.14.1/docs/Constants/TCHClientSynchronizationStrategy.html)
34+
|*synchronizationStrategy*|Constants.TCHClientSynchronizationStrategy|Optional. The synchronization strategy to use during client initialization. Default: ChannelsList [See Twilio Docs](https://media.twiliocdn.com/sdk/ios/chat/releases/0.17.1/docs/Constants/TCHClientSynchronizationStrategy.html)
3535
|*initialMessageCount*|Number|Optional. The number of most recent messages to fetch automatically when synchronizing a channel. Default: 100
3636

3737
## Properties

ios/RCTTwilioChat.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,8 @@
315315
);
316316
HEADER_SEARCH_PATHS = (
317317
"$(inherited)",
318-
"$(SRCROOT)/../../React/**",
319-
"$(SRCROOT)/../../node_modules/react-native/React/**",
318+
"$(SRCROOT)/../../react-native/React/**",
319+
"$(SRCROOT)/../../../ios/Pods/Headers/**",
320320
);
321321
OTHER_LDFLAGS = (
322322
"-ObjC",
@@ -338,8 +338,8 @@
338338
);
339339
HEADER_SEARCH_PATHS = (
340340
"$(inherited)",
341-
"$(SRCROOT)/../../React/**",
342-
"$(SRCROOT)/../../node_modules/react-native/React/**",
341+
"$(SRCROOT)/../../react-native/React/**",
342+
"$(SRCROOT)/../../../ios/Pods/Headers/**",
343343
);
344344
OTHER_LDFLAGS = (
345345
"-ObjC",

ios/RCTTwilioChat/RCTTwilioAccessManager.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
#import "RCTTwilioChatClient.h"
1414
#import "RCTEventDispatcher.h"
1515

16-
17-
1816
@interface RCTTwilioAccessManager() <TwilioAccessManagerDelegate>
1917
@end
2018

0 commit comments

Comments
 (0)