Comments (15)
@erisu - this is not just a warning if you're using Xcode 15, and per @julfrechette's comment, we are all going to be forced to use it this month.
In my case this build error (which prevents compilation and is not just a warning) is due to plugins I'm using that bring in Cocoapods that have their deployment target set to a version <12.
This is a problem outside of Cordova as well. For my native apps I've solved the problem by appending this to my Podfile
:
post_install do |installer|
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
end
end
end
end
As seen here and in many other SO answers.
A temporary workaround to get my Cordova apps to build is to go into Xcode and manually change the deployment target of each offending pod target. However, these changes are all nuked every time I run cordova build ios
.
Is there some way for cordova-ios users to modify the Podfile? It seems there is, but that that is also broken? As I have this in my config.xml:
<preference name="deployment-target" value="12.0" />
I really think this issue should be re-opened.
from cordova-ios.
setting that preference doesn't seem to change the CordovaLib target.
I don't think it will affect the CordovaLib project, it only applies to the application project
from cordova-ios.
Hi there!
I've got this as well, and I'm hoping someone with more brains than I can kindly point me in the right direction?
In my case, I run:
cordova build ios --debug
and I get:
/app/platforms/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment
target versions is 12.0 to 17.2.99. (in target 'XXXXXX' from project 'Pods')
where XXXXXX
is repeated for a bunch of low-level pods. The pod names seem to be a dependency of a dependency so I'm not sure what they are, but I can see that one of them is 'CordovaLib' from project 'CordovaLib'
but there are many more as well.
In my config.xml
I have set <preference name="deployment-target" value="15.0" />
, and I can see the generated Podfile
has this in it, so it appears to be honouring the preference:
# DO NOT MODIFY -- auto-generated by Apache Cordova
source 'https://cdn.cocoapods.org/'
platform :ios, '15.0'
use_frameworks!
target 'MyApp' do
project 'MyApp.xcodeproj'
pod 'CocoaLumberjack', '~> 3.7.2'
pod 'MLKitTextRecognition'
end
I'm not entirely sure what Cordova does under the hood beyond that, but I can see in XCode it shows iOS 11
as the deployment target despite the Podfile and the preference:
Any help from the cordova-ios brains trust to point me in the right direction would be appreciated!
Also, love your work and thanks!
from cordova-ios.
However this does not apply to
CordovaLib.xcodeproj
which triggers the a similar build error:***/platforms/ios/CordovaLib/CordovaLib.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.2.99. (in target 'CordovaLib' from project 'CordovaLib')
This is not an error, it is only a warning and can be ignored
from cordova-ios.
I will close out this ticket as it is only a warning message and shouldn't cause failures with builds or app store submissions.
from cordova-ios.
This issue may result in a warning or in an error like in this case:
clang: error: SDK does not contain 'libarclite' at the path '/Applications/Xcode_15.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a'; try increasing the minimum deployment target
** ARCHIVE FAILED **
Increasing the IPHONEOS_DEPLOYMENT_TARGET
of the lib helps here but it looks like we can only set it using Xcode and not as configuration which would be needed for CI/CD, etc...
from cordova-ios.
cordova-lib
is the cordova shared JS library, so I moved this ticket to the more appropriate repo for you.
but in more complicated builds this version mismatch has caused an error and a failed build.
Can you elaborate more on this? Personally I pushed to bump the minimum deployment target for cordova-ios 7 release, but the community kind of voted against it because it was just a warning... and instead favoured to use the lowest deployment target possible. :\
I think you can use the deployment-target
preference to override it, so that might also be a workaround for the time being.
from cordova-ios.
This is just a warning and can be ignored.
As Norman mentions, you can set <preference name="deployment-target" value="12.0" />
in config.xml to force a specific deployment target
from cordova-ios.
from cordova-ios.
reporting about something that maybe means something to an XCode user, but doesn't point explicitly back to the relevant cordova-ios
deployment-target preference.
The warning comes from XCode. It's part of the native iOS project which has nothing to do with Cordova (from Apple's perspective). So naturally it's not going to provide details to what Cordova may have to configure the project.
from cordova-ios.
@sbarber2 Did you find that setting the "deployment-target" preference did update the IPHONEOS_DEPLOYMENT_TARGET
setting in CordovaLib.xcodeproj
? For me, setting that preference doesn't seem to change the CordovaLib target.
from cordova-ios.
This further info may help.
If I search for IPHONEOS_DEPLOYMENT_TARGET
in platforms/ios
, it shows a mix of targets in the Pods project:
I spotted this warning as well:
The `My App [Release]` target overrides the `LD_RUNPATH_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-My App/Pods-My App.release.xcconfig'. This can lead to problems with the CocoaPods installation
Unfortunately for me, coming from a web developer background, so I'm a bit like that meme where I don't know what pods are and at this point I'm too afraid to ask :-)
Through trial and error I found a plugin that was causing this (for me it was plugin-cordova-ml-text
).
My mental model is that the plugin was referencing pods that had lower build targets. Interestingly, I still see some lower numbered deployment targets in the Podfile (down to 9.0) and in CordovaLib (down to 11.0) after removing that plugin, but my project compiles now.
Here's my same search afterward in case (less bad targets but still some):
I'm not sure if this is a problem with cordova-ios or not — I don't quite understand it all — but TL;DR from me is to remove your plugins one by one until it works. 🤷🏻
from cordova-ios.
Xcode 15 will be mandatory to build apps which can be submitted to the App Store:
Please note that as of April 2024 all iOS and iPadOS apps submitted to the App Store must be built with a minimum of Xcode 15 and the iOS 17 SDK.
Currently, the MyProject
deployment minimum version can be updated using:
<preference name="deployment-target" value="12.0" />
However this does not apply to CordovaLib.xcodeproj
which triggers the a similar build error:
***/platforms/ios/CordovaLib/CordovaLib.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.2.99. (in target 'CordovaLib' from project 'CordovaLib')
Is there another preference which can be applied to all .xcodeproj
dependencies generated in the iOS platform and not just MyProject
?
All other alternatives which require to manually edit the project files will force us to update our CI/CD workflows which are currently generating the iOS and Android platforms from scratch.
(For best practice, we only commit the Cordova project to our repo, not the files generated at build time)
from cordova-ios.
We also encountered the same warning. We planned to ignore it for now as @dpogue suggested.
from cordova-ios.
We solved this using a rather ugly (but working) hack using the following script to post-process the project files.
const fs = require('fs');
const path = require('path');
function findFilePathsByFilename(directory, filename) {
const files = fs.readdirSync(directory);
const filePaths = [];
for (const file of files) {
const filePath = path.join(directory, file);
const stats = fs.statSync(filePath);
if (stats.isDirectory()) {
// Recursively search in subdirectories
const subdirectoryFilePaths = findFilePathsByFilename(filePath, filename);
filePaths.push(...subdirectoryFilePaths);
} else if (stats.isFile() && file === filename) {
// If the file matches the filename, add its path to the result
filePaths.push(filePath);
}
}
return filePaths;
}
const paths1 = findFilePathsByFilename('.', 'project.pbxproj');
const paths2 = findFilePathsByFilename('.', 'Pods.xcodeproj');
const paths = paths1.concat(paths2)
console.log('Apply patch to', paths);
for (let path of paths) {
let content = fs.readFileSync(path, { encoding: 'utf-8' });
content = content.replace(/IPHONEOS_DEPLOYMENT_TARGET = [0-9]+.0;/g, 'IPHONEOS_DEPLOYMENT_TARGET = 12.0;');
fs.writeFileSync(path, content);
}
console.log('Done setting IPHONEOS_DEPLOYMENT_TARGET');
from cordova-ios.
Related Issues (20)
- Failed to verify code signature of some framework and cannot install on device HOT 3
- (Black screen) when App Reload is triggered on iPhones with Notch:
- Console.log is not displayed in the safari terminal, but is displayed in the Xcode console HOT 1
- App stuck on splash screen on ios 16+ HOT 5
- Cordova iOS How to inject local cordova.js to remote H5 calls. HOT 1
- Gamepad API does not work (WKWebView needs to be firstResponder?) HOT 9
- Error in cordova prepare when update cordova-ios from 6 to 7. HOT 1
- Please remove org_apache_cordova_UIView_Extension because it isn't necessary since iOS 8.
- SplashScreen not loading on [email protected] HOT 8
- Cannot run new iOS app since latest upgrade HOT 18
- Trouble to open Instagram App HOT 2
- Any alternative to CDVCommandDelegateImpl which is removed from public classes? HOT 6
- [Next Major] Delete bin/cordova_plist_to_config_xml script
- Several template project bin scripts are broken
- Add preferences to config.xml to control which are the "Supported Destinations"
- Issue with `<privacy-manifest>` and `cordora prepare ios` HOT 3
- The CDVURLProtocol no longer exists, so how should we modify the interception? HOT 3
- The startURLSchemeTask method in CDVURLSchemeHandler was not executed HOT 2
- Copy deployment-target from root config.xml to platform-specific config.xml before usage in Podfile HOT 5
- WKWebViewConfiguration is always ignored
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-ios.