Skip to content
James Barrow edited this page Jan 29, 2017 · 1 revision

AppStoreHelper


UpdateStatus

Declaration

Swift

public enum UpdateStatus: Int


---

<br>

### shared


**Declaration**
> <sub>**Swift**</sub>  
> ```swift  
public static let shared = AppStoreHelper()


## Properties

version

Declaration

Swift

public var version: String?

---

<br>

### name


**Declaration**
> <sub>**Swift**</sub>  
> ```swift  
public var name: String?


seller

Declaration

Swift

public var seller: String?

---

<br>

### appDescription


**Declaration**
> <sub>**Swift**</sub>  
> ```swift  
public var appDescription: String?


price

Declaration

Swift

public var price: Double?

---

<br>

### currency


**Declaration**
> <sub>**Swift**</sub>  
> ```swift  
public var currency: String?


formattedPrice

Declaration

Swift

public var formattedPrice: String?

---

<br>

### fileSize


**Declaration**
> <sub>**Swift**</sub>  
> ```swift  
public var fileSize: String?


formattedFileSize

Declaration

Swift

public var formattedFileSize: String?

---

<br>

### releaseDate


**Declaration**
> <sub>**Swift**</sub>  
> ```swift  
public var releaseDate: Date?


bundleId

Declaration

Swift

private var bundleId: String?

---


<br>
## Updates  <br>

### updateAppStoreData(_:)
Updates data from the app store and parses into local files.

**Declaration**
> <sub>**Swift**</sub>  
> ```swift  
public func updateAppStoreData(_ complete: ((_ error: Error?) -> Void)? = nil)

Parameters

`complete` Returned when to update request is complete and returns an error is it failed.


appUpdateNeeded()

Retruns true if the needs updating comparing the local app version number with the one recived from the app store.

Declaration

Swift

public func appUpdateNeeded() -> UpdateStatus


**Return Value**  
If the app is up to date then UpToDate is returned, UpdateNeeded if the local version is behind the app store version or Unknown if data have not been updated and parsed from the app store.

---

<div class="footer" align="center"><sub>Built with <a href="https://github.com/Baza207/LittleHedgehogDocs" target="_blank">Little Hedgehog Docs</a> by <a href="mailto:james@pigonahill.com" target="_blank">James Barrow</a> - <a href="http://pigonahill.com" target="_blank">Pig on a Hill Productions</a>.</sub></div>

Clone this wiki locally