Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
dan424gg committed Dec 5, 2023
2 parents c6d4c90 + 80b55fd commit ee2ce48
Show file tree
Hide file tree
Showing 44 changed files with 1,934 additions and 751 deletions.
Binary file removed .DS_Store
Binary file not shown.
44 changes: 44 additions & 0 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: iOS starter workflow

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
name: Build and Test default scheme using any available iPhone simulator
runs-on: macos-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set Default Scheme
run: |
scheme_list=$(xcodebuild -list -json | tr -d "\n")
default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]")
echo $default | cat >default
echo Using default scheme: $default
- name: Build
env:
scheme: ${{ 'default' }}
platform: ${{ 'iOS Simulator' }}
run: |
# xcrun xctrace returns via stderr, not the expected stdout (see https://developer.apple.com/forums/thread/663959)
device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}' | sed -e "s/ Simulator$//"`
if [ $scheme = default ]; then scheme=$(cat default); fi
if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi
file_to_build=`echo $file_to_build | awk '{$1=$1;print}'`
xcodebuild build-for-testing -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,name=$device"
- name: Test
env:
scheme: ${{ 'default' }}
platform: ${{ 'iOS Simulator' }}
run: |
# xcrun xctrace returns via stderr, not the expected stdout (see https://developer.apple.com/forums/thread/663959)
device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}' | sed -e "s/ Simulator$//"`
if [ $scheme = default ]; then scheme=$(cat default); fi
if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi
file_to_build=`echo $file_to_build | awk '{$1=$1;print}'`
xcodebuild test-without-building -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,name=$device"
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

.DS_Store

## User settings
xcuserdata/
Cards.xcodeproj/project.xcworkspace/xcuserdata/
*.plist

## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
Expand Down
21 changes: 21 additions & 0 deletions Cards-Bridging-Header.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//
// Cards-Bridging-Header.h
// EarlGrey
//
// Created by Daniel Wells on 11/27/23.
//

#ifndef Cards_Bridging_Header_h
#define Cards_Bridging_Header_h

#import "../eDistantObject/Channel/Sources/EDOHostPort.h"
#import "AppFramework/Action/GREYAction.h"
#import "AppFramework/Action/GREYActionBlock.h"
#import "AppFramework/Action/GREYActions.h"
#import "CommonLib/DistantObject/GREYHostApplicationDistantObject.h"
#import "CommonLib/Matcher/GREYElementMatcherBlock.h"
#import "CommonLib/Matcher/GREYMatcher.h"
#import "TestLib/AlertHandling/XCTestCase+GREYSystemAlertHandler.h"
#import "TestLib/EarlGrey.h"

#endif /* Cards_Bridging_Header_h */
281 changes: 262 additions & 19 deletions Cards.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

This file was deleted.

Binary file not shown.
11 changes: 11 additions & 0 deletions Cards.xcodeproj/xcshareddata/xcschemes/Cards.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@
ReferencedContainer = "container:Cards.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1E114CC42B151B8B00503368"
BuildableName = "EarlGreyTests.xctest"
BlueprintName = "EarlGreyTests"
ReferencedContainer = "container:Cards.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,22 @@
uuid = "52D84923-A4D3-49DB-B62A-CB6DDE57D9AC"
type = "1"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "6F341A58-BBFC-4853-BC7A-23992093E7F4"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Cards/views/LoadingScreen.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "70"
endingLineNumber = "70"
landmarkName = "equalNumOfPlayersOnTeam(players:)"
landmarkType = "9">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@
ReferencedContainer = "container:Cards.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1E114CC42B151B8B00503368"
BuildableName = "EarlGreyTests.xctest"
BlueprintName = "EarlGreyTests"
ReferencedContainer = "container:Cards.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,17 @@
ReferencedContainer = "container:Cards.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1E114CC42B151B8B00503368"
BuildableName = "EarlGreyTests.xctest"
BlueprintName = "EarlGreyTests"
ReferencedContainer = "container:Cards.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,38 @@
<key>Cards.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>2</integer>
<integer>4</integer>
</dict>
<key>Copy of Cards.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
<integer>1</integer>
</dict>
<key>Copy of Copy of Cards.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
<integer>3</integer>
</dict>
<key>Promises (Playground) 1.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>4</integer>
<integer>9</integer>
</dict>
<key>Promises (Playground) 2.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>5</integer>
<integer>10</integer>
</dict>
<key>Promises (Playground).xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>3</integer>
<integer>8</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
Expand Down
2 changes: 1 addition & 1 deletion Cards/CardsApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class AppDelegate: NSObject, UIApplicationDelegate {
struct CardsApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var delegate
@StateObject private var firebaseHelper = FirebaseHelper()

var body: some Scene {
WindowGroup {
ContentView()
Expand Down
4 changes: 2 additions & 2 deletions Cards/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
import SwiftUI

struct ContentView: View {
@EnvironmentObject var firebaseHelper: FirebaseHelper
@State var universalClicked = "A game"
var body: some View {
NavigationView {
NavigationStack {
VStack {
Text("What game do you want to play??")
GameButton(universalClicked: $universalClicked, gameName: "cribbage")
GameButton(universalClicked: $universalClicked, gameName: "uno")
GameButton(universalClicked: $universalClicked, gameName: "rummy")
}
.buttonStyle(.bordered)
}
}
}
Expand Down
Loading

0 comments on commit ee2ce48

Please sign in to comment.