Remove IPHONEOS_DEPLOYMENT_TARGET for all Pods by letting Pod targets inherit deployment target from main app#3062
Conversation
Add comment Run bundle exec pod install
|
I also created something like this in this branch which hides the warnings temporarily but also spits out the hidden warnings so we'll be aware to tackle them later. But I wasn't sure if hiding the warnings instead of fixing them was something we would be interested in doing. 😅 Related async discussion at CGPNUU63E-p1602782385085300-slack. Also, I have no idea what should be the “real” fix. 😅 The only thing that worked for me was upgrading the libraries' deployment targets (e.g. wordpress-mobile/WordPressKit-iOS#286). Hoping to learn from you on this! 🙏 |
|
Nice, I missed that discussion, sorry. I like the idea of letting the configuration of the main binary have preference though, the less special cases we have the easier it should be, in theory, to maintain this in the long term. On the other hand, it's not that big of a deal, it's not like we have to do a lot of manual maintenance. I think there might be some middle ground: one thing we could do is let the main binary settings be inherited for those Pods we don't have control over, and update our own libraries to upgrade their deployment target? |
|
You can trigger an installable build for these changes by visiting CircleCI here. |
|
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
# Conflicts: # Podfile.lock
…target settings for pods that have it set to lower that the app's deployment target
|
Pinging @AliSoftware as well. This is pretty much the solution you suggested 😊 |
Podfile
Outdated
| platform :ios, '12.0' | ||
| app_ios_dt = Gem::Version.new('12.0') | ||
|
|
||
| platform :ios, app_ios_dt |
There was a problem hiding this comment.
Not sure the platform directive officially accepts a Gem::Version instead of a String? 🤔
(Maybe it does, but on phone rn so can't test it myself)
| platform :ios, app_ios_dt | |
| platform :ios, app_ios_dt.to_s |
nit: also I realised that maybe we should pick better names for those variables than the one I chose when I suggested this solution 😅 e.g. app_deployment_target?
There was a problem hiding this comment.
Thanks for taking a look @AliSoftware
Not sure the platform directive officially accepts a Gem::Version instead of a String? 🤔
It seemed to do so, but I updated to pass .version .
maybe we should pick better names
Renamed!
Closes #3022, closes #3028, closes #3026, closes #3021, closes #3030, closes #3027, closes #3025, closes #3023, closes #3024, closes #3029
Xcode 12 issues warnings due to the deployment target of the Pods being different from the deployment target declared in the main binary.
Changes
This PR adds a post_install phase to the Podfile to remove the
IPHONEOS_DEPLOYMENT_TARGETsetting from all the Pod's target configurations.By doing so, we would remove 29 warnings.
If this feels like a workaround it's because it probably is, but it seems to be the expected behaviour, and the expected solution.
Testing
bundle exec pod installUpdate release notes:
RELEASE-NOTES.txtif necessary.