Skip to content

Commit

Permalink
Add support for visionOS (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
calda authored Jan 22, 2024
1 parent 9679025 commit ff7dda2
Show file tree
Hide file tree
Showing 28 changed files with 255 additions and 1,317 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Setup
description: Setup the Lottie iOS CI Environment
description: Setup the Lottie SPM CI Environment
inputs:
xcode:
description: The version of Xcode to select
Expand Down
45 changes: 36 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,45 +7,72 @@ on:
branches: [ main ]

jobs:
Test-package-macos-12:
test-package-excluding-visionOS:
name: "Test Package"
runs-on: macos-12
runs-on: macos-13
strategy:
fail-fast: false
matrix:
xcode:
- '13.4.1' # Swift 5.6
- '14.2' # Swift 5.7
- '14.3' # Swift 5.8
- '15.0' # Swift 5.9
- '15.1' # Swift 5.9
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/setup
with:
xcode: ${{ matrix.xcode }}
- name: Build Package
run: bundle exec rake test:package:all
run: SKIP_VISION_OS=true bundle exec rake test:package:all

Test-package-macos-13:
test-package-macos-13:
name: "Test Package"
runs-on: macos-13
strategy:
fail-fast: false
matrix:
xcode:
- '15.2' # Swift 5.9, first version with visionOS support
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/setup
with:
xcode: ${{ matrix.xcode }}
- name: Build Package
run: bundle exec rake test:package:all

build-example-excluding-visionOS:
name: "Build Example App"
runs-on: macos-13
strategy:
fail-fast: false
matrix:
xcode:
- '14.2' # Swift 5.7
- '14.3' # Swift 5.8
- '15.0' # Swift 5.9
- '15.1' # Swift 5.9
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/setup
with:
xcode: ${{ matrix.xcode }}
- name: Build Package
run: bundle exec rake test:package:all
- name: Build Example
run: SKIP_VISION_OS=true bundle exec rake build:example:github_actions

build-example:
build-example-macos-13:
name: "Build Example App"
runs-on: macos-12
runs-on: macos-13
strategy:
fail-fast: false
matrix:
xcode:
- '15.2' # Swift 5.9, first version with visionOS support
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/setup
with:
xcode: ${{ matrix.xcode }}
- name: Build Example
run: bundle exec rake build:example:github_actions
362 changes: 97 additions & 265 deletions Example/Example.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1420"
version = "1.3">
LastUpgradeVersion = "1500"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
Expand All @@ -14,9 +14,9 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2E70923D29968FC300E3F0B7"
BuildableName = "Example (macOS).app"
BlueprintName = "Example (macOS)"
BlueprintIdentifier = "08CB607A2AB127E10059AF6F"
BuildableName = "Example.app"
BlueprintName = "Example"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</BuildActionEntry>
Expand All @@ -26,9 +26,8 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -44,9 +43,9 @@
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2E70923D29968FC300E3F0B7"
BuildableName = "Example (macOS).app"
BlueprintName = "Example (macOS)"
BlueprintIdentifier = "08CB607A2AB127E10059AF6F"
BuildableName = "Example.app"
BlueprintName = "Example"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
Expand All @@ -61,9 +60,9 @@
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2E70923D29968FC300E3F0B7"
BuildableName = "Example (macOS).app"
BlueprintName = "Example (macOS)"
BlueprintIdentifier = "08CB607A2AB127E10059AF6F"
BuildableName = "Example.app"
BlueprintName = "Example"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"images" : [
{
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
},
{
"idiom" : "mac",
"scale" : "1x",
Expand Down
File renamed without changes.
18 changes: 18 additions & 0 deletions Example/Example/ContentView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Created by Cal Stephens on 9/12/23.
// Copyright © 2023 Airbnb Inc. All rights reserved.

import SwiftUI
import Lottie

struct ContentView: View {
var body: some View {
VStack {
Spacer()
Text("lottie-spm")
Spacer()

LottieView(animation: .named("LottieLogo1"))
.playing(loopMode: .loop)
}
}
}
File renamed without changes.
13 changes: 13 additions & 0 deletions Example/Example/ExampleApp.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Created by Cal Stephens on 9/12/23.
// Copyright © 2023 Airbnb Inc. All rights reserved.

import SwiftUI

@main
struct ExampleApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
File renamed without changes.
16 changes: 0 additions & 16 deletions Example/iOS/AppDelegate.swift

This file was deleted.

13 changes: 0 additions & 13 deletions Example/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json

This file was deleted.

25 changes: 0 additions & 25 deletions Example/iOS/Base.lproj/LaunchScreen.storyboard

This file was deleted.

24 changes: 0 additions & 24 deletions Example/iOS/Base.lproj/Main.storyboard

This file was deleted.

10 changes: 0 additions & 10 deletions Example/iOS/Example (iOS).entitlements

This file was deleted.

Loading

0 comments on commit ff7dda2

Please sign in to comment.