gpt4 book ai didi

ios - Vidyo 应用程序在 Swift 上崩溃

转载 作者:行者123 更新时间:2023-11-28 14:59:39 25 4
gpt4 key购买 nike

我使用 Swift 创建了一个 Vidyo iOS 应用程序并遵循 this tutorial .

但我在以下方面遇到应用程序崩溃:

connector = VCConnector(UnsafeMutableRawPointer(&vidyoView),
viewStyle: .default,
remoteParticipants: 4,
logFileFilter: UnsafePointer("warning"),
logFileName: UnsafePointer(""),
userData: 0)

以下是调试器日志:

ERROR: LmiFile: [System thread]: /tmp/SDK.Release.TRINITY_4_1_20_3.build.tO3KysfAv5/source/SDK/Lmi/Os/LmiFile.c:132: LmiFileOpen_: Error opening file v\217\206: Operation not permitted

Assertion failed: (newVal >= 0), function LmiSharedPtrRefCountDecUseCount, file /tmp/SDK.Release.TRINITY_4_1_20_3.build.tO3KysfAv5/source/SDK/Lmi/VidyoClient/../../../SDK/Lmi/Os/LmiSharedPtrInline.h, line 51.

有人能帮忙吗?

最佳答案

教程是错误的。作为常规 Swift 字符串传入 logFileFilter:logFileName:

connector = VCConnector(UnsafeMutableRawPointer(&vidyoView),
viewStyle: .default,
remoteParticipants: 4,
logFileFilter: "warning",
logFileName: "",
userData: 0)

logFileFilter:logFileName: 的参数类型是const char*。您可以将一个字符串传递给这种类型的参数,它会为您进行转换。

来源:passing String to const char* parameter

You should be able to pass a String directly to a C function expecting const char * and it will be automatically converted to a null-terminated UTF-8 string

关于ios - Vidyo 应用程序在 Swift 上崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49035427/

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