Thursday, December 15, 2016

For the iOS 10 or later version, permission issue.

For the iOS 10 or later version, you have to add the following keys in the plist of your tiapp.xml file, if you use any one.


  • NSContactsUsageDescription: If you use the Ti.Contacts API to access contacts from the address book
  • NSCameraUsageDescription: If you use the Ti.Media.showCamera API to capture photos and videos
  •  NSCalendarsUsageDescription: If you use the Ti.Calendar API to access device calendars
  •  NSPhotoLibraryUsageDescription: If you use the Ti.Media.openPhotoGallery API to access the photo gallery or Ti.Media.showCamera API to save photos
  •  NSMicrophoneUsageDescription: If you use the Ti.Media.AudioRecorder API to record audio or Ti.Media.showCamera to record videos



<ios>
    <plist>
        <dict>
            <key>NSContactsUsageDescription</key>
            <string>Can we use to your contacts?</string>
            <key>NSCameraUsageDescription</key>
            <string>Can we use your camera?</string>
            <key>NSCalendarsUsageDescription</key>
            <string>Can we use your calendar?</string>
            <key>NSPhotoLibraryUsageDescription</key>
            <string>Can we save to your library?</string>
            <key>NSMicrophoneUsageDescription</key>
            <string>Can we use your microphone?</string>
        </dict>
    </plist>
</ios>


Thanks

1 comment: