페이지

2012년 10월 9일 화요일

iOS 6 beta 3 바뀐점 중 'AddressBook' 관련


Apple’s iOS 6 beta 3 changes



Address Book (연락처)
  • 프라이버시 설정 안된 상태에서 ABNewPersonViewController 프리젠트 했을 때, 연락처 접근을 허용했다 하더라도 정상적으로 창을 닫을 수 없다. 앱을 완전히 종료하고 다시 시작해야 한다.
  • 연락처 접근권한 요청하기:
    • 사용자는 앱 단위로 연락처 데이터 접근권한을 부여하거나 차단할 수 있다. 권한 요청은, ABAddressBookCreateWithOptions 함수 호출 후에 ABAddressBookRequestAccessWithCompletion 호출로 할 수 있다. ABAddressBookRequestAccessWithCompletion 함수는 사용자에게 접근권한을 요청하는 동안 앱을 블락(화면 먹통)하지 않는다. 접근 권한이 주어질 때까지, ABAddressBookRef 객체는 어떠한 연락처도 담지 않고 어떠한 연락처 수정 시도도 kABOperationNotPermittedByUserError 에러를 뱉으며 튕겨낼 것이다. 사용자는 권한 요청을 단 한번만 받을 것이다; 이후 ABAddressBookCreateWithOptions 호출은 기존 권한 그대로 쓴다. completion handler는 임의의 작업 큐(스레드)에서 수행된다. ABAddressBookRef 오브젝트가 앱 전체에서 사용된다면, thread-safe 방식을 위해 모두 반드시 한 큐 내에서 dispatch 되어야 한다.
  • 접근 권한부여 상태 확인:
    • 앱은 연락처, 캘린더, 미리알림, 사진에 접근할 수 있는지 확인하기 위해서 권한부여 상태 API를 사용할 수 있다. 이 API는 접근권한 요청 API와는 별개이며 사용자에게 권한부여/차단하기 위해 창을 띄우지 않는다. 이 API를 통해 앱은 데이터 클래스에 접근하는 UI 요소를 배치할 것인지 결정할 수 있다. 예를 들어, 연락처 접근권한이 있거나 미정 상태면 연락처 선택창을 띄울 수 있는 UI 버튼을 보이게 하는 식이다.
    • 연락처 경우, ABAddressBookGetAuthorizationStatus를 호출하고, Event Kit(일정)은 EKEventStore의 클래스 메서드인 authorizationStatusForEntityType를, Assets Library(비디오, 사진)는 ALAssetsLibrary의 클래스 메서드인 authorizationStatus를 호출한다. 리턴되는 각 상태값의 의미는 다음과 같다:
      • Authorization Status Not Determined – 사용자가 아직 앱의 데이터 클래스 접근권한을 결정하지 않음. 
      • Authorization Status Restricted – 앱은 해당 데이터 클래스에 대한 접근권한을 부여받지 못함. 부모 컨트롤 등에서 접근제한이 걸려있을 수 있기 때문에, 사용자가 이 앱의 상태를 임의로 바꿀 수 없음.
      • Authorization Status Denied – 사용자가 이 앱의 데이터 클래스에 대한 접근을 명시적으로 차단함.
      • Authorization Status Authorized – 이 앱의 데이터 클래스 접근이 허가됨.

(다음에 계속...)


Security
  • In iOS 5, signing a certificate with an MD5 signature is not supported. Please ensure that certificates use signature algorithms based on SHA1 or SHA2.
  • In iOS 6, there are improved privacy controls for Calendars, Reminders, Contacts, and Photos.
    • Users will see access dialogs when an app tries to access any of those data types. The user can switch access on and off in Settings > Privacy.
    • Developers can set a “purpose” string for each class of isolated data. iOS displays this string to users to help them understand why their data is being requested. These strings can be added using Xcode’s Project editor, in the Info tab. The relevant key names begin with the string “Privacy -”.
    • There are changes to the Event Kit and Address Book frameworks to help developers with this feature.

댓글 없음:

댓글 쓰기