Check if my IOS application is updated

前端 未结 8 1101
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-05 18:07

I need to check when my app launches if it was being updated, because i need to make a view that only appears when the app is firstly installed to appear again after being

8条回答
  •  难免孤独
    2020-12-05 18:31

    This worked for me..

    func compareVersion(old:String,latest:String) -> Bool {
     if latest.compare(old, options: .numeric) == .orderedDescending {
         return true
     }
       return false
     }
    
    compareVersion(old: "3.1.5", latest: "3.2")
    

提交回复
热议问题