Permission: Unable to access Photos permission
Podfile:
pod 'Permission/Photos'
Code:
let permission: Permission = .photos
Error:
Type 'Permission' has no member 'photos'
More info:
- Xcode 8.3.1
- Swift 3.1
- iOS 10.3.2
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 14
- Comments: 16 (1 by maintainers)
I solved this issue as @ahartwel commented. Here is my podspec:
https://github.com/leoneparise/Permission/blob/master/Permission.podspec
use my repo until they solve the cocoapods issue. Add
:git => 'https://github.com/leoneparise/Permission', :branch => 'master'to each Permission entry in you podfile.
This started happening to me when I updated cocoapods. I am not sure why, but the swift active compilation conditions are only being set for release builds now, not for debug. If you replace “SWIFT_ACTIVE_COMPILATION_CONDITIONS” with “OTHER_SWIFT_FLAGS” in the podspec and add a “-D” before the value it will build properly.
the current podspec:
what builds properly:
full podspec: https://github.com/swarmnyc/Permission/blob/feature/custom_alert_controller/Permission.podspec
It’s fixed in Cocoapods 1.3.1, update your version 🚀
@leoneparise Excellent! It worked, I’ll use your fork until they fix the original one 😉.
Here is a discussion about the issue https://github.com/CocoaPods/CocoaPods/issues/6625