
Explore everything iOS 9 updates, including Game Center with leaderboards and achievements and consumable and non-consumable in-app purchases. Learn to integrate camera and camera roll, keyboard input, and on-demand resources.
Explore how to use on-demand resources in iOS 9, tagging assets for download on demand, managing prefetch and initial install tags, and loading resources with completion handlers in Swift.
Explore on-demand resources in iOS 9, part 2, by loading asset packs, observing progress with fraction completed, and updating a progress label before transitioning to the next level.
Pull images from the camera roll into a SpriteKit project, using a camera roll placeholder, image picker controller, masking, and a dedicated game scene extension to swap in photos.
Learn to implement a camera roll sprite kit project by integrating the image picker for photo library and camera access, handling orientation, and managing delegates on iOS 9/10.
Loads a camera roll image into a SpriteKit scene, converts it to a texture for a sprite, places it over a placeholder, and saves the data via user defaults.
Reveal a camera roll image by loading data from user defaults, creating textures and sprites, and applying a crop node mask to display the photo in a placeholder.
Detect touches on labeled sprite nodes and perform collision checks against their frames. Learn to select camera or photo library images and manage a mask offset with cg points.
Demonstrates x and y scale adjustments to zoom and mask SpriteKit nodes, using defaults and string-to-float conversions. Learn to reset scales when loading new images and test masking behavior.
Learn to capture sprite kit scenes and save specific nodes to the camera roll by extending UIView for snapshots and hooking the function into your game scene.
Learn to add a rotation gesture recognizer to rotate a camera roll image in a SpriteKit project, track last rotation and rotation offset, and test on the simulator.
Discover how to set up in-app purchases in a swift 2 sprite-based game, including consumable vs non-consumable, product IDs, iTunes Connect testing, and SKProductsRequestDelegate integration.
Parse the plist to extract non consumables and consumables, build product identifiers, and set up in-app purchasing with user defaults and the SK payment queue.
Fetch store products, confirm can make payments, and purchase a product via SKPaymentQueue, tested on a real device with a tester Apple ID.
Learn how to handle in-app purchases by processing the payment queue, evaluating transactions as purchased or failed, delivering products, and using a consumables dictionary to award items.
Learn how to deliver in-app purchases by testing consumables, parsing product dictionaries, and updating purchase tallies with integer values and user defaults.
Discover how to implement in-app purchasing, handle restore purchases, manage transaction queues, and update the UI with purchase state and feedback in a game scene.
Learn to restore purchases in an iOS app by presenting alerts with alert controller, handling non-consumables, and restoring purchases silently while updating the UI.
Learn to implement in-app purchase alerts, manage purchase states with conditional logic, differentiate consumables from non-consumables, and dynamically show or hide buy buttons while resetting the purchasing flow.
learn quick in-app purchase setup for iOS games by wiring product IDs, configuring non-consumables and consumables, testing, restoring purchases, and managing in-game currency.
Learn to use NSUserDefaults in Swift 2, the standard user defaults, to save and retrieve strings, booleans, arrays, and dictionaries across iOS and tvOS.
Learn to implement a cross-platform iOS/tvOS keyboard input in Swift, with a reusable text field, keyboard open/close handling, and persistent username storage via user defaults.
Learn to implement a custom keyboard input for iOS and tvOS by using a placeholder label, loading and registering fonts, and handling keyboard events with observers and text field delegates.
Learn to create and parse a property list in swift, read dictionaries and arrays from a plist, and iterate to print values in a SpriteKit project.
Learn how to parse a property list with arrays of dictionaries to drive level data, including speed, monsters, and intro messages, and how to safely extract and cast values.
Post and observe notifications with NSNotificationCenter in Swift 2 using the default center, an observer, and a selector to handle events; pass data with a userInfo dictionary.
Leverage a swift 2 helper class with static properties and a shared instance to share data across game scenes, and apply color from hex string for transitions.
**** UPDATE - We've included source projects updated for Swift 3. The code changes from Swift 2.2 to 3 were VERY minor changes (as you'll see from the code)! With that said, here's our original description for the course with plenty of references to Swift 2 and Xcode 7...
This series of videos will focus on iOS9-related topics. All of these use Swift, SpriteKit, Xcode 7/8 and apply in most cases to both iOS and tvOS. There is no recommended viewing order for these topics. Jump right into any of the topics below:
On-Demand Resources in iOS9
In this video tutorial we will discuss the Swift code related to loading On-Demand Resources, or simply ODR. ODR can drastically reduce the initial size of your app, and allow your users to only download what they need, when they need it. For example, you could hold off loading images / sounds for level 2 of a game if the player will still stuck on level 1.
Take Photos and Access the Camera Roll then Use them in a Sprite Kit Game!
Learn how program a SpriteKit and Swift 2 based app that allows user's the option to add pictures from their camera or camera roll into the game or scene, mask the images, then adjust the layout of the picture within the mask (zoom in / out, move it, rotate, squash and stretch it). The edited masked-image can then appear in ANY other scene throughout the lifespan of the app (it's saved as an NSUserDefault).
In-App Purchasing for iOS or tvOS Apps
Learn how to sell Consumable and Non-Consumable Products in your iOS9 or tvOS, Swift 2-based Sprite Kit App.
NSUserDefaults with Swift 2 (and how to save the location of nodes)
In this tutorial, we'll look at saving various types of data to the NSUserDefaults. The NSUserDefaults is great for information that you want to exist even if the app is closed and reopened. As long as the user does not delete the app entirely, the data is still there (the data is basically like a property list that is saved at runtime). So we'll look at saving String objects, Ints, Bools, Arrays and finally a Dictionary (where objects are moved at runtime and their location is saved for the next time the app is run).
Keyboard Input with Swift 2 for iOS and tvOS
This video tutorial will teach you how to open a view to enter keyboard input, close it and save the entered values as an NSUserDefault. Along the way you'll also see how to include placeholder text (to easily adjust the width / height, font, and font size of the input area), include custom fonts for the input text, and test the values of the input text. For example, you could include a Parental Gate in your app that prompts parents to enter a specific value, like 12 + 3, then test to see if they typed in 15. This code has been test on both iOS and tvOS devices.
Parsing a property list with Swift 2
In these videos you will learn how to parse a property list with Swift 2 and organize data (Strings, Numbers, Arrays or Dictionaries with native Swift types). Plists are useful for just about any iOS / tvOS app, but in this particular example, we will create hypothetical level data (an Array of Dictionaries), and discuss reloading the same GameScene class while "leveling up" each time.
NSNotifications with Swift 2
In this Swift 2 video tutorial, we will work with NSNotifications to call functions / send data between classes without breaking good MVC pattern (for example, having subviews send info to parent views). In our example, we'll make the GameScene post a notification to the GameViewController. We'll even pass dictionary data using the userInfo parameter.
Helper Classes with Swift 2
In this short video tutorial, we'll look at creating static variables and functions in a Helper class with Swift 2. This Helpers class will be accessible to any other class in your app, so it's great for reusable functions and saving certain variables. This is similar to working with Singleton classes, and for good measure, we'll even create a Singleton class to show you the subtle differences.
Game Center - Achievements and Leaderboards
In these Swift 2 video tutorials, we will work with Game Center to post scores to a Leaderboard and note progress toward unlocking Achievements. This of course involves setting up both a Leaderboard and Achievement in iTunes Connect, then authenticating the local player, and all the code involved with posting to Game Center. As always, you'll learn every step of the code. The finished project is SpriteKit and Swift 2 based.