Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
1bc5ce6
use include quotes instead of angled ones
Dec 22, 2016
e8fb777
set the platform in the Podfile example and format it
Dec 22, 2016
84ecb42
add link to the full Podfile example in the readme
Dec 22, 2016
130ff20
Merge pull request #49 from Maxwell2022/master
bradbumbalough Jan 5, 2017
8906bd2
Add logLevel constants and empty setLogLevelMethod
Jan 13, 2017
accc2c2
update the client documentation specifying setLogLevel is iOS only
Jan 13, 2017
52723e3
Fix spacing
Jan 13, 2017
81169f4
Merge pull request #55 from Maxwell2022/logLevelAndroid
bradbumbalough Jan 13, 2017
5c786d4
make compatible with react-native 0.40.0
Jan 19, 2017
8868c2b
Update package.json
mattshen Jan 20, 2017
04e2d7d
merged master into programable-chat-rn-40
Mar 7, 2017
097f527
removed iOS only note for setLogLevel
bradbumbalough Mar 7, 2017
a0fc2e3
removed Android note from setLogLevel
bradbumbalough Mar 7, 2017
320907b
removed old ip-messaging files
Mar 7, 2017
2ca7f65
Merge branch 'programable-chat-rn-40' of github.com:ccm-innovation/re…
Mar 7, 2017
ff74626
updated access manager docs
Mar 7, 2017
83df40c
update to channel docs
Mar 7, 2017
f518ca1
updated client docs
Mar 7, 2017
0cc0c6c
corrected readme's use of IP Messaging
Mar 8, 2017
c7b405a
removed references to ip-messaging
Mar 8, 2017
c0a78e6
Merge branch 'master' into programable-chat-rn-40
bradbumbalough May 8, 2017
bb7db30
merge master into programable-chat-rn-40
May 8, 2017
74973f2
Merge branch 'programable-chat-rn-40' of github.com:ccm-innovation/re…
May 8, 2017
dd898e3
Removing manual instructions for now
May 8, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 21 additions & 5 deletions Example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,34 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
# NOTE: The underlying Twilio SDKs require a minimum deployment target of 8.1
platform :ios, '8.1'

source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/twilio/cocoapod-specs'

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

# Pods for ReactNativeTwilioIPMessagingExample
inherit! :search_paths
source 'https://github.com/CocoaPods/Specs.git'
pod 'React', :subspecs => ['Core', 'RCTActionSheet', 'RCTGeolocation', 'RCTImage', 'RCTLinkingIOS', 'RCTNetwork', 'RCTText', 'RCTSettings', 'RCTAnimation', 'RCTVibration', 'RCTWebSocket'], :path => '../node_modules/react-native'

# Import required Lib from react-native
# https://facebook.github.io/react-native/docs/integration-with-existing-apps.html#podfile
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'RCTActionSheet',
'RCTGeolocation',
'RCTImage',
'RCTLinkingIOS',
'RCTNetwork',
'RCTText',
'RCTSettings',
'RCTVibration',
'RCTWebSocket'
]

pod 'RCTTwilioChat', :path => '../node_modules/react-native-twilio-chat/ios'
source 'https://github.com/twilio/cocoapod-specs'
pod 'TwilioChatClient', '~> 0.16.0'
pod 'TwilioAccessManager', '~> 0.1.1'

end
end
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
npm install --save react-native-twilio-chat
```

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

```ruby
pod 'React', :subspecs => ['Core', /* any other subspecs you require */], :path => '../node_modules/react-native'
Expand All @@ -25,8 +25,8 @@ pod 'TwilioAccessManager', '~> 0.1.3'
```
**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...`).

Make sure that you add the `$(inherited)` value to `Other Linker Flags` and `Framework Search Paths` for your target's Build Settings.
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.

### Android
In `android/settings.gradle`:

Expand Down Expand Up @@ -71,7 +71,7 @@ android {
dexOptions {
javaMaxHeapSize "2048M"
}

defaultConfig {
...
minSdkVersion 19
Expand Down
5 changes: 2 additions & 3 deletions docs/AccessManager.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# AccessManager
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.
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.

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

### Methods
Expand All @@ -31,7 +30,7 @@ Updates the token associated with the Access Manager.
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') }`.

#### `onTokenExpired()`
Fired when the current token expires.
Fired when the current token has expired.

#### `onTokenWillExpire()`
Fired 3 minuts before the current token will expire.
Expand Down
2 changes: 1 addition & 1 deletion docs/Client.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ client.onClientSynchronized = () => {
|Name |Type |Description |
|--- |--- |--- |
|*token*|String|The Access Token provided by your server
|*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)
|*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)
|*initialMessageCount*|Number|Optional. The number of most recent messages to fetch automatically when synchronizing a channel. Default: 100

## Properties
Expand Down
8 changes: 4 additions & 4 deletions ios/RCTTwilioChat.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../../React/**",
"$(SRCROOT)/../../node_modules/react-native/React/**",
"$(SRCROOT)/../../react-native/React/**",
"$(SRCROOT)/../../../ios/Pods/Headers/**",
);
OTHER_LDFLAGS = (
"-ObjC",
Expand All @@ -338,8 +338,8 @@
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../../React/**",
"$(SRCROOT)/../../node_modules/react-native/React/**",
"$(SRCROOT)/../../react-native/React/**",
"$(SRCROOT)/../../../ios/Pods/Headers/**",
);
OTHER_LDFLAGS = (
"-ObjC",
Expand Down
2 changes: 0 additions & 2 deletions ios/RCTTwilioChat/RCTTwilioAccessManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
#import "RCTTwilioChatClient.h"
#import "RCTEventDispatcher.h"



@interface RCTTwilioAccessManager() <TwilioAccessManagerDelegate>
@end

Expand Down