Skip to content

Commit

Permalink
Added carthage support for accessibility core (#131)
Browse files Browse the repository at this point in the history
* Adds support for installing AccessibilitySnapshotCore through Carthage
* Added Carthage build job to CI

---------

Co-authored-by: Andrei Uriadov <andrei.uriadov@zalando.de>
  • Loading branch information
a-25 and Andrei Uriadov authored Aug 10, 2023
1 parent fa481ff commit 5eff4aa
Show file tree
Hide file tree
Showing 7 changed files with 809 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,17 @@ jobs:
run: sudo xcode-select --switch /Applications/Xcode_12.5.1.app/Contents/Developer
- name: Build
run: Scripts/build.swift spm ${{ matrix.platform }}
carthage:
name: Carthage Build
runs-on: macOS-11
strategy:
matrix:
platform: ['iOS_14']
fail-fast: false
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Select Xcode Version (12.5.1)
run: sudo xcode-select --switch /Applications/Xcode_12.5.1.app/Contents/Developer
- name: Build
run: Scripts/build.swift carthage ${{ matrix.platform }}
9 changes: 9 additions & 0 deletions Scripts/build.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,16 @@ enum Platform: String, CustomStringConvertible {
enum Task: String, CustomStringConvertible {
case spm
case xcode
case carthage

var workspace: String? {
switch self {
case .spm:
return nil
case .xcode:
return "Example/AccessibilitySnapshot.xcworkspace"
case .carthage:
return nil
}
}

Expand All @@ -86,6 +89,8 @@ enum Task: String, CustomStringConvertible {
return nil
case .xcode:
return nil
case .carthage:
return "Sources/AccessibilitySnapshotCore.xcodeproj"
}
}

Expand All @@ -95,6 +100,8 @@ enum Task: String, CustomStringConvertible {
return "AccessibilitySnapshot"
case .xcode:
return "AccessibilitySnapshotDemo"
case .carthage:
return "AccessibilitySnapshotCore"
}
}

Expand All @@ -104,6 +111,8 @@ enum Task: String, CustomStringConvertible {
return false
case .xcode:
return true
case .carthage:
return false
}
}

Expand Down
675 changes: 675 additions & 0 deletions Sources/AccessibilitySnapshotCore.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?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>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1420"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EF4D51EE2A55A51D00FF0E46"
BuildableName = "AccessibilitySnapshotCore.framework"
BlueprintName = "AccessibilitySnapshotCore"
ReferencedContainer = "container:AccessibilitySnapshotCore.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</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">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EF4D51EE2A55A51D00FF0E46"
BuildableName = "AccessibilitySnapshotCore.framework"
BlueprintName = "AccessibilitySnapshotCore"
ReferencedContainer = "container:AccessibilitySnapshotCore.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
29 changes: 29 additions & 0 deletions Sources/AccessibilitySnapshotCore/AccessibilitySnapshotCore.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//
// Copyright 2023 Block Inc.
//
// 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 <Foundation/Foundation.h>

//! Project version number for AccessibilitySnapshotCore.
FOUNDATION_EXPORT double AccessibilitySnapshotCoreVersionNumber;

//! Project version string for AccessibilitySnapshotCore.
FOUNDATION_EXPORT const unsigned char AccessibilitySnapshotCoreVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <AccessibilitySnapshotCore/PublicHeader.h>

#import "UIApplication+DynamicTypeSnapshotting.h"
#import "UIView+DynamicTypeSnapshotting.h"
#import "UIAccessibilityStatusUtility.h"

0 comments on commit 5eff4aa

Please sign in to comment.