├── .gitignore ├── DBPrivacyHelper.podspec ├── DBPrivacyHelper ├── .DS_Store ├── DBPrivacyHelperAssets.xcassets │ └── DBPrivacyHelperIcons │ │ ├── dbph_alertIcon.imageset │ │ ├── Contents.json │ │ ├── dbph_alertIcon.png │ │ ├── dbph_alertIcon@2x.png │ │ └── dbph_alertIcon@3x.png │ │ ├── dbph_appIcon.imageset │ │ ├── Contents.json │ │ ├── dbph_appIcon.png │ │ ├── dbph_appIcon@2x.png │ │ └── dbph_appIcon@3x.png │ │ ├── dbph_calendarsIcon.imageset │ │ ├── Contents.json │ │ ├── dbph_calendars.png │ │ ├── dbph_calendars@2x.png │ │ └── dbph_calendars@3x.png │ │ ├── dbph_cameraIcon.imageset │ │ ├── Contents.json │ │ ├── dbph_camera.png │ │ ├── dbph_camera@2x.png │ │ └── dbph_camera@3x.png │ │ ├── dbph_checkIcon.imageset │ │ ├── Contents.json │ │ ├── dbph_check.png │ │ ├── dbph_check@2x.png │ │ └── dbph_check@3x.png │ │ ├── dbph_contactsIcon.imageset │ │ ├── Contents.json │ │ ├── contacts.png │ │ ├── contacts@2x.png │ │ └── contacts@3x.png │ │ ├── dbph_facebookIcon.imageset │ │ ├── Contents.json │ │ ├── dbph_facebook.png │ │ ├── dbph_facebook@2x.png │ │ └── dbph_facebook@3x.png │ │ ├── dbph_healthIcon.imageset │ │ ├── Contents.json │ │ ├── dbph_health.png │ │ ├── dbph_health@2x.png │ │ └── dbph_health@3x.png │ │ ├── dbph_homekitIcon.imageset │ │ ├── Contents.json │ │ ├── dbph_homekit.png │ │ ├── dbph_homekit@2x.png │ │ └── dbph_homekit@3x.png │ │ ├── dbph_localizationIcon.imageset │ │ ├── Contents.json │ │ ├── dbph_localization.png │ │ ├── dbph_localization@2x.png │ │ └── dbph_localization@3x.png │ │ ├── dbph_microphoneIcon.imageset │ │ ├── Contents.json │ │ ├── dbph_microphone.png │ │ ├── dbph_microphone@2x.png │ │ └── dbph_microphone@3x.png │ │ ├── dbph_motionIcon.imageset │ │ ├── Contents.json │ │ ├── dbph_motion.png │ │ ├── dbph_motion@2x.png │ │ └── dbph_motion@3x.png │ │ ├── dbph_notificationsIcon.imageset │ │ ├── Contents.json │ │ ├── dbph_notifications.png │ │ ├── dbph_notifications@2x.png │ │ └── dbph_notifications@3x.png │ │ ├── dbph_photoIcon.imageset │ │ ├── .DS_Store │ │ ├── Contents.json │ │ ├── dbph_photo.png │ │ ├── dbph_photo@2x.png │ │ └── dbph_photo@3x.png │ │ ├── dbph_privacyIcon.imageset │ │ ├── Contents.json │ │ ├── dbph_privacy.png │ │ ├── dbph_privacy@2x.png │ │ └── dbph_privacy@3x.png │ │ ├── dbph_remindersIcon.imageset │ │ ├── Contents.json │ │ ├── dbph_reminders.png │ │ ├── dbph_reminders@2x.png │ │ └── dbph_reminders@3x.png │ │ ├── dbph_settingsIcon.imageset │ │ ├── Contents.json │ │ ├── dbph_settings.png │ │ ├── dbph_settings@2x.png │ │ └── dbph_settings@3x.png │ │ ├── dbph_switchIcon.imageset │ │ ├── Contents.json │ │ ├── dbph_switch.png │ │ ├── dbph_switch@2x.png │ │ └── dbph_switch@3x.png │ │ └── dbph_twitterIcon.imageset │ │ ├── Contents.json │ │ ├── dbph_twitter.png │ │ ├── dbph_twitter@2x.png │ │ └── dbph_twitter@3x.png ├── DBPrivacyHelperDataSource.h ├── DBPrivacyHelperDataSource.m ├── DBPrivacyHelperLocalizations │ ├── en.lproj │ │ └── DBPrivacyHelperLocalizable.strings │ ├── es.lproj │ │ └── DBPrivacyHelperLocalizable.strings │ ├── it.lproj │ │ └── DBPrivacyHelperLocalizable.strings │ ├── ja.lproj │ │ └── DBPrivacyHelperLocalizable.strings │ ├── ko.lproj │ │ └── DBPrivacyHelperLocalizable.strings │ ├── pt-PT.lproj │ │ └── DBPrivacyHelperLocalizable.strings │ └── zh-Hant.lproj │ │ └── DBPrivacyHelperLocalizable.strings ├── DBPrivateHelperCell.h ├── DBPrivateHelperCell.m ├── DBPrivateHelperController.h ├── DBPrivateHelperController.m ├── UIImage+ImageEffects.h ├── UIImage+ImageEffects.m ├── UIViewController+DBPrivacyHelper.h └── UIViewController+DBPrivacyHelper.m ├── DBPrivacyHelperExample ├── DBPrivacyHelperExample.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── DBPrivacyHelperExample.xcworkspace │ └── contents.xcworkspacedata ├── DBPrivacyHelperExample │ ├── AppAssets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ ├── ViewController.h │ ├── ViewController.m │ ├── bg.jpg │ ├── main.m │ └── testIcon.png ├── DBPrivacyHelperExampleTests │ ├── DBPrivacyHelperExampleTests.m │ ├── DBPrivacyHelperTests.m │ ├── DBPrivateHelperControllerTests.m │ ├── Info.plist │ └── ReferenceImages │ │ └── DBPrivacyHelperTests │ │ ├── testDBPrivacyTypeCalendar@2x.png │ │ ├── testDBPrivacyTypeCamera@2x.png │ │ ├── testDBPrivacyTypeContacts@2x.png │ │ ├── testDBPrivacyTypeFacebook@2x.png │ │ ├── testDBPrivacyTypeHealth@2x.png │ │ ├── testDBPrivacyTypeHomeKit@2x.png │ │ ├── testDBPrivacyTypeLocation@2x.png │ │ ├── testDBPrivacyTypeMicrophone@2x.png │ │ └── testDBPrivacyTypePhoto@2x.png ├── Podfile └── Podfile.lock ├── LICENSE ├── Layout └── Icons.psd └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | .DS_Store 20 | 21 | # CocoaPods 22 | # 23 | # We recommend against adding the Pods directory to your .gitignore. However 24 | # you should judge for yourself, the pros and cons are mentioned at: 25 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 26 | # 27 | # Pods/ 28 | DBPrivacyHelperExample/Pods 29 | -------------------------------------------------------------------------------- /DBPrivacyHelper.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "DBPrivacyHelper" 3 | s.version = "0.6.3" 4 | s.summary = "Quick category to explain the right place to enable your privacy settings" 5 | 6 | s.description = <<-DESC 7 | Quick UIViewController category to explain the right place to enable your privacy settings 8 | DESC 9 | 10 | s.homepage = "https://github.com/danielebogo/DBPrivacyHelper" 11 | s.license = "MIT" 12 | s.author = { "Daniele Bogo" => "me@bogodaniele.com" } 13 | s.platform = :ios, "7.0" 14 | 15 | s.source = { :git => "https://github.com/danielebogo/DBPrivacyHelper.git", :tag => "0.6.3" } 16 | 17 | s.source_files = "DBPrivacyHelper/*.{h,m}" 18 | s.resources = ['DBPrivacyHelper/*.xcassets', 'DBPrivacyHelper/DBPrivacyHelperLocalizations/**'] 19 | 20 | s.frameworks = "UIKit", "Foundation" 21 | s.requires_arc = true 22 | end 23 | -------------------------------------------------------------------------------- /DBPrivacyHelper/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/.DS_Store -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_alertIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "dbph_alertIcon.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "dbph_alertIcon@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "dbph_alertIcon@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_alertIcon.imageset/dbph_alertIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_alertIcon.imageset/dbph_alertIcon.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_alertIcon.imageset/dbph_alertIcon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_alertIcon.imageset/dbph_alertIcon@2x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_alertIcon.imageset/dbph_alertIcon@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_alertIcon.imageset/dbph_alertIcon@3x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_appIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "dbph_appIcon.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "dbph_appIcon@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "dbph_appIcon@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_appIcon.imageset/dbph_appIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_appIcon.imageset/dbph_appIcon.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_appIcon.imageset/dbph_appIcon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_appIcon.imageset/dbph_appIcon@2x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_appIcon.imageset/dbph_appIcon@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_appIcon.imageset/dbph_appIcon@3x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_calendarsIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "dbph_calendars.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "dbph_calendars@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "dbph_calendars@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_calendarsIcon.imageset/dbph_calendars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_calendarsIcon.imageset/dbph_calendars.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_calendarsIcon.imageset/dbph_calendars@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_calendarsIcon.imageset/dbph_calendars@2x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_calendarsIcon.imageset/dbph_calendars@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_calendarsIcon.imageset/dbph_calendars@3x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_cameraIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "dbph_camera.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "dbph_camera@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "dbph_camera@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_cameraIcon.imageset/dbph_camera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_cameraIcon.imageset/dbph_camera.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_cameraIcon.imageset/dbph_camera@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_cameraIcon.imageset/dbph_camera@2x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_cameraIcon.imageset/dbph_camera@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_cameraIcon.imageset/dbph_camera@3x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_checkIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "dbph_check.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "dbph_check@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "dbph_check@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_checkIcon.imageset/dbph_check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_checkIcon.imageset/dbph_check.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_checkIcon.imageset/dbph_check@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_checkIcon.imageset/dbph_check@2x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_checkIcon.imageset/dbph_check@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_checkIcon.imageset/dbph_check@3x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_contactsIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "contacts.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "contacts@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "contacts@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_contactsIcon.imageset/contacts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_contactsIcon.imageset/contacts.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_contactsIcon.imageset/contacts@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_contactsIcon.imageset/contacts@2x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_contactsIcon.imageset/contacts@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_contactsIcon.imageset/contacts@3x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_facebookIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "dbph_facebook.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "dbph_facebook@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "dbph_facebook@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_facebookIcon.imageset/dbph_facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_facebookIcon.imageset/dbph_facebook.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_facebookIcon.imageset/dbph_facebook@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_facebookIcon.imageset/dbph_facebook@2x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_facebookIcon.imageset/dbph_facebook@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_facebookIcon.imageset/dbph_facebook@3x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_healthIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "dbph_health.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "dbph_health@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "dbph_health@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_healthIcon.imageset/dbph_health.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_healthIcon.imageset/dbph_health.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_healthIcon.imageset/dbph_health@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_healthIcon.imageset/dbph_health@2x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_healthIcon.imageset/dbph_health@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_healthIcon.imageset/dbph_health@3x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_homekitIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "dbph_homekit.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "dbph_homekit@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "dbph_homekit@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_homekitIcon.imageset/dbph_homekit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_homekitIcon.imageset/dbph_homekit.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_homekitIcon.imageset/dbph_homekit@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_homekitIcon.imageset/dbph_homekit@2x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_homekitIcon.imageset/dbph_homekit@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_homekitIcon.imageset/dbph_homekit@3x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_localizationIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "dbph_localization.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "dbph_localization@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "dbph_localization@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_localizationIcon.imageset/dbph_localization.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_localizationIcon.imageset/dbph_localization.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_localizationIcon.imageset/dbph_localization@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_localizationIcon.imageset/dbph_localization@2x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_localizationIcon.imageset/dbph_localization@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_localizationIcon.imageset/dbph_localization@3x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_microphoneIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "dbph_microphone.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "dbph_microphone@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "dbph_microphone@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_microphoneIcon.imageset/dbph_microphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_microphoneIcon.imageset/dbph_microphone.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_microphoneIcon.imageset/dbph_microphone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_microphoneIcon.imageset/dbph_microphone@2x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_microphoneIcon.imageset/dbph_microphone@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_microphoneIcon.imageset/dbph_microphone@3x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_motionIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "dbph_motion.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "dbph_motion@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "dbph_motion@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_motionIcon.imageset/dbph_motion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_motionIcon.imageset/dbph_motion.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_motionIcon.imageset/dbph_motion@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_motionIcon.imageset/dbph_motion@2x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_motionIcon.imageset/dbph_motion@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_motionIcon.imageset/dbph_motion@3x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_notificationsIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "dbph_notifications.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "dbph_notifications@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "dbph_notifications@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_notificationsIcon.imageset/dbph_notifications.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_notificationsIcon.imageset/dbph_notifications.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_notificationsIcon.imageset/dbph_notifications@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_notificationsIcon.imageset/dbph_notifications@2x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_notificationsIcon.imageset/dbph_notifications@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_notificationsIcon.imageset/dbph_notifications@3x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_photoIcon.imageset/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_photoIcon.imageset/.DS_Store -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_photoIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "dbph_photo.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "dbph_photo@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "dbph_photo@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_photoIcon.imageset/dbph_photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_photoIcon.imageset/dbph_photo.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_photoIcon.imageset/dbph_photo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_photoIcon.imageset/dbph_photo@2x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_photoIcon.imageset/dbph_photo@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_photoIcon.imageset/dbph_photo@3x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_privacyIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "dbph_privacy.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "dbph_privacy@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "dbph_privacy@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_privacyIcon.imageset/dbph_privacy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_privacyIcon.imageset/dbph_privacy.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_privacyIcon.imageset/dbph_privacy@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_privacyIcon.imageset/dbph_privacy@2x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_privacyIcon.imageset/dbph_privacy@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_privacyIcon.imageset/dbph_privacy@3x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_remindersIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "dbph_reminders.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "dbph_reminders@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "dbph_reminders@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_remindersIcon.imageset/dbph_reminders.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_remindersIcon.imageset/dbph_reminders.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_remindersIcon.imageset/dbph_reminders@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_remindersIcon.imageset/dbph_reminders@2x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_remindersIcon.imageset/dbph_reminders@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_remindersIcon.imageset/dbph_reminders@3x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_settingsIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "dbph_settings.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "dbph_settings@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "dbph_settings@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_settingsIcon.imageset/dbph_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_settingsIcon.imageset/dbph_settings.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_settingsIcon.imageset/dbph_settings@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_settingsIcon.imageset/dbph_settings@2x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_settingsIcon.imageset/dbph_settings@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_settingsIcon.imageset/dbph_settings@3x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_switchIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "dbph_switch.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "dbph_switch@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "dbph_switch@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_switchIcon.imageset/dbph_switch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_switchIcon.imageset/dbph_switch.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_switchIcon.imageset/dbph_switch@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_switchIcon.imageset/dbph_switch@2x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_switchIcon.imageset/dbph_switch@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_switchIcon.imageset/dbph_switch@3x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_twitterIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "dbph_twitter.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "dbph_twitter@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "dbph_twitter@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_twitterIcon.imageset/dbph_twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_twitterIcon.imageset/dbph_twitter.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_twitterIcon.imageset/dbph_twitter@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_twitterIcon.imageset/dbph_twitter@2x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_twitterIcon.imageset/dbph_twitter@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelper/DBPrivacyHelperAssets.xcassets/DBPrivacyHelperIcons/dbph_twitterIcon.imageset/dbph_twitter@3x.png -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperDataSource.h: -------------------------------------------------------------------------------- 1 | // 2 | // DBPrivacyHelperDataSource.h 3 | // DBPrivacyHelperExample 4 | // 5 | // Created by iBo on 06/01/15. 6 | // Copyright (c) 2015 iBo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "DBPrivateHelperCell.h" 12 | 13 | /** 14 | * Privacy Types 15 | */ 16 | typedef NS_ENUM(NSUInteger, DBPrivacyType){ 17 | /** 18 | * Photos within camera roll 19 | */ 20 | DBPrivacyTypePhoto, 21 | /** 22 | * Use the Camera 23 | */ 24 | DBPrivacyTypeCamera, 25 | /** 26 | * Location Services 27 | */ 28 | DBPrivacyTypeLocation, 29 | /** 30 | * HealthKit 31 | */ 32 | DBPrivacyTypeHealth, 33 | /** 34 | * HomeKit 35 | */ 36 | DBPrivacyTypeHomeKit, 37 | /** 38 | * Motion Activity 39 | */ 40 | DBPrivacyTypeMotionActivity, 41 | /** 42 | * Access to Contacts 43 | */ 44 | DBPrivacyTypeContacts, 45 | /** 46 | * Push Notifications 47 | */ 48 | DBPrivacyTypeNotifications, 49 | /** 50 | * Reminders 51 | */ 52 | DBPrivacyTypeReminders, 53 | /** 54 | * Calendars 55 | */ 56 | DBPrivacyTypeCalendars, 57 | /** 58 | * Microphone 59 | */ 60 | DBPrivacyTypeMicrophone, 61 | /** 62 | * Twitter 63 | */ 64 | DBPrivacyTypeTwitter, 65 | /** 66 | * Facebook 67 | */ 68 | DBPrivacyTypeFacebook 69 | }; 70 | 71 | 72 | 73 | @interface NSString (DBPrivacyHelper) 74 | - (NSString *)dbph_LocalizedString; 75 | @end 76 | 77 | 78 | 79 | @interface DBPrivacyHelperDataSource : NSObject 80 | 81 | /** 82 | * Personal App Icon name for DBPrivacyTypeNotifications 83 | */ 84 | @property (nonatomic, strong) NSString *appIcon; 85 | 86 | /** 87 | * DBPrivacyHelper data dictionary 88 | */ 89 | @property (nonatomic, readonly) NSDictionary *cellData; 90 | 91 | /** 92 | * DBPrivacy type selected 93 | */ 94 | @property (nonatomic, assign) DBPrivacyType type; 95 | @end -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperDataSource.m: -------------------------------------------------------------------------------- 1 | // 2 | // DBPrivacyHelperDataSource.m 3 | // DBPrivacyHelperExample 4 | // 5 | // Created by iBo on 06/01/15. 6 | // Copyright (c) 2015 iBo. All rights reserved. 7 | // 8 | 9 | #import "DBPrivacyHelperDataSource.h" 10 | 11 | #ifndef DBPrivacyHelperLocalizableStrings 12 | #define DBPrivacyHelperLocalizableStrings(key) \ 13 | NSLocalizedStringFromTable(key, @"DBPrivacyHelperLocalizable", nil) 14 | #endif 15 | 16 | @implementation NSString (DBPrivacyHelper) 17 | 18 | - (NSString *)dbph_LocalizedString { 19 | return DBPrivacyHelperLocalizableStrings(self); 20 | } 21 | 22 | @end 23 | 24 | 25 | 26 | @implementation DBPrivacyHelperDataSource { 27 | NSDictionary *_cellAttributes; 28 | } 29 | 30 | 31 | #pragma mark - Life cycle 32 | 33 | - (instancetype)init 34 | { 35 | self = [super init]; 36 | if (self) { 37 | NSMutableParagraphStyle *paragraphStyle = [NSMutableParagraphStyle new]; 38 | paragraphStyle.lineBreakMode = NSLineBreakByWordWrapping; 39 | paragraphStyle.alignment = NSTextAlignmentLeft; 40 | 41 | _cellAttributes = @{NSFontAttributeName:[UIFont boldSystemFontOfSize:12.0], 42 | NSParagraphStyleAttributeName:paragraphStyle}; 43 | } 44 | return self; 45 | } 46 | 47 | 48 | #pragma mark - Private methods 49 | 50 | - (NSString *)dbph_headerText:(NSString *)string 51 | { 52 | return [NSString stringWithFormat:[@"Allow access to \"%@\"\nwith these steps:" dbph_LocalizedString], string]; 53 | } 54 | 55 | - (NSString *)dbph_typeTitle:(NSString *)string 56 | { 57 | return [NSString stringWithFormat:[@"Tap on \"%@\"" dbph_LocalizedString], string]; 58 | } 59 | 60 | - (NSString *)dbph_typeAllowText:(NSString *)string 61 | { 62 | return [NSString stringWithFormat:[@"Allow your application to use \"%@\"" dbph_LocalizedString], string]; 63 | } 64 | 65 | - (CGFloat)dbph_cellHeightForText:(NSString *)text 66 | { 67 | CGFloat width = CGRectGetWidth([[UIScreen mainScreen] bounds]) - 120.0; 68 | CGRect bounds = [text boundingRectWithSize:CGSizeMake(width, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin 69 | attributes:_cellAttributes context:NULL]; 70 | 71 | CGFloat height = roundf(CGRectGetHeight(bounds) + 20.0); 72 | return ( height > 60.0 ) ? height + 10.0 : 60.0; 73 | } 74 | 75 | 76 | #pragma mark - Override 77 | 78 | - (NSDictionary *)cellData 79 | { 80 | return @{ @(DBPrivacyTypePhoto):@{ @"header":[self dbph_headerText:[@"Photos" dbph_LocalizedString]], 81 | @"steps":@[ @{ @"desc":[@"Open device settings" dbph_LocalizedString], @"icon":@"dbph_settingsIcon" }, @{ @"desc":[@"Tap on Privacy" dbph_LocalizedString], @"icon":@"dbph_privacyIcon" }, @{ @"desc":[self dbph_typeTitle:[@"Photos" dbph_LocalizedString]], @"icon":@"dbph_photoIcon" }, @{ @"desc":[self dbph_typeAllowText:[@"Photos" dbph_LocalizedString]], @"icon":@"dbph_switchIcon" }]}, 82 | 83 | @(DBPrivacyTypeCamera):@{ @"header":[self dbph_headerText:[@"Camera" dbph_LocalizedString]], 84 | @"steps":@[ @{ @"desc":[@"Open device settings" dbph_LocalizedString], @"icon":@"dbph_settingsIcon" }, @{ @"desc":[@"Tap on Privacy" dbph_LocalizedString], @"icon":@"dbph_privacyIcon" }, @{ @"desc":[self dbph_typeTitle:[@"Camera" dbph_LocalizedString]], @"icon":@"dbph_cameraIcon" }, @{ @"desc":[self dbph_typeAllowText:[@"Camera" dbph_LocalizedString]], @"icon":@"dbph_switchIcon" }]}, 85 | 86 | @(DBPrivacyTypeLocation):@{ @"header":[self dbph_headerText:[@"Location Services" dbph_LocalizedString]], 87 | @"steps":@[ @{ @"desc":[@"Open device settings" dbph_LocalizedString], @"icon":@"dbph_settingsIcon" }, @{ @"desc":[@"Tap on Privacy" dbph_LocalizedString], @"icon":@"dbph_privacyIcon" }, @{ @"desc":[self dbph_typeTitle:[@"Location Services" dbph_LocalizedString]], @"icon":@"dbph_localizationIcon" }, @{ @"desc":[self dbph_typeAllowText:[@"Location Services" dbph_LocalizedString]], @"icon":@"dbph_checkIcon" }]}, 88 | 89 | @(DBPrivacyTypeHealth):@{ @"header":[self dbph_headerText:[@"Health" dbph_LocalizedString]], 90 | @"steps":@[ @{ @"desc":[@"Open device settings" dbph_LocalizedString], @"icon":@"dbph_settingsIcon" }, @{ @"desc":[@"Tap on Privacy" dbph_LocalizedString], @"icon":@"dbph_privacyIcon" }, @{ @"desc":[self dbph_typeTitle:[@"Health" dbph_LocalizedString]], @"icon":@"dbph_healthIcon" }, @{ @"desc":[self dbph_typeAllowText:[@"Health" dbph_LocalizedString]], @"icon":@"dbph_switchIcon" }]}, 91 | 92 | @(DBPrivacyTypeHomeKit):@{ @"header":[self dbph_headerText:[@"HomeKit" dbph_LocalizedString]], 93 | @"steps":@[ @{ @"desc":[@"Open device settings" dbph_LocalizedString], @"icon":@"dbph_settingsIcon" }, @{ @"desc":[@"Tap on Privacy" dbph_LocalizedString], @"icon":@"dbph_privacyIcon" }, @{ @"desc":[self dbph_typeTitle:[@"HomeKit" dbph_LocalizedString]], @"icon":@"dbph_homekitIcon" }, @{ @"desc":[self dbph_typeAllowText:[@"HomeKit" dbph_LocalizedString]], @"icon":@"dbph_switchIcon" }]}, 94 | 95 | @(DBPrivacyTypeMotionActivity):@{ @"header":[self dbph_headerText:[@"Motion Activity" dbph_LocalizedString]], 96 | @"steps":@[ @{ @"desc":[@"Open device settings" dbph_LocalizedString], @"icon":@"dbph_settingsIcon" }, @{ @"desc":[@"Tap on Privacy" dbph_LocalizedString], @"icon":@"dbph_privacyIcon" }, @{ @"desc":[self dbph_typeTitle:[@"Motion Activity" dbph_LocalizedString]], @"icon":@"dbph_motionIcon" }, @{ @"desc":[self dbph_typeAllowText:[@"Motion Activity" dbph_LocalizedString]], @"icon":@"dbph_switchIcon" }]}, 97 | 98 | @(DBPrivacyTypeContacts):@{ @"header":[self dbph_headerText:[@"Contacts" dbph_LocalizedString]], 99 | @"steps":@[ @{ @"desc":[@"Open device settings" dbph_LocalizedString], @"icon":@"dbph_settingsIcon" }, @{ @"desc":[@"Tap on Privacy" dbph_LocalizedString], @"icon":@"dbph_privacyIcon" }, @{ @"desc":[self dbph_typeTitle:[@"Contacts" dbph_LocalizedString]], @"icon":@"dbph_contactsIcon" }, @{ @"desc":[self dbph_typeAllowText:[@"Contacts" dbph_LocalizedString]], @"icon":@"dbph_switchIcon" }]}, 100 | 101 | @(DBPrivacyTypeNotifications):@{ @"header":[self dbph_headerText:[@"Notifications" dbph_LocalizedString]], 102 | @"steps":@[ @{ @"desc":[@"Open device settings" dbph_LocalizedString], @"icon":@"dbph_settingsIcon" }, @{ @"desc":[self dbph_typeTitle:[@"Notifications" dbph_LocalizedString]], @"icon":@"dbph_notificationsIcon" }, @{ @"desc":[self dbph_typeTitle:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]], @"icon":self.appIcon ?: @"dbph_appIcon" }, @{ @"desc":[self dbph_typeAllowText:[@"Notifications" dbph_LocalizedString]], @"icon":@"dbph_switchIcon" }, @{ @"desc":[@"Select the alert style you prefer" dbph_LocalizedString], @"icon":@"dbph_alertIcon" }]}, 103 | 104 | @(DBPrivacyTypeCalendars):@{ @"header":[self dbph_headerText:[@"Calendars" dbph_LocalizedString]], 105 | @"steps":@[ @{ @"desc":[@"Open device settings" dbph_LocalizedString], @"icon":@"dbph_settingsIcon" }, @{ @"desc":[@"Tap on Privacy" dbph_LocalizedString], @"icon":@"dbph_privacyIcon" }, @{ @"desc":[self dbph_typeTitle:[@"Calendars" dbph_LocalizedString]], @"icon":@"dbph_calendarsIcon" }, @{ @"desc":[self dbph_typeAllowText:[@"Calendars" dbph_LocalizedString]], @"icon":@"dbph_switchIcon" }]}, 106 | 107 | @(DBPrivacyTypeReminders):@{ @"header":[self dbph_headerText:[@"Reminders" dbph_LocalizedString]], 108 | @"steps":@[ @{ @"desc":[@"Open device settings" dbph_LocalizedString], @"icon":@"dbph_settingsIcon" }, @{ @"desc":[@"Tap on Privacy" dbph_LocalizedString], @"icon":@"dbph_privacyIcon" }, @{ @"desc":[self dbph_typeTitle:[@"Reminders" dbph_LocalizedString]], @"icon":@"dbph_remindersIcon" }, @{ @"desc":[self dbph_typeAllowText:[@"Reminders" dbph_LocalizedString]], @"icon":@"dbph_switchIcon" }]}, 109 | 110 | @(DBPrivacyTypeMicrophone):@{ @"header":[self dbph_headerText:[@"Microphone" dbph_LocalizedString]], 111 | @"steps":@[ @{ @"desc":[@"Open device settings" dbph_LocalizedString], @"icon":@"dbph_settingsIcon" }, @{ @"desc":[@"Tap on Privacy" dbph_LocalizedString], @"icon":@"dbph_privacyIcon" }, @{ @"desc":[self dbph_typeTitle:[@"Microphone" dbph_LocalizedString]], @"icon":@"dbph_microphoneIcon" }, @{ @"desc":[self dbph_typeAllowText:[@"Microphone" dbph_LocalizedString]], @"icon":@"dbph_switchIcon" }]}, 112 | 113 | @(DBPrivacyTypeTwitter):@{ @"header":[self dbph_headerText:[@"Twitter" dbph_LocalizedString]], 114 | @"steps":@[ @{ @"desc":[@"Open device settings" dbph_LocalizedString], @"icon":@"dbph_settingsIcon" }, @{ @"desc":[@"Tap on Privacy" dbph_LocalizedString], @"icon":@"dbph_privacyIcon" }, @{ @"desc":[self dbph_typeTitle:[@"Twitter" dbph_LocalizedString]], @"icon":@"dbph_twitterIcon" }, @{ @"desc":[self dbph_typeAllowText:[@"Twitter" dbph_LocalizedString]], @"icon":@"dbph_switchIcon" }]}, 115 | 116 | @(DBPrivacyTypeFacebook):@{ @"header":[self dbph_headerText:[@"Facebook" dbph_LocalizedString]], 117 | @"steps":@[ @{ @"desc":[@"Open device settings" dbph_LocalizedString], @"icon":@"dbph_settingsIcon" }, @{ @"desc":[@"Tap on Privacy" dbph_LocalizedString], @"icon":@"dbph_privacyIcon" }, @{ @"desc":[self dbph_typeTitle:[@"Facebook" dbph_LocalizedString]], @"icon":@"dbph_facebookIcon" }, @{ @"desc":[self dbph_typeAllowText:[@"Facebook" dbph_LocalizedString]], @"icon":@"dbph_switchIcon" }]} }; 118 | } 119 | 120 | #pragma mark - UITableViewDataSource 121 | 122 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 123 | { 124 | return [self.cellData[@(self.type)][@"steps"] count]; 125 | } 126 | 127 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 128 | { 129 | DBPrivateHelperCell *cell = [tableView dequeueReusableCellWithIdentifier:kDBPrivateHelperCellIdentifier forIndexPath:indexPath]; 130 | [cell setIcon:self.cellData[@(self.type)][@"steps"][indexPath.row][@"icon"] 131 | text:self.cellData[@(self.type)][@"steps"][indexPath.row][@"desc"] 132 | row:indexPath.row + 1]; 133 | return cell; 134 | } 135 | 136 | 137 | #pragma mark - UITableViewDelegate 138 | 139 | - (CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 140 | { 141 | return [self dbph_cellHeightForText:self.cellData[@(_type)][@"steps"][indexPath.row][@"desc"]]; 142 | } 143 | 144 | @end -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperLocalizations/en.lproj/DBPrivacyHelperLocalizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | DBPrivacyHelperLocalizable.strings 3 | DBPrivacyHelper 4 | 5 | Created by iBo on 10/11/14. 6 | Copyright (c) 2014 iBo. All rights reserved. 7 | */ 8 | 9 | "Close" = "Close"; 10 | 11 | "Location Services" = "Location Services"; 12 | "Photos" = "Photos"; 13 | "Camera" = "Camera"; 14 | "Health" = "Health"; 15 | "HomeKit" = "HomeKit"; 16 | "Motion Activity" = "Motion Activity"; 17 | "Contacts" = "Contacts"; 18 | "Notifications" = "Notifications"; 19 | "Reminders" = "Reminders"; 20 | "Calendars" = "Calendars"; 21 | "Microphone" = "Microphone"; 22 | "Twitter" = "Twitter"; 23 | "Facebook" = "Facebook"; 24 | 25 | "Allow access to \"%@\"\nwith these steps:" = "Allow access to \"%@\"\nwith these steps:"; 26 | 27 | "Open device settings" = "Open device settings"; 28 | "Tap on Privacy" = "Tap on Privacy"; 29 | "Tap on \"%@\"" = "Tap on \"%@\""; 30 | "Allow your application to use \"%@\"" = "Allow your application to use \"%@\""; 31 | "Select the alert style you prefer" = "Select the alert style you prefer"; -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperLocalizations/es.lproj/DBPrivacyHelperLocalizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | DBPrivacyHelperLocalizable.strings 3 | DBPrivacyHelper 4 | 5 | Created by iBo on 10/11/14. 6 | Copyright (c) 2014 iBo. All rights reserved. 7 | */ 8 | 9 | "Close" = "Cerrar"; 10 | 11 | "Location Services" = "Localizacíon"; 12 | "Photos" = "Fotos"; 13 | "Camera" = "Cámara"; 14 | "Health" = "Salud"; 15 | "HomeKit" = "HomeKit"; 16 | "Motion Activity" = "Actividad física"; 17 | "Contacts" = "Contactos"; 18 | "Notifications" = "Notificaciones"; 19 | "Reminders" = "Recordatorios"; 20 | "Calendars" = "Calendarios"; 21 | "Microphone" = "Micrófono"; 22 | "Twitter" = "Twitter"; 23 | "Facebook" = "Facebook"; 24 | 25 | "Allow access to \"%@\"\nwith these steps:" = "Para habilitar el acceso a \"%@\"\nprocede de la siguiente manera:"; 26 | 27 | "Open device settings" = "Abrir configuración del dispositivo"; 28 | "Tap on Privacy" = "Selecciona Privacidad"; 29 | "Tap on \"%@\"" = "Selecciona \"%@\""; 30 | "Allow your application to use \"%@\"" = "Permitir a tu aplicación usar \"%@\""; 31 | "Select the alert style you prefer" = "Seleccionar el tipo de alerta que prefieras"; -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperLocalizations/it.lproj/DBPrivacyHelperLocalizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | DBPrivacyHelperLocalizable.strings 3 | DBPrivacyHelper 4 | 5 | Created by iBo on 10/11/14. 6 | Copyright (c) 2014 iBo. All rights reserved. 7 | */ 8 | 9 | "Close" = "Chiudi"; 10 | 11 | "Location Services" = "Localizzazione"; 12 | "Photos" = "Foto"; 13 | "Camera" = "Fotocamera"; 14 | "Health" = "Salute"; 15 | "HomeKit" = "HomeKit"; 16 | "Motion Activity" = "Attività motoria"; 17 | "Contacts" = "Contatti"; 18 | "Notifications" = "Notifiche"; 19 | "Reminders" = "Promemoria"; 20 | "Calendars" = "Calendari"; 21 | "Microphone" = "Microfono"; 22 | "Twitter" = "Twitter"; 23 | "Facebook" = "Facebook"; 24 | 25 | "Allow access to \"%@\"\nwith these steps:" = "Abilita l'accesso a \"%@\"\nin questo modo:"; 26 | 27 | "Open device settings" = "Apri i settings del dispositivo"; 28 | "Tap on Privacy" = "Seleziona Privacy"; 29 | "Tap on \"%@\"" = "Seleziona \"%@\""; 30 | "Allow your application to use \"%@\"" = "Permetti alla tua applicazione di usare \"%@\""; 31 | "Select the alert style you prefer" = "Seleziona l'alert che preferisci"; -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperLocalizations/ja.lproj/DBPrivacyHelperLocalizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | DBPrivacyHelperLocalizable.strings 3 | DBPrivacyHelper 4 | 5 | Created by hmhv on 22/04/15. 6 | Copyright (c) 2015 hmhv. All rights reserved. 7 | */ 8 | 9 | "Close" = "閉じる"; 10 | 11 | "Location Services" = "位置情報サービス"; 12 | "Photos" = "写真"; 13 | "Camera" = "カメラ"; 14 | "Health" = "ヘルスケア"; 15 | "HomeKit" = "HomeKit"; 16 | "Motion Activity" = "モーションとフィットネス"; 17 | "Contacts" = "連絡先"; 18 | "Notifications" = "通知"; 19 | "Reminders" = "リマインダー"; 20 | "Calendars" = "カレンダー"; 21 | "Microphone" = "マイク"; 22 | "Twitter" = "Twitter"; 23 | "Facebook" = "Facebook"; 24 | 25 | "Allow access to \"%@\"\nwith these steps:" = "以下の順で\"%@\"へのアクセスを\n許可してください。"; 26 | 27 | "Open device settings" = "設定アプリをタップ"; 28 | "Tap on Privacy" = "プライバシーをタップ"; 29 | "Tap on \"%@\"" = "\"%@\"をタップ"; 30 | "Allow your application to use \"%@\"" = "アプリの\"%@\"へのアクセスを許可"; 31 | "Select the alert style you prefer" = "好みの通知スタイルを選択"; -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperLocalizations/ko.lproj/DBPrivacyHelperLocalizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | DBPrivacyHelperLocalizable.strings 3 | DBPrivacyHelper 4 | 5 | Created by iBo on 10/11/14. 6 | Copyright (c) 2014 iBo. All rights reserved. 7 | */ 8 | 9 | "Close" = "닫기"; 10 | 11 | "Location Services" = "위치 서비스"; 12 | "Photos" = "사진"; 13 | "Camera" = "카메라"; 14 | "Health" = "건강"; 15 | "HomeKit" = "HomeKit"; 16 | "Motion Activity" = "동작 활동"; 17 | "Contacts" = "연락처"; 18 | "Notifications" = "알림"; 19 | "Reminders" = "미리 알림"; 20 | "Calendars" = "캘린더"; 21 | "Microphone" = "마이크"; 22 | "Twitter" = "Twitter"; 23 | "Facebook" = "Facebook"; 24 | 25 | "Allow access to \"%@\"\nwith these steps:" = "다음과 같은 순서로 \"%@\"\n 접근 허락"; 26 | 27 | "Open device settings" = "기기 설정 열기"; 28 | "Tap on Privacy" = "개인 정보 보호 터치"; 29 | "Tap on \"%@\"" = "\"%@\" 터치 "; 30 | "Allow your application to use \"%@\"" = "어플리케이션의 \"%@\" 접근 허락"; 31 | "Select the alert style you prefer" = "원하는 알림 스타일을 선택"; -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperLocalizations/pt-PT.lproj/DBPrivacyHelperLocalizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | DBPrivacyHelperLocalizable.strings 3 | DBPrivacyHelper 4 | 5 | Created by iBo on 10/11/14. 6 | Copyright (c) 2015 Pedro Cardoso. All rights reserved. 7 | */ 8 | 9 | "Close" = "Fechar"; 10 | 11 | "Location Services" = "Serviços de localização"; 12 | "Photos" = "Fotografias"; 13 | "Camera" = "Câmara"; 14 | "Health" = "Saúde"; 15 | "HomeKit" = "HomeKit"; 16 | "Motion Activity" = "Actividade"; 17 | "Contacts" = "Contactos"; 18 | "Notifications" = "Notificações"; 19 | "Reminders" = "Lembretes"; 20 | "Calendars" = "Calendários"; 21 | "Microphone" = "Microfone"; 22 | "Twitter" = "Twitter"; 23 | "Facebook" = "Facebook"; 24 | 25 | "Allow access to \"%@\"\nwith these steps:" = "Permitir acesso a \"%@\"\ncom estes passos:"; 26 | 27 | "Open device settings" = "Abrir definições"; 28 | "Tap on Privacy" = "Tocar em Privacidade"; 29 | "Tap on \"%@\"" = "Tocar em \"%@\""; 30 | "Allow your application to use \"%@\"" = "Permitir a sua aplicação utilizar \"%@\""; 31 | "Select the alert style you prefer" = "Definir o tipo de alerta que prefere"; -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivacyHelperLocalizations/zh-Hant.lproj/DBPrivacyHelperLocalizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | DBPrivacyHelperLocalizable.strings 3 | DBPrivacyHelper 4 | 5 | Created by Ben on 10/11/14. 6 | Copyright (c) 2014 bcylin. All rights reserved. 7 | */ 8 | 9 | "Close" = "關閉"; 10 | 11 | "Location Services" = "定位服務"; 12 | "Photos" = "照片"; 13 | "Camera" = "相機"; 14 | "Health" = "健康"; 15 | "HomeKit" = "HomeKit"; // It's also called HomeKit in zh-Hant 16 | "Motion Activity" = "運動紀錄"; 17 | "Contacts" = "聯絡資訊"; 18 | "Notifications" = "Notifications"; // Must be translate 19 | "Reminders" = "Reminders"; // Must be translate 20 | "Calendars" = "Calendars"; // Must be translate 21 | "Microphone" = "Microphone"; // Must be translate 22 | "Twitter" = "Twitter"; 23 | "Facebook" = "Facebook"; 24 | 25 | "Allow access to \"%@\"\nwith these steps:" = "根據以下步驟\n開啟「%@」功能"; 26 | 27 | "Open device settings" = "開啟裝置的設定"; 28 | "Tap on Privacy" = "選擇「隱私」"; 29 | "Tap on \"%@\"" = "選擇「%@」"; 30 | "Allow your application to use \"%@\"" = "允許應用程式使用「%@」"; 31 | "Select the alert style you prefer" = "Select the alert style you prefer"; // Must be translate -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivateHelperCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // DBPrivateHelperCell.h 3 | // DBPrivacyHelperExample 4 | // 5 | // Created by iBo on 10/11/14. 6 | // Copyright (c) 2014 iBo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | extern NSString *const kDBPrivateHelperCellIdentifier; 12 | 13 | 14 | @interface DBPrivateHelperCell : UITableViewCell 15 | /** 16 | * Set the cell values 17 | * 18 | * @param icon The icon 19 | * @param text The description text 20 | * @param row The row number 21 | */ 22 | - (void)setIcon:(NSString *)icon text:(NSString *)text row:(NSInteger)row; 23 | @end -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivateHelperCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // DBPrivateHelperCell.m 3 | // DBPrivacyHelperExample 4 | // 5 | // Created by iBo on 10/11/14. 6 | // Copyright (c) 2014 iBo. All rights reserved. 7 | // 8 | 9 | #import "DBPrivateHelperCell.h" 10 | 11 | NSString *const kDBPrivateHelperCellIdentifier = @"kDBPrivateHelperCellIdentifier"; 12 | 13 | 14 | @implementation DBPrivateHelperCell { 15 | UIImageView *_iconView; 16 | UILabel *_cellLabel; 17 | } 18 | 19 | 20 | - (instancetype) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 21 | { 22 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 23 | if (self) { 24 | self.backgroundColor = [UIColor clearColor]; 25 | self.contentView.backgroundColor = self.backgroundColor; 26 | self.selectionStyle = UITableViewCellSelectionStyleNone; 27 | 28 | self.textLabel.font = [UIFont systemFontOfSize:10.0]; 29 | self.textLabel.textColor = [UIColor colorWithWhite:1.0 alpha:.75]; 30 | 31 | _iconView = [[UIImageView alloc] init]; 32 | _iconView.translatesAutoresizingMaskIntoConstraints = NO; 33 | [self.contentView addSubview:_iconView]; 34 | 35 | _cellLabel = [[UILabel alloc] init]; 36 | _cellLabel.translatesAutoresizingMaskIntoConstraints = NO; 37 | _cellLabel.backgroundColor = [UIColor clearColor]; 38 | _cellLabel.font = [UIFont boldSystemFontOfSize:12.0]; 39 | _cellLabel.textColor = [UIColor whiteColor]; 40 | _cellLabel.textAlignment = NSTextAlignmentLeft; 41 | _cellLabel.numberOfLines = 0; 42 | _cellLabel.lineBreakMode = NSLineBreakByWordWrapping; 43 | [self.contentView addSubview:_cellLabel]; 44 | 45 | NSDictionary *views = NSDictionaryOfVariableBindings(_iconView, _cellLabel); 46 | 47 | [self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-40-[_iconView(30)]-20-[_cellLabel]-20-|" options:0 metrics:nil views:views]]; 48 | [self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[_iconView(30)]" 49 | options:0 metrics:nil views:views]]; 50 | [self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-0-[_cellLabel]-0-|" 51 | options:0 metrics:nil views:views]]; 52 | [self.contentView addConstraint:[NSLayoutConstraint constraintWithItem:_iconView attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeCenterY multiplier:1.0 constant:0.0]]; 53 | } 54 | return self; 55 | } 56 | 57 | - (void)setIcon:(NSString *)icon text:(NSString *)text row:(NSInteger)row 58 | { 59 | _iconView.image = [UIImage imageNamed:icon]; 60 | _cellLabel.text = text; 61 | self.textLabel.text = [NSString stringWithFormat:@".%li", (long)row]; 62 | } 63 | 64 | @end -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivateHelperController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DBPrivateHelperController.h 3 | // DBPrivacyHelperExample 4 | // 5 | // Created by iBo on 10/11/14. 6 | // Copyright (c) 2014 iBo. All rights reserved. 7 | // 8 | 9 | #define IS_IOS_8 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0 ? 1 : 0) 10 | 11 | @import UIKit; 12 | 13 | #import "DBPrivacyHelperDataSource.h" 14 | 15 | /** 16 | * Dismiss completion block 17 | */ 18 | typedef void (^DBPrivateHelperCompletionBlock)(); 19 | 20 | @interface DBPrivateHelperController : UIViewController 21 | 22 | /** 23 | * Set the status bar style 24 | */ 25 | @property (nonatomic, assign) UIStatusBarStyle statusBarStyle; 26 | 27 | /** 28 | * Set if the controller can rotate 29 | */ 30 | @property (nonatomic, assign) BOOL canRotate; 31 | 32 | /** 33 | * The close button 34 | */ 35 | @property (nonatomic, readonly) UIButton *closeButton; 36 | 37 | /** 38 | * The snapshot of the window 39 | */ 40 | @property (nonatomic, strong) UIImage *snapshot; 41 | 42 | /** 43 | * Personal App Icon name for DBPrivacyTypeNotifications 44 | */ 45 | @property (nonatomic, strong) NSString *appIcon; 46 | 47 | /** 48 | * The dismiss completion block 49 | */ 50 | @property (nonatomic, copy) DBPrivateHelperCompletionBlock didDismissViewController; 51 | 52 | /** 53 | * Create an instance of DBPrivateHelperController 54 | * 55 | * @param type The privacy type 56 | * 57 | * @return An instance of DBPrivateHelperController 58 | */ 59 | + (instancetype)helperForType:(DBPrivacyType)type; 60 | @end -------------------------------------------------------------------------------- /DBPrivacyHelper/DBPrivateHelperController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DBPrivateHelperController.m 3 | // DBPrivacyHelperExample 4 | // 5 | // Created by iBo on 10/11/14. 6 | // Copyright (c) 2014 iBo. All rights reserved. 7 | // 8 | 9 | #import "DBPrivateHelperController.h" 10 | #import "DBPrivacyHelperDataSource.h" 11 | #import "UIImage+ImageEffects.h" 12 | 13 | @interface DBPrivateHelperController () { 14 | DBPrivacyType _type; 15 | DBPrivacyHelperDataSource *_dataSource; 16 | UIImageView *_backgroundImage; 17 | UITableView *_tableView; 18 | } 19 | @end 20 | 21 | @implementation DBPrivateHelperController 22 | 23 | #pragma mark - Life cycle 24 | 25 | + (instancetype)helperForType:(DBPrivacyType)type 26 | { 27 | return [[self.class alloc] initWithPrivacyType:type]; 28 | } 29 | 30 | - (instancetype)initWithPrivacyType:(DBPrivacyType)type 31 | { 32 | self = [super init]; 33 | if (self) { 34 | _type = type; 35 | _canRotate = NO; 36 | _statusBarStyle = UIStatusBarStyleLightContent; 37 | } 38 | return self; 39 | } 40 | 41 | - (void)viewDidLoad 42 | { 43 | [super viewDidLoad]; 44 | // Do any additional setup after loading the view. 45 | self.view.backgroundColor = [UIColor whiteColor]; 46 | 47 | _dataSource = [DBPrivacyHelperDataSource new]; 48 | _dataSource.appIcon = self.appIcon; 49 | _dataSource.type = _type; 50 | 51 | _backgroundImage = [[UIImageView alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 52 | _backgroundImage.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; 53 | [self.view addSubview:_backgroundImage]; 54 | 55 | if ( IS_IOS_8 ) { 56 | _backgroundImage.image = self.snapshot; 57 | 58 | UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]; 59 | UIVisualEffectView *blurEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect]; 60 | blurEffectView.frame = _backgroundImage.bounds; 61 | blurEffectView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; 62 | // [_backgroundImage addSubview:blurEffectView]; 63 | 64 | UIVibrancyEffect *vibrancyEffect = [UIVibrancyEffect effectForBlurEffect:blurEffect]; 65 | UIVisualEffectView *vibrancyEffectView = [[UIVisualEffectView alloc] initWithEffect:vibrancyEffect]; 66 | vibrancyEffectView.frame = _backgroundImage.bounds; 67 | vibrancyEffectView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; 68 | 69 | [blurEffectView.contentView addSubview:vibrancyEffectView]; 70 | [_backgroundImage addSubview:blurEffectView]; 71 | } else { 72 | _backgroundImage.image = [self.snapshot applyDarkEffect]; 73 | } 74 | 75 | UILabel *titleLabel = [[UILabel alloc] initWithFrame:(CGRect){ 0, 0, CGRectGetWidth([[UIScreen mainScreen] bounds]), 80 }]; 76 | titleLabel.backgroundColor = [UIColor clearColor]; 77 | titleLabel.font = [UIFont boldSystemFontOfSize:14.0]; 78 | titleLabel.textColor = [UIColor whiteColor]; 79 | titleLabel.textAlignment = NSTextAlignmentCenter; 80 | titleLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth; 81 | titleLabel.text = _dataSource.cellData[@(_type)][@"header"]; 82 | titleLabel.numberOfLines = 2; 83 | 84 | _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain]; 85 | [_tableView registerClass:[DBPrivateHelperCell class] forCellReuseIdentifier:kDBPrivateHelperCellIdentifier]; 86 | _tableView.translatesAutoresizingMaskIntoConstraints = NO; 87 | _tableView.backgroundColor = [UIColor clearColor]; 88 | _tableView.backgroundView = nil; 89 | _tableView.separatorColor = [UIColor clearColor]; 90 | _tableView.tableHeaderView = titleLabel; 91 | _tableView.dataSource = _dataSource; 92 | _tableView.delegate = _dataSource; 93 | _tableView.scrollEnabled = NO; 94 | [self.view addSubview:_tableView]; 95 | 96 | _closeButton = [UIButton buttonWithType:UIButtonTypeCustom]; 97 | _closeButton.translatesAutoresizingMaskIntoConstraints = NO; 98 | _closeButton.titleLabel.font = [UIFont boldSystemFontOfSize:12.0]; 99 | _closeButton.backgroundColor = [UIColor clearColor]; 100 | [_closeButton setTitle:[@"Close" dbph_LocalizedString].uppercaseString forState:UIControlStateNormal]; 101 | [_closeButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 102 | [_closeButton addTarget:self action:@selector(bdph_dismissHelper:) forControlEvents:UIControlEventTouchUpInside]; 103 | [self.view addSubview:_closeButton]; 104 | 105 | NSDictionary *views = NSDictionaryOfVariableBindings(_tableView, _closeButton); 106 | 107 | [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[_closeButton]-20-|" options:0 metrics:nil views:views]]; 108 | [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-0-[_tableView]-0-|" options:0 metrics:nil views:views]]; 109 | [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-20-[_closeButton(30)]-0-[_tableView]-0-|" options:0 metrics:nil views:views]]; 110 | } 111 | 112 | - (void)viewWillAppear:(BOOL)animated 113 | { 114 | [super viewWillAppear:animated]; 115 | [self setNeedsStatusBarAppearanceUpdate]; 116 | } 117 | 118 | - (void)viewDidDisappear:(BOOL)animated 119 | { 120 | [super viewDidDisappear:animated]; 121 | self.snapshot = nil; 122 | } 123 | 124 | - (void)didReceiveMemoryWarning 125 | { 126 | [super didReceiveMemoryWarning]; 127 | // Dispose of any resources that can be recreated. 128 | } 129 | 130 | 131 | #pragma mark - Private methods 132 | 133 | - (void)bdph_dismissHelper:(UIButton *)button 134 | { 135 | [self dismissViewControllerAnimated:YES completion:self.didDismissViewController]; 136 | } 137 | 138 | 139 | #pragma mark - Status Bar Style 140 | 141 | - (UIStatusBarStyle)preferredStatusBarStyle 142 | { 143 | return self.statusBarStyle; 144 | } 145 | 146 | 147 | #pragma mark - ViewController Rotation 148 | 149 | - (BOOL)shouldAutorotate 150 | { 151 | return self.canRotate; 152 | } 153 | 154 | - (NSUInteger)supportedInterfaceOrientations 155 | { 156 | return UIInterfaceOrientationMaskAll; 157 | } 158 | 159 | 160 | @end -------------------------------------------------------------------------------- /DBPrivacyHelper/UIImage+ImageEffects.h: -------------------------------------------------------------------------------- 1 | /* 2 | File: UIImage+ImageEffects.h 3 | Abstract: This is a category of UIImage that adds methods to apply blur and tint effects to an image. This is the code you’ll want to look out to find out how to use vImage to efficiently calculate a blur. 4 | Version: 1.0 5 | 6 | Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple 7 | Inc. ("Apple") in consideration of your agreement to the following 8 | terms, and your use, installation, modification or redistribution of 9 | this Apple software constitutes acceptance of these terms. If you do 10 | not agree with these terms, please do not use, install, modify or 11 | redistribute this Apple software. 12 | 13 | In consideration of your agreement to abide by the following terms, and 14 | subject to these terms, Apple grants you a personal, non-exclusive 15 | license, under Apple's copyrights in this original Apple software (the 16 | "Apple Software"), to use, reproduce, modify and redistribute the Apple 17 | Software, with or without modifications, in source and/or binary forms; 18 | provided that if you redistribute the Apple Software in its entirety and 19 | without modifications, you must retain this notice and the following 20 | text and disclaimers in all such redistributions of the Apple Software. 21 | Neither the name, trademarks, service marks or logos of Apple Inc. may 22 | be used to endorse or promote products derived from the Apple Software 23 | without specific prior written permission from Apple. Except as 24 | expressly stated in this notice, no other rights or licenses, express or 25 | implied, are granted by Apple herein, including but not limited to any 26 | patent rights that may be infringed by your derivative works or by other 27 | works in which the Apple Software may be incorporated. 28 | 29 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE 30 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION 31 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS 32 | FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND 33 | OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. 34 | 35 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL 36 | OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, 39 | MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED 40 | AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), 41 | STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE 42 | POSSIBILITY OF SUCH DAMAGE. 43 | 44 | Copyright (C) 2013 Apple Inc. All Rights Reserved. 45 | 46 | 47 | Copyright © 2013 Apple Inc. All rights reserved. 48 | WWDC 2013 License 49 | 50 | NOTE: This Apple Software was supplied by Apple as part of a WWDC 2013 51 | Session. Please refer to the applicable WWDC 2013 Session for further 52 | information. 53 | 54 | IMPORTANT: This Apple software is supplied to you by Apple Inc. 55 | ("Apple") in consideration of your agreement to the following terms, and 56 | your use, installation, modification or redistribution of this Apple 57 | software constitutes acceptance of these terms. If you do not agree with 58 | these terms, please do not use, install, modify or redistribute this 59 | Apple software. 60 | 61 | In consideration of your agreement to abide by the following terms, and 62 | subject to these terms, Apple grants you a non-exclusive license, under 63 | Apple's copyrights in this original Apple software (the "Apple 64 | Software"), to use, reproduce, modify and redistribute the Apple 65 | Software, with or without modifications, in source and/or binary forms; 66 | provided that if you redistribute the Apple Software in its entirety and 67 | without modifications, you must retain this notice and the following 68 | text and disclaimers in all such redistributions of the Apple Software. 69 | Neither the name, trademarks, service marks or logos of Apple Inc. may 70 | be used to endorse or promote products derived from the Apple Software 71 | without specific prior written permission from Apple. Except as 72 | expressly stated in this notice, no other rights or licenses, express or 73 | implied, are granted by Apple herein, including but not limited to any 74 | patent rights that may be infringed by your derivative works or by other 75 | works in which the Apple Software may be incorporated. 76 | 77 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES 78 | NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE 79 | IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR 80 | A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND 81 | OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. 82 | 83 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL 84 | OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 85 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 86 | INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, 87 | MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED 88 | AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), 89 | STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE 90 | POSSIBILITY OF SUCH DAMAGE. 91 | 92 | EA1002 93 | 5/3/2013 94 | */ 95 | 96 | @import UIKit; 97 | 98 | @interface UIImage (ImageEffects) 99 | 100 | - (UIImage *)applyLightEffect; 101 | - (UIImage *)applyExtraLightEffect; 102 | - (UIImage *)applyDarkEffect; 103 | - (UIImage *)applyTintEffectWithColor:(UIColor *)tintColor; 104 | 105 | - (UIImage *)applyBlurWithRadius:(CGFloat)blurRadius tintColor:(UIColor *)tintColor saturationDeltaFactor:(CGFloat)saturationDeltaFactor maskImage:(UIImage *)maskImage; 106 | 107 | @end 108 | -------------------------------------------------------------------------------- /DBPrivacyHelper/UIImage+ImageEffects.m: -------------------------------------------------------------------------------- 1 | /* 2 | File: UIImage+ImageEffects.m 3 | Abstract: This is a category of UIImage that adds methods to apply blur and tint effects to an image. This is the code you’ll want to look out to find out how to use vImage to efficiently calculate a blur. 4 | Version: 1.0 5 | 6 | Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple 7 | Inc. ("Apple") in consideration of your agreement to the following 8 | terms, and your use, installation, modification or redistribution of 9 | this Apple software constitutes acceptance of these terms. If you do 10 | not agree with these terms, please do not use, install, modify or 11 | redistribute this Apple software. 12 | 13 | In consideration of your agreement to abide by the following terms, and 14 | subject to these terms, Apple grants you a personal, non-exclusive 15 | license, under Apple's copyrights in this original Apple software (the 16 | "Apple Software"), to use, reproduce, modify and redistribute the Apple 17 | Software, with or without modifications, in source and/or binary forms; 18 | provided that if you redistribute the Apple Software in its entirety and 19 | without modifications, you must retain this notice and the following 20 | text and disclaimers in all such redistributions of the Apple Software. 21 | Neither the name, trademarks, service marks or logos of Apple Inc. may 22 | be used to endorse or promote products derived from the Apple Software 23 | without specific prior written permission from Apple. Except as 24 | expressly stated in this notice, no other rights or licenses, express or 25 | implied, are granted by Apple herein, including but not limited to any 26 | patent rights that may be infringed by your derivative works or by other 27 | works in which the Apple Software may be incorporated. 28 | 29 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE 30 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION 31 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS 32 | FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND 33 | OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. 34 | 35 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL 36 | OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, 39 | MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED 40 | AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), 41 | STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE 42 | POSSIBILITY OF SUCH DAMAGE. 43 | 44 | Copyright (C) 2013 Apple Inc. All Rights Reserved. 45 | 46 | 47 | Copyright © 2013 Apple Inc. All rights reserved. 48 | WWDC 2013 License 49 | 50 | NOTE: This Apple Software was supplied by Apple as part of a WWDC 2013 51 | Session. Please refer to the applicable WWDC 2013 Session for further 52 | information. 53 | 54 | IMPORTANT: This Apple software is supplied to you by Apple Inc. 55 | ("Apple") in consideration of your agreement to the following terms, and 56 | your use, installation, modification or redistribution of this Apple 57 | software constitutes acceptance of these terms. If you do not agree with 58 | these terms, please do not use, install, modify or redistribute this 59 | Apple software. 60 | 61 | In consideration of your agreement to abide by the following terms, and 62 | subject to these terms, Apple grants you a non-exclusive license, under 63 | Apple's copyrights in this original Apple software (the "Apple 64 | Software"), to use, reproduce, modify and redistribute the Apple 65 | Software, with or without modifications, in source and/or binary forms; 66 | provided that if you redistribute the Apple Software in its entirety and 67 | without modifications, you must retain this notice and the following 68 | text and disclaimers in all such redistributions of the Apple Software. 69 | Neither the name, trademarks, service marks or logos of Apple Inc. may 70 | be used to endorse or promote products derived from the Apple Software 71 | without specific prior written permission from Apple. Except as 72 | expressly stated in this notice, no other rights or licenses, express or 73 | implied, are granted by Apple herein, including but not limited to any 74 | patent rights that may be infringed by your derivative works or by other 75 | works in which the Apple Software may be incorporated. 76 | 77 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES 78 | NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE 79 | IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR 80 | A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND 81 | OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. 82 | 83 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL 84 | OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 85 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 86 | INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, 87 | MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED 88 | AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), 89 | STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE 90 | POSSIBILITY OF SUCH DAMAGE. 91 | 92 | EA1002 93 | 5/3/2013 94 | */ 95 | 96 | #import "UIImage+ImageEffects.h" 97 | 98 | @import Accelerate; 99 | #import 100 | 101 | 102 | @implementation UIImage (ImageEffects) 103 | 104 | 105 | - (UIImage *)applyLightEffect 106 | { 107 | UIColor *tintColor = [UIColor colorWithWhite:1.0 alpha:0.3]; 108 | return [self applyBlurWithRadius:30 tintColor:tintColor saturationDeltaFactor:1.8 maskImage:nil]; 109 | } 110 | 111 | 112 | - (UIImage *)applyExtraLightEffect 113 | { 114 | UIColor *tintColor = [UIColor colorWithWhite:0.97 alpha:0.82]; 115 | return [self applyBlurWithRadius:20 tintColor:tintColor saturationDeltaFactor:1.8 maskImage:nil]; 116 | } 117 | 118 | 119 | - (UIImage *)applyDarkEffect 120 | { 121 | UIColor *tintColor = [UIColor colorWithWhite:0.11 alpha:0.73]; 122 | return [self applyBlurWithRadius:20 tintColor:tintColor saturationDeltaFactor:1.8 maskImage:nil]; 123 | } 124 | 125 | 126 | - (UIImage *)applyTintEffectWithColor:(UIColor *)tintColor 127 | { 128 | const CGFloat EffectColorAlpha = 0.6; 129 | UIColor *effectColor = tintColor; 130 | NSUInteger componentCount = CGColorGetNumberOfComponents(tintColor.CGColor); 131 | if (componentCount == 2) { 132 | CGFloat b; 133 | if ([tintColor getWhite:&b alpha:NULL]) { 134 | effectColor = [UIColor colorWithWhite:b alpha:EffectColorAlpha]; 135 | } 136 | } 137 | else { 138 | CGFloat r, g, b; 139 | if ([tintColor getRed:&r green:&g blue:&b alpha:NULL]) { 140 | effectColor = [UIColor colorWithRed:r green:g blue:b alpha:EffectColorAlpha]; 141 | } 142 | } 143 | return [self applyBlurWithRadius:10 tintColor:effectColor saturationDeltaFactor:-1.0 maskImage:nil]; 144 | } 145 | 146 | 147 | - (UIImage *)applyBlurWithRadius:(CGFloat)blurRadius tintColor:(UIColor *)tintColor saturationDeltaFactor:(CGFloat)saturationDeltaFactor maskImage:(UIImage *)maskImage 148 | { 149 | // Check pre-conditions. 150 | if (self.size.width < 1 || self.size.height < 1) { 151 | NSLog (@"*** error: invalid size: (%.2f x %.2f). Both dimensions must be >= 1: %@", self.size.width, self.size.height, self); 152 | return nil; 153 | } 154 | if (!self.CGImage) { 155 | NSLog (@"*** error: image must be backed by a CGImage: %@", self); 156 | return nil; 157 | } 158 | if (maskImage && !maskImage.CGImage) { 159 | NSLog (@"*** error: maskImage must be backed by a CGImage: %@", maskImage); 160 | return nil; 161 | } 162 | 163 | CGRect imageRect = { CGPointZero, self.size }; 164 | UIImage *effectImage = self; 165 | 166 | BOOL hasBlur = blurRadius > __FLT_EPSILON__; 167 | BOOL hasSaturationChange = fabs(saturationDeltaFactor - 1.) > __FLT_EPSILON__; 168 | if (hasBlur || hasSaturationChange) { 169 | UIGraphicsBeginImageContextWithOptions(self.size, NO, [[UIScreen mainScreen] scale]); 170 | CGContextRef effectInContext = UIGraphicsGetCurrentContext(); 171 | CGContextScaleCTM(effectInContext, 1.0, -1.0); 172 | CGContextTranslateCTM(effectInContext, 0, -self.size.height); 173 | CGContextDrawImage(effectInContext, imageRect, self.CGImage); 174 | 175 | vImage_Buffer effectInBuffer; 176 | effectInBuffer.data = CGBitmapContextGetData(effectInContext); 177 | effectInBuffer.width = CGBitmapContextGetWidth(effectInContext); 178 | effectInBuffer.height = CGBitmapContextGetHeight(effectInContext); 179 | effectInBuffer.rowBytes = CGBitmapContextGetBytesPerRow(effectInContext); 180 | 181 | UIGraphicsBeginImageContextWithOptions(self.size, NO, [[UIScreen mainScreen] scale]); 182 | CGContextRef effectOutContext = UIGraphicsGetCurrentContext(); 183 | vImage_Buffer effectOutBuffer; 184 | effectOutBuffer.data = CGBitmapContextGetData(effectOutContext); 185 | effectOutBuffer.width = CGBitmapContextGetWidth(effectOutContext); 186 | effectOutBuffer.height = CGBitmapContextGetHeight(effectOutContext); 187 | effectOutBuffer.rowBytes = CGBitmapContextGetBytesPerRow(effectOutContext); 188 | 189 | if (hasBlur) { 190 | // A description of how to compute the box kernel width from the Gaussian 191 | // radius (aka standard deviation) appears in the SVG spec: 192 | // http://www.w3.org/TR/SVG/filters.html#feGaussianBlurElement 193 | // 194 | // For larger values of 's' (s >= 2.0), an approximation can be used: Three 195 | // successive box-blurs build a piece-wise quadratic convolution kernel, which 196 | // approximates the Gaussian kernel to within roughly 3%. 197 | // 198 | // let d = floor(s * 3*sqrt(2*pi)/4 + 0.5) 199 | // 200 | // ... if d is odd, use three box-blurs of size 'd', centered on the output pixel. 201 | // 202 | CGFloat inputRadius = blurRadius * [[UIScreen mainScreen] scale]; 203 | NSUInteger radius = floor(inputRadius * 3. * sqrt(2 * M_PI) / 4 + 0.5); 204 | if (radius % 2 != 1) { 205 | radius += 1; // force radius to be odd so that the three box-blur methodology works. 206 | } 207 | vImageBoxConvolve_ARGB8888(&effectInBuffer, &effectOutBuffer, NULL, 0, 0, (uint32_t)radius, (uint32_t)radius, 0, kvImageEdgeExtend); 208 | vImageBoxConvolve_ARGB8888(&effectOutBuffer, &effectInBuffer, NULL, 0, 0, (uint32_t)radius, (uint32_t)radius, 0, kvImageEdgeExtend); 209 | vImageBoxConvolve_ARGB8888(&effectInBuffer, &effectOutBuffer, NULL, 0, 0, (uint32_t)radius, (uint32_t)radius, 0, kvImageEdgeExtend); 210 | } 211 | BOOL effectImageBuffersAreSwapped = NO; 212 | if (hasSaturationChange) { 213 | CGFloat s = saturationDeltaFactor; 214 | CGFloat floatingPointSaturationMatrix[] = { 215 | 0.0722 + 0.9278 * s, 0.0722 - 0.0722 * s, 0.0722 - 0.0722 * s, 0, 216 | 0.7152 - 0.7152 * s, 0.7152 + 0.2848 * s, 0.7152 - 0.7152 * s, 0, 217 | 0.2126 - 0.2126 * s, 0.2126 - 0.2126 * s, 0.2126 + 0.7873 * s, 0, 218 | 0, 0, 0, 1, 219 | }; 220 | const int32_t divisor = 256; 221 | NSUInteger matrixSize = sizeof(floatingPointSaturationMatrix)/sizeof(floatingPointSaturationMatrix[0]); 222 | int16_t saturationMatrix[matrixSize]; 223 | for (NSUInteger i = 0; i < matrixSize; ++i) { 224 | saturationMatrix[i] = (int16_t)roundf(floatingPointSaturationMatrix[i] * divisor); 225 | } 226 | if (hasBlur) { 227 | vImageMatrixMultiply_ARGB8888(&effectOutBuffer, &effectInBuffer, saturationMatrix, divisor, NULL, NULL, kvImageNoFlags); 228 | effectImageBuffersAreSwapped = YES; 229 | } 230 | else { 231 | vImageMatrixMultiply_ARGB8888(&effectInBuffer, &effectOutBuffer, saturationMatrix, divisor, NULL, NULL, kvImageNoFlags); 232 | } 233 | } 234 | if (!effectImageBuffersAreSwapped) 235 | effectImage = UIGraphicsGetImageFromCurrentImageContext(); 236 | UIGraphicsEndImageContext(); 237 | 238 | if (effectImageBuffersAreSwapped) 239 | effectImage = UIGraphicsGetImageFromCurrentImageContext(); 240 | UIGraphicsEndImageContext(); 241 | } 242 | 243 | // Set up output context. 244 | UIGraphicsBeginImageContextWithOptions(self.size, NO, [[UIScreen mainScreen] scale]); 245 | CGContextRef outputContext = UIGraphicsGetCurrentContext(); 246 | CGContextScaleCTM(outputContext, 1.0, -1.0); 247 | CGContextTranslateCTM(outputContext, 0, -self.size.height); 248 | 249 | // Draw base image. 250 | CGContextDrawImage(outputContext, imageRect, self.CGImage); 251 | 252 | // Draw effect image. 253 | if (hasBlur) { 254 | CGContextSaveGState(outputContext); 255 | if (maskImage) { 256 | CGContextClipToMask(outputContext, imageRect, maskImage.CGImage); 257 | } 258 | CGContextDrawImage(outputContext, imageRect, effectImage.CGImage); 259 | CGContextRestoreGState(outputContext); 260 | } 261 | 262 | // Add in color tint. 263 | if (tintColor) { 264 | CGContextSaveGState(outputContext); 265 | CGContextSetFillColorWithColor(outputContext, tintColor.CGColor); 266 | CGContextFillRect(outputContext, imageRect); 267 | CGContextRestoreGState(outputContext); 268 | } 269 | 270 | // Output image is ready. 271 | UIImage *outputImage = UIGraphicsGetImageFromCurrentImageContext(); 272 | UIGraphicsEndImageContext(); 273 | 274 | return outputImage; 275 | } 276 | 277 | 278 | @end -------------------------------------------------------------------------------- /DBPrivacyHelper/UIViewController+DBPrivacyHelper.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+DBPrivacyHelper.h 3 | // DBPrivacyHelperExample 4 | // 5 | // Created by iBo on 10/11/14. 6 | // Copyright (c) 2014 iBo. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | @import Foundation; 11 | 12 | #import "DBPrivateHelperController.h" 13 | 14 | @interface UIViewController (DBPrivacyHelper) 15 | /** 16 | * Personal App Icon name for DBPrivacyTypeNotifications 17 | */ 18 | @property (nonatomic, strong) NSString *appIcon; 19 | 20 | /** 21 | * Show the privacy helper 22 | * 23 | * @param type The type of privacy 24 | */ 25 | - (void)showPrivacyHelperForType:(DBPrivacyType)type; 26 | 27 | /** 28 | * Show the privacy helper with customization data 29 | * 30 | * @param type The type of privacy 31 | * @param controllerBlock Customize the DBPrivateHelperController view controller 32 | * @param didPresent Customize the completion block of presentViewController:animated:completion: 33 | * @param didDismiss Customize the completion block of dismissViewControllerAnimated:completion: 34 | * @param defaultSettingPane If NO force to use DBPrivateHelperController instead of the default settings pane on iOS 8. Only for iOS 8. Default value is YES. 35 | */ 36 | - (void)showPrivacyHelperForType:(DBPrivacyType)type 37 | controller:(void(^)(DBPrivateHelperController *vc))controllerBlock 38 | didPresent:(DBPrivateHelperCompletionBlock)didPresent 39 | didDismiss:(DBPrivateHelperCompletionBlock)didDismiss 40 | useDefaultSettingPane:(BOOL)defaultSettingPane; 41 | /** 42 | * Snapshot of your Window 43 | * 44 | * @return An UIImage of your Window 45 | */ 46 | - (UIImage *)snapshot; 47 | @end -------------------------------------------------------------------------------- /DBPrivacyHelper/UIViewController+DBPrivacyHelper.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+DBPrivacyHelper.m 3 | // DBPrivacyHelperExample 4 | // 5 | // Created by iBo on 10/11/14. 6 | // Copyright (c) 2014 iBo. All rights reserved. 7 | // 8 | 9 | #import "UIViewController+DBPrivacyHelper.h" 10 | #import 11 | 12 | @implementation UIViewController (DBPrivacyHelper) 13 | 14 | #pragma mark - Public method 15 | 16 | - (void)showPrivacyHelperForType:(DBPrivacyType)type 17 | { 18 | [self showPrivacyHelperForType:type controller:nil didPresent:nil didDismiss:nil useDefaultSettingPane:YES]; 19 | } 20 | 21 | - (void)showPrivacyHelperForType:(DBPrivacyType)type 22 | controller:(void(^)(DBPrivateHelperController *vc))controllerBlock 23 | didPresent:(DBPrivateHelperCompletionBlock)didPresent 24 | didDismiss:(DBPrivateHelperCompletionBlock)didDismiss 25 | useDefaultSettingPane:(BOOL)defaultSettingPane { 26 | 27 | if (IS_IOS_8 && defaultSettingPane) { 28 | if (&UIApplicationOpenSettingsURLString != NULL) { 29 | NSURL *appSettings = [NSURL URLWithString:UIApplicationOpenSettingsURLString]; 30 | [[UIApplication sharedApplication] openURL:appSettings]; 31 | return; 32 | } 33 | } 34 | 35 | DBPrivateHelperController *vc = [DBPrivateHelperController helperForType:type]; 36 | vc.appIcon = self.appIcon; 37 | vc.didDismissViewController = didDismiss; 38 | vc.snapshot = [self snapshot]; 39 | vc.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; 40 | 41 | if (controllerBlock) { 42 | controllerBlock(vc); 43 | } 44 | 45 | [self presentViewController:vc animated:YES completion:didPresent]; 46 | } 47 | 48 | - (UIImage *)snapshot 49 | { 50 | id appDelegate = [[UIApplication sharedApplication] delegate]; 51 | 52 | UIGraphicsBeginImageContextWithOptions(appDelegate.window.bounds.size, NO, appDelegate.window.screen.scale); 53 | 54 | [appDelegate.window drawViewHierarchyInRect:appDelegate.window.bounds afterScreenUpdates:NO]; 55 | 56 | UIImage *snapshotImage = UIGraphicsGetImageFromCurrentImageContext(); 57 | 58 | UIGraphicsEndImageContext(); 59 | 60 | return snapshotImage; 61 | } 62 | 63 | 64 | #pragma mark - Override getter/setter 65 | 66 | - (void)setAppIcon:(NSString *)appIcon 67 | { 68 | objc_setAssociatedObject(self, @"kAppIcon", appIcon, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 69 | } 70 | 71 | - (NSString *)appIcon 72 | { 73 | return objc_getAssociatedObject(self, @"kAppIcon"); 74 | } 75 | 76 | 77 | @end -------------------------------------------------------------------------------- /DBPrivacyHelperExample/DBPrivacyHelperExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 4360CC291AE2980D003D43EC /* DBPrivateHelperControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4360CC281AE2980D003D43EC /* DBPrivateHelperControllerTests.m */; }; 11 | 4360CC2B1AE2B193003D43EC /* DBPrivacyHelperTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4360CC2A1AE2B193003D43EC /* DBPrivacyHelperTests.m */; }; 12 | 5CF3050C38013A8B5C87B459 /* libPods-DBPrivacyHelperExampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D53EF3130F07107F2AA7B2A9 /* libPods-DBPrivacyHelperExampleTests.a */; }; 13 | 9A59AE631A1A617600005D4A /* DBPrivacyHelper.podspec in Resources */ = {isa = PBXBuildFile; fileRef = 9A59AE621A1A617600005D4A /* DBPrivacyHelper.podspec */; }; 14 | 9AD85B141A5C707F003F80D6 /* DBPrivacyHelperDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 9AD85B131A5C707F003F80D6 /* DBPrivacyHelperDataSource.m */; }; 15 | 9AD85B161A5C8861003F80D6 /* testIcon.png in Resources */ = {isa = PBXBuildFile; fileRef = 9AD85B151A5C8861003F80D6 /* testIcon.png */; }; 16 | 9AE88CFC1A10C4AE00086242 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9AE88CFB1A10C4AE00086242 /* main.m */; }; 17 | 9AE88CFF1A10C4AE00086242 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9AE88CFE1A10C4AE00086242 /* AppDelegate.m */; }; 18 | 9AE88D021A10C4AE00086242 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9AE88D011A10C4AE00086242 /* ViewController.m */; }; 19 | 9AE88D221A10C53900086242 /* AppAssets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9AE88D211A10C53900086242 /* AppAssets.xcassets */; }; 20 | 9AE88D321A10FEA000086242 /* bg.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 9AE88D311A10FEA000086242 /* bg.jpg */; }; 21 | 9AE88D431A11050D00086242 /* DBPrivacyHelperAssets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9AE88D381A11050D00086242 /* DBPrivacyHelperAssets.xcassets */; }; 22 | 9AE88D441A11050D00086242 /* DBPrivacyHelperLocalizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9AE88D3A1A11050D00086242 /* DBPrivacyHelperLocalizable.strings */; }; 23 | 9AE88D451A11050D00086242 /* DBPrivateHelperController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9AE88D3E1A11050D00086242 /* DBPrivateHelperController.m */; }; 24 | 9AE88D461A11050D00086242 /* UIImage+ImageEffects.m in Sources */ = {isa = PBXBuildFile; fileRef = 9AE88D401A11050D00086242 /* UIImage+ImageEffects.m */; }; 25 | 9AE88D471A11050D00086242 /* UIViewController+DBPrivacyHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 9AE88D421A11050D00086242 /* UIViewController+DBPrivacyHelper.m */; }; 26 | 9AE88D4A1A11100700086242 /* DBPrivateHelperCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9AE88D491A11100700086242 /* DBPrivateHelperCell.m */; }; 27 | EBF7EF5F1A66D212004C5784 /* DBPrivacyHelperLocalizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9AE88D3A1A11050D00086242 /* DBPrivacyHelperLocalizable.strings */; }; 28 | /* End PBXBuildFile section */ 29 | 30 | /* Begin PBXContainerItemProxy section */ 31 | 9AE88D101A10C4AE00086242 /* PBXContainerItemProxy */ = { 32 | isa = PBXContainerItemProxy; 33 | containerPortal = 9AE88CEE1A10C4AE00086242 /* Project object */; 34 | proxyType = 1; 35 | remoteGlobalIDString = 9AE88CF51A10C4AE00086242; 36 | remoteInfo = DBPrivacyHelperExample; 37 | }; 38 | /* End PBXContainerItemProxy section */ 39 | 40 | /* Begin PBXFileReference section */ 41 | 2D8897741A5A1F5200AE811F /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/DBPrivacyHelperLocalizable.strings; sourceTree = ""; }; 42 | 4360CC281AE2980D003D43EC /* DBPrivateHelperControllerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DBPrivateHelperControllerTests.m; sourceTree = ""; }; 43 | 4360CC2A1AE2B193003D43EC /* DBPrivacyHelperTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DBPrivacyHelperTests.m; sourceTree = ""; }; 44 | 7E68E9B92E9D65AA1F13A5AF /* Pods-DBPrivacyHelperExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DBPrivacyHelperExampleTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-DBPrivacyHelperExampleTests/Pods-DBPrivacyHelperExampleTests.debug.xcconfig"; sourceTree = ""; }; 45 | 9A2E193E1A1233DB001F6618 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/DBPrivacyHelperLocalizable.strings; sourceTree = ""; }; 46 | 9A59AE621A1A617600005D4A /* DBPrivacyHelper.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DBPrivacyHelper.podspec; path = ../../DBPrivacyHelper.podspec; sourceTree = ""; }; 47 | 9AD85B121A5C707F003F80D6 /* DBPrivacyHelperDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DBPrivacyHelperDataSource.h; sourceTree = ""; }; 48 | 9AD85B131A5C707F003F80D6 /* DBPrivacyHelperDataSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DBPrivacyHelperDataSource.m; sourceTree = ""; }; 49 | 9AD85B151A5C8861003F80D6 /* testIcon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = testIcon.png; sourceTree = ""; }; 50 | 9AE88CF61A10C4AE00086242 /* DBPrivacyHelperExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DBPrivacyHelperExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | 9AE88CFA1A10C4AE00086242 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | 9AE88CFB1A10C4AE00086242 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 53 | 9AE88CFD1A10C4AE00086242 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 54 | 9AE88CFE1A10C4AE00086242 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 55 | 9AE88D001A10C4AE00086242 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 56 | 9AE88D011A10C4AE00086242 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 57 | 9AE88D0F1A10C4AE00086242 /* DBPrivacyHelperExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DBPrivacyHelperExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 58 | 9AE88D141A10C4AE00086242 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 59 | 9AE88D211A10C53900086242 /* AppAssets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = AppAssets.xcassets; sourceTree = ""; }; 60 | 9AE88D311A10FEA000086242 /* bg.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = bg.jpg; sourceTree = ""; }; 61 | 9AE88D381A11050D00086242 /* DBPrivacyHelperAssets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = DBPrivacyHelperAssets.xcassets; sourceTree = ""; }; 62 | 9AE88D3B1A11050D00086242 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/DBPrivacyHelperLocalizable.strings; sourceTree = ""; }; 63 | 9AE88D3C1A11050D00086242 /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/DBPrivacyHelperLocalizable.strings; sourceTree = ""; }; 64 | 9AE88D3D1A11050D00086242 /* DBPrivateHelperController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DBPrivateHelperController.h; sourceTree = ""; }; 65 | 9AE88D3E1A11050D00086242 /* DBPrivateHelperController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DBPrivateHelperController.m; sourceTree = ""; }; 66 | 9AE88D3F1A11050D00086242 /* UIImage+ImageEffects.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+ImageEffects.h"; sourceTree = ""; }; 67 | 9AE88D401A11050D00086242 /* UIImage+ImageEffects.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+ImageEffects.m"; sourceTree = ""; }; 68 | 9AE88D411A11050D00086242 /* UIViewController+DBPrivacyHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+DBPrivacyHelper.h"; sourceTree = ""; }; 69 | 9AE88D421A11050D00086242 /* UIViewController+DBPrivacyHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+DBPrivacyHelper.m"; sourceTree = ""; }; 70 | 9AE88D481A11100700086242 /* DBPrivateHelperCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DBPrivateHelperCell.h; sourceTree = ""; }; 71 | 9AE88D491A11100700086242 /* DBPrivateHelperCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DBPrivateHelperCell.m; sourceTree = ""; }; 72 | B5C9AE611A3B46F200082D01 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/DBPrivacyHelperLocalizable.strings"; sourceTree = ""; }; 73 | D0FEAB5AE73F6F6808F8FF69 /* Pods-DBPrivacyHelperExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DBPrivacyHelperExampleTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-DBPrivacyHelperExampleTests/Pods-DBPrivacyHelperExampleTests.release.xcconfig"; sourceTree = ""; }; 74 | D53EF3130F07107F2AA7B2A9 /* libPods-DBPrivacyHelperExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-DBPrivacyHelperExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 75 | EBF7EF601A66DA87004C5784 /* pt-PT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-PT"; path = "pt-PT.lproj/DBPrivacyHelperLocalizable.strings"; sourceTree = ""; }; 76 | /* End PBXFileReference section */ 77 | 78 | /* Begin PBXFrameworksBuildPhase section */ 79 | 9AE88CF31A10C4AE00086242 /* Frameworks */ = { 80 | isa = PBXFrameworksBuildPhase; 81 | buildActionMask = 2147483647; 82 | files = ( 83 | ); 84 | runOnlyForDeploymentPostprocessing = 0; 85 | }; 86 | 9AE88D0C1A10C4AE00086242 /* Frameworks */ = { 87 | isa = PBXFrameworksBuildPhase; 88 | buildActionMask = 2147483647; 89 | files = ( 90 | 5CF3050C38013A8B5C87B459 /* libPods-DBPrivacyHelperExampleTests.a in Frameworks */, 91 | ); 92 | runOnlyForDeploymentPostprocessing = 0; 93 | }; 94 | /* End PBXFrameworksBuildPhase section */ 95 | 96 | /* Begin PBXGroup section */ 97 | 6B4488298893B3419E3264C2 /* Frameworks */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | D53EF3130F07107F2AA7B2A9 /* libPods-DBPrivacyHelperExampleTests.a */, 101 | ); 102 | name = Frameworks; 103 | sourceTree = ""; 104 | }; 105 | 9AE88CED1A10C4AE00086242 = { 106 | isa = PBXGroup; 107 | children = ( 108 | 9AE88CF81A10C4AE00086242 /* DBPrivacyHelperExample */, 109 | 9AE88D121A10C4AE00086242 /* DBPrivacyHelperExampleTests */, 110 | 9AE88CF71A10C4AE00086242 /* Products */, 111 | EA86A75058E8BF4B0917EB9C /* Pods */, 112 | 6B4488298893B3419E3264C2 /* Frameworks */, 113 | ); 114 | sourceTree = ""; 115 | }; 116 | 9AE88CF71A10C4AE00086242 /* Products */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | 9AE88CF61A10C4AE00086242 /* DBPrivacyHelperExample.app */, 120 | 9AE88D0F1A10C4AE00086242 /* DBPrivacyHelperExampleTests.xctest */, 121 | ); 122 | name = Products; 123 | sourceTree = ""; 124 | }; 125 | 9AE88CF81A10C4AE00086242 /* DBPrivacyHelperExample */ = { 126 | isa = PBXGroup; 127 | children = ( 128 | 9A59AE621A1A617600005D4A /* DBPrivacyHelper.podspec */, 129 | 9AE88D371A11050D00086242 /* DBPrivacyHelper */, 130 | 9AE88D211A10C53900086242 /* AppAssets.xcassets */, 131 | 9AE88CFD1A10C4AE00086242 /* AppDelegate.h */, 132 | 9AE88CFE1A10C4AE00086242 /* AppDelegate.m */, 133 | 9AE88D001A10C4AE00086242 /* ViewController.h */, 134 | 9AE88D011A10C4AE00086242 /* ViewController.m */, 135 | 9AD85B151A5C8861003F80D6 /* testIcon.png */, 136 | 9AE88D311A10FEA000086242 /* bg.jpg */, 137 | 9AE88CF91A10C4AE00086242 /* Supporting Files */, 138 | ); 139 | path = DBPrivacyHelperExample; 140 | sourceTree = ""; 141 | }; 142 | 9AE88CF91A10C4AE00086242 /* Supporting Files */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | 9AE88CFA1A10C4AE00086242 /* Info.plist */, 146 | 9AE88CFB1A10C4AE00086242 /* main.m */, 147 | ); 148 | name = "Supporting Files"; 149 | sourceTree = ""; 150 | }; 151 | 9AE88D121A10C4AE00086242 /* DBPrivacyHelperExampleTests */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | 4360CC281AE2980D003D43EC /* DBPrivateHelperControllerTests.m */, 155 | 4360CC2A1AE2B193003D43EC /* DBPrivacyHelperTests.m */, 156 | 9AE88D131A10C4AE00086242 /* Supporting Files */, 157 | ); 158 | path = DBPrivacyHelperExampleTests; 159 | sourceTree = ""; 160 | }; 161 | 9AE88D131A10C4AE00086242 /* Supporting Files */ = { 162 | isa = PBXGroup; 163 | children = ( 164 | 9AE88D141A10C4AE00086242 /* Info.plist */, 165 | ); 166 | name = "Supporting Files"; 167 | sourceTree = ""; 168 | }; 169 | 9AE88D371A11050D00086242 /* DBPrivacyHelper */ = { 170 | isa = PBXGroup; 171 | children = ( 172 | 9AE88D391A11050D00086242 /* DBPrivacyHelperLocalizations */, 173 | 9AE88D381A11050D00086242 /* DBPrivacyHelperAssets.xcassets */, 174 | 9AD85B121A5C707F003F80D6 /* DBPrivacyHelperDataSource.h */, 175 | 9AD85B131A5C707F003F80D6 /* DBPrivacyHelperDataSource.m */, 176 | 9AE88D3D1A11050D00086242 /* DBPrivateHelperController.h */, 177 | 9AE88D3E1A11050D00086242 /* DBPrivateHelperController.m */, 178 | 9AE88D481A11100700086242 /* DBPrivateHelperCell.h */, 179 | 9AE88D491A11100700086242 /* DBPrivateHelperCell.m */, 180 | 9AE88D3F1A11050D00086242 /* UIImage+ImageEffects.h */, 181 | 9AE88D401A11050D00086242 /* UIImage+ImageEffects.m */, 182 | 9AE88D411A11050D00086242 /* UIViewController+DBPrivacyHelper.h */, 183 | 9AE88D421A11050D00086242 /* UIViewController+DBPrivacyHelper.m */, 184 | ); 185 | name = DBPrivacyHelper; 186 | path = ../../DBPrivacyHelper; 187 | sourceTree = ""; 188 | }; 189 | 9AE88D391A11050D00086242 /* DBPrivacyHelperLocalizations */ = { 190 | isa = PBXGroup; 191 | children = ( 192 | 9AE88D3A1A11050D00086242 /* DBPrivacyHelperLocalizable.strings */, 193 | ); 194 | path = DBPrivacyHelperLocalizations; 195 | sourceTree = ""; 196 | }; 197 | EA86A75058E8BF4B0917EB9C /* Pods */ = { 198 | isa = PBXGroup; 199 | children = ( 200 | 7E68E9B92E9D65AA1F13A5AF /* Pods-DBPrivacyHelperExampleTests.debug.xcconfig */, 201 | D0FEAB5AE73F6F6808F8FF69 /* Pods-DBPrivacyHelperExampleTests.release.xcconfig */, 202 | ); 203 | name = Pods; 204 | sourceTree = ""; 205 | }; 206 | /* End PBXGroup section */ 207 | 208 | /* Begin PBXNativeTarget section */ 209 | 9AE88CF51A10C4AE00086242 /* DBPrivacyHelperExample */ = { 210 | isa = PBXNativeTarget; 211 | buildConfigurationList = 9AE88D191A10C4AE00086242 /* Build configuration list for PBXNativeTarget "DBPrivacyHelperExample" */; 212 | buildPhases = ( 213 | 9AE88CF21A10C4AE00086242 /* Sources */, 214 | 9AE88CF31A10C4AE00086242 /* Frameworks */, 215 | 9AE88CF41A10C4AE00086242 /* Resources */, 216 | 9ABA1DCA1A6D6749000DA480 /* ShellScript */, 217 | ); 218 | buildRules = ( 219 | ); 220 | dependencies = ( 221 | ); 222 | name = DBPrivacyHelperExample; 223 | productName = DBPrivacyHelperExample; 224 | productReference = 9AE88CF61A10C4AE00086242 /* DBPrivacyHelperExample.app */; 225 | productType = "com.apple.product-type.application"; 226 | }; 227 | 9AE88D0E1A10C4AE00086242 /* DBPrivacyHelperExampleTests */ = { 228 | isa = PBXNativeTarget; 229 | buildConfigurationList = 9AE88D1C1A10C4AE00086242 /* Build configuration list for PBXNativeTarget "DBPrivacyHelperExampleTests" */; 230 | buildPhases = ( 231 | 9CF982555D85EF3EE8AC40B5 /* Check Pods Manifest.lock */, 232 | 9AE88D0B1A10C4AE00086242 /* Sources */, 233 | 9AE88D0C1A10C4AE00086242 /* Frameworks */, 234 | 9AE88D0D1A10C4AE00086242 /* Resources */, 235 | D03A24F83A3935D7F5441893 /* Copy Pods Resources */, 236 | ); 237 | buildRules = ( 238 | ); 239 | dependencies = ( 240 | 9AE88D111A10C4AE00086242 /* PBXTargetDependency */, 241 | ); 242 | name = DBPrivacyHelperExampleTests; 243 | productName = DBPrivacyHelperExampleTests; 244 | productReference = 9AE88D0F1A10C4AE00086242 /* DBPrivacyHelperExampleTests.xctest */; 245 | productType = "com.apple.product-type.bundle.unit-test"; 246 | }; 247 | /* End PBXNativeTarget section */ 248 | 249 | /* Begin PBXProject section */ 250 | 9AE88CEE1A10C4AE00086242 /* Project object */ = { 251 | isa = PBXProject; 252 | attributes = { 253 | LastUpgradeCheck = 0610; 254 | ORGANIZATIONNAME = iBo; 255 | TargetAttributes = { 256 | 9AE88CF51A10C4AE00086242 = { 257 | CreatedOnToolsVersion = 6.1; 258 | }; 259 | 9AE88D0E1A10C4AE00086242 = { 260 | CreatedOnToolsVersion = 6.1; 261 | TestTargetID = 9AE88CF51A10C4AE00086242; 262 | }; 263 | }; 264 | }; 265 | buildConfigurationList = 9AE88CF11A10C4AE00086242 /* Build configuration list for PBXProject "DBPrivacyHelperExample" */; 266 | compatibilityVersion = "Xcode 3.2"; 267 | developmentRegion = English; 268 | hasScannedForEncodings = 0; 269 | knownRegions = ( 270 | en, 271 | Base, 272 | it, 273 | es, 274 | "zh-Hant", 275 | ko, 276 | "pt-PT", 277 | ); 278 | mainGroup = 9AE88CED1A10C4AE00086242; 279 | productRefGroup = 9AE88CF71A10C4AE00086242 /* Products */; 280 | projectDirPath = ""; 281 | projectRoot = ""; 282 | targets = ( 283 | 9AE88CF51A10C4AE00086242 /* DBPrivacyHelperExample */, 284 | 9AE88D0E1A10C4AE00086242 /* DBPrivacyHelperExampleTests */, 285 | ); 286 | }; 287 | /* End PBXProject section */ 288 | 289 | /* Begin PBXResourcesBuildPhase section */ 290 | 9AE88CF41A10C4AE00086242 /* Resources */ = { 291 | isa = PBXResourcesBuildPhase; 292 | buildActionMask = 2147483647; 293 | files = ( 294 | 9AE88D441A11050D00086242 /* DBPrivacyHelperLocalizable.strings in Resources */, 295 | 9A59AE631A1A617600005D4A /* DBPrivacyHelper.podspec in Resources */, 296 | 9AE88D221A10C53900086242 /* AppAssets.xcassets in Resources */, 297 | 9AE88D321A10FEA000086242 /* bg.jpg in Resources */, 298 | 9AE88D431A11050D00086242 /* DBPrivacyHelperAssets.xcassets in Resources */, 299 | 9AD85B161A5C8861003F80D6 /* testIcon.png in Resources */, 300 | ); 301 | runOnlyForDeploymentPostprocessing = 0; 302 | }; 303 | 9AE88D0D1A10C4AE00086242 /* Resources */ = { 304 | isa = PBXResourcesBuildPhase; 305 | buildActionMask = 2147483647; 306 | files = ( 307 | EBF7EF5F1A66D212004C5784 /* DBPrivacyHelperLocalizable.strings in Resources */, 308 | ); 309 | runOnlyForDeploymentPostprocessing = 0; 310 | }; 311 | /* End PBXResourcesBuildPhase section */ 312 | 313 | /* Begin PBXShellScriptBuildPhase section */ 314 | 9ABA1DCA1A6D6749000DA480 /* ShellScript */ = { 315 | isa = PBXShellScriptBuildPhase; 316 | buildActionMask = 2147483647; 317 | files = ( 318 | ); 319 | inputPaths = ( 320 | ); 321 | outputPaths = ( 322 | ); 323 | runOnlyForDeploymentPostprocessing = 0; 324 | shellPath = /bin/sh; 325 | shellScript = "buildNumber=$(/usr/libexec/PlistBuddy -c \"Print CFBundleVersion\" \"${PROJECT_DIR}/${INFOPLIST_FILE}\")\nbuildNumber=$(($buildNumber + 1))\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $buildNumber\" \"${PROJECT_DIR}/${INFOPLIST_FILE}\""; 326 | }; 327 | 9CF982555D85EF3EE8AC40B5 /* Check Pods Manifest.lock */ = { 328 | isa = PBXShellScriptBuildPhase; 329 | buildActionMask = 2147483647; 330 | files = ( 331 | ); 332 | inputPaths = ( 333 | ); 334 | name = "Check Pods Manifest.lock"; 335 | outputPaths = ( 336 | ); 337 | runOnlyForDeploymentPostprocessing = 0; 338 | shellPath = /bin/sh; 339 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 340 | showEnvVarsInLog = 0; 341 | }; 342 | D03A24F83A3935D7F5441893 /* Copy Pods Resources */ = { 343 | isa = PBXShellScriptBuildPhase; 344 | buildActionMask = 2147483647; 345 | files = ( 346 | ); 347 | inputPaths = ( 348 | ); 349 | name = "Copy Pods Resources"; 350 | outputPaths = ( 351 | ); 352 | runOnlyForDeploymentPostprocessing = 0; 353 | shellPath = /bin/sh; 354 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-DBPrivacyHelperExampleTests/Pods-DBPrivacyHelperExampleTests-resources.sh\"\n"; 355 | showEnvVarsInLog = 0; 356 | }; 357 | /* End PBXShellScriptBuildPhase section */ 358 | 359 | /* Begin PBXSourcesBuildPhase section */ 360 | 9AE88CF21A10C4AE00086242 /* Sources */ = { 361 | isa = PBXSourcesBuildPhase; 362 | buildActionMask = 2147483647; 363 | files = ( 364 | 9AE88D021A10C4AE00086242 /* ViewController.m in Sources */, 365 | 9AE88D461A11050D00086242 /* UIImage+ImageEffects.m in Sources */, 366 | 9AE88CFF1A10C4AE00086242 /* AppDelegate.m in Sources */, 367 | 9AE88D4A1A11100700086242 /* DBPrivateHelperCell.m in Sources */, 368 | 9AE88CFC1A10C4AE00086242 /* main.m in Sources */, 369 | 9AD85B141A5C707F003F80D6 /* DBPrivacyHelperDataSource.m in Sources */, 370 | 9AE88D451A11050D00086242 /* DBPrivateHelperController.m in Sources */, 371 | 9AE88D471A11050D00086242 /* UIViewController+DBPrivacyHelper.m in Sources */, 372 | ); 373 | runOnlyForDeploymentPostprocessing = 0; 374 | }; 375 | 9AE88D0B1A10C4AE00086242 /* Sources */ = { 376 | isa = PBXSourcesBuildPhase; 377 | buildActionMask = 2147483647; 378 | files = ( 379 | 4360CC2B1AE2B193003D43EC /* DBPrivacyHelperTests.m in Sources */, 380 | 4360CC291AE2980D003D43EC /* DBPrivateHelperControllerTests.m in Sources */, 381 | ); 382 | runOnlyForDeploymentPostprocessing = 0; 383 | }; 384 | /* End PBXSourcesBuildPhase section */ 385 | 386 | /* Begin PBXTargetDependency section */ 387 | 9AE88D111A10C4AE00086242 /* PBXTargetDependency */ = { 388 | isa = PBXTargetDependency; 389 | target = 9AE88CF51A10C4AE00086242 /* DBPrivacyHelperExample */; 390 | targetProxy = 9AE88D101A10C4AE00086242 /* PBXContainerItemProxy */; 391 | }; 392 | /* End PBXTargetDependency section */ 393 | 394 | /* Begin PBXVariantGroup section */ 395 | 9AE88D3A1A11050D00086242 /* DBPrivacyHelperLocalizable.strings */ = { 396 | isa = PBXVariantGroup; 397 | children = ( 398 | 9AE88D3B1A11050D00086242 /* en */, 399 | 9AE88D3C1A11050D00086242 /* it */, 400 | 9A2E193E1A1233DB001F6618 /* es */, 401 | B5C9AE611A3B46F200082D01 /* zh-Hant */, 402 | 2D8897741A5A1F5200AE811F /* ko */, 403 | EBF7EF601A66DA87004C5784 /* pt-PT */, 404 | ); 405 | name = DBPrivacyHelperLocalizable.strings; 406 | sourceTree = ""; 407 | }; 408 | /* End PBXVariantGroup section */ 409 | 410 | /* Begin XCBuildConfiguration section */ 411 | 9AE88D171A10C4AE00086242 /* Debug */ = { 412 | isa = XCBuildConfiguration; 413 | buildSettings = { 414 | ALWAYS_SEARCH_USER_PATHS = NO; 415 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 416 | CLANG_CXX_LIBRARY = "libc++"; 417 | CLANG_ENABLE_MODULES = YES; 418 | CLANG_ENABLE_OBJC_ARC = YES; 419 | CLANG_WARN_BOOL_CONVERSION = YES; 420 | CLANG_WARN_CONSTANT_CONVERSION = YES; 421 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 422 | CLANG_WARN_EMPTY_BODY = YES; 423 | CLANG_WARN_ENUM_CONVERSION = YES; 424 | CLANG_WARN_INT_CONVERSION = YES; 425 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 426 | CLANG_WARN_UNREACHABLE_CODE = YES; 427 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 428 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 429 | COPY_PHASE_STRIP = NO; 430 | ENABLE_STRICT_OBJC_MSGSEND = YES; 431 | GCC_C_LANGUAGE_STANDARD = gnu99; 432 | GCC_DYNAMIC_NO_PIC = NO; 433 | GCC_OPTIMIZATION_LEVEL = 0; 434 | GCC_PREPROCESSOR_DEFINITIONS = ( 435 | "DEBUG=1", 436 | "$(inherited)", 437 | ); 438 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 439 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 440 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 441 | GCC_WARN_UNDECLARED_SELECTOR = YES; 442 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 443 | GCC_WARN_UNUSED_FUNCTION = YES; 444 | GCC_WARN_UNUSED_VARIABLE = YES; 445 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 446 | MTL_ENABLE_DEBUG_INFO = YES; 447 | ONLY_ACTIVE_ARCH = YES; 448 | SDKROOT = iphoneos; 449 | }; 450 | name = Debug; 451 | }; 452 | 9AE88D181A10C4AE00086242 /* Release */ = { 453 | isa = XCBuildConfiguration; 454 | buildSettings = { 455 | ALWAYS_SEARCH_USER_PATHS = NO; 456 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 457 | CLANG_CXX_LIBRARY = "libc++"; 458 | CLANG_ENABLE_MODULES = YES; 459 | CLANG_ENABLE_OBJC_ARC = YES; 460 | CLANG_WARN_BOOL_CONVERSION = YES; 461 | CLANG_WARN_CONSTANT_CONVERSION = YES; 462 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 463 | CLANG_WARN_EMPTY_BODY = YES; 464 | CLANG_WARN_ENUM_CONVERSION = YES; 465 | CLANG_WARN_INT_CONVERSION = YES; 466 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 467 | CLANG_WARN_UNREACHABLE_CODE = YES; 468 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 469 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 470 | COPY_PHASE_STRIP = YES; 471 | ENABLE_NS_ASSERTIONS = NO; 472 | ENABLE_STRICT_OBJC_MSGSEND = YES; 473 | GCC_C_LANGUAGE_STANDARD = gnu99; 474 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 475 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 476 | GCC_WARN_UNDECLARED_SELECTOR = YES; 477 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 478 | GCC_WARN_UNUSED_FUNCTION = YES; 479 | GCC_WARN_UNUSED_VARIABLE = YES; 480 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 481 | MTL_ENABLE_DEBUG_INFO = NO; 482 | SDKROOT = iphoneos; 483 | VALIDATE_PRODUCT = YES; 484 | }; 485 | name = Release; 486 | }; 487 | 9AE88D1A1A10C4AE00086242 /* Debug */ = { 488 | isa = XCBuildConfiguration; 489 | buildSettings = { 490 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 491 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 492 | INFOPLIST_FILE = DBPrivacyHelperExample/Info.plist; 493 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 494 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 495 | PRODUCT_NAME = "$(TARGET_NAME)"; 496 | }; 497 | name = Debug; 498 | }; 499 | 9AE88D1B1A10C4AE00086242 /* Release */ = { 500 | isa = XCBuildConfiguration; 501 | buildSettings = { 502 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 503 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 504 | INFOPLIST_FILE = DBPrivacyHelperExample/Info.plist; 505 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 506 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 507 | PRODUCT_NAME = "$(TARGET_NAME)"; 508 | }; 509 | name = Release; 510 | }; 511 | 9AE88D1D1A10C4AE00086242 /* Debug */ = { 512 | isa = XCBuildConfiguration; 513 | baseConfigurationReference = 7E68E9B92E9D65AA1F13A5AF /* Pods-DBPrivacyHelperExampleTests.debug.xcconfig */; 514 | buildSettings = { 515 | BUNDLE_LOADER = "$(TEST_HOST)"; 516 | FRAMEWORK_SEARCH_PATHS = ( 517 | "$(SDKROOT)/Developer/Library/Frameworks", 518 | "$(inherited)", 519 | ); 520 | GCC_PREPROCESSOR_DEFINITIONS = ( 521 | "DEBUG=1", 522 | "$(inherited)", 523 | "FB_REFERENCE_IMAGE_DIR=\"\\\"$(SOURCE_ROOT)/$(PROJECT_NAME)Tests/ReferenceImages\\\"\"", 524 | ); 525 | INFOPLIST_FILE = DBPrivacyHelperExampleTests/Info.plist; 526 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 527 | PRODUCT_NAME = "$(TARGET_NAME)"; 528 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DBPrivacyHelperExample.app/DBPrivacyHelperExample"; 529 | }; 530 | name = Debug; 531 | }; 532 | 9AE88D1E1A10C4AE00086242 /* Release */ = { 533 | isa = XCBuildConfiguration; 534 | baseConfigurationReference = D0FEAB5AE73F6F6808F8FF69 /* Pods-DBPrivacyHelperExampleTests.release.xcconfig */; 535 | buildSettings = { 536 | BUNDLE_LOADER = "$(TEST_HOST)"; 537 | FRAMEWORK_SEARCH_PATHS = ( 538 | "$(SDKROOT)/Developer/Library/Frameworks", 539 | "$(inherited)", 540 | ); 541 | GCC_PREPROCESSOR_DEFINITIONS = ( 542 | "$(inherited)", 543 | "COCOAPODS=1", 544 | "FB_REFERENCE_IMAGE_DIR=\"\\\"$(SOURCE_ROOT)/$(PROJECT_NAME)Tests/ReferenceImages\\\"\"", 545 | ); 546 | INFOPLIST_FILE = DBPrivacyHelperExampleTests/Info.plist; 547 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 548 | PRODUCT_NAME = "$(TARGET_NAME)"; 549 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DBPrivacyHelperExample.app/DBPrivacyHelperExample"; 550 | }; 551 | name = Release; 552 | }; 553 | /* End XCBuildConfiguration section */ 554 | 555 | /* Begin XCConfigurationList section */ 556 | 9AE88CF11A10C4AE00086242 /* Build configuration list for PBXProject "DBPrivacyHelperExample" */ = { 557 | isa = XCConfigurationList; 558 | buildConfigurations = ( 559 | 9AE88D171A10C4AE00086242 /* Debug */, 560 | 9AE88D181A10C4AE00086242 /* Release */, 561 | ); 562 | defaultConfigurationIsVisible = 0; 563 | defaultConfigurationName = Release; 564 | }; 565 | 9AE88D191A10C4AE00086242 /* Build configuration list for PBXNativeTarget "DBPrivacyHelperExample" */ = { 566 | isa = XCConfigurationList; 567 | buildConfigurations = ( 568 | 9AE88D1A1A10C4AE00086242 /* Debug */, 569 | 9AE88D1B1A10C4AE00086242 /* Release */, 570 | ); 571 | defaultConfigurationIsVisible = 0; 572 | defaultConfigurationName = Release; 573 | }; 574 | 9AE88D1C1A10C4AE00086242 /* Build configuration list for PBXNativeTarget "DBPrivacyHelperExampleTests" */ = { 575 | isa = XCConfigurationList; 576 | buildConfigurations = ( 577 | 9AE88D1D1A10C4AE00086242 /* Debug */, 578 | 9AE88D1E1A10C4AE00086242 /* Release */, 579 | ); 580 | defaultConfigurationIsVisible = 0; 581 | defaultConfigurationName = Release; 582 | }; 583 | /* End XCConfigurationList section */ 584 | }; 585 | rootObject = 9AE88CEE1A10C4AE00086242 /* Project object */; 586 | } 587 | -------------------------------------------------------------------------------- /DBPrivacyHelperExample/DBPrivacyHelperExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /DBPrivacyHelperExample/DBPrivacyHelperExample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /DBPrivacyHelperExample/DBPrivacyHelperExample/AppAssets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "60x60", 21 | "scale" : "3x" 22 | } 23 | ], 24 | "info" : { 25 | "version" : 1, 26 | "author" : "xcode" 27 | } 28 | } -------------------------------------------------------------------------------- /DBPrivacyHelperExample/DBPrivacyHelperExample/AppAssets.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "minimum-system-version" : "7.0", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "orientation" : "portrait", 11 | "idiom" : "iphone", 12 | "minimum-system-version" : "7.0", 13 | "subtype" : "retina4", 14 | "scale" : "2x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /DBPrivacyHelperExample/DBPrivacyHelperExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // DBPrivacyHelperExample 4 | // 5 | // Created by iBo on 10/11/14. 6 | // Copyright (c) 2014 iBo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /DBPrivacyHelperExample/DBPrivacyHelperExample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // DBPrivacyHelperExample 4 | // 5 | // Created by iBo on 10/11/14. 6 | // Copyright (c) 2014 iBo. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "ViewController.h" 11 | 12 | @interface AppDelegate () 13 | 14 | @end 15 | 16 | @implementation AppDelegate 17 | 18 | 19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 20 | // Override point for customization after application launch. 21 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 22 | self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:[[ViewController alloc] init]]; 23 | [self.window makeKeyAndVisible]; 24 | return YES; 25 | } 26 | 27 | - (void)applicationWillResignActive:(UIApplication *)application { 28 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 29 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 30 | } 31 | 32 | - (void)applicationDidEnterBackground:(UIApplication *)application { 33 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 34 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 35 | } 36 | 37 | - (void)applicationWillEnterForeground:(UIApplication *)application { 38 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 39 | } 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 43 | } 44 | 45 | - (void)applicationWillTerminate:(UIApplication *)application { 46 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 47 | } 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /DBPrivacyHelperExample/DBPrivacyHelperExample/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /DBPrivacyHelperExample/DBPrivacyHelperExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIcons 10 | 11 | CFBundleIcons~ipad 12 | 13 | CFBundleIdentifier 14 | com.db.$(PRODUCT_NAME:rfc1034identifier) 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | $(PRODUCT_NAME) 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | 0.6.3 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | 37 27 | LSRequiresIPhoneOS 28 | 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /DBPrivacyHelperExample/DBPrivacyHelperExample/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // DBPrivacyHelperExample 4 | // 5 | // Created by iBo on 10/11/14. 6 | // Copyright (c) 2014 iBo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end -------------------------------------------------------------------------------- /DBPrivacyHelperExample/DBPrivacyHelperExample/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // DBPrivacyHelperExample 4 | // 5 | // Created by iBo on 10/11/14. 6 | // Copyright (c) 2014 iBo. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "UIViewController+DBPrivacyHelper.h" 11 | 12 | @interface ViewController () 13 | 14 | @end 15 | 16 | @implementation ViewController 17 | 18 | - (void)viewDidLoad { 19 | [super viewDidLoad]; 20 | // Do any additional setup after loading the view, typically from a nib. 21 | self.view.backgroundColor = [UIColor whiteColor]; 22 | 23 | UIImageView *bg = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"bg.jpg"]]; 24 | bg.translatesAutoresizingMaskIntoConstraints = NO; 25 | bg.contentMode = UIViewContentModeScaleAspectFill; 26 | bg.clipsToBounds = YES; 27 | [self.view addSubview:bg]; 28 | 29 | UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; 30 | button.translatesAutoresizingMaskIntoConstraints = NO; 31 | button.backgroundColor = [UIColor colorWithWhite:0 alpha:.85]; 32 | [button setTitle:@"Open" forState:UIControlStateNormal]; 33 | // [button addTarget:self action:@selector(openHelper) forControlEvents:UIControlEventTouchUpInside]; 34 | [button addTarget:self action:@selector(openHelperToCustomize) forControlEvents:UIControlEventTouchUpInside]; 35 | [self.view addSubview:button]; 36 | 37 | NSDictionary *views = NSDictionaryOfVariableBindings(bg, button); 38 | NSDictionary *metrics = @{ @"buttonW":@100, @"buttonH":@50 }; 39 | 40 | [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-0-[bg]-0-|" options:0 metrics:nil views:views]]; 41 | [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-0-[bg]-0-|" options:0 metrics:nil views:views]]; 42 | 43 | [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[button(buttonW)]" options:0 44 | metrics:metrics views:views]]; 45 | [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[button(buttonH)]" options:0 46 | metrics:metrics views:views]]; 47 | [self.view addConstraint:[NSLayoutConstraint constraintWithItem:button attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeCenterX multiplier:1.0 constant:0.0]]; 48 | [self.view addConstraint:[NSLayoutConstraint constraintWithItem:button attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeCenterY multiplier:1.0 constant:0.0]]; 49 | } 50 | 51 | - (void)didReceiveMemoryWarning { 52 | [super didReceiveMemoryWarning]; 53 | // Dispose of any resources that can be recreated. 54 | } 55 | 56 | - (void) openHelper { 57 | static DBPrivacyType type, typeCount = DBPrivacyTypeFacebook + 1; 58 | [self showPrivacyHelperForType:type]; 59 | type = (type + 1) % typeCount; 60 | } 61 | 62 | - (void) openHelperToCustomize { 63 | [self showPrivacyHelperForType:DBPrivacyTypeLocation controller:^(DBPrivateHelperController *vc) { 64 | //customize the view controller to present 65 | } didPresent:^{ 66 | //customize the completion block of presentViewController:animated:completion: 67 | } didDismiss:^{ 68 | //customize the completion block of dismissViewControllerAnimated:completion: 69 | } useDefaultSettingPane:NO]; //If NO force to use DBPrivateHelperController instead of the default settings pane on iOS 8. Only for iOS 8. Default value is YES. 70 | } 71 | 72 | - (void) openNotificationHelper { 73 | self.appIcon = @"testIcon"; 74 | [self showPrivacyHelperForType:DBPrivacyTypeNotifications]; 75 | } 76 | 77 | @end -------------------------------------------------------------------------------- /DBPrivacyHelperExample/DBPrivacyHelperExample/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelperExample/DBPrivacyHelperExample/bg.jpg -------------------------------------------------------------------------------- /DBPrivacyHelperExample/DBPrivacyHelperExample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // DBPrivacyHelperExample 4 | // 5 | // Created by iBo on 10/11/14. 6 | // Copyright (c) 2014 iBo. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } -------------------------------------------------------------------------------- /DBPrivacyHelperExample/DBPrivacyHelperExample/testIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelperExample/DBPrivacyHelperExample/testIcon.png -------------------------------------------------------------------------------- /DBPrivacyHelperExample/DBPrivacyHelperExampleTests/DBPrivacyHelperExampleTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // DBPrivacyHelperExampleTests.m 3 | // DBPrivacyHelperExampleTests 4 | // 5 | // Created by iBo on 10/11/14. 6 | // Copyright (c) 2014 iBo. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | #import "UIViewController+DBPrivacyHelper.h" 13 | 14 | @interface DBPrivacyHelperExampleTests : XCTestCase 15 | 16 | @end 17 | 18 | @implementation DBPrivacyHelperExampleTests { 19 | UIViewController *baseVc_; 20 | } 21 | 22 | - (void)setUp { 23 | [super setUp]; 24 | // Put setup code here. This method is called before the invocation of each test method in the class. 25 | baseVc_ = [[UIViewController alloc] init]; 26 | baseVc_.view.backgroundColor = [UIColor redColor]; 27 | 28 | UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:baseVc_]; 29 | } 30 | 31 | - (void)tearDown { 32 | // Put teardown code here. This method is called after the invocation of each test method in the class. 33 | [super tearDown]; 34 | } 35 | 36 | - (void)testSnapshot { 37 | // This is an example of a functional test case. 38 | UIImage *snapshot = [baseVc_ snapshot]; 39 | 40 | XCTAssertTrue([snapshot isKindOfClass:[UIImage class]], @"Should be an image"); 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /DBPrivacyHelperExample/DBPrivacyHelperExampleTests/DBPrivacyHelperTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // DBPrivacyHelperTests.m 3 | // DBPrivacyHelperExample 4 | // 5 | // Created by Christian Klotz on 18/04/2015. 6 | // Copyright (c) 2015 iBo. All rights reserved. 7 | // 8 | 9 | #import "FBSnapshotTestCase.h" 10 | #import "UIViewController+DBPrivacyHelper.h" 11 | 12 | @interface DBPrivacyHelperTests : FBSnapshotTestCase 13 | 14 | @end 15 | 16 | @implementation DBPrivacyHelperTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | 21 | self.recordMode = NO; // Set to YES to create reference images 22 | } 23 | 24 | - (void)testDBPrivacyTypeCalendar { 25 | DBPrivateHelperController *controller = [DBPrivateHelperController helperForType:DBPrivacyTypeCalendars]; 26 | [controller loadView]; 27 | [controller viewDidLoad]; 28 | 29 | FBSnapshotVerifyView(controller.view, nil); 30 | } 31 | 32 | - (void)testDBPrivacyTypeCamera { 33 | DBPrivateHelperController *controller = [DBPrivateHelperController helperForType:DBPrivacyTypeCamera]; 34 | [controller loadView]; 35 | [controller viewDidLoad]; 36 | 37 | FBSnapshotVerifyView(controller.view, nil); 38 | } 39 | 40 | - (void)testDBPrivacyTypeContacts { 41 | DBPrivateHelperController *controller = [DBPrivateHelperController helperForType:DBPrivacyTypeContacts]; 42 | [controller loadView]; 43 | [controller viewDidLoad]; 44 | 45 | FBSnapshotVerifyView(controller.view, nil); 46 | } 47 | 48 | - (void)testDBPrivacyTypeFacebook { 49 | DBPrivateHelperController *controller = [DBPrivateHelperController helperForType:DBPrivacyTypeFacebook]; 50 | [controller loadView]; 51 | [controller viewDidLoad]; 52 | 53 | FBSnapshotVerifyView(controller.view, nil); 54 | } 55 | 56 | - (void)testDBPrivacyTypeHealth { 57 | DBPrivateHelperController *controller = [DBPrivateHelperController helperForType:DBPrivacyTypeHealth]; 58 | [controller loadView]; 59 | [controller viewDidLoad]; 60 | 61 | FBSnapshotVerifyView(controller.view, nil); 62 | } 63 | 64 | - (void)testDBPrivacyTypeHomeKit { 65 | DBPrivateHelperController *controller = [DBPrivateHelperController helperForType:DBPrivacyTypeHomeKit]; 66 | [controller loadView]; 67 | [controller viewDidLoad]; 68 | 69 | FBSnapshotVerifyView(controller.view, nil); 70 | } 71 | 72 | - (void)testDBPrivacyTypeLocation { 73 | DBPrivateHelperController *controller = [DBPrivateHelperController helperForType:DBPrivacyTypeLocation]; 74 | [controller loadView]; 75 | [controller viewDidLoad]; 76 | 77 | FBSnapshotVerifyView(controller.view, nil); 78 | } 79 | 80 | - (void)testDBPrivacyTypeMicrophone { 81 | DBPrivateHelperController *controller = [DBPrivateHelperController helperForType:DBPrivacyTypeMicrophone]; 82 | [controller loadView]; 83 | [controller viewDidLoad]; 84 | 85 | FBSnapshotVerifyView(controller.view, nil); 86 | } 87 | 88 | @end 89 | -------------------------------------------------------------------------------- /DBPrivacyHelperExample/DBPrivacyHelperExampleTests/DBPrivateHelperControllerTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // DBPrivacyHelperControllerTests.m 3 | // DBPrivacyHelperExample 4 | // 5 | // Created by Christian Klotz on 18/04/2015. 6 | // Copyright (c) 2015 iBo. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "UIViewController+DBPrivacyHelper.h" 12 | 13 | @interface DBPrivateHelperControllerTests : XCTestCase 14 | 15 | @property (nonatomic, strong) UIViewController *controller; 16 | 17 | @end 18 | 19 | @implementation DBPrivateHelperControllerTests 20 | 21 | - (void)setUp { 22 | [super setUp]; 23 | 24 | self.controller = [[UIViewController alloc] init]; 25 | } 26 | 27 | - (void)tearDown { 28 | [super tearDown]; 29 | } 30 | 31 | 32 | - (void)testTapCloseButtonDismissesController { 33 | DBPrivateHelperController *controller = [DBPrivateHelperController helperForType:DBPrivacyTypeCalendars]; 34 | [controller loadView]; 35 | [controller viewDidLoad]; 36 | 37 | OCMockObject *mock = [OCMockObject partialMockForObject:controller]; 38 | [[mock expect] didDismissViewController]; 39 | 40 | [controller.closeButton sendActionsForControlEvents:UIControlEventTouchUpInside]; 41 | 42 | [mock verify]; 43 | } 44 | 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /DBPrivacyHelperExample/DBPrivacyHelperExampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.db.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /DBPrivacyHelperExample/DBPrivacyHelperExampleTests/ReferenceImages/DBPrivacyHelperTests/testDBPrivacyTypeCalendar@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelperExample/DBPrivacyHelperExampleTests/ReferenceImages/DBPrivacyHelperTests/testDBPrivacyTypeCalendar@2x.png -------------------------------------------------------------------------------- /DBPrivacyHelperExample/DBPrivacyHelperExampleTests/ReferenceImages/DBPrivacyHelperTests/testDBPrivacyTypeCamera@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelperExample/DBPrivacyHelperExampleTests/ReferenceImages/DBPrivacyHelperTests/testDBPrivacyTypeCamera@2x.png -------------------------------------------------------------------------------- /DBPrivacyHelperExample/DBPrivacyHelperExampleTests/ReferenceImages/DBPrivacyHelperTests/testDBPrivacyTypeContacts@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelperExample/DBPrivacyHelperExampleTests/ReferenceImages/DBPrivacyHelperTests/testDBPrivacyTypeContacts@2x.png -------------------------------------------------------------------------------- /DBPrivacyHelperExample/DBPrivacyHelperExampleTests/ReferenceImages/DBPrivacyHelperTests/testDBPrivacyTypeFacebook@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelperExample/DBPrivacyHelperExampleTests/ReferenceImages/DBPrivacyHelperTests/testDBPrivacyTypeFacebook@2x.png -------------------------------------------------------------------------------- /DBPrivacyHelperExample/DBPrivacyHelperExampleTests/ReferenceImages/DBPrivacyHelperTests/testDBPrivacyTypeHealth@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelperExample/DBPrivacyHelperExampleTests/ReferenceImages/DBPrivacyHelperTests/testDBPrivacyTypeHealth@2x.png -------------------------------------------------------------------------------- /DBPrivacyHelperExample/DBPrivacyHelperExampleTests/ReferenceImages/DBPrivacyHelperTests/testDBPrivacyTypeHomeKit@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelperExample/DBPrivacyHelperExampleTests/ReferenceImages/DBPrivacyHelperTests/testDBPrivacyTypeHomeKit@2x.png -------------------------------------------------------------------------------- /DBPrivacyHelperExample/DBPrivacyHelperExampleTests/ReferenceImages/DBPrivacyHelperTests/testDBPrivacyTypeLocation@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelperExample/DBPrivacyHelperExampleTests/ReferenceImages/DBPrivacyHelperTests/testDBPrivacyTypeLocation@2x.png -------------------------------------------------------------------------------- /DBPrivacyHelperExample/DBPrivacyHelperExampleTests/ReferenceImages/DBPrivacyHelperTests/testDBPrivacyTypeMicrophone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelperExample/DBPrivacyHelperExampleTests/ReferenceImages/DBPrivacyHelperTests/testDBPrivacyTypeMicrophone@2x.png -------------------------------------------------------------------------------- /DBPrivacyHelperExample/DBPrivacyHelperExampleTests/ReferenceImages/DBPrivacyHelperTests/testDBPrivacyTypePhoto@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/DBPrivacyHelperExample/DBPrivacyHelperExampleTests/ReferenceImages/DBPrivacyHelperTests/testDBPrivacyTypePhoto@2x.png -------------------------------------------------------------------------------- /DBPrivacyHelperExample/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '6.0' 3 | 4 | target 'DBPrivacyHelperExample' do 5 | 6 | end 7 | 8 | target 'DBPrivacyHelperExampleTests' do 9 | 10 | pod 'FBSnapshotTestCase' 11 | pod 'OCMock' 12 | 13 | end 14 | 15 | -------------------------------------------------------------------------------- /DBPrivacyHelperExample/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - FBSnapshotTestCase (1.8.1) 3 | - OCMock (3.1.2) 4 | 5 | DEPENDENCIES: 6 | - FBSnapshotTestCase 7 | - OCMock 8 | 9 | SPEC CHECKSUMS: 10 | FBSnapshotTestCase: 3dc3899168747a0319c5278f5b3445c13a6532dd 11 | OCMock: a10ea9f0a6e921651f96f78b6faee95ebc813b92 12 | 13 | COCOAPODS: 0.37.2 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 danielebogo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /Layout/Icons.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielebogo/DBPrivacyHelper/1934490bc213e59761a4a7f78f7d7cc3fd35f1c5/Layout/Icons.psd -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | DBPrivacyHelper 2 | =============== 3 | 4 | ![Alt text](http://bogodaniele.com/apps/development/dbprivacyhelper/github/privacy_rec.gif) 5 | 6 | Quick category to explain the right place to enable your privacy settings 7 | 8 | ## Integration 9 | 10 | DBPrivacyHelper is a simple UIViewController category and it has a simple integration: 11 | 12 | - Import **UIViewController+DBPrivacyHelper.h** 13 | - Open the modal using a simple method: 14 | 15 | ``` objective-c 16 | - (void) openHelper { 17 | [self showPrivacyHelperForType:DBPrivacyTypeLocation]; 18 | } 19 | ``` 20 | - Use the other method to customize the controller or the action blocks: 21 | 22 | ``` objective-c 23 | - (void) openHelperToCustomize { 24 | [self showPrivacyHelperForType:DBPrivacyTypeLocation controller:^(DBPrivateHelperController *vc) { 25 | //customize the view controller to present 26 | } didPresent:^{ 27 | //customize the completion block of presentViewController:animated:completion: 28 | } didDismiss:^{ 29 | //customize the completion block of dismissViewControllerAnimated:completion: 30 | } useDefaultSettingPane:YES]; 31 | } 32 | ``` 33 | If ```useDefaultSettingPane:``` is set to YES, DBPrivacyHelper opens the default setting pane in iOS 8. Set NO if you want to see the ```DBPrivateHelperController``` with all iOS. 34 | 35 | Privacy settings types: 36 | - **DBPrivacyTypePhoto** 37 | - **DBPrivacyTypeCamera** 38 | - **DBPrivacyTypeLocation** 39 | - **DBPrivacyTypeHealth** 40 | - **DBPrivacyTypeHomeKit** 41 | - **DBPrivacyTypeMotionActivity** 42 | - **DBPrivacyTypeContacts** 43 | - **DBPrivacyTypeNotifications** 44 | - **DBPrivacyTypeReminders** 45 | - **DBPrivacyTypeCalendars** 46 | - **DBPrivacyTypeMicrophone** 47 | - **DBPrivacyTypeTwitter** 48 | - **DBPrivacyTypeFacebook** 49 | 50 | ### iOS Target 51 | 52 | 7.0 53 | 54 | ### Version 55 | 56 | 0.6.2 57 | 58 | ### Created by: 59 | 60 | [Daniele Bogo](http://bogodaniele.com) 61 | --------------------------------------------------------------------------------