I'm trying to install the Charts package to use with CocoaPods and it keeps saying "No such module 'Charts'".
If I added the pod 'Charts' in the podfile, and did a pod install and the files are there in Xcode, how come it still gives me an error when I try to import Charts?
Do I still need to do the steps below? Or does CocoaPods do it for me?
Drag the Charts.xcodeproj to your project
Go to your target's settings, hit the "+" under the "Embedded Binaries" section, and select the Charts.framework
My pods file looks like this now:
You just have to hit Command-b to build, then the error will go away. The other solution is to hit Product > Build.
I had a similar problem when I was developing an app for an older platform. The CocoaPod I sourced supported Swift 4 but I was developing for Swift 3. When I sourced the last Swift 3 version of the pod, the "No such module" error was no longer there. Try the following line in your Podfile:
pod 'Charts', '3.0.3'
instead of the latest version.
try installing it manually moving the complete charts folder to your project, or downloading using carthage, it's way more cleaner using carthage than cocoapods because it doesn't create you a .xcworkspace like cocoapods.
Related
I believe the Snap Kit SDK may be faulty. I created a completely new iOS project, setup the Cocoapods workspace and then added:
pod 'SnapSDK'
With a sucesfull installation. I then as per the tutorial:
In my view controller added:
import SCSDKLoginKit
However I'm getting the error: No such module 'SCSDKLoginKit'
Any help would be appreciated.
The Cocapods installation method seems to be bugged at the moment. Instead of using CocoaPods, use Carthage to install. This should fix the error, as it fixed it for me.
Try to download individual SDKs to add to your project separately. In your Podfile, specify which kit you want. Each can be used independently.
This resolved issue of No such module 'SCSDKLoginKit'
pod 'SnapSDK', :subspecs => ['SCSDKLoginKit', 'SCSDKCreativeKit', 'SCSDKBitmojiKit']
I recently installed CocoaPods and Firebase into my project. I've been attempting to build but am getting the following errors:
'FirebaseCore/FirebaseCore.h' file not found
Could not build Objective-C module 'Firebase'
Command PhaseScriptExecution failed with a nonzero exit code
I checked my folders and the FirebaseCore.h file definitely does NOT exist. I've reinstalled CocoaPods, modified the Podfile and did a 'pod update' and 'pod install' several times.
I've reviewed several of the questions and solutions listed on stack overflow but none of them have worked.
Here are my specs:
Xcode 11.3.1
Swift 5
My Podfile looks like this:
# platform :ios, '9.0'
target 'project' do
use_frameworks!
# Pods for Project
pod 'MessageKit', '~> 3.0.0-swift5'
pod 'MessageInputBar'
# Add the Firebase pod for Google Analytics
pod 'Firebase/Analytics'
# Add the pods for any other Firebase products you want to use in your app
# For example, to use Firebase Authentication and Cloud Firestore
pod 'Firebase/Auth'
pod 'Firebase/Firestore'
end
That's the error you'll get when opening the project using the .xcodeproj file.
You need to use the .xcworkspace file to open the project.
That file is generated when installing the pods using cocoapods.
Other things to try
Quit XCode. Go into terminal and do this sudo gem install cocoapods. Then use the cocoapods.app to update the project with your pod file. Then clean and rebuild the project.
In your project, select the project name in the left column (where the project files are). Then in Targets, ensure the Team popup is selected to your team name, not 'None' and that your Signing Certificate is correct.
This one is extreme but I have seen it correct some build issues. Deleting the login keychain (using the keychain.app). This will also delete all of your stored passwords so keep that in mind.
Even I had same issue when upgrading to Xcode 11.2.1. Errors were resolved after using Firebase 6.13.0.
Please make changes to your Podfile as below,
pod 'Firebase', '=6.13.0'
pod 'Firebase/Core'
pod 'Firebase/Analytics'
Somehow my base project had other issues that were generating this error that I was never able to uncover. So I did the following:
1. Created a new project and imported old project files.
2. Installed cocoapods on the new project
3. Followed the FireBase instructions referenced in the answer from #Jay
4. Cleaned project and performed a build
5. No more error
I have the same problem as described here: I cant add socket.io module to my project.
I've tried all ways of dragging and dropping as described in answer, I've tried adding files to project from File menu. No matter what I do I get compile error "SocketIO module not found" on string import SocketIO
Is there a regular way of adding modules? Command line? Sorry if question sounds dummy - Im new not only to swift but to mac also (bought it to learn swift).
If that´s an issue (which it seems to be for not only you) I would go with CocoaPods instead.
Start by:
Do this in your terminal: sudo gem install cocoapods
Go to your project folder and open the terminal in that folder (cd ...)
Do this in your terminal: pod init
Remove all content in your newly created pod file and add this instead:
use_frameworks!
target 'YourApp' do
pod 'Socket.IO-Client-Swift', '~> 12.0.0' # Or latest version
end
Do this in your terminal: pod install
Open your project, note that you need to open the .xcworkspace file to be able to access your pods
Import the module import SocketIO
I created a sample project for you with CocoaPods installed and I have added SocketIO for you. Remember to run the .xcworkspace file. You can download the project here.
Add the socketio swift client with CocoaPods , but after that set the source of the client to Swift 3.2 then try to build it. I’m assuming you’re using Xcode 9 . To set the source to swift 3 from Xcode : go to Frameworks, select the SocketIO and go build settings and set Swift version to Swift 3.2
I faced this problem and it killed my 4 hours time.
I did the steps given by #Rashwan L but it didn't solve my problem though.
I was set iOS Deployment Target to 10.0 that was my main problem.
When I changed my iOS Deployment Target to 11.1 it works for me.
Good luck.
Update: I solved the question. Please see my answer below (underneath the question and comments).
This question was marked as a duplicate, but it's different because it is a brand new error that I couldn't find through any searches.
I tried installing Alamofire into my XCode project.
As per their their tutorial, I installed cocoapods onto my system.
I then navigated to the folder of my existing xcode project in the terminal, and did:
pod init
I then edited the new pod file and added:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!
target 'RainyShinyCloudy' do
pod 'Alamofire', '~> 4.4'
end
Finally, I executed the command:
pod install
My terminal told me the install was successful.
But when I opened the .xcworkspace, made a new swift class and tried to import Alamofire, I got this error:
One possible reason could be that I had tried to install an earlier version of alamofire earlier, deleted it and then installed this.
But I really don't know how that could have mattered.
Thanks for any help you guys can give me.
Actually it failed because you were trying to import AlamoFire and not Alamofire. Imports are case sensitive.
Update: I posted an answer earlier that was wrong.
But now I actually figured it out.
I made a new project, went to the settings menu by clicking on the name of my app in the project explorer.
Then I went to Linked frameworks and libraries which is at the very bottom of the General tab.
I pressed that little + icon, selected Alamofire.framework. and set the status to required
Following this, cleaning and rebuilding the project made the error go away.
So today I've been trying to try out a new project using Swift, but I've arrived to an abrupt halt. I've been trying to run the VideoCore sample project found here: https://github.com/jgh-/VideoCore/tree/823ec7cac50e5a0b4457bd06dd95a50dca88d9c0/sample/SampleBroadcaster-Swift.
So during the initial setup I had to navigate to the directory and run pod install. pod install executed without any errors, and say I need to close Xcode, and reopen the new workspace, which I did. When I try to go and run the app for debugging (as according to the documentation I can run it right after pod install'ing, I get an error that says 'type_half.inl' file not found. A few screenshots are here to better explain/show: http://d.pr/i/14TqW, and http://d.pr/i/1aYSi.
I've tried reinstalling the pod multiple times, and I haven't been able to resolve this issue. Has anyone had a situation like this, or have any idea on how to get out of this blackhole?
Thanks!
This has been resolved by downgrading CocoaPods to version 0.38.2. Here's what I did:
gem install cocoapods -v 0.38.2
gem uninstall cocoapods -v 0.39.0
And that fixed my issues.
Instead of downgrading CocoaPods to version 0.38.2. This error can be resolved in other way as I have fixed recently on of my project.
STEP 1:- Search Header Search Paths under build setting on GLM target or target that uses GLM pod like in my project VideoCore cocoapods uses GLM
STEP 2:- make it recursive instead of non-recursive.
Build again error will be fixed.
NOTE:- if you update cocoapods that you have to redo the steps again. Also target will be in pod project.
Attached image for reference.