Ok, I can't figure out what's the catch here. I follow all the instructions to configure my new project using CocoaPods to use Facebook SDK. Once I open generated project workspace, Xcode offers me to convert some source code in Pods project to Swift 2.3 or Swift 3.0.
I tried twice - with converting to Swift 3.0 and converting to Swift 2.3. Neither works and both give me on average ~120 compilation-time errors.
What's the deal here? I can't find anyone with similar problems. They seem to support Swift 2.3, but it doesn't work actually.
Xcode 8.0, Deployment target 8.0, latest FB sdk available through pods - 4.16.1
Facebook version 0.2.0 has support for Swift 3.0. Make sure you do the following before installing the latest version of Facebook SDK:
1: Get the latest version of Cocapods:
gem install cocoapods
(or if the above fails)
sudo gem install cocoapods
2: Update your local specs repo by running:
pod repo update
3: And then update your pod file and run pod update or pod install
pod 'FacebookCore'
pod 'FacebookLogin'
pod 'FacebookShare'
I think your probably missing step 1.
Related
I have an old Objective-C project that contains Firebase/Core and Firebase/Messaging. I have to upgrade all those librairies and add other Firebase products. In the documentation there is no mention of the versions only the libraries name like this pod 'Firebase/Messaging'. Even if I try a pod install remove the libraries names from the PodFile make pod install to remove them, then re-add them in the PodFile and make pod install I find in the PodFile.lock that the installed versions are not the last ones.
How is it possible to upgrade Firebase libraries installed by CocoaPods in order to get the last versions on an Objective-C project ?
The min iOS deployement target is: 8.0
Use pod update instead of pod install to get the latest versions. If you're still not getting latest versions, examine the Podfile.lock file to see what dependencies restrict the version.
I am attempting to use the MetaWear cocoapod to connect to BLE sensors from my IOS application. Before adding this pod, I created a basic Single View Application in Xcode. I tried to compile and run it on my iPhone, and it showed up as expected.
Having done this, I did a pod init, and updated my Podfile to look as follows, as recommended in the above MetaWear cocoapod link:
platform :ios, '12.2'
target 'myProj' do
use_frameworks!
pod 'MetaWear', '~> 3.2'
end
Once I run "pod install", I get the following output:
Analyzing dependencies
Downloading dependencies
Using Bolts-Swift (1.4.0)
Using MetaWear (3.2.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 2 total pods installed.
I then open my Xcode project ( myApp.xcworkspace ), and when I try to re-build the project, I keep getting this error:
Could not build Objective-C module 'BoltsSwift'
This is also shown in the following image:
As a result, I was under the impression that maybe I should downgrade the BoltsSwift version, but specifying something lower than 1.4, seems to be ignored. For example, I added this pod:
pod 'Bolts-Swift', '~> 1.3'
And my output after running pod install, still yielded "Using Bolts-Swift (1.4.0)". So I am not too sure how to get rid of this compilation failure. Maybe downgrading BoltsSwift is not the correct course of action. What can I try? (I am using Xcode Version 10.2.1 (10E1001))
Ok, turns out that by default, XCode set my Swift compilation to 5.0 for the BoltsSwift and MetaWear pod. I changed it to Swift 4, and I was able to build.
Updating the pods compilation level might also be a good idea, as described here :
How to set the Legacy Swift Version for each Pod in Podfile Xcode 9.0 Swift 3.2 / Swift 4.0
I'm following a Swift tutorial and need to use ReactiveCocoa, which I am trying to install with Cocoapods.
Very simple Podfile :
target 'MyAppTest' do
use_frameworks!
pod 'ReactiveCocoa'
end
Everything goes well with Cocoapods (although I don't know why I am getting the 4.0.1 version when the latest should be 5.0.0..? See here) :
But once in my project, I simply cannot build it. Here are all the errors I am getting :
I really don't know what to do...
Cocoapods version is 1.1.1 and Swift is 3.0.2.
Thanks for your help.
This was building previously but isn't anymore. I updated cocoapods and pulled new data in with pod update but still can't build my iOS 9.0 app anymore:
/Users/cdub/Developer/AppName/Pods/Headers/Public/
AWSCognito/AWSCognitoSyncService.h:198:4:
Type arguments cannot be applied to non-parameterized class 'AWSTask'
Why is this happening?
The version of AWSCore and AWSCognito need to match. It looks like your AWSCognito is newer than AWSCore. How did you get AWSCognito and AWSCore? Both through CocoaPods? You need to use pod update when updating the pods instead of pod install.
If you keep encountering the issue, you should delete Podfile.lock and Pods/ and then run pod install to cleanly install the SDK. AWS Mobile SDK iOS Developer Guide has more information about how to setup the SDK.
I want to use Dropbox API in my iOS project.
I'm doing this instructions:
https://www.dropbox.com/developers/documentation/swift#install
And after pod install, I opened my workspace and see many errors in Alamofire. What am I doing wrong?
I'm using Xcode 7.2.1
When you run pod install for SwiftyDropbox, it pulls in Alamofire via the dependency:
s.dependency "Alamofire", "~> 3.1"
The latest version of Alamofire is currently version 3.3.0. There's some information there under "Upgrade Notes" about how this release will only work in Xcode 7.3, due to Swift 2.2 changes. So, you have two options:
1) Upgrade to Xcode 7.3
2) Revert to an older Alamofire release