First public release
This sample demonstrates how to use the MediaPlayer MPRemoteCommandCenter APIs to handle remote control events. Refer to this sample if you want to know how to respond to remote control events, customize your Control Center and Lock Screen controls, and support Siri commands related to remote control events.
Signed-off-by: Liu Lantao <liulantao@gmail.com>
Add support for ARKit 1.5
This sample code demonstrates an interactive augmented reality experience using SceneKit and ARKit.
Signed-off-by: Liu Lantao <liulantao@gmail.com>
Scene file fix.
This sample code demonstrates the following Scene Kit features that were added in iOS 11, tvOS 11, and macOS 10.13: * Camera constraints define the camera behaviour of the app/game * A new physically-based depth of field effect achieved with “bokeh” * Screen space GPU tessellation (using Pixar’s openSubdiv) * Animation of character tones using a new animation engine (and API) * Cascaded shadow maps * GameplayKit integration
Signed-off-by: Liu Lantao <liulantao@gmail.com>
First release
This sample project illustrates the usage of Directional Image Assets in an iOS project. By using Directional Image Assets, images shown on-screen can automatically adapt to different layout directions (e.g. right-to-left contexts when running in Arabic or Hebrew), without requiring special code for loading different image variations at runtime.
Signed-off-by: Liu Lantao <liulantao@gmail.com>
First release
This sample is provided as example material for Adopting Metal II. Within this sample, you will find a ideal reference for the structure of a Metal based renderer. This project takes special care to highlight best practices in terms of data management, command buffer creation, and synchronization between CPU and GPU.
Signed-off-by: Liu Lantao <liulantao@gmail.com>
First release
This sample shows how to use UIKit to lay out your app's elements in different sizes, from full-screen on the smallest iPhone to Multitasking on the biggest iPad. It shows how to make smart decisions about implementing your own design. It also demonstrates how to reuse elements in different sizes, so you can take advantage of all the available space without having to rewrite your entire app.
Signed-off-by: Liu Lantao <liulantao@gmail.com>
Added new project to show AVPlayerLooper
This sample is a collection of projects showing how to play an audio visual item in a loop using AVFoundation's AVQueuePlayer and/or AVPlayerLooper.
Signed-off-by: Liu Lantao <liulantao@gmail.com>
Fixed NSUndoManager allocation bug.
This sample illustrates a number of aspects of working with the Core Data framework with an iOS application:
* Use of an instance of NSFetchedResultsController object to manage a collection of objects to be displayed in a table view.
* Undo and redo.
* Database initialization.
* Use of a second (child) managed object context to isolate changes during an add operation.
Signed-off-by: Liu Lantao <liulantao@gmail.com>
Updated for iOS 8 SDK. Now uses storyboards.
This demonstrates the two primary use cases for the Core Location Framework: getting the user's location and tracking changes to the user's location.
Signed-off-by: Liu Lantao <liulantao@gmail.com>
First public release.
This sample shows how to use CloudKit to upload and retrieve CKRecords and associated assets. In this example, there are two record types, an image record type and a post record type. Users are able to upload their own photos or select an image already found in an image record type. This example also uses an NSPredicate in its CKQueries to filter results based on tags.
Signed-off-by: Liu Lantao <liulantao@gmail.com>
Revised to clarify and document how Reachability supports IPv6.
The Reachability sample application demonstrates how to use the System Configuration framework to monitor the network state of an iOS device. In particular, it demonstrates how to know when IP can be routed and when traffic will be routed through a Wireless Wide Area Network (WWAN) interface such as EDGE or 3G. Note: Reachability cannot tell your application if you can connect to a particular host, only that an interface is available that might allow a connection, and whether that interface is the WWAN. To understand when and how to use Reachability, read "Networking Overview".
Signed-off-by: Liu Lantao <liulantao@gmail.com>
Converted to Swift 4, upgraded to iOS 11 SDK.
“Table Search with UISearchController” is an iOS sample application that demonstrates how to use UISearchController. A search controller manages the presentation of a search bar, in concert with the results view controller’s content.
Signed-off-by: Liu Lantao <liulantao@gmail.com>
Upgrade to iOS 10.2 SDK, replaced deprecated APIs, updated the NSAppTransportSecurity key value server domain.
This sample code demonstrates efficiently parsing and importing data from an XML RSS feed into Core Data. The XML parsing is done using libxml. The feed is from iTunes Top Songs and contains data about songs, artists, and categories. The application's data model has an entity for Song and for Category. Managed objects are inserted into a managed object context on a background thread, so the application remains responsive to the user while the import is taking place.
Signed-off-by: Liu Lantao <liulantao@gmail.com>
Updated to Swift 3
The Network Extension framework exposes APIs that give you the ability to customize the networking features of iOS and OS X. This sample project demonstrates how to:
- Use the NEPacketTunnelProvider class to implement a custom VPN tunneling protocol. - Use the NETunnelProviderManager class to create and manage VPN configurations that use the custom VPN tunneling protocol. - Use the NEAppProxyProvider class to implement a custom transparent network proxy protocol. - Use the NEAppProxyProviderManager class to manage VPN configurations that use the transparent network proxy protocol. - Use the NEFilterControlProvider and NEFilterDataProvider classes to implement a custom on-device content filtering service. - Use the NEFilterManager class to configure the custom filtering service.
Signed-off-by: Liu Lantao <liulantao@gmail.com>
Updated for iOS 10
The KeychainTouchID sample shows how to store Touch ID protected items to the keychain and how to query for those items with custom message prompts. You’ll see how to use the keychain item accessibility class, which invalidates items when the passcode is removed. You’ll also find out how to use the LocalAuthentication class to invoke Touch ID verification without involving the keychain.
Signed-off-by: Liu Lantao <liulantao@gmail.com>
Upgraded for macOS 10.12 SDK, addressed deprecated API usage, modern Obj-C syntax.
The TableViewPlayground demonstrates using the view based NSTableView and NSOutlineView. Four different samples are shown. First, a HUD window with an NSTableView that completely uses bindings to display sample windows to create. Second, a basic View Based TableView implementation is shown using delegate and dataSource methods. Third, a complex TableView example based on the AnimatedTableView demo application. Finally, a complex NSOutlineView demo that mixes bindings and a dataSource to get the job done.
Signed-off-by: Liu Lantao <liulantao@gmail.com>
Updated to iOS 11 SDK, converted to Swift, storyboard changes to support iPhone X.
PhotoPicker demonstrates choosing images from the photo library, take a picture with the camera, and customizing the camera view. This is done by using UIImagePickerController. The chosen image or camera photo is displayed in a UIImageView.
To customize the camera's interface, this sample shows how to use an overlay view. With this overlay view it gives you the ability to customize the UI as you take a picture.
Among the custom features of the camera is to take a single picture, timed picture, or repeated pictures like a camera with a fast shutter speed. Timed and shutter speed camera shots are done using the NSTimer class.
Signed-off-by: Liu Lantao <liulantao@gmail.com>
Project updated for Xcode 4.
This sample illustrates how to add JavaScript methods that call through to your Objective-C code and how to execute JavaScript in the current page of a WebView.
Signed-off-by: Liu Lantao <liulantao@gmail.com>
Updated to Swift
This sample demonstrates how to receive updates from sensors using Core Motion. It displays graphs of accelerometer, gyroscope and device motion data.
Signed-off-by: Liu Lantao <liulantao@gmail.com>
First release
This sample demonstrates how to use HealthKit to build a workout app that runs in the background, collects data from the Apple Watch sensors, and contributes to Activity rings.
Signed-off-by: Liu Lantao <liulantao@gmail.com>
Rewritten in Swift.
The main program is a simple command line tool that accepts parameters, creates query objects, runs them, and prints the results.
The various query classes are each a simple wrapper around CFHost; each has extensive comments explaining how to use the class and how the class works internally.
Signed-off-by: Liu Lantao <liulantao@gmail.com>
Now demonstrates UI view size negotiation.
Demonstrates how to build functioning examples of two Audio Unit extensions and a simple Audio Unit host app for iOS and macOS with the version 3 Audio Unit APIs.
The Audio Unit Extensions API introduces a mechanism for developers to deliver Audio Units on both iOS and OS X using the same API and also provides a bridging mechanism for existing version 2 Audio Units and hosts allowing them to work with new version 3 Audio Units.
The targets in this sample are all prefixed by their respective platform designation, "iOS" or "OSX":
- FilterDemoApp, FilterDemoAppExtension - Effect Audio Unit - InstrumentDemoApp, InstrumentDemoAppExtension - Instrument Audio Unit - AUv3Host - Audio Unit Host
Signed-off-by: Liu Lantao <liulantao@gmail.com>
Editorial update.
This sample app runs an ARKit world tracking session with content displayed in a SceneKit view. To demonstrate plane detection, the app simply places a 3D model onto the first plane that ARKit detects. If the model's position is outside the current field of view of the camera, the app uses SceneKit's positional audio feature to indicate which direction to turn the device to see the model.
Signed-off-by: Liu Lantao <liulantao@gmail.com>
Upgraded to Swift 2.3.
Demonstrates how to use the UIApplicationShortcutItem class to provide quick access to parts of your application directly from the device's home screen. The sample shows two static shortcuts (defined in the app's Info.plist), and two dynamic shortcuts (defined in code with the UIMutableApplicationShortcutItem class). The dynamic shortcuts can be edited to change the title, subtitle and icon.
Signed-off-by: Liu Lantao <liulantao@gmail.com>
First release
This sample demonstrates how to incorporate 3D Touch into an iOS App. It makes use of Home Screen Quick Actions (both static and dynamic), Peek and Pop, Peek Actions and UIPreviewInteraction.
Signed-off-by: Liu Lantao <liulantao@gmail.com>
Rewritten in Swift 4.
This sample contains examples of several common control elements with various implementations and code to make them accessible, including using the accessibility methods of NSControl subclasses and implementing accessibility protocols for custom elements.
Signed-off-by: Liu Lantao <liulantao@gmail.com>
Upgraded to Swift, now uses Storyboards.
This application demonstrates how to use a "paginated" UIScrollView to display pages of images in a horizontal fashion as a mechanism for navigating between different pages of content. It is optimized to minimize the memory usage by loading only three image pages at a time the user user scrolls: the current page, the page before and after it. This application was designed as universal to run on both iPhone and iPad devices.
Signed-off-by: Liu Lantao <liulantao@gmail.com>