-
-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined symbol: method descriptor for Charts.ChartViewBase.initialize() -> () #3976
Comments
@liuxuan30 I create a demo that can reproduce this compile error. Clone the repo and run this command in command line: pod install && xcodebuild -workspace Demo.xcworkspace -scheme Demo | xcpretty And compiler will throw an error like this:
This is a simple demo, the only thing I've done is subclassing I think it is caused by the access level of |
hi,
Please unsubscribe me from this service
…On Mon, Apr 29, 2019 at 6:35 AM Kem Chen ***@***.***> wrote:
@liuxuan30 <https://github.com/liuxuan30> I create a demo
<https://github.com/kemchenj/ChartsDemo> to reproduce this compile error.
Clone the repo and run this command in command line:
pod install && xcodebuild -workspace Demo.xcworkspace -scheme Demo | xcpretty
And compiler will throw an error like this:
▸ Linking Demo
❌ Undefined symbols for architecture arm64
> Symbol: method descriptor for Charts.ChartViewBase.initialize() -> ()
> Referenced from: l_got.$s6Charts13ChartViewBaseC10initializeyyFTq in ViewController.o
❌ ld: symbol(s) not found for architecture arm64
❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)
This is a simple demo, the only I've done is subclassing CombinedChartView
and override the initialize method.
The access level of initialize method was marked as internal in
ChartViewBase and open in CombinedChartView. It looks like a bug from
swift compiler.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3976 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACUFPYHBOYM6CQA7MTCZFNTPSZCWFANCNFSM4HI26WBQ>
.
|
I don't know why, but the master builds well. So I can only assume it's your build setting issues. Turn to Stack overflow for more help. |
I'm also running into this problem. |
I also had this issue after upgrading my Xcode to 10.2.1. Speculation of @kemchenj is correct and I just modified all
Please don't close this issue and look into it |
Yes. It doesn't show during Debug builds if "enable testability" is on. It seems to be a bug, since that ought to work:
But it may be telling that the example in the docs is going from fileprivate to internal, not internal to public. The workaround is not to override initialize from the subclass, but do work in init or another method. If it's desired to continue to support hooking initialize, an explicitly public hook could be added ( |
For the curious, here's an open radar of the bug I submitted to Apple: http://www.openradar.me/radar?id=6072265754017792 |
That radar has been closed as a dupe, but it looks like the underlying access issue might be fixed in Swift 5.1. swiftlang/swift#25190 |
I got the error when I try to do archive, any ideas?
**Xcode version:10.2.1
**Swift version:4.2
**Platform(s) running Charts:iOS
**macOS version running Xcode: 10.14.4
The text was updated successfully, but these errors were encountered: