Install an IPA package (app.install)
Declaration
ok = app.install(file_path [, force ])
Parameters
- file_path
String. Absolute path of the IPA package to install. - force
Boolean, optional. Whether to force install. true = overwrite regardless of version (also allows downgrade). false = install only if the IPA version is higher than the currently installed one; skip when the versions are equal or lower. Default: false.
Returns
- ok
Boolean. true if installation succeeds; false otherwise.
Description
- Install an IPA package in the background.
- Stopping the script before installation completes may lead to a half-installed state.
- Ensure AppSync is installed on the target device before calling this function.
Example
app.install("/var/mobile/1.ipa", true) -- force overwrite install, useful for downgrading an app
--
if app.install("/var/mobile/1.ipa") then
-- Installed successfully
else
-- Install failed
end