I am using Alamofire in my app and I would like to print the version number to the logs during app start. Is there a way to access the version number programatically?
I am using Alamofire in my app and I would like to print the version number to the logs during app start. Is there a way to access the version number programatically?
2
Answers
May be there is a short way but you can use this
Alamofire’s version is part of its default
User-Agent
header, so if you’re logging your network request, the version should be part of that already. I can see that it could be useful for it to be public so it can be part of custom logging or other headers, so I’ll look into making it public.