I am trying to using Cocoapods 0.39.0 for the dependencies of my project. I have followed the steps, but I end up with a red Pods.framework in my project. If I look at the path where XCode 7.2.1 says it should be, it doesn't exist:
/Users/ajmas/Library/Developer/Xcode/DerivedData/myproject-cskuurnzjrcpcxfoyaceaeepshgt/Build/Products/Debug/Pods.framework
I have looked around at other entries in Stackoverflow, but I am not find anything indicating how the framework should be generated.
The contents of my Podfile are:
source 'https://github.com/CocoaPods/Specs.git'
target 'myproject' do
platform :osx, '10.11'
use_frameworks!
pod 'Alamofire', '~> 3.0'
end
Any ideas?
Edit, also tried with Cocoapods 1.0.0.beta and no change, even after updating the Podfile to confirm to 'target' being a requirement now.
Build your project with "Generic iOS Device" selected.
If this happens it's most likely because you are using <your_project>.xcproject. When you run pod install CocoaPods creates a <your_project.xcworkspace file that you need to use to have dependencies installed via CocoaPods be available when compiling.
Related
I have a project that has the Podfile with the following configuration
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
target 'CDA' do
pod 'RestKit', '~> 0.27.0'
pod 'ZBarSDK', '~> 1.3.1'
end
I use the Pod install command and I get the following result
But when I try to build the project on Xcode, I received the following error:
For some reason, the compiler was not able to find the libraries from cocoapod.
How can I fix this error?
I found a way to fix the problem.
I follow the guide on this site
https://guides.cocoapods.org/using/troubleshooting.html
What fix the problem for me is the step number 5.
I add the Libraries direct to build now and at the moment it works now for me, all builds are working now.
I have a xCode project. I am trying to run FolioReaderKit. I've installed the all project requirements such as CocoaPods and Carthage and I've fixed the errors except ZFDragableModalTransition.
I've downloaded it and added into my project over and over, I've added it as a Link Binary but I'm still getting same error. "No such module ZFDragableModalTransition in Swift"
I am very new in swift and Xcode therefore I might be make a mistake but I didn't manage it yet.
Do you have any suggestion?
You can see the error attached images.
If you want to run the FolioReaderKit Example project and you are new to Swift and Xcode I suggest you to use Cocoapods instead of Carthage. You don't have to run FolioReaderKit.xcodeproj.
Just go to Example folder and follow this steps:
Open the Terminal on Example folder;
Run pod install (you need Cocoapods installed);
Open Example.xcworkspace file on your Xcode and run;
To add this you your project using Cocoapods create a Podfile and add:
use_frameworks!
target 'MyApp' do
pod 'FolioReaderKit', '~> 0.7'
end
Then use pod install to install it to your project, the usage documentation is in the Example project.
I do get the warning xcodeproj was renamed toproject. Please use that from now on. when running pod install with Cocoapods 1.0.
Also, [NSBundle bundleWithIdentifier:#"org.cocoapods.xyz"] returns nil.
With version 0.39.0 I don't get the warning and [NSBundle bundleWithIdentifier:#"org.cocoapods.xyz"] returns a valid bundle.
Does anyone know a solution for this?
Looks to your Podfile. You have string like
xcodeproj 'MyProj/MyProj.xcodeproj'
just replace xcodeproj to project
project 'MyProj/MyProj.xcodeproj'
Just stumbled upon this question. After renaming the xcodeproj to project, the warning was still there. I realized that the string xcodeproj path wasn't the one that needs to be renamed to project, but instead it's the param/key of Cocoapod xcodeproj.
This happens if you want to explicitly indicate the targeted project file. In my case, I had to explicitly indicate it, since my goal is to have a single Podfile that targets two different projects.
So from this:
source 'https://github.com/CocoaPods/Specs'
platform :ios, '13.0'
def commonpods
pod 'Mixpanel'
end
workspace 'MixpanelSample'
xcodeproj 'MixpanelSample_Swift/MixpanelSample_Swift.xcodeproj'
xcodeproj 'MixpanelSample_Objc/MixpanelSample_Objc.xcodeproj'
target 'MixpanelSample_Swift' do
xcodeproj 'MixpanelSample_Swift/MixpanelSample_Swift.xcodeproj'
commonpods
end
target 'MixpanelSample_Objc' do
xcodeproj 'MixpanelSample_Objc/MixpanelSample_Objc.xcodeproj'
commonpods
end
to this:
source 'https://github.com/CocoaPods/Specs'
platform :ios, '13.0'
def commonpods
pod 'Mixpanel'
end
workspace 'MixpanelSample'
project 'MixpanelSample_Swift/MixpanelSample_Swift.xcodeproj'
project 'MixpanelSample_Objc/MixpanelSample_Objc.xcodeproj'
target 'MixpanelSample_Swift' do
project 'MixpanelSample_Swift/MixpanelSample_Swift.xcodeproj'
commonpods
end
target 'MixpanelSample_Objc' do
project 'MixpanelSample_Objc/MixpanelSample_Objc.xcodeproj'
commonpods
end
Release Notes 1.0.0.beta.3 (2016-02-03). GitHub issue
Rename the xcodeproj Podfile directive to project.
Just replace xcodeproj by project
I'm trying to install a new pod (PXGoogleDirections) to my already existing xcode project which already had a GoogleMaps pod installed.
platform :ios, '8.0'
use_frameworks!
target 'Roadtrip' do
pod 'GoogleMaps'
pod 'PXGoogleDirections'
end
target 'RoadtripTests' do
end
target 'RoadtripUITests' do
end
When I run "pod install" I'm getting the error: "[!] The 'PROJECT' target has frameworks with conflicting names: GoogleMaps."
Any idea how I can fix that?
I've already tried to use the same GoogleMaps version as PXGoogleDirections uses, like so:
pod 'GoogleMaps', '1.10.4'
but I'm getting the same error.
Thanks for your help.
This is because PXGoogleDirections itself is bundled with GoogleMaps. In the documentation of PXGoogleDirections says the way to use googlemaps with it.
Check this
If your app also requires the Google Maps iOS SDK, you might run into
troubles because of conflicts with the bundled Google Maps iOS SDK in
the Cocoapod. If you happen to face these problems, please try to do
the following:
Add -framework "GoogleMaps" to the "Other Linker Flags" of your Xcode
project. Make sure you are linking your app with all the libraries and
frameworks required by the Google Maps iOS SDK. For a full list, see
here:
https://github.com/CocoaPods/Specs/blob/master/Specs/GoogleMaps/1.10.4/GoogleMaps.podspec.json
Also make sure that your app contains the GoogleMaps.bundle in the
"Copy Bundle Resources" phase of the build process. If it doesn't, you
can manually add it to Xcode by browsing to the following directory in
the Finder:
/Pods/PXGoogleDirections/Dependencies/GoogleMaps.framework/Resources/GoogleMaps.bundle.
Drop it in the "Frameworks" group of your project and uncheck the
"Copy" checkbox.
Direct Link https://github.com/poulpix/PXGoogleDirections#in-case-of-problems
I got a project where I use some Pods, where one of them is Meteor.
I have installed with cocoapods with this podfile
platform :ios, '8.0'
use_frameworks!
pod 'OpenTok', '~> 2.6'
pod 'Meteor', '~> 0.1'
And then open up the .xcworkspace instead of .xcodeproj
Then in my project I import Meteor in my AppDelegate.
When I choose a simulator and try to run/build it comes with the error "No such module 'Meteor'"
But then if I take my iPad and connect it and choose it as target, I can fine run/build.
I have not be able to find a solution for this yet.
I had the same symptom after following these instructions to speed up my build:
Prevent Xcode from building subprojects every time
I was able to run on a simulator again after reverting.
Product > Scheme > Edit Schemeā¦
Build (in left column)
Make sure that "Find Implicit Dependencies" is Checked