Is there any way we can find out the latest ios version available on device programmatically. Like latest ios version now is 12.2
-
1You can not get the latest ios version available, But you can get the current version of ios using the following code. "var systemVersion = UIDevice.current.systemVersion" – AtulParmar Apr 25 '19 at 07:34
-
Yeah i know, but I want the latest ios version – Habib Ali Apr 25 '19 at 07:38
3 Answers
As per Apple API list you can check latest iOS version with below command. You have to run this command in terminal.
curl -L http://phobos.apple.com./version
You will get all information about the all versions.

- 778
- 3
- 21
-
This does not answer the question of "how to know programmatically in Swift". – rmaddy Apr 25 '19 at 15:40
-
What is the key path of the latest version within this gargantuan XML file? – ThomasHaz Apr 25 '19 at 15:52
-
There is no way to find the latest iOS version released. It is totally impractical approach because how can UIDevice
or Any
class know which is the latest iOS was released without updating device operating system.
Now go with other possibilities
There are any apple APIs which provide latest release information?
Unfortunately, There are no such APIs which provide information like this.
Alternatives
You can create custom APIs which is providing the latest release information. Once latest iOS will release then update in server back-end. Then you can check which is the latest iOS version.

- 12,733
- 6
- 54
- 65
I haven't found the solution but I got it from this link: solution
Just call the API
curl -L http://phobos.apple.com./version
and search for the key such as "iPhone10, 1" or whatever device you are looking for. You will find the version under key "Product Version"
<key>ProductVersion</key>
<string>12.3.1</string>

- 177
- 1
- 9