File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -2358,8 +2358,20 @@ saEvent.send = function(p, callback) {
2358
2358
window . sensorsdata_app_js_bridge_call_js = function ( data ) {
2359
2359
setAppInfo ( data ) ;
2360
2360
} ;
2361
+ // 通知iOS
2362
+ function calliOS ( ) {
2363
+ if ( / i P a d | i P h o n e | i P o d / . test ( navigator . userAgent ) && ! window . MSStream ) {
2364
+ var iframe = document . createElement ( "iframe" ) ;
2365
+ iframe . setAttribute ( "src" , "sensorsanalytics://getAppInfo" ) ;
2366
+ document . documentElement . appendChild ( iframe ) ;
2367
+ iframe . parentNode . removeChild ( iframe ) ;
2368
+ iframe = null ;
2369
+ }
2370
+ }
2361
2371
sd . getAppStatus = function ( func ) {
2362
- //先获取能直接取到的安卓,ios是异步的不需要操作
2372
+ // 通知iOS触发回调
2373
+ calliOS ( ) ;
2374
+ //先获取能直接取到的安卓
2363
2375
getAndroid ( ) ;
2364
2376
// 不传参数,直接返回数据
2365
2377
if ( ! func ) {
You can’t perform that action at this time.
0 commit comments