gpt4 book ai didi

ios - 没有这样的模块 'AgoraRtcKit' Xcode Swift 错误

转载 作者:行者123 更新时间:2023-12-01 16:05:21 30 4
gpt4 key购买 nike

我正在尝试通过名为 Agora 的第三方将实时视频流集成到我的应用程序中。我面临一些错误,如 没有这样的模块 'AgoraRtcKit' .我已经从他们的网站导入了库 SDK(还附上了相同的屏幕截图)。
代码:

 //
// RoleViewController.swift
// OpenLive
//
// Created by CavanSu on 2019/8/28.
// Copyright © 2019 Agora. All rights reserved.
//

import UIKit
import AgoraRtcKit. // This is the module which is not getting imported

protocol RoleVCDelegate: NSObjectProtocol {
func roleVC(_ vc: RoleViewController, didSelect role: AgoraClientRole)
}

class RoleViewController: UIViewController {

weak var delegate: RoleVCDelegate?

override func viewDidLoad() {
super.viewDidLoad()
}

override var preferredStatusBarStyle: UIStatusBarStyle {
return .lightContent
}

override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
guard let segueId = segue.identifier,
segueId.count > 0 else {
return
}

switch segueId {
case "roleToLive":
guard let mainVC = navigationController?.viewControllers.first as? MainViewController,
let liveVC = segue.destination as? LiveRoomViewController else {
return
}

liveVC.dataSource = mainVC
default:
break
}
}

func selectedRoleToLive(role: AgoraClientRole) {
delegate?.roleVC(self, didSelect: role)
performSegue(withIdentifier: "roleToLive", sender: nil)
}

@IBAction func doBroadcasterTap(_ sender: UITapGestureRecognizer) {
selectedRoleToLive(role: .broadcaster)
}

@IBAction func doAudienceTap(_ sender: UITapGestureRecognizer) {
selectedRoleToLive(role: .audience)
}
}


图片供引用:
File system with SDK framework
Framework which I had added

最佳答案

这是 OP 尝试运行的示例项目:Basic-Video-Broadcasting/OpenLive-iOS
要构建和运行它,请从 here 下载项目和视频 SDK。 .打开项目并删除AgoraRtcKit.framework来自 Frameworks, Libraries, and Embedded Content列表。接下来拖动libs从下载的 SDK 文件夹到项目目录。导航到 libs文件夹并拖动 AgoraRtcKit.framework回到Frameworks, Libraries, and Embedded Content .

关于ios - 没有这样的模块 'AgoraRtcKit' Xcode Swift 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62699048/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com