Skip to content

Commit

Permalink
Replace ParalayoutStudio with new demo app
Browse files Browse the repository at this point in the history
ParalayoutStudio, the old sample code for experimenting with Paralayout, was primarily focused on functionality around Label, which is being removed from the framework (square#19). The project was also outdated (lacked support for iPhone X even) and was not set up with a dependency manager, which made adding snapshot tests difficult.

This replaces ParalayoutStudio with a new demo app that uses CocoaPods for dependency management (which inherently tests our CocoaPods integration) and includes a test suite set up to run snapshot tests. My plan is to use this demo app both as a way to show how Paralayout can be used and as a form of integration tests. It currently only has the skeleton for this new design, but it should be easy to add new sample screens. I've added a basic snapshot test for view spreading to kick off building out the snapshot test suite.
  • Loading branch information
NickEntin committed Mar 20, 2021
1 parent bc9781b commit c83ed91
Show file tree
Hide file tree
Showing 32 changed files with 1,221 additions and 1,361 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Expand Up @@ -17,15 +17,17 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Select Xcode Version (12.2)
run: sudo xcode-select --switch /Applications/Xcode_12.2.app/Contents/Developer
- name: Select Xcode Version (12.4)
run: sudo xcode-select --switch /Applications/Xcode_12.4.app/Contents/Developer
if: matrix.platform == 'iOS_14'
- name: Select Xcode Version (11.6)
run: sudo xcode-select --switch /Applications/Xcode_11.6.app/Contents/Developer
if: matrix.platform == 'iOS_13'
- name: Select Xcode Version (10.3)
run: sudo xcode-select --switch /Applications/Xcode_10.3.app/Contents/Developer
if: matrix.platform == 'iOS_12'
- name: Pod Install
run: bundle exec pod install --project-directory=Example
- name: Build and Test
run: Scripts/build.swift xcode ${{ matrix.platform }} `which xcpretty`
pod-lint:
Expand Down Expand Up @@ -53,6 +55,6 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Select Xcode Version (12.2)
run: sudo xcode-select --switch /Applications/Xcode_12.2.app/Contents/Developer
run: sudo xcode-select --switch /Applications/Xcode_12.4.app/Contents/Developer
- name: Build
run: Scripts/build.swift spm ${{ matrix.platform }} `which xcpretty`
26 changes: 21 additions & 5 deletions .gitignore
@@ -1,5 +1,7 @@
# Xcode
# macOS
.DS_Store

# Xcode
build/
*.pbxuser
!default.pbxuser
Expand All @@ -9,10 +11,24 @@ build/
!default.mode2v3
*.perspectivev3
!default.perspectivev3
*.xcworkspace
!default.xcworkspace
*xcuserdata
xcuserdata/
*.xccheckout
profile
*.moved-aside
DerivedData
.idea/
*.hmap
*.ipa

# Bundler
.bundle

# Carthage
Carthage/Build

# CocoaPods
Pods/

# Swift Package Manager
generated/
.build/
.swiftpm/
584 changes: 584 additions & 0 deletions Example/ParalayoutDemo.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.

@@ -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>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1220"
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -14,10 +14,10 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D0624F701EDF8C3F00076663"
BlueprintIdentifier = "3BBDCF40C2737919EB5CFEC512245B07"
BuildableName = "Paralayout.framework"
BlueprintName = "Paralayout"
ReferencedContainer = "container:Paralayout.xcodeproj">
ReferencedContainer = "container:Pods/Pods.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
Expand All @@ -27,26 +27,7 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D0624F701EDF8C3F00076663"
BuildableName = "Paralayout.framework"
BlueprintName = "Paralayout"
ReferencedContainer = "container:Paralayout.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D0624FC31EDFA1AE00076663"
BuildableName = "ParalayoutTests.xctest"
BlueprintName = "ParalayoutTests"
ReferencedContainer = "container:Paralayout.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
Expand All @@ -59,15 +40,6 @@
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D0624F701EDF8C3F00076663"
BuildableName = "Paralayout.framework"
BlueprintName = "Paralayout"
ReferencedContainer = "container:Paralayout.xcodeproj">
</BuildableReference>
</MacroExpansion>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand All @@ -78,10 +50,10 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D0624F701EDF8C3F00076663"
BlueprintIdentifier = "3BBDCF40C2737919EB5CFEC512245B07"
BuildableName = "Paralayout.framework"
BlueprintName = "Paralayout"
ReferencedContainer = "container:Paralayout.xcodeproj">
ReferencedContainer = "container:Pods/Pods.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
Expand Down
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1220"
LastUpgradeVersion = "1240"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -14,10 +14,24 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D049FD7F1ECA7BC4009BEF98"
BuildableName = "ParalayoutStudio.app"
BlueprintName = "ParalayoutStudio"
ReferencedContainer = "container:Paralayout.xcodeproj">
BlueprintIdentifier = "3D0BEEAA26047F6400C728FA"
BuildableName = "ParalayoutDemo.app"
BlueprintName = "ParalayoutDemo"
ReferencedContainer = "container:ParalayoutDemo.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4B818F7D36C29DC78C53B2BF4FF5251F"
BuildableName = "Paralayout-Unit-Tests.xctest"
BlueprintName = "Paralayout-Unit-Tests"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
Expand All @@ -27,24 +41,25 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D049FD7F1ECA7BC4009BEF98"
BuildableName = "ParalayoutStudio.app"
BlueprintName = "ParalayoutStudio"
ReferencedContainer = "container:Paralayout.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D0624FC31EDFA1AE00076663"
BuildableName = "ParalayoutTests.xctest"
BlueprintName = "ParalayoutTests"
ReferencedContainer = "container:Paralayout.xcodeproj">
BlueprintIdentifier = "3D0BEED02604854C00C728FA"
BuildableName = "ParalayoutSnapshotTests.xctest"
BlueprintName = "ParalayoutSnapshotTests"
ReferencedContainer = "container:ParalayoutDemo.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4B818F7D36C29DC78C53B2BF4FF5251F"
BuildableName = "Paralayout-Unit-Tests.xctest"
BlueprintName = "Paralayout-Unit-Tests"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
Expand All @@ -63,10 +78,10 @@
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D049FD7F1ECA7BC4009BEF98"
BuildableName = "ParalayoutStudio.app"
BlueprintName = "ParalayoutStudio"
ReferencedContainer = "container:Paralayout.xcodeproj">
BlueprintIdentifier = "3D0BEEAA26047F6400C728FA"
BuildableName = "ParalayoutDemo.app"
BlueprintName = "ParalayoutDemo"
ReferencedContainer = "container:ParalayoutDemo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
Expand All @@ -80,10 +95,10 @@
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D049FD7F1ECA7BC4009BEF98"
BuildableName = "ParalayoutStudio.app"
BlueprintName = "ParalayoutStudio"
ReferencedContainer = "container:Paralayout.xcodeproj">
BlueprintIdentifier = "3D0BEEAA26047F6400C728FA"
BuildableName = "ParalayoutDemo.app"
BlueprintName = "ParalayoutDemo"
ReferencedContainer = "container:ParalayoutDemo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
Expand Down
10 changes: 10 additions & 0 deletions Example/ParalayoutDemo.xcworkspace/contents.xcworkspacedata

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

@@ -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>
32 changes: 32 additions & 0 deletions Example/ParalayoutDemo/AppDelegate.swift
@@ -0,0 +1,32 @@
//
// AppDelegate.swift
// ParalayoutDemo
//
// Created by Nicholas Entin on 3/18/21.
//

import UIKit

@main
final class AppDelegate: UIResponder, UIApplicationDelegate {

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}

func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}

func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}


}

@@ -0,0 +1,11 @@
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

0 comments on commit c83ed91

Please sign in to comment.