* fix acceptRemoteInvitation crash

* fix iOS `invitation` event listener crash
This commit is contained in:
HUI
2020-09-17 22:36:59 +08:00
parent 8c6b297a62
commit 7ec3da4d4b
6 changed files with 68 additions and 195 deletions

92
.gitignore vendored
View File

@@ -1,77 +1,33 @@
# OSX
#
.DS_Store
.tmp/
build/
gitpull.sh
gitpush.sh
# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace
project.xcworkspace/
xcuserdata/
Pods/
Podfile.lock
# Android/IntelliJ
#
build/
.idea
.gradle
# Android/IntelliJ/VSCode
.idea/
.gradle/
gradle/
local.properties
*.iml
.vscode/
android/app/.settings/
android/.settings/
android/app/.classpath
android/app/.project
android/.project
typings/
typings.json
# node.js
#
node_modules/
npm-debug.log
yarn-error.log
# BUCK
buck-out/
\.buckd/
*.keystore
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/
*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots
# Bundle artifact
*.jsbundle
# CocoaPods
/ios/Pods/
.classpath
.project
.settings
android/gradle
android/gradlew*
package-lock.json
__tests__/
yarn.lock
*.sh
android/.gradle
*.*~
android/proguard-rules.pro
docs
lib
latest
examples/chatapp/ios/Pods
**/*.*~
**/*~
examples/chatapp/ios/Podfile.lock
npm-debug.log
npm-lock.json
package-lock.json

View File

@@ -1,93 +1,6 @@
# OSX
#
.DS_Store
# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace
# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
# node.js
#
node_modules/
npm-debug.log
yarn-error.log
# BUCK
buck-out/
\.buckd/
*.keystore
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/
*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots
# Bundle artifact
*.jsbundle
# CocoaPods
/ios/Pods/
Podfile.lock
example
android/build/
android/.classpath
android/.gradle
android/.idea
android/.project
android/.DS_Store
android/*.properties
android/gradle*
android/*.pro
android/*.iml
ios/.DS_Store
package-lock.json
tsconfig.*
typedoc.*
.git
.gitignore
.vscode
*.sh
android/.gradle
*.*~
.idea/
docs/
lib/**/*.map
lib/**/*.tsbuildinfo
examples/
src/
typedoc.json
typedoc.js
latest
*-beta*
docs
latest/
typedoc.js
examples
android/.settings/org.eclipse.buildship.core.prefs
lib/**.js.map
lib/**/*.js.map

View File

@@ -1,12 +1,16 @@
## CHANGELOG
## release 1.2.2-alpha.1
### release 1.2.2-alpha.2
* fix `acceptRemoteInvitation` crash
* fix iOS `invitation` event listener crash
### release 1.2.2-alpha.1
* upgrade agora_rtm native sdk to 1.2.2
* fix android leave channel
## release 1.0.1-alpha.1
### release 1.0.1-alpha.1
upgrade agora_rtm native sdk
## release 1.0.0-alpha.1
### release 1.0.0-alpha.1
+ getSdkVersion
+ setSdkLog

View File

