伯索开放平台
首页API文档SDK文档伯索官网
首页API文档SDK文档伯索官网
  1. iOS版本
  • 直播SDK接入
    • WEB版本
      • WEB版本
    • iOS版本
      • IOS版本
    • Android版本
      • Android版本
  • 微课SDK接入
    • WEB版本
      • WEB版本
    • iOS版本
      • IOS版本
    • Android版本
      • Android版本
  • 批注SDK接入
    • Web版本
      • Web版本
    • iOS版本
      • IOS版本
    • Android版本
      • Android版本
  • 签名加密
    • 签名加密
  • 回调接口接入流程
    • 回调接口接入流程
  • 文档解析接入方式
    • 文档解析接入方式
  • 历史课堂接入方式
    • 历史课堂接入方式
  • 历史课堂转视频接入方式
    • 历史课堂转视频接入方式
  • 历史课堂/微课下载接口
    • 历史课堂/微课下载接口
  1. iOS版本

IOS版本

📌
iOS版本1.53.310
一. 准备阶段
PlasoStyleUpime 支持多种集成方式,推荐使用Cocoapods 集成:
1.
开始前确保你已安装 Cocoapods。参考 Getting Started with CocoaPods 安装说明
2.
在 Terminal 里进入项目根目录,并运行 pod init 命令。项目文件夹下会生成一个 Podfile 文本文件
3.
打开 Podfile 文件,修改文件为如下内容。注意将 Your App 替换为你的 Target 名称,并将 version 替换为你需集成的 SDK 版本,当前最新版本为 1.53.302
 target 'Your App' do
    pod 'PlasoStyleUpime', '~> 1.53.310'
    pod 'PlasoUpimeSdkModule', '~> 1.53.310'
 end
4.
在 Terminal 内运行 pod install 命令安装 PlasoPureUpime_iOS SDK。成功安装后,Terminal 中会显示 Pod installation complete!,此时项目文件夹下会生成一个 xcworkspace 文件。
5.
打开新生成的 xcworkspace 文件, 配置 info.plist:
Privacy - Bluetooth Always Usage Description                    "Your comment"
Privacy - Bluetooth Peripheral Usage Description                "Your comment"
Privacy - Microphone Usage Description                          "Your comment"
Privacy - Photo Library Additions Usage Description             "Your comment"
Privacy - Camera Usage Description                              "Your comment"
Privacy - Photo Library Usage Description                       "Your comment"
Privacy - Local Network Usage Description                       "Your comment"
io.flutter.embedded_views_preview    
6.info.plist中添加以下配置,关闭Flutter Impeller渲染器
  <key>FLTEnableImpeller</key>
  <false />
