0

I created a CocoaPod library project for iOS via the pod lib create command.

The podspec file that gets created adds the deployment target as iOS 8 in it. I want it to be iOS 11. There is no option to set it at the beginning as far as I know.

If I change it manually and run pod install again, it creates a static framework instead of a dynamic one.

How do I set/change the deployment target to something other than the default value?

Isuru
  • 30,617
  • 60
  • 187
  • 303

1 Answers1

0

As a library provider you don't control the version that your clients choose to build with. However, you can specify a minimum allowed version:

` s.ios.deployment_target = '11.0'

See https://guides.cocoapods.org/syntax/podspec.html#deployment_target

Paul Beusterien
  • 27,542
  • 6
  • 83
  • 139
  • Thanks for the response. After setting the deployment target to 11, it there a way to like "regenerate" the Xcode project to make the pod take this new deployment target into effect? Or do I do it manually from the Xcode's [Deployment info](https://i.imgur.com/g71eBoa.png)? Because without changing it in Xcode, I can't add swift files to the Development Pods directory. – Isuru Jul 01 '20 at 17:16