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

iOS 9 Won't Compile (Also, no such module 'Charts') #282

Closed
alexgerrese opened this issue Aug 6, 2015 · 13 comments
Closed

iOS 9 Won't Compile (Also, no such module 'Charts') #282

alexgerrese opened this issue Aug 6, 2015 · 13 comments

Comments

@alexgerrese
Copy link

Hi, I love the work you've done for the community and I really want to use your framework! I've read the ReadMe multiple times but somehow still I can't use Charts, so either I'm stupid or some bug is causing this. (I noticed there was no mention of iOS 9 in the ReadMe so stop me if that's the reason!)

I dragged the Charts folder into my project root files, dragged the Charts.xcodeproj into my project and added the framework to Embedded Binaries. I then created a new file, wrote "import Charts" and I get the error "no such module 'Charts'". Also, as soon as I add the framework (either before or after I write the import statement) my project will no longer build.

Any ideas what the problem may be? Thanks!

@Jirka1111
Copy link

I have a same problem with no such module.

@pmairoldi
Copy link
Collaborator

The steps for iOS 9 are the same as iOS 8 FYI. Since you are using iOS 9 then you are probably using one of the xcode betas and swift 2.0. As of right now the swift 2.0 changes are not finalized and might not work depending on what beta you are on. It should currently work with beta 4 but beta 5 fixes have not been merged yet (see #291). You can see the progress in the swift-2.0 branch.

If you absolutely need it before swift-2.0 is ready I suggest downloading the swift-2.0 branch source and trying that. If that doesn't work, then we can debug the issue further. Hope that helps 😃.

@alexgerrese
Copy link
Author

Thanks for your comment. Unfortunately, I am using iOS 9 beta 4 and the latest release from the swift 2.0 branch to no avail. I have followed the instructions and can import the framework, but immediately my project stopped compiling and when I try to "import Charts" an error message says "no such module 'Charts'."

@pmairoldi
Copy link
Collaborator

I just tried to do this by following the instructions in the readme and it worked so im not sure how to help you. Are you sure that your xcode is pointed to the right version. It might not be if you switch between beta and non beta. You can check in out under preferences.

screen shot 2015-08-11 at 00 12 59

@alexgerrese
Copy link
Author

That is weird. I was on Xcode 6.4 but I changed it to 7.0 and I get the same error. Here is a screenshot of errors I get before I add the framework (it compiles):
screen shot 2015-08-10 at 11 20 46 pm
And here is what happens after:
screen shot 2015-08-10 at 11 22 48 pm
It looks like there's no difference but it fails to build only the second time.
I was just supposed to drag the .xcodeproj into my project right?
screen shot 2015-08-10 at 11 24 05 pm

@pmairoldi
Copy link
Collaborator

Everything looks good. Did you drag the whole unzipped folder into your project's folder and then add the charts.xcodeproj to your project?

@alexgerrese
Copy link
Author

Yep, the whole "Charts" folder (not with the example project though) is there.

@alexgerrese
Copy link
Author

I'm slightly confused though because Xcode doesn't give a reason for the build failure. Is this normal?

@pmairoldi
Copy link
Collaborator

probably some bad cache somewhere. try doing a clean command+option+shit+k and command+shift+k. If that doesnt work delete the derived data folder. then try again.

@alexgerrese
Copy link
Author

I did that and I finally get an error:
screen shot 2015-08-10 at 11 42 53 pm
Any ideas?

@pmairoldi
Copy link
Collaborator

Ah ok. This is a known issue. There is a pending fix for it here (see #274). Maybe trying downloading their branch and see if that fixes your issue. Or maybe update to beta 5 and see if its fixed.

@alexgerrese
Copy link
Author

Alright thank you! I'll update to beta 5 in the morning and let you know if anything changes.

@alexgerrese
Copy link
Author

It is indeed fixed in beta 5!

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

3 participants