├── .gitignore
├── README.md
├── contacts
├── Creating Contacts with Prebuilt System UI
│ ├── Creating Contacts with Prebuilt System UI.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Creating Contacts with Prebuilt System UI
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Creating Contacts
│ ├── Creating Contacts.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Creating Contacts
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ └── apple.imageset
│ │ │ ├── Contents.json
│ │ │ ├── apple@1x.png
│ │ │ ├── apple@2x.png
│ │ │ └── apple@3x.png
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Deleting Contacts
│ ├── Deleting Contacts.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Deleting Contacts
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Displaying Contacts with Prebuilt System UI
│ ├── Displaying Contacts with Prebuilt System UI.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Displaying Contacts with Prebuilt System UI
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Formatting Contact Data
│ ├── Formatting Contact Data.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Formatting Contact Data
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Picking Contacts with Prebuilt System UI
│ ├── Picking Contacts with Prebuilt System UI.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Picking Contacts with Prebuilt System UI
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Searching for Contacts
│ ├── Searching for Contacts.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Searching for Contacts
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
└── Updating Contacts
│ ├── Updating Contacts.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── Updating Contacts
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── ViewController.swift
├── coreMotion
├── Querying Pace and Cadence Information
│ ├── Querying Pace and Cadence Information.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Querying Pace and Cadence Information
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
└── Recording and Reading Accelerometer Data
│ ├── Recording and Reading Accelerometer Data.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── Recording and Reading Accelerometer Data
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── ViewController.swift
├── dynamics
├── Adding a Radial Gravity Field to Your UI
│ ├── Adding a Radial Gravity Field to Your UI.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── Adding a Radial Gravity Field to Your UI
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ └── Dynamic-Bridging-Header.h
├── Animating UI Components with Noise
│ ├── Animating UI Components with Noise.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── Animating UI Components with Noise
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ └── Dynamic-Bridging-Header.h
├── Creating Turbulence Effects with Animations
│ ├── Creating Turbulence Effects with Animations.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── Creating Turbulence Effects with Animations
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ └── Dynamic-Bridging-Header.h
├── Creating a Linear Gravity Field on Your UI
│ ├── Creating a Linear Gravity Field on Your UI.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── Creating a Linear Gravity Field on Your UI
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ └── Dynamic-Bridging-Header.h
├── Creating a Magnetic Effect Between UI Components
│ ├── Creating a Magnetic Effect Between UI Components.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── Creating a Magnetic Effect Between UI Components
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ └── Dynamic-Bridging-Header.h
├── Designing a Velocity Field on Your UI
│ ├── Designing a Velocity Field on Your UI.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── Designing a Velocity Field on Your UI
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ └── Dynamic-Bridging-Header.h
└── Detecting Collisions Between Non-Rectangular UI Components
│ ├── Detecting Collisions Between Non-Rectangular UI Components.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ ├── Detecting Collisions Between Non-Rectangular UI Components
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ └── ViewController.swift
│ └── Dynamic-Bridging-Header.h
├── ext
├── Creating Safari Content Blockers
│ ├── Creating Safari Content Blockers.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── Creating Safari Content Blockers
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ └── Image Blocker
│ │ ├── ActionRequestHandler.swift
│ │ ├── Info.plist
│ │ ├── blockerList.json
│ │ └── blockerListPseudo.json
├── Creating Shared Links for Safari
│ ├── Creating Shared Links for Safari.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── Creating Shared Links for Safari
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ ├── AppIcon copy 2.png
│ │ │ │ ├── AppIcon copy 3.png
│ │ │ │ ├── AppIcon copy 4.png
│ │ │ │ ├── AppIcon copy 6.png
│ │ │ │ ├── AppIcon copy.png
│ │ │ │ ├── AppIcon.png
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ └── SharedLink
│ │ ├── ExtIcon.png
│ │ ├── Info.plist
│ │ └── RequestHandler.swift
└── Maintaining Your App’s Indexed Content
│ ├── Maintaining Your App’s Indexed Content.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ ├── Maintaining Your App’s Indexed Content
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ └── ViewController.swift
│ └── Reindex
│ ├── IndexRequestHandler.swift
│ └── Info.plist
├── iOS_9_swift_prog_ckbk_comp.png
├── mapLocation
├── Customizing the Tint Color of Pins on the Map
│ ├── Customizing the Tint Color of Pins on the Map.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Customizing the Tint Color of Pins on the Map
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Displaying Traffic, Scale and Compass Indicators on the Map
│ ├── Displaying Traffic, Scale and Compass Indicators on the Map.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Displaying Traffic, Scale and Compass Indicators on the Map
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Launching the iOS Maps App in Transit Mode
│ ├── Launching the iOS Maps App in Transit Mode.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Launching the iOS Maps App in Transit Mode
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Providing Detailed Pin Information with Custom Views
│ ├── Providing Detailed Pin Information with Custom Views.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Providing Detailed Pin Information with Custom Views
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ ├── ExtIcon.imageset
│ │ │ ├── Contents.json
│ │ │ ├── ExtIcon copy 2.png
│ │ │ ├── ExtIcon copy.png
│ │ │ └── ExtIcon.png
│ │ └── Icon.imageset
│ │ │ ├── Contents.json
│ │ │ ├── Icon copy 2.png
│ │ │ ├── Icon copy.png
│ │ │ └── Icon.png
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Providing an ETA for Transit Transport Type
│ ├── Providing an ETA for Transit Transport Type.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Providing an ETA for Transit Transport Type
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon120.png
│ │ │ └── Icon180.png
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Directions.geojson
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Requesting the User’s Location Only Once
│ ├── Requesting the User’s Location Only Once.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Requesting the User’s Location Only Once
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Requesting the User’s Location in Background
│ ├── Requesting the User’s Location in Background.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Requesting the User’s Location in Background
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
└── Showing Maps in Flyover Mode
│ ├── Showing Maps in Flyover Mode.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── Showing Maps in Flyover Mode
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── ViewController.swift
├── multimedia
├── Downloading and Preparing Remote Media for Playback
│ ├── Downloading and Preparing Remote Media for Playback.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Downloading and Preparing Remote Media for Playback
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Downloading and Preparing Remote Media for Playback.entitlements
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Enabling Spoken Audio Sessions
│ ├── Enabling Spoken Audio Sessions.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Enabling Spoken Audio Sessions
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
└── Reading out Text with the Default Siri Alex Voice
│ ├── Reading out Text with the Default Siri Alex Voice.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── Reading out Text with the Default Siri Alex Voice
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── ViewController.swift
├── multitasking
├── Adding Picture in Picture Playback Functionality
│ ├── Adding Picture in Picture Playback Functionality.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Adding Picture in Picture Playback Functionality
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ ├── PipView.swift
│ │ ├── ViewController.swift
│ │ └── video.mp4
└── Handling Low Power Mode and Providing Alternatives
│ ├── Handling Low Power Mode and Providing Alternatives.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── Handling Low Power Mode and Providing Alternatives
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── ViewController.swift
├── security
├── Authenticating the User with Touch ID with Timeout
│ ├── Authenticating the User with Touch ID with Timeout.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Authenticating the User with Touch ID with Timeout
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Binding Keychain Items to Passcode and Touch ID
│ ├── Binding Keychain Items to Passcode and Touch ID.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Binding Keychain Items to Passcode and Touch ID
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Opening URLs Safely
│ ├── Opening URLs Safely.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Opening URLs Safely
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
└── Protecting Your Network Connections with ATS
│ ├── Protecting Your Network Connections with ATS.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── Protecting Your Network Connections with ATS
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── ViewController.swift
├── shared
└── SharedCode
│ ├── SharedCode.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ ├── SharedCode
│ ├── CFStringRef+ToString.swift
│ ├── CGSize+Size.swift
│ ├── CNContact+PrintPhoneNumbers.swift
│ ├── CNContactStore+ContactFetcher.swift
│ ├── ColorToString.swift
│ ├── ContactAuthorizer.swift
│ ├── Icon.png
│ ├── Indexer.swift
│ ├── Info.plist
│ ├── MapAnnotation.swift
│ ├── SharedCode.h
│ ├── Threading.swift
│ ├── UICollisionBehavior+Additions.swift
│ ├── UIDynamicAnimator+Additions.swift
│ ├── UIFieldBehavior+Additions.swift
│ └── ViewControllerExtensions.swift
│ └── SharedCodeTests
│ ├── Info.plist
│ └── SharedCodeTests.swift
├── swiftXcodeIB
├── Adding Multiple Buttons to the Navigation Bar
│ ├── Adding Multiple Buttons to the Navigation Bar.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Adding Multiple Buttons to the Navigation Bar
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Building Equality Functionality Into Your Own Types
│ ├── Building Equality Functionality Into Your Own Types.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Building Equality Functionality Into Your Own Types
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Bundling and Reading Data in Your Apps
│ ├── Bundling and Reading Data in Your Apps.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Bundling and Reading Data in Your Apps
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ └── rtf.dataset
│ │ │ ├── Contents.json
│ │ │ ├── ipad.rtf
│ │ │ └── iphone.rtf
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Categorizing and Downloading Assets to get Smaller Binaries
│ ├── Categorizing and Downloading Assets to get Smaller Binaries.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Categorizing and Downloading Assets to get Smaller Binaries
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ ├── Level1-2.imageset
│ │ │ ├── Contents.json
│ │ │ └── level1-2.png
│ │ ├── level1-1.imageset
│ │ │ ├── Contents.json
│ │ │ └── level1-1.png
│ │ ├── level1-3.imageset
│ │ │ ├── Contents.json
│ │ │ └── level1-3.png
│ │ ├── level2-1.imageset
│ │ │ ├── Contents.json
│ │ │ └── level2-2.png
│ │ ├── level2-2.imageset
│ │ │ ├── Contents.json
│ │ │ └── level2-2.png
│ │ ├── level2-3.imageset
│ │ │ ├── Contents.json
│ │ │ └── level2-3.png
│ │ ├── level3-1.imageset
│ │ │ ├── Contents.json
│ │ │ └── level3-1.png
│ │ ├── level3-2.imageset
│ │ │ ├── Contents.json
│ │ │ └── level3-2.png
│ │ └── level3-3.imageset
│ │ │ ├── Contents.json
│ │ │ └── level3-3.png
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Checking for API Availability
│ ├── Checking for API Availability.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Checking for API Availability
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Conditionally Extending a Protocol
│ ├── Conditionally Extending a Protocol.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Conditionally Extending a Protocol
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Creating Your Own Set Types
│ ├── Creating Your Own Set Types.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Creating Your Own Set Types
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Designing Interactive Interface Objects in Playgrounds
│ ├── Designing Interactive Interface Objects in Playgrounds.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Designing Interactive Interface Objects in Playgrounds
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ ├── MyPlayground.playground
│ │ ├── Contents.swift
│ │ ├── contents.xcplayground
│ │ └── timeline.xctimeline
│ │ └── ViewController.swift
├── Ensuring the Execution of Code Blocks Before Exiting Methods
│ ├── Ensuring the Execution of Code Blocks Before Exiting Methods.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── xcdebugger
│ │ │ └── Breakpoints_v2.xcbkptlist
│ └── Ensuring the Execution of Code Blocks Before Exiting Methods
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Exporting Device Specific Binaries
│ ├── Exporting Device Specific Binaries.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Exporting Device Specific Binaries
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Grouping Switch Statement Cases Together
│ ├── Grouping Switch Statement Cases Together.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Grouping Switch Statement Cases Together
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Handling Errors in Swift
│ ├── Handling Errors in Swift.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Handling Errors in Swift
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Linking Storyboards
│ ├── Linking Storyboards.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Linking Storyboards
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ ├── Main.storyboard
│ │ └── Second.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Looping Conditionally Through a Collection
│ ├── Looping Conditionally Through a Collection.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Looping Conditionally Through a Collection
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Optimizing Your Swift Code
│ ├── Optimizing Your Swift Code.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Optimizing Your Swift Code
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
└── Specifying Preconditions for Methods
│ ├── Specifying Preconditions for Methods.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── Specifying Preconditions for Methods
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── ViewController.swift
├── ui
├── Allowing Users to Enter Text in Response to Local and Remote Notifications
│ ├── Allowing Users to Enter Text in Response to Local and Remote Notifications.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Allowing Users to Enter Text in Response to Local and Remote Notifications
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Arranging Your Components Horizontally or Vertically
│ ├── Arranging Your Components Horizontally or Vertically.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Arranging Your Components Horizontally or Vertically
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ └── img.imageset
│ │ │ ├── Contents.json
│ │ │ └── img.png
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Associating Keyboard Shortcuts with View Controllers
│ ├── Associating Keyboard Shortcuts with View Controllers.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Associating Keyboard Shortcuts with View Controllers
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Creating Anchored Constraints in Code
│ ├── Creating Anchored Constraints in Code.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Creating Anchored Constraints in Code
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Customizing Stack Views for Different Screen Sizes
│ ├── Customizing Stack Views for Different Screen Sizes.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Customizing Stack Views for Different Screen Sizes
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Dealing with Stacked Views in Code
│ ├── Dealing with Stacked Views in Code.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Dealing with Stacked Views in Code
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Improving Touch Rates for Smoother UI Interactions
│ ├── Improving Touch Rates for Smoother UI Interactions.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Improving Touch Rates for Smoother UI Interactions
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Laying Out Text Based Content on Your Views
│ ├── Laying Out Text Based Content on Your Views.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Laying Out Text Based Content on Your Views
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Recording the Screen and Sharing the Video
│ ├── Recording the Screen and Sharing the Video.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Recording the Screen and Sharing the Video
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── Showing Web Content in Safari View Controller
│ ├── Showing Web Content in Safari View Controller.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── Showing Web Content in Safari View Controller
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
└── Supporting Right to Left Languages
│ ├── Supporting Right to Left Languages.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── Supporting Right to Left Languages
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── ViewController.swift
│ ├── ar.lproj
│ ├── LaunchScreen.strings
│ ├── Localizable.strings
│ └── Main.strings
│ └── en.lproj
│ └── Localizable.strings
├── uitesting
├── Automating UI Test Scripts
│ ├── Automating UI Test Scripts.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── Automating UI Test Scripts
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ └── Automating UI Test ScriptsUITests
│ │ ├── Automating_UI_Test_ScriptsUITests.swift
│ │ └── Info.plist
├── Finding UI Components
│ ├── Finding UI Components.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── Finding UI Components
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ └── Finding UI ComponentsUITests
│ │ ├── Finding_UI_ComponentsUITests.swift
│ │ └── Info.plist
├── Long Pressing on UI Elements
│ ├── Long Pressing on UI Elements.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── Long Pressing on UI Elements
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ └── Long Pressing on UI ElementsUITests
│ │ ├── Info.plist
│ │ └── Long_Pressing_on_UI_ElementsUITests.swift
├── Preparing Your Project for UI Testing
│ ├── Preparing Your Project for UI Testing.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── Preparing Your Project for UI Testing
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ └── Preparing Your Project for UI TestingUITests
│ │ ├── Info.plist
│ │ └── Preparing_Your_Project_for_UI_TestingUITests.swift
├── Swiping on UI Elements
│ ├── Swiping on UI Elements.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── Swiping on UI Elements
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ └── Swiping on UI ElementsUITests
│ │ ├── Info.plist
│ │ └── Swiping_on_UI_ElementsUITests.swift
├── Tapping on UI Elements
│ ├── Tapping on UI Elements.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── Tapping on UI Elements
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ └── Tapping on UI ElementsUITests
│ │ ├── Info.plist
│ │ └── Tapping_on_UI_ElementsUITests.swift
├── Testing Text Fields, Buttons and Labels
│ ├── Testing Text Fields, Buttons and Labels.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── Testing Text Fields, Buttons and Labels
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ └── Testing Text Fields, Buttons and LabelsUITests
│ │ ├── Info.plist
│ │ └── Testing_Text_Fields__Buttons_and_LabelsUITests.swift
└── Typing Inside Text Fields
│ ├── Typing Inside Text Fields.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ ├── Typing Inside Text Fields
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ └── ViewController.swift
│ └── Typing Inside Text FieldsUITests
│ ├── Info.plist
│ └── Typing_Inside_Text_FieldsUITests.swift
├── watch
├── Communicating Interactively Between iOS and Watch OS
│ ├── Communicating Interactively Between iOS and Watch OS.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── Communicating Interactively Between iOS and Watch OS
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ ├── PredefinedMessage.swift
│ │ └── ViewController.swift
│ ├── Watch Extension
│ │ ├── Assets.xcassets
│ │ │ └── README__ignoredByTemplate__
│ │ ├── ExtensionDelegate.swift
│ │ ├── Info.plist
│ │ ├── InterfaceController.swift
│ │ ├── NotificationController.swift
│ │ └── PushNotificationPayload.apns
│ └── Watch
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ └── Interface.storyboard
│ │ └── Info.plist
├── Constructing Small Complications with Text and Images
│ ├── Constructing Small Complications with Text and Images.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── Constructing Small Complications with Text and Images
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ ├── Watch Extension
│ │ ├── Assets.xcassets
│ │ │ └── Complication.complicationset
│ │ │ │ ├── Circular.imageset
│ │ │ │ └── Contents.json
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Modular.imageset
│ │ │ │ └── Contents.json
│ │ │ │ └── Utilitarian.imageset
│ │ │ │ └── Contents.json
│ │ ├── ComplicationController.swift
│ │ ├── DataProvider.swift
│ │ ├── ExtensionDelegate.swift
│ │ ├── Info.plist
│ │ ├── InterfaceController.swift
│ │ ├── NotificationController.swift
│ │ └── PushNotificationPayload.apns
│ └── Watch
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ └── Interface.storyboard
│ │ └── Info.plist
├── Displaying Dates in Complications
│ ├── Displaying Dates in Complications.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── Displaying Dates in Complications
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ ├── Watch Extension
│ │ ├── Assets.xcassets
│ │ │ └── Complication.complicationset
│ │ │ │ ├── Circular.imageset
│ │ │ │ └── Contents.json
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Modular.imageset
│ │ │ │ └── Contents.json
│ │ │ │ └── Utilitarian.imageset
│ │ │ │ └── Contents.json
│ │ ├── ComplicationController.swift
│ │ ├── DataProvider.swift
│ │ ├── ExtensionDelegate.swift
│ │ ├── Info.plist
│ │ ├── InterfaceController.swift
│ │ ├── NotificationController.swift
│ │ └── PushNotificationPayload.apns
│ └── Watch
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ └── Interface.storyboard
│ │ └── Info.plist
├── Displaying Time Intervals in Complications
│ ├── Displaying Time Intervals in Complications.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── Displaying Time Intervals in Complications
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ ├── Watch Extension
│ │ ├── Assets.xcassets
│ │ │ └── Complication.complicationset
│ │ │ │ ├── Circular.imageset
│ │ │ │ └── Contents.json
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Modular.imageset
│ │ │ │ └── Contents.json
│ │ │ │ └── Utilitarian.imageset
│ │ │ │ └── Contents.json
│ │ ├── ComplicationController.swift
│ │ ├── DataProvider.swift
│ │ ├── ExtensionDelegate.swift
│ │ ├── Info.plist
│ │ ├── InterfaceController.swift
│ │ ├── NotificationController.swift
│ │ └── PushNotificationPayload.apns
│ └── Watch
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ └── Interface.storyboard
│ │ └── Info.plist
├── Displaying Time Offsets in Complications
│ ├── Displaying Time Offsets in Complications.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── Displaying Time Offsets in Complications
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ ├── Watch Extension
│ │ ├── Assets.xcassets
│ │ │ ├── Complication.complicationset
│ │ │ │ ├── Circular.imageset
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Modular.imageset
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Utilitarian.imageset
│ │ │ │ │ └── Contents.json
│ │ │ └── Contents.json
│ │ ├── ComplicationController.swift
│ │ ├── DataProvider.swift
│ │ ├── ExtensionDelegate.swift
│ │ ├── Info.plist
│ │ ├── InterfaceController.swift
│ │ ├── NotificationController.swift
│ │ └── PushNotificationPayload.apns
│ └── Watch
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ └── Interface.storyboard
│ │ └── Info.plist
├── Displaying Times in Complications
│ ├── Displaying Times in Complications.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── Displaying Times in Complications
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ ├── Watch Extension
│ │ ├── Assets.xcassets
│ │ │ └── Complication.complicationset
│ │ │ │ ├── Circular.imageset
│ │ │ │ └── Contents.json
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Modular.imageset
│ │ │ │ └── Contents.json
│ │ │ │ └── Utilitarian.imageset
│ │ │ │ └── Contents.json
│ │ ├── ComplicationController.swift
│ │ ├── DataProvider.swift
│ │ ├── ExtensionDelegate.swift
│ │ ├── Info.plist
│ │ ├── InterfaceController.swift
│ │ ├── NotificationController.swift
│ │ └── PushNotificationPayload.apns
│ └── Watch
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ └── Interface.storyboard
│ │ └── Info.plist
├── Downloading Files on the Apple Watch
│ ├── Downloading Files on the Apple Watch.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── Downloading Files on the Apple Watch
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ ├── Watch Extension
│ │ ├── Assets.xcassets
│ │ │ └── Complication.complicationset
│ │ │ │ ├── Circular.imageset
│ │ │ │ └── Contents.json
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Modular.imageset
│ │ │ │ └── Contents.json
│ │ │ │ └── Utilitarian.imageset
│ │ │ │ └── Contents.json
│ │ ├── ComplicationController.swift
│ │ ├── ExtensionDelegate.swift
│ │ ├── GlanceController.swift
│ │ ├── Info.plist
│ │ ├── InterfaceController.swift
│ │ ├── NotificationController.swift
│ │ └── PushNotificationPayload.apns
│ └── Watch
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ └── Interface.storyboard
│ │ └── Info.plist
├── Noticing Changes in Pairing State Between the iOS and Watch Apps
│ ├── Noticing Changes in Pairing State Between the iOS and Watch Apps.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── Noticing Changes in Pairing State Between the iOS and Watch Apps
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ ├── Watch Extension
│ │ ├── Assets.xcassets
│ │ │ └── Complication.complicationset
│ │ │ │ ├── Circular.imageset
│ │ │ │ └── Contents.json
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Modular.imageset
│ │ │ │ └── Contents.json
│ │ │ │ └── Utilitarian.imageset
│ │ │ │ └── Contents.json
│ │ ├── ComplicationController.swift
│ │ ├── ExtensionDelegate.swift
│ │ ├── GlanceController.swift
│ │ ├── Info.plist
│ │ ├── InterfaceController.swift
│ │ ├── NotificationController.swift
│ │ └── PushNotificationPayload.apns
│ └── Watch
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ └── Interface.storyboard
│ │ └── Info.plist
├── Playing Local and Remote Audio and Video in Your Watch App
│ ├── Playing Local and Remote Audio and Video in Your Watch App.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── Playing Local and Remote Audio and Video in Your Watch App
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ ├── Watch Extension
│ │ ├── Assets.xcassets
│ │ │ └── README__ignoredByTemplate__
│ │ ├── ExtensionDelegate.swift
│ │ ├── Info.plist
│ │ ├── InterfaceController.swift
│ │ ├── NotificationController.swift
│ │ └── PushNotificationPayload.apns
│ └── Watch
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ └── Interface.storyboard
│ │ └── Info.plist
├── Recording Audio in Your Watch App
│ ├── Recording Audio in Your Watch App.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── Recording Audio in Your Watch App
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ ├── Watch Extension
│ │ ├── Assets.xcassets
│ │ │ └── README__ignoredByTemplate__
│ │ ├── ExtensionDelegate.swift
│ │ ├── Info.plist
│ │ ├── InterfaceController.swift
│ │ ├── NotificationController.swift
│ │ └── PushNotificationPayload.apns
│ └── Watch
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ └── Interface.storyboard
│ │ └── Info.plist
├── Setting up Apple Watch for Custom Complications
│ ├── Setting up Apple Watch for Custom Complications.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── Setting up Apple Watch for Custom Complications
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ ├── Watch Extension
│ │ ├── Assets.xcassets
│ │ │ └── Complication.complicationset
│ │ │ │ ├── Circular.imageset
│ │ │ │ └── Contents.json
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Modular.imageset
│ │ │ │ └── Contents.json
│ │ │ │ └── Utilitarian.imageset
│ │ │ │ └── Contents.json
│ │ ├── ComplicationController.swift
│ │ ├── ExtensionDelegate.swift
│ │ ├── Info.plist
│ │ ├── InterfaceController.swift
│ │ ├── NotificationController.swift
│ │ └── PushNotificationPayload.apns
│ └── Watch
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ └── Interface.storyboard
│ │ └── Info.plist
├── Transferring Dictionaries in Queues To and From the Watch
│ ├── Transferring Dictionaries in Queues To and From the Watch.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── Transferring Dictionaries in Queues To and From the Watch
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ ├── Watch Extension
│ │ ├── Assets.xcassets
│ │ │ └── Complication.complicationset
│ │ │ │ ├── Circular.imageset
│ │ │ │ └── Contents.json
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Modular.imageset
│ │ │ │ └── Contents.json
│ │ │ │ └── Utilitarian.imageset
│ │ │ │ └── Contents.json
│ │ ├── ComplicationController.swift
│ │ ├── ExtensionDelegate.swift
│ │ ├── GlanceController.swift
│ │ ├── Info.plist
│ │ ├── InterfaceController.swift
│ │ ├── NotificationController.swift
│ │ └── PushNotificationPayload.apns
│ └── Watch
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ └── Interface.storyboard
│ │ └── Info.plist
├── Transferring Files To and From the Watch
│ ├── Transferring Files To and From the Watch.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── Transferring Files To and From the Watch
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ ├── Watch Extension
│ │ ├── Assets.xcassets
│ │ │ └── README__ignoredByTemplate__
│ │ ├── ExtensionDelegate.swift
│ │ ├── Info.plist
│ │ ├── InterfaceController.swift
│ │ ├── NotificationController.swift
│ │ └── PushNotificationPayload.apns
│ └── Watch
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ └── Interface.storyboard
│ │ └── Info.plist
└── Transferring Small Pieces of Data To and From the Watch
│ ├── Transferring Small Pieces of Data To and From the Watch.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ ├── Transferring Small Pieces of Data To and From the Watch
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ └── ViewController.swift
│ ├── Watch Extension
│ ├── Assets.xcassets
│ │ └── Complication.complicationset
│ │ │ ├── Circular.imageset
│ │ │ └── Contents.json
│ │ │ ├── Contents.json
│ │ │ ├── Modular.imageset
│ │ │ └── Contents.json
│ │ │ └── Utilitarian.imageset
│ │ │ └── Contents.json
│ ├── ComplicationController.swift
│ ├── ExtensionDelegate.swift
│ ├── GlanceController.swift
│ ├── Info.plist
│ ├── InterfaceController.swift
│ ├── NotificationController.swift
│ └── PushNotificationPayload.apns
│ └── Watch
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ └── Interface.storyboard
│ └── Info.plist
└── webSearch
├── Deleting Your App’s Searchable content
├── Deleting Your App’s Searchable content.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── Deleting Your App’s Searchable content
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── ViewController.swift
├── Making User Activities Searchable
├── Making User Activities Searchable.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── Making User Activities Searchable
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Icon.png
│ ├── Info.plist
│ └── ViewController.swift
└── Making Your App’s Content Searchable
├── Making Your App’s Content Searchable.xcodeproj
├── project.pbxproj
└── project.xcworkspace
│ └── contents.xcworkspacedata
└── Making Your App’s Content Searchable
├── AppDelegate.swift
├── Assets.xcassets
└── AppIcon.appiconset
│ └── Contents.json
├── Base.lproj
├── LaunchScreen.storyboard
└── Main.storyboard
├── Info.plist
└── ViewController.swift
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | build/
4 | *.pbxuser
5 | !default.pbxuser
6 | *.mode1v3
7 | !default.mode1v3
8 | *.mode2v3
9 | !default.mode2v3
10 | *.perspectivev3
11 | !default.perspectivev3
12 | xcuserdata
13 | *.xccheckout
14 | *.moved-aside
15 | DerivedData
16 | *.hmap
17 | *.ipa
18 | *.xcuserstate
19 |
20 | # CocoaPods
21 | #
22 | # We recommend against adding the Pods directory to your .gitignore. However
23 | # you should judge for yourself, the pros and cons are mentioned at:
24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
25 | #
26 | # Pods/
27 |
28 | # Carthage
29 | #
30 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
31 | # Carthage/Checkouts
32 |
33 | Carthage/Build
34 |
--------------------------------------------------------------------------------
/contacts/Creating Contacts with Prebuilt System UI/Creating Contacts with Prebuilt System UI.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/contacts/Creating Contacts/Creating Contacts.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/contacts/Creating Contacts/Creating Contacts/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/contacts/Creating Contacts/Creating Contacts/Assets.xcassets/apple.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "apple@1x.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "apple@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "apple@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/contacts/Creating Contacts/Creating Contacts/Assets.xcassets/apple.imageset/apple@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/contacts/Creating Contacts/Creating Contacts/Assets.xcassets/apple.imageset/apple@1x.png
--------------------------------------------------------------------------------
/contacts/Creating Contacts/Creating Contacts/Assets.xcassets/apple.imageset/apple@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/contacts/Creating Contacts/Creating Contacts/Assets.xcassets/apple.imageset/apple@2x.png
--------------------------------------------------------------------------------
/contacts/Creating Contacts/Creating Contacts/Assets.xcassets/apple.imageset/apple@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/contacts/Creating Contacts/Creating Contacts/Assets.xcassets/apple.imageset/apple@3x.png
--------------------------------------------------------------------------------
/contacts/Creating Contacts/Creating Contacts/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Creating Contacts
4 | //
5 | // Created by Vandad on 7/8/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/contacts/Deleting Contacts/Deleting Contacts.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/contacts/Deleting Contacts/Deleting Contacts/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Deleting Contacts
4 | //
5 | // Created by Vandad on 7/27/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/contacts/Displaying Contacts with Prebuilt System UI/Displaying Contacts with Prebuilt System UI.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/contacts/Formatting Contact Data/Formatting Contact Data.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/contacts/Formatting Contact Data/Formatting Contact Data/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Formatting Contact Data
4 | //
5 | // Created by Vandad on 7/27/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 |
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/contacts/Picking Contacts with Prebuilt System UI/Picking Contacts with Prebuilt System UI.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/contacts/Searching for Contacts/Searching for Contacts.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/contacts/Searching for Contacts/Searching for Contacts/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Searching for Contacts
4 | //
5 | // Created by Vandad on 7/9/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/contacts/Updating Contacts/Updating Contacts.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/contacts/Updating Contacts/Updating Contacts/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Updating Contacts
4 | //
5 | // Created by Vandad on 7/10/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/coreMotion/Querying Pace and Cadence Information/Querying Pace and Cadence Information.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/coreMotion/Querying Pace and Cadence Information/Querying Pace and Cadence Information/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Querying Pace and Cadence Information
4 | //
5 | // Created by Vandad on 7/29/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/coreMotion/Recording and Reading Accelerometer Data/Recording and Reading Accelerometer Data.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/coreMotion/Recording and Reading Accelerometer Data/Recording and Reading Accelerometer Data/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Recording and Reading Accelerometer Data
4 | //
5 | // Created by Vandad on 7/29/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/dynamics/Adding a Radial Gravity Field to Your UI/Adding a Radial Gravity Field to Your UI.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/dynamics/Adding a Radial Gravity Field to Your UI/Dynamic-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | @import UIKit;
2 |
3 | #if DEBUG
4 |
5 | @interface UIDynamicAnimator (DebuggingOnly)
6 | @property (nonatomic, getter=isDebugEnabled) BOOL debugEnabled;
7 | @end
8 |
9 | #endif
--------------------------------------------------------------------------------
/dynamics/Animating UI Components with Noise/Animating UI Components with Noise.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/dynamics/Animating UI Components with Noise/Dynamic-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | @import UIKit;
2 |
3 | #if DEBUG
4 |
5 | @interface UIDynamicAnimator (DebuggingOnly)
6 | @property (nonatomic, getter=isDebugEnabled) BOOL debugEnabled;
7 | @end
8 |
9 | #endif
--------------------------------------------------------------------------------
/dynamics/Creating Turbulence Effects with Animations/Creating Turbulence Effects with Animations.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/dynamics/Creating Turbulence Effects with Animations/Dynamic-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | @import UIKit;
2 |
3 | #if DEBUG
4 |
5 | @interface UIDynamicAnimator (DebuggingOnly)
6 | @property (nonatomic, getter=isDebugEnabled) BOOL debugEnabled;
7 | @end
8 |
9 | #endif
--------------------------------------------------------------------------------
/dynamics/Creating a Linear Gravity Field on Your UI/Creating a Linear Gravity Field on Your UI.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/dynamics/Creating a Linear Gravity Field on Your UI/Dynamic-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | @import UIKit;
2 |
3 | #if DEBUG
4 |
5 | @interface UIDynamicAnimator (DebuggingOnly)
6 | @property (nonatomic, getter=isDebugEnabled) BOOL debugEnabled;
7 | @end
8 |
9 | #endif
--------------------------------------------------------------------------------
/dynamics/Creating a Magnetic Effect Between UI Components/Creating a Magnetic Effect Between UI Components.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/dynamics/Creating a Magnetic Effect Between UI Components/Dynamic-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | @import UIKit;
2 |
3 | #if DEBUG
4 |
5 | @interface UIDynamicAnimator (DebuggingOnly)
6 | @property (nonatomic, getter=isDebugEnabled) BOOL debugEnabled;
7 | @end
8 |
9 | #endif
--------------------------------------------------------------------------------
/dynamics/Designing a Velocity Field on Your UI/Designing a Velocity Field on Your UI.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/dynamics/Designing a Velocity Field on Your UI/Dynamic-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | @import UIKit;
2 |
3 | #if DEBUG
4 |
5 | @interface UIDynamicAnimator (DebuggingOnly)
6 | @property (nonatomic, getter=isDebugEnabled) BOOL debugEnabled;
7 | @end
8 |
9 | #endif
--------------------------------------------------------------------------------
/dynamics/Detecting Collisions Between Non-Rectangular UI Components/Detecting Collisions Between Non-Rectangular UI Components.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/dynamics/Detecting Collisions Between Non-Rectangular UI Components/Dynamic-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | @import UIKit;
2 |
3 | #if DEBUG
4 |
5 | @interface UIDynamicAnimator (DebuggingOnly)
6 | @property (nonatomic, getter=isDebugEnabled) BOOL debugEnabled;
7 | @end
8 |
9 | #endif
--------------------------------------------------------------------------------
/ext/Creating Safari Content Blockers/Creating Safari Content Blockers.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ext/Creating Safari Content Blockers/Creating Safari Content Blockers/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // Creating Safari Content Blockers
4 | //
5 | // Created by Vandad on 6/30/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import SafariServices
11 |
12 | @UIApplicationMain
13 | class AppDelegate: UIResponder, UIApplicationDelegate {
14 |
15 | var window: UIWindow?
16 |
17 | func application(application: UIApplication,
18 | didFinishLaunchingWithOptions
19 | launchOptions: [NSObject: AnyObject]?) -> Bool {
20 | return true
21 | }
22 |
23 | func applicationDidBecomeActive(application: UIApplication) {
24 |
25 | //TODO: replace this with your own content blocker's identifier
26 | let id = "se.pixolity.Creating-Safari-Content-Blockers.Image-Blocker"
27 | SFContentBlockerManager.reloadContentBlockerWithIdentifier(id) {error in
28 | guard error == nil else {
29 | //an error happened, handle it
30 | print("Failed to reload the blocker")
31 | return
32 | }
33 | print("Reloaded the blocker")
34 | }
35 | }
36 |
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/ext/Creating Safari Content Blockers/Creating Safari Content Blockers/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Creating Safari Content Blockers
4 | //
5 | // Created by Vandad on 6/30/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/ext/Creating Safari Content Blockers/Image Blocker/ActionRequestHandler.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ActionRequestHandler.swift
3 | // Image Blocker
4 | //
5 | // Created by Vandad on 6/30/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import MobileCoreServices
11 |
12 | class ActionRequestHandler: NSObject, NSExtensionRequestHandling {
13 |
14 | func beginRequestWithExtensionContext(context: NSExtensionContext) {
15 | let attachment = NSItemProvider(contentsOfURL: NSBundle.mainBundle().URLForResource("blockerList", withExtension: "json"))!
16 |
17 | let item = NSExtensionItem()
18 | item.attachments = [attachment]
19 |
20 | context.completeRequestReturningItems([item], completionHandler: nil);
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/ext/Creating Safari Content Blockers/Image Blocker/blockerList.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "action": {
4 | "type": "block"
5 | },
6 | "trigger": {
7 | "url-filter": ".*",
8 | "resource-type" : ["image"],
9 | "if-domain" : ["edition.cnn.com"]
10 | }
11 | },
12 | {
13 | "action": {
14 | "type": "css-display-none",
15 | "selector" : "a"
16 | },
17 | "trigger": {
18 | "url-filter": ".*",
19 | "if-domain" : ["macrumors.com"]
20 | }
21 | },
22 | {
23 | "action": {
24 | "type": "css-display-none",
25 | "selector" : "a[id='logo']"
26 | },
27 | "trigger": {
28 | "url-filter": ".*",
29 | "if-domain" : ["macrumors.com"]
30 | }
31 | },
32 | {
33 | "action": {
34 | "type": "block"
35 | },
36 | "trigger": {
37 | "url-filter": ".*",
38 | "resource-type" : ["image"],
39 | "unless-domain" : ["reddit.com"]
40 | }
41 | },
42 | {
43 | "action": {
44 | "type": "css-display-none",
45 | "selector" : "a[href]"
46 | },
47 | "trigger": {
48 | "url-filter": ".*",
49 | "if-domain" : ["apple.com"]
50 | }
51 | }
52 | ]
--------------------------------------------------------------------------------
/ext/Creating Safari Content Blockers/Image Blocker/blockerListPseudo.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "action": {
4 | "type": "block" | "block-cookies" | "css-display-none",
5 | "selector" : This is a CSS selector that the action will be applied to
6 | },
7 | "trigger": {
8 | "url-filter": "this is a filter that will be applied on the WHOLE url",
9 | "url-filter-is-case-sensitive" : same as url-filter but case sensitive,
10 | "resource-type" : ["image" | "style-sheet" | "script" | "font" | etc],
11 | "if-domain" : [an array of actual domain names to apply filter on],
12 | "unless-domain" : [an array of domain names to exclude from filter],
13 | "load-type" : "first-party" | "third-party"
14 | }
15 | }
16 | ]
--------------------------------------------------------------------------------
/ext/Creating Shared Links for Safari/Creating Shared Links for Safari.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ext/Creating Shared Links for Safari/Creating Shared Links for Safari/Assets.xcassets/AppIcon.appiconset/AppIcon copy 2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/ext/Creating Shared Links for Safari/Creating Shared Links for Safari/Assets.xcassets/AppIcon.appiconset/AppIcon copy 2.png
--------------------------------------------------------------------------------
/ext/Creating Shared Links for Safari/Creating Shared Links for Safari/Assets.xcassets/AppIcon.appiconset/AppIcon copy 3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/ext/Creating Shared Links for Safari/Creating Shared Links for Safari/Assets.xcassets/AppIcon.appiconset/AppIcon copy 3.png
--------------------------------------------------------------------------------
/ext/Creating Shared Links for Safari/Creating Shared Links for Safari/Assets.xcassets/AppIcon.appiconset/AppIcon copy 4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/ext/Creating Shared Links for Safari/Creating Shared Links for Safari/Assets.xcassets/AppIcon.appiconset/AppIcon copy 4.png
--------------------------------------------------------------------------------
/ext/Creating Shared Links for Safari/Creating Shared Links for Safari/Assets.xcassets/AppIcon.appiconset/AppIcon copy 6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/ext/Creating Shared Links for Safari/Creating Shared Links for Safari/Assets.xcassets/AppIcon.appiconset/AppIcon copy 6.png
--------------------------------------------------------------------------------
/ext/Creating Shared Links for Safari/Creating Shared Links for Safari/Assets.xcassets/AppIcon.appiconset/AppIcon copy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/ext/Creating Shared Links for Safari/Creating Shared Links for Safari/Assets.xcassets/AppIcon.appiconset/AppIcon copy.png
--------------------------------------------------------------------------------
/ext/Creating Shared Links for Safari/Creating Shared Links for Safari/Assets.xcassets/AppIcon.appiconset/AppIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/ext/Creating Shared Links for Safari/Creating Shared Links for Safari/Assets.xcassets/AppIcon.appiconset/AppIcon.png
--------------------------------------------------------------------------------
/ext/Creating Shared Links for Safari/Creating Shared Links for Safari/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Creating Shared Links for Safari
4 | //
5 | // Created by Vandad on 7/1/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/ext/Creating Shared Links for Safari/SharedLink/ExtIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/ext/Creating Shared Links for Safari/SharedLink/ExtIcon.png
--------------------------------------------------------------------------------
/ext/Maintaining Your App’s Indexed Content/Maintaining Your App’s Indexed Content.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ext/Maintaining Your App’s Indexed Content/Maintaining Your App’s Indexed Content/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // Maintaining Your App’s Indexed Content
4 | //
5 | // Created by Vandad on 7/1/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import SharedCode
11 |
12 | @UIApplicationMain
13 | class AppDelegate: UIResponder, UIApplicationDelegate {
14 |
15 | var window: UIWindow?
16 |
17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
18 |
19 | Indexer().doIndex()
20 |
21 | return true
22 | }
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/ext/Maintaining Your App’s Indexed Content/Maintaining Your App’s Indexed Content/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Maintaining Your App’s Indexed Content
4 | //
5 | // Created by Vandad on 7/1/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/iOS_9_swift_prog_ckbk_comp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/iOS_9_swift_prog_ckbk_comp.png
--------------------------------------------------------------------------------
/mapLocation/Customizing the Tint Color of Pins on the Map/Customizing the Tint Color of Pins on the Map.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/mapLocation/Displaying Traffic, Scale and Compass Indicators on the Map/Displaying Traffic, Scale and Compass Indicators on the Map.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/mapLocation/Launching the iOS Maps App in Transit Mode/Launching the iOS Maps App in Transit Mode.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/mapLocation/Launching the iOS Maps App in Transit Mode/Launching the iOS Maps App in Transit Mode/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Launching the iOS Maps App in Transit Mode
4 | //
5 | // Created by Vandad on 7/4/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import MapKit
11 |
12 | class ViewController: UIViewController {
13 |
14 | @IBAction func open() {
15 |
16 | let srcLoc = CLLocationCoordinate2D(latitude: 59.328564,
17 | longitude: 18.061448)
18 | let srcPlc = MKPlacemark(coordinate: srcLoc, addressDictionary: nil)
19 | let src = MKMapItem(placemark: srcPlc)
20 |
21 | let desLoc = CLLocationCoordinate2D(latitude: 59.746148,
22 | longitude: 18.683281)
23 | let desPlc = MKPlacemark(coordinate: desLoc, addressDictionary: nil)
24 | let des = MKMapItem(placemark: desPlc)
25 |
26 | let options = [
27 | MKLaunchOptionsDirectionsModeKey : MKLaunchOptionsDirectionsModeTransit
28 | ]
29 |
30 | MKMapItem.openMapsWithItems([src, des], launchOptions: options)
31 |
32 | }
33 |
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/mapLocation/Providing Detailed Pin Information with Custom Views/Providing Detailed Pin Information with Custom Views.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/mapLocation/Providing Detailed Pin Information with Custom Views/Providing Detailed Pin Information with Custom Views/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/mapLocation/Providing Detailed Pin Information with Custom Views/Providing Detailed Pin Information with Custom Views/Assets.xcassets/ExtIcon.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "ExtIcon copy 2.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "ExtIcon copy.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "ExtIcon.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/mapLocation/Providing Detailed Pin Information with Custom Views/Providing Detailed Pin Information with Custom Views/Assets.xcassets/ExtIcon.imageset/ExtIcon copy 2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/mapLocation/Providing Detailed Pin Information with Custom Views/Providing Detailed Pin Information with Custom Views/Assets.xcassets/ExtIcon.imageset/ExtIcon copy 2.png
--------------------------------------------------------------------------------
/mapLocation/Providing Detailed Pin Information with Custom Views/Providing Detailed Pin Information with Custom Views/Assets.xcassets/ExtIcon.imageset/ExtIcon copy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/mapLocation/Providing Detailed Pin Information with Custom Views/Providing Detailed Pin Information with Custom Views/Assets.xcassets/ExtIcon.imageset/ExtIcon copy.png
--------------------------------------------------------------------------------
/mapLocation/Providing Detailed Pin Information with Custom Views/Providing Detailed Pin Information with Custom Views/Assets.xcassets/ExtIcon.imageset/ExtIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/mapLocation/Providing Detailed Pin Information with Custom Views/Providing Detailed Pin Information with Custom Views/Assets.xcassets/ExtIcon.imageset/ExtIcon.png
--------------------------------------------------------------------------------
/mapLocation/Providing Detailed Pin Information with Custom Views/Providing Detailed Pin Information with Custom Views/Assets.xcassets/Icon.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "Icon copy 2.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "Icon copy.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "Icon.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/mapLocation/Providing Detailed Pin Information with Custom Views/Providing Detailed Pin Information with Custom Views/Assets.xcassets/Icon.imageset/Icon copy 2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/mapLocation/Providing Detailed Pin Information with Custom Views/Providing Detailed Pin Information with Custom Views/Assets.xcassets/Icon.imageset/Icon copy 2.png
--------------------------------------------------------------------------------
/mapLocation/Providing Detailed Pin Information with Custom Views/Providing Detailed Pin Information with Custom Views/Assets.xcassets/Icon.imageset/Icon copy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/mapLocation/Providing Detailed Pin Information with Custom Views/Providing Detailed Pin Information with Custom Views/Assets.xcassets/Icon.imageset/Icon copy.png
--------------------------------------------------------------------------------
/mapLocation/Providing Detailed Pin Information with Custom Views/Providing Detailed Pin Information with Custom Views/Assets.xcassets/Icon.imageset/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/mapLocation/Providing Detailed Pin Information with Custom Views/Providing Detailed Pin Information with Custom Views/Assets.xcassets/Icon.imageset/Icon.png
--------------------------------------------------------------------------------
/mapLocation/Providing an ETA for Transit Transport Type/Providing an ETA for Transit Transport Type.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/mapLocation/Providing an ETA for Transit Transport Type/Providing an ETA for Transit Transport Type/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "size" : "60x60",
25 | "idiom" : "iphone",
26 | "filename" : "Icon120.png",
27 | "scale" : "2x"
28 | },
29 | {
30 | "size" : "60x60",
31 | "idiom" : "iphone",
32 | "filename" : "Icon180.png",
33 | "scale" : "3x"
34 | }
35 | ],
36 | "info" : {
37 | "version" : 1,
38 | "author" : "xcode"
39 | }
40 | }
--------------------------------------------------------------------------------
/mapLocation/Providing an ETA for Transit Transport Type/Providing an ETA for Transit Transport Type/Assets.xcassets/AppIcon.appiconset/Icon120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/mapLocation/Providing an ETA for Transit Transport Type/Providing an ETA for Transit Transport Type/Assets.xcassets/AppIcon.appiconset/Icon120.png
--------------------------------------------------------------------------------
/mapLocation/Providing an ETA for Transit Transport Type/Providing an ETA for Transit Transport Type/Assets.xcassets/AppIcon.appiconset/Icon180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/mapLocation/Providing an ETA for Transit Transport Type/Providing an ETA for Transit Transport Type/Assets.xcassets/AppIcon.appiconset/Icon180.png
--------------------------------------------------------------------------------
/mapLocation/Providing an ETA for Transit Transport Type/Providing an ETA for Transit Transport Type/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Providing an ETA for Transit Transport Type
4 | //
5 | // Created by Vandad on 7/4/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/mapLocation/Requesting the User’s Location Only Once/Requesting the User’s Location Only Once.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/mapLocation/Requesting the User’s Location in Background/Requesting the User’s Location in Background.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/mapLocation/Showing Maps in Flyover Mode/Showing Maps in Flyover Mode.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/mapLocation/Showing Maps in Flyover Mode/Showing Maps in Flyover Mode/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Showing Maps in Flyover Mode
4 | //
5 | // Created by Vandad on 7/4/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import MapKit
11 |
12 | class ViewController: UIViewController {
13 |
14 | @IBOutlet var map: MKMapView!
15 |
16 | override func viewDidLoad() {
17 | super.viewDidLoad()
18 |
19 | map.mapType = .SatelliteFlyover
20 | map.showsBuildings = true
21 |
22 | }
23 |
24 | override func viewDidAppear(animated: Bool) {
25 | super.viewDidAppear(animated)
26 |
27 | let loc = CLLocationCoordinate2D(latitude: 59.328564,
28 | longitude: 18.061448)
29 |
30 | let altitude: CLLocationDistance = 500
31 | let pitch = CGFloat(45)
32 | let heading: CLLocationDirection = 90
33 |
34 | let c = MKMapCamera(lookingAtCenterCoordinate: loc,
35 | fromDistance: altitude, pitch: pitch, heading: heading)
36 |
37 | map.setCamera(c, animated: true)
38 |
39 | }
40 |
41 |
42 | }
43 |
44 |
--------------------------------------------------------------------------------
/multimedia/Downloading and Preparing Remote Media for Playback/Downloading and Preparing Remote Media for Playback.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/multimedia/Downloading and Preparing Remote Media for Playback/Downloading and Preparing Remote Media for Playback/Downloading and Preparing Remote Media for Playback.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.developer.media-asset-download
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/multimedia/Enabling Spoken Audio Sessions/Enabling Spoken Audio Sessions.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/multimedia/Enabling Spoken Audio Sessions/Enabling Spoken Audio Sessions/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Enabling Spoken Audio Sessions
4 | //
5 | // Created by Vandad on 8/12/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/multimedia/Reading out Text with the Default Siri Alex Voice/Reading out Text with the Default Siri Alex Voice.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/multimedia/Reading out Text with the Default Siri Alex Voice/Reading out Text with the Default Siri Alex Voice/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Reading out Text with the Default Siri Alex Voice
4 | //
5 | // Created by Vandad on 8/3/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import AVFoundation
11 |
12 | class ViewController: UIViewController, AVSpeechSynthesizerDelegate{
13 |
14 | @IBOutlet var textView: UITextView!
15 |
16 | @IBAction func read(sender: AnyObject) {
17 |
18 | guard let voice = AVSpeechSynthesisVoice(identifier:
19 | AVSpeechSynthesisVoiceIdentifierAlex) else{
20 | print("Alex is not available")
21 | return
22 | }
23 |
24 | print("id = \(voice.identifier)")
25 | print("quality = \(voice.quality)")
26 | print("name = \(voice.name)")
27 |
28 | let toSay = AVSpeechUtterance(string: textView.text)
29 | toSay.voice = voice
30 |
31 | let alex = AVSpeechSynthesizer()
32 | alex.delegate = self
33 | alex.speakUtterance(toSay)
34 |
35 | }
36 |
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/multitasking/Adding Picture in Picture Playback Functionality/Adding Picture in Picture Playback Functionality.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/multitasking/Adding Picture in Picture Playback Functionality/Adding Picture in Picture Playback Functionality/PipView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // PipView.swift
3 | // Adding Picture in Picture Playback Functionality
4 | //
5 | // Created by Vandad on 7/2/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import UIKit
11 | import AVFoundation
12 |
13 | protocol Pippable{
14 | var pipLayer: AVPlayerLayer{get}
15 | var pipLayerPlayer: AVPlayer? {get set}
16 | }
17 |
18 | extension UIView : Pippable{
19 |
20 | var pipLayer: AVPlayerLayer{
21 | get{return layer as! AVPlayerLayer}
22 | }
23 |
24 | //shortcut into pipLayer.player
25 | var pipLayerPlayer: AVPlayer?{
26 | get{return pipLayer.player}
27 | set{pipLayer.player = newValue}
28 | }
29 |
30 | override public func awakeFromNib() {
31 | super.awakeFromNib()
32 | backgroundColor = .blackColor()
33 | }
34 |
35 | }
36 |
37 | class PipView : UIView{
38 |
39 | override class func layerClass() -> AnyClass{
40 | return AVPlayerLayer.self
41 | }
42 |
43 | }
--------------------------------------------------------------------------------
/multitasking/Adding Picture in Picture Playback Functionality/Adding Picture in Picture Playback Functionality/video.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/multitasking/Adding Picture in Picture Playback Functionality/Adding Picture in Picture Playback Functionality/video.mp4
--------------------------------------------------------------------------------
/multitasking/Handling Low Power Mode and Providing Alternatives/Handling Low Power Mode and Providing Alternatives.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/security/Authenticating the User with Touch ID with Timeout/Authenticating the User with Touch ID with Timeout.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/security/Authenticating the User with Touch ID with Timeout/Authenticating the User with Touch ID with Timeout/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Authenticating the User with Touch ID with Timeout
4 | //
5 | // Created by Vandad on 8/3/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/security/Binding Keychain Items to Passcode and Touch ID/Binding Keychain Items to Passcode and Touch ID.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/security/Binding Keychain Items to Passcode and Touch ID/Binding Keychain Items to Passcode and Touch ID/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Binding Keychain Items to Passcode and Touch ID
4 | //
5 | // Created by Vandad on 7/30/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/security/Opening URLs Safely/Opening URLs Safely.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/security/Opening URLs Safely/Opening URLs Safely/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Opening URLs Safely
4 | //
5 | // Created by Vandad on 7/30/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/security/Protecting Your Network Connections with ATS/Protecting Your Network Connections with ATS.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/security/Protecting Your Network Connections with ATS/Protecting Your Network Connections with ATS/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Protecting Your Network Connections with ATS
4 | //
5 | // Created by Vandad on 7/29/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/shared/SharedCode/SharedCode.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/shared/SharedCode/SharedCode/CFStringRef+ToString.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CFStringRef+ToString.swift
3 | // SharedCode
4 | //
5 | // Created by Vandad on 8/3/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | extension CFStringRef{
12 | public func str() -> String{
13 | return String(self)
14 | }
15 | }
16 |
17 |
18 |
--------------------------------------------------------------------------------
/shared/SharedCode/SharedCode/CGSize+Size.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CGSize+Size.swift
3 | // SharedCode
4 | //
5 | // Created by Vandad on 8/14/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | extension CGSize{
12 |
13 | public var center: CGPoint{
14 | return CGPoint(x: self.width / 2.0, y: self.height / 2.0)
15 | }
16 |
17 | }
--------------------------------------------------------------------------------
/shared/SharedCode/SharedCode/CNContact+PrintPhoneNumbers.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CNContact+PrintPhoneNumbers.swift
3 | // SharedCode
4 | //
5 | // Created by Vandad on 7/28/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import Contacts
11 |
12 | public extension CNContact{
13 | func printPhoneNumbers(){
14 | guard self.phoneNumbers.count > 0 else{
15 | print("No phone numbers are available for this user")
16 | return
17 | }
18 |
19 | for label in self.phoneNumbers where label.value is CNPhoneNumber{
20 | let num = label.value as! CNPhoneNumber
21 | print(num.stringValue)
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/shared/SharedCode/SharedCode/ColorToString.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ColorToString.swift
3 | // SharedCode
4 | //
5 | // Created by Vandad on 7/3/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import UIKit
11 |
12 | public extension UIColor{
13 | final func toString() -> String{
14 |
15 | var red = 0.0 as CGFloat
16 | var green = 0.0 as CGFloat
17 | var blue = 0.0 as CGFloat
18 | var alpha = 0.0 as CGFloat
19 | getRed(&red, green: &green, blue: &blue, alpha: &alpha)
20 |
21 | return "\(Int(red))\(Int(green))\(Int(blue))\(Int(alpha))"
22 | }
23 | }
--------------------------------------------------------------------------------
/shared/SharedCode/SharedCode/ContactAuthorizer.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ContactAuthorizer.swift
3 | // SharedCode
4 | //
5 | // Created by Vandad on 7/9/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import Contacts
11 |
12 | public final class ContactAuthorizer{
13 |
14 | public class func authorizeContactsWithCompletionHandler(completionHandler: (succeeded: Bool) -> Void){
15 |
16 | switch CNContactStore.authorizationStatusForEntityType(.Contacts){
17 | case .Authorized:
18 | completionHandler(succeeded: true)
19 | case .NotDetermined:
20 | CNContactStore().requestAccessForEntityType(.Contacts){succeeded, err in
21 | completionHandler(succeeded: err == nil && succeeded)
22 | }
23 | default:
24 | completionHandler(succeeded: false)
25 | }
26 |
27 | }
28 |
29 | }
--------------------------------------------------------------------------------
/shared/SharedCode/SharedCode/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/shared/SharedCode/SharedCode/Icon.png
--------------------------------------------------------------------------------
/shared/SharedCode/SharedCode/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/shared/SharedCode/SharedCode/MapAnnotation.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MapAnnotation.swift
3 | // SharedCode
4 | //
5 | // Created by Vandad on 7/3/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import MapKit
11 |
12 | public class Annotation : NSObject, MKAnnotation{
13 | public var coordinate: CLLocationCoordinate2D
14 | public var title: String?
15 | public var subtitle: String?
16 |
17 | public init(coordinate: CLLocationCoordinate2D,
18 | title: String, subtitle: String){
19 | self.coordinate = coordinate
20 | self.title = title
21 | self.subtitle = subtitle
22 | }
23 |
24 | }
--------------------------------------------------------------------------------
/shared/SharedCode/SharedCode/SharedCode.h:
--------------------------------------------------------------------------------
1 | //
2 | // SharedCode.h
3 | // SharedCode
4 | //
5 | // Created by Vandad on 7/1/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | //! Project version number for SharedCode.
13 | FOUNDATION_EXPORT double SharedCodeVersionNumber;
14 |
15 | //! Project version string for SharedCode.
16 | FOUNDATION_EXPORT const unsigned char SharedCodeVersionString[];
17 |
18 | // In this header, you should import all the public headers of your framework using statements like #import
19 |
20 |
21 |
--------------------------------------------------------------------------------
/shared/SharedCode/SharedCode/Threading.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Threading.swift
3 | // SharedCode
4 | //
5 | // Created by Vandad on 8/6/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | public func onMainThread(f: () -> Void){
12 | dispatch_async(dispatch_get_main_queue(), f)
13 | }
--------------------------------------------------------------------------------
/shared/SharedCode/SharedCode/UICollisionBehavior+Additions.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UICollisionBehavior+Additions.swift
3 | // SharedCode
4 | //
5 | // Created by Vandad on 8/19/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | extension UICollisionBehavior{
12 | public func addItems(items: [UIDynamicItem]){
13 | for item in items{
14 | addItem(item)
15 | }
16 | }
17 | public func removeItems(){
18 | for item in items{
19 | removeItem(item)
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/shared/SharedCode/SharedCode/UIDynamicAnimator+Additions.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIDynamicAnimator+Additions.swift
3 | // SharedCode
4 | //
5 | // Created by Vandad on 8/19/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | extension UIDynamicAnimator{
12 | public func addBehaviors(behaviors: [UIDynamicBehavior]){
13 | for behavior in behaviors{
14 | addBehavior(behavior)
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/shared/SharedCode/SharedCode/UIFieldBehavior+Additions.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIFieldBehavior+Additions.swift
3 | // SharedCode
4 | //
5 | // Created by Vandad on 8/19/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | extension UIFieldBehavior{
12 | public func addItems(items: [UIDynamicItem]){
13 | for item in items{
14 | addItem(item)
15 | }
16 | }
17 | public func removeItems(){
18 | for item in items{
19 | removeItem(item)
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/shared/SharedCode/SharedCode/ViewControllerExtensions.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewControllerExtensions.swift
3 | // SharedCode
4 | //
5 | // Created by Vandad on 7/2/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import UIKit
11 |
12 | public extension UIViewController{
13 | func alert(txt: String){
14 | let c = UIAlertController(title: nil, message: txt,
15 | preferredStyle: .Alert)
16 |
17 | c.addAction(UIAlertAction(title: "OK",
18 | style: .Default, handler: {action in
19 | self.dismissViewControllerAnimated(true, completion: nil)
20 | }))
21 |
22 | presentViewController(c, animated: true, completion: nil)
23 | }
24 | }
--------------------------------------------------------------------------------
/shared/SharedCode/SharedCodeTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/shared/SharedCode/SharedCodeTests/SharedCodeTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SharedCodeTests.swift
3 | // SharedCodeTests
4 | //
5 | // Created by Vandad on 7/1/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import XCTest
10 |
11 | class SharedCodeTests: XCTestCase {
12 |
13 | override func setUp() {
14 | super.setUp()
15 | // Put setup code here. This method is called before the invocation of each test method in the class.
16 | }
17 |
18 | override func tearDown() {
19 | // Put teardown code here. This method is called after the invocation of each test method in the class.
20 | super.tearDown()
21 | }
22 |
23 | func testExample() {
24 | // This is an example of a functional test case.
25 | // Use XCTAssert and related functions to verify your tests produce the correct results.
26 | }
27 |
28 | func testPerformanceExample() {
29 | // This is an example of a performance test case.
30 | self.measureBlock() {
31 | // Put the code you want to measure the time of here.
32 | }
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Adding Multiple Buttons to the Navigation Bar/Adding Multiple Buttons to the Navigation Bar.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Adding Multiple Buttons to the Navigation Bar/Adding Multiple Buttons to the Navigation Bar/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Adding Multiple Buttons to the Navigation Bar
4 | //
5 | // Created by Vandad on 6/26/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Building Equality Functionality Into Your Own Types/Building Equality Functionality Into Your Own Types.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Building Equality Functionality Into Your Own Types/Building Equality Functionality Into Your Own Types/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Building Equality Functionality Into Your Own Types
4 | //
5 | // Created by Vandad on 6/29/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Bundling and Reading Data in Your Apps/Bundling and Reading Data in Your Apps.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Bundling and Reading Data in Your Apps/Bundling and Reading Data in Your Apps/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/swiftXcodeIB/Bundling and Reading Data in Your Apps/Bundling and Reading Data in Your Apps/Assets.xcassets/rtf.dataset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | },
6 | "data" : [
7 | {
8 | "idiom" : "iphone",
9 | "filename" : "iphone.rtf",
10 | "universal-type-identifier" : "public.rtf"
11 | },
12 | {
13 | "idiom" : "ipad",
14 | "filename" : "ipad.rtf",
15 | "universal-type-identifier" : "public.rtf"
16 | }
17 | ]
18 | }
--------------------------------------------------------------------------------
/swiftXcodeIB/Bundling and Reading Data in Your Apps/Bundling and Reading Data in Your Apps/Assets.xcassets/rtf.dataset/ipad.rtf:
--------------------------------------------------------------------------------
1 | {\rtf1\ansi\ansicpg1252\cocoartf1348\cocoasubrtf170
2 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;}
3 | {\colortbl;\red255\green255\blue255;}
4 | \margl1440\margr1440\vieww24000\viewh8400\viewkind0
5 | \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
6 |
7 | \f0\b\fs24 \cf0 iPad
8 | \b0 Says Hello}
--------------------------------------------------------------------------------
/swiftXcodeIB/Bundling and Reading Data in Your Apps/Bundling and Reading Data in Your Apps/Assets.xcassets/rtf.dataset/iphone.rtf:
--------------------------------------------------------------------------------
1 | {\rtf1\ansi\ansicpg1252\cocoartf1348\cocoasubrtf170
2 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;}
3 | {\colortbl;\red255\green255\blue255;}
4 | \margl1440\margr1440\vieww24000\viewh8400\viewkind0
5 | \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
6 |
7 | \f0\b\fs24 \cf0 iPhone
8 | \b0 Says Hello}
--------------------------------------------------------------------------------
/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // Categorizing and Downloading Assets to get Smaller Binaries
4 | //
5 | // Created by Vandad on 6/25/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
17 | // Override point for customization after application launch.
18 | return true
19 | }
20 |
21 | }
22 |
23 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries/Assets.xcassets/Level1-2.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x"
10 | },
11 | {
12 | "idiom" : "universal",
13 | "filename" : "level1-2.png",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode",
20 | "on-demand-resource-tags" : [
21 | "level1"
22 | ]
23 | }
24 | }
--------------------------------------------------------------------------------
/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries/Assets.xcassets/Level1-2.imageset/level1-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries/Assets.xcassets/Level1-2.imageset/level1-2.png
--------------------------------------------------------------------------------
/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries/Assets.xcassets/level1-1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x"
10 | },
11 | {
12 | "idiom" : "universal",
13 | "filename" : "level1-1.png",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode",
20 | "on-demand-resource-tags" : [
21 | "level1"
22 | ]
23 | }
24 | }
--------------------------------------------------------------------------------
/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries/Assets.xcassets/level1-1.imageset/level1-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries/Assets.xcassets/level1-1.imageset/level1-1.png
--------------------------------------------------------------------------------
/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries/Assets.xcassets/level1-3.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x"
10 | },
11 | {
12 | "idiom" : "universal",
13 | "filename" : "level1-3.png",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode",
20 | "on-demand-resource-tags" : [
21 | "level1"
22 | ]
23 | }
24 | }
--------------------------------------------------------------------------------
/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries/Assets.xcassets/level1-3.imageset/level1-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries/Assets.xcassets/level1-3.imageset/level1-3.png
--------------------------------------------------------------------------------
/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries/Assets.xcassets/level2-1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x"
10 | },
11 | {
12 | "idiom" : "universal",
13 | "filename" : "level2-2.png",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode",
20 | "on-demand-resource-tags" : [
21 | "level2"
22 | ]
23 | }
24 | }
--------------------------------------------------------------------------------
/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries/Assets.xcassets/level2-1.imageset/level2-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries/Assets.xcassets/level2-1.imageset/level2-2.png
--------------------------------------------------------------------------------
/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries/Assets.xcassets/level2-2.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x"
10 | },
11 | {
12 | "idiom" : "universal",
13 | "filename" : "level2-2.png",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode",
20 | "on-demand-resource-tags" : [
21 | "level2"
22 | ]
23 | }
24 | }
--------------------------------------------------------------------------------
/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries/Assets.xcassets/level2-2.imageset/level2-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries/Assets.xcassets/level2-2.imageset/level2-2.png
--------------------------------------------------------------------------------
/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries/Assets.xcassets/level2-3.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x"
10 | },
11 | {
12 | "idiom" : "universal",
13 | "filename" : "level2-3.png",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode",
20 | "on-demand-resource-tags" : [
21 | "level2"
22 | ]
23 | }
24 | }
--------------------------------------------------------------------------------
/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries/Assets.xcassets/level2-3.imageset/level2-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries/Assets.xcassets/level2-3.imageset/level2-3.png
--------------------------------------------------------------------------------
/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries/Assets.xcassets/level3-1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x"
10 | },
11 | {
12 | "idiom" : "universal",
13 | "filename" : "level3-1.png",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode",
20 | "on-demand-resource-tags" : [
21 | "level3"
22 | ]
23 | }
24 | }
--------------------------------------------------------------------------------
/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries/Assets.xcassets/level3-1.imageset/level3-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries/Assets.xcassets/level3-1.imageset/level3-1.png
--------------------------------------------------------------------------------
/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries/Assets.xcassets/level3-2.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x"
10 | },
11 | {
12 | "idiom" : "universal",
13 | "filename" : "level3-2.png",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode",
20 | "on-demand-resource-tags" : [
21 | "level3"
22 | ]
23 | }
24 | }
--------------------------------------------------------------------------------
/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries/Assets.xcassets/level3-2.imageset/level3-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries/Assets.xcassets/level3-2.imageset/level3-2.png
--------------------------------------------------------------------------------
/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries/Assets.xcassets/level3-3.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x"
10 | },
11 | {
12 | "idiom" : "universal",
13 | "filename" : "level3-3.png",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode",
20 | "on-demand-resource-tags" : [
21 | "level3"
22 | ]
23 | }
24 | }
--------------------------------------------------------------------------------
/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries/Assets.xcassets/level3-3.imageset/level3-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/swiftXcodeIB/Categorizing and Downloading Assets to get Smaller Binaries/Categorizing and Downloading Assets to get Smaller Binaries/Assets.xcassets/level3-3.imageset/level3-3.png
--------------------------------------------------------------------------------
/swiftXcodeIB/Checking for API Availability/Checking for API Availability.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Checking for API Availability/Checking for API Availability/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Checking for API Availability
4 | //
5 | // Created by Vandad on 6/25/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Conditionally Extending a Protocol/Conditionally Extending a Protocol.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Conditionally Extending a Protocol/Conditionally Extending a Protocol/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Conditionally Extending a Protocol
4 | //
5 | // Created by Vandad on 6/26/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Creating Your Own Set Types/Creating Your Own Set Types.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Creating Your Own Set Types/Creating Your Own Set Types/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Creating Your Own Set Types
4 | //
5 | // Created by Vandad on 6/26/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Designing Interactive Interface Objects in Playgrounds/Designing Interactive Interface Objects in Playgrounds.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Designing Interactive Interface Objects in Playgrounds/Designing Interactive Interface Objects in Playgrounds/MyPlayground.playground/Contents.swift:
--------------------------------------------------------------------------------
1 | //: Playground - noun: a place where people can play
2 |
3 | import UIKit
4 |
5 | var view = UIView(frame: CGRect(x: 0, y: 0, width: 300, height: 300))
6 | view.backgroundColor = UIColor.greenColor()
7 |
8 | view.layer.borderColor = UIColor.blueColor().CGColor
9 | view.layer.borderWidth = 10
10 | view.layer.cornerRadius = 20
11 |
12 | view
13 |
14 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Designing Interactive Interface Objects in Playgrounds/Designing Interactive Interface Objects in Playgrounds/MyPlayground.playground/contents.xcplayground:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Designing Interactive Interface Objects in Playgrounds/Designing Interactive Interface Objects in Playgrounds/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Designing Interactive Interface Objects in Playgrounds
4 | //
5 | // Created by Vandad on 7/4/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Ensuring the Execution of Code Blocks Before Exiting Methods/Ensuring the Execution of Code Blocks Before Exiting Methods.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Ensuring the Execution of Code Blocks Before Exiting Methods/Ensuring the Execution of Code Blocks Before Exiting Methods.xcodeproj/xcshareddata/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Ensuring the Execution of Code Blocks Before Exiting Methods/Ensuring the Execution of Code Blocks Before Exiting Methods/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Ensuring the Execution of Code Blocks Before Exiting Methods
4 | //
5 | // Created by Vandad on 6/25/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Exporting Device Specific Binaries/Exporting Device Specific Binaries.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Exporting Device Specific Binaries/Exporting Device Specific Binaries/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Exporting Device Specific Binaries
4 | //
5 | // Created by Vandad on 6/26/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Grouping Switch Statement Cases Together/Grouping Switch Statement Cases Together.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Grouping Switch Statement Cases Together/Grouping Switch Statement Cases Together/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Grouping Switch Statement Cases Together
4 | //
5 | // Created by Vandad on 7/6/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Handling Errors in Swift/Handling Errors in Swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Handling Errors in Swift/Handling Errors in Swift/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Handling Errors in Swift
4 | //
5 | // Created by Vandad on 6/24/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Linking Storyboards/Linking Storyboards.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Linking Storyboards/Linking Storyboards/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Linking Storyboards
4 | //
5 | // Created by Vandad on 6/26/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Looping Conditionally Through a Collection/Looping Conditionally Through a Collection.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Looping Conditionally Through a Collection/Looping Conditionally Through a Collection/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Looping Conditionally Through a Collection
4 | //
5 | // Created by Vandad on 7/4/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Optimizing Your Swift Code/Optimizing Your Swift Code.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Optimizing Your Swift Code/Optimizing Your Swift Code/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Optimizing Your Swift Code
4 | //
5 | // Created by Vandad on 6/26/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | func someMethod(){
14 |
15 | }
16 |
17 | func anotherMethod(){
18 |
19 | }
20 |
21 | override func viewDidLoad() {
22 |
23 | super.viewDidLoad()
24 |
25 | }
26 |
27 |
28 | }
29 |
30 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Specifying Preconditions for Methods/Specifying Preconditions for Methods.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/swiftXcodeIB/Specifying Preconditions for Methods/Specifying Preconditions for Methods/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Specifying Preconditions for Methods
4 | //
5 | // Created by Vandad on 6/25/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/ui/Allowing Users to Enter Text in Response to Local and Remote Notifications/Allowing Users to Enter Text in Response to Local and Remote Notifications.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ui/Allowing Users to Enter Text in Response to Local and Remote Notifications/Allowing Users to Enter Text in Response to Local and Remote Notifications/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Allowing Users to Enter Text in Response to Local and Remote Notifications
4 | //
5 | // Created by Vandad on 6/29/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/ui/Arranging Your Components Horizontally or Vertically/Arranging Your Components Horizontally or Vertically.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ui/Arranging Your Components Horizontally or Vertically/Arranging Your Components Horizontally or Vertically/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/ui/Arranging Your Components Horizontally or Vertically/Arranging Your Components Horizontally or Vertically/Assets.xcassets/img.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x"
10 | },
11 | {
12 | "idiom" : "universal",
13 | "filename" : "img.png",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ui/Arranging Your Components Horizontally or Vertically/Arranging Your Components Horizontally or Vertically/Assets.xcassets/img.imageset/img.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/ui/Arranging Your Components Horizontally or Vertically/Arranging Your Components Horizontally or Vertically/Assets.xcassets/img.imageset/img.png
--------------------------------------------------------------------------------
/ui/Arranging Your Components Horizontally or Vertically/Arranging Your Components Horizontally or Vertically/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Arranging Your Components Horizontally or Vertically
4 | //
5 | // Created by Vandad on 6/29/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 |
17 |
18 | }
19 |
20 | override func didReceiveMemoryWarning() {
21 | super.didReceiveMemoryWarning()
22 | // Dispose of any resources that can be recreated.
23 | }
24 |
25 |
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/ui/Associating Keyboard Shortcuts with View Controllers/Associating Keyboard Shortcuts with View Controllers.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ui/Creating Anchored Constraints in Code/Creating Anchored Constraints in Code.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ui/Creating Anchored Constraints in Code/Creating Anchored Constraints in Code/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Creating Anchored Constraints in Code
4 | //
5 | // Created by Vandad on 6/29/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 | @IBOutlet var btn1: UIButton!
13 | @IBOutlet var btn2: UIButton!
14 | @IBOutlet var v: UIView!
15 |
16 | override func viewDidLoad() {
17 | super.viewDidLoad()
18 |
19 | btn2.leadingAnchor.constraintEqualToAnchor(btn1.trailingAnchor,
20 | constant: 10).active = true
21 |
22 | v.widthAnchor.constraintEqualToAnchor(btn2.widthAnchor,
23 | constant:0).active = true
24 |
25 | }
26 |
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/ui/Customizing Stack Views for Different Screen Sizes/Customizing Stack Views for Different Screen Sizes.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ui/Customizing Stack Views for Different Screen Sizes/Customizing Stack Views for Different Screen Sizes/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Customizing Stack Views for Different Screen Sizes
4 | //
5 | // Created by Vandad on 6/29/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/ui/Dealing with Stacked Views in Code/Dealing with Stacked Views in Code.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ui/Improving Touch Rates for Smoother UI Interactions/Improving Touch Rates for Smoother UI Interactions.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ui/Laying Out Text Based Content on Your Views/Laying Out Text Based Content on Your Views.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ui/Recording the Screen and Sharing the Video/Recording the Screen and Sharing the Video.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ui/Showing Web Content in Safari View Controller/Showing Web Content in Safari View Controller.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ui/Showing Web Content in Safari View Controller/Showing Web Content in Safari View Controller/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Showing Web Content in Safari View Controller
4 | //
5 | // Created by Vandad on 6/30/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import SafariServices
11 |
12 | class ViewController: UIViewController, SFSafariViewControllerDelegate{
13 |
14 | @IBOutlet var textField: UITextField!
15 |
16 | func safariViewControllerDidFinish(controller: SFSafariViewController) {
17 | dismissViewControllerAnimated(true, completion: nil)
18 | }
19 |
20 | @IBAction func openInSafari() {
21 |
22 | guard let t = textField.text where t.characters.count > 0,
23 | let u = NSURL(string: t) else{
24 | //the url is missing, you can further code this method if you want
25 | return
26 | }
27 |
28 | let controller = SFSafariViewController(URL: u,
29 | entersReaderIfAvailable: true)
30 | controller.delegate = self
31 | presentViewController(controller, animated: true, completion: nil)
32 |
33 | }
34 |
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/ui/Supporting Right to Left Languages/Supporting Right to Left Languages.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ui/Supporting Right to Left Languages/Supporting Right to Left Languages/ar.lproj/LaunchScreen.strings:
--------------------------------------------------------------------------------
1 |
2 | /* Class = "UILabel"; text = "Supporting Right to Left Languages"; ObjectID = "GJd-Yh-RWb"; */
3 | "GJd-Yh-RWb.text" = "Supporting Right to Left Languages";
4 |
5 | /* Class = "UILabel"; text = " Copyright © 2015 Pixolity. All rights reserved."; ObjectID = "obG-Y5-kRd"; */
6 | "obG-Y5-kRd.text" = " Copyright © 2015 Pixolity. All rights reserved.";
7 |
--------------------------------------------------------------------------------
/ui/Supporting Right to Left Languages/Supporting Right to Left Languages/ar.lproj/Localizable.strings:
--------------------------------------------------------------------------------
1 | /*
2 | Localizable.strings
3 | Supporting Right to Left Languages
4 |
5 | Created by Vandad on 7/8/15.
6 | Copyright © 2015 Pixolity. All rights reserved.
7 | */
8 | "up" = "Up in Arabic";
9 | "down" = "Down in Arabic";
10 | "right" = "Right in Arabic";
11 | "left" = "Left in Arabic";
12 |
--------------------------------------------------------------------------------
/ui/Supporting Right to Left Languages/Supporting Right to Left Languages/ar.lproj/Main.strings:
--------------------------------------------------------------------------------
1 |
2 | /* Class = "UIButton"; normalTitle = "Right"; ObjectID = "Cvb-7O-mKK"; */
3 | "Cvb-7O-mKK.normalTitle" = "Right";
4 |
5 | /* Class = "UIButton"; normalTitle = "Up"; ObjectID = "FfX-Ra-3JF"; */
6 | "FfX-Ra-3JF.normalTitle" = "Up";
7 |
8 | /* Class = "UIButton"; normalTitle = "Left"; ObjectID = "Kva-in-lpk"; */
9 | "Kva-in-lpk.normalTitle" = "Left";
10 |
11 | /* Class = "UIButton"; normalTitle = "Down"; ObjectID = "icf-TQ-nUg"; */
12 | "icf-TQ-nUg.normalTitle" = "Down";
13 |
14 | /* Class = "UIButton"; normalTitle = "Up"; ObjectID = "orr-4G-03n"; */
15 | "orr-4G-03n.normalTitle" = "Up";
16 |
17 | /* Class = "UIButton"; normalTitle = "Left"; ObjectID = "qGS-7X-p8g"; */
18 | "qGS-7X-p8g.normalTitle" = "Left";
19 |
20 | /* Class = "UIButton"; normalTitle = "Right"; ObjectID = "qY1-tI-vqw"; */
21 | "qY1-tI-vqw.normalTitle" = "Right";
22 |
23 | /* Class = "UIButton"; normalTitle = "Down"; ObjectID = "tos-pA-jtu"; */
24 | "tos-pA-jtu.normalTitle" = "Down";
25 |
--------------------------------------------------------------------------------
/ui/Supporting Right to Left Languages/Supporting Right to Left Languages/en.lproj/Localizable.strings:
--------------------------------------------------------------------------------
1 | /*
2 | Localizable.strings
3 | Supporting Right to Left Languages
4 |
5 | Created by Vandad on 7/8/15.
6 | Copyright © 2015 Pixolity. All rights reserved.
7 | */
8 | "up" = "Up";
9 | "down" = "Down";
10 | "right" = "Right";
11 | "left" = "Left";
12 |
--------------------------------------------------------------------------------
/uitesting/Automating UI Test Scripts/Automating UI Test Scripts.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/uitesting/Automating UI Test Scripts/Automating UI Test Scripts/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Automating UI Test Scripts
4 | //
5 | // Created by Vandad on 7/6/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | @IBOutlet var lbl: UILabel!
14 | @IBOutlet var txtField: UITextField!
15 |
16 | @IBAction func capitalize() {
17 | guard let txt = txtField.text where txt.characters.count > 0 else{
18 | return
19 | }
20 | lbl.text = txt.uppercaseString
21 | lbl.accessibilityValue = lbl.text
22 | }
23 |
24 |
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/uitesting/Automating UI Test Scripts/Automating UI Test ScriptsUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/uitesting/Finding UI Components/Finding UI Components.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/uitesting/Finding UI Components/Finding UI Components/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Finding UI Components
4 | //
5 | // Created by Vandad on 7/7/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/uitesting/Finding UI Components/Finding UI ComponentsUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/uitesting/Long Pressing on UI Elements/Long Pressing on UI Elements.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/uitesting/Long Pressing on UI Elements/Long Pressing on UI ElementsUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/uitesting/Preparing Your Project for UI Testing/Preparing Your Project for UI Testing.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/uitesting/Preparing Your Project for UI Testing/Preparing Your Project for UI Testing/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Preparing Your Project for UI Testing
4 | //
5 | // Created by Vandad on 7/6/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/uitesting/Preparing Your Project for UI Testing/Preparing Your Project for UI TestingUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/uitesting/Swiping on UI Elements/Swiping on UI Elements.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/uitesting/Swiping on UI Elements/Swiping on UI ElementsUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/uitesting/Tapping on UI Elements/Tapping on UI Elements.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/uitesting/Tapping on UI Elements/Tapping on UI Elements/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Tapping on UI Elements
4 | //
5 | // Created by Vandad on 7/8/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | func handleTap(){
14 | view.accessibilityValue = "tapped"
15 | }
16 |
17 | override func viewDidLoad() {
18 | super.viewDidLoad()
19 |
20 | view.isAccessibilityElement = true
21 | view.accessibilityValue = "untapped"
22 | view.accessibilityLabel = "myView"
23 |
24 | let tgr = UITapGestureRecognizer(target: self, action: "handleTap")
25 | tgr.numberOfTapsRequired = 1
26 | tgr.numberOfTouchesRequired = 2
27 | view.addGestureRecognizer(tgr)
28 |
29 | }
30 |
31 | }
32 |
33 |
--------------------------------------------------------------------------------
/uitesting/Tapping on UI Elements/Tapping on UI ElementsUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/uitesting/Testing Text Fields, Buttons and Labels/Testing Text Fields, Buttons and Labels.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/uitesting/Testing Text Fields, Buttons and Labels/Testing Text Fields, Buttons and Labels/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Testing Text Fields, Buttons and Labels
4 | //
5 | // Created by Vandad on 7/6/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | @IBOutlet var lbl: UILabel!
14 |
15 | @IBAction func hideLabel() {
16 | lbl.removeFromSuperview()
17 | }
18 |
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/uitesting/Testing Text Fields, Buttons and Labels/Testing Text Fields, Buttons and LabelsUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/uitesting/Typing Inside Text Fields/Typing Inside Text Fields.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/uitesting/Typing Inside Text Fields/Typing Inside Text Fields/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Typing Inside Text Fields
4 | //
5 | // Created by Vandad on 7/7/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController, UITextFieldDelegate {
12 |
13 | func textFieldShouldReturn(textField: UITextField) -> Bool {
14 | textField.resignFirstResponder()
15 | return true
16 | }
17 |
18 | }
19 |
20 |
--------------------------------------------------------------------------------
/uitesting/Typing Inside Text Fields/Typing Inside Text FieldsUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/watch/Communicating Interactively Between iOS and Watch OS/Communicating Interactively Between iOS and Watch OS.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/watch/Communicating Interactively Between iOS and Watch OS/Communicating Interactively Between iOS and Watch OS/PredefinedMessage.swift:
--------------------------------------------------------------------------------
1 | //
2 | // PredefinedMessage.swift
3 | // Communicating Interactively Between iOS and Watch OS
4 | //
5 | // Created by Vandad on 8/5/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | enum PredefinedMessage : Int{
12 | case Hello
13 | case ThankYou
14 | case HowAreYou
15 | case IHearYou
16 | }
--------------------------------------------------------------------------------
/watch/Communicating Interactively Between iOS and Watch OS/Watch Extension/Assets.xcassets/README__ignoredByTemplate__:
--------------------------------------------------------------------------------
1 | Did you know that git does not support storing empty directories?
2 |
--------------------------------------------------------------------------------
/watch/Communicating Interactively Between iOS and Watch OS/Watch Extension/InterfaceController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.swift
3 | // Watch Extension
4 | //
5 | // Created by Vandad on 8/5/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 | import Foundation
11 | import WatchConnectivity
12 |
13 | class InterfaceController: WKInterfaceController {
14 |
15 | @IBOutlet var iosAppReplyLbl: WKInterfaceLabel!
16 | @IBOutlet var repliesGroup: WKInterfaceGroup!
17 |
18 | func send(int: Int){
19 |
20 | WCSession.defaultSession().sendMessage(["msg" : int],
21 | replyHandler: nil, errorHandler: nil)
22 |
23 | }
24 |
25 | @IBAction func sendHello() {
26 | send(PredefinedMessage.Hello.hashValue)
27 | }
28 |
29 | @IBAction func sendThankYou() {
30 | send(PredefinedMessage.ThankYou.hashValue)
31 | }
32 |
33 | @IBAction func sendHowAreYou() {
34 | send(PredefinedMessage.HowAreYou.hashValue)
35 | }
36 |
37 | @IBAction func sendIHearYou() {
38 | send(PredefinedMessage.IHearYou.hashValue)
39 | }
40 |
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/watch/Communicating Interactively Between iOS and Watch OS/Watch Extension/PushNotificationPayload.apns:
--------------------------------------------------------------------------------
1 | {
2 | "aps": {
3 | "alert": {
4 | "body": "Test message",
5 | "title": "Optional title"
6 | },
7 | "category": "myCategory"
8 | },
9 |
10 | "WatchKit Simulator Actions": [
11 | {
12 | "title": "First Button",
13 | "identifier": "firstButtonAction"
14 | }
15 | ],
16 |
17 | "customKey": "Use this file to define a testing payload for your notifications. The aps dictionary specifies the category, alert text and title. The WatchKit Simulator Actions array can provide info for one or more action buttons in addition to the standard Dismiss button. Any other top level keys are custom payload. If you have multiple such JSON files in your project, you'll be able to select them when choosing to debug the notification interface of your Watch App."
18 | }
19 |
--------------------------------------------------------------------------------
/watch/Constructing Small Complications with Text and Images/Constructing Small Complications with Text and Images.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/watch/Constructing Small Complications with Text and Images/Constructing Small Complications with Text and Images/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Constructing Small Complications with Text and Images
4 | //
5 | // Created by Vandad on 8/6/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 |
17 | }
18 |
19 | override func didReceiveMemoryWarning() {
20 | super.didReceiveMemoryWarning()
21 | // Dispose of any resources that can be recreated.
22 | }
23 |
24 |
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/watch/Constructing Small Complications with Text and Images/Watch Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "screenWidth" : "{130,145}",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "screenWidth" : "{146,165}",
11 | "scale" : "2x"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Constructing Small Complications with Text and Images/Watch Extension/Assets.xcassets/Complication.complicationset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "assets" : [
3 | {
4 | "idiom" : "watch",
5 | "filename" : "Circular.imageset",
6 | "role" : "circular"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "filename" : "Modular.imageset",
11 | "role" : "modular"
12 | },
13 | {
14 | "idiom" : "watch",
15 | "filename" : "Utilitarian.imageset",
16 | "role" : "utilitarian"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/watch/Constructing Small Complications with Text and Images/Watch Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "screenWidth" : "{130,145}",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "screenWidth" : "{146,165}",
11 | "scale" : "2x"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Constructing Small Complications with Text and Images/Watch Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "screenWidth" : "{130,145}",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "screenWidth" : "{146,165}",
11 | "scale" : "2x"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Constructing Small Complications with Text and Images/Watch Extension/ExtensionDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ExtensionDelegate.swift
3 | // Watch Extension
4 | //
5 | // Created by Vandad on 8/6/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 |
11 | class ExtensionDelegate: NSObject, WKExtensionDelegate {
12 |
13 | func applicationDidFinishLaunching() {
14 | // Perform any final initialization of your application.
15 | }
16 |
17 | func applicationDidBecomeActive() {
18 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
19 | }
20 |
21 | func applicationWillResignActive() {
22 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
23 | // Use this method to pause ongoing tasks, disable timers, etc.
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/watch/Constructing Small Complications with Text and Images/Watch Extension/InterfaceController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.swift
3 | // Watch Extension
4 | //
5 | // Created by Vandad on 8/6/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 | import Foundation
11 |
12 |
13 | class InterfaceController: WKInterfaceController {
14 |
15 | override func awakeWithContext(context: AnyObject?) {
16 | super.awakeWithContext(context)
17 |
18 | // Configure interface objects here.
19 | }
20 |
21 | override func willActivate() {
22 | // This method is called when watch view controller is about to be visible to user
23 | super.willActivate()
24 | }
25 |
26 | override func didDeactivate() {
27 | // This method is called when watch view controller is no longer visible
28 | super.didDeactivate()
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/watch/Constructing Small Complications with Text and Images/Watch Extension/PushNotificationPayload.apns:
--------------------------------------------------------------------------------
1 | {
2 | "aps": {
3 | "alert": {
4 | "body": "Test message",
5 | "title": "Optional title"
6 | },
7 | "category": "myCategory"
8 | },
9 |
10 | "WatchKit Simulator Actions": [
11 | {
12 | "title": "First Button",
13 | "identifier": "firstButtonAction"
14 | }
15 | ],
16 |
17 | "customKey": "Use this file to define a testing payload for your notifications. The aps dictionary specifies the category, alert text and title. The WatchKit Simulator Actions array can provide info for one or more action buttons in addition to the standard Dismiss button. Any other top level keys are custom payload. If you have multiple such JSON files in your project, you'll be able to select them when choosing to debug the notification interface of your Watch App."
18 | }
19 |
--------------------------------------------------------------------------------
/watch/Displaying Dates in Complications/Displaying Dates in Complications.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/watch/Displaying Dates in Complications/Displaying Dates in Complications/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Displaying Dates in Complications
4 | //
5 | // Created by Vandad on 8/10/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/watch/Displaying Dates in Complications/Watch Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "screenWidth" : "{130,145}",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "screenWidth" : "{146,165}",
11 | "scale" : "2x"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Displaying Dates in Complications/Watch Extension/Assets.xcassets/Complication.complicationset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "assets" : [
3 | {
4 | "idiom" : "watch",
5 | "filename" : "Circular.imageset",
6 | "role" : "circular"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "filename" : "Modular.imageset",
11 | "role" : "modular"
12 | },
13 | {
14 | "idiom" : "watch",
15 | "filename" : "Utilitarian.imageset",
16 | "role" : "utilitarian"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/watch/Displaying Dates in Complications/Watch Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "screenWidth" : "{130,145}",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "screenWidth" : "{146,165}",
11 | "scale" : "2x"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Displaying Dates in Complications/Watch Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "screenWidth" : "{130,145}",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "screenWidth" : "{146,165}",
11 | "scale" : "2x"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Displaying Dates in Complications/Watch Extension/ExtensionDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ExtensionDelegate.swift
3 | // Watch Extension
4 | //
5 | // Created by Vandad on 8/10/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 |
11 | class ExtensionDelegate: NSObject, WKExtensionDelegate {
12 |
13 | func applicationDidFinishLaunching() {
14 | // Perform any final initialization of your application.
15 | }
16 |
17 | func applicationDidBecomeActive() {
18 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
19 | }
20 |
21 | func applicationWillResignActive() {
22 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
23 | // Use this method to pause ongoing tasks, disable timers, etc.
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/watch/Displaying Dates in Complications/Watch Extension/InterfaceController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.swift
3 | // Watch Extension
4 | //
5 | // Created by Vandad on 8/10/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 | import Foundation
11 |
12 |
13 | class InterfaceController: WKInterfaceController {
14 |
15 | override func awakeWithContext(context: AnyObject?) {
16 | super.awakeWithContext(context)
17 |
18 | // Configure interface objects here.
19 | }
20 |
21 | override func willActivate() {
22 | // This method is called when watch view controller is about to be visible to user
23 | super.willActivate()
24 | }
25 |
26 | override func didDeactivate() {
27 | // This method is called when watch view controller is no longer visible
28 | super.didDeactivate()
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/watch/Displaying Dates in Complications/Watch Extension/PushNotificationPayload.apns:
--------------------------------------------------------------------------------
1 | {
2 | "aps": {
3 | "alert": {
4 | "body": "Test message",
5 | "title": "Optional title"
6 | },
7 | "category": "myCategory"
8 | },
9 |
10 | "WatchKit Simulator Actions": [
11 | {
12 | "title": "First Button",
13 | "identifier": "firstButtonAction"
14 | }
15 | ],
16 |
17 | "customKey": "Use this file to define a testing payload for your notifications. The aps dictionary specifies the category, alert text and title. The WatchKit Simulator Actions array can provide info for one or more action buttons in addition to the standard Dismiss button. Any other top level keys are custom payload. If you have multiple such JSON files in your project, you'll be able to select them when choosing to debug the notification interface of your Watch App."
18 | }
19 |
--------------------------------------------------------------------------------
/watch/Displaying Time Intervals in Complications/Displaying Time Intervals in Complications.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/watch/Displaying Time Intervals in Complications/Displaying Time Intervals in Complications/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Displaying Time Intervals in Complications
4 | //
5 | // Created by Vandad on 8/11/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/watch/Displaying Time Intervals in Complications/Watch Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "screenWidth" : "{130,145}",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "screenWidth" : "{146,165}",
11 | "scale" : "2x"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Displaying Time Intervals in Complications/Watch Extension/Assets.xcassets/Complication.complicationset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "assets" : [
3 | {
4 | "idiom" : "watch",
5 | "filename" : "Circular.imageset",
6 | "role" : "circular"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "filename" : "Modular.imageset",
11 | "role" : "modular"
12 | },
13 | {
14 | "idiom" : "watch",
15 | "filename" : "Utilitarian.imageset",
16 | "role" : "utilitarian"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/watch/Displaying Time Intervals in Complications/Watch Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "screenWidth" : "{130,145}",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "screenWidth" : "{146,165}",
11 | "scale" : "2x"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Displaying Time Intervals in Complications/Watch Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "screenWidth" : "{130,145}",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "screenWidth" : "{146,165}",
11 | "scale" : "2x"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Displaying Time Intervals in Complications/Watch Extension/ExtensionDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ExtensionDelegate.swift
3 | // Watch Extension
4 | //
5 | // Created by Vandad on 8/11/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 |
11 | class ExtensionDelegate: NSObject, WKExtensionDelegate {
12 |
13 | func applicationDidFinishLaunching() {
14 | // Perform any final initialization of your application.
15 | }
16 |
17 | func applicationDidBecomeActive() {
18 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
19 | }
20 |
21 | func applicationWillResignActive() {
22 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
23 | // Use this method to pause ongoing tasks, disable timers, etc.
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/watch/Displaying Time Intervals in Complications/Watch Extension/InterfaceController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.swift
3 | // Watch Extension
4 | //
5 | // Created by Vandad on 8/11/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 | import Foundation
11 |
12 |
13 | class InterfaceController: WKInterfaceController {
14 |
15 | override func awakeWithContext(context: AnyObject?) {
16 | super.awakeWithContext(context)
17 |
18 | // Configure interface objects here.
19 | }
20 |
21 | override func willActivate() {
22 | // This method is called when watch view controller is about to be visible to user
23 | super.willActivate()
24 | }
25 |
26 | override func didDeactivate() {
27 | // This method is called when watch view controller is no longer visible
28 | super.didDeactivate()
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/watch/Displaying Time Intervals in Complications/Watch Extension/PushNotificationPayload.apns:
--------------------------------------------------------------------------------
1 | {
2 | "aps": {
3 | "alert": {
4 | "body": "Test message",
5 | "title": "Optional title"
6 | },
7 | "category": "myCategory"
8 | },
9 |
10 | "WatchKit Simulator Actions": [
11 | {
12 | "title": "First Button",
13 | "identifier": "firstButtonAction"
14 | }
15 | ],
16 |
17 | "customKey": "Use this file to define a testing payload for your notifications. The aps dictionary specifies the category, alert text and title. The WatchKit Simulator Actions array can provide info for one or more action buttons in addition to the standard Dismiss button. Any other top level keys are custom payload. If you have multiple such JSON files in your project, you'll be able to select them when choosing to debug the notification interface of your Watch App."
18 | }
19 |
--------------------------------------------------------------------------------
/watch/Displaying Time Offsets in Complications/Displaying Time Offsets in Complications.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/watch/Displaying Time Offsets in Complications/Displaying Time Offsets in Complications/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Displaying Time Offsets in Complications
4 | //
5 | // Created by Vandad on 8/10/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/watch/Displaying Time Offsets in Complications/Watch Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "scale" : "2x",
6 | "screen-width" : "<=145"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "scale" : "2x",
11 | "screen-width" : ">145"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Displaying Time Offsets in Complications/Watch Extension/Assets.xcassets/Complication.complicationset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "assets" : [
3 | {
4 | "idiom" : "watch",
5 | "filename" : "Circular.imageset",
6 | "role" : "circular"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "filename" : "Modular.imageset",
11 | "role" : "modular"
12 | },
13 | {
14 | "idiom" : "watch",
15 | "filename" : "Utilitarian.imageset",
16 | "role" : "utilitarian"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/watch/Displaying Time Offsets in Complications/Watch Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "scale" : "2x",
6 | "screen-width" : "<=145"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "scale" : "2x",
11 | "screen-width" : ">145"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Displaying Time Offsets in Complications/Watch Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "scale" : "2x",
6 | "screen-width" : "<=145"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "scale" : "2x",
11 | "screen-width" : ">145"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Displaying Time Offsets in Complications/Watch Extension/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/watch/Displaying Time Offsets in Complications/Watch Extension/ExtensionDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ExtensionDelegate.swift
3 | // Watch Extension
4 | //
5 | // Created by Vandad on 8/10/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 |
11 | class ExtensionDelegate: NSObject, WKExtensionDelegate {
12 |
13 | func applicationDidFinishLaunching() {
14 | // Perform any final initialization of your application.
15 | }
16 |
17 | func applicationDidBecomeActive() {
18 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
19 | }
20 |
21 | func applicationWillResignActive() {
22 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
23 | // Use this method to pause ongoing tasks, disable timers, etc.
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/watch/Displaying Time Offsets in Complications/Watch Extension/InterfaceController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.swift
3 | // Watch Extension
4 | //
5 | // Created by Vandad on 8/10/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 | import Foundation
11 |
12 |
13 | class InterfaceController: WKInterfaceController {
14 |
15 | override func awakeWithContext(context: AnyObject?) {
16 | super.awakeWithContext(context)
17 |
18 | // Configure interface objects here.
19 | }
20 |
21 | override func willActivate() {
22 | // This method is called when watch view controller is about to be visible to user
23 | super.willActivate()
24 | }
25 |
26 | override func didDeactivate() {
27 | // This method is called when watch view controller is no longer visible
28 | super.didDeactivate()
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/watch/Displaying Time Offsets in Complications/Watch Extension/PushNotificationPayload.apns:
--------------------------------------------------------------------------------
1 | {
2 | "aps": {
3 | "alert": {
4 | "body": "Test message",
5 | "title": "Optional title"
6 | },
7 | "category": "myCategory"
8 | },
9 |
10 | "WatchKit Simulator Actions": [
11 | {
12 | "title": "First Button",
13 | "identifier": "firstButtonAction"
14 | }
15 | ],
16 |
17 | "customKey": "Use this file to define a testing payload for your notifications. The aps dictionary specifies the category, alert text and title. The WatchKit Simulator Actions array can provide info for one or more action buttons in addition to the standard Dismiss button. Any other top level keys are custom payload. If you have multiple such JSON files in your project, you'll be able to select them when choosing to debug the notification interface of your Watch App."
18 | }
19 |
--------------------------------------------------------------------------------
/watch/Displaying Times in Complications/Displaying Times in Complications.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/watch/Displaying Times in Complications/Displaying Times in Complications/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Displaying Times in Complications
4 | //
5 | // Created by Vandad on 8/10/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/watch/Displaying Times in Complications/Watch Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "screenWidth" : "{130,145}",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "screenWidth" : "{146,165}",
11 | "scale" : "2x"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Displaying Times in Complications/Watch Extension/Assets.xcassets/Complication.complicationset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "assets" : [
3 | {
4 | "idiom" : "watch",
5 | "filename" : "Circular.imageset",
6 | "role" : "circular"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "filename" : "Modular.imageset",
11 | "role" : "modular"
12 | },
13 | {
14 | "idiom" : "watch",
15 | "filename" : "Utilitarian.imageset",
16 | "role" : "utilitarian"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/watch/Displaying Times in Complications/Watch Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "screenWidth" : "{130,145}",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "screenWidth" : "{146,165}",
11 | "scale" : "2x"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Displaying Times in Complications/Watch Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "screenWidth" : "{130,145}",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "screenWidth" : "{146,165}",
11 | "scale" : "2x"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Displaying Times in Complications/Watch Extension/ExtensionDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ExtensionDelegate.swift
3 | // Watch Extension
4 | //
5 | // Created by Vandad on 8/10/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 |
11 | class ExtensionDelegate: NSObject, WKExtensionDelegate {
12 |
13 | func applicationDidFinishLaunching() {
14 | // Perform any final initialization of your application.
15 | }
16 |
17 | func applicationDidBecomeActive() {
18 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
19 | }
20 |
21 | func applicationWillResignActive() {
22 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
23 | // Use this method to pause ongoing tasks, disable timers, etc.
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/watch/Displaying Times in Complications/Watch Extension/InterfaceController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.swift
3 | // Watch Extension
4 | //
5 | // Created by Vandad on 8/10/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 | import Foundation
11 |
12 |
13 | class InterfaceController: WKInterfaceController {
14 |
15 | override func awakeWithContext(context: AnyObject?) {
16 | super.awakeWithContext(context)
17 |
18 | // Configure interface objects here.
19 | }
20 |
21 | override func willActivate() {
22 | // This method is called when watch view controller is about to be visible to user
23 | super.willActivate()
24 | }
25 |
26 | override func didDeactivate() {
27 | // This method is called when watch view controller is no longer visible
28 | super.didDeactivate()
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/watch/Displaying Times in Complications/Watch Extension/PushNotificationPayload.apns:
--------------------------------------------------------------------------------
1 | {
2 | "aps": {
3 | "alert": {
4 | "body": "Test message",
5 | "title": "Optional title"
6 | },
7 | "category": "myCategory"
8 | },
9 |
10 | "WatchKit Simulator Actions": [
11 | {
12 | "title": "First Button",
13 | "identifier": "firstButtonAction"
14 | }
15 | ],
16 |
17 | "customKey": "Use this file to define a testing payload for your notifications. The aps dictionary specifies the category, alert text and title. The WatchKit Simulator Actions array can provide info for one or more action buttons in addition to the standard Dismiss button. Any other top level keys are custom payload. If you have multiple such JSON files in your project, you'll be able to select them when choosing to debug the notification interface of your Watch App."
18 | }
19 |
--------------------------------------------------------------------------------
/watch/Downloading Files on the Apple Watch/Downloading Files on the Apple Watch.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/watch/Downloading Files on the Apple Watch/Downloading Files on the Apple Watch/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Downloading Files on the Apple Watch
4 | //
5 | // Created by Vandad on 8/4/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/watch/Downloading Files on the Apple Watch/Watch Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "screenWidth" : "{130,145}",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "screenWidth" : "{146,165}",
11 | "scale" : "2x"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Downloading Files on the Apple Watch/Watch Extension/Assets.xcassets/Complication.complicationset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "assets" : [
3 | {
4 | "idiom" : "watch",
5 | "filename" : "Circular.imageset",
6 | "role" : "circular"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "filename" : "Modular.imageset",
11 | "role" : "modular"
12 | },
13 | {
14 | "idiom" : "watch",
15 | "filename" : "Utilitarian.imageset",
16 | "role" : "utilitarian"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/watch/Downloading Files on the Apple Watch/Watch Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "screenWidth" : "{130,145}",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "screenWidth" : "{146,165}",
11 | "scale" : "2x"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Downloading Files on the Apple Watch/Watch Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "screenWidth" : "{130,145}",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "screenWidth" : "{146,165}",
11 | "scale" : "2x"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Downloading Files on the Apple Watch/Watch Extension/ExtensionDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ExtensionDelegate.swift
3 | // Watch Extension
4 | //
5 | // Created by Vandad on 8/4/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 |
11 | class ExtensionDelegate: NSObject, WKExtensionDelegate {
12 |
13 | func applicationDidFinishLaunching() {
14 | // Perform any final initialization of your application.
15 |
16 |
17 |
18 | }
19 |
20 | func applicationDidBecomeActive() {
21 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
22 | }
23 |
24 | func applicationWillResignActive() {
25 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
26 | // Use this method to pause ongoing tasks, disable timers, etc.
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/watch/Downloading Files on the Apple Watch/Watch Extension/GlanceController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // GlanceController.swift
3 | // Watch Extension
4 | //
5 | // Created by Vandad on 8/4/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 | import Foundation
11 |
12 |
13 | class GlanceController: WKInterfaceController {
14 |
15 | override func awakeWithContext(context: AnyObject?) {
16 | super.awakeWithContext(context)
17 |
18 | // Configure interface objects here.
19 | }
20 |
21 | override func willActivate() {
22 | // This method is called when watch view controller is about to be visible to user
23 | super.willActivate()
24 | }
25 |
26 | override func didDeactivate() {
27 | // This method is called when watch view controller is no longer visible
28 | super.didDeactivate()
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/watch/Downloading Files on the Apple Watch/Watch Extension/PushNotificationPayload.apns:
--------------------------------------------------------------------------------
1 | {
2 | "aps": {
3 | "alert": {
4 | "body": "Test message",
5 | "title": "Optional title"
6 | },
7 | "category": "myCategory"
8 | },
9 |
10 | "WatchKit Simulator Actions": [
11 | {
12 | "title": "First Button",
13 | "identifier": "firstButtonAction"
14 | }
15 | ],
16 |
17 | "customKey": "Use this file to define a testing payload for your notifications. The aps dictionary specifies the category, alert text and title. The WatchKit Simulator Actions array can provide info for one or more action buttons in addition to the standard Dismiss button. Any other top level keys are custom payload. If you have multiple such JSON files in your project, you'll be able to select them when choosing to debug the notification interface of your Watch App."
18 | }
19 |
--------------------------------------------------------------------------------
/watch/Noticing Changes in Pairing State Between the iOS and Watch Apps/Noticing Changes in Pairing State Between the iOS and Watch Apps.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/watch/Noticing Changes in Pairing State Between the iOS and Watch Apps/Noticing Changes in Pairing State Between the iOS and Watch Apps/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Noticing Changes in Pairing State Between the iOS and Watch Apps
4 | //
5 | // Created by Vandad on 8/4/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/watch/Noticing Changes in Pairing State Between the iOS and Watch Apps/Watch Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "screenWidth" : "{130,145}",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "screenWidth" : "{146,165}",
11 | "scale" : "2x"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Noticing Changes in Pairing State Between the iOS and Watch Apps/Watch Extension/Assets.xcassets/Complication.complicationset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "assets" : [
3 | {
4 | "idiom" : "watch",
5 | "filename" : "Circular.imageset",
6 | "role" : "circular"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "filename" : "Modular.imageset",
11 | "role" : "modular"
12 | },
13 | {
14 | "idiom" : "watch",
15 | "filename" : "Utilitarian.imageset",
16 | "role" : "utilitarian"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/watch/Noticing Changes in Pairing State Between the iOS and Watch Apps/Watch Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "screenWidth" : "{130,145}",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "screenWidth" : "{146,165}",
11 | "scale" : "2x"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Noticing Changes in Pairing State Between the iOS and Watch Apps/Watch Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "screenWidth" : "{130,145}",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "screenWidth" : "{146,165}",
11 | "scale" : "2x"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Noticing Changes in Pairing State Between the iOS and Watch Apps/Watch Extension/ExtensionDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ExtensionDelegate.swift
3 | // Watch Extension
4 | //
5 | // Created by Vandad on 8/4/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 | import WatchConnectivity
11 |
12 | class ExtensionDelegate: NSObject, WKExtensionDelegate, WCSessionDelegate {
13 |
14 | func sessionReachabilityDidChange(session: WCSession) {
15 | print("Reachablity changed. Reachable?", terminator: "")
16 | print(session.reachable ? "Yes" : "No")
17 | }
18 |
19 | func example1(){
20 | guard WCSession.isSupported() else {
21 | print("Session is not supported")
22 | return
23 | }
24 |
25 | let session = WCSession.defaultSession()
26 | session.delegate = self
27 | session.activateSession()
28 | }
29 |
30 | func applicationDidFinishLaunching() {
31 | example1()
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/watch/Noticing Changes in Pairing State Between the iOS and Watch Apps/Watch Extension/GlanceController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // GlanceController.swift
3 | // Watch Extension
4 | //
5 | // Created by Vandad on 8/4/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 | import Foundation
11 |
12 |
13 | class GlanceController: WKInterfaceController {
14 |
15 | override func awakeWithContext(context: AnyObject?) {
16 | super.awakeWithContext(context)
17 |
18 | // Configure interface objects here.
19 | }
20 |
21 | override func willActivate() {
22 | // This method is called when watch view controller is about to be visible to user
23 | super.willActivate()
24 | }
25 |
26 | override func didDeactivate() {
27 | // This method is called when watch view controller is no longer visible
28 | super.didDeactivate()
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/watch/Noticing Changes in Pairing State Between the iOS and Watch Apps/Watch Extension/InterfaceController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.swift
3 | // Watch Extension
4 | //
5 | // Created by Vandad on 8/4/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 | import Foundation
11 |
12 |
13 | class InterfaceController: WKInterfaceController {
14 |
15 | override func awakeWithContext(context: AnyObject?) {
16 | super.awakeWithContext(context)
17 |
18 | // Configure interface objects here.
19 | }
20 |
21 | override func willActivate() {
22 | // This method is called when watch view controller is about to be visible to user
23 | super.willActivate()
24 | }
25 |
26 | override func didDeactivate() {
27 | // This method is called when watch view controller is no longer visible
28 | super.didDeactivate()
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/watch/Noticing Changes in Pairing State Between the iOS and Watch Apps/Watch Extension/PushNotificationPayload.apns:
--------------------------------------------------------------------------------
1 | {
2 | "aps": {
3 | "alert": {
4 | "body": "Test message",
5 | "title": "Optional title"
6 | },
7 | "category": "myCategory"
8 | },
9 |
10 | "WatchKit Simulator Actions": [
11 | {
12 | "title": "First Button",
13 | "identifier": "firstButtonAction"
14 | }
15 | ],
16 |
17 | "customKey": "Use this file to define a testing payload for your notifications. The aps dictionary specifies the category, alert text and title. The WatchKit Simulator Actions array can provide info for one or more action buttons in addition to the standard Dismiss button. Any other top level keys are custom payload. If you have multiple such JSON files in your project, you'll be able to select them when choosing to debug the notification interface of your Watch App."
18 | }
19 |
--------------------------------------------------------------------------------
/watch/Playing Local and Remote Audio and Video in Your Watch App/Playing Local and Remote Audio and Video in Your Watch App.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/watch/Playing Local and Remote Audio and Video in Your Watch App/Playing Local and Remote Audio and Video in Your Watch App/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Playing Local and Remote Audio and Video in Your Watch App
4 | //
5 | // Created by Vandad on 8/12/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/watch/Playing Local and Remote Audio and Video in Your Watch App/Watch Extension/Assets.xcassets/README__ignoredByTemplate__:
--------------------------------------------------------------------------------
1 | Did you know that git does not support storing empty directories?
2 |
--------------------------------------------------------------------------------
/watch/Playing Local and Remote Audio and Video in Your Watch App/Watch Extension/ExtensionDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ExtensionDelegate.swift
3 | // Watch Extension
4 | //
5 | // Created by Vandad on 8/12/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 |
11 | class ExtensionDelegate: NSObject, WKExtensionDelegate {
12 |
13 | func applicationDidFinishLaunching() {
14 | // Perform any final initialization of your application.
15 | }
16 |
17 | func applicationDidBecomeActive() {
18 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
19 | }
20 |
21 | func applicationWillResignActive() {
22 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
23 | // Use this method to pause ongoing tasks, disable timers, etc.
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/watch/Playing Local and Remote Audio and Video in Your Watch App/Watch Extension/PushNotificationPayload.apns:
--------------------------------------------------------------------------------
1 | {
2 | "aps": {
3 | "alert": {
4 | "body": "Test message",
5 | "title": "Optional title"
6 | },
7 | "category": "myCategory"
8 | },
9 |
10 | "WatchKit Simulator Actions": [
11 | {
12 | "title": "First Button",
13 | "identifier": "firstButtonAction"
14 | }
15 | ],
16 |
17 | "customKey": "Use this file to define a testing payload for your notifications. The aps dictionary specifies the category, alert text and title. The WatchKit Simulator Actions array can provide info for one or more action buttons in addition to the standard Dismiss button. Any other top level keys are custom payload. If you have multiple such JSON files in your project, you'll be able to select them when choosing to debug the notification interface of your Watch App."
18 | }
19 |
--------------------------------------------------------------------------------
/watch/Recording Audio in Your Watch App/Recording Audio in Your Watch App.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/watch/Recording Audio in Your Watch App/Recording Audio in Your Watch App/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Recording Audio in Your Watch App
4 | //
5 | // Created by Vandad on 8/11/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/watch/Recording Audio in Your Watch App/Watch Extension/Assets.xcassets/README__ignoredByTemplate__:
--------------------------------------------------------------------------------
1 | Did you know that git does not support storing empty directories?
2 |
--------------------------------------------------------------------------------
/watch/Recording Audio in Your Watch App/Watch Extension/ExtensionDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ExtensionDelegate.swift
3 | // Watch Extension
4 | //
5 | // Created by Vandad on 8/11/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 |
11 | class ExtensionDelegate: NSObject, WKExtensionDelegate {
12 |
13 | func applicationDidFinishLaunching() {
14 | // Perform any final initialization of your application.
15 | }
16 |
17 | func applicationDidBecomeActive() {
18 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
19 | }
20 |
21 | func applicationWillResignActive() {
22 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
23 | // Use this method to pause ongoing tasks, disable timers, etc.
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/watch/Recording Audio in Your Watch App/Watch Extension/PushNotificationPayload.apns:
--------------------------------------------------------------------------------
1 | {
2 | "aps": {
3 | "alert": {
4 | "body": "Test message",
5 | "title": "Optional title"
6 | },
7 | "category": "myCategory"
8 | },
9 |
10 | "WatchKit Simulator Actions": [
11 | {
12 | "title": "First Button",
13 | "identifier": "firstButtonAction"
14 | }
15 | ],
16 |
17 | "customKey": "Use this file to define a testing payload for your notifications. The aps dictionary specifies the category, alert text and title. The WatchKit Simulator Actions array can provide info for one or more action buttons in addition to the standard Dismiss button. Any other top level keys are custom payload. If you have multiple such JSON files in your project, you'll be able to select them when choosing to debug the notification interface of your Watch App."
18 | }
19 |
--------------------------------------------------------------------------------
/watch/Setting up Apple Watch for Custom Complications/Setting up Apple Watch for Custom Complications.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/watch/Setting up Apple Watch for Custom Complications/Setting up Apple Watch for Custom Complications/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Setting up Apple Watch for Custom Complications
4 | //
5 | // Created by Vandad on 8/6/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/watch/Setting up Apple Watch for Custom Complications/Watch Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "screenWidth" : "{130,145}",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "screenWidth" : "{146,165}",
11 | "scale" : "2x"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Setting up Apple Watch for Custom Complications/Watch Extension/Assets.xcassets/Complication.complicationset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "assets" : [
3 | {
4 | "idiom" : "watch",
5 | "filename" : "Circular.imageset",
6 | "role" : "circular"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "filename" : "Modular.imageset",
11 | "role" : "modular"
12 | },
13 | {
14 | "idiom" : "watch",
15 | "filename" : "Utilitarian.imageset",
16 | "role" : "utilitarian"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/watch/Setting up Apple Watch for Custom Complications/Watch Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "screenWidth" : "{130,145}",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "screenWidth" : "{146,165}",
11 | "scale" : "2x"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Setting up Apple Watch for Custom Complications/Watch Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "screenWidth" : "{130,145}",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "screenWidth" : "{146,165}",
11 | "scale" : "2x"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Setting up Apple Watch for Custom Complications/Watch Extension/ExtensionDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ExtensionDelegate.swift
3 | // Watch Extension
4 | //
5 | // Created by Vandad on 8/6/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 |
11 | class ExtensionDelegate: NSObject, WKExtensionDelegate {
12 |
13 | func applicationDidFinishLaunching() {
14 | // Perform any final initialization of your application.
15 | }
16 |
17 | func applicationDidBecomeActive() {
18 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
19 | }
20 |
21 | func applicationWillResignActive() {
22 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
23 | // Use this method to pause ongoing tasks, disable timers, etc.
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/watch/Setting up Apple Watch for Custom Complications/Watch Extension/InterfaceController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.swift
3 | // Watch Extension
4 | //
5 | // Created by Vandad on 8/6/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 | import Foundation
11 |
12 |
13 | class InterfaceController: WKInterfaceController {
14 |
15 | override func awakeWithContext(context: AnyObject?) {
16 | super.awakeWithContext(context)
17 |
18 | // Configure interface objects here.
19 | }
20 |
21 | override func willActivate() {
22 | // This method is called when watch view controller is about to be visible to user
23 | super.willActivate()
24 | }
25 |
26 | override func didDeactivate() {
27 | // This method is called when watch view controller is no longer visible
28 | super.didDeactivate()
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/watch/Setting up Apple Watch for Custom Complications/Watch Extension/PushNotificationPayload.apns:
--------------------------------------------------------------------------------
1 | {
2 | "aps": {
3 | "alert": {
4 | "body": "Test message",
5 | "title": "Optional title"
6 | },
7 | "category": "myCategory"
8 | },
9 |
10 | "WatchKit Simulator Actions": [
11 | {
12 | "title": "First Button",
13 | "identifier": "firstButtonAction"
14 | }
15 | ],
16 |
17 | "customKey": "Use this file to define a testing payload for your notifications. The aps dictionary specifies the category, alert text and title. The WatchKit Simulator Actions array can provide info for one or more action buttons in addition to the standard Dismiss button. Any other top level keys are custom payload. If you have multiple such JSON files in your project, you'll be able to select them when choosing to debug the notification interface of your Watch App."
18 | }
19 |
--------------------------------------------------------------------------------
/watch/Transferring Dictionaries in Queues To and From the Watch/Transferring Dictionaries in Queues To and From the Watch.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/watch/Transferring Dictionaries in Queues To and From the Watch/Watch Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "screenWidth" : "{130,145}",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "screenWidth" : "{146,165}",
11 | "scale" : "2x"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Transferring Dictionaries in Queues To and From the Watch/Watch Extension/Assets.xcassets/Complication.complicationset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "assets" : [
3 | {
4 | "idiom" : "watch",
5 | "filename" : "Circular.imageset",
6 | "role" : "circular"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "filename" : "Modular.imageset",
11 | "role" : "modular"
12 | },
13 | {
14 | "idiom" : "watch",
15 | "filename" : "Utilitarian.imageset",
16 | "role" : "utilitarian"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/watch/Transferring Dictionaries in Queues To and From the Watch/Watch Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "screenWidth" : "{130,145}",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "screenWidth" : "{146,165}",
11 | "scale" : "2x"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Transferring Dictionaries in Queues To and From the Watch/Watch Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "screenWidth" : "{130,145}",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "screenWidth" : "{146,165}",
11 | "scale" : "2x"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Transferring Dictionaries in Queues To and From the Watch/Watch Extension/GlanceController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // GlanceController.swift
3 | // Watch Extension
4 | //
5 | // Created by Vandad on 8/5/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 | import Foundation
11 |
12 |
13 | class GlanceController: WKInterfaceController {
14 |
15 | override func awakeWithContext(context: AnyObject?) {
16 | super.awakeWithContext(context)
17 |
18 | // Configure interface objects here.
19 | }
20 |
21 | override func willActivate() {
22 | // This method is called when watch view controller is about to be visible to user
23 | super.willActivate()
24 | }
25 |
26 | override func didDeactivate() {
27 | // This method is called when watch view controller is no longer visible
28 | super.didDeactivate()
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/watch/Transferring Dictionaries in Queues To and From the Watch/Watch Extension/InterfaceController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.swift
3 | // Watch Extension
4 | //
5 | // Created by Vandad on 8/5/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 | import Foundation
11 |
12 | class InterfaceController: WKInterfaceController {
13 |
14 | @IBOutlet var statusLabel: WKInterfaceLabel!
15 |
16 | var status = "Waiting"{
17 | didSet{
18 | statusLabel.setText(status)
19 | }
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/watch/Transferring Dictionaries in Queues To and From the Watch/Watch Extension/PushNotificationPayload.apns:
--------------------------------------------------------------------------------
1 | {
2 | "aps": {
3 | "alert": {
4 | "body": "Test message",
5 | "title": "Optional title"
6 | },
7 | "category": "myCategory"
8 | },
9 |
10 | "WatchKit Simulator Actions": [
11 | {
12 | "title": "First Button",
13 | "identifier": "firstButtonAction"
14 | }
15 | ],
16 |
17 | "customKey": "Use this file to define a testing payload for your notifications. The aps dictionary specifies the category, alert text and title. The WatchKit Simulator Actions array can provide info for one or more action buttons in addition to the standard Dismiss button. Any other top level keys are custom payload. If you have multiple such JSON files in your project, you'll be able to select them when choosing to debug the notification interface of your Watch App."
18 | }
19 |
--------------------------------------------------------------------------------
/watch/Transferring Files To and From the Watch/Transferring Files To and From the Watch.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/watch/Transferring Files To and From the Watch/Watch Extension/Assets.xcassets/README__ignoredByTemplate__:
--------------------------------------------------------------------------------
1 | Did you know that git does not support storing empty directories?
2 |
--------------------------------------------------------------------------------
/watch/Transferring Files To and From the Watch/Watch Extension/InterfaceController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.swift
3 | // Watch Extension
4 | //
5 | // Created by Vandad on 8/5/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 | import Foundation
11 |
12 | class InterfaceController: WKInterfaceController {
13 |
14 | @IBOutlet var statusLabel: WKInterfaceLabel!
15 |
16 | var status = "Waiting"{
17 | didSet{
18 | statusLabel.setText(status)
19 | }
20 | }
21 |
22 | }
23 |
24 |
--------------------------------------------------------------------------------
/watch/Transferring Files To and From the Watch/Watch Extension/PushNotificationPayload.apns:
--------------------------------------------------------------------------------
1 | {
2 | "aps": {
3 | "alert": {
4 | "body": "Test message",
5 | "title": "Optional title"
6 | },
7 | "category": "myCategory"
8 | },
9 |
10 | "WatchKit Simulator Actions": [
11 | {
12 | "title": "First Button",
13 | "identifier": "firstButtonAction"
14 | }
15 | ],
16 |
17 | "customKey": "Use this file to define a testing payload for your notifications. The aps dictionary specifies the category, alert text and title. The WatchKit Simulator Actions array can provide info for one or more action buttons in addition to the standard Dismiss button. Any other top level keys are custom payload. If you have multiple such JSON files in your project, you'll be able to select them when choosing to debug the notification interface of your Watch App."
18 | }
19 |
--------------------------------------------------------------------------------
/watch/Transferring Small Pieces of Data To and From the Watch/Transferring Small Pieces of Data To and From the Watch.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/watch/Transferring Small Pieces of Data To and From the Watch/Watch Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "screenWidth" : "{130,145}",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "screenWidth" : "{146,165}",
11 | "scale" : "2x"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Transferring Small Pieces of Data To and From the Watch/Watch Extension/Assets.xcassets/Complication.complicationset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "assets" : [
3 | {
4 | "idiom" : "watch",
5 | "filename" : "Circular.imageset",
6 | "role" : "circular"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "filename" : "Modular.imageset",
11 | "role" : "modular"
12 | },
13 | {
14 | "idiom" : "watch",
15 | "filename" : "Utilitarian.imageset",
16 | "role" : "utilitarian"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/watch/Transferring Small Pieces of Data To and From the Watch/Watch Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "screenWidth" : "{130,145}",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "screenWidth" : "{146,165}",
11 | "scale" : "2x"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Transferring Small Pieces of Data To and From the Watch/Watch Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "watch",
5 | "screenWidth" : "{130,145}",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "watch",
10 | "screenWidth" : "{146,165}",
11 | "scale" : "2x"
12 | }
13 | ],
14 | "info" : {
15 | "version" : 1,
16 | "author" : "xcode"
17 | }
18 | }
--------------------------------------------------------------------------------
/watch/Transferring Small Pieces of Data To and From the Watch/Watch Extension/GlanceController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // GlanceController.swift
3 | // Watch Extension
4 | //
5 | // Created by Vandad on 8/5/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 | import Foundation
11 |
12 |
13 | class GlanceController: WKInterfaceController {
14 |
15 | override func awakeWithContext(context: AnyObject?) {
16 | super.awakeWithContext(context)
17 |
18 | // Configure interface objects here.
19 | }
20 |
21 | override func willActivate() {
22 | // This method is called when watch view controller is about to be visible to user
23 | super.willActivate()
24 | }
25 |
26 | override func didDeactivate() {
27 | // This method is called when watch view controller is no longer visible
28 | super.didDeactivate()
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/watch/Transferring Small Pieces of Data To and From the Watch/Watch Extension/InterfaceController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.swift
3 | // Watch Extension
4 | //
5 | // Created by Vandad on 8/5/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 | import Foundation
11 |
12 | class InterfaceController: WKInterfaceController {
13 |
14 | @IBOutlet var statusLabel: WKInterfaceLabel!
15 |
16 | var status = "Waiting"{
17 | didSet{
18 | statusLabel.setText(status)
19 | }
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/watch/Transferring Small Pieces of Data To and From the Watch/Watch Extension/PushNotificationPayload.apns:
--------------------------------------------------------------------------------
1 | {
2 | "aps": {
3 | "alert": {
4 | "body": "Test message",
5 | "title": "Optional title"
6 | },
7 | "category": "myCategory"
8 | },
9 |
10 | "WatchKit Simulator Actions": [
11 | {
12 | "title": "First Button",
13 | "identifier": "firstButtonAction"
14 | }
15 | ],
16 |
17 | "customKey": "Use this file to define a testing payload for your notifications. The aps dictionary specifies the category, alert text and title. The WatchKit Simulator Actions array can provide info for one or more action buttons in addition to the standard Dismiss button. Any other top level keys are custom payload. If you have multiple such JSON files in your project, you'll be able to select them when choosing to debug the notification interface of your Watch App."
18 | }
19 |
--------------------------------------------------------------------------------
/webSearch/Deleting Your App’s Searchable content/Deleting Your App’s Searchable content.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/webSearch/Deleting Your App’s Searchable content/Deleting Your App’s Searchable content/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Deleting Your App’s Searchable content
4 | //
5 | // Created by Vandad on 7/2/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/webSearch/Making User Activities Searchable/Making User Activities Searchable.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/webSearch/Making User Activities Searchable/Making User Activities Searchable/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // Making User Activities Searchable
4 | //
5 | // Created by Vandad on 7/2/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
17 | // Override point for customization after application launch.
18 | return true
19 | }
20 |
21 | func application(application: UIApplication, willContinueUserActivityWithType userActivityType: String) -> Bool {
22 | return true
23 | }
24 |
25 | func application(application: UIApplication, continueUserActivity userActivity: NSUserActivity, restorationHandler: ([AnyObject]?) -> Void) -> Bool {
26 | return true
27 | }
28 |
29 |
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/webSearch/Making User Activities Searchable/Making User Activities Searchable/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vandadnp/iOS-9-Swift-Programming-Cookbook/c091c5a14348a699d82931f0ceb3c0729de5dbe6/webSearch/Making User Activities Searchable/Making User Activities Searchable/Icon.png
--------------------------------------------------------------------------------
/webSearch/Making Your App’s Content Searchable/Making Your App’s Content Searchable.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/webSearch/Making Your App’s Content Searchable/Making Your App’s Content Searchable/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Making Your App’s Content Searchable
4 | //
5 | // Created by Vandad on 7/1/15.
6 | // Copyright © 2015 Pixolity. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------