Skip to content

Commit

Permalink
fix: type cast error
Browse files Browse the repository at this point in the history
  • Loading branch information
LichKing-2234 committed Mar 9, 2021
1 parent 4fad339 commit f5af6dc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions example/ios/AgoraExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@
"${PODS_XCFRAMEWORKS_BUILD_DIR}/AgoraCore/AgoraCore.framework/AgoraCore",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/AgoraSoundTouch/AgoraSoundTouch.framework/AgoraSoundTouch",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/Agorafdkaac/Agorafdkaac.framework/Agorafdkaac",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/AgoraDav1dExtension/AgoraDav1dExtension.framework/AgoraDav1dExtension",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL/OpenSSL.framework/OpenSSL",
);
name = "[CP] Embed Pods Frameworks";
Expand All @@ -247,6 +248,7 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AgoraCore.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AgoraSoundTouch.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Agorafdkaac.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AgoraDav1dExtension.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework",
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
10 changes: 5 additions & 5 deletions ios/RCTAgora/React/RCTAgoraRtcSurfaceViewManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ class RtcView: RtcSurfaceView {
return "bounds"
}

@objc func setRenderMode(_ renderMode: Int) {
@objc func setRenderMode(_ renderMode: NSNumber) {
if let engine = getEngine?() {
setRenderMode(engine, renderMode)
setRenderMode(engine, renderMode.uintValue)
}
}

Expand All @@ -64,13 +64,13 @@ class RtcView: RtcSurfaceView {
channel = getChannel?(channelId)
}
if let engine = getEngine?() {
setData(engine, channel, data["uid"] as! Int)
setData(engine, channel, (data["uid"] as! NSNumber).uintValue)
}
}

@objc func setMirrorMode(_ mirrorMode: Int) {
@objc func setMirrorMode(_ mirrorMode: NSNumber) {
if let engine = getEngine?() {
setMirrorMode(engine, mirrorMode)
setMirrorMode(engine, mirrorMode.uintValue)
}
}
}
4 changes: 2 additions & 2 deletions ios/RCTAgora/React/RCTAgoraRtcSurfaceViewManagerBridge.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ @interface RCT_EXTERN_MODULE(RCTAgoraRtcSurfaceViewManager, NSObject)

RCT_EXPORT_VIEW_PROPERTY(data, NSDictionary)

RCT_EXPORT_VIEW_PROPERTY(renderMode, NSInteger)
RCT_EXPORT_VIEW_PROPERTY(renderMode, NSNumber)

RCT_EXPORT_VIEW_PROPERTY(mirrorMode, NSInteger)
RCT_EXPORT_VIEW_PROPERTY(mirrorMode, NSNumber)

@end

0 comments on commit f5af6dc

Please sign in to comment.