gpt4 book ai didi

iphone - 来自静态库的包

转载 作者:塔克拉玛干 更新时间:2023-11-01 21:23:01 25 4
gpt4 key购买 nike

我已经将一个子项目作为静态库添加到我的主项目中。

现在,在主项目上,我正在尝试加载子项目包中的内容。像这样:

NSString *defaultStorePath =
[[NSBundle bundleForClass:[self class]] pathForResource:@"database" ofType:@"sqlite"];

但这是返回零...

我该如何解决?

最佳答案

A-live给出了答案,但他太谦虚了,不能把它贴在这里作为答案。

这是答案的链接 http://www.galloway.me.uk/tutorials/ios-library-with-resources/

问题正是因为你创建静态库时没有包含资源。

关于iphone - 来自静态库的包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15900717/

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