• ios获取原生系统应用的包


    ios获取原生系统应用的包名

    1、安装facebook-wda (windows电脑mac电脑均可使用)

    pip install facebook-wda
    或
    pip3 install -U facebook-wda
    
    • 1
    • 2
    • 3

    facebook-wda的github链接如下:

    https://github.com/openatx/facebook-wda

    2、编写如下代码

    import wda
    def getPackageName():
         c = wda.USBClient() # 连接一台设备
         return c.app_current()
    
    if __name__ == '__main__':
        getPackageName()
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7

    3、启动对应的系统应用

    进入到对应系统应用界面,运行第二步代码,获得相关信息。

    拿App store 为列,打开该应用后,运行代码,返回如下信息:

    {'processArguments': {'env': {}, 'args': []}, 'name': '', 'pid': 52741, 'bundleId': 'com.apple.AppStore'}
    
    • 1

    bundleId 对应的则为App Store的应用包名

    4、常见的苹果自带应用Bundle ID如下

    苹果自带应用

    NameBundle ID
    iMoviecom.apple.iMovie
    Apple Storecom.apple.AppStore
    Weathercom.apple.weather
    相机Cameracom.apple.camera
    iBookscom.apple.iBooks
    Healthcom.apple.Health
    Settingscom.apple.Preferences
    Watchcom.apple.Bridge
    Mapscom.apple.Maps
    Game Centercom.apple.gamecenter
    Walletcom.apple.Passbook
    电话com.apple.mobilephone
    备忘录com.apple.mobilenotes
    指南针com.apple.compass
    浏览器com.apple.mobilesafari
    日历com.apple.mobilecal
    信息com.apple.MobileSMS
    时钟com.apple.mobiletimer
    照片com.apple.mobileslideshow
    提醒事项com.apple.reminders
    Desktopcom.apple.springboard (Start this will cause your iPhone reboot)

    第三方应用 Thirdparty

    NameBundle ID
    腾讯QQcom.tencent.mqq
    微信com.tencent.xin
    钉钉com.laiwang.DingTalk
    Chromecom.google.chrome.ios

    5、其他方法

    使用ideviceinstaller,需要mac电脑

    # 下载
    brew install ideviceinstaller
    
    # 查看 包名
    ideviceinstaller -l -o list_all
    或
    ideviceinstaller -u {iOSDeviceId} -l -o list_all  
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7

    ideviceinstaller常用命令

    1、打印app列表
    ideviceinstaller -l
    2、查看当前已连接的设备的UUID
    idevice_id -l
    3、获取设备信息
    ideviceinfo
    4、获取设备时间
    idevicedate
    5、重启设备
    idevicediagnostics restart
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
  • 相关阅读:
    循环结构(for/in 语句、for/of语句以及for of与for in 区别)
    夯实c语言基础
    Shiro 如何使用注解式进行授权操作呢?
    [C++数据结构](23)哈希:位图,布隆过滤器,哈希切割
    go自建线程池执行任务
    Vue学习笔记总结
    web前端期末大作业 html+css+javascript汽车销售网站 学生网页设计实例 企业网站制作
    去哪儿旅行微服务架构实践
    一文讲透彻Redis 持久化
    【Spring】三周玩转Spring全家桶
  • 原文地址:https://blog.csdn.net/qq_46158060/article/details/125911052