[
  {
    "path": "Consent.podspec",
    "content": "Pod::Spec.new do |s|\n  s.name = 'ConsentKit'\n  s.version = '0.9'\n  s.summary = 'Keep track of GDPR consents in your app.'\n  s.description = <<-DESC\n   Keep track of GDPR consents in your app.\n DESC\n  s.module_name = \"ConsentKit\"\n  s.homepage = 'https://github.com/ralcr/Consent'\n  s.license = 'MIT'\n  s.authors = { 'Cristian Baluta' => 'cristi.baluta@gmail.com' }\n  s.ios.deployment_target = '10.0'\n  s.source = { :git => 'https://github.com/ralcr/Consent', :tag => s.version }\n  s.source_files = 'src/*.{h,swift}'\nend\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2018 Cristian Baluta\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# ConsentKit\nNote: This library only helps you collect consents for the services in your app, actually disabling those services is developer's job.\n\n![Screenshot](https://image.ibb.co/iuASQy/Screen_Shot_2018_05_28_at_23_07_10.png)\n\n## Usage\n### Define the services in your app\nNote: Some generic services can be found in ConsentKitServices\n\n```swift\nenum Services: String, ConsentKitItem {\n\n        case icloud = \"iCloud\"\n        case analytics = \"analytics\"\n\n        func title() -> String {\n            switch self {\n                case .icloud: return \"iCloud\"\n                case .analytics: return \"Google analytics\"\n            }\n        }\n        func description() -> String {\n            switch self {\n                case .icloud: return \"Wether to accept iCloud or not\"\n                case .analytics: return \"Google analytics\"\n            }\n        }\n        func alertMessage() -> String? {\n            switch self {\n                case .icloud: return nil\n                case .analytics: return \"I accept this app to store anonymous analytics in Google Analytics!\"\n            }\n        }\n}\n```\n\n### Instantiate the lib, preferably once in the AppDelegate, but can be anywhere and as many times as you like.\n\n```swift\nlet gdpr = ConsentKit()\n```\n\n### Check if you have missing consents\nIf yes, add the default ConsentKitViewController to handle all the switches for you.\n\n```swift\nif gdpr.needsReviewing([Services.icloud, Services.analytics]) {\n\n    let vc = ConsentKitViewController()\n    vc.items = [Services.icloud, Services.analytics, ConsentKitServices.location]\n    self.present(vc, animated: true)\n}\n```\n\n### Custom storage\nBy default ConsentKit keeps values in UserDefaults, but you can change that with the gdpr.dataSource property. Just assign or pass through constructor a class implementing the ConsentKitDataSource\n\n```swift\nlet gdpr = ConsentKit(dataSource: InMemoryDataSource())// InMemoryDataSource implements ConsentKitDataSource\n\nprotocol ConsentKitDataSource {\n    func isAccepted (_ item: ConsentKitItem) -> Bool\n    func isReviewed (_ item: ConsentKitItem) -> Bool\n    func setAccepted (_ value: Bool, for item: ConsentKitItem)\n    func reset (_ item: ConsentKitItem)// Optional\n}\n```\n\n## Contribution\nHelp me create a complete list of services that the developers can use.\nThanks.\n"
  },
  {
    "path": "demo-ios/Gdpr/AppDelegate.swift",
    "content": "//\n//  AppDelegate.swift\n//  Gdpr\n//\n//  Created by Cristian Baluta on 21/05/2018.\n//  Copyright © 2018 Cristian Baluta. All rights reserved.\n//\n\nimport UIKit\n\nenum Services: String, ConsentKitItem {\n\n    case icloud = \"iCloud\"\n    case analytics = \"analytics\"\n\n    func title() -> String {\n        switch self {\n        case .icloud: return \"iCloud\"\n        case .analytics: return \"Google analytics\"\n        }\n    }\n\n    func description() -> String {\n        switch self {\n        case .icloud: return \"Store data to the Apple's iCloud. This will allow the data to by synced across all your devices.\"\n        case .analytics: return \"Help developer understand how the app is used by sharing usage with Google analytics.\"\n        }\n    }\n\n    func alertMessage() -> String? {\n        switch self {\n        case .icloud: return nil\n        case .analytics: return nil\n        }\n    }\n}\n\nlet gdpr = ConsentKit()\n//let gdpr = ConsentKit(dataSource: InMemoryDataSource())\n\n@UIApplicationMain\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n\n    var window: UIWindow?\n\n    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {\n        // Override point for customization after application launch.\n        // For testing purposes we reset all values from previous run\n        gdpr.reset(Services.icloud)\n        gdpr.reset(Services.analytics)\n        gdpr.reset(ConsentKitServices.location)\n\n        return true\n    }\n}\n\n"
  },
  {
    "path": "demo-ios/Gdpr/Assets.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"60x60\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"60x60\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"76x76\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"76x76\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"83.5x83.5\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ios-marketing\",\n      \"size\" : \"1024x1024\",\n      \"scale\" : \"1x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "demo-ios/Gdpr/Assets.xcassets/Contents.json",
    "content": "{\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "demo-ios/Gdpr/Base.lproj/LaunchScreen.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"13122.16\" systemVersion=\"17A277\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\" initialViewController=\"01J-lp-oVM\">\n    <dependencies>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"13104.12\"/>\n        <capability name=\"Safe area layout guides\" minToolsVersion=\"9.0\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <scenes>\n        <!--View Controller-->\n        <scene sceneID=\"EHf-IW-A2E\">\n            <objects>\n                <viewController id=\"01J-lp-oVM\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"Ze5-6b-2t3\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <viewLayoutGuide key=\"safeArea\" id=\"6Tk-OE-BBY\"/>\n                    </view>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"iYj-Kq-Ea1\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"53\" y=\"375\"/>\n        </scene>\n    </scenes>\n</document>\n"
  },
  {
    "path": "demo-ios/Gdpr/Base.lproj/Main.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"14109\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\" initialViewController=\"LAz-b6-3ca\">\n    <device id=\"retina4_7\" orientation=\"portrait\">\n        <adaptation id=\"fullscreen\"/>\n    </device>\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"14088\"/>\n        <capability name=\"Safe area layout guides\" minToolsVersion=\"9.0\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <scenes>\n        <!--Navigation bar view-->\n        <scene sceneID=\"ikM-cg-FSJ\">\n            <objects>\n                <navigationController id=\"rAn-8a-pj6\" sceneMemberID=\"viewController\">\n                    <tabBarItem key=\"tabBarItem\" title=\"Navigation bar view\" id=\"VpN-hb-qYi\"/>\n                    <navigationBar key=\"navigationBar\" contentMode=\"scaleToFill\" insetsLayoutMarginsFromSafeArea=\"NO\" id=\"kZn-n3-9ci\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"20\" width=\"375\" height=\"44\"/>\n                        <autoresizingMask key=\"autoresizingMask\"/>\n                    </navigationBar>\n                    <connections>\n                        <segue destination=\"AAu-ag-sAO\" kind=\"relationship\" relationship=\"rootViewController\" id=\"xuh-MY-TNU\"/>\n                    </connections>\n                </navigationController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"rgg-IP-jt5\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-458\" y=\"257\"/>\n        </scene>\n        <!--Inline-->\n        <scene sceneID=\"9tQ-UH-Y3J\">\n            <objects>\n                <tableViewController id=\"JRJ-aa-STA\" customClass=\"TableViewController\" customModule=\"Gdpr\" customModuleProvider=\"target\" sceneMemberID=\"viewController\">\n                    <tableView key=\"view\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" alwaysBounceVertical=\"YES\" dataMode=\"prototypes\" style=\"plain\" separatorStyle=\"default\" rowHeight=\"-1\" estimatedRowHeight=\"-1\" sectionHeaderHeight=\"28\" sectionFooterHeight=\"28\" id=\"RvO-n1-z4v\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"genericGamma22GrayColorSpace\"/>\n                        <prototypes>\n                            <tableViewCell clipsSubviews=\"YES\" contentMode=\"scaleToFill\" preservesSuperviewLayoutMargins=\"YES\" selectionStyle=\"default\" indentationWidth=\"10\" id=\"2Oy-CL-TyF\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"28\" width=\"375\" height=\"44\"/>\n                                <autoresizingMask key=\"autoresizingMask\"/>\n                                <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" preservesSuperviewLayoutMargins=\"YES\" insetsLayoutMarginsFromSafeArea=\"NO\" tableViewCell=\"2Oy-CL-TyF\" id=\"WJn-vx-ATr\">\n                                    <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"43.5\"/>\n                                    <autoresizingMask key=\"autoresizingMask\"/>\n                                </tableViewCellContentView>\n                            </tableViewCell>\n                        </prototypes>\n                        <connections>\n                            <outlet property=\"dataSource\" destination=\"JRJ-aa-STA\" id=\"NWO-A1-6To\"/>\n                            <outlet property=\"delegate\" destination=\"JRJ-aa-STA\" id=\"dhr-6T-vtr\"/>\n                        </connections>\n                    </tableView>\n                    <tabBarItem key=\"tabBarItem\" title=\"Inline\" id=\"mrh-Qw-N7V\"/>\n                </tableViewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"CEM-0b-zLB\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-458\" y=\"998\"/>\n        </scene>\n        <!--My App-->\n        <scene sceneID=\"x2z-WN-oMX\">\n            <objects>\n                <viewController id=\"AAu-ag-sAO\" customClass=\"NavigationViewController\" customModule=\"Gdpr\" customModuleProvider=\"target\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"4gr-jN-rc1\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Label\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"8R6-qB-LUu\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"199\" width=\"375\" height=\"21\"/>\n                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                <nil key=\"textColor\"/>\n                                <nil key=\"highlightedColor\"/>\n                            </label>\n                            <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"gQa-IJ-dUC\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"260\" width=\"375\" height=\"30\"/>\n                                <state key=\"normal\" title=\"Review\"/>\n                                <connections>\n                                    <action selector=\"handleGdpr\" destination=\"AAu-ag-sAO\" eventType=\"touchUpInside\" id=\"N1t-g0-jhT\"/>\n                                    <action selector=\"handleGdpr\" destination=\"HQu-Jw-AKg\" eventType=\"touchUpInside\" id=\"xcP-K3-yzK\"/>\n                                </connections>\n                            </button>\n                        </subviews>\n                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"genericGamma22GrayColorSpace\"/>\n                        <constraints>\n                            <constraint firstItem=\"gQa-IJ-dUC\" firstAttribute=\"trailing\" secondItem=\"1lc-T6-JBk\" secondAttribute=\"trailing\" id=\"DTv-Kd-Vbx\"/>\n                            <constraint firstItem=\"gQa-IJ-dUC\" firstAttribute=\"top\" secondItem=\"8R6-qB-LUu\" secondAttribute=\"bottom\" constant=\"40\" id=\"GNx-wR-URw\"/>\n                            <constraint firstItem=\"8R6-qB-LUu\" firstAttribute=\"leading\" secondItem=\"1lc-T6-JBk\" secondAttribute=\"leading\" id=\"WAh-Ho-VES\"/>\n                            <constraint firstItem=\"8R6-qB-LUu\" firstAttribute=\"trailing\" secondItem=\"1lc-T6-JBk\" secondAttribute=\"trailing\" id=\"YvS-CQ-m5R\"/>\n                            <constraint firstItem=\"8R6-qB-LUu\" firstAttribute=\"top\" secondItem=\"1lc-T6-JBk\" secondAttribute=\"top\" constant=\"135\" id=\"j8z-Tb-glp\"/>\n                            <constraint firstItem=\"gQa-IJ-dUC\" firstAttribute=\"leading\" secondItem=\"1lc-T6-JBk\" secondAttribute=\"leading\" id=\"sFJ-W0-ybL\"/>\n                        </constraints>\n                        <viewLayoutGuide key=\"safeArea\" id=\"1lc-T6-JBk\"/>\n                    </view>\n                    <navigationItem key=\"navigationItem\" title=\"My App\" id=\"qGR-cq-uTG\"/>\n                    <connections>\n                        <outlet property=\"label\" destination=\"8R6-qB-LUu\" id=\"dW7-fx-Oz0\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"Kaq-Zs-eDZ\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"271\" y=\"257\"/>\n        </scene>\n        <!--Single view-->\n        <scene sceneID=\"eMF-ug-gER\">\n            <objects>\n                <viewController id=\"HQu-Jw-AKg\" customClass=\"SimpleViewController\" customModule=\"Gdpr\" customModuleProvider=\"target\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"8Cf-6l-0No\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Label\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"m98-s8-VAw\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"155\" width=\"375\" height=\"21\"/>\n                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                <nil key=\"textColor\"/>\n                                <nil key=\"highlightedColor\"/>\n                            </label>\n                            <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"UGX-v4-tK6\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"216\" width=\"375\" height=\"30\"/>\n                                <state key=\"normal\" title=\"Review\"/>\n                                <connections>\n                                    <action selector=\"handleGdpr\" destination=\"HQu-Jw-AKg\" eventType=\"touchUpInside\" id=\"ewQ-MA-v7x\"/>\n                                </connections>\n                            </button>\n                        </subviews>\n                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"genericGamma22GrayColorSpace\"/>\n                        <constraints>\n                            <constraint firstItem=\"cmY-2c-3J0\" firstAttribute=\"trailing\" secondItem=\"m98-s8-VAw\" secondAttribute=\"trailing\" id=\"IZH-aU-7uG\"/>\n                            <constraint firstItem=\"m98-s8-VAw\" firstAttribute=\"leading\" secondItem=\"cmY-2c-3J0\" secondAttribute=\"leading\" id=\"OWd-zY-LL2\"/>\n                            <constraint firstItem=\"UGX-v4-tK6\" firstAttribute=\"leading\" secondItem=\"cmY-2c-3J0\" secondAttribute=\"leading\" id=\"Z5l-mL-i9m\"/>\n                            <constraint firstItem=\"UGX-v4-tK6\" firstAttribute=\"top\" secondItem=\"m98-s8-VAw\" secondAttribute=\"bottom\" constant=\"40\" id=\"n5g-9B-XWb\"/>\n                            <constraint firstItem=\"cmY-2c-3J0\" firstAttribute=\"trailing\" secondItem=\"UGX-v4-tK6\" secondAttribute=\"trailing\" id=\"tq6-17-psV\"/>\n                            <constraint firstItem=\"m98-s8-VAw\" firstAttribute=\"top\" secondItem=\"cmY-2c-3J0\" secondAttribute=\"top\" constant=\"135\" id=\"y94-oO-nsR\"/>\n                        </constraints>\n                        <viewLayoutGuide key=\"safeArea\" id=\"cmY-2c-3J0\"/>\n                    </view>\n                    <tabBarItem key=\"tabBarItem\" title=\"Single view\" id=\"3ed-bw-ctx\"/>\n                    <connections>\n                        <outlet property=\"label\" destination=\"m98-s8-VAw\" id=\"eY8-2R-cfd\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"wXt-eb-dav\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-458\" y=\"-410\"/>\n        </scene>\n        <!--View Controller-->\n        <scene sceneID=\"tpU-XK-cGH\">\n            <objects>\n                <tabBarController id=\"LAz-b6-3ca\" customClass=\"ViewController\" customModule=\"Gdpr\" customModuleProvider=\"target\" sceneMemberID=\"viewController\">\n                    <tabBar key=\"tabBar\" contentMode=\"scaleToFill\" insetsLayoutMarginsFromSafeArea=\"NO\" id=\"FMm-YJ-ZLV\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"49\"/>\n                        <autoresizingMask key=\"autoresizingMask\"/>\n                        <color key=\"backgroundColor\" white=\"0.0\" alpha=\"0.0\" colorSpace=\"custom\" customColorSpace=\"genericGamma22GrayColorSpace\"/>\n                    </tabBar>\n                    <connections>\n                        <segue destination=\"HQu-Jw-AKg\" kind=\"relationship\" relationship=\"viewControllers\" id=\"nkn-KP-7mk\"/>\n                        <segue destination=\"rAn-8a-pj6\" kind=\"relationship\" relationship=\"viewControllers\" id=\"CjP-F1-Rny\"/>\n                        <segue destination=\"JRJ-aa-STA\" kind=\"relationship\" relationship=\"viewControllers\" id=\"5QK-tI-hkk\"/>\n                    </connections>\n                </tabBarController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"i27-h4-yUr\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-1411\" y=\"-77\"/>\n        </scene>\n    </scenes>\n</document>\n"
  },
  {
    "path": "demo-ios/Gdpr/InMemoryDataSource.swift",
    "content": "//\n//  InMemorydataSource.swift\n//  Gdpr\n//\n//  Created by Cristian Baluta on 23/05/2018.\n//  Copyright © 2018 Imagin soft. All rights reserved.\n//\n\nimport Foundation\n\nclass InMemoryDataSource: ConsentKitDataSource {\n    \n    private var dict = [String: Bool?]()\n    \n    func isAccepted (_ item: ConsentKitItem) -> Bool {\n        return dict[item.rawValue] == true\n    }\n    \n    func isReviewed (_ item: ConsentKitItem) -> Bool {\n        return dict[item.rawValue] != nil\n    }\n    \n    func setAccepted (_ value: Bool, for item: ConsentKitItem) {\n        dict[item.rawValue] = value\n    }\n}\n"
  },
  {
    "path": "demo-ios/Gdpr/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>$(DEVELOPMENT_LANGUAGE)</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>$(PRODUCT_NAME)</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>CFBundleVersion</key>\n\t<string>1</string>\n\t<key>LSRequiresIPhoneOS</key>\n\t<true/>\n\t<key>UILaunchStoryboardName</key>\n\t<string>LaunchScreen</string>\n\t<key>UIMainStoryboardFile</key>\n\t<string>Main</string>\n\t<key>UIRequiredDeviceCapabilities</key>\n\t<array>\n\t\t<string>armv7</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations~ipad</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationPortraitUpsideDown</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "demo-ios/Gdpr/NavigationViewController.swift",
    "content": "//\n//  NavigationViewController.swift\n//  Gdpr\n//\n//  Created by Cristian Baluta on 23/05/2018.\n//  Copyright © 2018 Imagin soft. All rights reserved.\n//\n\nimport UIKit\n\nclass NavigationViewController: UIViewController {\n    \n    @IBOutlet var label: UILabel!\n    \n    override func viewDidAppear(_ animated: Bool) {\n        super.viewDidAppear(animated)\n        \n        if gdpr.needsReviewing([Services.icloud, Services.analytics, ConsentKitServices.location]) {\n            label.text = \"Gdpr needs reviewing!\"\n        } else {\n            label.text = \"All gdpr items already reviewed\"\n        }\n    }\n    \n    @IBAction func handleGdpr() {\n        \n        let vc = ConsentKitViewController()\n        vc.items = [Services.icloud, Services.analytics, ConsentKitServices.location]\n        vc.didFinishReview = {\n            self.navigationController?.popViewController(animated: true)\n        }\n        self.navigationController?.pushViewController(vc, animated: true)\n    }\n}\n"
  },
  {
    "path": "demo-ios/Gdpr/SimpleViewController.swift",
    "content": "//\n//  SimpleViewController.swift\n//  Gdpr\n//\n//  Created by Cristian Baluta on 22/05/2018.\n//  Copyright © 2018 Imagin soft. All rights reserved.\n//\n\nimport UIKit\n\nclass SimpleViewController: UIViewController {\n    \n    @IBOutlet var label: UILabel!\n    \n    override func viewDidAppear(_ animated: Bool) {\n        super.viewDidAppear(animated)\n        \n        if gdpr.needsReviewing([Services.icloud, Services.analytics, ConsentKitServices.location]) {\n            label.text = \"Gdpr needs reviewing!\"\n        } else {\n            label.text = \"All gdpr items already reviewed\"\n        }\n    }\n    \n    @IBAction func handleGdpr() {\n        \n        let vc = ConsentKitViewController()\n        vc.items = [Services.icloud, Services.analytics, ConsentKitServices.location]\n        self.present(vc, animated: true)\n    }\n}\n"
  },
  {
    "path": "demo-ios/Gdpr/TableViewController.swift",
    "content": "//\n//  TableViewController.swift\n//  Gdpr\n//\n//  Created by Cristian Baluta on 04/06/2018.\n//  Copyright © 2018 Imagin soft. All rights reserved.\n//\n\nimport UIKit\n\nclass TableViewController: UITableViewController {\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n\n        // Uncomment the following line to preserve selection between presentations\n        // self.clearsSelectionOnViewWillAppear = false\n    }\n\n    // MARK: - Table view data source\n\n    override func numberOfSections(in tableView: UITableView) -> Int {\n        return 3\n    }\n\n    override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {\n        // #warning Incomplete implementation, return the number of rows\n        return section == 1 ? 1 : 2\n    }\n\n    override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {\n\n        if indexPath.section == 1 {\n            let cell = UITableViewCell(style: .default, reuseIdentifier: nil)\n            return cell\n        } else {\n            let cell = UITableViewCell(style: .default, reuseIdentifier: nil)\n            cell.textLabel?.text = \"IndePath \\(indexPath)\"\n            return cell\n        }\n    }\n\n    override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {\n        switch section {\n        case 0:\n            return \"Section 1\"\n        case 1:\n            return \"GDPR section\"\n        default:\n            return \"Section 3\"\n        }\n    }\n}\n"
  },
  {
    "path": "demo-ios/Gdpr/ViewController.swift",
    "content": "//\n//  ViewController.swift\n//  Gdpr\n//\n//  Created by Cristian Baluta on 21/05/2018.\n//  Copyright © 2018 Cristian Baluta. All rights reserved.\n//\n\nimport UIKit\n\nclass ViewController: UITabBarController {\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n    }\n}\n"
  },
  {
    "path": "demo-ios/Gdpr.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 50;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t283DB05C20BADECD00A8BC14 /* ConsentKitCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 283DB05B20BADECD00A8BC14 /* ConsentKitCell.xib */; };\n\t\t283DB05E20BC77D200A8BC14 /* ConsentKitCellProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 283DB05D20BC77D200A8BC14 /* ConsentKitCellProtocol.swift */; };\n\t\t2845157D20B3528B009F3EE1 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2845157C20B3528B009F3EE1 /* AppDelegate.swift */; };\n\t\t2845157F20B3528B009F3EE1 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2845157E20B3528B009F3EE1 /* ViewController.swift */; };\n\t\t2845158220B3528B009F3EE1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2845158020B3528B009F3EE1 /* Main.storyboard */; };\n\t\t2845158420B3528F009F3EE1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2845158320B3528F009F3EE1 /* Assets.xcassets */; };\n\t\t2845158720B3528F009F3EE1 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2845158520B3528F009F3EE1 /* LaunchScreen.storyboard */; };\n\t\t2845159320B352F4009F3EE1 /* CloudKitViewControllerHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2845158F20B352F4009F3EE1 /* CloudKitViewControllerHeader.swift */; };\n\t\t2845159420B352F4009F3EE1 /* ConsentKitCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2845159020B352F4009F3EE1 /* ConsentKitCell.swift */; };\n\t\t2845159520B352F4009F3EE1 /* ConsentKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2845159120B352F4009F3EE1 /* ConsentKit.swift */; };\n\t\t2845159620B352F4009F3EE1 /* ConsentKitViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2845159220B352F4009F3EE1 /* ConsentKitViewController.swift */; };\n\t\t2845159820B4BB95009F3EE1 /* SimpleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2845159720B4BB95009F3EE1 /* SimpleViewController.swift */; };\n\t\t2845159A20B4BDBC009F3EE1 /* NavigationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2845159920B4BDBC009F3EE1 /* NavigationViewController.swift */; };\n\t\t2845159C20B5EA1C009F3EE1 /* InMemoryDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2845159B20B5EA1C009F3EE1 /* InMemoryDataSource.swift */; };\n\t\t2845159E20B5EDD6009F3EE1 /* ConsentKitUserDefaultsDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2845159D20B5EDD6009F3EE1 /* ConsentKitUserDefaultsDataSource.swift */; };\n\t\t284515A020B5F738009F3EE1 /* ConsentKitServices.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2845159F20B5F738009F3EE1 /* ConsentKitServices.swift */; };\n\t\t5684412C20C5A4DB00D9A471 /* TableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5684412B20C5A4DB00D9A471 /* TableViewController.swift */; };\n\t\t5684413220C6D62E00D9A471 /* ConsentKitTableViewDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5684413120C6D62E00D9A471 /* ConsentKitTableViewDataSource.swift */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXFileReference section */\n\t\t283DB05B20BADECD00A8BC14 /* ConsentKitCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ConsentKitCell.xib; sourceTree = \"<group>\"; };\n\t\t283DB05D20BC77D200A8BC14 /* ConsentKitCellProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConsentKitCellProtocol.swift; sourceTree = \"<group>\"; };\n\t\t2845157920B3528B009F3EE1 /* Gdpr.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Gdpr.app; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t2845157C20B3528B009F3EE1 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = \"<group>\"; };\n\t\t2845157E20B3528B009F3EE1 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = \"<group>\"; };\n\t\t2845158120B3528B009F3EE1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = \"<group>\"; };\n\t\t2845158320B3528F009F3EE1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = \"<group>\"; };\n\t\t2845158620B3528F009F3EE1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = \"<group>\"; };\n\t\t2845158820B3528F009F3EE1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\t2845158F20B352F4009F3EE1 /* CloudKitViewControllerHeader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CloudKitViewControllerHeader.swift; sourceTree = \"<group>\"; };\n\t\t2845159020B352F4009F3EE1 /* ConsentKitCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConsentKitCell.swift; sourceTree = \"<group>\"; };\n\t\t2845159120B352F4009F3EE1 /* ConsentKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConsentKit.swift; sourceTree = \"<group>\"; };\n\t\t2845159220B352F4009F3EE1 /* ConsentKitViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConsentKitViewController.swift; sourceTree = \"<group>\"; };\n\t\t2845159720B4BB95009F3EE1 /* SimpleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SimpleViewController.swift; sourceTree = \"<group>\"; };\n\t\t2845159920B4BDBC009F3EE1 /* NavigationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationViewController.swift; sourceTree = \"<group>\"; };\n\t\t2845159B20B5EA1C009F3EE1 /* InMemoryDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InMemoryDataSource.swift; sourceTree = \"<group>\"; };\n\t\t2845159D20B5EDD6009F3EE1 /* ConsentKitUserDefaultsDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConsentKitUserDefaultsDataSource.swift; sourceTree = \"<group>\"; };\n\t\t2845159F20B5F738009F3EE1 /* ConsentKitServices.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConsentKitServices.swift; sourceTree = \"<group>\"; };\n\t\t5684412B20C5A4DB00D9A471 /* TableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableViewController.swift; sourceTree = \"<group>\"; };\n\t\t5684413120C6D62E00D9A471 /* ConsentKitTableViewDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConsentKitTableViewDataSource.swift; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t2845157620B3528B009F3EE1 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t2845157020B3528B009F3EE1 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t2845157B20B3528B009F3EE1 /* Gdpr */,\n\t\t\t\t2845157A20B3528B009F3EE1 /* Products */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t2845157A20B3528B009F3EE1 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t2845157920B3528B009F3EE1 /* Gdpr.app */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t2845157B20B3528B009F3EE1 /* Gdpr */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t2845157C20B3528B009F3EE1 /* AppDelegate.swift */,\n\t\t\t\t2845157E20B3528B009F3EE1 /* ViewController.swift */,\n\t\t\t\t2845159720B4BB95009F3EE1 /* SimpleViewController.swift */,\n\t\t\t\t2845159920B4BDBC009F3EE1 /* NavigationViewController.swift */,\n\t\t\t\t5684412B20C5A4DB00D9A471 /* TableViewController.swift */,\n\t\t\t\t2845159B20B5EA1C009F3EE1 /* InMemoryDataSource.swift */,\n\t\t\t\t2845158020B3528B009F3EE1 /* Main.storyboard */,\n\t\t\t\t2845158320B3528F009F3EE1 /* Assets.xcassets */,\n\t\t\t\t2845158520B3528F009F3EE1 /* LaunchScreen.storyboard */,\n\t\t\t\t2845158820B3528F009F3EE1 /* Info.plist */,\n\t\t\t\t2845158E20B352F4009F3EE1 /* src */,\n\t\t\t);\n\t\t\tpath = Gdpr;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t2845158E20B352F4009F3EE1 /* src */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t2845159120B352F4009F3EE1 /* ConsentKit.swift */,\n\t\t\t\t2845159F20B5F738009F3EE1 /* ConsentKitServices.swift */,\n\t\t\t\t2845159D20B5EDD6009F3EE1 /* ConsentKitUserDefaultsDataSource.swift */,\n\t\t\t\t2845159220B352F4009F3EE1 /* ConsentKitViewController.swift */,\n\t\t\t\t5684413120C6D62E00D9A471 /* ConsentKitTableViewDataSource.swift */,\n\t\t\t\t283DB05D20BC77D200A8BC14 /* ConsentKitCellProtocol.swift */,\n\t\t\t\t2845159020B352F4009F3EE1 /* ConsentKitCell.swift */,\n\t\t\t\t283DB05B20BADECD00A8BC14 /* ConsentKitCell.xib */,\n\t\t\t\t2845158F20B352F4009F3EE1 /* CloudKitViewControllerHeader.swift */,\n\t\t\t);\n\t\t\tname = src;\n\t\t\tpath = ../../src;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t2845157820B3528B009F3EE1 /* Gdpr */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 2845158B20B3528F009F3EE1 /* Build configuration list for PBXNativeTarget \"Gdpr\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t2845157520B3528B009F3EE1 /* Sources */,\n\t\t\t\t2845157620B3528B009F3EE1 /* Frameworks */,\n\t\t\t\t2845157720B3528B009F3EE1 /* Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = Gdpr;\n\t\t\tproductName = Gdpr;\n\t\t\tproductReference = 2845157920B3528B009F3EE1 /* Gdpr.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t2845157120B3528B009F3EE1 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastSwiftUpdateCheck = 0930;\n\t\t\t\tLastUpgradeCheck = 0930;\n\t\t\t\tORGANIZATIONNAME = \"Imagin soft\";\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t2845157820B3528B009F3EE1 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 9.3;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 2845157420B3528B009F3EE1 /* Build configuration list for PBXProject \"Gdpr\" */;\n\t\t\tcompatibilityVersion = \"Xcode 9.3\";\n\t\t\tdevelopmentRegion = en;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t\tBase,\n\t\t\t);\n\t\t\tmainGroup = 2845157020B3528B009F3EE1;\n\t\t\tproductRefGroup = 2845157A20B3528B009F3EE1 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t2845157820B3528B009F3EE1 /* Gdpr */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t2845157720B3528B009F3EE1 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t2845158720B3528F009F3EE1 /* LaunchScreen.storyboard in Resources */,\n\t\t\t\t283DB05C20BADECD00A8BC14 /* ConsentKitCell.xib in Resources */,\n\t\t\t\t2845158420B3528F009F3EE1 /* Assets.xcassets in Resources */,\n\t\t\t\t2845158220B3528B009F3EE1 /* Main.storyboard in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t2845157520B3528B009F3EE1 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t2845159A20B4BDBC009F3EE1 /* NavigationViewController.swift in Sources */,\n\t\t\t\t2845159E20B5EDD6009F3EE1 /* ConsentKitUserDefaultsDataSource.swift in Sources */,\n\t\t\t\t5684412C20C5A4DB00D9A471 /* TableViewController.swift in Sources */,\n\t\t\t\t284515A020B5F738009F3EE1 /* ConsentKitServices.swift in Sources */,\n\t\t\t\t2845157F20B3528B009F3EE1 /* ViewController.swift in Sources */,\n\t\t\t\t2845159C20B5EA1C009F3EE1 /* InMemoryDataSource.swift in Sources */,\n\t\t\t\t2845159420B352F4009F3EE1 /* ConsentKitCell.swift in Sources */,\n\t\t\t\t2845159620B352F4009F3EE1 /* ConsentKitViewController.swift in Sources */,\n\t\t\t\t5684413220C6D62E00D9A471 /* ConsentKitTableViewDataSource.swift in Sources */,\n\t\t\t\t283DB05E20BC77D200A8BC14 /* ConsentKitCellProtocol.swift in Sources */,\n\t\t\t\t2845157D20B3528B009F3EE1 /* AppDelegate.swift in Sources */,\n\t\t\t\t2845159320B352F4009F3EE1 /* CloudKitViewControllerHeader.swift in Sources */,\n\t\t\t\t2845159820B4BB95009F3EE1 /* SimpleViewController.swift in Sources */,\n\t\t\t\t2845159520B352F4009F3EE1 /* ConsentKit.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXVariantGroup section */\n\t\t2845158020B3528B009F3EE1 /* Main.storyboard */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t2845158120B3528B009F3EE1 /* Base */,\n\t\t\t);\n\t\t\tname = Main.storyboard;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t2845158520B3528F009F3EE1 /* LaunchScreen.storyboard */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t2845158620B3528F009F3EE1 /* Base */,\n\t\t\t);\n\t\t\tname = LaunchScreen.storyboard;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXVariantGroup section */\n\n/* Begin XCBuildConfiguration section */\n\t\t2845158920B3528F009F3EE1 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_WEAK = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 11.3;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t2845158A20B3528F009F3EE1 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_WEAK = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 11.3;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_COMPILATION_MODE = wholemodule;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-O\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t2845158C20B3528F009F3EE1 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tDEVELOPMENT_TEAM = 5NHDC5EV44;\n\t\t\t\tINFOPLIST_FILE = Gdpr/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = ro.imagin.Gdpr;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 4.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t2845158D20B3528F009F3EE1 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tDEVELOPMENT_TEAM = 5NHDC5EV44;\n\t\t\t\tINFOPLIST_FILE = Gdpr/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = ro.imagin.Gdpr;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 4.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t2845157420B3528B009F3EE1 /* Build configuration list for PBXProject \"Gdpr\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t2845158920B3528F009F3EE1 /* Debug */,\n\t\t\t\t2845158A20B3528F009F3EE1 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t2845158B20B3528F009F3EE1 /* Build configuration list for PBXNativeTarget \"Gdpr\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t2845158C20B3528F009F3EE1 /* Debug */,\n\t\t\t\t2845158D20B3528F009F3EE1 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 2845157120B3528B009F3EE1 /* Project object */;\n}\n"
  },
  {
    "path": "demo-ios/Gdpr.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:Gdpr.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "demo-ios/Gdpr.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "demo-ios/Gdpr.xcodeproj/xcuserdata/cristi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Bucket\n   type = \"1\"\n   version = \"2.0\">\n</Bucket>\n"
  },
  {
    "path": "demo-ios/Gdpr.xcodeproj/xcuserdata/cristi.xcuserdatad/xcschemes/xcschememanagement.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>SchemeUserState</key>\n\t<dict>\n\t\t<key>Gdpr.xcscheme</key>\n\t\t<dict>\n\t\t\t<key>orderHint</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t</dict>\n</dict>\n</plist>\n"
  },
  {
    "path": "demo-ios/Gdpr.xcodeproj/xcuserdata/cristianbaluta.xcuserdatad/xcschemes/xcschememanagement.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>SchemeUserState</key>\n\t<dict>\n\t\t<key>Gdpr.xcscheme</key>\n\t\t<dict>\n\t\t\t<key>orderHint</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t</dict>\n</dict>\n</plist>\n"
  },
  {
    "path": "src/CloudKitViewControllerHeader.swift",
    "content": "//\n//  CloudKitViewControllerHeader.swift\n//\n//  Created by Cristian Baluta on 21/05/2018.\n//  Copyright © 2018 Cristian Baluta. All rights reserved.\n//\n\nimport UIKit\n\nclass CloudKitViewControllerHeader: UIView {\n    \n    var didDone: (() -> Void)?\n    private let padding = CGFloat(16)\n    \n    override init(frame: CGRect) {\n        super.init(frame: frame)\n        \n        self.backgroundColor = UIColor(white: 0.9, alpha: 1.0)\n        \n        let label = UILabel()\n        label.text = \"Review services!\"\n        label.font = UIFont.boldSystemFont(ofSize: 16)\n        label.sizeToFit()\n        label.center = CGPoint(x: label.frame.size.width/2 + padding, y: 30)\n        self.addSubview(label)\n        \n        let button = UIButton()\n        button.setTitle(\"Done\", for: .normal)\n        button.setTitleColor(UIColor.orange, for: .normal)\n        button.addTarget(self, action: #selector(handleButton), for: .touchUpInside)\n        button.sizeToFit()\n        button.center = CGPoint(x: frame.size.width - button.frame.size.width/2 - padding, y: 30)\n        self.addSubview(button)\n    }\n    \n    required init?(coder aDecoder: NSCoder) {\n        fatalError(\"init(coder:) has not been implemented\")\n    }\n    \n    @objc func handleButton() {\n        didDone?()\n    }\n}\n"
  },
  {
    "path": "src/ConsentKit.swift",
    "content": "//\n//  ConsentKit.swift\n//\n//  Created by Cristian Baluta on 21/05/2018.\n//  Copyright © 2018 Imagin soft. All rights reserved.\n//\n\nimport Foundation\n\nprotocol ConsentKitItem {\n    var rawValue: String {get}\n    /// Title used in the cell and alert\n    func title() -> String\n    /// Description used in the cell\n    func description() -> String\n    /// Message displayed in an alert when the switch is turned on.\n    func alertMessage() -> String?\n}\n\nprotocol ConsentKitDataSource {\n    /// Returns if the item has a value of true\n    func isAccepted (_ item: ConsentKitItem) -> Bool\n    /// Returns if the item's value is different than nil, which means it was reviewed\n    func isReviewed (_ item: ConsentKitItem) -> Bool\n    /// Set a value for the item\n    func setAccepted (_ value: Bool, for item: ConsentKitItem)\n    /// Resets the value of an item, which means that isReviewed will return false after that\n    func reset (_ item: ConsentKitItem)\n}\n\nextension ConsentKitDataSource {\n    func reset (_ item: ConsentKitItem) {\n        // This is a empty implementation to allow this method to be optional\n    }\n}\n\nclass ConsentKit {\n    \n    /// Assign a custom dataSource. By default UserDefaults is used and each key is prefixed with \"ConsentKit-\"\n    var dataSource: ConsentKitDataSource = ConsentKitUserDefaultsDataSource()\n    \n    convenience init (dataSource: ConsentKitDataSource) {\n        self.init()\n        self.dataSource = dataSource\n    }\n    \n    /// Returns if there's any value that was not reviewed\n    /// Used to check if the ConsentKitViewController should be presented or not\n    /// This will also be useful to present the controller if any new service added later in the app needs reviewing\n    func needsReviewing(_ items: [ConsentKitItem]) -> Bool {\n        for item in items {\n            if !isReviewed(item) {\n                return true\n            }\n        }\n        return false\n    }\n}\n\nextension ConsentKit: ConsentKitDataSource {\n    \n    func isAccepted (_ item: ConsentKitItem) -> Bool {\n        return dataSource.isAccepted(item)\n    }\n\n    func isReviewed (_ item: ConsentKitItem) -> Bool {\n        return dataSource.isReviewed(item)\n    }\n\n    func setAccepted (_ value: Bool, for item: ConsentKitItem) {\n        dataSource.setAccepted(value, for: item)\n    }\n    \n    func reset (_ item: ConsentKitItem) {\n        dataSource.reset(item)\n    }\n}\n"
  },
  {
    "path": "src/ConsentKitCell.swift",
    "content": "//\n//  ConsentKitCell.swift\n//\n//  Created by Cristian Baluta on 21/05/2018.\n//  Copyright © 2018 Cristian Baluta. All rights reserved.\n//\n\nimport UIKit\n\nclass ConsentKitCell: UITableViewCell, ConsentKitCellProtocol {\n\n    @IBOutlet private var titleLabel: UILabel!\n    @IBOutlet private var subtitleLabel: UILabel!\n    @IBOutlet private var switchButton: UISwitch!\n    \n    var title: String = \"\" {\n        didSet {\n            titleLabel.text = title\n        }\n    }\n    var subtitle: String = \"\" {\n        didSet {\n            subtitleLabel.text = subtitle\n        }\n    }\n    var value: Bool = false {\n        didSet {\n            switchButton.isOn = value\n        }\n    }\n    var valueDidChange: ((Bool) -> Void)?\n\n    override func awakeFromNib() {\n        super.awakeFromNib()\n        switchButton.onTintColor = UIColor.orange\n    }\n\n    static func instantiateFromXib() -> ConsentKitCell {\n        let arrNib: Array = Bundle.main.loadNibNamed(\"ConsentKitCell\", owner: self, options: nil)!\n        return arrNib.first as! ConsentKitCell\n    }\n\n    @IBAction func switchChanged(_ sender: UISwitch) {\n        valueDidChange?(sender.isOn)\n    }\n}\n"
  },
  {
    "path": "src/ConsentKitCell.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" version=\"3.0\" toolsVersion=\"14109\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\">\n    <device id=\"retina4_7\" orientation=\"portrait\">\n        <adaptation id=\"fullscreen\"/>\n    </device>\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"14088\"/>\n        <capability name=\"Constraints to layout margins\" minToolsVersion=\"6.0\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <objects>\n        <placeholder placeholderIdentifier=\"IBFilesOwner\" id=\"-1\" userLabel=\"File's Owner\"/>\n        <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"-2\" customClass=\"UIResponder\"/>\n        <tableViewCell clipsSubviews=\"YES\" contentMode=\"scaleToFill\" preservesSuperviewLayoutMargins=\"YES\" selectionStyle=\"default\" indentationWidth=\"10\" id=\"tYq-AS-pci\" customClass=\"ConsentKitCell\" customModule=\"Gdpr\" customModuleProvider=\"target\">\n            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"132\"/>\n            <autoresizingMask key=\"autoresizingMask\"/>\n            <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" preservesSuperviewLayoutMargins=\"YES\" insetsLayoutMarginsFromSafeArea=\"NO\" tableViewCell=\"tYq-AS-pci\" id=\"S6h-hV-QJN\">\n                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"131.5\"/>\n                <autoresizingMask key=\"autoresizingMask\"/>\n                <subviews>\n                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Label\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" numberOfLines=\"0\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"cxL-hF-Ajw\">\n                        <rect key=\"frame\" x=\"30\" y=\"30\" width=\"243\" height=\"20.5\"/>\n                        <constraints>\n                            <constraint firstAttribute=\"height\" relation=\"greaterThanOrEqual\" constant=\"20\" id=\"mCd-Al-Lwa\"/>\n                        </constraints>\n                        <fontDescription key=\"fontDescription\" type=\"system\" weight=\"black\" pointSize=\"17\"/>\n                        <nil key=\"textColor\"/>\n                        <nil key=\"highlightedColor\"/>\n                    </label>\n                    <switch opaque=\"NO\" contentMode=\"scaleToFill\" horizontalHuggingPriority=\"750\" verticalHuggingPriority=\"750\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" on=\"YES\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Ipj-VB-gT8\">\n                        <rect key=\"frame\" x=\"293\" y=\"30\" width=\"51\" height=\"31\"/>\n                        <connections>\n                            <action selector=\"switchChanged:\" destination=\"tYq-AS-pci\" eventType=\"valueChanged\" id=\"B28-by-HrB\"/>\n                        </connections>\n                    </switch>\n                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Label\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" numberOfLines=\"0\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"6vU-wc-8bW\">\n                        <rect key=\"frame\" x=\"30\" y=\"70.5\" width=\"243\" height=\"20.5\"/>\n                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                        <nil key=\"textColor\"/>\n                        <nil key=\"highlightedColor\"/>\n                    </label>\n                </subviews>\n                <constraints>\n                    <constraint firstAttribute=\"bottomMargin\" secondItem=\"6vU-wc-8bW\" secondAttribute=\"bottom\" constant=\"30\" id=\"3Vr-oc-nL4\"/>\n                    <constraint firstItem=\"cxL-hF-Ajw\" firstAttribute=\"top\" secondItem=\"S6h-hV-QJN\" secondAttribute=\"top\" constant=\"30\" id=\"4Tb-ZF-9DJ\"/>\n                    <constraint firstItem=\"Ipj-VB-gT8\" firstAttribute=\"leading\" secondItem=\"cxL-hF-Ajw\" secondAttribute=\"trailing\" constant=\"20\" id=\"8hV-Hy-gHv\"/>\n                    <constraint firstItem=\"Ipj-VB-gT8\" firstAttribute=\"top\" secondItem=\"S6h-hV-QJN\" secondAttribute=\"top\" constant=\"30\" id=\"9Vi-6d-mDa\"/>\n                    <constraint firstAttribute=\"trailing\" secondItem=\"Ipj-VB-gT8\" secondAttribute=\"trailing\" constant=\"33\" id=\"Prx-29-rl3\"/>\n                    <constraint firstItem=\"6vU-wc-8bW\" firstAttribute=\"top\" secondItem=\"cxL-hF-Ajw\" secondAttribute=\"bottom\" constant=\"20\" id=\"U94-iV-0Kt\"/>\n                    <constraint firstItem=\"6vU-wc-8bW\" firstAttribute=\"trailing\" secondItem=\"cxL-hF-Ajw\" secondAttribute=\"trailing\" id=\"dtP-Xq-YWf\"/>\n                    <constraint firstItem=\"cxL-hF-Ajw\" firstAttribute=\"leading\" secondItem=\"S6h-hV-QJN\" secondAttribute=\"leading\" constant=\"30\" id=\"sjN-2V-Zsd\"/>\n                    <constraint firstItem=\"6vU-wc-8bW\" firstAttribute=\"leading\" secondItem=\"cxL-hF-Ajw\" secondAttribute=\"leading\" id=\"xU8-fk-wP4\"/>\n                </constraints>\n            </tableViewCellContentView>\n            <connections>\n                <outlet property=\"subtitleLabel\" destination=\"6vU-wc-8bW\" id=\"Rdm-Lx-G6h\"/>\n                <outlet property=\"switchButton\" destination=\"Ipj-VB-gT8\" id=\"nHc-3r-shJ\"/>\n                <outlet property=\"titleLabel\" destination=\"cxL-hF-Ajw\" id=\"cNa-IU-8V6\"/>\n            </connections>\n            <point key=\"canvasLocation\" x=\"60.5\" y=\"-547\"/>\n        </tableViewCell>\n    </objects>\n</document>\n"
  },
  {
    "path": "src/ConsentKitCellProtocol.swift",
    "content": "//\n//  ConsentKitCellProtocol.swift\n//\n//  Created by Cristian Baluta on 28/05/2018.\n//  Copyright © 2018 Imagin soft. All rights reserved.\n//\n\nimport Foundation\n\nprotocol ConsentKitCellProtocol {\n    var title: String {get set}\n    var subtitle: String {get set}\n    var value: Bool {get set}\n    var valueDidChange: ((Bool) -> Void)? {get set}\n}\n"
  },
  {
    "path": "src/ConsentKitServices.swift",
    "content": "//\n//  ConsentKitServices.swift\n//\n//  Created by Cristian Baluta on 23/05/2018.\n//  Copyright © 2018 Imagin soft. All rights reserved.\n//\n\nimport Foundation\n\nenum ConsentKitServices: String, ConsentKitItem {\n    \n    case icloud = \"ck-icloud\"\n    case analytics = \"ck-analytics\"\n    case location = \"ck-location\"\n    \n    func title() -> String {\n        switch self {\n        case .icloud: return \"iCloud\"\n        case .analytics: return \"Google analytics\"\n        case .location: return \"Location\"\n        }\n    }\n    \n    func description() -> String {\n        switch self {\n        case .icloud: return \"Store data to the Apple's iCloud. This will allow the data to by synced across all your devices.\"\n        case .analytics: return \"Help developer understand how the app is used by sharing usage with Google analytics.\"\n        case .location: return \"Store location on server\"\n        }\n    }\n    \n    func alertMessage() -> String? {\n        switch self {\n        case .icloud: return \"I accept that this app will store my data in the Apple's iCloud for the purpose of syncing it across multiple devices and backup\"\n        case .analytics: return \"I accept that this app will store anonymous usage data in Google analytics for the purpose of improving the app\"\n        case .location: return \"I accept to store my location on the server\"\n        }\n    }\n}\n"
  },
  {
    "path": "src/ConsentKitTableViewDataSource.swift",
    "content": "//\n//  ConsentKitTableViewDataSource.swift\n//  Gdpr\n//\n//  Created by Cristian Baluta on 05/06/2018.\n//  Copyright © 2018 Imagin soft. All rights reserved.\n//\n\nimport UIKit\n\nclass ConsentKitTableViewDataSource: NSObject, UITableViewDelegate, UITableViewDataSource {\n\n    var items: [ConsentKitItem] = []\n\n    func numberOfSections(in tableView: UITableView) -> Int {\n        return 1\n    }\n\n    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {\n        return items.count\n    }\n\n    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {\n\n        let item = items[indexPath.row]\n        var cell: ConsentKitCellProtocol = ConsentKitCell.instantiateFromXib()\n        cell.title = item.title()\n        cell.subtitle = item.description()\n        cell.value = gdpr.isAccepted(item)\n        cell.valueDidChange = { isOn in\n            self.item(item, didChangeValue: isOn, in: cell)\n        }\n\n        return cell as! ConsentKitCell\n    }\n\n    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {\n        tableView.deselectRow(at: indexPath, animated: true)\n    }\n\n    func item(_ item: ConsentKitItem, didChangeValue value: Bool, in cell: ConsentKitCellProtocol) {\n\n        if value {\n            guard let message = item.alertMessage() else {\n                self.gdpr.setAccepted(true, for: item)\n                self.didAccept?(item)\n                return\n            }\n            let alert = UIAlertController(title: item.title(), message: message, preferredStyle: .alert)\n            alert.addAction(\n                UIAlertAction(title: \"Accept\", style: .default, handler: { _ in\n                    self.gdpr.setAccepted(true, for: item)\n                    self.didAccept?(item)\n                })\n            )\n            alert.addAction(\n                UIAlertAction(title: \"Decline\", style: .cancel, handler: { _ in\n                    var cell = cell\n                    cell.value = false\n                    self.gdpr.setAccepted(false, for: item)\n                    self.didReject?(item)\n                })\n            )\n            self.present(alert, animated: true, completion: nil)\n        } else {\n            self.gdpr.setAccepted(false, for: item)\n            didReject?(item)\n        }\n    }\n}\n"
  },
  {
    "path": "src/ConsentKitUserDefaultsDataSource.swift",
    "content": "//\n//  ConsentKitUserDefaultsDataSource.swift\n//\n//  Created by Cristian Baluta on 23/05/2018.\n//  Copyright © 2018 Imagin soft. All rights reserved.\n//\n\nimport Foundation\n\nclass ConsentKitUserDefaultsDataSource {\n    \n    fileprivate let prefix = \"ConsentKit-\"\n    fileprivate let userDefaults = UserDefaults.standard\n    \n    \n    fileprivate func get (_ key: String) -> Any? {\n        return userDefaults.object(forKey: prefix + key)\n    }\n    \n    fileprivate func set (_ value: Bool?, forKey key: String) {\n        if let v = value {\n            userDefaults.set(v, forKey: prefix + key)\n        } else {\n            userDefaults.removeObject(forKey: prefix + key)\n        }\n        userDefaults.synchronize()\n    }\n}\n\nextension ConsentKitUserDefaultsDataSource: ConsentKitDataSource {\n    \n    func isAccepted (_ item: ConsentKitItem) -> Bool {\n        return (get(item.rawValue) as? Bool) == true\n    }\n    \n    func isReviewed (_ item: ConsentKitItem) -> Bool {\n        return get(item.rawValue) != nil\n    }\n    \n    func setAccepted (_ value: Bool, for item: ConsentKitItem) {\n        set(value, forKey: item.rawValue)\n    }\n    \n    func reset (_ item: ConsentKitItem) {\n        set(nil, forKey: item.rawValue)\n    }\n}\n"
  },
  {
    "path": "src/ConsentKitViewController.swift",
    "content": "//\n//  ConsentKitViewController.swift\n//\n//  Created by Cristian Baluta on 21/05/2018.\n//  Copyright © 2018 Cristian Baluta. All rights reserved.\n//\n\nimport UIKit\n\nclass ConsentKitViewController: UITableViewController {\n\n    var didAccept: ((ConsentKitItem) -> Void)?\n    var didReject: ((ConsentKitItem) -> Void)?\n    var didFinishReview: (() -> Void)?\n    var items: [ConsentKitItem] = [] {\n        didSet {\n            tableView.reloadData()\n        }\n    }\n    fileprivate let gdpr = ConsentKit()\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n        \n        tableView.tableFooterView = UIView()\n    }\n    \n    override func viewWillAppear(_ animated: Bool) {\n        super.viewWillAppear(animated)\n        \n        if self.navigationController == nil {\n            // Add a custom header only if the VC is not pushed into a navigationController\n            let header = CloudKitViewControllerHeader(frame: CGRect(x: 0, y: 0, width: self.view.frame.size.width, height: 80))\n            header.didDone = {\n                self.handleDone()\n                self.dismiss(animated: true, completion: nil)\n            }\n            tableView.tableHeaderView = header\n        } else {\n            self.title = \"Review services!\"\n            self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: \"Done\", style: .done, target: self, action: #selector(handleDone))\n        }\n    }\n\n    // MARK: - Table view data source\n\n    override func numberOfSections(in tableView: UITableView) -> Int {\n        return 1\n    }\n\n    override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {\n        return items.count\n    }\n\n    override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {\n\n        let item = items[indexPath.row]\n        var cell: ConsentKitCellProtocol = ConsentKitCell.instantiateFromXib()\n        cell.title = item.title()\n        cell.subtitle = item.description()\n        cell.value = gdpr.isAccepted(item)\n        cell.valueDidChange = { isOn in\n            self.item(item, didChangeValue: isOn, in: cell)\n        }\n        \n        return cell as! ConsentKitCell\n    }\n\n    override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {\n        tableView.deselectRow(at: indexPath, animated: true)\n    }\n\n    // MARK: - Switch changed\n\n    func item(_ item: ConsentKitItem, didChangeValue value: Bool, in cell: ConsentKitCellProtocol) {\n\n        if value {\n            guard let message = item.alertMessage() else {\n                self.gdpr.setAccepted(true, for: item)\n                self.didAccept?(item)\n                return\n            }\n            let alert = UIAlertController(title: item.title(), message: message, preferredStyle: .alert)\n            alert.addAction(\n                UIAlertAction(title: \"Accept\", style: .default, handler: { _ in\n                    self.gdpr.setAccepted(true, for: item)\n                    self.didAccept?(item)\n                })\n            )\n            alert.addAction(\n                UIAlertAction(title: \"Decline\", style: .cancel, handler: { _ in\n                    var cell = cell\n                    cell.value = false\n                    self.gdpr.setAccepted(false, for: item)\n                    self.didReject?(item)\n                })\n            )\n            self.present(alert, animated: true, completion: nil)\n        } else {\n            self.gdpr.setAccepted(false, for: item)\n            didReject?(item)\n        }\n    }\n    \n    @objc func handleDone() {\n        // Set to false the untouched switches, to prevent gdpr being called again\n        for item in items {\n            if !gdpr.isReviewed(item) {\n                gdpr.setAccepted(false, for: item)\n            }\n        }\n        didFinishReview?()\n    }\n}\n"
  }
]