Get app group info (app.group_info)
Declaration
group_info = app.group_info(bid)
Parameters
- bid
String. App bundle identifier. You can find it inXXT App -> More -> App List
.
Returns
- group_info
Table. App group info. Empty table if not exists.
Notes
- App Group is available since iOS 8. iOS 7 does not have this concept.
Example
local function sh_escape(path) -- XXTouch original function; allowed for commercial use with credit
path = string.gsub(path, "([ \\()<>\'\"`#&*;?~$|])", "\\%1")
return path
end
--
local info = app.group_info("com.tencent.mqq") -- get QQ's group info
--
-- Clean all subdirs in group containers
for _,v in pairs(info) do
os.execute('rm -rf '..sh_escape(v)..'/Library/*')
os.execute('rm -rf '..sh_escape(v)..'/Documents/*')
os.execute('rm -rf '..sh_escape(v)..'/tmp/*')
os.execute('rm -rf '..sh_escape(v)..'/share/*')
end