gpt4 book ai didi

ios - 导入和 iOS Today 扩展不起作用

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:37:48 26 4
gpt4 key购买 nike

我正在尝试将一些库导入到今天的扩展中(在主应用程序中运行良好)。当我运行应用程序时,出现错误:

Undefined symbols for architecture i386:
"_OBJC_CLASS_$_Budget", referenced from:
objc-class-ref in TodayViewController.o
"_OBJC_CLASS_$_JBBarChartView", referenced from:
objc-class-ref in TodayViewController.o
"_OBJC_CLASS_$_Users", referenced from:
objc-class-ref in TodayViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

这里是导入:

#import "JBBarChartView.h"
#import "JBChartView.h"
#import "Users.h"
#import "Budget.h"

有什么建议吗?

最佳答案

如果你使用 pod 并导入一些库,你可以像这样编辑 Podfile:

target 'MyApp' do
pod 'GoogleAnalytics', '~> 3.1'

# Has its own copy of OCMock
# and has access to GoogleAnalytics via the app
# that hosts the today target

target 'MyAppToday' do
inherit! :search_paths
pod 'OCMock', '~> 2.0.1'
end
end

如果你想使用你自己的类,点击这个文件并检查目标成员。你也可以把这些文件打包成一个框架。

关于ios - 导入和 iOS Today 扩展不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26639519/

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