Complete Project 23

This commit is contained in:
CypherPoet 2019-02-10 04:52:14 -05:00
parent 33596dc4d4
commit 5a193c5f26
35 changed files with 1659 additions and 3 deletions

View File

@ -0,0 +1,341 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
F3B6F2CB220DAD5400BD96AF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3B6F2CA220DAD5400BD96AF /* AppDelegate.swift */; };
F3B6F2CD220DAD5400BD96AF /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3B6F2CC220DAD5400BD96AF /* HomeViewController.swift */; };
F3B6F2D0220DAD5400BD96AF /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F3B6F2CE220DAD5400BD96AF /* Main.storyboard */; };
F3B6F2D2220DAD5500BD96AF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F3B6F2D1220DAD5500BD96AF /* Assets.xcassets */; };
F3B6F2D5220DAD5500BD96AF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F3B6F2D3220DAD5500BD96AF /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
F3B6F2C7220DAD5400BD96AF /* Detect A Beacon.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Detect A Beacon.app"; sourceTree = BUILT_PRODUCTS_DIR; };
F3B6F2CA220DAD5400BD96AF /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
F3B6F2CC220DAD5400BD96AF /* HomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeViewController.swift; sourceTree = "<group>"; };
F3B6F2CF220DAD5400BD96AF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
F3B6F2D1220DAD5500BD96AF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
F3B6F2D4220DAD5500BD96AF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
F3B6F2D6220DAD5500BD96AF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
F3B6F2C4220DAD5400BD96AF /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
F3B6F2BE220DAD5400BD96AF = {
isa = PBXGroup;
children = (
F3B6F2C9220DAD5400BD96AF /* Detect A Beacon */,
F3B6F2C8220DAD5400BD96AF /* Products */,
);
sourceTree = "<group>";
};
F3B6F2C8220DAD5400BD96AF /* Products */ = {
isa = PBXGroup;
children = (
F3B6F2C7220DAD5400BD96AF /* Detect A Beacon.app */,
);
name = Products;
sourceTree = "<group>";
};
F3B6F2C9220DAD5400BD96AF /* Detect A Beacon */ = {
isa = PBXGroup;
children = (
F3B6F2CA220DAD5400BD96AF /* AppDelegate.swift */,
F3B6F2CC220DAD5400BD96AF /* HomeViewController.swift */,
F3B6F2CE220DAD5400BD96AF /* Main.storyboard */,
F3B6F2D1220DAD5500BD96AF /* Assets.xcassets */,
F3B6F2D3220DAD5500BD96AF /* LaunchScreen.storyboard */,
F3B6F2D6220DAD5500BD96AF /* Info.plist */,
);
path = "Detect A Beacon";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
F3B6F2C6220DAD5400BD96AF /* Detect A Beacon */ = {
isa = PBXNativeTarget;
buildConfigurationList = F3B6F2D9220DAD5500BD96AF /* Build configuration list for PBXNativeTarget "Detect A Beacon" */;
buildPhases = (
F3B6F2C3220DAD5400BD96AF /* Sources */,
F3B6F2C4220DAD5400BD96AF /* Frameworks */,
F3B6F2C5220DAD5400BD96AF /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Detect A Beacon";
productName = "Detect A Beacon";
productReference = F3B6F2C7220DAD5400BD96AF /* Detect A Beacon.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
F3B6F2BF220DAD5400BD96AF /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1010;
LastUpgradeCheck = 1010;
ORGANIZATIONNAME = "Brian Sipple";
TargetAttributes = {
F3B6F2C6220DAD5400BD96AF = {
CreatedOnToolsVersion = 10.1;
};
};
};
buildConfigurationList = F3B6F2C2220DAD5400BD96AF /* Build configuration list for PBXProject "Detect A Beacon" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = F3B6F2BE220DAD5400BD96AF;
productRefGroup = F3B6F2C8220DAD5400BD96AF /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
F3B6F2C6220DAD5400BD96AF /* Detect A Beacon */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
F3B6F2C5220DAD5400BD96AF /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F3B6F2D5220DAD5500BD96AF /* LaunchScreen.storyboard in Resources */,
F3B6F2D2220DAD5500BD96AF /* Assets.xcassets in Resources */,
F3B6F2D0220DAD5400BD96AF /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
F3B6F2C3220DAD5400BD96AF /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F3B6F2CD220DAD5400BD96AF /* HomeViewController.swift in Sources */,
F3B6F2CB220DAD5400BD96AF /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
F3B6F2CE220DAD5400BD96AF /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
F3B6F2CF220DAD5400BD96AF /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
F3B6F2D3220DAD5500BD96AF /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
F3B6F2D4220DAD5500BD96AF /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
F3B6F2D7220DAD5500BD96AF /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
F3B6F2D8220DAD5500BD96AF /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
F3B6F2DA220DAD5500BD96AF /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = QRXXH2RKAG;
INFOPLIST_FILE = "Detect A Beacon/Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = "io.sipple.Detect-A-Beacon";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
F3B6F2DB220DAD5500BD96AF /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = QRXXH2RKAG;
INFOPLIST_FILE = "Detect A Beacon/Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = "io.sipple.Detect-A-Beacon";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
F3B6F2C2220DAD5400BD96AF /* Build configuration list for PBXProject "Detect A Beacon" */ = {
isa = XCConfigurationList;
buildConfigurations = (
F3B6F2D7220DAD5500BD96AF /* Debug */,
F3B6F2D8220DAD5500BD96AF /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
F3B6F2D9220DAD5500BD96AF /* Build configuration list for PBXNativeTarget "Detect A Beacon" */ = {
isa = XCConfigurationList;
buildConfigurations = (
F3B6F2DA220DAD5500BD96AF /* Debug */,
F3B6F2DB220DAD5500BD96AF /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = F3B6F2BF220DAD5400BD96AF /* Project object */;
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:Detect A Beacon.xcodeproj">
</FileRef>
</Workspace>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@ -0,0 +1,46 @@
//
// AppDelegate.swift
// Detect A Beacon
//
// Created by Brian Sipple on 2/8/19.
// Copyright © 2019 Brian Sipple. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
func applicationWillResignActive(_ application: UIApplication) {
// 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.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}
func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}
func applicationDidBecomeActive(_ application: UIApplication) {
// 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.
}
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
}

View File

@ -0,0 +1,98 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View File

@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>

View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina6_1" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Home View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="HomeViewController" customModule="Detect_A_Beacon" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ojl-eG-StP">
<rect key="frame" x="162.5" y="429" width="89" height="48"/>
<fontDescription key="fontDescription" type="system" weight="thin" pointSize="40"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="ojl-eG-StP" firstAttribute="centerX" secondItem="6Tk-OE-BBY" secondAttribute="centerX" id="KmA-qF-Eks"/>
<constraint firstItem="ojl-eG-StP" firstAttribute="centerY" secondItem="6Tk-OE-BBY" secondAttribute="centerY" id="rHS-ce-mRU"/>
</constraints>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
<connections>
<outlet property="nearestDistanceLabel" destination="ojl-eG-StP" id="ww9-E6-M5G"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>

View File

@ -0,0 +1,114 @@
//
// ViewController.swift
// Detect A Beacon
//
// Created by Brian Sipple on 2/8/19.
// Copyright © 2019 Brian Sipple. All rights reserved.
//
import UIKit
import CoreLocation
class HomeViewController: UIViewController {
@IBOutlet weak var nearestDistanceLabel: UILabel!
var locationManager: CLLocationManager!
// lazy var regionUUID = UUID(uuidString: "96b81f8a-c522-40c0-b79f-411a72be9093")!
lazy var regionUUID = UUID(uuidString: "5A4BCFCE-174E-4BAC-A814-092E77F6B7E5")!
let regionMajorCode: CLBeaconMajorValue = 123
let regionMinorCode: CLBeaconMinorValue = 456
let regionIdentifier = "MuseumBeacon"
var canScan: Bool {
return (
CLLocationManager.isMonitoringAvailable(for: CLBeaconRegion.self) &&
CLLocationManager.isRangingAvailable()
)
}
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
setupLocationManager()
setupUI()
}
func setupLocationManager() {
locationManager = CLLocationManager()
locationManager.delegate = self
locationManager.requestAlwaysAuthorization()
// locationManager.allowsBackgroundLocationUpdates = true
}
func setupUI() {
self.view.backgroundColor = UIColor.gray
}
func startScanning() {
let beaconRegion = CLBeaconRegion(
proximityUUID: regionUUID,
major: regionMajorCode,
minor: regionMinorCode,
identifier: regionIdentifier
)
beaconRegion.notifyEntryStateOnDisplay = true
// start monitoring for the existence of the region
locationManager.startMonitoring(for: beaconRegion)
// start measuring the distance between us and the beacon
locationManager.stopRangingBeacons(in: beaconRegion)
}
func update(withBeaconProximity proximity: CLProximity) {
UIView.animate(
withDuration: 0.8,
animations: { [unowned self] in
switch proximity {
case .unknown:
self.nearestDistanceLabel.text = "UNKOWN"
self.view.backgroundColor = UIColor(hue: 5, saturation: 29, brightness: 100, alpha: 1)
case .far:
self.nearestDistanceLabel.text = "FAR"
self.view.backgroundColor = UIColor(hue: 5, saturation: 46, brightness: 100, alpha: 1)
case .near:
self.nearestDistanceLabel.text = "CLOSE"
self.view.backgroundColor = UIColor(hue: 5, saturation: 70, brightness: 100, alpha: 1)
case .immediate:
self.nearestDistanceLabel.text = "RIGHT HERE"
self.view.backgroundColor = UIColor(hue: 5, saturation: 87, brightness: 100, alpha: 1)
}
}
)
}
}
// MARK - CLLocationManagerDelegate
extension HomeViewController: CLLocationManagerDelegate {
func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) {
if status == .authorizedAlways {
if canScan {
startScanning()
}
}
}
func locationManager(_ manager: CLLocationManager, didRangeBeacons beacons: [CLBeacon], in region: CLBeaconRegion) {
if let beacon = beacons.first {
update(withBeaconProximity: beacon.proximity)
} else {
update(withBeaconProximity: .unknown)
}
}
}

View File

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string>We want to be able to find your nearest museum</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>We want to be able to find your nearest museum</string>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>

View File

@ -0,0 +1,405 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
F35A60BB220FCC3400AAD6A8 /* tv.png in Resources */ = {isa = PBXBuildFile; fileRef = F35A60AF220FCC3400AAD6A8 /* tv.png */; };
F35A60BC220FCC3400AAD6A8 /* ball.png in Resources */ = {isa = PBXBuildFile; fileRef = F35A60B0220FCC3400AAD6A8 /* ball.png */; };
F35A60BD220FCC3400AAD6A8 /* explosion.sks in Resources */ = {isa = PBXBuildFile; fileRef = F35A60B1220FCC3400AAD6A8 /* explosion.sks */; };
F35A60BE220FCC3400AAD6A8 /* tv@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F35A60B2220FCC3400AAD6A8 /* tv@2x.png */; };
F35A60BF220FCC3400AAD6A8 /* bigSpark.png in Resources */ = {isa = PBXBuildFile; fileRef = F35A60B3220FCC3400AAD6A8 /* bigSpark.png */; };
F35A60C0220FCC3400AAD6A8 /* spark.png in Resources */ = {isa = PBXBuildFile; fileRef = F35A60B4220FCC3400AAD6A8 /* spark.png */; };
F35A60C1220FCC3400AAD6A8 /* player@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F35A60B5220FCC3400AAD6A8 /* player@2x.png */; };
F35A60C2220FCC3400AAD6A8 /* ball@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F35A60B6220FCC3400AAD6A8 /* ball@2x.png */; };
F35A60C3220FCC3400AAD6A8 /* hammer.png in Resources */ = {isa = PBXBuildFile; fileRef = F35A60B7220FCC3400AAD6A8 /* hammer.png */; };
F35A60C4220FCC3400AAD6A8 /* player.png in Resources */ = {isa = PBXBuildFile; fileRef = F35A60B8220FCC3400AAD6A8 /* player.png */; };
F35A60C5220FCC3400AAD6A8 /* Starfield.sks in Resources */ = {isa = PBXBuildFile; fileRef = F35A60B9220FCC3400AAD6A8 /* Starfield.sks */; };
F35A60C6220FCC3400AAD6A8 /* hammer@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F35A60BA220FCC3400AAD6A8 /* hammer@2x.png */; };
F3E88949220FCAFD000D5834 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3E88948220FCAFD000D5834 /* AppDelegate.swift */; };
F3E8894B220FCAFD000D5834 /* GameScene.sks in Resources */ = {isa = PBXBuildFile; fileRef = F3E8894A220FCAFD000D5834 /* GameScene.sks */; };
F3E8894F220FCAFD000D5834 /* GameScene.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3E8894E220FCAFD000D5834 /* GameScene.swift */; };
F3E88951220FCAFD000D5834 /* GameViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3E88950220FCAFD000D5834 /* GameViewController.swift */; };
F3E88954220FCAFD000D5834 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F3E88952220FCAFD000D5834 /* Main.storyboard */; };
F3E88956220FCAFE000D5834 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F3E88955220FCAFE000D5834 /* Assets.xcassets */; };
F3E88959220FCAFE000D5834 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F3E88957220FCAFE000D5834 /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
F35A60AF220FCC3400AAD6A8 /* tv.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = tv.png; sourceTree = "<group>"; };
F35A60B0220FCC3400AAD6A8 /* ball.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ball.png; sourceTree = "<group>"; };
F35A60B1220FCC3400AAD6A8 /* explosion.sks */ = {isa = PBXFileReference; lastKnownFileType = file.sks; path = explosion.sks; sourceTree = "<group>"; };
F35A60B2220FCC3400AAD6A8 /* tv@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "tv@2x.png"; sourceTree = "<group>"; };
F35A60B3220FCC3400AAD6A8 /* bigSpark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bigSpark.png; sourceTree = "<group>"; };
F35A60B4220FCC3400AAD6A8 /* spark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = spark.png; sourceTree = "<group>"; };
F35A60B5220FCC3400AAD6A8 /* player@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "player@2x.png"; sourceTree = "<group>"; };
F35A60B6220FCC3400AAD6A8 /* ball@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ball@2x.png"; sourceTree = "<group>"; };
F35A60B7220FCC3400AAD6A8 /* hammer.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = hammer.png; sourceTree = "<group>"; };
F35A60B8220FCC3400AAD6A8 /* player.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = player.png; sourceTree = "<group>"; };
F35A60B9220FCC3400AAD6A8 /* Starfield.sks */ = {isa = PBXFileReference; lastKnownFileType = file.sks; path = Starfield.sks; sourceTree = "<group>"; };
F35A60BA220FCC3400AAD6A8 /* hammer@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "hammer@2x.png"; sourceTree = "<group>"; };
F3E88945220FCAFD000D5834 /* Space Race.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Space Race.app"; sourceTree = BUILT_PRODUCTS_DIR; };
F3E88948220FCAFD000D5834 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
F3E8894A220FCAFD000D5834 /* GameScene.sks */ = {isa = PBXFileReference; lastKnownFileType = file.sks; path = GameScene.sks; sourceTree = "<group>"; };
F3E8894E220FCAFD000D5834 /* GameScene.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameScene.swift; sourceTree = "<group>"; };
F3E88950220FCAFD000D5834 /* GameViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameViewController.swift; sourceTree = "<group>"; };
F3E88953220FCAFD000D5834 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
F3E88955220FCAFE000D5834 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
F3E88958220FCAFE000D5834 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
F3E8895A220FCAFE000D5834 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
F3E88942220FCAFD000D5834 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
F35A60AE220FCC3400AAD6A8 /* Content */ = {
isa = PBXGroup;
children = (
F35A60AF220FCC3400AAD6A8 /* tv.png */,
F35A60B0220FCC3400AAD6A8 /* ball.png */,
F35A60B1220FCC3400AAD6A8 /* explosion.sks */,
F35A60B2220FCC3400AAD6A8 /* tv@2x.png */,
F35A60B3220FCC3400AAD6A8 /* bigSpark.png */,
F35A60B4220FCC3400AAD6A8 /* spark.png */,
F35A60B5220FCC3400AAD6A8 /* player@2x.png */,
F35A60B6220FCC3400AAD6A8 /* ball@2x.png */,
F35A60B7220FCC3400AAD6A8 /* hammer.png */,
F35A60B8220FCC3400AAD6A8 /* player.png */,
F35A60B9220FCC3400AAD6A8 /* Starfield.sks */,
F35A60BA220FCC3400AAD6A8 /* hammer@2x.png */,
);
path = Content;
sourceTree = "<group>";
};
F3E8893C220FCAFD000D5834 = {
isa = PBXGroup;
children = (
F3E88947220FCAFD000D5834 /* Space Race */,
F3E88946220FCAFD000D5834 /* Products */,
);
sourceTree = "<group>";
};
F3E88946220FCAFD000D5834 /* Products */ = {
isa = PBXGroup;
children = (
F3E88945220FCAFD000D5834 /* Space Race.app */,
);
name = Products;
sourceTree = "<group>";
};
F3E88947220FCAFD000D5834 /* Space Race */ = {
isa = PBXGroup;
children = (
F3E88948220FCAFD000D5834 /* AppDelegate.swift */,
F3E8894A220FCAFD000D5834 /* GameScene.sks */,
F3E8894E220FCAFD000D5834 /* GameScene.swift */,
F3E88950220FCAFD000D5834 /* GameViewController.swift */,
F3E88952220FCAFD000D5834 /* Main.storyboard */,
F3E88955220FCAFE000D5834 /* Assets.xcassets */,
F3E88957220FCAFE000D5834 /* LaunchScreen.storyboard */,
F3E8895A220FCAFE000D5834 /* Info.plist */,
F35A60AE220FCC3400AAD6A8 /* Content */,
);
path = "Space Race";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
F3E88944220FCAFD000D5834 /* Space Race */ = {
isa = PBXNativeTarget;
buildConfigurationList = F3E8895D220FCAFE000D5834 /* Build configuration list for PBXNativeTarget "Space Race" */;
buildPhases = (
F3E88941220FCAFD000D5834 /* Sources */,
F3E88942220FCAFD000D5834 /* Frameworks */,
F3E88943220FCAFD000D5834 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Space Race";
productName = "Space Race";
productReference = F3E88945220FCAFD000D5834 /* Space Race.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
F3E8893D220FCAFD000D5834 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1010;
LastUpgradeCheck = 1010;
ORGANIZATIONNAME = "Brian Sipple";
TargetAttributes = {
F3E88944220FCAFD000D5834 = {
CreatedOnToolsVersion = 10.1;
};
};
};
buildConfigurationList = F3E88940220FCAFD000D5834 /* Build configuration list for PBXProject "Space Race" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = F3E8893C220FCAFD000D5834;
productRefGroup = F3E88946220FCAFD000D5834 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
F3E88944220FCAFD000D5834 /* Space Race */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
F3E88943220FCAFD000D5834 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F35A60C4220FCC3400AAD6A8 /* player.png in Resources */,
F35A60C1220FCC3400AAD6A8 /* player@2x.png in Resources */,
F35A60BE220FCC3400AAD6A8 /* tv@2x.png in Resources */,
F35A60C3220FCC3400AAD6A8 /* hammer.png in Resources */,
F35A60C6220FCC3400AAD6A8 /* hammer@2x.png in Resources */,
F35A60BB220FCC3400AAD6A8 /* tv.png in Resources */,
F3E88954220FCAFD000D5834 /* Main.storyboard in Resources */,
F35A60BC220FCC3400AAD6A8 /* ball.png in Resources */,
F3E8894B220FCAFD000D5834 /* GameScene.sks in Resources */,
F35A60C0220FCC3400AAD6A8 /* spark.png in Resources */,
F35A60C2220FCC3400AAD6A8 /* ball@2x.png in Resources */,
F35A60BD220FCC3400AAD6A8 /* explosion.sks in Resources */,
F3E88956220FCAFE000D5834 /* Assets.xcassets in Resources */,
F35A60C5220FCC3400AAD6A8 /* Starfield.sks in Resources */,
F3E88959220FCAFE000D5834 /* LaunchScreen.storyboard in Resources */,
F35A60BF220FCC3400AAD6A8 /* bigSpark.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
F3E88941220FCAFD000D5834 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F3E8894F220FCAFD000D5834 /* GameScene.swift in Sources */,
F3E88951220FCAFD000D5834 /* GameViewController.swift in Sources */,
F3E88949220FCAFD000D5834 /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
F3E88952220FCAFD000D5834 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
F3E88953220FCAFD000D5834 /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
F3E88957220FCAFE000D5834 /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
F3E88958220FCAFE000D5834 /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
F3E8895B220FCAFE000D5834 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
F3E8895C220FCAFE000D5834 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
F3E8895E220FCAFE000D5834 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = QRXXH2RKAG;
INFOPLIST_FILE = "Space Race/Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = "io.sipple.Space-Race";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
F3E8895F220FCAFE000D5834 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = QRXXH2RKAG;
INFOPLIST_FILE = "Space Race/Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = "io.sipple.Space-Race";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
F3E88940220FCAFD000D5834 /* Build configuration list for PBXProject "Space Race" */ = {
isa = XCConfigurationList;
buildConfigurations = (
F3E8895B220FCAFE000D5834 /* Debug */,
F3E8895C220FCAFE000D5834 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
F3E8895D220FCAFE000D5834 /* Build configuration list for PBXNativeTarget "Space Race" */ = {
isa = XCConfigurationList;
buildConfigurations = (
F3E8895E220FCAFE000D5834 /* Debug */,
F3E8895F220FCAFE000D5834 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = F3E8893D220FCAFD000D5834 /* Project object */;
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:Space Race.xcodeproj">
</FileRef>
</Workspace>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@ -0,0 +1,46 @@
//
// AppDelegate.swift
// Space Race
//
// Created by Brian Sipple on 2/9/19.
// Copyright © 2019 Brian Sipple. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
func applicationWillResignActive(_ application: UIApplication) {
// 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.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}
func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}
func applicationDidBecomeActive(_ application: UIApplication) {
// 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.
}
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
}

View File

@ -0,0 +1,98 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View File

@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BV1-FR-VrT">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Game View Controller-->
<scene sceneID="tXr-a1-R10">
<objects>
<viewController id="BV1-FR-VrT" customClass="GameViewController" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" multipleTouchEnabled="YES" contentMode="scaleToFill" id="3se-qz-xqx" customClass="SKView">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="4qk-I5-YsI"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="SZV-WD-TEh" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

View File

@ -0,0 +1,203 @@
//
// GameScene.swift
// Space Race
//
// Created by Brian Sipple on 2/9/19.
// Copyright © 2019 Brian Sipple. All rights reserved.
//
import SpriteKit
import GameplayKit
let sceneWidth = 1024.0
let sceneHeight = 768.0
let enemySpawnInterval = 0.333
enum EnemyType: String, CaseIterable {
case ball, hammer, tv
}
let nodeNames = [
"enemy": "enemy",
"playerShip": "Normandy"
]
class GameScene: SKScene {
var scoreLabel: SKLabelNode!
var starfield: SKEmitterNode!
var playerShip: SKSpriteNode!
var gameTimer: Timer!
var isGameOver = false {
didSet {
if isGameOver {
gameTimer.invalidate()
}
}
}
var sceneCenter: CGPoint {
return view!.center
}
var currentScore = 0 {
didSet {
self.scoreLabel.text = "Current score: \(currentScore)"
}
}
var enemiesInSpace: [SKSpriteNode] {
return children.filter { $0 is SKSpriteNode && $0.name == nodeNames["enemy"] } as! [SKSpriteNode]
}
var pastEnemies: [SKSpriteNode] {
return enemiesInSpace.filter({ $0.position.x < $0.size.width * 3 })
}
var shipScreenBounds: (top: CGFloat, bottom: CGFloat) {
return (CGFloat(sceneHeight) - playerShip.size.height, playerShip.size.height)
}
override func update(_ currentTime: TimeInterval) {
if !isGameOver {
currentScore += 1
}
}
override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?) {
guard let touch = touches.first else { return }
var touchLocation = touch.location(in: self)
if touchLocation.y > shipScreenBounds.top {
touchLocation.y = shipScreenBounds.top
} else if touchLocation.y < shipScreenBounds.bottom {
touchLocation.y = shipScreenBounds.bottom
}
playerShip.position = touchLocation
}
override func didMove(to view: SKView) {
setupUI()
setupPhysics()
startGame()
}
// MARK: UI
func setupUI() {
setupBackground()
setupScoreLabel()
setupPlayerShip()
}
func setupScoreLabel() {
scoreLabel = SKLabelNode()
scoreLabel.position = CGPoint(x: 16, y: 16)
scoreLabel.horizontalAlignmentMode = .left
addChild(scoreLabel)
currentScore = 0
}
func setupPlayerShip() {
playerShip = SKSpriteNode(imageNamed: "player")
playerShip.position = CGPoint(x: 100.0, y: sceneCenter.y)
playerShip.physicsBody = SKPhysicsBody(texture: playerShip.texture!, size: playerShip.size)
playerShip.physicsBody?.contactTestBitMask = 1
playerShip.name = nodeNames["playerShip"]
addChild(playerShip)
}
func setupBackground() {
self.backgroundColor = .black
starfield = SKEmitterNode(fileNamed: "Starfield")!
starfield.position = CGPoint(x: sceneWidth, y: Double(sceneCenter.y))
starfield.zPosition = -1
// cause the particles to spread out over our background
starfield.advanceSimulationTime(10)
addChild(starfield)
}
// MARK: Physics
func setupPhysics() {
self.physicsWorld.gravity = CGVector(dx: 0, dy: 0)
self.physicsWorld.contactDelegate = self
}
// MARK: Gameplay
func startGame() {
gameTimer = Timer.scheduledTimer(
timeInterval: enemySpawnInterval,
target: self,
selector: #selector(spawnEnemy),
userInfo: nil,
repeats: true
)
}
@objc func spawnEnemy() {
let enemyType = EnemyType.allCases.randomElement()!
let enemy = SKSpriteNode(imageNamed: enemyType.rawValue)
let enemyWidth = Double(enemy.size.width);
let enemyHeight = Double(enemy.size.height);
let xPos = sceneWidth + enemyWidth
let yPos = Double.random(in: enemyHeight...(sceneHeight - enemyHeight))
enemy.position = CGPoint(x: xPos, y: yPos)
enemy.physicsBody = SKPhysicsBody(texture: enemy.texture!, size: enemy.size)
enemy.physicsBody?.categoryBitMask = 1
enemy.physicsBody?.velocity = CGVector(dx: -500, dy: 0)
enemy.physicsBody?.angularDamping = 0
enemy.physicsBody?.linearDamping = 0
enemy.physicsBody?.angularVelocity = 5
addChild(enemy)
}
func checkForPastEnemies() {
pastEnemies.forEach({ remove(node: $0) })
}
func remove(node: SKNode) {
node.removeFromParent()
}
func shipDestroyed(by enemy: SKNode) {
let explosion = SKEmitterNode(fileNamed: "explosion")!
explosion.position = playerShip.position
remove(node: enemy)
remove(node: playerShip)
addChild(explosion)
isGameOver = true
}
}
extension GameScene: SKPhysicsContactDelegate {
func didBegin(_ contact: SKPhysicsContact) {
guard let nodeA = contact.bodyA.node else { return }
guard let nodeB = contact.bodyB.node else { return }
if [nodeA.name, nodeB.name].contains(nodeNames["playerShip"]) {
let collidingNode = nodeA.name == nodeNames["playerShip"] ? nodeB : nodeA
shipDestroyed(by: collidingNode)
}
}
}

View File

@ -0,0 +1,50 @@
//
// GameViewController.swift
// Space Race
//
// Created by Brian Sipple on 2/9/19.
// Copyright © 2019 Brian Sipple. All rights reserved.
//
import UIKit
import SpriteKit
import GameplayKit
class GameViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
if let view = self.view as! SKView? {
// Load the SKScene from 'GameScene.sks'
if let scene = SKScene(fileNamed: "GameScene") {
// Set the scale mode to scale to fit the window
scene.scaleMode = .aspectFill
// Present the scene
view.presentScene(scene)
}
view.ignoresSiblingOrder = true
view.showsFPS = true
view.showsNodeCount = true
}
}
override var shouldAutorotate: Bool {
return true
}
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
if UIDevice.current.userInterfaceIdiom == .phone {
return .allButUpsideDown
} else {
return .all
}
}
override var prefersStatusBarHidden: Bool {
return true
}
}

View File

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UIStatusBarHidden</key>
<true/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>

View File

@ -36,9 +36,9 @@
| 17 | 🎮<br>[Swifty Ninja](/17-swifty-ninja) | SKShapeNode, CGPath, UIBezierPath, AVAudioPlayer, CaseIterable & custom enums, SKAction sequences and groups, default method parameters | ✅ |
| 18 | 🛠<br>[Debugging](/18-debugging) | `print`, `assert`, breakpoints, visual debugging, conditional breakpoints, lldb printing and expressions | ✅ |
| 19 | 📱<br>[Capital Cities](/19-capital-cities) | MKMapView, MKAnnotation, MKPinAnnotationView, CLLocationCoordinate2D, dequeueReusableAnnotationView(), switching between different map styles | ✅ |
| 20 | 🎮<br>[Fireworks Night](/20-fireworks-night) | Timer, SKNode, follow(), motionBegan(), prefersStatusBarHidden, Timer.invalidate() | ✅ |
| 21 | 🛠<br>[Local Notifications](/21-local-notifications) | UNUserNotificationCenter, UNNotificationRequest, UNNotificationAction, UNNotificationCategory, UNUserNotificationCenterDelegate, UNNotificationDefaultActionIdentifier | 🔴 |
| 22 | 📱<br>[Detect-A-Beacon](/22-detect-a-beacon) | Core Location, CLBeaconRegion, CLLocationManager, startMonitoring(for:), startRangingBeacons(in:), `uuidgen`, CLBeaconRegion, CLProximity | 🔴 |
| 20 | 🎮<br>[Fireworks Night](/20-fireworks-night) | Timer, SKNode, SKAction.follow() and its awesome `orientToPath` option, motionBegan(), prefersStatusBarHidden, Timer.invalidate(), colorBlendFactor for SKSpriteNodes | ✅ |
| 21 | 🛠<br>[Local Notifications](/21-local-notifications) | UNUserNotificationCenter, UNNotificationRequest, UNNotificationAction, UNNotificationCategory, UNUserNotificationCenterDelegate, UNNotificationDefaultActionIdentifier | |
| 22 | 📱<br>[Detect-A-Beacon](/22-detect-a-beacon) | iBeacons, Core Location, CLBeaconRegion, CLLocationManager, startMonitoring(for:), startRangingBeacons(in:), `uuidgen`, CLBeaconRegion, CLProximity | 🚧 |
| 23 | 🎮<br>[Space Race](/23-space-race) | Per-Pixel Collision Detection, Advancing Particle Systems, Adjust Linear & Angular Damping, touchesEnded(), touchesMoved(), touchesBegan() | 🔴 |
| 24 | 🛠<br>[Swift Extensions](/24-swift-extensions/swiftextensions.playground) | `mutating`, Protocol-Oriented Programming, Methods as Verbs, Properties as State, ExSwift | 🔴 |
| 25 | 📱<br>[Selfie Share](/25-selfie-share) | MCSession, MCBrowswerViewController, showConnectionPrompt(), MCPeerID, MCAdvertiserAssistant, MCSessionDelegate, MCBrowserViewControllerDelegate, Data, data(using:), String.Encoding.utf8 | 🔴 |