Skip to content
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

Cannot load underlying module for 'Charts' #129

Closed
knseir opened this issue Jun 5, 2015 · 21 comments
Closed

Cannot load underlying module for 'Charts' #129

knseir opened this issue Jun 5, 2015 · 21 comments

Comments

@knseir
Copy link

knseir commented Jun 5, 2015

I'm just getting started with this library :

  • I followed all the steps described under 'Usage' on the main page (https://github.com/danielgindi/ios-charts)
  • I added a UIView and made it subclass LineChartView
  • in ViewController.swift: the line 'import Charts' gives an error: 'Cannot load underlying module for 'Charts'
    Why is that ?

Thank you !

@danielgindi
Copy link
Collaborator

Can you a try git pull and recompile? (#144)

@knseir
Copy link
Author

knseir commented Jun 11, 2015

Hi Daniel, it still doesn't work, I'm sorry

@danielgindi
Copy link
Collaborator

Did you by any chance import the Framework, or the code itself?

@danielgindi
Copy link
Collaborator

iOS 7.0 does not support Frameworks...

danielgindi added a commit that referenced this issue Jun 11, 2015
The matrix multiplication order was incorrect
@knseir
Copy link
Author

knseir commented Jun 11, 2015

I'm using iOS 8
I imported the framework. Here are some screenshots:

screen shot 2015-06-11 at 1 15 37 pm
screen shot 2015-06-11 at 1 14 49 pm

@danielgindi
Copy link
Collaborator

When you go to Build Phases, do you see it under the linked frameworks?

On Thu, Jun 11, 2015 at 1:17 PM, knseir notifications@github.com wrote:

I'm using iOS 8
I imported the framework. Here are some screenshots:

[image: screen shot 2015-06-11 at 1 15 37 pm]
https://cloud.githubusercontent.com/assets/10488165/8104770/0822c898-103c-11e5-9256-e2359e78d33e.png
[image: screen shot 2015-06-11 at 1 14 49 pm]
https://cloud.githubusercontent.com/assets/10488165/8104771/0854521e-103c-11e5-8ce2-bc8a48127af4.png


Reply to this email directly or view it on GitHub
#129 (comment)
.

@knseir
Copy link
Author

knseir commented Jun 11, 2015

Yes. Screenshot below :

screen shot 2015-06-11 at 3 06 33 pm

@danielgindi
Copy link
Collaborator

That's weird.

@danielgindi
Copy link
Collaborator

Alamofire/Alamofire#122

@knseir
Copy link
Author

knseir commented Jun 11, 2015

hmm... So, should I install cocoa pods or add the swift files ?
I actually tried installing cocoa pods yesterday, it didn't work but I'm not sure I did it right

@danielgindi
Copy link
Collaborator

No, it means that you need to remove the framework, let your project build
completely, and then add the Framework... They say there's a bug like that,
so let's give it a try!

On Thu, Jun 11, 2015 at 3:30 PM, knseir notifications@github.com wrote:

hmm... So, should I install cocoa pods or add the swift files ?
I actually tried installing cocoa pods yesterday, it didn't work but I'm
not sure I did it right


Reply to this email directly or view it on GitHub
#129 (comment)
.

@knseir
Copy link
Author

knseir commented Jun 11, 2015

Yes ! it worked.
I actually had to build once Without removing the framework
I just removed 'import Charts', built the project, added the import line and built again
Thank you

@danielgindi
Copy link
Collaborator

Ha ha! That's one of the stupidest bugs I've ever had to solve...

@knseir
Copy link
Author

knseir commented Jun 11, 2015

This one actually looks like it might from Xcode...

@danielgindi
Copy link
Collaborator

Yeah, it's xcode alright...

@aspgod
Copy link

aspgod commented Feb 21, 2016

The solution works, Thanks

@beausmith
Copy link

I had this same issue and googled for "Cannot load underlying module for charts" and ended up here. I followed danielgindi's instructions:

  1. Remove "Charts.framework" from Project > "Build Phases" > "Link Binary With Libraries"
  2. Build project.
  3. Add "Charts.framework" back to "Link Binary With Libraries"
  4. Build project.

Success!

@aknza
Copy link

aknza commented May 24, 2016

Nice bug :) I'm trying for three days. Thanks !

@Vektrat
Copy link

Vektrat commented Sep 12, 2016

For future reference, and for an easier fix, in my case by cleaning the build and re-launching it also fixed the issue. (Product -> Clean)

@alebla
Copy link

alebla commented Jun 18, 2018

Thanks to this thread, my evening continues. 3 hour headache solved. You guys are the best.

@yul1
Copy link

yul1 commented Aug 11, 2018

It really works. Thank you all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants