Can't add "MidiParser" pod to Podfile - cocoapods

I am trying to add this github project to my project as a pod: https://github.com/matsune/MidiParser
In my PodFile, I have tried
pod 'MidiParser'
and
pod 'MidiParser', :git => 'https://github.com/matsune/MidiParser.git'
but either time I get the error
Unable to find a specification for 'MidiParser'.
I have tried adding other pods like 'https://github.com/daltoniam/SwiftHTTP' just to see if they work, and they do. I notice there are multiple projects on GitHub called MidiParser, so maybe I need to distinguish between them somehow? The installation instructions in the MidiParser README only give instructions for Carthage. It says to add this line to the Cartfile:
github "matsune/MidiParser"
I also have also tried:
pod 'matsune/MidiParser'
I notice I can't find the project when I search for it here: https://cocoapods.org.
Does that mean I simply can't install the project using Cocoapods, and that I have to do it manually?
Edit: I ended up using Carthage.

CocoaPods requires pods to be specified with a podspec to describe its Xcode workspace integration. See https://guides.cocoapods.org/making/making-a-cocoapod.html

Related

framework not found GoogleMapsCore Error

I'm using cocoapods in my project and I have googlemaps(2.5.0) and googleplaces(2.5.0) in my podfile(which I've installed with 'pod install').
However, I'm getting this error when I try to build:
ld: framework not found GoogleMapsCore
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've changed 'Build Active Architecture Only' to NO in my Build Settings. I'm also in my project.xcworkspace NOT my project.xcodeproj file. I've even tried changing my valid architectures but none of this is working.
It might be helpful to note that, inside my workspace Project Navigator, for some reason I have my project.xcodeproj file in red. project.xcodeproj is usually never there let alone red.
Finally a solution:
pod deintegrate
pod install
I had to reclone my Git project(because I had tried too many solutions to backtrack through new warnings and errors) then I just did the above commands in terminal.
Though #Sam King's solution worked for me, I considered it as a hard fix without knowing the actual issue.
The issue for my case was, I had accidentally deleted the GoogleMapsCore framework(Might be from 'Manage System Storage').
So, I just checked out an older version of my app and the issue got fixed.
For those using Ionic Framework,
Remove googlemap plugin and install again. It worked for me.
Had the same problem after deleting GoogleMapsCore by mistake. and here's what worked for me:
From my project podfile , commented out the pods related to google maps, in my case
//rn_maps_path = '../node_modules/react-native-maps'
// pod 'react-native-google-maps', :path => rn_maps_path
// pod 'GoogleMaps'
// pod 'Google-Maps-iOS-Utils'
cd ios && pod install , to remove the pods i commented out
then i uncommented the pods i have commented earlier in step 1
cd ios && pod install to install the pods again
ran a clean build on xcode and it worked.
Remove googlemap related plugin and install again. It worked for me.
Please dont do deintegrate pod, if you do all libraries get install as new, that some how some libraries would not support your platform.
The better solution is to install the google places along with the GoogleMaps pod it will definitely work
Try this
pod 'GoogleMaps'
pod 'GooglePlaces'
if it doesn't work then open the terminal and do this below steps for your project
pod deintegrate
pod install
then
pod 'GoogleMaps'
pod 'GooglePlaces'

Using Cocoapods in a Workspace with two apps

I have two apps (xcode projects) that i want to have in one workspace. Since Cocoapods usually generates the workspace, i looked to see if it was possible to do this and found some answer. The recommended Podfile would look like:
workspace 'TestWorkspace'
target 'TestApp1' do
xcodeproj 'testApp1/testApp1.xcodeproj'
workspace 'TestWorkspace'
pod 'AFNetworking'
end
workspace 'TestWorkspace'
target 'TestApp2' do
xcodeproj 'TestApp2/TestApp2.xcodeproj'
pod 'MBProgressHUD'
end
(sorry wasn't sure how to have SO format the Ruby code)
So my folder structure looks like a TestWorkspace folder, with the two App projects folders, and the Podfile. Running pod install
[!] xcodeproj was renamed to project. Please update your Podfile accordingly.
and..
[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target TestApp1 to ../Pods/Target Support Files/Pods-TestApp1/Pods-TestApp1.debug.xcconfig or include the ../Pods/Target Support Files/Pods-TestApp1/Pods-TestApp1.debug.xcconfig in your build configuration (TestApp1/Pods/Target Support Files/Pods-TestApp1/Pods-TestApp1.debug.xcconfig).
So my question is what changes must be made to wind up with my TestWorkspace workspace having three projects: TestApp1, TestApp2, and Pods?
(btw, i changed the true names of my projects/workspaces to pseudo-aliases for the purposes of posting here. Hopefully, I changed everything faithfully.)
EDIT: Ok so i fixed the first warning (just a change in podfile syntax from xcodeproj to project). However, my workspace is definitely not being configured properly. I don't even see a Pod project after pod installing.
EDIT2: OK so i fixed the second warning by setting both project configuration files (debug and release) to "none". So now I have no errors, but the Pod project is still no where to be found. (Sorry if i'm solving parts of the question but I think its better to add edits than to create a new question).
Use the targets as scopes for the xcproject/workspaces. Update the podfile to something like this:
workspace 'TestWorkspace'
target 'TestApp1' do
xcodeproj 'testApp1/testApp1.xcodeproj'
workspace 'TestWorkspace'
pod 'AFNetworking'
end
target 'TestApp2' do
xcodeproj 'TestApp2/TestApp2.xcodeproj'
workspace 'TestWorkspace'
pod 'MBProgressHUD'
end
Now run pod install --verbose

Cannot find module FBSDKCoreKit Cocoapods

I'm trying to integrate facebook into my app using CocoaPods, using the use_frameworks! tag, and according to facebook's instructions here, also included the pod bolts. When I try use import FBSDKCoreKit in my appdelegate, I get a no such module 'FBSDKCoreKit error. I've included my podfile below:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.2'
use_frameworks!
pod 'Bolts'
pod 'Alamofire', '~> 3.0'
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'FBSDKLoginKit'
Additionally, in my Pods folder, there is a question mark next to Bolts, FBSDKCoreKit, and FBSDKSharekit, but not one next to alamofire, which I had been using previously. In the Frameworks folder in my Pods project, FBSDKCoreKit and Bolts are listed there, but are both red.
Any ideas? I've tried cleaning my project, and reinstalling and updating the pods.
For people moving from Carthage to Cocoapods make sure to remove the Carthage references of the FBSDKCoreKit from the Link Binary With Libraries under Build Phases option.
Please try below steps,
Explicitly mention the versions i.e.
pod 'FBSDKCoreKit', '~>5.8.0'
pod 'FBSDKShareKit', '~>5.8.0'
pod 'FBSDKLoginKit', '~>5.8.0'
Update pod repo using sudo pod repo update
Update pod using pod update
Seems that the facebook pods are Objective-C and they need a special way of importing in a swift project.
This is how I got it to work:
Create a bridging header in your project, if you dont have one(I created a new header file called Bridging-Header.h and set it as a bridging header in the project settings, like in the screenshot)
Then in this file import the facebook modules. Here's how my file looks like:
#ifndef Bridging_Header_h
#define Bridging_Header_h
#import FBSDKCoreKit;
#import FBSDKLoginKit;
#endif /* Bridging_Header_h */
Let me know if this workout for you or you need more help.
I fixed this by
Removing the Bridging Header. Facebook SDK doesn't need them anymore after version 4.1
Adding all of the .frameworks to the Projects Build Phases -> Link Binary With Libraries
Selecting each framework and building it. You can do this by selecting your project name next to the run arrow.
Cleaning the project and restarting my computer.
Very simple solution, if you are using Apple Swift Packages:
Go to Navigator pane and select the project
Then make sure you choose project name under "Project" not under "Targets"
Then select Package Dependencies tab
You will find the Facebook package there, double click on it
Change version to 9.0.0 and click "Done"
Rebuild, and it should be corrected.
Note that you may need this url to add Facebook SDK as Apple Swift Packages rather than Cocoapods.
You can try :
pod 'FBSDKCoreKit/Swift'
first add in pod file
pod 'FacebookCore'
pod 'FacebookLogin'
pod 'FacebookShare'
this is facebook swift library,after that before using FBSDKCoreKit,just use FacebookCore then import FBSDKCoreKit

Integrate Grabkit with cocoa pods in existing project

I have integrated Grabkit in my project via adding submodules. I want to add grabkit via cocoa pods. I surfed web alot. I have created a pod file.
pod 'Grabkit', :git => 'https://github.com/pierrotsmnrd/grabKit.git'
I have downloaded latest podspec file from https://github.com/CocoaPods/Specs/blob/05def154728953519546ee0c648a82f293d02f4f/grabKit/1.4/grabKit.podspec
When I run pod install or pod update I get following error:
$ pod update
Analyzing dependencies
CocoaPods 0.29.0 is available.
Pre-downloading: `Grabkit` from `https://github.com/pierrotsmnrd/grabKit.git`
[!] No podspec found for `Grabkit` in /path-of-my-project/Pods/Grabkit/Grabkit.podspec
Please suggest !!
I'm not sure why you'd want to download the latest podspec. The specs are automatically managed by the pod command line tool and there is a clone of the entire specs repo in ~/.cocoapods. The issue here is the case. It is grabKit notice the lowercase 'g'

Renaming default Cocoapods project

Is it possible to rename the default Pods xcodeproj and Pods subdirectory that are generated when you run pod install? Is there any way in the Podfile or pass an argument to pod install to do this? I couldn't find anything that suggested this on the http://cocoapods.org documentation.
This is not currently an option of any kind in CocoaPods. If you would like to see this in a future version we gladly accept pull requests over on Github

Resources