相关疑难解决方法(0)

警告消息链接到dylib,这在应用程序扩展中不安全

我收到一条错误说

链接到不适合在应用程序扩展中使用的dylib

我已经看过解决这个问题的其他问题,唯一有答案的问题并没有解决我的问题,其余的问题都没有得到答案.

我尝试构建一个完全没有任何内容的框架,并在我的intents app扩展的General选项卡中将框架添加到Linked Frameworks和Libraries,我仍然收到此消息.

当我向框架添加代码时,我仍然收到警告消息.

这是我的代码:

import UIKit

class Widget: NSObject {

}
Run Code Online (Sandbox Code Playgroud)

我肯定会遵循某些API不适用于App Extensions 使用嵌入式框架共享代码的说明,但我仍然会收到相同的警告消息.我已经读过,如果我有这个问题,Apple App Store将无法通过我的应用程序进行审核.

frameworks ios

9
推荐指数
2
解决办法
903
查看次数

Swift 链接错误:Module.Class 的类型元数据访问器

Swift项目中工作时,我有两个模块,比方说

  1. Base
  2. Feature

Base有一个SHService类,我从那里调用Feature模块的函数(类SHCommon)。功能模块正在无错误地构建,但Base在链接阶段引发错误。

工作区快照:

基础服务

import Foundation
import Feature

class SHService {

    public func printMe(printString: String){
        SHCommon().printMe(printString: printString)
    }
}
Run Code Online (Sandbox Code Playgroud)

Feature.SHCommon

import Foundation

public class SHCommon {

    public init(){}
    public func printMe(printString: String) {
        print(printString)
    }
}
Run Code Online (Sandbox Code Playgroud)

链接错误:

知道为什么会这样吗?

xcode compiler-errors build ios swift

9
推荐指数
3
解决办法
4196
查看次数

标签 统计

ios ×2

build ×1

compiler-errors ×1

frameworks ×1

swift ×1

xcode ×1