- Force update app on apple store.
- You can customze the layout, title and description of the new version.
- You can set the minimum version for the update and set the force updating the app.
- Fully customizable layout.
To use this component in your project you need to perform the below steps:
Steps to Integrate
-
Add
ForceUpdateVC.swift
andForceUpdateVC.xib
at the required place on your code. -
Add below code where you want to Integrate Forceupdate feature in the controller:
*You have to add getUpdatedVersion()
function in you AppDelegate or in AppUtitlity Class.
This function will have API call where you can get the latest version of the live app.
Now compare the live version with Lcoal version of the app.
- If you get diffrenent verision or heigher version you can call the
func getForceUpdateWithDict(dictData : NSDictionary)
function to show the Forceupdate dialog.
- Add getForceUpdateWithDict function:
func getForceUpdateWithDict(dictData : NSDictionary) {
ForceUpdateVC.showMsgPopup(strTitle: "Update Available", dictData: dictData,viewController: self, completion: { (sender) -> Void in
print("\(sender.tag)")
if sender.tag == 101 {
if let url = URL(string: ""), UIApplication.shared.canOpenURL(url) {
if #available(iOS 10.0, *) {
//This will open the app store in the app with iTunes App URL.
UIApplication.shared.open(url, options: [:], completionHandler: nil)
}
else {
//Fallback on earlier versions
UIApplication.shared.openURL(url)
}
}
}
else {
//Close Popup login
}
})
}
Note: Make sure that the extension which is used in this component has been added to your project.
Copyright (c) 2020 INTUZ
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.