[英]how can an Xcode swift app call functions in a swift static lib?
I have two xcode projects (1) a swift static lib, and (2) a swift app.我有两个 xcode 项目(1)一个 swift 静态库,和(2)一个 swift 应用程序。
What are the steps to have the swift app call a function in the swift lib?让 swift 应用程序调用 swift 库中的函数的步骤是什么?
.xcodeproj
files to the workspace by drag and drop.通过拖放将两个.xcodeproj
文件添加到工作区。import YourStaticLib
)在要使用库中函数的项目文件中,导入模块( import YourStaticLib
) Note: Make sure the classes/structs/funcs you want to use are declared as public
in your library.注意:确保您要使用的类/结构/函数在您的库中声明为public
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.