I am implementing log in with Microsoft in my swift project and using MSAL for this. https://github.com/AzureAD/microsoft-authentication-library-for-objc
This is my pod file.
target 'TestMSL' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for TestMSL
pod 'MSAL', :git => 'https://github.com/AzureAD/microsoft-authentication-library-for-objc', :tag => '0.1.3'
end
For pod install it gives me error like CocoaPods could not find compatible versions for pod "MSAL"
Here strange is if i change my deployment target to 10 then pod installation works well.
Please help me how can i solve this. I want minimum deployment target 9.0.
Here is the answer from the microsoft authority on github
Current iOS deployment target supported by MSAL is 9.3. They haven't tested MSAL on iOS 9.0, so it's not officially supported.
Also, we'll be shortly dropping iOS 9.3 support around the time when iOS 12 gets released.
Original Answer
Related
On xcode, I'm trying to use a pod to implement a mail API in Swift. When I try to build the framework, I get this error:
Compiling for iOS 8.0, but module 'Alamofire' has a minimum deployment target of iOS 10.0
How do I change the pod so it builds for iOS 10.0 or above?
The problem occurs due to the Alamofire has updated its library. While Evreflection has not updated for the Alamofires updated version. You need to specify the Version of Alamofire here.
Use this line in podfile to specify the version
pod 'EVReflection/Alamofire','~> 5.10.1'
pod 'Alamofire','~> 4.9.1'
Then deintegrate the pods from project and install it again.
This would solve the problem you are facing
You should up Deployment Target of your app to 10.0 in your project's settings because you can't use pods with highest iOS version than you use in the project.:
I am using couchbaselite enterprise in my project.
After I upgraded XCODE from 10.3 to 11.2, I got this error message. (Module compiled with Swift 5.1 cannot be imported by the Swift 5.1.2 compiler)
my podfile is like this:
# Uncomment the next line to define a global platform for your project
# platform :ios, '11'
target 'Imece' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'SwiftyJSON', '~> 4.2'
pod 'FSCalendar', '~> 2.7.9'
pod 'CouchbaseLite-Swift-Enterprise', '~> 2.6.1'
pod 'Alamofire'
end
I tried below solution bu it did not make any difference.
in XCODE change
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
Module compiled with Swift 5.1 cannot be imported by the Swift 5.1.2 compiler
I also tried build the (couchbaselite) framework files as mentioned here https://github.com/couchbase/couchbase-lite-ios#how-to-build-the-framework-files
But I got BUILD_FAILED error.
Is there any other solution to get rid of this situation?
The error means that Couchbaselite framework needs to be built with Xcode 11.2. You cannot change the settings in your app in order to fix it. So your options are to either
Waiting for release of Couchbase Lite that will support Xcode 11.2 or
Downgrade your Xcode version to Xcode 11.1 (the version compatible with Couchbase Lite 2.6.1). You can download previous version of Xcode from here
My app's deployment target is currently set to 9.2 in Xcode. I believe 9.0 should be minimum.
However when trying to update to AudioKit 4.5.2 (from 4.4) - I'm getting the following error in Terminal...
⇒ pod install
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "AudioKit":
In Podfile:
AudioKit (~> 4.5.2)
Specs satisfying the `AudioKit (~> 4.5.2)` dependency were found,
but they required a higher minimum deployment target.
What should I do? Many thanks.
The answer to your question has already been given to you.
Specs satisfying the AudioKit (~> 4.5.2) dependency were found, but
they required a higher minimum deployment target.
This literally means you're trying to update to v4.5.2 but that specific version requires a higher minimum deployment target, should be higher than your iOS 9.2.
What should I do? Many thanks.
You have multiple options:
Target iOS 10 (or at least the v4.5.2's deployment target), if that's okay with your manager or team lead, or you.
Explicitly target AudioKit's lower version, like what you've mentioned, in your podfile, like so: pod 'AudioKit', '4.4'.
UPDATE:
I made a sample Xcode project and discovered that they haven't released v4.5.2 for their cocoapods, well, as far as I know. So this should be in your podfile insted:
pod 'AudioKit', '~> 4.0'
and make sure that you also have this line in your podfile, targeting your iOS version:
platform :ios, '10.0'
I hope this helps!
OK, apologies if this may come across as a 'green' question ...
I have incorporated the Google AdMob SDK via CocoaPods successfully.
My pod file looks like:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
pod 'Google-Mobile-Ads-SDK', '~> 7.0'
So my Podfile should automatically 'grab' any version 'newer' than version 7.0.
I am still developing my app, and when I run tests on my physical device, I am presented with this type of message in the console:
You are currently using version 7.8.0 of the SDK. Please
consider updating your SDK to the most recent SDK version to get the
latest features and bug fixes. The latest SDK can be downloaded from
....
So I run Podinstall command via the terminal targeting my relevant directory that holds my development app's latest Xcode project, and it updates all relevant Google Mobile Ad SDKs to the current version.
I guess while my app is not 'live', my Podfile is essentially inactive in terms of updating itself automatically.
Question : If I were to upload my project today to the App Store with my Podfile updated to the most current Google AdMob SDK version, will it automatically update my project to the most current version thereafter? Are the three (3) lines of code in my Podfile sufficient?
Many thanks and apologies in advance if this is an extremely basic question ;)
I am fairly new to CocoaPods myself so I am not 100% what you mean with
"I guess while my app is not 'live', my Podfile is essentially inactive in terms of updating itself automatically."
I believe to update your Pods you need to run the Update command, it does not update itself automatically.
If I were to upload my project today to the App Store with my Podfile updated to the most current Google AdMob SDK version, will it automatically update my project to the most current version thereafter?
I believe no, you need to run podUpdate.
Are the three (3) lines of code in my Podfile sufficient?
Should be
This is how my pod files looks
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
target 'MyGame (iOS)' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'Google-Mobile-Ads-SDK', '~> 7.0'
pod 'ChartboostSDK'
# Pods for MyGame (iOS)
target 'MyGame (iOS) Tests' do
inherit! :search_paths
# Pods for testing
end
end
CocoaPods actually released an app for OSX recently, which makes using it a lot easier
https://cocoapods.org/app
To read more update pod updates vs installs you should read this.
https://guides.cocoapods.org/using/pod-install-vs-update.html
Or a great swift tutorial from ray wenderlich
https://www.raywenderlich.com/97014/use-cocoapods-with-swift
Hope this helps
Has anyone gotten CocoaPods working with watchOS 2? I tried using ‘use_framework!’ with ‘platform :watchos, ‘2.0’ but it says "[!] Invalid Podfile file: Unsupported platform watchos2. Platform must be :ios or :osx.. Updating CocoaPods might fix the issue.”
I am on the latest version of CocoaPods.
CocoaPods released new version which is 0.38.0 and now supports watchOS 2.
http://blog.cocoapods.org/CocoaPods-0.38/
According to the blog above, deployment target can be set to watchOS 2 in Podspec.
Pod::Spec.new do |s|
# …
s.watchos.deployment_target = '2.0'
end
You can set target for watchOS 2 in Podfile with the version.
However, library has to set the deployment target explicitly, so you need to check whether it's supported for each library in Podspec.
The latest version of CocoaPods supports this.
If you just need to get a pod working on watchOS 2 (e.g. Parse), the you can simply use a Podfile such as this:
# Uncomment this line to define a global platform for your project
# platform :ios, '8.0'
# Uncomment this line if you're using Swift
# use_frameworks!
target 'MyApp' do
end
target 'MyApp WatchKit App' do
end
target 'MyApp WatchKit Extension' do
platform :watchos, '2.0'
pod 'Parse', '~> 1.11'
end
If however, you need to use the pod in multiple targets of different platforms (e.g. iOS and watchOS 2), things are slightly tricker. See this answer for more information.
CocoaPods currently doesn't support watchos. There is a work in progress issue here for adding support for it.