• <noscript id="ecgc0"><kbd id="ecgc0"></kbd></noscript>
    <menu id="ecgc0"></menu>
  • <tt id="ecgc0"></tt>

    iOS如何獲取設備相關信息

    iOS關于若何獲取設備相關信息,APP版本號,電池電量,當前系統名稱等。

    東西/原料

    • Xcode
    • Mac
    • iPhone

    方式/步調

    1. 1

      獲取iPhone名稱:

      [UIDevice currentDevice].name;

    2. 2

      獲取app版本號:

      [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]

    3. 3

      獲取電池電量:

      [UIDevice currentDevice].batteryLevel;

    4. 4

      獲取當前系統名稱:

      [UIDevice currentDevice].systemName;

    5. 5

      獲取當前系統版本號:

      [UIDevice currentDevice].systemVersion;

    6. 6

      獲取UUID:

      [[UIDevice currentDevice] identifierForVendor].UUIDString;

    7. 7

      獲取總內存巨細:

      [NSProcessInfo processInfo].physicalMemory;

    8. 8

      獲取當前說話:

      NSArray *languageArray = [NSLocale preferredLanguages];

      [languageArray objectAtIndex:0]

    • 發表于 2018-02-28 00:00
    • 閱讀 ( 620 )
    • 分類:其他類型

    你可能感興趣的文章

    相關問題

    0 條評論

    請先 登錄 后評論
    admin
    admin

    0 篇文章

    作家榜 ?

    1. xiaonan123 189 文章
    2. 湯依妹兒 97 文章
    3. luogf229 46 文章
    4. jy02406749 45 文章
    5. 小凡 34 文章
    6. Daisy萌 32 文章
    7. 我的QQ3117863681 24 文章
    8. 華志健 23 文章

    聯系我們:uytrv@hotmail.com 問答工具
  • <noscript id="ecgc0"><kbd id="ecgc0"></kbd></noscript>
    <menu id="ecgc0"></menu>
  • <tt id="ecgc0"></tt>
    久久久久精品国产麻豆