local w, h = screen.size() local factor = 1 -- 默认高度为 2x 设备所设 if w == 1242 or w == 1080 then factor = 1.5 -- iPhone 6(S)+ 的分辨率是 3x 的 elseif w == 320 or w == 768 then factor = 0.5 -- 3Gs 以前的 iPhone 的分辨率是 1x 的 end webview.show{ html = [[
]], x = 0, y = h - 650 * factor, width = w, height = 650 * factor, } while(1)do ret = proc_put("set_gps", '') if ret ~= '' then if app.front_bid()~="com.apple.springboard" and app.front_bid()~="com.apple.backboardd" then local jobj = json.decode(ret) gps.fake( app.front_bid(), tonumber(jobj.Lat), tonumber(jobj.Lng) ) sys.toast(string.format("对 %s 位置伪装为:(%0.7f, %0.7f)", app.front_bid(), tonumber(jobj.Lat), tonumber(jobj.Lng))) else sys.toast("请打开 App 至前台") end end sys.msleep(1) end