I'm just getting started with the iOS charts 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 !
It's possibly related to this issue too: https://github.com/Alamofire/Alamofire/issues/122
In short: Seems like there's a bug in Xcode 6.3.1, where new projects have problems when importing Embedded Frameworks. In such a case, you need to let the project build first, and then add the framework to the project.
Sounds like your project haven't added the framework successfully. I just started with ios-charts as well, and I followed the steps on github as well and it worked like a charm. What I did was to just drag the Charts.xcodeproj into my Project Navigator and it worked like a charm. If this doesn't work for you, however, make sure you are using iOS 8. If you are not, then you have to add the .swift-files to your project. If you are using iOS 8 and the approach still doesn't work, I'd try to install it using CocoaPods instead. I'm fairly new in CocoaPods so can't really help you there, but just google on how to install frameworks using CocoaPods and you should find what you seek.
Sorry if I wasn't of much help!
The answer comes a bit late, but what solved the problem for me was to clean my project by selecting the option Product > Clean from my status bar. Hope it might help someone else in case you solved the problem already.
After cleaning the product once I received this error. I then removed the framework from embedded binaries, cleaned the product, then added it once more to embedded libraries. I then built the product and retried the import statement. The import statement worked.
I had the same issue with KeychainAccess pod. Even though the pod was installed it use to throw an error
‘Cannot load underlying module for KeychainAccess’.
The fix that worked for me :
Uninstall the pod and install it again
Delete the derived data content
Quit Xcode and start again
Make sure your scheme is targeting an iOS device or simulator. If you build for your Mac it'll give you this error.
Build the project and this error will go away
Related
in the past I have developed some simple iOS apps and today I saw that "phyphox", an app I would like to customize, is open source. So I downloaded the project, however it relies on some third-party libraries. Picture of the error message. I tried to compile these libraries and added the .framework files to the framework folder of the Xcode project, but the error messages wouldn't go away. What am I doing wrong?
Thanks for your help!
It sounds like you need to create a podfile to download everything properly. this video explains it really well! I've never done it the .framework way before, but I believe that podfiles will solve your problem because it's installed through your terminal and becomes a large piece of your project. I hope this helps! :)
I've tried every way of installing 'Snapkit' but so far I'm not having much luck.
I'm using the following:-
Xcode 8.3.3
So far I've tried following all the documentation online to solve the issue, however it still isn't working. Including following the steps here.
The current error message is "Cannot load module 'Snapkit' as 'Snapkit".
Although previously the message was no such module 'Snapkit'.
Typo in case - SnapKit, not Snapkit.
import SnapKit
I had the same error recently. That's why I saw your question. I rebuilt and ran the app. After the build is finished it now recognizes SnapKit )). If you opened it through workspace and if the contents of the pod file are ok, then it should open. Try building the project and type SnapKit after it.
Please ensure if you're using Cocoapods as your dependency manager that you're loading the Xcode WorkSpace and not the project file. Otherwise try cleaning the project and rebuilding.
I installed Charts via cocoapods to an Xcode project but I get the following errors on building it: 'No such module Charts' and 'ChartPlatform.swift : Method does not override any method from its superclass'.
I made sure to uncomment 'use_frameworks', in the podfile and open the project using the xcworkspace file. Not sure where I went wrong. I've always installed pods the same way and haven't had problems till today.
How can I fix this?
I ran into the same problem because I was using an older version of Xcode. The Charts framework only works with Xcode 8 and swift versions 2.3 or 3.0. Try updating and see if that fixes the issue.
In my case I just removed Charts.framework from Embedded Binaries and then added again rebuild the project (Cmd+B) the error has gone.
I've been using Firebase SDK for some months but never got an issue. This time I can't get the storage to work even if I did all the steps correctly. I have the correct podfile and when I do the install I can see it downloads the correct framework and I can see the framework listed in my project, too.
I tried to change 'import Firebase' to 'import FirebaseStorage', it recognizes the framework and doesn't give any error on the import, but I still get the same error.
Edit: I know how to show images in my question but I can't do it because I must have at least 10 reputations.
Edit 2: I resolved and I'm waiting to accept my own answer.
Ok, that project was not working so I created a new project with the same podfile and all went well. Maybe it was a naming conflict because stupidly I named my first project FirebaseStorage.
I have an ios project first made in Xcode4.6. I have update it to Xcode5.0.2. Now I want to change the project to using cocoapods to manage the third party pods.
Due to a newer to cocoapods.I search the Internet to how to install cocoapods and so on.Now it's OK.So I run the pod install to get "AFFnetworking 2.1.0". .xcworkspace generate successfully.Then I open the workspace.I saw this in the navigation
There are many question mark.I think this means that Xcode5.0.2 didn't know the AFNetworking 2.1.0 added by cocoapods. And If I write the "#import "AFNetworking.h" in a .m file. Xcode will say that can't find the "AFNetworking.h".
I am a newer to cocoapods. So home someone could help me. Tanks a lot.
Because AFNetworking is linked as a library you need to use the < > import style. So #import <AFNetworking/AFNetworking.h>.
The question marks are coming from your version-control system, not from Xcode itself; they indicate that the files added by CocoaPods are new to version control. I’d recommend committing all of the CocoaPods-related files right away so that you have just one commit that represents “moving to CocoaPods”.
I guess you are using git repository.Add files pod to repository, currently they are untracked thats the reason for '?' there.if the error persists then see the following discussion
AFNetworking Cause Error while using XCTest in Xcode5