如何从.ipa文件获取ios权限列表

时间:2017-06-07 07:50:25

标签: java ios ios-permissions

我正在使用java 1.8和spring-boot-starter-parent 1.5.1.RELEASE版本。

我正在尝试从.ipa文件获取权限列表。我确实从.apk获取Android permissions,就像从.apk中提取AndroidManifest.xml一样,并从该xml文件获取权限。

{
  "permissions": [
    "android.permission.INTERNET",
    "android.permission.ACCESS_NETWORK_STATE",
    "android.permission.BLUETOOTH",
    "android.permission.BLUETOOTH_ADMIN",
    "android.permission.RECEIVE_BOOT_COMPLETED",
    "android.permission.ACCESS_COARSE_LOCATION",
    "android.permission.ACCESS_WIFI_STATE",
    "android.permission.ACCESS_FINE_LOCATION",
    "android.permission.READ_EXTERNAL_STORAGE",
    "android.permission.WRITE_EXTERNAL_STORAGE",
    "android.permission.BATTERY_STATS",
    "android.permission.WAKE_LOCK"
  ]
}

以同样的方式,有没有办法获得iOS的权限?

我使用java代码提取了.ipa文件,它返回两个目录为" Payload"和#34;符号"。 Payload目录包含" Info.plist"文件。

1 个答案:

答案 0 :(得分:0)

您可以根据info.plist中的要求添加权限。

您可以查看此链接add permission in info.plist

<key>NSAppleMusicUsageDescription</key>
<string>${PRODUCT_NAME} Music Usage</string>

<key>NSMicrophoneUsageDescription</key>
<string>${PRODUCT_NAME} Microphone Usage</string>


<key>NSCalendarsUsageDescription</key>
<string>${PRODUCT_NAME} Calendar Usage</string>

<key>NSContactsUsageDescription</key>
<string>${PRODUCT_NAME} Contact fetch</string>

<key>NSHealthShareUsageDescription</key>
<string>${PRODUCT_NAME} Health Description</string>

<key>NSHealthUpdateUsageDescription</key>
<string>${PRODUCT_NAME} Health Updates</string>

<key>NSHomeKitUsageDescription</key>
<string>${PRODUCT_NAME} HomeKit Usage</string>

<key>NSLocationAlwaysUsageDescription</key>
<string>${PRODUCT_NAME} Use location always</string>

<key>NSCameraUsageDescription</key>
<string>${PRODUCT_NAME} Camera Usage</string>

<key>NSBluetoothPeripheralUsageDescription</key>
<string>${PRODUCT_NAME} BluetoothPeripheral</string>

<key>NSLocationUsageDescription</key>
<string>${PRODUCT_NAME} Location Updates</string>

<key>NSLocationWhenInUseUsageDescription</key>
<string>${PRODUCT_NAME} WhenInUse Location</string>

<key>NSMotionUsageDescription</key>
<string>${PRODUCT_NAME} Motion Usage</string>

<key>kTCCServiceMediaLibrary</key>
<string>${PRODUCT_NAME} MediaLibrary Usage</string>

<key>NSSpeechRecognitionUsageDescription</key>
<string>${PRODUCT_NAME} Speech Recognition Usage</string>

<key>NSVideoSubscriberAccountUsageDescription</key>
<string>${PRODUCT_NAME} Video Subscribe Usage</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>${PRODUCT_NAME} PhotoLibrary Usage</string>

<key>NSRemindersUsageDescription</key>
<string>${PRODUCT_NAME} Reminder Usage</string>

<key>NSSiriUsageDescription</key>
<string>${PRODUCT_NAME} Siri Usage</string>