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) {
23582358 window . sensorsdata_app_js_bridge_call_js = function ( data ) {
23592359 setAppInfo ( data ) ;
23602360 } ;
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+ }
23612371 sd . getAppStatus = function ( func ) {
2362- //先获取能直接取到的安卓,ios是异步的不需要操作
2372+ // 通知iOS触发回调
2373+ calliOS ( ) ;
2374+ //先获取能直接取到的安卓
23632375 getAndroid ( ) ;
23642376 // 不传参数,直接返回数据
23652377 if ( ! func ) {
You can’t perform that action at this time.
0 commit comments