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 = force install (allow downgrade/overwrite). false = do not overwrite if installed version is newer. Default: false.
Returns
- ok
Boolean. true if installation succeeds; false otherwise.
Notes
- Install an IPA package in 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