@@ -602,50 +602,50 @@ RCT_EXPORT_METHOD(refuseRemoteInvitation:
- (void)rtmCallKit:(AgoraRtmCallKit *_Nonnull)callKit localInvitationReceivedByPeer:(AgoraRtmLocalInvitation *_Nonnull)localInvitation {
[self sendEvent:AG_LOCALINVITATIONRECEIVEDBYPEER params:@{
@"calleeId": localInvitation.calleeId,
@"content": localInvitation.content,
@"content": localInvitation.content ? localInvitation.content : [NSNull null],
@"state": @(localInvitation.state),
@"channelId": localInvitation.channelId,
@"response": localInvitation.response
@"channelId": localInvitation.channelId ? localInvitation.channelId : [NSNull null],
@"response": localInvitation.response ? localInvitation.response : [NSNull null]
}];
}
- (void)rtmCallKit:(AgoraRtmCallKit *_Nonnull)callKit localInvitationAccepted:(AgoraRtmLocalInvitation *_Nonnull)localInvitation withResponse:(NSString *_Nullable)response {
[self sendEvent:AG_LOCALINVITATIONACCEPTED params:@{
@"calleeId": localInvitation.calleeId,
@"content": localInvitation.content,
@"content": localInvitation.content ? localInvitation.content : [NSNull null],
@"state": @(localInvitation.state),
@"channelId": localInvitation.channelId,
@"response": localInvitation.response
@"channelId": localInvitation.channelId ? localInvitation.channelId : [NSNull null],
@"response": localInvitation.response ? localInvitation.response : [NSNull null]
}];
}
- (void)rtmCallKit:(AgoraRtmCallKit *_Nonnull)callKit localInvitationRefused:(AgoraRtmLocalInvitation *_Nonnull)localInvitation withResponse:(NSString *_Nullable)response {
[self sendEvent:AG_LOCALINVITATIONREFUSED params:@{
@"calleeId": localInvitation.calleeId,
@"content": localInvitation.content,
@"content": localInvitation.content ? localInvitation.content : [NSNull null],
@"state": @(localInvitation.state),
@"channelId": localInvitation.channelId,
@"response": localInvitation.response
@"channelId": localInvitation.channelId ? localInvitation.channelId : [NSNull null],
@"response": localInvitation.response ? localInvitation.response : [NSNull null]
}];
}
- (void)rtmCallKit:(AgoraRtmCallKit *_Nonnull)callKit localInvitationCanceled:(AgoraRtmLocalInvitation *_Nonnull)localInvitation {
[self sendEvent:AG_LOCALINVITATIONCANCELED params:@{
@"calleeId": localInvitation.calleeId,
@"content": localInvitation.content,
@"content": localInvitation.content ? localInvitation.content : [NSNull null],
@"state": @(localInvitation.state),
@"channelId": localInvitation.channelId,
@"response": localInvitation.response
@"channelId": localInvitation.channelId ? localInvitation.channelId : [NSNull null],
@"response": localInvitation.response ? localInvitation.response : [NSNull null]
}];
}
- (void)rtmCallKit:(AgoraRtmCallKit *_Nonnull)callKit localInvitationFailure:(AgoraRtmLocalInvitation *_Nonnull)localInvitation errorCode:(AgoraRtmLocalInvitationErrorCode)errorCode {
[self sendEvent:AG_LOCALINVITATIONFAILURE params:@{
@"calleeId": localInvitation.calleeId,
@"content": localInvitation.content,
@"content": localInvitation.content ? localInvitation.content : [NSNull null],
@"state": @(localInvitation.state),
@"channelId": localInvitation.channelId,
@"response": localInvitation.response,
@"channelId": localInvitation.channelId ? localInvitation.channelId : [NSNull null],
@"response": localInvitation.response ? localInvitation.response : [NSNull null],
@"code": @(errorCode)
}];
}
@@ -655,50 +655,50 @@ RCT_EXPORT_METHOD(refuseRemoteInvitation:
[self sendEvent:AG_REMOTEINVITATIONRECEIVED params:@{
@"callerId": remoteInvitation.callerId,
@"content": remoteInvitation.content,
@"content": remoteInvitation.content ? remoteInvitation.content : [NSNull null],
@"state": @(remoteInvitation.state),
@"channelId": remoteInvitation.channelId,
@"response": remoteInvitation.response
@"channelId": remoteInvitation.channelId ? remoteInvitation.channelId : [NSNull null],
@"response": remoteInvitation.response ? remoteInvitation.response : [NSNull null]
}];
}
- (void)rtmCallKit:(AgoraRtmCallKit *_Nonnull)callKit remoteInvitationRefused:(AgoraRtmRemoteInvitation *_Nonnull)remoteInvitation {
[self sendEvent:AG_REMOTEINVITATIONREFUSED params:@{
@"callerId": remoteInvitation.callerId,
@"content": remoteInvitation.content,
@"content": remoteInvitation.content ? remoteInvitation.content : [NSNull null],
@"state": @(remoteInvitation.state),
@"channelId": remoteInvitation.channelId,
@"response": remoteInvitation.response
@"channelId": remoteInvitation.channelId ? remoteInvitation.channelId : [NSNull null],
@"response": remoteInvitation.response ? remoteInvitation.response : [NSNull null]
}];
}
- (void)rtmCallKit:(AgoraRtmCallKit *_Nonnull)callKit remoteInvitationAccepted:(AgoraRtmRemoteInvitation *_Nonnull)remoteInvitation {
[self sendEvent:AG_REMOTEINVITATIONACCEPTED params:@{
@"callerId": remoteInvitation.callerId,
@"content": remoteInvitation.content,
@"content": remoteInvitation.content ? remoteInvitation.content : [NSNull null],
@"state": @(remoteInvitation.state),
@"channelId": remoteInvitation.channelId,
@"response": remoteInvitation.response
@"channelId": remoteInvitation.channelId ? remoteInvitation.channelId : [NSNull null],
@"response": remoteInvitation.response ? remoteInvitation.response : [NSNull null]
}];
}
- (void)rtmCallKit:(AgoraRtmCallKit *_Nonnull)callKit remoteInvitationCanceled:(AgoraRtmRemoteInvitation *_Nonnull)remoteInvitation {
[self sendEvent:AG_REMOTEINVITATIONCANCELED params:@{
@"callerId": remoteInvitation.callerId,
@"content": remoteInvitation.content,
@"content": remoteInvitation.content ? remoteInvitation.content : [NSNull null],
@"state": @(remoteInvitation.state),
@"channelId": remoteInvitation.channelId,
@"response": remoteInvitation.response
@"channelId": remoteInvitation.channelId ? remoteInvitation.channelId : [NSNull null],
@"response": remoteInvitation.response ? remoteInvitation.response : [NSNull null]
}];
}
- (void)rtmCallKit:(AgoraRtmCallKit *_Nonnull)callKit remoteInvitationFailure:(AgoraRtmRemoteInvitation *_Nonnull)remoteInvitation errorCode:(AgoraRtmRemoteInvitationErrorCode)errorCode {
[self sendEvent:AG_REMOTEINVITATIONFAILURE params:@{
@"callerId": remoteInvitation.callerId,
@"content": remoteInvitation.content,
@"content": remoteInvitation.content ? remoteInvitation.content : [NSNull null],
@"state": @(remoteInvitation.state),
@"channelId": remoteInvitation.channelId,
@"response": remoteInvitation.response,
@"channelId": remoteInvitation.channelId ? remoteInvitation.channelId : [NSNull null],
@"response": remoteInvitation.response ? remoteInvitation.response : [NSNull null],
@"code": @(errorCode)
}];
}

View File

@@ -1,6 +1,6 @@
{
"name": "agora-react-native-rtm",
"version": "1.2.2-alpha.1",
"version": "1.2.2-alpha.2",
"description": "React Native around the Agora RTM SDKs for Android and iOS agora",
"summary": "agora native rtm sdk for react-native",
"main": "lib/RtmEngine.js",

View File

@@ -466,7 +466,7 @@ export default class RtmEngine {
* @return Promise<any>
*/
acceptRemoteInvitation(remoteInvitationProps: RemoteInvitationProps): Promise<any> {
return AgoraRTM.sendRemoteInvitation(remoteInvitationProps);
return AgoraRTM.acceptRemoteInvitation(remoteInvitationProps);
}
/**