socketio / socket.io-client-swift

Other
5.21k stars 839 forks source link

Compiling for iOS 11.0, but module 'Starscream' has a minimum deployment target of iOS 12.0 #1485

Open shuftipro opened 5 months ago

shuftipro commented 5 months ago

Hi, We are facing an issue while updating our dependency on cocoapods.

AndSanG commented 5 months ago

Starscream's dependency in Socket.IO-Client-Swift.podspec is declared as s.dependency "Starscream", "~> 4.0.6". So it is using at least 4.0.6 or the latest available patch (that is what ~> means ). This means that it is using Starscream 4.0.8 (instead of 4.0.6) since two weeks ago. If you check the Starscream.podspec the s.ios.deployment_target went from 11 to 12 on these two patches. That is causing your error.

The error means that Starscream has a higher minimum deployment target higher than Socket.IO-Client-Swift. There are two solutions that worked for me, change the Starscream's Minimum deployment to 11 manually in Pods/Target/Starscream/General/Minimum deployment.

You have to write it, there is no 11 in the options.

image

Or the solution that worked for me was to specify in my project's Podfile the Starscream version that I want the project to use is exactly 4.0.6 pod 'Starscream', '4.0.6' Since I am using Cordova I had to change my plugin's plugin.xml so it change the Podfile when the plugin is added. `

`

AndSanG commented 5 months ago

You can always use something "more aggressive" like this https://stackoverflow.com/questions/77167628/xcode-stuck-at-compiling-ios-ver-11-while-i-am-using-14-as-a-target

siyanhu commented 4 months ago

In Xcode, click "Pods.xcodeproj", find "iOS Deployment Target" in Build Settings tag, and update the value to your target.