简体   繁体   中英

What might be the reason of compiler errors when building iOS app for profiling?

When I build my application for running everything is fine, it builds without errors, runs smoothly, while I build it for profiling I got Swift compiler errors, related to the Charts framework, for ex.:

swift:12:54: 'ChartViewDelegate' is unavailable: cannot find Swift declaration for this protocol
swift:13:32: 'BarChartView' is unavailable: cannot find Swift declaration for this class

Maybe the reason is in that how I added Charts framework?
I downloaded Charts project, build it and dragged & dropped the project bundle into xCode.
As a result I got in Frameworks group the following: Charts.framework, Charts-Swift.h, Charts.h

Should I find files(within Charts project what I built separately) with classes that linker/compiler failed to recognize and add them into my project, or some additional project configuration is required?

Can you help me?

Update:
when in Settings/scheme I change Profile build configuration from Release to Debug - everything is ok.
And I build my application in Debug mode.
Is the same mode debug/release required for build of application to run and to profile?

You must add Charts.framework to every target of your project.

Let me know in the comments if this is the problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM