cocoapods show Swift error when installing - cocoapods

I try to 'pod install' my project with some libraries (AFNetworking, GooglePlaces and GoogleMaps). However, it always shows the error:
[!] Pods written in Swift can only be integrated as frameworks; add
use_frameworks! to your Podfile or target to opt into using it. The
Swift Pods being used are: Alamofire, GooglePlaces, and ObjectMapper
But I only use objective-c frameworks, for Objective C project. I did the research but cannot find how to fix this. My current version of cocoapods is 1.0.0.

The Swift Pods being used are: Alamofire, GooglePlaces, and ObjectMapper
You may be writing in Objective-C but the pods you want to use are not. You would need to add use_frameworks! to the Podfile to say that you are fine with making them all frameworks in order to support Swift.

Related

When i build and run my app i don't have any problems, but when i archive i have error

My parameters are
Library setup method: CocoaPods
library: https://github.com/evgenyneu/Auk
Version of the library: 7.0
Xcode version. Example: 8.3.3
OS version: iOS 9.0
My podfile is
platform :ios, '9.0'
use_frameworks!
target 'myAppName' do
pod 'Alamofire', '> 4.0'
pod 'PayPal-iOS-SDK', '> 2.12.0'
pod 'moa', '> 8.0'
pod 'Auk', '> 7.0'
pod 'AZSClient'
end
When i build and run the app in iphone, i don't have any problems, but when i try archive the solutions for submit in the itunes connect i have various error:
Value of type 'UIScrollView' has no member 'auk'
Use of unresolved identifier 'Moa'
I tried remove this library from podfile and install with Carthage, but i have the same result.
Can help me
As suspected, the workaround has a serious downside:
Setting the Strip Linked Product setting to NO creates an archive that will not validate when uploaded to iTunes Connect for validation by Apple.
I got a message saying the binary had issues:
Non-public API usage:
The app references non-public symbols in Lisa: __tlv_atexit
I advise you to keep a copy of Xcode 7 if you need to submit a new binary to iTunes Connect!

No such module ZFDragableModalTransition in Swift

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.

Pods.framework in red, doesn't exist in DerivedData

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.

Podfile PXGoogleDirections and GoogleMaps conflicting names

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

Use of private header from outside its module error in CPTBorderedLayer.m of CorePlot

I upgraded to a new laptop with El Capitan, XCode 7.1, and Cocoapods 0.39.0. When I check out an existing project that uses the CorePlot framework, run pod install, and build the project, I get the following error messages in the CPTBorderedLayer.m file of CorePlot:
Use of private header from outside its module: '_CPTBorderLayer.h'
Use of private header from outside its module: '_CPTMaskLayer.h'
Below is a snippet of my podfile:
platform :ios, '9.0'
use_frameworks!
inhibit_all_warnings!
target 'my_project' do
...
pod 'CorePlot', :git => 'https://github.com/core-plot/core-plot.git'
This project was compiling fine using Xcode 7.0 and cocoapods 0.37.2, but I'd really rather not downgrade everything unless there are no other options.
This error has something to do with the way CocoaPods sets up the framework project. A temporary fix is to remove the use_frameworks! line from the pod file to let it build the dependencies as a static library.
Please report the problem on the Core Plot issue tracker and we'll see if this can be fixed.

Resources