tl;dr; how to use old (what shouldn't use use_frameworks!) and new pods together in podfile?
I had working podfile:
platform :ios, '8.0'
use_frameworks!
target 'myApp' do
pod 'Alamofire', '1.3.1'
pod 'SwiftyJSON', '~> 2.2.1'
end
Then I added OneSignal pod according to documentation link
So my pod file changed to:
platform :ios, '8.0'
use_frameworks!
target 'myApp' do
pod 'Alamofire', '1.3.1'
pod 'SwiftyJSON', '~> 2.2.1'
pod 'OneSignal'
end
I updated pods and run build - got error:
ld: framework not found OneSignal
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I checked OneSignal pod and it looks differently compared to others:
Thats probably because is old style objective-c framework.
I can add this framework manually to my project but I wonder how to make it work properly with cocoapods?
This issue relates to my problem I think https://github.com/CocoaPods/CocoaPods/issues/3338
Update
I'm currently using Xcode 6.4
What version of Xcode are you using?
If update to the latest release versions of both Alamofire and SwiftyJSON and build with Xcode 7 it should fix your build errors.
platform :ios, '8.0'
use_frameworks!
target 'myApp' do
pod 'Alamofire', '2.0.2'
pod 'SwiftyJSON', '~> 2.3.0'
pod 'OneSignal'
end
Related
I have a problem using FireBase. I had no problem with the build, but there was an error with the Firebase in iOS10.3 and I tried the suggested solution.
rm -rf ~/Library/Developer/Xcode/DerivedData/
And then I erased the cache and rebuilt it. However, the error has been changed.
'FirebaseCore/FirebaseCore.h' file not found Could not build // firebase.h
Objective-C module 'Firebase' // Appdelegate.swift
my podfile
# Uncomment the next line to define a global platform for your project
platform :ios, '12.0'
target 'testtest' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for DeleteMe
pod 'SwiftSVG', '~> 2.0'
pod 'Toaster'
pod 'BigInt', '~> 4.0'
pod 'CryptoSwift'
pod 'RealmSwift'
pod 'web3.swift.pod', '~> 2.2.0'
pod 'Firebase'
pod 'Firebase/Messaging'
pod 'Firebase/Auth'
pod 'Firebase/Core'
end
I erased Pod and tried to rebuild it, but the error was the same.
$ pod deintegrate
$ pod clean
$ pod install
How can you solve this problem?
Xcode : Version 11.0
realDevice : iphone5 10.3
I just built my other test iPhone 6 version 12.4, but there was no error. There seems to be a problem in version 10.3.
So I recently converted an old swift 3.2 project to a 4.2(quite the jump, i know).
I am getting these errors:
Here is my Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!
target 'app' do
pod 'Alamofire', '~> 4.0'
pod 'EVReflection/XML'
pod 'FontAwesomeKit', :git => 'https://github.com/PrideChung/FontAwesomeKit.git'
pod 'SVProgressHUD'
pod 'PageMenu', :git=> 'https://github.com/orazz/PageMenu.git'
pod 'Kingfisher', '~> 3.0.0'
pod 'RichEditorView'
pod 'SwiftKeychainWrapper'
pod 'FacebookCore'
pod 'CHTCollectionViewWaterfallLayout/Swift'
pod 'FacebookLogin'
pod 'FacebookShare'
pod 'Fuzi', '~> 1.0.0'
end
does this look correct?
Thank you for any insights
First, run pod install
And then, check if the version of your pods, probably they are not compatible with Swift 4.2, so you have to update then, or change the "Swift language version" on Pod inspector to swift 3.2 like that way:
Select the "Pod" project in project navigator:
Select your pod on Targets selector:
And on "Build settings" tab, find and change the "Swift language version" property:
Note: You can get away of this problem this way, but i highly recommend that you update your pods.
I am using various Swift and Objective-C libraries in my (Swift) project. My Podfile looks as follows:
platform :ios, '8.0'
use_frameworks!
pod 'Alamofire', '~> 3.0'
pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git'
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'FBSDKLoginKit'
pod 'Fabric'
pod 'TwitterKit'
pod 'SimpleAuth/Instagram'
pod 'AFNetworking', '~> 3.0'
pod 'Parse'
To have support for using both (Swift and Objective-C) libraries, I use use_framework! directive in Podfile to install and use them. If we use directive use_framework! for Objective-C libraries, we are not required to create any kind of bridging-header.h and we can use it directly by import ModuleName. I am having no issues with any of the above mentioned pods/frameworks while installing or using them.
But there is this one framework which is written in Objective-C and I install it by adding its entry in Podfile as pod 'CleverTap-iOS-SDK'. The installations goes well but when I try to import CleverTapSDK or import CleverTap to use the library, it is giving me no such module error.
Just in case: My Xcode version is - 7.3 (7D175)
I've been trying to resolve this issue for 3 hours and I tried everything that's on the web but nothing seems to work, I'm just trying to add the (login in with Facebook) button on an app connected to parse.
I even started a new project from scratch to see if the same issue would appear and it did.
the error: (clang: error: linker command failed with exit code 1 (use -v to see invocation))
It appeared after doing 'pod install' in both apps, this is what I have in my Podfile:
platform :ios, '8.1'
xcodeproj 'carpoolup'
target :carpoolup, :exclusive => true do
pod 'Parse'
pod 'ParseUI'
pod 'ParseFacebookUtilsV4'
pod 'ParseTwitterUtils'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
end
please help, what does this error mean?
Try adding use_frameworks! after the platform line to force cocoapods to use frameworks.
Example from cocoapods.org:
platform :ios, '8.0'
use_frameworks!
target 'MyApp' do
pod 'AFNetworking', '~> 2.6'
pod 'ORStackView', '~> 3.0'
pod 'SwiftyJSON', '~> 2.3'
end
I have been assigned at work to update an app that hasn't been touched in a year and a half. The cocoa pods version is 0.22.
I am trying to update it to 0.35. I've run 'sudo gem update' and have .35, but when I run 'pod install' it just installs the old versions of all of the pods (i.e. AFNetworking 1.1.0).
Thanks
platform :ios, '6.0'
pod 'Facebook-iOS-SDK'
pod 'OpenCV'
pod 'RestKit'
pod 'QuickDialog'
pod 'ReactiveCocoa'
pod 'SVProgressHUD'
pod 'Mixpanel'
pod 'GVUserDefaults'
pod 'TTTAttributedLabel'
pod 'uservoice-iphone-sdk'
target :ShoeboxTests, :exclusive => true do
pod 'Kiwi', :head
end
I'm new to using cocoa pods so I'm not sure what to do with this file.
Your podfile specifies that you're targeting iOS 6, so it is possible that cocoapods is only giving you the highest version known to support iOS 6.
Try removing that line entirely, or changing it to:
platform :ios, '8.1'