We’ve begun our migration from Cordova to Capacitor (v2)! This is the first question I’m posting regarding native project configuration.
For setting the iOS minimum version (we’re trying to set it to 13.0), I took a hint from the Capacitor v3 upgrade doc (https://capacitorjs.com/docs/v3/updating/3-0#set-ios-deployment-target-to-120 ) on where to look to configure this. It said to make the change on the App project’s target and project. This made a change to the ios/App/App.xcodeproj/project.pbxproj file and changed all of the IPHONEOS_DEPLOYMENT_TARGET values. So far so good.
I then wondered about the Pods project. Should the deployment target be changed there as well?
Perhaps related, but I see that in the capacitor.config.json file there’s an ios.minVersion setting (https://capacitorjs.com/docs/config ). (Questionably, there’s apparently not an Android analogue to this.) Should this be changed as well? Setting it to 13.0 does not appear to affect the main App project but does change the deployment target in the Pods project. As for pending changes, in addition to the capacitor.config.json changes the ios/App/Podfile is updated.
However, it does not update the deployment target in the Pod project’s targets such as Capacitor and CapacitorCordova. Other targets such as CordovaPlugins and Pods-App were updated to 13.0. Is this expected?
In the project navigator/file explorer, click on the App project (has the Xcode project logo).
In the App.xcodeproj properties, change the project/target to the AppProject if it’s not already selected (the logo is the Xcode project logo–not the app logo).
Click the Build Settings tab.
Under the Deployment section, update iOS Deployment Target.
Repeat the preceeding steps after changing the project/target to the AppTarget (the logo is the app logo–not the Xcode project logo).
These modifications should have resulted in 4 changes to ios/App/App.xcodeproj/project.pbxproj.
In ios/App/Podfile, update platform :ios, '<version>'.
Changing Android Minimum and Target Supported Versions
See this article to map between Android OS and Android SDK versions.
See this article if you want to learn more about the version variables we will update.
I was wondering if Capacitor 3 had changed that given that ios.minVersion was not mentioned in the Capacitor upgrade documentation. I wasn’t sure though given that it was still present in the v3 Config doc. The Config doc is probably just out of date.
One less thing to update when changing the minimum version!
I did everything you said about iOS, but I still get the error about the deployment target set to 8.0. I can see in iOS/App/Pods/Pods.xcodeproj/project.pbxproj that for the majority of entries, the target is set to 12.0, a few have 13.0 and two seem to be stuck at 8.0.
The deployment target of the app itself is set to 13.0.
A warning is just that, a warning, as long as it lets you build you shouldn’t worry. Some plugins have dependencies that still support iOS 8, such as @capacitor/network and it causes that warning, other plugins can have similar dependencies too.
But what matters in the end is the deployment target of your app, and the problem is when you have dependencies that require newer versions than the app, not older.