๐Ÿ“ฑ App Development Study/iOS๐ŸŽ

iOS Limited Photos Permission(iOS 14 ์ด์ƒ)

ibelieveinme 2024. 4. 9. 20:41
728x90

https://developer.apple.com/documentation/photokit/delivering_an_enhanced_privacy_experience_in_your_photos_app

 

Delivering an Enhanced Privacy Experience in Your Photos App | Apple Developer Documentation

Adopt the latest privacy enhancements to deliver advanced user-privacy controls.

developer.apple.com

// Request read-write access to the user's photo library.
PHPhotoLibrary.requestAuthorization(for: .readWrite) { status in
    switch status {
    case .notDetermined:
        // The user hasn't determined this app's access.
    case .restricted:
        // The system restricted this app's access.
    case .denied:
        // The user explicitly denied this app's access.
    case .authorized:
        // The user authorized this app to access Photos data.
    case .limited:
        // The user authorized this app for limited Photos access.
    @unknown default:
        fatalError()
    }
}

*์ฐธ๊ณ ๋กœ iOS PHAutorizationStatus ๊ฐ’์€ int ๋กœ ๋ฐ˜ํ™˜ํ•˜๋Š”๋ฐ, ์œ„์™€ ๊ฐ™์ด 0 ~ 4๋กœ ๋‚ด๋ ค์˜จ๋‹ค.

 


 

iOS 14 ์ด์ƒ ๋ถ€ํ„ฐ ์„ ํƒํ•œ ์‚ฌ์ง„๋งŒ ์ ‘๊ทผ ๊ฐ€๋Šฅํ•œ ๊ถŒํ•œ์ด ์ถ”๊ฐ€๋˜์—ˆ๋‹ค. limited !

 

UnityNativeGallery ๊นƒํ—ˆ๋ธŒ ์˜คํ”ˆ์†Œ์Šค์— PHAuthorizationStatusLimited ๊ถŒํ•œ์— ๋Œ€ํ•œ ๋‚ด์šฉ์ด ๋ช…์‹œ๋˜์–ด ์žˆ์ง€ ์•Š์•˜๋‹ค.

์ฆ‰ limited ๊ถŒํ•œ์„ ์ฃผ๋ฉด ๊ถŒํ•œ์„ ๋‹ค์‹œ ์š”์ฒญํ•˜๊ฑฐ๋‚˜ ๊ถŒํ•œ์ด ์žˆ๋‹ค๊ณ  ํŒ๋‹จํ•˜๋Š” ์ฝ”๋“œ๊ฐ€ ์ ํ˜€์žˆ์ง€ ์•Š์•˜๋‹ค.

 

์ด์Šˆ๊ฐ€ ๋ฐœ์ƒํ•œ ์•ฑ์€ ์„ ํƒํ•œ ์‚ฌ์ง„๋งŒ ์ ‘๊ทผ ๊ฐ€๋Šฅ์œผ๋กœ ์ฒดํฌํ•ด๋„ ์•ฑ์ด ๋™์ž‘ ๊ฐ€๋Šฅํ•œ ์•ฑ์ด์—ˆ๋‹ค.

ios ๊ฐค๋Ÿฌ๋ฆฌ ๊ถŒํ•œ ์ฒดํฌ ์‹œ limited ๊ถŒํ•œ์— ๋Œ€ํ•œ ์˜ˆ์™ธ์ฒ˜๋ฆฌ๋ฅผ ์ถ”๊ฐ€ํ•˜๊ณ  limited ๊ถŒํ•œ์ด๋ผ๋„ ์žˆ์œผ๋ฉด ํ•ด๋‹น ์•ฑ์—์„œ ์‚ฌ์ง„๊ถŒํ•œ์„ ๋‹ค์‹œ ๋ฌผ์–ด๋ณด์ง€ ์•Š๊ณ  ์ •์ƒ ์ง„ํ–‰ํ•˜๊ฒŒ ํ–ˆ๋‹ค.

728x90