二. 创建课堂
创建课堂相关参数
参数名参数类型是否必须默认值参数说明
openFilenModeint否1文件显示模式:1.图片模式 2.窗口模式
supportCloudBoxboolean否true支持打开云端文件
supportLocalFileboolean否true支持打开本地文件
enableVideoMarkboolean否true视频暂停标注
enableSEndMessageboolean否true允许发送消息
configKeystring否"""white", "purplegreen", "black", "red", "orange", "yellow","green", "lightblue", "skyblue", "blue", "purple", "pink"
teachToolTypesboolean否true新教具:三角、矩形、椭圆、实线、虚线、正方形、圆形
enableInteractPPTboolean否true可交互PPT
useNewSmallboardboolean否true新小黑板
toolBoxTypesNS_ENUM否0提供随堂测、定时器、小黑板、红包雨、浏览器、抢答器、骰子
waterMarkstring否""水印
waterMarkSizedouble否0水印文字大小
waterMarkOpacitydouble否0水印文字透明度 (0-1.0)
waterMarkDynamicboolean否false水印是否动态
supportUndoboolean否true支持撤销
redPacketLimitint否0红包雨上限
endRemindTimelong否0终止时间
defaultPermissionint否-会议默认权限(0/1/2/4组合)
supportSelectboolean否true支持工具栏选择
supportHighlighterboolean否false是否支持荧光笔
shouldForbiddenScreenShotboolean否false是否防截屏
enableNewClassExamint否0新版随堂测选择题:1;新版随堂测填空题:2;新版随堂测选择+填空:3
d_enableObjectEraserint否0点擦: 0,对象擦:1(手写),3(手写+文本框),5(手写+图形),7(手写+文本框+图形)
enableSaveBoardboolean否false是否支持保存白板
如何生成Query
private func generateQuery() -> String {
  let beginTime = Int(Date().timeIntervalSince1970)
  var parameters: [String : Any] = [:]
  parameters["beginTime"] = beginTime
  parameters["groupUserCount"] = 3
  parameters["validTime"] = 10800
  if featureConfigVC.doubleTeacherEnabled() {
      parameters["videoStream"] = 18
  }

  for vc in viewControllers {
      let dic = vc.configInfoParameter()
      parameters.appendDic(dic)
  }

  print(parameters)
  var query  = Tool.sign(params: parameters)

  let customAddress = rtcConfigVC.customAddress()
  if customAddress.count > 0 {
      if (customAddress.firstIndex(of: "?") != nil)   {
          query = customAddress + "&" + query
      } else {
          query = customAddress + "?" + query
      }
   }

   return query
}
query相关参数
参数名参数类型是否必须默认值参数说明
appIdstring是string-
appTypestring否liveclassSDK-
groupUserCountint否3用户人数
loginNamestring是""用户名
mediaTypeint否1媒体类型: 1.视频课 2.音频课
meetingTypeint是public课堂类型:public
meetingIdstring是1课堂id
userNamestring否""用户名字
userTypeint是0"speaker", "listener", "assistant", "visitor", "superlistener", "weblistener"
vaildTimeint是6在线人数:1vN
d_sharpnessint否0清晰度:标清(10) 高清(20) 超清(30)
d_dimensionstring否1280 * 720屏幕比例
beginTimeint是-课堂开始时间
endTimeint否-课堂结束时间
endRemindTimeint否-课堂结束时间弹窗提醒
enableNewClassExamint否0老版随堂测:0;新版随堂测选择题:1;新版随堂测填空题:2;新版随堂测选择+填空:3
d_enableObjectEraserint否0点擦: 0,对象擦:1(手写),3(手写+文本框),5(手写+图形),7(手写+文本框+图形)
enableSaveBoardboolean否false是否支持保存白板
三. 插入外部文件
NSString *query = @"appId=1866&appType=liveclassSDK&beginTime=1603875514&cloudDisk=true&groupUserCount=3&live=1&mediaType=audio&meetingId=test111111&meetingType=public&userName=hello&userType=speaker&validTime=10800&signature=FF501B62C7D372B2927835F016A980FE6115D692";
UIViewController <UpimeLiveProtocol> *liveVC = [PlasoStyleUpimeClient createLiveWithQuery:query];

UpimeFile *file = [[UpimeFile alloc] init];
file.type = UpimeFileType_PPT;
file.title = @"演示文稿";
file.url = filePath;    // 文件路径
[liveVC insertFile:file];
四. 参考代码Demo
使用步骤(若模拟器无法运行,建议使用真机运行)
1.
解压缩
2.
打开 Podfile 文件,修改文件为如下内容。注意将 Your App 替换为你的 Target 名称,并将 version 替换为你需集成的 SDK 版本,当前最新版本为 1.53.302
target 'Your App' do
    pod 'PlasoStyleUpime', '~> 1.53.310'
    pod 'PlasoUpimeSdkModule', '~> 1.53.310'
end
3.
修改文件:PlasoSdkDemoForiOS/PlsoSdkDemoForiOS/AppConfig, 填入伯索分配的appid和key后即可体验。
static var appId: String = ""
static var appKey: String = ""
修改于 2025-04-09 06:35:52
上一页
iOS版本
下一页
Android版本
Built with