Documentation ¶
Index ¶
- func Cycles() (string, error)
- func DownloadRelease(cycleID, releaseID int64, version string) error
- func DownloadVersion(cycleID int64, version string) error
- func Latest(cycleID int64) (string, error)
- func LocalVersions(cycleID int64) (string, error)
- func Reload(cycleID int64, versionStr string) error
- func RemoteVersions(cycleID int64) (string, error)
- func SetReload(reloadTask Callback)
- func Setup(bundleVersion, bundlePath, documentPath, platform, defaultCycle string, ...) error
- func SourcePath() string
- type Callback
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cycles ¶
Cycles returns the stringify of list of available cycles in the bundles e.g. [{ id: 1, name: "dev" }, ...]
func DownloadRelease ¶
DownloadRelease it starts download and save the bundle inside path it uses the release id
func DownloadVersion ¶
DownloadVersion it starts download and save the bundle inside path it uses the version
func LocalVersions ¶
LocalVersions we can not returns an array of data.Release because gomobile won't generate proepr objective-c binding, what we do here is serliazie the array into string and return the value. The string will be parsed in javascript side
func Reload ¶
Reload accepts a version. The version needs to be already downloaded or an error will be return. version also needs to follow semantic versioning the preRelease section of the version targets the cycle's name
func RemoteVersions ¶
RemoteVersions we can not returns an array of data.Release because gomobile won't generate proepr objective-c binding, what we do here is serliazie the array into string and return the value. The string will be parsed in javascript side
func SetReload ¶
func SetReload(reloadTask Callback)
SetReload assing an func call from native target for reloading react-native, this is only need to be used if forceUpdate is enabled.
func Setup ¶
func Setup(bundleVersion, bundlePath, documentPath, platform, defaultCycle string, forceUpdate bool) error
Setup we need to setup the app
func SourcePath ¶
func SourcePath() string
SourcePath returns the proper path for react-native app to start the process if there is no downlaod available, simply return an empty string on native side, it will be replaced by default value also this method must be called after Setup function is called with no errors