You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "geoidesic (via GitHub)" <gi...@apache.org> on 2024/07/19 11:58:22 UTC
[I] `cordova build ios` doesn't agree with Xcode recommendations [cordova-ios]
geoidesic opened a new issue, #1449:
URL: https://github.com/apache/cordova-ios/issues/1449
# Bug Report
## Problem
When I try to `cordova clean ios; cordova build ios --device --release` and then open the project in Xcode, I get a bunch of recommendations
If I accept the recommendations in Xcode, then my `cordova clean iOS` command no longer works.
### What is expected to happen?
Ideally cordova build should conform to latest Xcode recommendations
### What does actually happen?
<img width="609" alt="Screenshot 2024-07-19 at 12 54 58" src="https://github.com/user-attachments/assets/9c2c4f07-c233-4aa4-9b09-b89a9261d8bb">
## Information
<!-- Include all relevant information that might help understand and reproduce the problem -->
### Command or Code
<!-- What command or code is needed to reproduce the problem? -->
### Environment, Platform, Device
<!-- In what environment, on what platform or on which device are you experiencing the issue? -->
Mac OS X cordova CLI
### Version information
Mac OS X 14.5 (23F79)
Xcode Version 15.4 (15F31d)
cordova 12.0.0 (cordova-lib@12.0.1)
ios-deploy@1.12.2
## Checklist
<!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] `cordova build ios` doesn't agree with Xcode recommendations [cordova-ios]
Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek closed issue #1449: `cordova build ios` doesn't agree with Xcode recommendations
URL: https://github.com/apache/cordova-ios/issues/1449
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] `cordova build ios` doesn't agree with Xcode recommendations [cordova-ios]
Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek commented on issue #1449:
URL: https://github.com/apache/cordova-ios/issues/1449#issuecomment-2239220719
> If I accept the recommendations in Xcode, then my cordova clean iOS command no longer works.
Do not enable those recommended settings. They are off for a reason.
### User Sandbox
If User Sandbox setting is enabled it will break your build. User Sandbox requires explicitly declaring all input files and all files that is outputted by the build. This is impossible to know by Cordova. Additionally the setting also breaks CocoaPods. The idea of ensuring correctness to the build is from the explicit declaration, and blocking access to any other path that isn't explicitly declared.
Even if the framework itself did this, CocoaPods does not (so any project with a pod will break with user sandbox enabled), and neither does virtually all cordova plugins.
### Code Stripping
The other 2 settings related to code stripping removes native symbols that are believed to be unused in the final product. The problem with this is it does not see the Cordova bridge usage, which involves the JS environment sending over a call request by string, which the maps to native plugin API symbols, by string. Stripping code and symbols may yield failures or hard crashes during runtime.
If Cordova did things differently, like used strings to map API calls, but without using objc selector and instead have the plugin map statically to an API call... (which is similar to how the android platform works), then code stripping might be something viable to enable. But unfortunately that ship has sailed long ago and doing something like that now will break literally all plugins in the ecosystem.
### Parallelisation
The parallelisation option can probably be enabled safely but is something that is not tested and I don't expect it to be much of a build performance gain. Cordova projects generally only have 2 targets ("app", and CordovaLib) and the app target depends on the CordovaLib target, so it's going to be pretty much a sequential build still. The exception is if there are plugins that imports custom targets like extensions which is pretty rare.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org