From c3140ba39a6a4a4d592ebdf711211e324b32489e Mon Sep 17 00:00:00 2001 From: Jeff Verkoeyen Date: Mon, 28 Nov 2016 00:16:39 -0500 Subject: [PATCH] Initial commit --- .arcconfig | 26 ++ .arclint | 44 ++ .arcunit | 12 + .clang-format | 12 + .codecov.yml | 3 + .gitignore | 69 +++ .jazzy.yaml | 10 + .swift-version | 1 + .travis.yml | 17 + AUTHORS | 8 + CHANGELOG.md | 0 CONTRIBUTING.md | 31 ++ LICENSE | 202 +++++++++ MaterialMotionStreams.podspec | 28 ++ Podfile | 24 + README.md | 67 +++ examples/ExampleViewController.swift | 20 + .../Catalog/Catalog.xcodeproj/project.pbxproj | 422 ++++++++++++++++++ .../xcshareddata/xcschemes/Catalog.xcscheme | 101 +++++ .../xcshareddata/xcschemes/UnitTests.xcscheme | 56 +++ .../apps/Catalog/Catalog/AppDelegate.swift | 36 ++ .../AppIcon.appiconset/Contents.json | 73 +++ .../Base.lproj/LaunchScreen.storyboard | 27 ++ examples/apps/Catalog/Catalog/Info.plist | 45 ++ .../Catalog/Catalog/TableOfContents.swift | 23 + examples/apps/Catalog/UnitTests/Info.plist | 24 + 26 files changed, 1381 insertions(+) create mode 100644 .arcconfig create mode 100644 .arclint create mode 100644 .arcunit create mode 100644 .clang-format create mode 100644 .codecov.yml create mode 100644 .gitignore create mode 100644 .jazzy.yaml create mode 100644 .swift-version create mode 100644 .travis.yml create mode 100644 AUTHORS create mode 100644 CHANGELOG.md create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE create mode 100644 MaterialMotionStreams.podspec create mode 100644 Podfile create mode 100644 README.md create mode 100644 examples/ExampleViewController.swift create mode 100644 examples/apps/Catalog/Catalog.xcodeproj/project.pbxproj create mode 100644 examples/apps/Catalog/Catalog.xcodeproj/xcshareddata/xcschemes/Catalog.xcscheme create mode 100644 examples/apps/Catalog/Catalog.xcodeproj/xcshareddata/xcschemes/UnitTests.xcscheme create mode 100644 examples/apps/Catalog/Catalog/AppDelegate.swift create mode 100644 examples/apps/Catalog/Catalog/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 examples/apps/Catalog/Catalog/Base.lproj/LaunchScreen.storyboard create mode 100644 examples/apps/Catalog/Catalog/Info.plist create mode 100644 examples/apps/Catalog/Catalog/TableOfContents.swift create mode 100644 examples/apps/Catalog/UnitTests/Info.plist diff --git a/.arcconfig b/.arcconfig new file mode 100644 index 0000000..27b38d5 --- /dev/null +++ b/.arcconfig @@ -0,0 +1,26 @@ +{ + "load": [ + "material-arc-tools/third_party/arc-hook-conphig", + "material-arc-tools/third_party/arc-hook-github-issues", + "material-arc-tools/third_party/arc-jazzy-linter", + "material-arc-tools/third_party/arc-proselint", + "material-arc-tools/third_party/arc-xcode-test-engine", + "material-arc-tools/third_party/clang-format-linter" + ], + "arcanist_configuration": "HookConphig", + "phabricator.uri": "http://codereview.cc/", + "arc.land.onto.default": "develop", + "arc.feature.start.default": "origin/develop", + "unit.xcode": { + "build": { + "workspace": "MaterialMotionStreams.xcworkspace", + "scheme": "UnitTests", + "configuration": "Debug", + "destination": "platform=iOS Simulator,name=iPhone 6s" + }, + "coverage": { + "product": "MaterialMotionStreams.framework/MaterialMotionStreams" + }, + "pre-build": "pod install" + } +} diff --git a/.arclint b/.arclint new file mode 100644 index 0000000..517aa17 --- /dev/null +++ b/.arclint @@ -0,0 +1,44 @@ +{ + "linters": { + "chmod": { + "type": "chmod" + }, + "text": { + "type": "text", + "include": "(\\.(m|h|mm|md|swift)$)", + "exclude": [ + "(/Pods/)" + ], + "severity": { + "3": "disabled", + "5": "disabled" + } + }, + "prose": { + "type": "prose", + "include": "(\\.(md)$)", + "exclude": [ + "(^CHANGELOG.md)" + ], + "severity": { + "typography.symbols.curly_quotes": "disabled", + "typography.symbols.ellipsis": "disabled", + "leonard.exclamation.30ppm": "disabled", + "misc.annotations": "warning" + } + }, + "spelling": { + "type": "spelling", + "include": "(\\.(md)$)" + }, + "clang-format": { + "type": "clang-format", + "include": "(\\.(m|h|mm)$)", + "exclude": "(/Pods/)" + }, + "jazzy": { + "type": "jazzy", + "include": "(src/[^\/]+?\\.(h|swift)$)" + } + } +} diff --git a/.arcunit b/.arcunit new file mode 100644 index 0000000..2a88631 --- /dev/null +++ b/.arcunit @@ -0,0 +1,12 @@ +{ + "engines": { + "xcode": { + "type": "xcode-test-engine", + "include": [ + "(\\.(m|h|mm|swift)$)", + "(Podfile)" + ], + "exclude": "(/Pods/)" + } + } +} diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..598caef --- /dev/null +++ b/.clang-format @@ -0,0 +1,12 @@ +BasedOnStyle: Google + +AllowShortFunctionsOnASingleLine: Inline +AllowShortIfStatementsOnASingleLine: false +AllowShortLoopsOnASingleLine: false +AlwaysBreakBeforeMultilineStrings: false +BinPackParameters: false +ColumnLimit: 0 +IndentWrappedFunctionNames: true +ObjCSpaceBeforeProtocolList: true +PointerBindsToType: false +SortIncludes: true diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 0000000..a1f6d15 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,3 @@ +coverage: + ignore: + - "examples/" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..aac5962 --- /dev/null +++ b/.gitignore @@ -0,0 +1,69 @@ +# Jazzy +docs/ + +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData/ + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata/ + +## Other +*.moved-aside +*.xcuserstate + +## Obj-C/Swift specific +*.hmap +*.ipa +*.dSYM.zip +*.dSYM + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +Pods/ +*.xcworkspace + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output diff --git a/.jazzy.yaml b/.jazzy.yaml new file mode 100644 index 0000000..1b3ebb1 --- /dev/null +++ b/.jazzy.yaml @@ -0,0 +1,10 @@ +module: MaterialMotionStreams +module_version: 1.0.0 +sdk: iphonesimulator +xcodebuild_arguments: + - -workspace + - MaterialMotionStreams.xcworkspace + - -scheme + - MaterialMotionStreams +github_url: https://github.com/material-motion/streams-swift +github_file_prefix: https://github.com/material-motion/streams-swift/tree/v1.0.0 diff --git a/.swift-version b/.swift-version new file mode 100644 index 0000000..9f55b2c --- /dev/null +++ b/.swift-version @@ -0,0 +1 @@ +3.0 diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..b1a4fca --- /dev/null +++ b/.travis.yml @@ -0,0 +1,17 @@ +language: objective-c +osx_image: xcode8.1 +sudo: false +notifications: + email: false +before_install: + - gem install cocoapods --no-rdoc --no-ri --no-document --quiet + - git clone https://github.com/phacility/arcanist.git + - git clone https://github.com/phacility/libphutil.git + - git clone --recursive https://github.com/material-foundation/material-arc-tools.git + - pod install --repo-update +script: + - set -o pipefail + - arcanist/bin/arc unit --everything --trace + - xcodebuild build -workspace MaterialMotionStreams.xcworkspace -scheme Catalog -sdk "iphonesimulator10.1" -destination "name=iPhone 6s,OS=10.1" ONLY_ACTIVE_ARCH=YES | xcpretty -c; +after_success: + - bash <(curl -s https://codecov.io/bash) diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..1160fef --- /dev/null +++ b/AUTHORS @@ -0,0 +1,8 @@ +# This is the list of Material Motion streams for Apple devices authors for copyright purposes. +# +# This does not necessarily list everyone who has contributed code, since in +# some cases, their employer may be the copyright holder. To see the full list +# of contributors, see the revision history with git log. + +Google Inc. +and other contributors diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e69de29 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..0f02ad3 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,31 @@ +Want to contribute? Great! First, read this page (including the small print at +the end). + +### Before you contribute + +Before we can use your code, you must sign the +[Google Individual Contributor License Agreement] +(https://cla.developers.google.com/about/google-individual) +(CLA), which you can do online. The CLA is necessary mainly because you own the +copyright to your changes, even after your contribution becomes part of our +codebase, so we need your permission to use and distribute your code. We also +need to be sure of various other things—for instance that you'll tell us if you +know that your code infringes on other people's patents. You don't have to sign +the CLA until after you've submitted your code for review and a member has +approved it, but you must do it before we can put your code into our codebase. +Before you start working on a larger contribution, you should get in touch with +us first through the issue tracker with your idea so that we can help out and +possibly guide you. Coordinating up front makes it much easier to avoid +frustration later on. + +### Code reviews + +All submissions, including submissions by project members, require review. +We use GitHub pull requests for this purpose. + +### The small print + +Contributions made by corporations are covered by a different agreement than +the one above, the +[Software Grant and Corporate Contributor License Agreement] +(https://cla.developers.google.com/about/google-corporate). diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/MaterialMotionStreams.podspec b/MaterialMotionStreams.podspec new file mode 100644 index 0000000..bff6209 --- /dev/null +++ b/MaterialMotionStreams.podspec @@ -0,0 +1,28 @@ +Pod::Spec.new do |s| + s.name = "MaterialMotionStreams" + s.summary = "Material Motion streams for Apple devices" + s.version = "1.0.0" + s.authors = "The Material Motion Authors" + s.license = "Apache 2.0" + s.homepage = "https://github.com/material-motion/streams-swift" + s.source = { :git => "https://github.com/material-motion/streams-swift.git", :tag => "v" + s.version.to_s } + s.platform = :ios, "8.0" + s.requires_arc = true + s.default_subspec = "lib" + + s.subspec "lib" do |ss| + ss.source_files = "src/*.{swift}", "src/private/*.{swift}" + end + + s.subspec "examples" do |ss| + ss.source_files = "examples/*.{swift}", "examples/supplemental/*.{swift}" + ss.exclude_files = "examples/TableOfContents.swift" + ss.resources = "examples/supplemental/*.{xcassets}" + ss.dependency "MaterialMotionStreams/lib" + end + + s.subspec "tests" do |ss| + ss.source_files = "tests/src/*.{swift}", "tests/src/private/*.{swift}" + ss.dependency "MaterialMotionStreams/lib" + end +end diff --git a/Podfile b/Podfile new file mode 100644 index 0000000..cab859a --- /dev/null +++ b/Podfile @@ -0,0 +1,24 @@ +workspace 'MaterialMotionStreams.xcworkspace' +use_frameworks! + +target "Catalog" do + pod 'CatalogByConvention' + pod 'MaterialMotionStreams/examples', :path => './' + project 'examples/apps/Catalog/Catalog.xcodeproj' +end + +target "UnitTests" do + project 'examples/apps/Catalog/Catalog.xcodeproj' + pod 'MaterialMotionStreams/tests', :path => './' +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + target.build_configurations.each do |configuration| + configuration.build_settings['SWIFT_VERSION'] = "3.0" + if target.name.start_with?("Material") + configuration.build_settings['WARNING_CFLAGS'] ="$(inherited) -Wall -Wcast-align -Wconversion -Werror -Wextra -Wimplicit-atomic-properties -Wmissing-prototypes -Wno-sign-conversion -Wno-unused-parameter -Woverlength-strings -Wshadow -Wstrict-selector-match -Wundeclared-selector -Wunreachable-code" + end + end + end +end diff --git a/README.md b/README.md new file mode 100644 index 0000000..223c58a --- /dev/null +++ b/README.md @@ -0,0 +1,67 @@ +# Material Motion streams for Apple devices + +[![Build Status](https://travis-ci.org/material-motion/streams-swift.svg?branch=develop)](https://travis-ci.org/material-motion/streams-swift) +[![codecov](https://codecov.io/gh/material-motion/streams-swift/branch/develop/graph/badge.svg)](https://codecov.io/gh/material-motion/streams-swift) +[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/MaterialMotionStreams.svg)](https://cocoapods.org/pods/MaterialMotionStreams) +[![Platform](https://img.shields.io/cocoapods/p/MaterialMotionStreams.svg)](http://cocoadocs.org/docsets/MaterialMotionStreams) +[![Docs](https://img.shields.io/cocoapods/metrics/doc-percent/MaterialMotionStreams.svg)](http://cocoadocs.org/docsets/MaterialMotionStreams) + +## Installation + +### Installation with CocoaPods + +> CocoaPods is a dependency manager for Objective-C and Swift libraries. CocoaPods automates the +> process of using third-party libraries in your projects. See +> [the Getting Started guide](https://guides.cocoapods.org/using/getting-started.html) for more +> information. You can install it with the following command: +> +> gem install cocoapods + +Add `MaterialMotionStreams` to your `Podfile`: + + pod 'MaterialMotionStreams' + +Then run the following command: + + pod install + +### Usage + +Import the framework: + + @import MaterialMotionStreams; + +You will now have access to all of the APIs. + +## Example apps/unit tests + +Check out a local copy of the repo to access the Catalog application by running the following +commands: + + git clone https://github.com/material-motion/streams-swift.git + cd streams-swift + pod install + open MaterialMotionStreams.xcworkspace + +## Guides + +1. [Architecture](#architecture) +2. [How to ...](#how-to-...) + +### Architecture + +### How to ... + +## Contributing + +We welcome contributions! + +Check out our [upcoming milestones](https://github.com/material-motion/streams-swift/milestones). + +Learn more about [our team](https://material-motion.github.io/material-motion/team/), +[our community](https://material-motion.github.io/material-motion/team/community/), and +our [contributor essentials](https://material-motion.github.io/material-motion/team/essentials/). + +## License + +Licensed under the Apache 2.0 license. See LICENSE for details. diff --git a/examples/ExampleViewController.swift b/examples/ExampleViewController.swift new file mode 100644 index 0000000..091a01d --- /dev/null +++ b/examples/ExampleViewController.swift @@ -0,0 +1,20 @@ +/* + Copyright 2016-present The Material Motion Authors. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +import UIKit + +class ExampleViewController: UIViewController { +} diff --git a/examples/apps/Catalog/Catalog.xcodeproj/project.pbxproj b/examples/apps/Catalog/Catalog.xcodeproj/project.pbxproj new file mode 100644 index 0000000..c690753 --- /dev/null +++ b/examples/apps/Catalog/Catalog.xcodeproj/project.pbxproj @@ -0,0 +1,422 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 664A5B771DD10D320082B5DF /* TableOfContents.swift in Sources */ = {isa = PBXBuildFile; fileRef = 664A5B761DD10D320082B5DF /* TableOfContents.swift */; }; + 664A5B791DD10D520082B5DF /* ExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 664A5B781DD10D520082B5DF /* ExampleViewController.swift */; }; + 666FAA841D384A6B000363DA /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 666FAA831D384A6B000363DA /* AppDelegate.swift */; }; + 666FAA8B1D384A6B000363DA /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 666FAA8A1D384A6B000363DA /* Assets.xcassets */; }; + 666FAA8E1D384A6B000363DA /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 666FAA8C1D384A6B000363DA /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 666FAA951D384A6B000363DA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 666FAA781D384A6B000363DA /* Project object */; + proxyType = 1; + remoteGlobalIDString = 666FAA7F1D384A6B000363DA; + remoteInfo = Catalog; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 664A5B761DD10D320082B5DF /* TableOfContents.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TableOfContents.swift; path = Catalog/TableOfContents.swift; sourceTree = ""; }; + 664A5B781DD10D520082B5DF /* ExampleViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExampleViewController.swift; sourceTree = ""; }; + 666FAA801D384A6B000363DA /* Catalog.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Catalog.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 666FAA831D384A6B000363DA /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = Catalog/AppDelegate.swift; sourceTree = ""; }; + 666FAA8A1D384A6B000363DA /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 666FAA8D1D384A6B000363DA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 666FAA8F1D384A6B000363DA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 666FAA941D384A6B000363DA /* UnitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UnitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 666FAA9A1D384A6B000363DA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = ../UnitTests/Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXGroup section */ + 666FAA771D384A6B000363DA = { + isa = PBXGroup; + children = ( + 664A5B761DD10D320082B5DF /* TableOfContents.swift */, + 666FAAA31D384B13000363DA /* examples */, + 666FAAA61D384B77000363DA /* catalog */, + 666FAA971D384A6B000363DA /* tests */, + 666FAA821D384A6B000363DA /* resources */, + 666FAA811D384A6B000363DA /* Products */, + ); + sourceTree = ""; + }; + 666FAA811D384A6B000363DA /* Products */ = { + isa = PBXGroup; + children = ( + 666FAA801D384A6B000363DA /* Catalog.app */, + 666FAA941D384A6B000363DA /* UnitTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 666FAA821D384A6B000363DA /* resources */ = { + isa = PBXGroup; + children = ( + 666FAAA51D384B5B000363DA /* catalog */, + 666FAAA41D384B52000363DA /* tests */, + ); + name = resources; + path = Catalog; + sourceTree = ""; + }; + 666FAA971D384A6B000363DA /* tests */ = { + isa = PBXGroup; + children = ( + ); + name = tests; + path = ../../../tests/unit; + sourceTree = ""; + }; + 666FAAA31D384B13000363DA /* examples */ = { + isa = PBXGroup; + children = ( + 664A5B781DD10D520082B5DF /* ExampleViewController.swift */, + ); + name = examples; + path = ../..; + sourceTree = ""; + }; + 666FAAA41D384B52000363DA /* tests */ = { + isa = PBXGroup; + children = ( + 666FAA9A1D384A6B000363DA /* Info.plist */, + ); + name = tests; + sourceTree = ""; + }; + 666FAAA51D384B5B000363DA /* catalog */ = { + isa = PBXGroup; + children = ( + 666FAA8A1D384A6B000363DA /* Assets.xcassets */, + 666FAA8C1D384A6B000363DA /* LaunchScreen.storyboard */, + 666FAA8F1D384A6B000363DA /* Info.plist */, + ); + name = catalog; + sourceTree = ""; + }; + 666FAAA61D384B77000363DA /* catalog */ = { + isa = PBXGroup; + children = ( + 666FAA831D384A6B000363DA /* AppDelegate.swift */, + ); + name = catalog; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 666FAA7F1D384A6B000363DA /* Catalog */ = { + isa = PBXNativeTarget; + buildConfigurationList = 666FAA9D1D384A6B000363DA /* Build configuration list for PBXNativeTarget "Catalog" */; + buildPhases = ( + 666FAA7C1D384A6B000363DA /* Sources */, + 666FAA7E1D384A6B000363DA /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Catalog; + productName = Catalog; + productReference = 666FAA801D384A6B000363DA /* Catalog.app */; + productType = "com.apple.product-type.application"; + }; + 666FAA931D384A6B000363DA /* UnitTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 666FAAA01D384A6B000363DA /* Build configuration list for PBXNativeTarget "UnitTests" */; + buildPhases = ( + 666FAA901D384A6B000363DA /* Sources */, + 666FAA921D384A6B000363DA /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 666FAA961D384A6B000363DA /* PBXTargetDependency */, + ); + name = UnitTests; + productName = CatalogTests; + productReference = 666FAA941D384A6B000363DA /* UnitTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 666FAA781D384A6B000363DA /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0730; + LastUpgradeCheck = 0800; + ORGANIZATIONNAME = Google; + TargetAttributes = { + 666FAA7F1D384A6B000363DA = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 0800; + }; + 666FAA931D384A6B000363DA = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 0800; + TestTargetID = 666FAA7F1D384A6B000363DA; + }; + }; + }; + buildConfigurationList = 666FAA7B1D384A6B000363DA /* Build configuration list for PBXProject "Catalog" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 666FAA771D384A6B000363DA; + productRefGroup = 666FAA811D384A6B000363DA /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 666FAA7F1D384A6B000363DA /* Catalog */, + 666FAA931D384A6B000363DA /* UnitTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 666FAA7E1D384A6B000363DA /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 666FAA8E1D384A6B000363DA /* LaunchScreen.storyboard in Resources */, + 666FAA8B1D384A6B000363DA /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 666FAA921D384A6B000363DA /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 666FAA7C1D384A6B000363DA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 666FAA841D384A6B000363DA /* AppDelegate.swift in Sources */, + 664A5B771DD10D320082B5DF /* TableOfContents.swift in Sources */, + 664A5B791DD10D520082B5DF /* ExampleViewController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 666FAA901D384A6B000363DA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 666FAA961D384A6B000363DA /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 666FAA7F1D384A6B000363DA /* Catalog */; + targetProxy = 666FAA951D384A6B000363DA /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 666FAA8C1D384A6B000363DA /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 666FAA8D1D384A6B000363DA /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 666FAA9B1D384A6B000363DA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + 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 = 8.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 666FAA9C1D384A6B000363DA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "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 = gnu99; + 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 = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 666FAA9E1D384A6B000363DA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = Catalog/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.google.Catalog; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; + }; + name = Debug; + }; + 666FAA9F1D384A6B000363DA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = Catalog/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.google.Catalog; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 3.0; + }; + name = Release; + }; + 666FAAA11D384A6B000363DA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CLANG_ENABLE_MODULES = YES; + INFOPLIST_FILE = UnitTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.google.CatalogTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Catalog.app/Catalog"; + }; + name = Debug; + }; + 666FAAA21D384A6B000363DA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CLANG_ENABLE_MODULES = YES; + INFOPLIST_FILE = UnitTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.google.CatalogTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 3.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Catalog.app/Catalog"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 666FAA7B1D384A6B000363DA /* Build configuration list for PBXProject "Catalog" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 666FAA9B1D384A6B000363DA /* Debug */, + 666FAA9C1D384A6B000363DA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 666FAA9D1D384A6B000363DA /* Build configuration list for PBXNativeTarget "Catalog" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 666FAA9E1D384A6B000363DA /* Debug */, + 666FAA9F1D384A6B000363DA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 666FAAA01D384A6B000363DA /* Build configuration list for PBXNativeTarget "UnitTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 666FAAA11D384A6B000363DA /* Debug */, + 666FAAA21D384A6B000363DA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 666FAA781D384A6B000363DA /* Project object */; +} diff --git a/examples/apps/Catalog/Catalog.xcodeproj/xcshareddata/xcschemes/Catalog.xcscheme b/examples/apps/Catalog/Catalog.xcodeproj/xcshareddata/xcschemes/Catalog.xcscheme new file mode 100644 index 0000000..035fb09 --- /dev/null +++ b/examples/apps/Catalog/Catalog.xcodeproj/xcshareddata/xcschemes/Catalog.xcscheme @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/apps/Catalog/Catalog.xcodeproj/xcshareddata/xcschemes/UnitTests.xcscheme b/examples/apps/Catalog/Catalog.xcodeproj/xcshareddata/xcschemes/UnitTests.xcscheme new file mode 100644 index 0000000..b09521c --- /dev/null +++ b/examples/apps/Catalog/Catalog.xcodeproj/xcshareddata/xcschemes/UnitTests.xcscheme @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/apps/Catalog/Catalog/AppDelegate.swift b/examples/apps/Catalog/Catalog/AppDelegate.swift new file mode 100644 index 0000000..2977093 --- /dev/null +++ b/examples/apps/Catalog/Catalog/AppDelegate.swift @@ -0,0 +1,36 @@ +/* + Copyright 2016-present The Material Motion Authors. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +import UIKit +import CatalogByConvention + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool { + let window = UIWindow(frame: UIScreen.main.bounds) + self.window = window + + let rootViewController = CBCNodeListViewController(node: CBCCreateNavigationTree()) + rootViewController.title = "Material Motion streams for Apple devices" + window.rootViewController = UINavigationController(rootViewController: rootViewController) + + window.makeKeyAndVisible() + return true + } +} diff --git a/examples/apps/Catalog/Catalog/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/apps/Catalog/Catalog/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..eeea76c --- /dev/null +++ b/examples/apps/Catalog/Catalog/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,73 @@ +{ + "images" : [ + { + "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" : "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" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/examples/apps/Catalog/Catalog/Base.lproj/LaunchScreen.storyboard b/examples/apps/Catalog/Catalog/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..2e721e1 --- /dev/null +++ b/examples/apps/Catalog/Catalog/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/apps/Catalog/Catalog/Info.plist b/examples/apps/Catalog/Catalog/Info.plist new file mode 100644 index 0000000..eabb3ae --- /dev/null +++ b/examples/apps/Catalog/Catalog/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/examples/apps/Catalog/Catalog/TableOfContents.swift b/examples/apps/Catalog/Catalog/TableOfContents.swift new file mode 100644 index 0000000..5965aa0 --- /dev/null +++ b/examples/apps/Catalog/Catalog/TableOfContents.swift @@ -0,0 +1,23 @@ +/* + Copyright 2016-present The Material Motion Authors. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +// MARK: Catalog by convention + +extension ExampleViewController { + class func catalogBreadcrumbs() -> [String] { + return ["Example"] + } +} diff --git a/examples/apps/Catalog/UnitTests/Info.plist b/examples/apps/Catalog/UnitTests/Info.plist new file mode 100644 index 0000000..ba72822 --- /dev/null +++ b/examples/apps/Catalog/UnitTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + +