├── .gitattributes
├── .gitignore
├── LICENSE
├── README.md
├── chapter1
└── Hello-Contacts
│ ├── Hello-Contacts.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── Hello-Contacts
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Contact.swift
│ ├── ContactTableViewCell.swift
│ ├── Info.plist
│ └── ViewController.swift
├── chapter10
└── MustC
│ ├── MustC.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── MustC
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Extensions
│ ├── NSManagedObjectContext.swift
│ └── NSPersistentContainer.swift
│ ├── Helpers
│ ├── MovieDBHelper.swift
│ └── MovieDBResponse.swift
│ ├── Info.plist
│ ├── Models
│ └── Movie.swift
│ ├── MustC.xcdatamodeld
│ └── MustC.xcdatamodel
│ │ └── contents
│ ├── Protocols
│ ├── AddFamilyMemberDelegate.swift
│ ├── AddMovieDelegate.swift
│ └── PersistenContainerRequiring.swift
│ └── ViewControllers
│ ├── AddFamilyMemberViewController.swift
│ ├── AddMovieViewController.swift
│ ├── FamilyMembersViewController.swift
│ └── MoviesViewController.swift
├── chapter11
├── MustC
│ ├── MustC.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── MustC
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ ├── cloud.imageset
│ │ │ ├── Contents.json
│ │ │ ├── cloud.png
│ │ │ ├── cloud@2x.png
│ │ │ └── cloud@3x.png
│ │ └── coredata.imageset
│ │ │ ├── Contents.json
│ │ │ ├── coredata.png
│ │ │ ├── coredata@2x.png
│ │ │ └── coredata@3x.png
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── CloudKit
│ │ └── CloudStore.swift
│ │ ├── Extensions
│ │ ├── CKRecord.swift
│ │ ├── NSManagedObjectContext.swift
│ │ ├── NSPersistentContainer.swift
│ │ └── UserDefaults.swift
│ │ ├── Helpers
│ │ ├── MovieDBHelper.swift
│ │ └── MovieDBResponse.swift
│ │ ├── Info.plist
│ │ ├── Models
│ │ ├── FamilyMember.swift
│ │ └── Movie.swift
│ │ ├── MustC.entitlements
│ │ ├── MustC.xcdatamodeld
│ │ └── MustC.xcdatamodel
│ │ │ └── contents
│ │ ├── Protocols
│ │ ├── AddFamilyMemberDelegate.swift
│ │ ├── AddMovieDelegate.swift
│ │ ├── CloudStoreRequiring.swift
│ │ └── PersistenContainerRequiring.swift
│ │ └── ViewControllers
│ │ ├── AddFamilyMemberViewController.swift
│ │ ├── AddMovieViewController.swift
│ │ └── Core Data
│ │ ├── FamilyMembersViewController.swift
│ │ └── MoviesViewController.swift
└── MustC_start
│ ├── MustC.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── MustC
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Contents.json
│ ├── cloud.imageset
│ │ ├── Contents.json
│ │ ├── cloud.png
│ │ ├── cloud@2x.png
│ │ └── cloud@3x.png
│ └── coredata.imageset
│ │ ├── Contents.json
│ │ ├── coredata.png
│ │ ├── coredata@2x.png
│ │ └── coredata@3x.png
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── CloudKit
│ └── CloudStore.swift
│ ├── Extensions
│ ├── NSManagedObjectContext.swift
│ └── NSPersistentContainer.swift
│ ├── Helpers
│ ├── MovieDBHelper.swift
│ └── MovieDBResponse.swift
│ ├── Info.plist
│ ├── Models
│ └── Movie.swift
│ ├── MustC.entitlements
│ ├── MustC.xcdatamodeld
│ └── MustC.xcdatamodel
│ │ └── contents
│ ├── Protocols
│ ├── AddFamilyMemberDelegate.swift
│ ├── AddMovieDelegate.swift
│ ├── CloudStoreRequiring.swift
│ └── PersistenContainerRequiring.swift
│ └── ViewControllers
│ ├── AddFamilyMemberViewController.swift
│ ├── AddMovieViewController.swift
│ └── Core Data
│ ├── FamilyMembersViewController.swift
│ └── MoviesViewController.swift
├── chapter12
├── ARGallery
│ ├── ARGallery.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── ARGallery
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Art.arresourcegroup
│ │ │ ├── Contents.json
│ │ │ ├── bw_flowers.arreferenceimage
│ │ │ │ ├── Contents.json
│ │ │ │ └── bw_flowers.jpg
│ │ │ ├── cactus.arreferenceimage
│ │ │ │ ├── Contents.json
│ │ │ │ └── cactus.png
│ │ │ ├── flowers.arreferenceimage
│ │ │ │ ├── Contents.json
│ │ │ │ └── flowers.jpg
│ │ │ └── text.arreferenceimage
│ │ │ │ ├── Contents.json
│ │ │ │ └── text.jpg
│ │ ├── Contents.json
│ │ ├── img_1.imageset
│ │ │ ├── Contents.json
│ │ │ ├── img_1-1.jpg
│ │ │ ├── img_1-2.jpg
│ │ │ └── img_1.jpg
│ │ ├── img_2.imageset
│ │ │ ├── Contents.json
│ │ │ ├── img_2-1.jpg
│ │ │ ├── img_2-2.jpg
│ │ │ └── img_2.jpg
│ │ ├── img_3.imageset
│ │ │ ├── Contents.json
│ │ │ ├── img_3-1.jpg
│ │ │ ├── img_3-2.jpg
│ │ │ └── img_3.jpg
│ │ ├── img_4.imageset
│ │ │ ├── Contents.json
│ │ │ ├── img_4-1.jpg
│ │ │ ├── img_4-2.jpg
│ │ │ └── img_4.jpg
│ │ └── img_5.imageset
│ │ │ ├── Contents.json
│ │ │ ├── img_5-1.jpg
│ │ │ ├── img_5-2.jpg
│ │ │ └── img_5.jpg
│ │ ├── Cells
│ │ └── GalleryCollectionItem.swift
│ │ ├── Info.plist
│ │ ├── Storyboards
│ │ └── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ └── ViewControllers
│ │ └── ViewController.swift
├── ARGallery_start
│ ├── ARGallery.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── ARGallery
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Art.arresourcegroup
│ │ │ ├── Contents.json
│ │ │ ├── bw_flowers.arreferenceimage
│ │ │ │ ├── Contents.json
│ │ │ │ └── bw_flowers.jpg
│ │ │ ├── cactus.arreferenceimage
│ │ │ │ ├── Contents.json
│ │ │ │ └── cactus.png
│ │ │ ├── flowers.arreferenceimage
│ │ │ │ ├── Contents.json
│ │ │ │ └── flowers.jpg
│ │ │ └── text.arreferenceimage
│ │ │ │ ├── Contents.json
│ │ │ │ └── text.jpg
│ │ ├── Contents.json
│ │ ├── img_1.imageset
│ │ │ ├── Contents.json
│ │ │ ├── img_1-1.jpg
│ │ │ ├── img_1-2.jpg
│ │ │ └── img_1.jpg
│ │ ├── img_2.imageset
│ │ │ ├── Contents.json
│ │ │ ├── img_2-1.jpg
│ │ │ ├── img_2-2.jpg
│ │ │ └── img_2.jpg
│ │ ├── img_3.imageset
│ │ │ ├── Contents.json
│ │ │ ├── img_3-1.jpg
│ │ │ ├── img_3-2.jpg
│ │ │ └── img_3.jpg
│ │ ├── img_4.imageset
│ │ │ ├── Contents.json
│ │ │ ├── img_4-1.jpg
│ │ │ ├── img_4-2.jpg
│ │ │ └── img_4.jpg
│ │ └── img_5.imageset
│ │ │ ├── Contents.json
│ │ │ ├── img_5-1.jpg
│ │ │ ├── img_5-2.jpg
│ │ │ └── img_5.jpg
│ │ ├── Cells
│ │ └── GalleryCollectionItem.swift
│ │ ├── Info.plist
│ │ ├── Storyboards
│ │ └── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ └── ViewControllers
│ │ └── ViewController.swift
├── ARQuicklook
│ ├── ARQuicklook.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── ARQuicklook
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ └── stratocaster.imageset
│ │ │ ├── Contents.json
│ │ │ ├── stratocaster.png
│ │ │ ├── stratocaster@2x.png
│ │ │ └── stratocaster@3x.png
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ ├── ViewController.swift
│ │ └── stratocaster.usdz
├── SceneKitSample
│ ├── SceneKitSample.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── SceneKitSample
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
└── SpriteKitDefault
│ ├── SpriteKitDefault.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── SpriteKitDefault
│ ├── Actions.sks
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── GameScene.sks
│ ├── GameScene.swift
│ ├── GameViewController.swift
│ └── Info.plist
├── chapter13
├── LocationServices
│ ├── LocationServices.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── LocationServices
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ ├── geofence.imageset
│ │ │ ├── Contents.json
│ │ │ ├── geofence.png
│ │ │ ├── geofence@2x.png
│ │ │ └── geofence@3x.png
│ │ └── significant_changes.imageset
│ │ │ ├── Contents.json
│ │ │ ├── significant_changes.png
│ │ │ ├── significant_changes@2x.png
│ │ │ └── significant_changes@3x.png
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Helpers
│ │ └── LocationHelper.swift
│ │ ├── Info.plist
│ │ ├── Protocols
│ │ └── LocationManagerRequiring.swift
│ │ └── ViewControllers
│ │ ├── GeofenceViewController.swift
│ │ └── SignificantChangesViewController.swift
└── LocationServices_start
│ ├── LocationServices.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── LocationServices
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Contents.json
│ ├── geofence.imageset
│ │ ├── Contents.json
│ │ ├── geofence.png
│ │ ├── geofence@2x.png
│ │ └── geofence@3x.png
│ └── significant_changes.imageset
│ │ ├── Contents.json
│ │ ├── significant_changes.png
│ │ ├── significant_changes@2x.png
│ │ └── significant_changes@3x.png
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Helpers
│ └── LocationHelper.swift
│ ├── Info.plist
│ ├── Protocols
│ └── LocationManagerRequiring.swift
│ └── ViewControllers
│ ├── GeofenceViewController.swift
│ └── SignificantChangesViewController.swift
├── chapter14
├── CreateML.playground
│ ├── Pages
│ │ ├── Labeller.xcplaygroundpage
│ │ │ └── Contents.swift
│ │ ├── Tagger.xcplaygroundpage
│ │ │ └── Contents.swift
│ │ └── Vision.xcplaygroundpage
│ │ │ └── Contents.swift
│ ├── Resources
│ │ ├── labels.json
│ │ └── texts.json
│ ├── contents.xcplayground
│ └── playground.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── ImageAnalyzer
│ ├── ImageAnalyzer.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── ImageAnalyzer
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ ├── MobileNet.mlmodel
│ │ └── ViewController.swift
├── ImageAnalyzer_start
│ ├── ImageAnalyzer.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── ImageAnalyzer
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── TextAnalyzer
│ ├── SentimentPolarity.mlmodel
│ ├── TextAnalyzer.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── TextAnalyzer
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
└── TextAnalyzer_start
│ ├── SentimentPolarity.mlmodel
│ ├── TextAnalyzer.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── TextAnalyzer
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── ViewController.swift
├── chapter15
├── Trekker
│ ├── Trekker.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── Trekker
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ │ ├── Helpers
│ │ ├── HealthKitHelper.swift
│ │ └── LocationHelper.swift
│ │ ├── Info.plist
│ │ ├── Protocols
│ │ ├── HealthKitRequiring.swift
│ │ └── LocationRequiring.swift
│ │ ├── Storyboards
│ │ └── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Trekker.entitlements
│ │ └── ViewControllers
│ │ └── ViewController.swift
└── Trekker_start
│ ├── Trekker.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── Trekker
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Helpers
│ ├── HealthKitHelper.swift
│ └── LocationHelper.swift
│ ├── Info.plist
│ ├── Protocols
│ ├── HealthKitRequiring.swift
│ └── LocationRequiring.swift
│ ├── Storyboards
│ └── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Trekker.entitlements
│ └── ViewControllers
│ └── ViewController.swift
├── chapter16
├── HairDressers
│ ├── AppointmentIntent
│ │ ├── AppointmentIntent.entitlements
│ │ ├── Info.plist
│ │ └── IntentHandler.swift
│ ├── Hairdressers.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── Hairdressers
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ │ ├── Contents.json
│ │ │ ├── calendar.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── calendar.png
│ │ │ │ ├── calendar@2x.png
│ │ │ │ └── calendar@3x.png
│ │ │ └── chat.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── chat.png
│ │ │ │ ├── chat@2x.png
│ │ │ │ └── chat@3x.png
│ │ ├── Cells
│ │ │ └── ChatTableViewCell.swift
│ │ ├── Data
│ │ │ ├── Hairdressers.plist
│ │ │ ├── HairdressersDataSource.swift
│ │ │ └── PersistentHelper.swift
│ │ ├── Extensions
│ │ │ ├── NSManagedObjectContext.swift
│ │ │ └── NSUserActivity.swift
│ │ ├── Hairdressers.entitlements
│ │ ├── Hairdressers.xcdatamodeld
│ │ │ └── Hairdressers.xcdatamodel
│ │ │ │ └── contents
│ │ ├── Helpers
│ │ │ └── AppointmentShortcutHelper.swift
│ │ ├── Info.plist
│ │ ├── Storyboards
│ │ │ └── Base.lproj
│ │ │ │ ├── LaunchScreen.storyboard
│ │ │ │ └── Main.storyboard
│ │ └── ViewControllers
│ │ │ ├── AddAppointmentViewController.swift
│ │ │ ├── AppointmentsViewController.swift
│ │ │ ├── ChatViewController.swift
│ │ │ └── HairdressersViewController.swift
│ ├── Intents.intentdefinition
│ ├── MessageHairdresserIntent
│ │ ├── Info.plist
│ │ ├── IntentHandler.swift
│ │ ├── MessageHairdresserIntent.entitlements
│ │ └── SendMessageIntentHandler.swift
│ └── MessageHairdresserIntentUI
│ │ ├── Base.lproj
│ │ └── MainInterface.storyboard
│ │ ├── Info.plist
│ │ └── IntentViewController.swift
└── HairDressers_start
│ ├── Hairdressers.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── Hairdressers
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Contents.json
│ ├── calendar.imageset
│ │ ├── Contents.json
│ │ ├── calendar.png
│ │ ├── calendar@2x.png
│ │ └── calendar@3x.png
│ └── chat.imageset
│ │ ├── Contents.json
│ │ ├── chat.png
│ │ ├── chat@2x.png
│ │ └── chat@3x.png
│ ├── Cells
│ └── ChatTableViewCell.swift
│ ├── Data
│ ├── Hairdressers.plist
│ ├── HairdressersDataSource.swift
│ └── PersistentHelper.swift
│ ├── Extensions
│ └── NSManagedObjectContext.swift
│ ├── Hairdressers.xcdatamodeld
│ └── Hairdressers.xcdatamodel
│ │ └── contents
│ ├── Info.plist
│ ├── Storyboards
│ └── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ └── ViewControllers
│ ├── AddAppointmentViewController.swift
│ ├── AppointmentsViewController.swift
│ ├── ChatViewController.swift
│ └── HairdressersViewController.swift
├── chapter17
├── Captured
│ ├── Captured.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── Captured
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ │ ├── Extensions
│ │ └── UIViewController.swift
│ │ ├── Info.plist
│ │ ├── Storyboards
│ │ └── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ └── ViewControllers
│ │ ├── ImageViewController.swift
│ │ ├── RecordVideoViewController.swift
│ │ └── ViewController.swift
├── Captured_start
│ ├── Captured.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── Captured
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ │ ├── Extensions
│ │ └── UIViewController.swift
│ │ ├── Info.plist
│ │ ├── Storyboards
│ │ └── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ └── ViewControllers
│ │ ├── ImageViewController.swift
│ │ ├── RecordVideoViewController.swift
│ │ └── ViewController.swift
├── MediaPlayback
│ ├── MediaPlayback.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── MediaPlayback
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ ├── music.imageset
│ │ │ ├── Contents.json
│ │ │ ├── music.png
│ │ │ ├── music@2x.png
│ │ │ └── music@3x.png
│ │ └── video.imageset
│ │ │ ├── Contents.json
│ │ │ ├── video.png
│ │ │ ├── video@2x.png
│ │ │ └── video@3x.png
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ ├── ViewControllers
│ │ ├── AudioViewController.swift
│ │ └── VideoViewController.swift
│ │ ├── one.mp3
│ │ ├── samplevideo.mp4
│ │ ├── three.mp3
│ │ └── two.mp3
└── MediaPlayback_start
│ ├── MediaPlayback.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── MediaPlayback
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Contents.json
│ ├── music.imageset
│ │ ├── Contents.json
│ │ ├── music.png
│ │ ├── music@2x.png
│ │ └── music@3x.png
│ └── video.imageset
│ │ ├── Contents.json
│ │ ├── video.png
│ │ ├── video@2x.png
│ │ └── video@3x.png
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── ViewControllers
│ ├── AudioViewController.swift
│ └── VideoViewController.swift
├── chapter18
├── Notifications
│ ├── Notifications.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── Notifications
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ │ ├── Contents.json
│ │ │ ├── add.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── add.png
│ │ │ │ ├── add@2x.png
│ │ │ │ └── add@3x.png
│ │ │ └── history.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── history.png
│ │ │ │ ├── history@2x.png
│ │ │ │ └── history@3x.png
│ │ ├── Cell
│ │ │ └── ReminderTableViewCell.swift
│ │ ├── Helpers
│ │ │ ├── NotificationsHelper.swift
│ │ │ └── PersistentHelper.swift
│ │ ├── Info.plist
│ │ ├── Localizable.stringsdict
│ │ ├── Notifications.entitlements
│ │ ├── Notifications.xcdatamodeld
│ │ │ ├── .xccurrentversion
│ │ │ └── Notifications.xcdatamodel
│ │ │ │ └── contents
│ │ ├── Protocols
│ │ │ └── PersistentContainerRequiring.swift
│ │ ├── Storyboards
│ │ │ └── Base.lproj
│ │ │ │ ├── LaunchScreen.storyboard
│ │ │ │ └── Main.storyboard
│ │ └── ViewControllers
│ │ │ ├── AddNotificationViewController.swift
│ │ │ └── ScheduledRemindersViewController.swift
│ ├── ReminderContent
│ │ ├── Info.plist
│ │ ├── NotificationService.swift
│ │ └── ReminderContent.entitlements
│ └── ReminderUI
│ │ ├── Base.lproj
│ │ └── MainInterface.storyboard
│ │ ├── Info.plist
│ │ ├── NotificationViewController.swift
│ │ └── ReminderUI.entitlements
└── Notifications_start
│ ├── Notifications.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── Notifications
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Contents.json
│ ├── add.imageset
│ │ ├── Contents.json
│ │ ├── add.png
│ │ ├── add@2x.png
│ │ └── add@3x.png
│ └── history.imageset
│ │ ├── Contents.json
│ │ ├── history.png
│ │ ├── history@2x.png
│ │ └── history@3x.png
│ ├── Cell
│ └── ReminderTableViewCell.swift
│ ├── Helpers
│ └── PersistentHelper.swift
│ ├── Info.plist
│ ├── Notifications.xcdatamodeld
│ ├── .xccurrentversion
│ └── Notifications.xcdatamodel
│ │ └── contents
│ ├── Protocols
│ └── PersistentContainerRequiring.swift
│ ├── Storyboards
│ └── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ └── ViewControllers
│ ├── AddNotificationViewController.swift
│ └── ScheduledRemindersViewController.swift
├── chapter19
├── The Daily Quote
│ ├── Shared
│ │ └── Quote.swift
│ ├── The Daily Quote Widget
│ │ ├── Base.lproj
│ │ │ └── MainInterface.storyboard
│ │ ├── Info.plist
│ │ ├── The Daily Quote Widget.entitlements
│ │ └── TodayViewController.swift
│ ├── The Daily Quote.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── The Daily Quote
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ ├── QuoteViewController.swift
│ │ └── The Daily Quote.entitlements
└── The Daily Quote_start
│ ├── Shared
│ └── Quote.swift
│ ├── The Daily Quote.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── The Daily Quote
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── QuoteViewController.swift
├── chapter2
└── Hello-Contacts
│ ├── Hello-Contacts.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── Hello-Contacts
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Contact.swift
│ ├── ContactCollectionViewCell.swift
│ ├── ContactsCollectionViewLayout.swift
│ ├── Info.plist
│ ├── LayoutExploration.playground
│ ├── Contents.swift
│ ├── contents.xcplayground
│ └── playground.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── ViewController.swift
├── chapter20
├── ARGallery
│ ├── ARGallery.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── ARGallery
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Art.arresourcegroup
│ │ │ ├── Contents.json
│ │ │ ├── bw_flowers.arreferenceimage
│ │ │ │ ├── Contents.json
│ │ │ │ └── bw_flowers.jpg
│ │ │ ├── cactus.arreferenceimage
│ │ │ │ ├── Contents.json
│ │ │ │ └── cactus.png
│ │ │ ├── flowers.arreferenceimage
│ │ │ │ ├── Contents.json
│ │ │ │ └── flowers.jpg
│ │ │ └── text.arreferenceimage
│ │ │ │ ├── Contents.json
│ │ │ │ └── text.jpg
│ │ ├── Contents.json
│ │ ├── img_1.imageset
│ │ │ ├── Contents.json
│ │ │ ├── img_1-1.jpg
│ │ │ ├── img_1-2.jpg
│ │ │ └── img_1.jpg
│ │ ├── img_2.imageset
│ │ │ ├── Contents.json
│ │ │ ├── img_2-1.jpg
│ │ │ ├── img_2-2.jpg
│ │ │ └── img_2.jpg
│ │ ├── img_3.imageset
│ │ │ ├── Contents.json
│ │ │ ├── img_3-1.jpg
│ │ │ ├── img_3-2.jpg
│ │ │ └── img_3.jpg
│ │ ├── img_4.imageset
│ │ │ ├── Contents.json
│ │ │ ├── img_4-1.jpg
│ │ │ ├── img_4-2.jpg
│ │ │ └── img_4.jpg
│ │ └── img_5.imageset
│ │ │ ├── Contents.json
│ │ │ ├── img_5-1.jpg
│ │ │ ├── img_5-2.jpg
│ │ │ └── img_5.jpg
│ │ ├── Cells
│ │ └── GalleryCollectionItem.swift
│ │ ├── Info.plist
│ │ ├── Storyboards
│ │ └── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ └── ViewControllers
│ │ └── ViewController.swift
├── ARGallery_start
│ ├── ARGallery.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── ARGallery
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Art.arresourcegroup
│ │ │ ├── Contents.json
│ │ │ ├── bw_flowers.arreferenceimage
│ │ │ │ ├── Contents.json
│ │ │ │ └── bw_flowers.jpg
│ │ │ ├── cactus.arreferenceimage
│ │ │ │ ├── Contents.json
│ │ │ │ └── cactus.png
│ │ │ ├── flowers.arreferenceimage
│ │ │ │ ├── Contents.json
│ │ │ │ └── flowers.jpg
│ │ │ └── text.arreferenceimage
│ │ │ │ ├── Contents.json
│ │ │ │ └── text.jpg
│ │ ├── Contents.json
│ │ ├── img_1.imageset
│ │ │ ├── Contents.json
│ │ │ ├── img_1-1.jpg
│ │ │ ├── img_1-2.jpg
│ │ │ └── img_1.jpg
│ │ ├── img_2.imageset
│ │ │ ├── Contents.json
│ │ │ ├── img_2-1.jpg
│ │ │ ├── img_2-2.jpg
│ │ │ └── img_2.jpg
│ │ ├── img_3.imageset
│ │ │ ├── Contents.json
│ │ │ ├── img_3-1.jpg
│ │ │ ├── img_3-2.jpg
│ │ │ └── img_3.jpg
│ │ ├── img_4.imageset
│ │ │ ├── Contents.json
│ │ │ ├── img_4-1.jpg
│ │ │ ├── img_4-2.jpg
│ │ │ └── img_4.jpg
│ │ └── img_5.imageset
│ │ │ ├── Contents.json
│ │ │ ├── img_5-1.jpg
│ │ │ ├── img_5-2.jpg
│ │ │ └── img_5.jpg
│ │ ├── Cells
│ │ └── GalleryCollectionItem.swift
│ │ ├── Info.plist
│ │ ├── Storyboards
│ │ └── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ └── ViewControllers
│ │ └── ViewController.swift
├── PlainDragDrop
│ ├── PlainDragDrop.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── PlainDragDrop
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ │ ├── Info.plist
│ │ ├── Storyboards
│ │ └── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ └── ViewControllers
│ │ └── DragDropViewController.swift
└── PlainDragDrop_start
│ ├── PlainDragDrop.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── PlainDragDrop
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Info.plist
│ ├── Storyboards
│ └── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ └── ViewControllers
│ └── DragDropViewController.swift
├── chapter21
├── MustC
│ ├── MustC.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── MustC
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ ├── family_members.imageset
│ │ │ ├── Contents.json
│ │ │ ├── family_members.png
│ │ │ ├── family_members@2x.png
│ │ │ └── family_members@3x.png
│ │ └── movies.imageset
│ │ │ ├── Contents.json
│ │ │ ├── movies.png
│ │ │ ├── movies@2x.png
│ │ │ └── movies@3x.png
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── CloudKit
│ │ └── CloudStore.swift
│ │ ├── Extensions
│ │ ├── CKRecord.swift
│ │ ├── NSManagedObjectContext.swift
│ │ ├── NSPersistentContainer.swift
│ │ ├── URL.swift
│ │ └── UserDefaults.swift
│ │ ├── Helpers
│ │ ├── IndexingFactory.swift
│ │ ├── MovieDBHelper.swift
│ │ └── MovieDBResponse.swift
│ │ ├── Info.plist
│ │ ├── Models
│ │ ├── FamilyMember.swift
│ │ └── Movie.swift
│ │ ├── MustC.entitlements
│ │ ├── MustC.xcdatamodeld
│ │ └── MustC.xcdatamodel
│ │ │ └── contents
│ │ ├── Protocols
│ │ ├── AddFamilyMemberDelegate.swift
│ │ ├── AddMovieDelegate.swift
│ │ ├── CloudStoreRequiring.swift
│ │ └── PersistenContainerRequiring.swift
│ │ └── ViewControllers
│ │ ├── AddFamilyMemberViewController.swift
│ │ ├── AddMovieViewController.swift
│ │ ├── FamilyMembersViewController.swift
│ │ ├── MovieDetailViewController.swift
│ │ ├── MoviesListViewController.swift
│ │ └── MoviesViewController.swift
└── MustC_start
│ ├── MustC.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── MustC
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Contents.json
│ ├── family_members.imageset
│ │ ├── Contents.json
│ │ ├── family_members.png
│ │ ├── family_members@2x.png
│ │ └── family_members@3x.png
│ └── movies.imageset
│ │ ├── Contents.json
│ │ ├── movies.png
│ │ ├── movies@2x.png
│ │ └── movies@3x.png
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── CloudKit
│ └── CloudStore.swift
│ ├── Extensions
│ ├── CKRecord.swift
│ ├── NSManagedObjectContext.swift
│ ├── NSPersistentContainer.swift
│ └── UserDefaults.swift
│ ├── Helpers
│ ├── MovieDBHelper.swift
│ └── MovieDBResponse.swift
│ ├── Info.plist
│ ├── Models
│ ├── FamilyMember.swift
│ └── Movie.swift
│ ├── MustC.entitlements
│ ├── MustC.xcdatamodeld
│ └── MustC.xcdatamodel
│ │ └── contents
│ ├── Protocols
│ ├── AddFamilyMemberDelegate.swift
│ ├── AddMovieDelegate.swift
│ ├── CloudStoreRequiring.swift
│ └── PersistenContainerRequiring.swift
│ └── ViewControllers
│ ├── AddFamilyMemberViewController.swift
│ ├── AddMovieViewController.swift
│ ├── FamilyMembersViewController.swift
│ ├── MovieDetailViewController.swift
│ ├── MoviesListViewController.swift
│ └── MoviesViewController.swift
├── chapter22
├── CustomStickers
│ ├── CustomStickers.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── CustomStickers
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ ├── MessagesExtension
│ │ ├── Assets.xcassets
│ │ │ ├── Contents.json
│ │ │ └── iMessage App Icon.stickersiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ └── MainInterface.storyboard
│ │ ├── Info.plist
│ │ ├── MessagesViewController.swift
│ │ └── OwlStickerFactory.swift
│ └── images
│ │ ├── bike.png
│ │ ├── books.png
│ │ ├── bowler.png
│ │ ├── drunk.png
│ │ ├── ebook.png
│ │ ├── family.png
│ │ ├── grill.png
│ │ ├── normal.png
│ │ ├── notebook.png
│ │ ├── party.png
│ │ ├── punk.png
│ │ ├── rose.png
│ │ ├── santa.png
│ │ └── spring.png
├── CustomStickers_start
│ ├── CustomStickers.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── CustomStickers
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ ├── MessagesExtension
│ │ ├── Assets.xcassets
│ │ │ ├── Contents.json
│ │ │ └── iMessage App Icon.stickersiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ └── MainInterface.storyboard
│ │ ├── Info.plist
│ │ └── MessagesViewController.swift
│ └── images
│ │ ├── bike.png
│ │ ├── books.png
│ │ ├── bowler.png
│ │ ├── drunk.png
│ │ ├── ebook.png
│ │ ├── family.png
│ │ ├── grill.png
│ │ ├── normal.png
│ │ ├── notebook.png
│ │ ├── party.png
│ │ ├── punk.png
│ │ ├── rose.png
│ │ ├── santa.png
│ │ └── spring.png
├── The Daily Quote
│ ├── Shared
│ │ └── Quote.swift
│ ├── The Daily Quote Messages
│ │ ├── Assets.xcassets
│ │ │ ├── Contents.json
│ │ │ └── iMessage App Icon.stickersiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ └── MainInterface.storyboard
│ │ ├── CompactViewController.swift
│ │ ├── Info.plist
│ │ ├── MessagesViewController.swift
│ │ ├── QuoteSelectionDelegate.swift
│ │ ├── QuotesTableViewController.swift
│ │ └── The Daily Quote Messages.entitlements
│ ├── The Daily Quote Widget
│ │ ├── Base.lproj
│ │ │ └── MainInterface.storyboard
│ │ ├── Info.plist
│ │ ├── The Daily Quote Widget.entitlements
│ │ └── TodayViewController.swift
│ ├── The Daily Quote.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── The Daily Quote
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ ├── QuoteViewController.swift
│ │ └── The Daily Quote.entitlements
└── The Daily Quote_start
│ ├── Shared
│ └── Quote.swift
│ ├── The Daily Quote Widget
│ ├── Base.lproj
│ │ └── MainInterface.storyboard
│ ├── Info.plist
│ ├── The Daily Quote Widget.entitlements
│ └── TodayViewController.swift
│ ├── The Daily Quote.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── The Daily Quote
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── QuoteViewController.swift
│ └── The Daily Quote.entitlements
├── chapter23
├── MovieTrivia
│ ├── .gitignore
│ ├── MovieTrivia.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── MovieTrivia
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ ├── LoadTriviaViewController.swift
│ │ ├── Question.swift
│ │ ├── QuestionViewController.swift
│ │ ├── QuestionsLoader.swift
│ │ ├── TriviaAPI.swift
│ │ ├── TriviaAPIProviding.swift
│ │ └── TriviaQuestions.json
│ ├── MovieTriviaTests
│ │ ├── Info.plist
│ │ ├── LoadQuestionsTest.swift
│ │ └── MockTriviaApi.swift
│ └── MovieTriviaUITests
│ │ ├── Info.plist
│ │ └── MovieTriviaUITests.swift
└── MovieTrivia_start
│ ├── .gitignore
│ ├── MovieTrivia.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── MovieTrivia
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── LoadTriviaViewController.swift
│ ├── QuestionViewController.swift
│ └── TriviaQuestions.json
├── chapter24
├── Mosaic
│ ├── Mosaic.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── Mosaic
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ │ ├── Contents.json
│ │ │ ├── background_image.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── background_image.jpg
│ │ │ │ ├── background_image@2x.jpg
│ │ │ │ └── background_image@3x.jpg
│ │ │ └── collectionitem.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── collectionitem.jpg
│ │ │ │ ├── collectionitem@2x.jpg
│ │ │ │ └── collectionitem@3x.jpg
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Cells
│ │ │ └── ListCollectionViewCell.swift
│ │ ├── Info.plist
│ │ ├── Layout
│ │ │ └── ListCollectionViewLayout.swift
│ │ ├── Protocols
│ │ │ ├── CollectionItemDelegate.swift
│ │ │ ├── DetailViewControllerDelegate.swift
│ │ │ └── ListCollectionDelegate.swift
│ │ ├── ViewController.swift
│ │ └── ViewControllers
│ │ │ ├── DetailViewController.swift
│ │ │ ├── ListCollectionViewController.swift
│ │ │ └── ListViewController.swift
│ └── MosaicLayoutInstrument
│ │ └── MosaicLayoutInstrument.instrpkg
└── Mosaic_start
│ ├── Mosaic.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── Mosaic
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Contents.json
│ ├── background_image.imageset
│ │ ├── Contents.json
│ │ ├── background_image.jpg
│ │ ├── background_image@2x.jpg
│ │ └── background_image@3x.jpg
│ └── collectionitem.imageset
│ │ ├── Contents.json
│ │ ├── collectionitem.jpg
│ │ ├── collectionitem@2x.jpg
│ │ └── collectionitem@3x.jpg
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Cells
│ └── ListCollectionViewCell.swift
│ ├── Info.plist
│ ├── Layout
│ └── ListCollectionViewLayout.swift
│ ├── Protocols
│ ├── CollectionItemDelegate.swift
│ ├── DetailViewControllerDelegate.swift
│ └── ListCollectionDelegate.swift
│ ├── ViewController.swift
│ └── ViewControllers
│ ├── DetailViewController.swift
│ ├── ListCollectionViewController.swift
│ └── ListViewController.swift
├── chapter25
├── MustC
│ ├── MustC.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── MustC
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ ├── family_members.imageset
│ │ │ ├── Contents.json
│ │ │ ├── family_members.png
│ │ │ ├── family_members@2x.png
│ │ │ └── family_members@3x.png
│ │ └── movies.imageset
│ │ │ ├── Contents.json
│ │ │ ├── movies.png
│ │ │ ├── movies@2x.png
│ │ │ └── movies@3x.png
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── CloudKit
│ │ └── CloudStore.swift
│ │ ├── Extensions
│ │ ├── CKRecord.swift
│ │ ├── NSManagedObjectContext.swift
│ │ ├── NSPersistentContainer.swift
│ │ ├── URL.swift
│ │ └── UserDefaults.swift
│ │ ├── Helpers
│ │ ├── IndexingFactory.swift
│ │ ├── MovieDBHelper.swift
│ │ └── MovieDBResponse.swift
│ │ ├── Info.plist
│ │ ├── Models
│ │ ├── FamilyMember.swift
│ │ └── Movie.swift
│ │ ├── MustC.entitlements
│ │ ├── MustC.xcdatamodeld
│ │ └── MustC.xcdatamodel
│ │ │ └── contents
│ │ ├── Operations
│ │ ├── BackgroundFetchCompletionOperation.swift
│ │ └── UpdateMovieOperation.swift
│ │ ├── Protocols
│ │ ├── AddFamilyMemberDelegate.swift
│ │ ├── AddMovieDelegate.swift
│ │ ├── CloudStoreRequiring.swift
│ │ └── PersistenContainerRequiring.swift
│ │ └── ViewControllers
│ │ ├── AddFamilyMemberViewController.swift
│ │ ├── AddMovieViewController.swift
│ │ ├── FamilyMembersViewController.swift
│ │ ├── MovieDetailViewController.swift
│ │ ├── MoviesListViewController.swift
│ │ └── MoviesViewController.swift
└── MustC_start
│ ├── MustC.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── MustC
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Contents.json
│ ├── family_members.imageset
│ │ ├── Contents.json
│ │ ├── family_members.png
│ │ ├── family_members@2x.png
│ │ └── family_members@3x.png
│ └── movies.imageset
│ │ ├── Contents.json
│ │ ├── movies.png
│ │ ├── movies@2x.png
│ │ └── movies@3x.png
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── CloudKit
│ └── CloudStore.swift
│ ├── Extensions
│ ├── CKRecord.swift
│ ├── NSManagedObjectContext.swift
│ ├── NSPersistentContainer.swift
│ ├── URL.swift
│ └── UserDefaults.swift
│ ├── Helpers
│ ├── IndexingFactory.swift
│ ├── MovieDBHelper.swift
│ └── MovieDBResponse.swift
│ ├── Info.plist
│ ├── Models
│ ├── FamilyMember.swift
│ └── Movie.swift
│ ├── MustC.entitlements
│ ├── MustC.xcdatamodeld
│ └── MustC.xcdatamodel
│ │ └── contents
│ ├── Protocols
│ ├── AddFamilyMemberDelegate.swift
│ ├── AddMovieDelegate.swift
│ ├── CloudStoreRequiring.swift
│ └── PersistenContainerRequiring.swift
│ └── ViewControllers
│ ├── AddFamilyMemberViewController.swift
│ ├── AddMovieViewController.swift
│ ├── FamilyMembersViewController.swift
│ ├── MovieDetailViewController.swift
│ ├── MoviesListViewController.swift
│ └── MoviesViewController.swift
├── chapter3
└── Hello-contacts
│ ├── Hello-Contacts.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── Hello-Contacts
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Contact.swift
│ ├── ContactCollectionViewCell.swift
│ ├── ContactDetailViewController.swift
│ ├── ContactsCollectionViewLayout.swift
│ ├── Info.plist
│ ├── LayoutExploration.playground
│ ├── Contents.swift
│ ├── contents.xcplayground
│ └── timeline.xctimeline
│ └── ViewController.swift
├── chapter4
├── Cradle
│ ├── Cradle.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── Cradle
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
└── Hello-contacts
│ ├── Hello-Contacts.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── Hello-Contacts
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Contact.swift
│ ├── ContactCollectionViewCell.swift
│ ├── ContactDetailHideAnimator.swift
│ ├── ContactDetailShowAnimator.swift
│ ├── ContactDetailViewController.swift
│ ├── ContactsCollectionViewLayout.swift
│ ├── CustomModalHideAnimator.swift
│ ├── CustomModalShowAnimator.swift
│ ├── CustomPresentedViewController.swift
│ ├── Info.plist
│ ├── LayoutExploration.playground
│ ├── Contents.swift
│ ├── contents.xcplayground
│ └── timeline.xctimeline
│ ├── NavigationDelegate.swift
│ └── ViewController.swift
├── chapter5
└── Chapter 5.playground
│ ├── Pages
│ ├── Reference types.xcplaygroundpage
│ │ └── Contents.swift
│ ├── Value types.xcplaygroundpage
│ │ └── Contents.swift
│ └── Values vs References.xcplaygroundpage
│ │ └── Contents.swift
│ ├── contents.xcplayground
│ └── playground.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ └── IDEWorkspaceChecks.plist
├── chapter6
└── Chapter6.playground
│ ├── Pages
│ ├── AssociatedTypes.xcplaygroundpage
│ │ └── Contents.swift
│ ├── Generics.xcplaygroundpage
│ │ └── Contents.swift
│ └── POP.xcplaygroundpage
│ │ └── Contents.swift
│ ├── contents.xcplayground
│ └── playground.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ └── IDEWorkspaceChecks.plist
├── chapter7
└── Hello-contacts
│ ├── Hello-Contacts.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── Hello-Contacts
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Cells
│ └── ContactCollectionViewCell.swift
│ ├── Helpers
│ ├── BounceAnimationHelper.swift
│ └── ContactFetchHelper.swift
│ ├── Info.plist
│ ├── Layout
│ └── ContactsCollectionViewLayout.swift
│ ├── LayoutExploration.playground
│ ├── Contents.swift
│ ├── contents.xcplayground
│ └── timeline.xctimeline
│ ├── Models
│ └── Contact.swift
│ ├── Protocols
│ ├── ContactDisplayable.swift
│ └── ViewEffectAnimatorType.swift
│ ├── Transitions
│ ├── NavigationController
│ │ ├── ContactDetailHideAnimator.swift
│ │ ├── ContactDetailShowAnimator.swift
│ │ └── NavigationDelegate.swift
│ └── ViewController
│ │ ├── CustomModalHideAnimator.swift
│ │ └── CustomModalShowAnimator.swift
│ └── ViewControllers
│ ├── ContactDetailViewController.swift
│ ├── CustomPresentedViewController.swift
│ └── ViewController.swift
├── chapter8
├── MustC
│ ├── MustC.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── MustC
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Extensions
│ │ ├── NSManagedObjectContext.swift
│ │ └── NSPersistentContainer.swift
│ │ ├── Info.plist
│ │ ├── MustC.xcdatamodeld
│ │ └── MustC.xcdatamodel
│ │ │ └── contents
│ │ ├── Protocols
│ │ ├── AddFamilyMemberDelegate.swift
│ │ ├── AddMovieDelegate.swift
│ │ └── PersistenContainerRequiring.swift
│ │ └── ViewControllers
│ │ ├── AddFamilyMemberViewController.swift
│ │ ├── AddMovieViewController.swift
│ │ ├── FamilyMembersViewController.swift
│ │ └── MoviesViewController.swift
└── MustC_start
│ ├── MustC.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── MustC
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── Protocols
│ ├── AddFamilyMemberDelegate.swift
│ └── AddMovieDelegate.swift
│ └── ViewControllers
│ ├── AddFamilyMemberViewController.swift
│ ├── AddMovieViewController.swift
│ ├── FamilyMembersViewController.swift
│ └── MoviesViewController.swift
└── chapter9
├── MustC
├── MustC.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── MustC
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Extensions
│ ├── NSManagedObjectContext.swift
│ └── NSPersistentContainer.swift
│ ├── Helpers
│ ├── MovieDBHelper.swift
│ └── MovieDBResponse.swift
│ ├── Info.plist
│ ├── MustC.xcdatamodeld
│ └── MustC.xcdatamodel
│ │ └── contents
│ ├── Protocols
│ ├── AddFamilyMemberDelegate.swift
│ ├── AddMovieDelegate.swift
│ └── PersistenContainerRequiring.swift
│ └── ViewControllers
│ ├── AddFamilyMemberViewController.swift
│ ├── AddMovieViewController.swift
│ ├── FamilyMembersViewController.swift
│ └── MoviesViewController.swift
└── URLSession.playground
├── Pages
├── 01-Basics.xcplaygroundpage
│ └── Contents.swift
├── 02-MovieDb.xcplaygroundpage
│ └── Contents.swift
└── 03-Codable.xcplaygroundpage
│ └── Contents.swift
├── contents.xcplayground
└── playground.xcworkspace
├── contents.xcworkspacedata
└── xcshareddata
└── IDEWorkspaceChecks.plist
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.mp4 filter=lfs diff=lfs merge=lfs -text
2 | *.mp3 filter=lfs diff=lfs merge=lfs -text
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | xcuserdata/
3 | build/
4 |
--------------------------------------------------------------------------------
/chapter1/Hello-Contacts/Hello-Contacts.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter1/Hello-Contacts/Hello-Contacts.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter1/Hello-Contacts/Hello-Contacts/ContactTableViewCell.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class ContactTableViewCell: UITableViewCell {
4 |
5 | @IBOutlet var nameLabel: UILabel!
6 | @IBOutlet var contactImage: UIImageView!
7 |
8 | override func prepareForReuse() {
9 | super.prepareForReuse()
10 |
11 | contactImage.image = nil
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/chapter10/MustC/MustC.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter10/MustC/MustC.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter10/MustC/MustC/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter10/MustC/MustC/Extensions/NSManagedObjectContext.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | extension NSManagedObjectContext {
4 | func persist(block: @escaping () -> Void) {
5 | perform {
6 | block()
7 |
8 | do {
9 | try self.save()
10 | } catch {
11 | self.rollback()
12 | }
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/chapter10/MustC/MustC/Extensions/NSPersistentContainer.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | extension NSPersistentContainer {
4 | func saveContextIfNeeded() {
5 | if viewContext.hasChanges {
6 | do {
7 | try viewContext.save()
8 | } catch {
9 | let nserror = error as NSError
10 | fatalError("Unresolved error \(nserror), \(nserror.userInfo)")
11 | }
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/chapter10/MustC/MustC/Helpers/MovieDBResponse.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | struct MovieDBLookupResponse: Codable {
4 |
5 | struct MovieDBMovie: Codable {
6 | let popularity: Double?
7 | let id: Int?
8 | }
9 |
10 | let results: [MovieDBMovie]
11 | }
12 |
--------------------------------------------------------------------------------
/chapter10/MustC/MustC/Protocols/AddFamilyMemberDelegate.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol AddFamilyMemberDelegate {
4 | func saveFamilyMember(withName name: String)
5 | }
6 |
--------------------------------------------------------------------------------
/chapter10/MustC/MustC/Protocols/AddMovieDelegate.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol AddMovieDelegate {
4 | func saveMovie(withName name: String)
5 | }
6 |
--------------------------------------------------------------------------------
/chapter10/MustC/MustC/Protocols/PersistenContainerRequiring.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | protocol PersistenContainerRequiring {
4 | var persistentContainer: NSPersistentContainer! { get set }
5 | }
6 |
--------------------------------------------------------------------------------
/chapter11/MustC/MustC.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter11/MustC/MustC.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter11/MustC/MustC/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter11/MustC/MustC/Assets.xcassets/cloud.imageset/cloud.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter11/MustC/MustC/Assets.xcassets/cloud.imageset/cloud.png
--------------------------------------------------------------------------------
/chapter11/MustC/MustC/Assets.xcassets/cloud.imageset/cloud@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter11/MustC/MustC/Assets.xcassets/cloud.imageset/cloud@2x.png
--------------------------------------------------------------------------------
/chapter11/MustC/MustC/Assets.xcassets/cloud.imageset/cloud@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter11/MustC/MustC/Assets.xcassets/cloud.imageset/cloud@3x.png
--------------------------------------------------------------------------------
/chapter11/MustC/MustC/Assets.xcassets/coredata.imageset/coredata.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter11/MustC/MustC/Assets.xcassets/coredata.imageset/coredata.png
--------------------------------------------------------------------------------
/chapter11/MustC/MustC/Assets.xcassets/coredata.imageset/coredata@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter11/MustC/MustC/Assets.xcassets/coredata.imageset/coredata@2x.png
--------------------------------------------------------------------------------
/chapter11/MustC/MustC/Assets.xcassets/coredata.imageset/coredata@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter11/MustC/MustC/Assets.xcassets/coredata.imageset/coredata@3x.png
--------------------------------------------------------------------------------
/chapter11/MustC/MustC/Extensions/CKRecord.swift:
--------------------------------------------------------------------------------
1 | import CloudKit
2 |
3 | extension CKRecord {
4 | var encodedSystemFields: Data {
5 | let coder = NSKeyedArchiver(requiringSecureCoding: true)
6 | self.encodeSystemFields(with: coder)
7 | coder.finishEncoding()
8 |
9 | return coder.encodedData
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/chapter11/MustC/MustC/Extensions/NSManagedObjectContext.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | extension NSManagedObjectContext {
4 | func persist(block: @escaping () -> Void) {
5 | perform {
6 | block()
7 |
8 | do {
9 | try self.save()
10 | } catch {
11 | self.rollback()
12 | }
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/chapter11/MustC/MustC/Extensions/NSPersistentContainer.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | extension NSPersistentContainer {
4 | func saveContextIfNeeded() {
5 | if viewContext.hasChanges {
6 | do {
7 | try viewContext.save()
8 | } catch {
9 | let nserror = error as NSError
10 | fatalError("Unresolved error \(nserror), \(nserror.userInfo)")
11 | }
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/chapter11/MustC/MustC/Helpers/MovieDBResponse.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | struct MovieDBLookupResponse: Codable {
4 |
5 | struct MovieDBMovie: Codable {
6 | let popularity: Double?
7 | let id: Int?
8 | }
9 |
10 | let results: [MovieDBMovie]
11 | }
12 |
--------------------------------------------------------------------------------
/chapter11/MustC/MustC/Protocols/AddFamilyMemberDelegate.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol AddFamilyMemberDelegate {
4 | func saveFamilyMember(withName name: String)
5 | }
6 |
--------------------------------------------------------------------------------
/chapter11/MustC/MustC/Protocols/AddMovieDelegate.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol AddMovieDelegate {
4 | func saveMovie(withName name: String)
5 | }
6 |
--------------------------------------------------------------------------------
/chapter11/MustC/MustC/Protocols/CloudStoreRequiring.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol CloudStoreRequiring {
4 | var cloudStore: CloudStore! { get set }
5 | }
6 |
--------------------------------------------------------------------------------
/chapter11/MustC/MustC/Protocols/PersistenContainerRequiring.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | protocol PersistenContainerRequiring {
4 | var persistentContainer: NSPersistentContainer! { get set }
5 | }
6 |
--------------------------------------------------------------------------------
/chapter11/MustC_start/MustC.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter11/MustC_start/MustC.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter11/MustC_start/MustC/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter11/MustC_start/MustC/Assets.xcassets/cloud.imageset/cloud.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter11/MustC_start/MustC/Assets.xcassets/cloud.imageset/cloud.png
--------------------------------------------------------------------------------
/chapter11/MustC_start/MustC/Assets.xcassets/cloud.imageset/cloud@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter11/MustC_start/MustC/Assets.xcassets/cloud.imageset/cloud@2x.png
--------------------------------------------------------------------------------
/chapter11/MustC_start/MustC/Assets.xcassets/cloud.imageset/cloud@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter11/MustC_start/MustC/Assets.xcassets/cloud.imageset/cloud@3x.png
--------------------------------------------------------------------------------
/chapter11/MustC_start/MustC/Assets.xcassets/coredata.imageset/coredata.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter11/MustC_start/MustC/Assets.xcassets/coredata.imageset/coredata.png
--------------------------------------------------------------------------------
/chapter11/MustC_start/MustC/Assets.xcassets/coredata.imageset/coredata@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter11/MustC_start/MustC/Assets.xcassets/coredata.imageset/coredata@2x.png
--------------------------------------------------------------------------------
/chapter11/MustC_start/MustC/Assets.xcassets/coredata.imageset/coredata@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter11/MustC_start/MustC/Assets.xcassets/coredata.imageset/coredata@3x.png
--------------------------------------------------------------------------------
/chapter11/MustC_start/MustC/CloudKit/CloudStore.swift:
--------------------------------------------------------------------------------
1 | import CloudKit
2 | import CoreData
3 |
4 | class CloudStore {
5 | let persistentContainer: NSPersistentContainer
6 |
7 | private var privateDatabase: CKDatabase {
8 | return CKContainer.default().privateCloudDatabase
9 | }
10 |
11 | init(persistentContainer: NSPersistentContainer) {
12 | self.persistentContainer = persistentContainer
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/chapter11/MustC_start/MustC/Extensions/NSManagedObjectContext.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | extension NSManagedObjectContext {
4 | func persist(block: @escaping () -> Void) {
5 | perform {
6 | block()
7 |
8 | do {
9 | try self.save()
10 | } catch {
11 | self.rollback()
12 | }
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/chapter11/MustC_start/MustC/Extensions/NSPersistentContainer.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | extension NSPersistentContainer {
4 | func saveContextIfNeeded() {
5 | if viewContext.hasChanges {
6 | do {
7 | try viewContext.save()
8 | } catch {
9 | let nserror = error as NSError
10 | fatalError("Unresolved error \(nserror), \(nserror.userInfo)")
11 | }
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/chapter11/MustC_start/MustC/Helpers/MovieDBResponse.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | struct MovieDBLookupResponse: Codable {
4 |
5 | struct MovieDBMovie: Codable {
6 | let popularity: Double?
7 | let id: Int?
8 | }
9 |
10 | let results: [MovieDBMovie]
11 | }
12 |
--------------------------------------------------------------------------------
/chapter11/MustC_start/MustC/Protocols/AddFamilyMemberDelegate.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol AddFamilyMemberDelegate {
4 | func saveFamilyMember(withName name: String)
5 | }
6 |
--------------------------------------------------------------------------------
/chapter11/MustC_start/MustC/Protocols/AddMovieDelegate.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol AddMovieDelegate {
4 | func saveMovie(withName name: String)
5 | }
6 |
--------------------------------------------------------------------------------
/chapter11/MustC_start/MustC/Protocols/CloudStoreRequiring.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol CloudStoreRequiring {
4 | var cloudStore: CloudStore! { get set }
5 | }
6 |
--------------------------------------------------------------------------------
/chapter11/MustC_start/MustC/Protocols/PersistenContainerRequiring.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | protocol PersistenContainerRequiring {
4 | var persistentContainer: NSPersistentContainer! { get set }
5 | }
6 |
--------------------------------------------------------------------------------
/chapter12/ARGallery/ARGallery.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter12/ARGallery/ARGallery.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter12/ARGallery/ARGallery/Assets.xcassets/Art.arresourcegroup/bw_flowers.arreferenceimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "bw_flowers.jpg"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | },
12 | "properties" : {
13 | "width" : 30
14 | }
15 | }
--------------------------------------------------------------------------------
/chapter12/ARGallery/ARGallery/Assets.xcassets/Art.arresourcegroup/bw_flowers.arreferenceimage/bw_flowers.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery/ARGallery/Assets.xcassets/Art.arresourcegroup/bw_flowers.arreferenceimage/bw_flowers.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery/ARGallery/Assets.xcassets/Art.arresourcegroup/cactus.arreferenceimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "cactus.png"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | },
12 | "properties" : {
13 | "width" : 30
14 | }
15 | }
--------------------------------------------------------------------------------
/chapter12/ARGallery/ARGallery/Assets.xcassets/Art.arresourcegroup/cactus.arreferenceimage/cactus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery/ARGallery/Assets.xcassets/Art.arresourcegroup/cactus.arreferenceimage/cactus.png
--------------------------------------------------------------------------------
/chapter12/ARGallery/ARGallery/Assets.xcassets/Art.arresourcegroup/flowers.arreferenceimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "flowers.jpg"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | },
12 | "properties" : {
13 | "width" : 25
14 | }
15 | }
--------------------------------------------------------------------------------
/chapter12/ARGallery/ARGallery/Assets.xcassets/Art.arresourcegroup/flowers.arreferenceimage/flowers.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery/ARGallery/Assets.xcassets/Art.arresourcegroup/flowers.arreferenceimage/flowers.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery/ARGallery/Assets.xcassets/Art.arresourcegroup/text.arreferenceimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "text.jpg"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | },
12 | "properties" : {
13 | "width" : 16
14 | }
15 | }
--------------------------------------------------------------------------------
/chapter12/ARGallery/ARGallery/Assets.xcassets/Art.arresourcegroup/text.arreferenceimage/text.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery/ARGallery/Assets.xcassets/Art.arresourcegroup/text.arreferenceimage/text.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery/ARGallery/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter12/ARGallery/ARGallery/Assets.xcassets/img_1.imageset/img_1-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery/ARGallery/Assets.xcassets/img_1.imageset/img_1-1.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery/ARGallery/Assets.xcassets/img_1.imageset/img_1-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery/ARGallery/Assets.xcassets/img_1.imageset/img_1-2.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery/ARGallery/Assets.xcassets/img_1.imageset/img_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery/ARGallery/Assets.xcassets/img_1.imageset/img_1.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery/ARGallery/Assets.xcassets/img_2.imageset/img_2-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery/ARGallery/Assets.xcassets/img_2.imageset/img_2-1.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery/ARGallery/Assets.xcassets/img_2.imageset/img_2-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery/ARGallery/Assets.xcassets/img_2.imageset/img_2-2.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery/ARGallery/Assets.xcassets/img_2.imageset/img_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery/ARGallery/Assets.xcassets/img_2.imageset/img_2.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery/ARGallery/Assets.xcassets/img_3.imageset/img_3-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery/ARGallery/Assets.xcassets/img_3.imageset/img_3-1.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery/ARGallery/Assets.xcassets/img_3.imageset/img_3-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery/ARGallery/Assets.xcassets/img_3.imageset/img_3-2.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery/ARGallery/Assets.xcassets/img_3.imageset/img_3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery/ARGallery/Assets.xcassets/img_3.imageset/img_3.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery/ARGallery/Assets.xcassets/img_4.imageset/img_4-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery/ARGallery/Assets.xcassets/img_4.imageset/img_4-1.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery/ARGallery/Assets.xcassets/img_4.imageset/img_4-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery/ARGallery/Assets.xcassets/img_4.imageset/img_4-2.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery/ARGallery/Assets.xcassets/img_4.imageset/img_4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery/ARGallery/Assets.xcassets/img_4.imageset/img_4.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery/ARGallery/Assets.xcassets/img_5.imageset/img_5-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery/ARGallery/Assets.xcassets/img_5.imageset/img_5-1.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery/ARGallery/Assets.xcassets/img_5.imageset/img_5-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery/ARGallery/Assets.xcassets/img_5.imageset/img_5-2.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery/ARGallery/Assets.xcassets/img_5.imageset/img_5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery/ARGallery/Assets.xcassets/img_5.imageset/img_5.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery/ARGallery/Cells/GalleryCollectionItem.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class GalleryCollectionItem: UICollectionViewCell {
4 |
5 | @IBOutlet var imageView: UIImageView!
6 |
7 | override func prepareForReuse() {
8 | super.prepareForReuse()
9 | imageView.image = nil
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/chapter12/ARGallery_start/ARGallery.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter12/ARGallery_start/ARGallery.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter12/ARGallery_start/ARGallery/Assets.xcassets/Art.arresourcegroup/bw_flowers.arreferenceimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "bw_flowers.jpg"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | },
12 | "properties" : {
13 | "width" : 30
14 | }
15 | }
--------------------------------------------------------------------------------
/chapter12/ARGallery_start/ARGallery/Assets.xcassets/Art.arresourcegroup/bw_flowers.arreferenceimage/bw_flowers.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery_start/ARGallery/Assets.xcassets/Art.arresourcegroup/bw_flowers.arreferenceimage/bw_flowers.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery_start/ARGallery/Assets.xcassets/Art.arresourcegroup/cactus.arreferenceimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "cactus.png"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | },
12 | "properties" : {
13 | "width" : 30
14 | }
15 | }
--------------------------------------------------------------------------------
/chapter12/ARGallery_start/ARGallery/Assets.xcassets/Art.arresourcegroup/cactus.arreferenceimage/cactus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery_start/ARGallery/Assets.xcassets/Art.arresourcegroup/cactus.arreferenceimage/cactus.png
--------------------------------------------------------------------------------
/chapter12/ARGallery_start/ARGallery/Assets.xcassets/Art.arresourcegroup/flowers.arreferenceimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "flowers.jpg"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | },
12 | "properties" : {
13 | "width" : 25
14 | }
15 | }
--------------------------------------------------------------------------------
/chapter12/ARGallery_start/ARGallery/Assets.xcassets/Art.arresourcegroup/flowers.arreferenceimage/flowers.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery_start/ARGallery/Assets.xcassets/Art.arresourcegroup/flowers.arreferenceimage/flowers.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery_start/ARGallery/Assets.xcassets/Art.arresourcegroup/text.arreferenceimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "text.jpg"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | },
12 | "properties" : {
13 | "width" : 16
14 | }
15 | }
--------------------------------------------------------------------------------
/chapter12/ARGallery_start/ARGallery/Assets.xcassets/Art.arresourcegroup/text.arreferenceimage/text.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery_start/ARGallery/Assets.xcassets/Art.arresourcegroup/text.arreferenceimage/text.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery_start/ARGallery/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_1.imageset/img_1-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_1.imageset/img_1-1.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_1.imageset/img_1-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_1.imageset/img_1-2.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_1.imageset/img_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_1.imageset/img_1.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_2.imageset/img_2-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_2.imageset/img_2-1.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_2.imageset/img_2-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_2.imageset/img_2-2.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_2.imageset/img_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_2.imageset/img_2.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_3.imageset/img_3-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_3.imageset/img_3-1.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_3.imageset/img_3-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_3.imageset/img_3-2.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_3.imageset/img_3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_3.imageset/img_3.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_4.imageset/img_4-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_4.imageset/img_4-1.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_4.imageset/img_4-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_4.imageset/img_4-2.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_4.imageset/img_4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_4.imageset/img_4.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_5.imageset/img_5-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_5.imageset/img_5-1.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_5.imageset/img_5-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_5.imageset/img_5-2.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_5.imageset/img_5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARGallery_start/ARGallery/Assets.xcassets/img_5.imageset/img_5.jpg
--------------------------------------------------------------------------------
/chapter12/ARGallery_start/ARGallery/Cells/GalleryCollectionItem.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class GalleryCollectionItem: UICollectionViewCell {
4 |
5 | @IBOutlet var imageView: UIImageView!
6 |
7 | override func prepareForReuse() {
8 | super.prepareForReuse()
9 | imageView.image = nil
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/chapter12/ARQuicklook/ARQuicklook.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter12/ARQuicklook/ARQuicklook.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter12/ARQuicklook/ARQuicklook/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter12/ARQuicklook/ARQuicklook/Assets.xcassets/stratocaster.imageset/stratocaster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARQuicklook/ARQuicklook/Assets.xcassets/stratocaster.imageset/stratocaster.png
--------------------------------------------------------------------------------
/chapter12/ARQuicklook/ARQuicklook/Assets.xcassets/stratocaster.imageset/stratocaster@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARQuicklook/ARQuicklook/Assets.xcassets/stratocaster.imageset/stratocaster@2x.png
--------------------------------------------------------------------------------
/chapter12/ARQuicklook/ARQuicklook/Assets.xcassets/stratocaster.imageset/stratocaster@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARQuicklook/ARQuicklook/Assets.xcassets/stratocaster.imageset/stratocaster@3x.png
--------------------------------------------------------------------------------
/chapter12/ARQuicklook/ARQuicklook/stratocaster.usdz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/ARQuicklook/ARQuicklook/stratocaster.usdz
--------------------------------------------------------------------------------
/chapter12/SceneKitSample/SceneKitSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter12/SceneKitSample/SceneKitSample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter12/SceneKitSample/SceneKitSample/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter12/SpriteKitDefault/SpriteKitDefault.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter12/SpriteKitDefault/SpriteKitDefault.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter12/SpriteKitDefault/SpriteKitDefault/Actions.sks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/SpriteKitDefault/SpriteKitDefault/Actions.sks
--------------------------------------------------------------------------------
/chapter12/SpriteKitDefault/SpriteKitDefault/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter12/SpriteKitDefault/SpriteKitDefault/GameScene.sks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter12/SpriteKitDefault/SpriteKitDefault/GameScene.sks
--------------------------------------------------------------------------------
/chapter13/LocationServices/LocationServices.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter13/LocationServices/LocationServices.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter13/LocationServices/LocationServices/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter13/LocationServices/LocationServices/Assets.xcassets/geofence.imageset/geofence.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter13/LocationServices/LocationServices/Assets.xcassets/geofence.imageset/geofence.png
--------------------------------------------------------------------------------
/chapter13/LocationServices/LocationServices/Assets.xcassets/geofence.imageset/geofence@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter13/LocationServices/LocationServices/Assets.xcassets/geofence.imageset/geofence@2x.png
--------------------------------------------------------------------------------
/chapter13/LocationServices/LocationServices/Assets.xcassets/geofence.imageset/geofence@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter13/LocationServices/LocationServices/Assets.xcassets/geofence.imageset/geofence@3x.png
--------------------------------------------------------------------------------
/chapter13/LocationServices/LocationServices/Assets.xcassets/significant_changes.imageset/significant_changes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter13/LocationServices/LocationServices/Assets.xcassets/significant_changes.imageset/significant_changes.png
--------------------------------------------------------------------------------
/chapter13/LocationServices/LocationServices/Assets.xcassets/significant_changes.imageset/significant_changes@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter13/LocationServices/LocationServices/Assets.xcassets/significant_changes.imageset/significant_changes@2x.png
--------------------------------------------------------------------------------
/chapter13/LocationServices/LocationServices/Assets.xcassets/significant_changes.imageset/significant_changes@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter13/LocationServices/LocationServices/Assets.xcassets/significant_changes.imageset/significant_changes@3x.png
--------------------------------------------------------------------------------
/chapter13/LocationServices/LocationServices/Protocols/LocationManagerRequiring.swift:
--------------------------------------------------------------------------------
1 | protocol LocationHelperRequiring {
2 | var locationHelper: LocationHelper! { get set }
3 | }
4 |
--------------------------------------------------------------------------------
/chapter13/LocationServices_start/LocationServices.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter13/LocationServices_start/LocationServices.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter13/LocationServices_start/LocationServices/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter13/LocationServices_start/LocationServices/Assets.xcassets/geofence.imageset/geofence.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter13/LocationServices_start/LocationServices/Assets.xcassets/geofence.imageset/geofence.png
--------------------------------------------------------------------------------
/chapter13/LocationServices_start/LocationServices/Assets.xcassets/geofence.imageset/geofence@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter13/LocationServices_start/LocationServices/Assets.xcassets/geofence.imageset/geofence@2x.png
--------------------------------------------------------------------------------
/chapter13/LocationServices_start/LocationServices/Assets.xcassets/geofence.imageset/geofence@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter13/LocationServices_start/LocationServices/Assets.xcassets/geofence.imageset/geofence@3x.png
--------------------------------------------------------------------------------
/chapter13/LocationServices_start/LocationServices/Assets.xcassets/significant_changes.imageset/significant_changes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter13/LocationServices_start/LocationServices/Assets.xcassets/significant_changes.imageset/significant_changes.png
--------------------------------------------------------------------------------
/chapter13/LocationServices_start/LocationServices/Assets.xcassets/significant_changes.imageset/significant_changes@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter13/LocationServices_start/LocationServices/Assets.xcassets/significant_changes.imageset/significant_changes@2x.png
--------------------------------------------------------------------------------
/chapter13/LocationServices_start/LocationServices/Assets.xcassets/significant_changes.imageset/significant_changes@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter13/LocationServices_start/LocationServices/Assets.xcassets/significant_changes.imageset/significant_changes@3x.png
--------------------------------------------------------------------------------
/chapter13/LocationServices_start/LocationServices/Protocols/LocationManagerRequiring.swift:
--------------------------------------------------------------------------------
1 | protocol LocationHelperRequiring {
2 | var locationHelper: LocationHelper! { get set }
3 | }
4 |
--------------------------------------------------------------------------------
/chapter14/CreateML.playground/Pages/Vision.xcplaygroundpage/Contents.swift:
--------------------------------------------------------------------------------
1 | import CreateML
2 | import Foundation
3 |
4 | let dataUrl = URL(fileURLWithPath: "/path/to/trainingdata")
5 | let source = MLImageClassifier.DataSource.labeledDirectories(at: dataUrl)
6 | let classifier = try! MLImageClassifier(trainingData: source)
7 |
8 | try! classifier.write(toFile: "~/Desktop/CarClassifier.mlmodel")
9 |
--------------------------------------------------------------------------------
/chapter14/CreateML.playground/contents.xcplayground:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter14/CreateML.playground/playground.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter14/CreateML.playground/playground.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter14/ImageAnalyzer/ImageAnalyzer.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter14/ImageAnalyzer/ImageAnalyzer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter14/ImageAnalyzer/ImageAnalyzer/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter14/ImageAnalyzer/ImageAnalyzer/MobileNet.mlmodel:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter14/ImageAnalyzer/ImageAnalyzer/MobileNet.mlmodel
--------------------------------------------------------------------------------
/chapter14/ImageAnalyzer_start/ImageAnalyzer.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter14/ImageAnalyzer_start/ImageAnalyzer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter14/ImageAnalyzer_start/ImageAnalyzer/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter14/TextAnalyzer/SentimentPolarity.mlmodel:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter14/TextAnalyzer/SentimentPolarity.mlmodel
--------------------------------------------------------------------------------
/chapter14/TextAnalyzer/TextAnalyzer.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter14/TextAnalyzer/TextAnalyzer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter14/TextAnalyzer/TextAnalyzer/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter14/TextAnalyzer_start/SentimentPolarity.mlmodel:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter14/TextAnalyzer_start/SentimentPolarity.mlmodel
--------------------------------------------------------------------------------
/chapter14/TextAnalyzer_start/TextAnalyzer.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter14/TextAnalyzer_start/TextAnalyzer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter14/TextAnalyzer_start/TextAnalyzer/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter15/Trekker/Trekker.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter15/Trekker/Trekker.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter15/Trekker/Trekker/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter15/Trekker/Trekker/Protocols/HealthKitRequiring.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol HealthKitRequiring {
4 | var healthKitHelper: HealthKitHelper! { get set }
5 | }
6 |
--------------------------------------------------------------------------------
/chapter15/Trekker/Trekker/Protocols/LocationRequiring.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol LocationRequiring {
4 | var locationHelper: LocationHelper! { get set }
5 | }
6 |
--------------------------------------------------------------------------------
/chapter15/Trekker/Trekker/Trekker.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.developer.healthkit
6 |
7 | com.apple.developer.healthkit.access
8 |
9 | health-records
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/chapter15/Trekker_start/Trekker.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter15/Trekker_start/Trekker.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter15/Trekker_start/Trekker/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter15/Trekker_start/Trekker/Protocols/HealthKitRequiring.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol HealthKitRequiring {
4 | var healthKitHelper: HealthKitHelper! { get set }
5 | }
6 |
--------------------------------------------------------------------------------
/chapter15/Trekker_start/Trekker/Protocols/LocationRequiring.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol LocationRequiring {
4 | var locationHelper: LocationHelper! { get set }
5 | }
6 |
--------------------------------------------------------------------------------
/chapter15/Trekker_start/Trekker/Trekker.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.developer.healthkit
6 |
7 | com.apple.developer.healthkit.access
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/chapter16/HairDressers/AppointmentIntent/AppointmentIntent.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.application-groups
6 |
7 | group.donnywals.hairdressers
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/chapter16/HairDressers/Hairdressers.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter16/HairDressers/Hairdressers.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter16/HairDressers/Hairdressers/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter16/HairDressers/Hairdressers/Assets.xcassets/calendar.imageset/calendar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter16/HairDressers/Hairdressers/Assets.xcassets/calendar.imageset/calendar.png
--------------------------------------------------------------------------------
/chapter16/HairDressers/Hairdressers/Assets.xcassets/calendar.imageset/calendar@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter16/HairDressers/Hairdressers/Assets.xcassets/calendar.imageset/calendar@2x.png
--------------------------------------------------------------------------------
/chapter16/HairDressers/Hairdressers/Assets.xcassets/calendar.imageset/calendar@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter16/HairDressers/Hairdressers/Assets.xcassets/calendar.imageset/calendar@3x.png
--------------------------------------------------------------------------------
/chapter16/HairDressers/Hairdressers/Assets.xcassets/chat.imageset/chat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter16/HairDressers/Hairdressers/Assets.xcassets/chat.imageset/chat.png
--------------------------------------------------------------------------------
/chapter16/HairDressers/Hairdressers/Assets.xcassets/chat.imageset/chat@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter16/HairDressers/Hairdressers/Assets.xcassets/chat.imageset/chat@2x.png
--------------------------------------------------------------------------------
/chapter16/HairDressers/Hairdressers/Assets.xcassets/chat.imageset/chat@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter16/HairDressers/Hairdressers/Assets.xcassets/chat.imageset/chat@3x.png
--------------------------------------------------------------------------------
/chapter16/HairDressers/Hairdressers/Cells/ChatTableViewCell.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class ChatTableViewCell: UITableViewCell {
4 | @IBOutlet var messageLabel: UILabel!
5 | }
6 |
--------------------------------------------------------------------------------
/chapter16/HairDressers/Hairdressers/Data/Hairdressers.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Haley
6 | Martin
7 | Eddy
8 | Jessica
9 | Yolanda
10 | Jeffrey
11 |
12 |
13 |
--------------------------------------------------------------------------------
/chapter16/HairDressers/Hairdressers/Data/HairdressersDataSource.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | struct HairdressersDataSource {
4 | static var hairdressers: [String] = {
5 | let fileUrl = Bundle.main.url(forResource: "Hairdressers", withExtension: "plist")!
6 | let data = try! Data(contentsOf: fileUrl)
7 | let decoder = PropertyListDecoder()
8 | return try! decoder.decode([String].self, from: data)
9 | }()
10 | }
11 |
--------------------------------------------------------------------------------
/chapter16/HairDressers/Hairdressers/Extensions/NSManagedObjectContext.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | extension NSManagedObjectContext {
4 | func persist(_ block: @escaping () -> ()) {
5 | self.perform {
6 | block()
7 |
8 | do {
9 | try self.save()
10 | } catch {
11 | self.rollback()
12 | }
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/chapter16/HairDressers/Hairdressers/Extensions/NSUserActivity.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | extension NSUserActivity {
4 | static var identifierForAppointment: String {
5 | return "com.donnywals.hairdressers.appointment"
6 | }
7 |
8 | static func appointmentActivity() -> NSUserActivity {
9 | return NSUserActivity(activityType: identifierForAppointment)
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/chapter16/HairDressers/Hairdressers/Hairdressers.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.developer.siri
6 |
7 | com.apple.security.application-groups
8 |
9 | group.donnywals.hairdressers
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/chapter16/HairDressers/MessageHairdresserIntent/MessageHairdresserIntent.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.application-groups
6 |
7 | group.donnywals.hairdressers
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/chapter16/HairDressers_start/Hairdressers.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter16/HairDressers_start/Hairdressers.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter16/HairDressers_start/Hairdressers/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter16/HairDressers_start/Hairdressers/Assets.xcassets/calendar.imageset/calendar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter16/HairDressers_start/Hairdressers/Assets.xcassets/calendar.imageset/calendar.png
--------------------------------------------------------------------------------
/chapter16/HairDressers_start/Hairdressers/Assets.xcassets/calendar.imageset/calendar@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter16/HairDressers_start/Hairdressers/Assets.xcassets/calendar.imageset/calendar@2x.png
--------------------------------------------------------------------------------
/chapter16/HairDressers_start/Hairdressers/Assets.xcassets/calendar.imageset/calendar@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter16/HairDressers_start/Hairdressers/Assets.xcassets/calendar.imageset/calendar@3x.png
--------------------------------------------------------------------------------
/chapter16/HairDressers_start/Hairdressers/Assets.xcassets/chat.imageset/chat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter16/HairDressers_start/Hairdressers/Assets.xcassets/chat.imageset/chat.png
--------------------------------------------------------------------------------
/chapter16/HairDressers_start/Hairdressers/Assets.xcassets/chat.imageset/chat@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter16/HairDressers_start/Hairdressers/Assets.xcassets/chat.imageset/chat@2x.png
--------------------------------------------------------------------------------
/chapter16/HairDressers_start/Hairdressers/Assets.xcassets/chat.imageset/chat@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter16/HairDressers_start/Hairdressers/Assets.xcassets/chat.imageset/chat@3x.png
--------------------------------------------------------------------------------
/chapter16/HairDressers_start/Hairdressers/Cells/ChatTableViewCell.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class ChatTableViewCell: UITableViewCell {
4 | @IBOutlet var messageLabel: UILabel!
5 | }
6 |
--------------------------------------------------------------------------------
/chapter16/HairDressers_start/Hairdressers/Data/Hairdressers.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Haley
6 | Martin
7 | Eddy
8 | Jessica
9 | Yolanda
10 | Jeffrey
11 |
12 |
13 |
--------------------------------------------------------------------------------
/chapter16/HairDressers_start/Hairdressers/Data/HairdressersDataSource.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | struct HairdressersDataSource {
4 | static var hairdressers: [String] = {
5 | let fileUrl = Bundle.main.url(forResource: "Hairdressers", withExtension: "plist")!
6 | let data = try! Data(contentsOf: fileUrl)
7 | let decoder = PropertyListDecoder()
8 | return try! decoder.decode([String].self, from: data)
9 | }()
10 | }
11 |
--------------------------------------------------------------------------------
/chapter16/HairDressers_start/Hairdressers/Extensions/NSManagedObjectContext.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | extension NSManagedObjectContext {
4 | func persist(_ block: @escaping () -> ()) {
5 | self.perform {
6 | block()
7 |
8 | do {
9 | try self.save()
10 | } catch {
11 | self.rollback()
12 | }
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/chapter17/Captured/Captured.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter17/Captured/Captured.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter17/Captured/Captured/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter17/Captured/Captured/Extensions/UIViewController.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | extension UIViewController {
4 | func presentAlertWithTitle(_ title: String, message: String) {
5 | let alert = UIAlertController(title: title, message: message, preferredStyle: .alert)
6 | let action = UIAlertAction(title: "Ok", style: .default, handler: nil)
7 | alert.addAction(action)
8 | present(alert, animated: true, completion: nil)
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/chapter17/Captured/Captured/ViewControllers/ViewController.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class ViewController: UIViewController {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/chapter17/Captured_start/Captured.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter17/Captured_start/Captured.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter17/Captured_start/Captured/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | @UIApplicationMain
4 | class AppDelegate: UIResponder, UIApplicationDelegate {
5 |
6 | var window: UIWindow?
7 |
8 |
9 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
10 | // Override point for customization after application launch.
11 | return true
12 | }
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/chapter17/Captured_start/Captured/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter17/Captured_start/Captured/ViewControllers/ViewController.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class ViewController: UIViewController {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/chapter17/MediaPlayback/MediaPlayback.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter17/MediaPlayback/MediaPlayback.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter17/MediaPlayback/MediaPlayback/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter17/MediaPlayback/MediaPlayback/Assets.xcassets/music.imageset/music.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter17/MediaPlayback/MediaPlayback/Assets.xcassets/music.imageset/music.png
--------------------------------------------------------------------------------
/chapter17/MediaPlayback/MediaPlayback/Assets.xcassets/music.imageset/music@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter17/MediaPlayback/MediaPlayback/Assets.xcassets/music.imageset/music@2x.png
--------------------------------------------------------------------------------
/chapter17/MediaPlayback/MediaPlayback/Assets.xcassets/music.imageset/music@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter17/MediaPlayback/MediaPlayback/Assets.xcassets/music.imageset/music@3x.png
--------------------------------------------------------------------------------
/chapter17/MediaPlayback/MediaPlayback/Assets.xcassets/video.imageset/video.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter17/MediaPlayback/MediaPlayback/Assets.xcassets/video.imageset/video.png
--------------------------------------------------------------------------------
/chapter17/MediaPlayback/MediaPlayback/Assets.xcassets/video.imageset/video@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter17/MediaPlayback/MediaPlayback/Assets.xcassets/video.imageset/video@2x.png
--------------------------------------------------------------------------------
/chapter17/MediaPlayback/MediaPlayback/Assets.xcassets/video.imageset/video@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter17/MediaPlayback/MediaPlayback/Assets.xcassets/video.imageset/video@3x.png
--------------------------------------------------------------------------------
/chapter17/MediaPlayback/MediaPlayback/one.mp3:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:6462d2561d68264849560f61d97e036fb40efe1a9be1448c18602d8dd8603a07
3 | size 770077
4 |
--------------------------------------------------------------------------------
/chapter17/MediaPlayback/MediaPlayback/samplevideo.mp4:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:3aa2d8946ec7cf3b50b7148fb3338ca421e6ec34987b20a4044845d674794e3e
3 | size 355856562
4 |
--------------------------------------------------------------------------------
/chapter17/MediaPlayback/MediaPlayback/three.mp3:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:c2b1acfdab362993cc407aa94b0ac593a6df144e4b2e394ad78221df06866fe4
3 | size 6088608
4 |
--------------------------------------------------------------------------------
/chapter17/MediaPlayback/MediaPlayback/two.mp3:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:2a8dc63735cc25d2fdb262f127d697d4b8101bd100e512a8616bf833fb8c1b50
3 | size 9187904
4 |
--------------------------------------------------------------------------------
/chapter17/MediaPlayback_start/MediaPlayback.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter17/MediaPlayback_start/MediaPlayback.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter17/MediaPlayback_start/MediaPlayback/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter17/MediaPlayback_start/MediaPlayback/Assets.xcassets/music.imageset/music.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter17/MediaPlayback_start/MediaPlayback/Assets.xcassets/music.imageset/music.png
--------------------------------------------------------------------------------
/chapter17/MediaPlayback_start/MediaPlayback/Assets.xcassets/music.imageset/music@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter17/MediaPlayback_start/MediaPlayback/Assets.xcassets/music.imageset/music@2x.png
--------------------------------------------------------------------------------
/chapter17/MediaPlayback_start/MediaPlayback/Assets.xcassets/music.imageset/music@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter17/MediaPlayback_start/MediaPlayback/Assets.xcassets/music.imageset/music@3x.png
--------------------------------------------------------------------------------
/chapter17/MediaPlayback_start/MediaPlayback/Assets.xcassets/video.imageset/video.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter17/MediaPlayback_start/MediaPlayback/Assets.xcassets/video.imageset/video.png
--------------------------------------------------------------------------------
/chapter17/MediaPlayback_start/MediaPlayback/Assets.xcassets/video.imageset/video@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter17/MediaPlayback_start/MediaPlayback/Assets.xcassets/video.imageset/video@2x.png
--------------------------------------------------------------------------------
/chapter17/MediaPlayback_start/MediaPlayback/Assets.xcassets/video.imageset/video@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter17/MediaPlayback_start/MediaPlayback/Assets.xcassets/video.imageset/video@3x.png
--------------------------------------------------------------------------------
/chapter17/MediaPlayback_start/MediaPlayback/ViewControllers/VideoViewController.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class VideoViewController: UIViewController {
4 |
5 | override func viewDidLoad() {
6 | super.viewDidLoad()
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/chapter18/Notifications/Notifications.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter18/Notifications/Notifications.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter18/Notifications/Notifications/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter18/Notifications/Notifications/Assets.xcassets/add.imageset/add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter18/Notifications/Notifications/Assets.xcassets/add.imageset/add.png
--------------------------------------------------------------------------------
/chapter18/Notifications/Notifications/Assets.xcassets/add.imageset/add@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter18/Notifications/Notifications/Assets.xcassets/add.imageset/add@2x.png
--------------------------------------------------------------------------------
/chapter18/Notifications/Notifications/Assets.xcassets/add.imageset/add@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter18/Notifications/Notifications/Assets.xcassets/add.imageset/add@3x.png
--------------------------------------------------------------------------------
/chapter18/Notifications/Notifications/Assets.xcassets/history.imageset/history.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter18/Notifications/Notifications/Assets.xcassets/history.imageset/history.png
--------------------------------------------------------------------------------
/chapter18/Notifications/Notifications/Assets.xcassets/history.imageset/history@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter18/Notifications/Notifications/Assets.xcassets/history.imageset/history@2x.png
--------------------------------------------------------------------------------
/chapter18/Notifications/Notifications/Assets.xcassets/history.imageset/history@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter18/Notifications/Notifications/Assets.xcassets/history.imageset/history@3x.png
--------------------------------------------------------------------------------
/chapter18/Notifications/Notifications/Notifications.xcdatamodeld/.xccurrentversion:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | _XCCurrentVersionName
6 | Notifications.xcdatamodel
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter18/Notifications/Notifications/Protocols/PersistentContainerRequiring.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | protocol PersistentContainerRequiring {
4 | var persistentContainer: NSPersistentContainer! { get set }
5 | }
6 |
--------------------------------------------------------------------------------
/chapter18/Notifications/ReminderContent/ReminderContent.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.application-groups
6 |
7 | group.com.donnywals.notifications-app
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/chapter18/Notifications/ReminderUI/ReminderUI.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.application-groups
6 |
7 | group.com.donnywals.notifications-app
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/chapter18/Notifications_start/Notifications.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter18/Notifications_start/Notifications.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter18/Notifications_start/Notifications/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter18/Notifications_start/Notifications/Assets.xcassets/add.imageset/add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter18/Notifications_start/Notifications/Assets.xcassets/add.imageset/add.png
--------------------------------------------------------------------------------
/chapter18/Notifications_start/Notifications/Assets.xcassets/add.imageset/add@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter18/Notifications_start/Notifications/Assets.xcassets/add.imageset/add@2x.png
--------------------------------------------------------------------------------
/chapter18/Notifications_start/Notifications/Assets.xcassets/add.imageset/add@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter18/Notifications_start/Notifications/Assets.xcassets/add.imageset/add@3x.png
--------------------------------------------------------------------------------
/chapter18/Notifications_start/Notifications/Assets.xcassets/history.imageset/history.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter18/Notifications_start/Notifications/Assets.xcassets/history.imageset/history.png
--------------------------------------------------------------------------------
/chapter18/Notifications_start/Notifications/Assets.xcassets/history.imageset/history@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter18/Notifications_start/Notifications/Assets.xcassets/history.imageset/history@2x.png
--------------------------------------------------------------------------------
/chapter18/Notifications_start/Notifications/Assets.xcassets/history.imageset/history@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter18/Notifications_start/Notifications/Assets.xcassets/history.imageset/history@3x.png
--------------------------------------------------------------------------------
/chapter18/Notifications_start/Notifications/Helpers/PersistentHelper.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | struct PersistentHelper {
4 | static let persistentContainer: NSPersistentContainer = {
5 | let container = NSPersistentContainer(name: "Notifications")
6 |
7 | container.loadPersistentStores(completionHandler: { (storeDescription, error) in
8 |
9 | })
10 | return container
11 | }()
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/chapter18/Notifications_start/Notifications/Notifications.xcdatamodeld/.xccurrentversion:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | _XCCurrentVersionName
6 | Notifications.xcdatamodel
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter18/Notifications_start/Notifications/Protocols/PersistentContainerRequiring.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | protocol PersistentContainerRequiring {
4 | var persistentContainer: NSPersistentContainer! { get set }
5 | }
6 |
--------------------------------------------------------------------------------
/chapter19/The Daily Quote/The Daily Quote Widget/The Daily Quote Widget.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.application-groups
6 |
7 | group.donnywals.thedailyquote
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/chapter19/The Daily Quote/The Daily Quote.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter19/The Daily Quote/The Daily Quote.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter19/The Daily Quote/The Daily Quote/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | @UIApplicationMain
4 | class AppDelegate: UIResponder, UIApplicationDelegate {
5 |
6 | var window: UIWindow?
7 |
8 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
9 | // Override point for customization after application launch.
10 | return true
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/chapter19/The Daily Quote/The Daily Quote/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter19/The Daily Quote/The Daily Quote/QuoteViewController.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class QuoteViewController: UIViewController {
4 |
5 | @IBOutlet var quoteLabel: UILabel!
6 | @IBOutlet var quoteCreator: UILabel!
7 |
8 | override func viewDidLoad() {
9 | super.viewDidLoad()
10 |
11 | let quote = Quote.current
12 | quoteLabel.text = quote.text
13 | quoteCreator.text = quote.creator
14 | }
15 | }
16 |
17 |
--------------------------------------------------------------------------------
/chapter19/The Daily Quote/The Daily Quote/The Daily Quote.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.application-groups
6 |
7 | group.donnywals.thedailyquote
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/chapter19/The Daily Quote_start/The Daily Quote.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter19/The Daily Quote_start/The Daily Quote.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter19/The Daily Quote_start/The Daily Quote/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter19/The Daily Quote_start/The Daily Quote/QuoteViewController.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class QuoteViewController: UIViewController {
4 |
5 | @IBOutlet var quoteLabel: UILabel!
6 | @IBOutlet var quoteCreator: UILabel!
7 |
8 | override func viewDidLoad() {
9 | super.viewDidLoad()
10 |
11 | let quote = Quote.current
12 | quoteLabel.text = quote.text
13 | quoteCreator.text = quote.creator
14 | }
15 | }
16 |
17 |
--------------------------------------------------------------------------------
/chapter2/Hello-Contacts/Hello-Contacts.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter2/Hello-Contacts/Hello-Contacts.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter2/Hello-Contacts/Hello-Contacts/LayoutExploration.playground/contents.xcplayground:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/chapter2/Hello-Contacts/Hello-Contacts/LayoutExploration.playground/playground.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter2/Hello-Contacts/Hello-Contacts/LayoutExploration.playground/playground.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter20/ARGallery/ARGallery.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter20/ARGallery/ARGallery.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter20/ARGallery/ARGallery/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | @UIApplicationMain
4 | class AppDelegate: UIResponder, UIApplicationDelegate {
5 |
6 | var window: UIWindow?
7 |
8 |
9 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
10 | // Override point for customization after application launch.
11 | return true
12 | }
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/chapter20/ARGallery/ARGallery/Assets.xcassets/Art.arresourcegroup/bw_flowers.arreferenceimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "bw_flowers.jpg"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | },
12 | "properties" : {
13 | "width" : 30
14 | }
15 | }
--------------------------------------------------------------------------------
/chapter20/ARGallery/ARGallery/Assets.xcassets/Art.arresourcegroup/bw_flowers.arreferenceimage/bw_flowers.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery/ARGallery/Assets.xcassets/Art.arresourcegroup/bw_flowers.arreferenceimage/bw_flowers.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery/ARGallery/Assets.xcassets/Art.arresourcegroup/cactus.arreferenceimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "cactus.png"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | },
12 | "properties" : {
13 | "width" : 30
14 | }
15 | }
--------------------------------------------------------------------------------
/chapter20/ARGallery/ARGallery/Assets.xcassets/Art.arresourcegroup/cactus.arreferenceimage/cactus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery/ARGallery/Assets.xcassets/Art.arresourcegroup/cactus.arreferenceimage/cactus.png
--------------------------------------------------------------------------------
/chapter20/ARGallery/ARGallery/Assets.xcassets/Art.arresourcegroup/flowers.arreferenceimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "flowers.jpg"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | },
12 | "properties" : {
13 | "width" : 25
14 | }
15 | }
--------------------------------------------------------------------------------
/chapter20/ARGallery/ARGallery/Assets.xcassets/Art.arresourcegroup/flowers.arreferenceimage/flowers.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery/ARGallery/Assets.xcassets/Art.arresourcegroup/flowers.arreferenceimage/flowers.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery/ARGallery/Assets.xcassets/Art.arresourcegroup/text.arreferenceimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "text.jpg"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | },
12 | "properties" : {
13 | "width" : 16
14 | }
15 | }
--------------------------------------------------------------------------------
/chapter20/ARGallery/ARGallery/Assets.xcassets/Art.arresourcegroup/text.arreferenceimage/text.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery/ARGallery/Assets.xcassets/Art.arresourcegroup/text.arreferenceimage/text.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery/ARGallery/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter20/ARGallery/ARGallery/Assets.xcassets/img_1.imageset/img_1-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery/ARGallery/Assets.xcassets/img_1.imageset/img_1-1.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery/ARGallery/Assets.xcassets/img_1.imageset/img_1-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery/ARGallery/Assets.xcassets/img_1.imageset/img_1-2.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery/ARGallery/Assets.xcassets/img_1.imageset/img_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery/ARGallery/Assets.xcassets/img_1.imageset/img_1.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery/ARGallery/Assets.xcassets/img_2.imageset/img_2-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery/ARGallery/Assets.xcassets/img_2.imageset/img_2-1.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery/ARGallery/Assets.xcassets/img_2.imageset/img_2-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery/ARGallery/Assets.xcassets/img_2.imageset/img_2-2.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery/ARGallery/Assets.xcassets/img_2.imageset/img_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery/ARGallery/Assets.xcassets/img_2.imageset/img_2.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery/ARGallery/Assets.xcassets/img_3.imageset/img_3-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery/ARGallery/Assets.xcassets/img_3.imageset/img_3-1.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery/ARGallery/Assets.xcassets/img_3.imageset/img_3-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery/ARGallery/Assets.xcassets/img_3.imageset/img_3-2.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery/ARGallery/Assets.xcassets/img_3.imageset/img_3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery/ARGallery/Assets.xcassets/img_3.imageset/img_3.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery/ARGallery/Assets.xcassets/img_4.imageset/img_4-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery/ARGallery/Assets.xcassets/img_4.imageset/img_4-1.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery/ARGallery/Assets.xcassets/img_4.imageset/img_4-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery/ARGallery/Assets.xcassets/img_4.imageset/img_4-2.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery/ARGallery/Assets.xcassets/img_4.imageset/img_4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery/ARGallery/Assets.xcassets/img_4.imageset/img_4.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery/ARGallery/Assets.xcassets/img_5.imageset/img_5-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery/ARGallery/Assets.xcassets/img_5.imageset/img_5-1.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery/ARGallery/Assets.xcassets/img_5.imageset/img_5-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery/ARGallery/Assets.xcassets/img_5.imageset/img_5-2.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery/ARGallery/Assets.xcassets/img_5.imageset/img_5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery/ARGallery/Assets.xcassets/img_5.imageset/img_5.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery/ARGallery/Cells/GalleryCollectionItem.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class GalleryCollectionItem: UICollectionViewCell {
4 |
5 | @IBOutlet var imageView: UIImageView!
6 |
7 | override func prepareForReuse() {
8 | super.prepareForReuse()
9 | imageView.image = nil
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/chapter20/ARGallery_start/ARGallery.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter20/ARGallery_start/ARGallery.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter20/ARGallery_start/ARGallery/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | @UIApplicationMain
4 | class AppDelegate: UIResponder, UIApplicationDelegate {
5 |
6 | var window: UIWindow?
7 |
8 |
9 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
10 | // Override point for customization after application launch.
11 | return true
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/chapter20/ARGallery_start/ARGallery/Assets.xcassets/Art.arresourcegroup/bw_flowers.arreferenceimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "bw_flowers.jpg"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | },
12 | "properties" : {
13 | "width" : 30
14 | }
15 | }
--------------------------------------------------------------------------------
/chapter20/ARGallery_start/ARGallery/Assets.xcassets/Art.arresourcegroup/bw_flowers.arreferenceimage/bw_flowers.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery_start/ARGallery/Assets.xcassets/Art.arresourcegroup/bw_flowers.arreferenceimage/bw_flowers.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery_start/ARGallery/Assets.xcassets/Art.arresourcegroup/cactus.arreferenceimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "cactus.png"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | },
12 | "properties" : {
13 | "width" : 30
14 | }
15 | }
--------------------------------------------------------------------------------
/chapter20/ARGallery_start/ARGallery/Assets.xcassets/Art.arresourcegroup/cactus.arreferenceimage/cactus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery_start/ARGallery/Assets.xcassets/Art.arresourcegroup/cactus.arreferenceimage/cactus.png
--------------------------------------------------------------------------------
/chapter20/ARGallery_start/ARGallery/Assets.xcassets/Art.arresourcegroup/flowers.arreferenceimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "flowers.jpg"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | },
12 | "properties" : {
13 | "width" : 25
14 | }
15 | }
--------------------------------------------------------------------------------
/chapter20/ARGallery_start/ARGallery/Assets.xcassets/Art.arresourcegroup/flowers.arreferenceimage/flowers.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery_start/ARGallery/Assets.xcassets/Art.arresourcegroup/flowers.arreferenceimage/flowers.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery_start/ARGallery/Assets.xcassets/Art.arresourcegroup/text.arreferenceimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "text.jpg"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | },
12 | "properties" : {
13 | "width" : 16
14 | }
15 | }
--------------------------------------------------------------------------------
/chapter20/ARGallery_start/ARGallery/Assets.xcassets/Art.arresourcegroup/text.arreferenceimage/text.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery_start/ARGallery/Assets.xcassets/Art.arresourcegroup/text.arreferenceimage/text.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery_start/ARGallery/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_1.imageset/img_1-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_1.imageset/img_1-1.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_1.imageset/img_1-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_1.imageset/img_1-2.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_1.imageset/img_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_1.imageset/img_1.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_2.imageset/img_2-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_2.imageset/img_2-1.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_2.imageset/img_2-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_2.imageset/img_2-2.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_2.imageset/img_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_2.imageset/img_2.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_3.imageset/img_3-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_3.imageset/img_3-1.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_3.imageset/img_3-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_3.imageset/img_3-2.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_3.imageset/img_3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_3.imageset/img_3.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_4.imageset/img_4-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_4.imageset/img_4-1.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_4.imageset/img_4-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_4.imageset/img_4-2.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_4.imageset/img_4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_4.imageset/img_4.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_5.imageset/img_5-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_5.imageset/img_5-1.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_5.imageset/img_5-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_5.imageset/img_5-2.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_5.imageset/img_5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter20/ARGallery_start/ARGallery/Assets.xcassets/img_5.imageset/img_5.jpg
--------------------------------------------------------------------------------
/chapter20/ARGallery_start/ARGallery/Cells/GalleryCollectionItem.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class GalleryCollectionItem: UICollectionViewCell {
4 |
5 | @IBOutlet var imageView: UIImageView!
6 |
7 | override func prepareForReuse() {
8 | super.prepareForReuse()
9 | imageView.image = nil
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/chapter20/PlainDragDrop/PlainDragDrop.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter20/PlainDragDrop/PlainDragDrop.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter20/PlainDragDrop/PlainDragDrop/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter20/PlainDragDrop_start/PlainDragDrop.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter20/PlainDragDrop_start/PlainDragDrop.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter20/PlainDragDrop_start/PlainDragDrop/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter20/PlainDragDrop_start/PlainDragDrop/ViewControllers/DragDropViewController.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class DragDropViewController: UIViewController {
4 |
5 | @IBOutlet var imageView: UIImageView!
6 | @IBOutlet var dropArea: UIImageView!
7 |
8 | override func viewDidLoad() {
9 | super.viewDidLoad()
10 | // Do any additional setup after loading the view, typically from a nib.
11 | }
12 |
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/chapter21/MustC/MustC.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter21/MustC/MustC.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter21/MustC/MustC/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter21/MustC/MustC/Assets.xcassets/family_members.imageset/family_members.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter21/MustC/MustC/Assets.xcassets/family_members.imageset/family_members.png
--------------------------------------------------------------------------------
/chapter21/MustC/MustC/Assets.xcassets/family_members.imageset/family_members@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter21/MustC/MustC/Assets.xcassets/family_members.imageset/family_members@2x.png
--------------------------------------------------------------------------------
/chapter21/MustC/MustC/Assets.xcassets/family_members.imageset/family_members@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter21/MustC/MustC/Assets.xcassets/family_members.imageset/family_members@3x.png
--------------------------------------------------------------------------------
/chapter21/MustC/MustC/Assets.xcassets/movies.imageset/movies.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter21/MustC/MustC/Assets.xcassets/movies.imageset/movies.png
--------------------------------------------------------------------------------
/chapter21/MustC/MustC/Assets.xcassets/movies.imageset/movies@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter21/MustC/MustC/Assets.xcassets/movies.imageset/movies@2x.png
--------------------------------------------------------------------------------
/chapter21/MustC/MustC/Assets.xcassets/movies.imageset/movies@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter21/MustC/MustC/Assets.xcassets/movies.imageset/movies@3x.png
--------------------------------------------------------------------------------
/chapter21/MustC/MustC/Extensions/CKRecord.swift:
--------------------------------------------------------------------------------
1 | import CloudKit
2 |
3 | extension CKRecord {
4 | var encodedSystemFields: Data {
5 | let coder = NSKeyedArchiver(requiringSecureCoding: true)
6 | self.encodeSystemFields(with: coder)
7 | coder.finishEncoding()
8 |
9 | return coder.encodedData
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/chapter21/MustC/MustC/Extensions/NSManagedObjectContext.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | extension NSManagedObjectContext {
4 | func persist(block: @escaping () -> Void) {
5 | perform {
6 | block()
7 |
8 | do {
9 | try self.save()
10 | } catch {
11 | self.rollback()
12 | }
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/chapter21/MustC/MustC/Extensions/NSPersistentContainer.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | extension NSPersistentContainer {
4 | func saveContextIfNeeded() {
5 | if viewContext.hasChanges {
6 | do {
7 | try viewContext.save()
8 | } catch {
9 | let nserror = error as NSError
10 | fatalError("Unresolved error \(nserror), \(nserror.userInfo)")
11 | }
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/chapter21/MustC/MustC/Helpers/MovieDBResponse.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | struct MovieDBLookupResponse: Codable {
4 |
5 | struct MovieDBMovie: Codable {
6 | let popularity: Double?
7 | let id: Int?
8 | }
9 |
10 | let results: [MovieDBMovie]
11 | }
12 |
--------------------------------------------------------------------------------
/chapter21/MustC/MustC/Protocols/AddFamilyMemberDelegate.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol AddFamilyMemberDelegate {
4 | func saveFamilyMember(withName name: String)
5 | }
6 |
--------------------------------------------------------------------------------
/chapter21/MustC/MustC/Protocols/AddMovieDelegate.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol AddMovieDelegate {
4 | func saveMovie(withName name: String)
5 | }
6 |
--------------------------------------------------------------------------------
/chapter21/MustC/MustC/Protocols/CloudStoreRequiring.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol CloudStoreRequiring {
4 | var cloudStore: CloudStore! { get set }
5 | }
6 |
--------------------------------------------------------------------------------
/chapter21/MustC/MustC/Protocols/PersistenContainerRequiring.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | protocol PersistenContainerRequiring {
4 | var persistentContainer: NSPersistentContainer! { get set }
5 | }
6 |
--------------------------------------------------------------------------------
/chapter21/MustC_start/MustC.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter21/MustC_start/MustC.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter21/MustC_start/MustC/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter21/MustC_start/MustC/Assets.xcassets/family_members.imageset/family_members.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter21/MustC_start/MustC/Assets.xcassets/family_members.imageset/family_members.png
--------------------------------------------------------------------------------
/chapter21/MustC_start/MustC/Assets.xcassets/family_members.imageset/family_members@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter21/MustC_start/MustC/Assets.xcassets/family_members.imageset/family_members@2x.png
--------------------------------------------------------------------------------
/chapter21/MustC_start/MustC/Assets.xcassets/family_members.imageset/family_members@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter21/MustC_start/MustC/Assets.xcassets/family_members.imageset/family_members@3x.png
--------------------------------------------------------------------------------
/chapter21/MustC_start/MustC/Assets.xcassets/movies.imageset/movies.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter21/MustC_start/MustC/Assets.xcassets/movies.imageset/movies.png
--------------------------------------------------------------------------------
/chapter21/MustC_start/MustC/Assets.xcassets/movies.imageset/movies@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter21/MustC_start/MustC/Assets.xcassets/movies.imageset/movies@2x.png
--------------------------------------------------------------------------------
/chapter21/MustC_start/MustC/Assets.xcassets/movies.imageset/movies@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter21/MustC_start/MustC/Assets.xcassets/movies.imageset/movies@3x.png
--------------------------------------------------------------------------------
/chapter21/MustC_start/MustC/Extensions/CKRecord.swift:
--------------------------------------------------------------------------------
1 | import CloudKit
2 |
3 | extension CKRecord {
4 | var encodedSystemFields: Data {
5 | let coder = NSKeyedArchiver(requiringSecureCoding: true)
6 | self.encodeSystemFields(with: coder)
7 | coder.finishEncoding()
8 |
9 | return coder.encodedData
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/chapter21/MustC_start/MustC/Extensions/NSManagedObjectContext.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | extension NSManagedObjectContext {
4 | func persist(block: @escaping () -> Void) {
5 | perform {
6 | block()
7 |
8 | do {
9 | try self.save()
10 | } catch {
11 | self.rollback()
12 | }
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/chapter21/MustC_start/MustC/Extensions/NSPersistentContainer.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | extension NSPersistentContainer {
4 | func saveContextIfNeeded() {
5 | if viewContext.hasChanges {
6 | do {
7 | try viewContext.save()
8 | } catch {
9 | let nserror = error as NSError
10 | fatalError("Unresolved error \(nserror), \(nserror.userInfo)")
11 | }
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/chapter21/MustC_start/MustC/Helpers/MovieDBResponse.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | struct MovieDBLookupResponse: Codable {
4 |
5 | struct MovieDBMovie: Codable {
6 | let popularity: Double?
7 | let id: Int?
8 | }
9 |
10 | let results: [MovieDBMovie]
11 | }
12 |
--------------------------------------------------------------------------------
/chapter21/MustC_start/MustC/Protocols/AddFamilyMemberDelegate.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol AddFamilyMemberDelegate {
4 | func saveFamilyMember(withName name: String)
5 | }
6 |
--------------------------------------------------------------------------------
/chapter21/MustC_start/MustC/Protocols/AddMovieDelegate.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol AddMovieDelegate {
4 | func saveMovie(withName name: String)
5 | }
6 |
--------------------------------------------------------------------------------
/chapter21/MustC_start/MustC/Protocols/CloudStoreRequiring.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol CloudStoreRequiring {
4 | var cloudStore: CloudStore! { get set }
5 | }
6 |
--------------------------------------------------------------------------------
/chapter21/MustC_start/MustC/Protocols/PersistenContainerRequiring.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | protocol PersistenContainerRequiring {
4 | var persistentContainer: NSPersistentContainer! { get set }
5 | }
6 |
--------------------------------------------------------------------------------
/chapter22/CustomStickers/CustomStickers.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter22/CustomStickers/CustomStickers.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter22/CustomStickers/CustomStickers/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter22/CustomStickers/CustomStickers/ViewController.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class ViewController: UIViewController {
4 |
5 | override func viewDidLoad() {
6 | super.viewDidLoad()
7 | // Do any additional setup after loading the view, typically from a nib.
8 | }
9 |
10 |
11 | }
12 |
13 |
--------------------------------------------------------------------------------
/chapter22/CustomStickers/MessagesExtension/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter22/CustomStickers/images/bike.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter22/CustomStickers/images/bike.png
--------------------------------------------------------------------------------
/chapter22/CustomStickers/images/books.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter22/CustomStickers/images/books.png
--------------------------------------------------------------------------------
/chapter22/CustomStickers/images/bowler.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter22/CustomStickers/images/bowler.png
--------------------------------------------------------------------------------
/chapter22/CustomStickers/images/drunk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter22/CustomStickers/images/drunk.png
--------------------------------------------------------------------------------
/chapter22/CustomStickers/images/ebook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter22/CustomStickers/images/ebook.png
--------------------------------------------------------------------------------
/chapter22/CustomStickers/images/family.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter22/CustomStickers/images/family.png
--------------------------------------------------------------------------------
/chapter22/CustomStickers/images/grill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter22/CustomStickers/images/grill.png
--------------------------------------------------------------------------------
/chapter22/CustomStickers/images/normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter22/CustomStickers/images/normal.png
--------------------------------------------------------------------------------
/chapter22/CustomStickers/images/notebook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter22/CustomStickers/images/notebook.png
--------------------------------------------------------------------------------
/chapter22/CustomStickers/images/party.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter22/CustomStickers/images/party.png
--------------------------------------------------------------------------------
/chapter22/CustomStickers/images/punk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter22/CustomStickers/images/punk.png
--------------------------------------------------------------------------------
/chapter22/CustomStickers/images/rose.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter22/CustomStickers/images/rose.png
--------------------------------------------------------------------------------
/chapter22/CustomStickers/images/santa.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter22/CustomStickers/images/santa.png
--------------------------------------------------------------------------------
/chapter22/CustomStickers/images/spring.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter22/CustomStickers/images/spring.png
--------------------------------------------------------------------------------
/chapter22/CustomStickers_start/CustomStickers.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter22/CustomStickers_start/CustomStickers.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter22/CustomStickers_start/CustomStickers/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter22/CustomStickers_start/CustomStickers/ViewController.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class ViewController: UIViewController {
4 |
5 | override func viewDidLoad() {
6 | super.viewDidLoad()
7 | // Do any additional setup after loading the view, typically from a nib.
8 | }
9 |
10 |
11 | }
12 |
13 |
--------------------------------------------------------------------------------
/chapter22/CustomStickers_start/MessagesExtension/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter22/CustomStickers_start/images/bike.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter22/CustomStickers_start/images/bike.png
--------------------------------------------------------------------------------
/chapter22/CustomStickers_start/images/books.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter22/CustomStickers_start/images/books.png
--------------------------------------------------------------------------------
/chapter22/CustomStickers_start/images/bowler.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter22/CustomStickers_start/images/bowler.png
--------------------------------------------------------------------------------
/chapter22/CustomStickers_start/images/drunk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter22/CustomStickers_start/images/drunk.png
--------------------------------------------------------------------------------
/chapter22/CustomStickers_start/images/ebook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter22/CustomStickers_start/images/ebook.png
--------------------------------------------------------------------------------
/chapter22/CustomStickers_start/images/family.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter22/CustomStickers_start/images/family.png
--------------------------------------------------------------------------------
/chapter22/CustomStickers_start/images/grill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter22/CustomStickers_start/images/grill.png
--------------------------------------------------------------------------------
/chapter22/CustomStickers_start/images/normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter22/CustomStickers_start/images/normal.png
--------------------------------------------------------------------------------
/chapter22/CustomStickers_start/images/notebook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter22/CustomStickers_start/images/notebook.png
--------------------------------------------------------------------------------
/chapter22/CustomStickers_start/images/party.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter22/CustomStickers_start/images/party.png
--------------------------------------------------------------------------------
/chapter22/CustomStickers_start/images/punk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter22/CustomStickers_start/images/punk.png
--------------------------------------------------------------------------------
/chapter22/CustomStickers_start/images/rose.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter22/CustomStickers_start/images/rose.png
--------------------------------------------------------------------------------
/chapter22/CustomStickers_start/images/santa.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter22/CustomStickers_start/images/santa.png
--------------------------------------------------------------------------------
/chapter22/CustomStickers_start/images/spring.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter22/CustomStickers_start/images/spring.png
--------------------------------------------------------------------------------
/chapter22/The Daily Quote/The Daily Quote Messages/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter22/The Daily Quote/The Daily Quote Messages/QuoteSelectionDelegate.swift:
--------------------------------------------------------------------------------
1 | protocol QuoteSelectionDelegate {
2 | func shareQuote(_ quote: Quote)
3 | }
4 |
--------------------------------------------------------------------------------
/chapter22/The Daily Quote/The Daily Quote Messages/The Daily Quote Messages.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.application-groups
6 |
7 | group.donnywals.thedailyquote
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/chapter22/The Daily Quote/The Daily Quote Widget/The Daily Quote Widget.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.application-groups
6 |
7 | group.donnywals.thedailyquote
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/chapter22/The Daily Quote/The Daily Quote.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter22/The Daily Quote/The Daily Quote.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter22/The Daily Quote/The Daily Quote/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | @UIApplicationMain
4 | class AppDelegate: UIResponder, UIApplicationDelegate {
5 |
6 | var window: UIWindow?
7 |
8 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
9 | // Override point for customization after application launch.
10 | return true
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/chapter22/The Daily Quote/The Daily Quote/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter22/The Daily Quote/The Daily Quote/QuoteViewController.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class QuoteViewController: UIViewController {
4 |
5 | @IBOutlet var quoteLabel: UILabel!
6 | @IBOutlet var quoteCreator: UILabel!
7 |
8 | override func viewDidLoad() {
9 | super.viewDidLoad()
10 |
11 | let quote = Quote.current
12 | quoteLabel.text = quote.text
13 | quoteCreator.text = quote.creator
14 | }
15 | }
16 |
17 |
--------------------------------------------------------------------------------
/chapter22/The Daily Quote/The Daily Quote/The Daily Quote.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.application-groups
6 |
7 | group.donnywals.thedailyquote
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/chapter22/The Daily Quote_start/The Daily Quote Widget/The Daily Quote Widget.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.application-groups
6 |
7 | group.donnywals.thedailyquote
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/chapter22/The Daily Quote_start/The Daily Quote.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter22/The Daily Quote_start/The Daily Quote.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter22/The Daily Quote_start/The Daily Quote/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter22/The Daily Quote_start/The Daily Quote/QuoteViewController.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class QuoteViewController: UIViewController {
4 |
5 | @IBOutlet var quoteLabel: UILabel!
6 | @IBOutlet var quoteCreator: UILabel!
7 |
8 | override func viewDidLoad() {
9 | super.viewDidLoad()
10 |
11 | let quote = Quote.current
12 | quoteLabel.text = quote.text
13 | quoteCreator.text = quote.creator
14 | }
15 | }
16 |
17 |
--------------------------------------------------------------------------------
/chapter22/The Daily Quote_start/The Daily Quote/The Daily Quote.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.application-groups
6 |
7 | group.donnywals.thedailyquote
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/chapter23/MovieTrivia/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | HelloContacts.xcodeproj/xcuserdata/
3 | HelloContacts.xcodeproj/project.xcworkspace/xcuserdata/
4 |
5 |
--------------------------------------------------------------------------------
/chapter23/MovieTrivia/MovieTrivia.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter23/MovieTrivia/MovieTrivia.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter23/MovieTrivia/MovieTrivia/Question.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | struct Question: Codable {
4 | let title: String
5 | let answerA: String
6 | let answerB: String
7 | let answerC: String
8 | let correctAnswer: Int
9 | }
10 |
11 | struct QuestionsFetchResponse: Codable {
12 | let questions: [Question]
13 | }
14 |
--------------------------------------------------------------------------------
/chapter23/MovieTrivia/MovieTrivia/TriviaAPIProviding.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | typealias QuestionsFetchedCallback = (Data) -> Void
4 |
5 | protocol TriviaAPIProviding {
6 | func loadTriviaQuestions(callback: @escaping QuestionsFetchedCallback)
7 | }
8 |
--------------------------------------------------------------------------------
/chapter23/MovieTrivia_start/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | HelloContacts.xcodeproj/xcuserdata/
3 | HelloContacts.xcodeproj/project.xcworkspace/xcuserdata/
4 |
5 |
--------------------------------------------------------------------------------
/chapter23/MovieTrivia_start/MovieTrivia.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter23/MovieTrivia_start/MovieTrivia.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter24/Mosaic/Mosaic.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter24/Mosaic/Mosaic.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter24/Mosaic/Mosaic/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter24/Mosaic/Mosaic/Assets.xcassets/background_image.imageset/background_image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter24/Mosaic/Mosaic/Assets.xcassets/background_image.imageset/background_image.jpg
--------------------------------------------------------------------------------
/chapter24/Mosaic/Mosaic/Assets.xcassets/background_image.imageset/background_image@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter24/Mosaic/Mosaic/Assets.xcassets/background_image.imageset/background_image@2x.jpg
--------------------------------------------------------------------------------
/chapter24/Mosaic/Mosaic/Assets.xcassets/background_image.imageset/background_image@3x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter24/Mosaic/Mosaic/Assets.xcassets/background_image.imageset/background_image@3x.jpg
--------------------------------------------------------------------------------
/chapter24/Mosaic/Mosaic/Assets.xcassets/collectionitem.imageset/collectionitem.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter24/Mosaic/Mosaic/Assets.xcassets/collectionitem.imageset/collectionitem.jpg
--------------------------------------------------------------------------------
/chapter24/Mosaic/Mosaic/Assets.xcassets/collectionitem.imageset/collectionitem@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter24/Mosaic/Mosaic/Assets.xcassets/collectionitem.imageset/collectionitem@2x.jpg
--------------------------------------------------------------------------------
/chapter24/Mosaic/Mosaic/Assets.xcassets/collectionitem.imageset/collectionitem@3x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter24/Mosaic/Mosaic/Assets.xcassets/collectionitem.imageset/collectionitem@3x.jpg
--------------------------------------------------------------------------------
/chapter24/Mosaic/Mosaic/Cells/ListCollectionViewCell.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class ListCollectionViewCell: UICollectionViewCell {
4 | weak var delegate: CollectionItemDelegate?
5 | }
6 |
--------------------------------------------------------------------------------
/chapter24/Mosaic/Mosaic/Protocols/CollectionItemDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | protocol CollectionItemDelegate: class {
4 | func didUpdateFavorite(cell: UICollectionViewCell)
5 | }
6 |
--------------------------------------------------------------------------------
/chapter24/Mosaic/Mosaic/Protocols/DetailViewControllerDelegate.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol DetailViewControllerDelegate {
4 | func detailViewUpdated()
5 | }
6 |
--------------------------------------------------------------------------------
/chapter24/Mosaic/Mosaic/Protocols/ListCollectionDelegate.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol ListCollectionDelegate {
4 | func collectionDidChange(viewController: ListCollectionViewController)
5 | }
6 |
--------------------------------------------------------------------------------
/chapter24/Mosaic/Mosaic/ViewController.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class ViewController: UIViewController {
4 |
5 | override func viewDidLoad() {
6 | super.viewDidLoad()
7 | // Do any additional setup after loading the view, typically from a nib.
8 | }
9 |
10 |
11 | }
12 |
13 |
--------------------------------------------------------------------------------
/chapter24/Mosaic/Mosaic/ViewControllers/DetailViewController.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class DetailViewController: UIViewController {
4 | var delegate: DetailViewControllerDelegate?
5 | }
6 |
--------------------------------------------------------------------------------
/chapter24/Mosaic_start/Mosaic.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter24/Mosaic_start/Mosaic.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter24/Mosaic_start/Mosaic/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter24/Mosaic_start/Mosaic/Assets.xcassets/background_image.imageset/background_image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter24/Mosaic_start/Mosaic/Assets.xcassets/background_image.imageset/background_image.jpg
--------------------------------------------------------------------------------
/chapter24/Mosaic_start/Mosaic/Assets.xcassets/background_image.imageset/background_image@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter24/Mosaic_start/Mosaic/Assets.xcassets/background_image.imageset/background_image@2x.jpg
--------------------------------------------------------------------------------
/chapter24/Mosaic_start/Mosaic/Assets.xcassets/background_image.imageset/background_image@3x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter24/Mosaic_start/Mosaic/Assets.xcassets/background_image.imageset/background_image@3x.jpg
--------------------------------------------------------------------------------
/chapter24/Mosaic_start/Mosaic/Assets.xcassets/collectionitem.imageset/collectionitem.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter24/Mosaic_start/Mosaic/Assets.xcassets/collectionitem.imageset/collectionitem.jpg
--------------------------------------------------------------------------------
/chapter24/Mosaic_start/Mosaic/Assets.xcassets/collectionitem.imageset/collectionitem@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter24/Mosaic_start/Mosaic/Assets.xcassets/collectionitem.imageset/collectionitem@2x.jpg
--------------------------------------------------------------------------------
/chapter24/Mosaic_start/Mosaic/Assets.xcassets/collectionitem.imageset/collectionitem@3x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter24/Mosaic_start/Mosaic/Assets.xcassets/collectionitem.imageset/collectionitem@3x.jpg
--------------------------------------------------------------------------------
/chapter24/Mosaic_start/Mosaic/Cells/ListCollectionViewCell.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class ListCollectionViewCell: UICollectionViewCell {
4 | var delegate: CollectionItemDelegate?
5 | }
6 |
--------------------------------------------------------------------------------
/chapter24/Mosaic_start/Mosaic/Protocols/CollectionItemDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | protocol CollectionItemDelegate {
4 | func didUpdateFavorite(cell: UICollectionViewCell)
5 | }
6 |
--------------------------------------------------------------------------------
/chapter24/Mosaic_start/Mosaic/Protocols/DetailViewControllerDelegate.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol DetailViewControllerDelegate {
4 | func detailViewUpdated()
5 | }
6 |
--------------------------------------------------------------------------------
/chapter24/Mosaic_start/Mosaic/Protocols/ListCollectionDelegate.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol ListCollectionDelegate {
4 | func collectionDidChange(viewController: ListCollectionViewController)
5 | }
6 |
--------------------------------------------------------------------------------
/chapter24/Mosaic_start/Mosaic/ViewController.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class ViewController: UIViewController {
4 |
5 | override func viewDidLoad() {
6 | super.viewDidLoad()
7 | // Do any additional setup after loading the view, typically from a nib.
8 | }
9 |
10 |
11 | }
12 |
13 |
--------------------------------------------------------------------------------
/chapter24/Mosaic_start/Mosaic/ViewControllers/DetailViewController.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class DetailViewController: UIViewController {
4 | var delegate: DetailViewControllerDelegate?
5 | }
6 |
--------------------------------------------------------------------------------
/chapter25/MustC/MustC.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter25/MustC/MustC.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter25/MustC/MustC/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter25/MustC/MustC/Assets.xcassets/family_members.imageset/family_members.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter25/MustC/MustC/Assets.xcassets/family_members.imageset/family_members.png
--------------------------------------------------------------------------------
/chapter25/MustC/MustC/Assets.xcassets/family_members.imageset/family_members@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter25/MustC/MustC/Assets.xcassets/family_members.imageset/family_members@2x.png
--------------------------------------------------------------------------------
/chapter25/MustC/MustC/Assets.xcassets/family_members.imageset/family_members@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter25/MustC/MustC/Assets.xcassets/family_members.imageset/family_members@3x.png
--------------------------------------------------------------------------------
/chapter25/MustC/MustC/Assets.xcassets/movies.imageset/movies.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter25/MustC/MustC/Assets.xcassets/movies.imageset/movies.png
--------------------------------------------------------------------------------
/chapter25/MustC/MustC/Assets.xcassets/movies.imageset/movies@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter25/MustC/MustC/Assets.xcassets/movies.imageset/movies@2x.png
--------------------------------------------------------------------------------
/chapter25/MustC/MustC/Assets.xcassets/movies.imageset/movies@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter25/MustC/MustC/Assets.xcassets/movies.imageset/movies@3x.png
--------------------------------------------------------------------------------
/chapter25/MustC/MustC/Extensions/CKRecord.swift:
--------------------------------------------------------------------------------
1 | import CloudKit
2 |
3 | extension CKRecord {
4 | var encodedSystemFields: Data {
5 | let coder = NSKeyedArchiver(requiringSecureCoding: true)
6 | self.encodeSystemFields(with: coder)
7 | coder.finishEncoding()
8 |
9 | return coder.encodedData
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/chapter25/MustC/MustC/Extensions/NSManagedObjectContext.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | extension NSManagedObjectContext {
4 | func persist(block: @escaping () -> Void) {
5 | perform {
6 | block()
7 |
8 | do {
9 | try self.save()
10 | } catch {
11 | self.rollback()
12 | }
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/chapter25/MustC/MustC/Extensions/NSPersistentContainer.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | extension NSPersistentContainer {
4 | func saveContextIfNeeded() {
5 | if viewContext.hasChanges {
6 | do {
7 | try viewContext.save()
8 | } catch {
9 | let nserror = error as NSError
10 | fatalError("Unresolved error \(nserror), \(nserror.userInfo)")
11 | }
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/chapter25/MustC/MustC/Helpers/MovieDBResponse.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | struct MovieDBLookupResponse: Codable {
4 |
5 | struct MovieDBMovie: Codable {
6 | let popularity: Double?
7 | let id: Int?
8 | }
9 |
10 | let results: [MovieDBMovie]
11 | }
12 |
--------------------------------------------------------------------------------
/chapter25/MustC/MustC/Protocols/AddFamilyMemberDelegate.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol AddFamilyMemberDelegate {
4 | func saveFamilyMember(withName name: String)
5 | }
6 |
--------------------------------------------------------------------------------
/chapter25/MustC/MustC/Protocols/AddMovieDelegate.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol AddMovieDelegate {
4 | func saveMovie(withName name: String)
5 | }
6 |
--------------------------------------------------------------------------------
/chapter25/MustC/MustC/Protocols/CloudStoreRequiring.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol CloudStoreRequiring {
4 | var cloudStore: CloudStore! { get set }
5 | }
6 |
--------------------------------------------------------------------------------
/chapter25/MustC/MustC/Protocols/PersistenContainerRequiring.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | protocol PersistenContainerRequiring {
4 | var persistentContainer: NSPersistentContainer! { get set }
5 | }
6 |
--------------------------------------------------------------------------------
/chapter25/MustC_start/MustC.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter25/MustC_start/MustC.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter25/MustC_start/MustC/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter25/MustC_start/MustC/Assets.xcassets/family_members.imageset/family_members.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter25/MustC_start/MustC/Assets.xcassets/family_members.imageset/family_members.png
--------------------------------------------------------------------------------
/chapter25/MustC_start/MustC/Assets.xcassets/family_members.imageset/family_members@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter25/MustC_start/MustC/Assets.xcassets/family_members.imageset/family_members@2x.png
--------------------------------------------------------------------------------
/chapter25/MustC_start/MustC/Assets.xcassets/family_members.imageset/family_members@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter25/MustC_start/MustC/Assets.xcassets/family_members.imageset/family_members@3x.png
--------------------------------------------------------------------------------
/chapter25/MustC_start/MustC/Assets.xcassets/movies.imageset/movies.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter25/MustC_start/MustC/Assets.xcassets/movies.imageset/movies.png
--------------------------------------------------------------------------------
/chapter25/MustC_start/MustC/Assets.xcassets/movies.imageset/movies@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter25/MustC_start/MustC/Assets.xcassets/movies.imageset/movies@2x.png
--------------------------------------------------------------------------------
/chapter25/MustC_start/MustC/Assets.xcassets/movies.imageset/movies@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/Mastering-iOS-12-Programming-Third-Edition/3cfa40ddcc2ef9eeb3329bb05c052240e660fce8/chapter25/MustC_start/MustC/Assets.xcassets/movies.imageset/movies@3x.png
--------------------------------------------------------------------------------
/chapter25/MustC_start/MustC/Extensions/CKRecord.swift:
--------------------------------------------------------------------------------
1 | import CloudKit
2 |
3 | extension CKRecord {
4 | var encodedSystemFields: Data {
5 | let coder = NSKeyedArchiver(requiringSecureCoding: true)
6 | self.encodeSystemFields(with: coder)
7 | coder.finishEncoding()
8 |
9 | return coder.encodedData
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/chapter25/MustC_start/MustC/Extensions/NSManagedObjectContext.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | extension NSManagedObjectContext {
4 | func persist(block: @escaping () -> Void) {
5 | perform {
6 | block()
7 |
8 | do {
9 | try self.save()
10 | } catch {
11 | self.rollback()
12 | }
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/chapter25/MustC_start/MustC/Extensions/NSPersistentContainer.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | extension NSPersistentContainer {
4 | func saveContextIfNeeded() {
5 | if viewContext.hasChanges {
6 | do {
7 | try viewContext.save()
8 | } catch {
9 | let nserror = error as NSError
10 | fatalError("Unresolved error \(nserror), \(nserror.userInfo)")
11 | }
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/chapter25/MustC_start/MustC/Helpers/MovieDBResponse.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | struct MovieDBLookupResponse: Codable {
4 |
5 | struct MovieDBMovie: Codable {
6 | let popularity: Double?
7 | let id: Int?
8 | }
9 |
10 | let results: [MovieDBMovie]
11 | }
12 |
--------------------------------------------------------------------------------
/chapter25/MustC_start/MustC/Protocols/AddFamilyMemberDelegate.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol AddFamilyMemberDelegate {
4 | func saveFamilyMember(withName name: String)
5 | }
6 |
--------------------------------------------------------------------------------
/chapter25/MustC_start/MustC/Protocols/AddMovieDelegate.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol AddMovieDelegate {
4 | func saveMovie(withName name: String)
5 | }
6 |
--------------------------------------------------------------------------------
/chapter25/MustC_start/MustC/Protocols/CloudStoreRequiring.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol CloudStoreRequiring {
4 | var cloudStore: CloudStore! { get set }
5 | }
6 |
--------------------------------------------------------------------------------
/chapter25/MustC_start/MustC/Protocols/PersistenContainerRequiring.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | protocol PersistenContainerRequiring {
4 | var persistentContainer: NSPersistentContainer! { get set }
5 | }
6 |
--------------------------------------------------------------------------------
/chapter3/Hello-contacts/Hello-Contacts.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter3/Hello-contacts/Hello-Contacts.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter3/Hello-contacts/Hello-Contacts/LayoutExploration.playground/contents.xcplayground:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/chapter3/Hello-contacts/Hello-Contacts/LayoutExploration.playground/timeline.xctimeline:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/chapter4/Cradle/Cradle.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter4/Cradle/Cradle.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter4/Cradle/Cradle/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter4/Hello-contacts/Hello-Contacts.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter4/Hello-contacts/Hello-Contacts.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter4/Hello-contacts/Hello-Contacts/LayoutExploration.playground/contents.xcplayground:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/chapter4/Hello-contacts/Hello-Contacts/LayoutExploration.playground/timeline.xctimeline:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/chapter5/Chapter 5.playground/contents.xcplayground:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter5/Chapter 5.playground/playground.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter5/Chapter 5.playground/playground.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter6/Chapter6.playground/contents.xcplayground:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter6/Chapter6.playground/playground.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter6/Chapter6.playground/playground.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter7/Hello-contacts/Hello-Contacts.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter7/Hello-contacts/Hello-Contacts.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter7/Hello-contacts/Hello-Contacts/LayoutExploration.playground/contents.xcplayground:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/chapter7/Hello-contacts/Hello-Contacts/LayoutExploration.playground/timeline.xctimeline:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/chapter7/Hello-contacts/Hello-Contacts/Protocols/ContactDisplayable.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | protocol ContactDisplayable {
4 | var displayName: String { get }
5 | var image: UIImage? { get set }
6 |
7 | func fetchImageIfNeeded()
8 | func fetchImageIfNeeded(completion: @escaping ((UIImage?) -> Void))
9 | }
10 |
--------------------------------------------------------------------------------
/chapter8/MustC/MustC.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter8/MustC/MustC.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter8/MustC/MustC/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter8/MustC/MustC/Extensions/NSManagedObjectContext.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | extension NSManagedObjectContext {
4 | func persist(block: @escaping () -> Void) {
5 | perform {
6 | block()
7 |
8 | do {
9 | try self.save()
10 | } catch {
11 | self.rollback()
12 | }
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/chapter8/MustC/MustC/Extensions/NSPersistentContainer.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | extension NSPersistentContainer {
4 | func saveContextIfNeeded() {
5 | if viewContext.hasChanges {
6 | do {
7 | try viewContext.save()
8 | } catch {
9 | let nserror = error as NSError
10 | fatalError("Unresolved error \(nserror), \(nserror.userInfo)")
11 | }
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/chapter8/MustC/MustC/Protocols/AddFamilyMemberDelegate.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol AddFamilyMemberDelegate {
4 | func saveFamilyMember(withName name: String)
5 | }
6 |
--------------------------------------------------------------------------------
/chapter8/MustC/MustC/Protocols/AddMovieDelegate.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol AddMovieDelegate {
4 | func saveMovie(withName name: String)
5 | }
6 |
--------------------------------------------------------------------------------
/chapter8/MustC/MustC/Protocols/PersistenContainerRequiring.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | protocol PersistenContainerRequiring {
4 | var persistentContainer: NSPersistentContainer! { get set }
5 | }
6 |
--------------------------------------------------------------------------------
/chapter8/MustC_start/MustC.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter8/MustC_start/MustC.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter8/MustC_start/MustC/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter8/MustC_start/MustC/Protocols/AddFamilyMemberDelegate.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol AddFamilyMemberDelegate {
4 | func saveFamilyMember(withName name: String)
5 | }
6 |
--------------------------------------------------------------------------------
/chapter8/MustC_start/MustC/Protocols/AddMovieDelegate.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol AddMovieDelegate {
4 | func saveMovie(withName name: String)
5 | }
6 |
--------------------------------------------------------------------------------
/chapter9/MustC/MustC.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter9/MustC/MustC.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapter9/MustC/MustC/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/chapter9/MustC/MustC/Extensions/NSManagedObjectContext.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | extension NSManagedObjectContext {
4 | func persist(block: @escaping () -> Void) {
5 | perform {
6 | block()
7 |
8 | do {
9 | try self.save()
10 | } catch {
11 | self.rollback()
12 | }
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/chapter9/MustC/MustC/Extensions/NSPersistentContainer.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | extension NSPersistentContainer {
4 | func saveContextIfNeeded() {
5 | if viewContext.hasChanges {
6 | do {
7 | try viewContext.save()
8 | } catch {
9 | let nserror = error as NSError
10 | fatalError("Unresolved error \(nserror), \(nserror.userInfo)")
11 | }
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/chapter9/MustC/MustC/Helpers/MovieDBResponse.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | struct MovieDBLookupResponse: Codable {
4 |
5 | struct MovieDBMovie: Codable {
6 | let popularity: Double?
7 | }
8 |
9 | let results: [MovieDBMovie]
10 | }
11 |
--------------------------------------------------------------------------------
/chapter9/MustC/MustC/Protocols/AddFamilyMemberDelegate.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol AddFamilyMemberDelegate {
4 | func saveFamilyMember(withName name: String)
5 | }
6 |
--------------------------------------------------------------------------------
/chapter9/MustC/MustC/Protocols/AddMovieDelegate.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol AddMovieDelegate {
4 | func saveMovie(withName name: String)
5 | }
6 |
--------------------------------------------------------------------------------
/chapter9/MustC/MustC/Protocols/PersistenContainerRequiring.swift:
--------------------------------------------------------------------------------
1 | import CoreData
2 |
3 | protocol PersistenContainerRequiring {
4 | var persistentContainer: NSPersistentContainer! { get set }
5 | }
6 |
--------------------------------------------------------------------------------
/chapter9/URLSession.playground/contents.xcplayground:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter9/URLSession.playground/playground.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapter9/URLSession.playground/playground.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------