Skip to content

Commit

Permalink
Merge pull request #1 from cats-oss/other-platform
Browse files Browse the repository at this point in the history
Support tvOS and macOS
  • Loading branch information
Fumito Nakazawa authored Jul 4, 2018
2 parents ee45bd1 + 0e1bb18 commit 76b79ce
Show file tree
Hide file tree
Showing 17 changed files with 907 additions and 51 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

.DS_Store

## Build generated
build/
DerivedData/
Expand Down
27 changes: 21 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,25 @@
<img src="./resources/logo.png" alt="Sica" width="70%" height="70%" />
</p>

[![Platform](http://img.shields.io/badge/platform-ios-blue.svg?style=flat)](https://developer.apple.com/iphone/index.action)
[![Language](http://img.shields.io/badge/language-swift-brightgreen.svg?style=flat)](https://developer.apple.com/swift)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![Swift Package Manager compatible](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager)
[![Version](https://img.shields.io/cocoapods/v/Sica.svg?style=flat)](https://cocoapods.org/pods/Sica)
[![License](https://img.shields.io/cocoapods/l/Sica.svg?style=flat)](https://cocoapods.org/pods/Sica)
<p align="center">
<img src="http://img.shields.io/badge/platform-ios | tvOS | macOS-blue.svg?style=flat" alt="Platform" />
<a href="https://developer.apple.com/swift">
<img src="http://img.shields.io/badge/language-swift-brightgreen.svg?style=flat" alt="Language" />
</a>
<a href="https://github.com/Carthage/Carthage">
<img src="https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat" alt="Carthage" />
</a>
<br />
<a href="https://github.com/apple/swift-package-manager">
<img src="https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat" alt="Swift Package Manager" />
</a>
<a href="https://cocoapods.org/pods/Sica">
<img src="https://img.shields.io/cocoapods/v/Sica.svg?style=flat" alt="Version" />
</a>
<a href="https://cocoapods.org/pods/Sica">
<img src="https://img.shields.io/cocoapods/l/Sica.svg?style=flat" alt="License" />
</a>
</p>

Sica can execute various animations sequentially or parallely.

Expand All @@ -22,6 +35,8 @@ Sica can execute various animations sequentially or parallely.
## Requirements
- Xcode 9.3
- iOS 9 or greater
- tvOS 10.0 or greater
- macOS 10.11 or greater


## Installation
Expand Down
6 changes: 4 additions & 2 deletions Sica.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@

Pod::Spec.new do |s|
s.name = "Sica"
s.version = "0.1.0"
s.version = "0.2.0"
s.summary = "Sica can execute various animations sequentially or parallely"
s.homepage = "https://github.com/cats-oss/Sica"
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "funzin" => "nakazawa_fumito@abema.tv" }
s.platform = :ios, "9.0"
s.ios.deployment_target = "9.0"
s.tvos.deployment_target = "10.0"
s.osx.deployment_target = "10.11"
s.source = { :git => "https://github.com/cats-oss/Sica.git", :tag => "#{s.version}" }
s.source_files = "Sica/**/*.{swift}"
s.swift_version = '4.1'
Expand Down
586 changes: 555 additions & 31 deletions Sica.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "D4A60FE220ABC9890079871A"
BuildableName = "Sica.framework"
BlueprintName = "Sica"
BlueprintName = "Sica-iOS"
ReferencedContainer = "container:Sica.xcodeproj">
</BuildableReference>
</BuildActionEntry>
Expand All @@ -34,7 +34,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "D4A60FEB20ABC9890079871A"
BuildableName = "SicaTests.xctest"
BlueprintName = "SicaTests"
BlueprintName = "SicaTests-iOS"
ReferencedContainer = "container:Sica.xcodeproj">
</BuildableReference>
</TestableReference>
Expand All @@ -44,7 +44,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "D4A60FE220ABC9890079871A"
BuildableName = "Sica.framework"
BlueprintName = "Sica"
BlueprintName = "Sica-iOS"
ReferencedContainer = "container:Sica.xcodeproj">
</BuildableReference>
</MacroExpansion>
Expand All @@ -66,7 +66,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "D4A60FE220ABC9890079871A"
BuildableName = "Sica.framework"
BlueprintName = "Sica"
BlueprintName = "Sica-iOS"
ReferencedContainer = "container:Sica.xcodeproj">
</BuildableReference>
</MacroExpansion>
Expand All @@ -84,7 +84,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "D4A60FE220ABC9890079871A"
BuildableName = "Sica.framework"
BlueprintName = "Sica"
BlueprintName = "Sica-iOS"
ReferencedContainer = "container:Sica.xcodeproj">
</BuildableReference>
</MacroExpansion>
Expand Down
99 changes: 99 additions & 0 deletions Sica.xcodeproj/xcshareddata/xcschemes/Sica-macOS.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0930"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9D436C3020E9E4DD00A1B938"
BuildableName = "Sica.framework"
BlueprintName = "Sica-macOS"
ReferencedContainer = "container:Sica.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9D436C6220E9EA1E00A1B938"
BuildableName = "SicaTests.xctest"
BlueprintName = "SicaTests-macOS"
ReferencedContainer = "container:Sica.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9D436C3020E9E4DD00A1B938"
BuildableName = "Sica.framework"
BlueprintName = "Sica-macOS"
ReferencedContainer = "container:Sica.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9D436C3020E9E4DD00A1B938"
BuildableName = "Sica.framework"
BlueprintName = "Sica-macOS"
ReferencedContainer = "container:Sica.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9D436C3020E9E4DD00A1B938"
BuildableName = "Sica.framework"
BlueprintName = "Sica-macOS"
ReferencedContainer = "container:Sica.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
99 changes: 99 additions & 0 deletions Sica.xcodeproj/xcshareddata/xcschemes/Sica-tvOS.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0930"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9D436C4220E9E71900A1B938"
BuildableName = "Sica.framework"
BlueprintName = "Sica-tvOS"
ReferencedContainer = "container:Sica.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9D436C5420E9E8F200A1B938"
BuildableName = "SicaTests.xctest"
BlueprintName = "SicaTests-tvOS"
ReferencedContainer = "container:Sica.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9D436C4220E9E71900A1B938"
BuildableName = "Sica.framework"
BlueprintName = "Sica-tvOS"
ReferencedContainer = "container:Sica.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9D436C4220E9E71900A1B938"
BuildableName = "Sica.framework"
BlueprintName = "Sica-tvOS"
ReferencedContainer = "container:Sica.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9D436C4220E9E71900A1B938"
BuildableName = "Sica.framework"
BlueprintName = "Sica-tvOS"
ReferencedContainer = "container:Sica.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
File renamed without changes.
24 changes: 24 additions & 0 deletions Sica/Resource/Info-macOS.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?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>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
24 changes: 24 additions & 0 deletions Sica/Resource/Info-tvOS.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?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>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
6 changes: 6 additions & 0 deletions Sica/Sica.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
// Copyright © 2018年 中澤 郁斗. All rights reserved.
//

#import "TargetConditionals.h"

#if TARGET_OS_OSX
#import <AppKit/AppKit.h>
#else
#import <UIKit/UIKit.h>
#endif

//! Project version number for Sica.
FOUNDATION_EXPORT double SicaVersionNumber;
Expand Down
6 changes: 4 additions & 2 deletions Sica/Source/AnimationKeyPaths.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
// Copyright © 2018年 中澤 郁斗. All rights reserved.
//

#if os(iOS)
#if os(iOS) || os(tvOS)
import UIKit
#elseif os(macOS)
import AppKit
#endif

open class AnimationKeyPaths {
fileprivate init() {}
Expand Down Expand Up @@ -129,4 +132,3 @@ extension AnimationKeyPaths {
public static let transformTranslationY = AnimationKeyPath<CGFloat>(keyPath: "transform.translation.y")
public static let transformTranslationZ = AnimationKeyPath<CGFloat>(keyPath: "transform.translation.z")
}
#endif
Loading

0 comments on commit 76b79ce

Please sign in to comment.