diff --git a/.gitignore b/.gitignore index 330d167..d44b341 100644 --- a/.gitignore +++ b/.gitignore @@ -88,3 +88,9 @@ fastlane/test_output # https://github.com/johnno1962/injectionforxcode iOSInjectionProject/ + +# Environment +# +# Ignore macOS environment items + +.DS_Store diff --git a/CollectSomeMore.xcodeproj/xcuserdata/ajolicoeur.xcuserdatad/xcschemes/xcschememanagement.plist b/CollectSomeMore.xcodeproj/xcuserdata/ajolicoeur.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index b9301ed..0000000 --- a/CollectSomeMore.xcodeproj/xcuserdata/ajolicoeur.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,14 +0,0 @@ - - - - - SchemeUserState - - CollectSomeMore.xcscheme_^#shared#^_ - - orderHint - 0 - - - - diff --git a/CollectSomeMore/Assets.xcassets/AccentColor.colorset/Contents.json b/CollectSomeMore/Assets.xcassets/AccentColor.colorset/Contents.json index eb87897..482ab8c 100644 --- a/CollectSomeMore/Assets.xcassets/AccentColor.colorset/Contents.json +++ b/CollectSomeMore/Assets.xcassets/AccentColor.colorset/Contents.json @@ -1,6 +1,33 @@ { "colors" : [ { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0.600", + "green" : "0.200", + "red" : "0.000" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "1.000", + "green" : "0.800", + "red" : "0.600" + } + }, "idiom" : "universal" } ], diff --git a/CollectSomeMore/Assets.xcassets/AppIcon.appiconset/AppIcon_GamesAndThings_iOS.png b/CollectSomeMore/Assets.xcassets/AppIcon.appiconset/AppIcon_GamesAndThings_iOS.png new file mode 100644 index 0000000..49dfe51 Binary files /dev/null and b/CollectSomeMore/Assets.xcassets/AppIcon.appiconset/AppIcon_GamesAndThings_iOS.png differ diff --git a/CollectSomeMore/Assets.xcassets/AppIcon.appiconset/Contents.json b/CollectSomeMore/Assets.xcassets/AppIcon.appiconset/Contents.json index 13613e3..e5faee6 100644 --- a/CollectSomeMore/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/CollectSomeMore/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,6 +1,7 @@ { "images" : [ { + "filename" : "AppIcon_GamesAndThings_iOS.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" diff --git a/CollectSomeMore/CollectSomeMoreApp.swift b/CollectSomeMore/CollectSomeMoreApp.swift index d689638..ba25ca0 100644 --- a/CollectSomeMore/CollectSomeMoreApp.swift +++ b/CollectSomeMore/CollectSomeMoreApp.swift @@ -1,6 +1,6 @@ // -// CollectSomeMoreApp.swift -// CollectSomeMore +// Gamesandthings.swift +// Games and Things - tracking your collections across gaming genres. // // Created by Adam Jolicoeur on 6/7/24. // @@ -9,7 +9,7 @@ import SwiftUI import SwiftData @main -struct CollectSomeMoreApp: App { +struct GamesAndThings: App { var sharedModelContainer: ModelContainer = { let schema = Schema([ Movie.self, diff --git a/CollectSomeMore/Comics.swift b/CollectSomeMore/Comics.swift new file mode 100644 index 0000000..fad17d7 --- /dev/null +++ b/CollectSomeMore/Comics.swift @@ -0,0 +1,128 @@ +// +// ComicsData.swift +// GamesAndThings +// +// Created by Adam Jolicoeur on 7/2/24. +// + +import SwiftUI + +// Step 1: Define a comics Model +struct Comic: Identifiable { + let id = UUID() + let title: String + let genre: String + let description: String +} + +// Step 2: Extend the ComicsViewModel +class ComicViewModel: ObservableObject { + @Published var comic: [Comic] = [ + Comic(title: "Inception", genre: "Science Fiction", description: "A thief who steals corporate secrets through the use of dream-sharing technology is given the inverse task of planting an idea into the mind of a CEO."), + Comic(title: "The Shawshank Redemption", genre: "Drama", description: "Two imprisoned men bond over a number of years, finding solace and eventual redemption through acts of common decency."), + Comic(title: "The Dark Knight", genre: "Action", description: "When the menace known as the Joker emerges from his mysterious past, he wreaks havoc and chaos on the people of Gotham."), + ] + + // Method to add a new comic + func addComic(title: String, genre: String, description: String) { + let newComic = Comic(title: title, genre: genre, description: description) + comic.append(newComic) + } +} + +// Step 3: Build the ComicView +struct ComicView: View { + var comic: Comic + + var body: some View { + VStack(alignment: .leading, spacing: 10) { +// Text(comic.title) +// .font(.headline) +// .foregroundColor(.primary) + Label("Genre: \(comic.genre)", systemImage: "popcorn") + .labelStyle(.titleAndIcon) + .font(.subheadline) +// Text("Genre: \(comic.genre)") +// .font(.subheadline) +// .foregroundColor(.secondary) + + Text(comic.description) + .font(.body) + .foregroundColor(.secondary) + } + .padding() + .background(Color(UIColor.systemGray6)) + .cornerRadius(8) + .shadow(radius: 2) + } +} + +// Step 4: Create the ComicsFormView +struct ComicFormView: View { + @Environment(\.presentationMode) var presentationMode + @ObservedObject var viewModel: ComicViewModel + @State private var title: String = "" + @State private var genre: String = "" + @State private var description: String = "" + + var body: some View { + NavigationView { + Form { + Section(header: Text("Comic Details")) { + TextField("Title", text: $title) + TextField("Genre", text: $genre) + TextField("Description", text: $description) + } + + Button(action: { + viewModel.addComic(title: title, genre: genre, description: description) + presentationMode.wrappedValue.dismiss() + }) { + Text("Add comics") + } + .disabled(title.isEmpty || genre.isEmpty || description.isEmpty) + } + .navigationTitle("Add New comics") + } + } +} + +// Step 5: Update the Main View +struct ComicListView: View { + @StateObject private var viewModel = ComicViewModel() + @State private var showingForm = false + + var body: some View { + NavigationView { + List(viewModel.comic) { comic in + NavigationLink { + ComicView(comic: comic) + } label: { + Text(comic.title) + } + ComicView(comic: comic) + .padding(.vertical, 5) + } + .navigationTitle("Comics") + .toolbar { + ToolbarItem(placement: .navigationBarTrailing) { + Button(action: { + showingForm.toggle() + }) { + Image(systemName: "plus") + } + .sheet(isPresented: $showingForm) { + ComicFormView(viewModel: viewModel) + } + } + } + } + } +} + +// Preview +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + ComicListView() + } +} diff --git a/CollectSomeMore/ContentView.swift b/CollectSomeMore/ContentView.swift index ee3aef9..d1c6e18 100644 --- a/CollectSomeMore/ContentView.swift +++ b/CollectSomeMore/ContentView.swift @@ -13,13 +13,14 @@ struct ContentView: View { @Query(sort: \Movie.title) private var movies: [Movie] @State private var newMovie: Movie? - + @State private var searchText = "" + var body: some View { NavigationSplitView { Group { if !movies.isEmpty { List { - ForEach(movies) { movie in + ForEach(filteredMovies) { movie in NavigationLink { MovieDetail(movie: movie) } label: { @@ -28,21 +29,24 @@ struct ContentView: View { } .onDelete(perform: deleteItems) } + .navigationTitle("Movies") + .toolbar { + ToolbarItem(placement: .navigationBarTrailing) { + EditButton() + } + ToolbarItem { + Button(action: addMovie) { + Label("Add Movie", systemImage: "plus.app") + } + } + } + .searchable(text: $searchText) } else { ContentUnavailableView { - Label("No Movies", systemImage: "film.stack") - } - } - } - .navigationTitle("Movies") - .toolbar { - ToolbarItem(placement: .navigationBarTrailing) { - EditButton() - } - ToolbarItem { - Button(action: addMovie) { - Label("Add Movie", systemImage: "plus") + Label("There are no movies in your collection.", systemImage: "list.and.film") + Button("Add a movie", action: addMovie) } + .navigationTitle("Movies") } } .sheet(item: $newMovie) { movie in @@ -53,13 +57,21 @@ struct ContentView: View { } } detail: { Text("Select a movie") - .navigationTitle("Movie") + .navigationTitle("Movies") + } + } + + private var filteredMovies: [Movie] { + if searchText.isEmpty { + return movies + } else { + return movies.filter { $0.title.localizedCaseInsensitiveContains(searchText) } } } private func addMovie() { withAnimation { - let newItem = Movie(title: "", releaseDate: .now) + let newItem = Movie(id: UUID(), title: "", releaseDate: .now, purchaseDate: Date(timeIntervalSinceNow: -5_000_000), genre: "Action") modelContext.insert(newItem) newMovie = newItem } @@ -74,7 +86,7 @@ struct ContentView: View { } } -#Preview { +#Preview("List view") { ContentView() .modelContainer(MovieData.shared.modelContainer) } diff --git a/CollectSomeMore/GamesAndThings.swift b/CollectSomeMore/GamesAndThings.swift new file mode 100644 index 0000000..5fba112 --- /dev/null +++ b/CollectSomeMore/GamesAndThings.swift @@ -0,0 +1,39 @@ +// +// Gamesandthings.swift +// Games and Things - tracking your collections across gaming genres. +// +// Created by Adam Jolicoeur on 6/7/24. +// + +import Foundation +import SwiftData + +@Model +final class Movie { + var id: UUID + var title: String + var releaseDate: Date + var purchaseDate: Date + var genre: String + var imageData: Data? + + init(id: UUID = UUID(), title: String, releaseDate: Date, purchaseDate: Date, genre: String, imageData: Data? = nil) { + self.id = id + self.title = title + self.releaseDate = releaseDate + self.purchaseDate = purchaseDate + self.genre = genre + self.imageData = imageData + } + + static let sampleData = [ + Movie(id: UUID(), title: "Deadpool", + releaseDate: Date(timeIntervalSinceReferenceDate: -402_00_00), + purchaseDate: Date(timeIntervalSinceNow: -5_000_000), + genre: "Superhero"), + Movie(id: UUID(), title: "Deadpool & Wolverine", + releaseDate: Date(timeIntervalSinceReferenceDate: -20_000_000), + purchaseDate: Date(timeIntervalSinceNow: -5_000_000), + genre: "Comedy") + ] +} diff --git a/CollectSomeMore/Movie.swift b/CollectSomeMore/Movie.swift index 45b2bd1..1c99c66 100644 --- a/CollectSomeMore/Movie.swift +++ b/CollectSomeMore/Movie.swift @@ -1,35 +1,17 @@ -// -// Movie.swift -// CollectSomeMore -// -// Created by Adam Jolicoeur on 6/7/24. -// +import SwiftUI -import Foundation -import SwiftData - -@Model -final class Movie { - var title: String - var releaseDate: Date - - init(title: String, releaseDate: Date) { - self.title = title - self.releaseDate = releaseDate - } - - static let sampleData = [ - Movie(title: "Amusing Space Traveler 3", - releaseDate: Date(timeIntervalSinceReferenceDate: -402_00_00)), - Movie(title: "Difficult Cat", - releaseDate: Date(timeIntervalSinceReferenceDate: -20_000_000)), - Movie(title: "Electrifying Trek", - releaseDate: Date(timeIntervalSinceReferenceDate: 300_000_000)), - Movie(title: "Reckless Train Ride 2", - releaseDate: Date(timeIntervalSinceReferenceDate: 120_000_000)), - Movie(title: "The Last Venture", - releaseDate: Date(timeIntervalSinceReferenceDate: 550_000_000)), - Movie(title: "Glamorous Neighbor", - releaseDate: Date(timeIntervalSinceReferenceDate: 700_000_000)) - ] -} +//class Movie: ObservableObject { +// @Published var title: String +// @Published var releaseDate: Date +// @Published var purchaseDate: Date +// @Published var genre: String +// @Published var imageData: Data? +// +// init(title: String, releaseDate: Date, purchaseDate: Date, genre: String, imageData: Data? = nil) { +// self.title = title +// self.releaseDate = releaseDate +// self.purchaseDate = purchaseDate +// self.genre = genre +// self.imageData = imageData +// } +//} diff --git a/CollectSomeMore/MovieDetail.swift b/CollectSomeMore/MovieDetail.swift index 671f56b..e1a0848 100644 --- a/CollectSomeMore/MovieDetail.swift +++ b/CollectSomeMore/MovieDetail.swift @@ -7,14 +7,18 @@ import SwiftUI - struct MovieDetail: View { @Bindable var movie: Movie + @State private var selectedImage: UIImage? + @State private var selectedImageData: Data? + let isNew: Bool @Environment(\.dismiss) private var dismiss @Environment(\.modelContext) private var modelContext + let genres = ["Action", "Comedy", "Drama", "Horror", "Romance", "Sci-Fi", "Superhero"] + init(movie: Movie, isNew: Bool = false) { self.movie = movie self.isNew = isNew @@ -24,13 +28,20 @@ struct MovieDetail: View { Form { TextField("Movie title", text: $movie.title) - DatePicker("Release date", selection: $movie.releaseDate, displayedComponents: .date) + DatePicker("Release Date", selection: $movie.releaseDate, displayedComponents: .date) + DatePicker("Purchase Date", selection: $movie.purchaseDate, displayedComponents: .date) + + Picker("Genre", selection: $movie.genre) { + ForEach(genres, id: \.self) { genre in + Text(genre).tag(genre) + } + } } - .navigationTitle(isNew ? "New Movie" : "Movie") + .navigationTitle(isNew ? "New Movie" : "Movie details") .toolbar { if isNew { ToolbarItem(placement: .confirmationAction) { - Button("Done") { + Button("Save") { dismiss() } } diff --git a/CollectSomeMoreTests/CollectSomeMoreTests.swift b/CollectSomeMoreTests/CollectSomeMoreTests.swift index 7a31c01..0559f46 100644 --- a/CollectSomeMoreTests/CollectSomeMoreTests.swift +++ b/CollectSomeMoreTests/CollectSomeMoreTests.swift @@ -1,14 +1,14 @@ // -// CollectSomeMoreTests.swift -// CollectSomeMoreTests -// +// GamesAndThingsTests.swift +// GamesAndThingsTests +// // Created by Adam Jolicoeur on 6/7/24. // import XCTest -@testable import CollectSomeMore +@testable import GamesAndThings -final class CollectSomeMoreTests: XCTestCase { +final class GamesAndThingsTests: XCTestCase { override func setUpWithError() throws { // Put setup code here. This method is called before the invocation of each test method in the class. diff --git a/CollectSomeMoreUITests/CollectSomeMoreUITests.swift b/CollectSomeMoreUITests/CollectSomeMoreUITests.swift index 2b29fba..a67080a 100644 --- a/CollectSomeMoreUITests/CollectSomeMoreUITests.swift +++ b/CollectSomeMoreUITests/CollectSomeMoreUITests.swift @@ -1,13 +1,13 @@ // -// CollectSomeMoreUITests.swift -// CollectSomeMoreUITests +// GamesAndThingsUITests.swift +// GamesAndThingsUITests // // Created by Adam Jolicoeur on 6/7/24. // import XCTest -final class CollectSomeMoreUITests: XCTestCase { +final class GamesAndThingsUITests: XCTestCase { override func setUpWithError() throws { // Put setup code here. This method is called before the invocation of each test method in the class. diff --git a/CollectSomeMoreUITests/CollectSomeMoreUITestsLaunchTests.swift b/CollectSomeMoreUITests/CollectSomeMoreUITestsLaunchTests.swift index f929dca..3e56750 100644 --- a/CollectSomeMoreUITests/CollectSomeMoreUITestsLaunchTests.swift +++ b/CollectSomeMoreUITests/CollectSomeMoreUITestsLaunchTests.swift @@ -1,13 +1,13 @@ // -// CollectSomeMoreUITestsLaunchTests.swift -// CollectSomeMoreUITests +// GamesAndThingsUITestsLaunchTests.swift +// GamesAndThingsUITests // // Created by Adam Jolicoeur on 6/7/24. // import XCTest -final class CollectSomeMoreUITestsLaunchTests: XCTestCase { +final class GamesAndThingsUITestsLaunchTests: XCTestCase { override class var runsForEachTargetApplicationUIConfiguration: Bool { true diff --git a/CollectSomeMore.xcodeproj/project.pbxproj b/GamesAndThings.xcodeproj/project.pbxproj similarity index 80% rename from CollectSomeMore.xcodeproj/project.pbxproj rename to GamesAndThings.xcodeproj/project.pbxproj index 672e0e7..a48c344 100644 --- a/CollectSomeMore.xcodeproj/project.pbxproj +++ b/GamesAndThings.xcodeproj/project.pbxproj @@ -3,13 +3,13 @@ archiveVersion = 1; classes = { }; - objectVersion = 56; + objectVersion = 63; objects = { /* Begin PBXBuildFile section */ 8DEC3A932C13D0C0004D57B7 /* CollectSomeMoreApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DEC3A922C13D0C0004D57B7 /* CollectSomeMoreApp.swift */; }; 8DEC3A952C13D0C0004D57B7 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DEC3A942C13D0C0004D57B7 /* ContentView.swift */; }; - 8DEC3A972C13D0C0004D57B7 /* Movie.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DEC3A962C13D0C0004D57B7 /* Movie.swift */; }; + 8DEC3A972C13D0C0004D57B7 /* GamesAndThings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DEC3A962C13D0C0004D57B7 /* GamesAndThings.swift */; }; 8DEC3A992C13D0C1004D57B7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8DEC3A982C13D0C1004D57B7 /* Assets.xcassets */; }; 8DEC3A9C2C13D0C1004D57B7 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8DEC3A9B2C13D0C1004D57B7 /* Preview Assets.xcassets */; }; 8DEC3AA62C13D0C1004D57B7 /* CollectSomeMoreTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DEC3AA52C13D0C1004D57B7 /* CollectSomeMoreTests.swift */; }; @@ -17,6 +17,7 @@ 8DEC3AB22C13D0C1004D57B7 /* CollectSomeMoreUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DEC3AB12C13D0C1004D57B7 /* CollectSomeMoreUITestsLaunchTests.swift */; }; 8DEC3ABF2C13D397004D57B7 /* MovieData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DEC3ABE2C13D397004D57B7 /* MovieData.swift */; }; 8DEC3AC12C13EE03004D57B7 /* MovieDetail.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DEC3AC02C13EE03004D57B7 /* MovieDetail.swift */; }; + A08831F52C7F5FFF00A02F78 /* Movie.swift in Sources */ = {isa = PBXBuildFile; fileRef = A08831F42C7F5FFF00A02F78 /* Movie.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -37,19 +38,20 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 8DEC3A8F2C13D0C0004D57B7 /* CollectSomeMore.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CollectSomeMore.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 8DEC3A8F2C13D0C0004D57B7 /* GamesAndThings.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GamesAndThings.app; sourceTree = BUILT_PRODUCTS_DIR; }; 8DEC3A922C13D0C0004D57B7 /* CollectSomeMoreApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollectSomeMoreApp.swift; sourceTree = ""; }; 8DEC3A942C13D0C0004D57B7 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; - 8DEC3A962C13D0C0004D57B7 /* Movie.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Movie.swift; sourceTree = ""; }; + 8DEC3A962C13D0C0004D57B7 /* GamesAndThings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GamesAndThings.swift; sourceTree = ""; }; 8DEC3A982C13D0C1004D57B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 8DEC3A9B2C13D0C1004D57B7 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; - 8DEC3AA12C13D0C1004D57B7 /* CollectSomeMoreTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CollectSomeMoreTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 8DEC3AA12C13D0C1004D57B7 /* GamesAndThingsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GamesAndThingsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 8DEC3AA52C13D0C1004D57B7 /* CollectSomeMoreTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollectSomeMoreTests.swift; sourceTree = ""; }; - 8DEC3AAB2C13D0C1004D57B7 /* CollectSomeMoreUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CollectSomeMoreUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 8DEC3AAB2C13D0C1004D57B7 /* GamesAndThingsUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GamesAndThingsUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 8DEC3AAF2C13D0C1004D57B7 /* CollectSomeMoreUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollectSomeMoreUITests.swift; sourceTree = ""; }; 8DEC3AB12C13D0C1004D57B7 /* CollectSomeMoreUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollectSomeMoreUITestsLaunchTests.swift; sourceTree = ""; }; 8DEC3ABE2C13D397004D57B7 /* MovieData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MovieData.swift; sourceTree = ""; }; 8DEC3AC02C13EE03004D57B7 /* MovieDetail.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MovieDetail.swift; sourceTree = ""; }; + A08831F42C7F5FFF00A02F78 /* Movie.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Movie.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -90,9 +92,9 @@ 8DEC3A902C13D0C0004D57B7 /* Products */ = { isa = PBXGroup; children = ( - 8DEC3A8F2C13D0C0004D57B7 /* CollectSomeMore.app */, - 8DEC3AA12C13D0C1004D57B7 /* CollectSomeMoreTests.xctest */, - 8DEC3AAB2C13D0C1004D57B7 /* CollectSomeMoreUITests.xctest */, + 8DEC3A8F2C13D0C0004D57B7 /* GamesAndThings.app */, + 8DEC3AA12C13D0C1004D57B7 /* GamesAndThingsTests.xctest */, + 8DEC3AAB2C13D0C1004D57B7 /* GamesAndThingsUITests.xctest */, ); name = Products; sourceTree = ""; @@ -104,7 +106,8 @@ 8DEC3A942C13D0C0004D57B7 /* ContentView.swift */, 8DEC3ABE2C13D397004D57B7 /* MovieData.swift */, 8DEC3AC02C13EE03004D57B7 /* MovieDetail.swift */, - 8DEC3A962C13D0C0004D57B7 /* Movie.swift */, + A08831F42C7F5FFF00A02F78 /* Movie.swift */, + 8DEC3A962C13D0C0004D57B7 /* GamesAndThings.swift */, 8DEC3A982C13D0C1004D57B7 /* Assets.xcassets */, 8DEC3A9A2C13D0C1004D57B7 /* Preview Content */, ); @@ -139,9 +142,9 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 8DEC3A8E2C13D0C0004D57B7 /* CollectSomeMore */ = { + 8DEC3A8E2C13D0C0004D57B7 /* GamesAndThings */ = { isa = PBXNativeTarget; - buildConfigurationList = 8DEC3AB52C13D0C1004D57B7 /* Build configuration list for PBXNativeTarget "CollectSomeMore" */; + buildConfigurationList = 8DEC3AB52C13D0C1004D57B7 /* Build configuration list for PBXNativeTarget "GamesAndThings" */; buildPhases = ( 8DEC3A8B2C13D0C0004D57B7 /* Sources */, 8DEC3A8C2C13D0C0004D57B7 /* Frameworks */, @@ -151,14 +154,14 @@ ); dependencies = ( ); - name = CollectSomeMore; + name = GamesAndThings; productName = CollectSomeMore; - productReference = 8DEC3A8F2C13D0C0004D57B7 /* CollectSomeMore.app */; + productReference = 8DEC3A8F2C13D0C0004D57B7 /* GamesAndThings.app */; productType = "com.apple.product-type.application"; }; - 8DEC3AA02C13D0C1004D57B7 /* CollectSomeMoreTests */ = { + 8DEC3AA02C13D0C1004D57B7 /* GamesAndThingsTests */ = { isa = PBXNativeTarget; - buildConfigurationList = 8DEC3AB82C13D0C1004D57B7 /* Build configuration list for PBXNativeTarget "CollectSomeMoreTests" */; + buildConfigurationList = 8DEC3AB82C13D0C1004D57B7 /* Build configuration list for PBXNativeTarget "GamesAndThingsTests" */; buildPhases = ( 8DEC3A9D2C13D0C1004D57B7 /* Sources */, 8DEC3A9E2C13D0C1004D57B7 /* Frameworks */, @@ -169,14 +172,14 @@ dependencies = ( 8DEC3AA32C13D0C1004D57B7 /* PBXTargetDependency */, ); - name = CollectSomeMoreTests; + name = GamesAndThingsTests; productName = CollectSomeMoreTests; - productReference = 8DEC3AA12C13D0C1004D57B7 /* CollectSomeMoreTests.xctest */; + productReference = 8DEC3AA12C13D0C1004D57B7 /* GamesAndThingsTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; - 8DEC3AAA2C13D0C1004D57B7 /* CollectSomeMoreUITests */ = { + 8DEC3AAA2C13D0C1004D57B7 /* GamesAndThingsUITests */ = { isa = PBXNativeTarget; - buildConfigurationList = 8DEC3ABB2C13D0C1004D57B7 /* Build configuration list for PBXNativeTarget "CollectSomeMoreUITests" */; + buildConfigurationList = 8DEC3ABB2C13D0C1004D57B7 /* Build configuration list for PBXNativeTarget "GamesAndThingsUITests" */; buildPhases = ( 8DEC3AA72C13D0C1004D57B7 /* Sources */, 8DEC3AA82C13D0C1004D57B7 /* Frameworks */, @@ -187,9 +190,9 @@ dependencies = ( 8DEC3AAD2C13D0C1004D57B7 /* PBXTargetDependency */, ); - name = CollectSomeMoreUITests; + name = GamesAndThingsUITests; productName = CollectSomeMoreUITests; - productReference = 8DEC3AAB2C13D0C1004D57B7 /* CollectSomeMoreUITests.xctest */; + productReference = 8DEC3AAB2C13D0C1004D57B7 /* GamesAndThingsUITests.xctest */; productType = "com.apple.product-type.bundle.ui-testing"; }; /* End PBXNativeTarget section */ @@ -215,8 +218,8 @@ }; }; }; - buildConfigurationList = 8DEC3A8A2C13D0C0004D57B7 /* Build configuration list for PBXProject "CollectSomeMore" */; - compatibilityVersion = "Xcode 14.0"; + buildConfigurationList = 8DEC3A8A2C13D0C0004D57B7 /* Build configuration list for PBXProject "GamesAndThings" */; + compatibilityVersion = "Xcode 15.3"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( @@ -228,9 +231,9 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 8DEC3A8E2C13D0C0004D57B7 /* CollectSomeMore */, - 8DEC3AA02C13D0C1004D57B7 /* CollectSomeMoreTests */, - 8DEC3AAA2C13D0C1004D57B7 /* CollectSomeMoreUITests */, + 8DEC3A8E2C13D0C0004D57B7 /* GamesAndThings */, + 8DEC3AA02C13D0C1004D57B7 /* GamesAndThingsTests */, + 8DEC3AAA2C13D0C1004D57B7 /* GamesAndThingsUITests */, ); }; /* End PBXProject section */ @@ -267,7 +270,8 @@ buildActionMask = 2147483647; files = ( 8DEC3A952C13D0C0004D57B7 /* ContentView.swift in Sources */, - 8DEC3A972C13D0C0004D57B7 /* Movie.swift in Sources */, + 8DEC3A972C13D0C0004D57B7 /* GamesAndThings.swift in Sources */, + A08831F52C7F5FFF00A02F78 /* Movie.swift in Sources */, 8DEC3AC12C13EE03004D57B7 /* MovieDetail.swift in Sources */, 8DEC3A932C13D0C0004D57B7 /* CollectSomeMoreApp.swift in Sources */, 8DEC3ABF2C13D397004D57B7 /* MovieData.swift in Sources */, @@ -296,12 +300,12 @@ /* Begin PBXTargetDependency section */ 8DEC3AA32C13D0C1004D57B7 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 8DEC3A8E2C13D0C0004D57B7 /* CollectSomeMore */; + target = 8DEC3A8E2C13D0C0004D57B7 /* GamesAndThings */; targetProxy = 8DEC3AA22C13D0C1004D57B7 /* PBXContainerItemProxy */; }; 8DEC3AAD2C13D0C1004D57B7 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 8DEC3A8E2C13D0C0004D57B7 /* CollectSomeMore */; + target = 8DEC3A8E2C13D0C0004D57B7 /* GamesAndThings */; targetProxy = 8DEC3AAC2C13D0C1004D57B7 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ @@ -431,10 +435,11 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"CollectSomeMore/Preview Content\""; - DEVELOPMENT_TEAM = JHCZM7AZ8A; + DEVELOPMENT_TEAM = J7D3ZTJ7SH; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_CFBundleDisplayName = CollectSomeMore; @@ -442,8 +447,8 @@ INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -451,9 +456,13 @@ MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = Jolicoeur.CollectSomeMore; PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = 1; }; name = Debug; }; @@ -462,10 +471,11 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"CollectSomeMore/Preview Content\""; - DEVELOPMENT_TEAM = JHCZM7AZ8A; + DEVELOPMENT_TEAM = J7D3ZTJ7SH; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_CFBundleDisplayName = CollectSomeMore; @@ -473,8 +483,8 @@ INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -482,9 +492,13 @@ MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = Jolicoeur.CollectSomeMore; PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = 1; }; name = Release; }; @@ -495,16 +509,20 @@ BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = JHCZM7AZ8A; + DEVELOPMENT_TEAM = J7D3ZTJ7SH; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = 17.5; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = Jolicoeur.CollectSomeMoreTests; PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = NO; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CollectSomeMore.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/CollectSomeMore"; + TARGETED_DEVICE_FAMILY = 1; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GamesAndThings.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/GamesAndThings"; }; name = Debug; }; @@ -515,16 +533,20 @@ BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = JHCZM7AZ8A; + DEVELOPMENT_TEAM = J7D3ZTJ7SH; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = 17.5; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = Jolicoeur.CollectSomeMoreTests; PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = NO; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CollectSomeMore.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/CollectSomeMore"; + TARGETED_DEVICE_FAMILY = 1; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GamesAndThings.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/GamesAndThings"; }; name = Release; }; @@ -534,14 +556,18 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = JHCZM7AZ8A; + DEVELOPMENT_TEAM = J7D3ZTJ7SH; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = Jolicoeur.CollectSomeMoreUITests; PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = NO; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = 1; TEST_TARGET_NAME = CollectSomeMore; }; name = Debug; @@ -552,14 +578,18 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = JHCZM7AZ8A; + DEVELOPMENT_TEAM = J7D3ZTJ7SH; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = Jolicoeur.CollectSomeMoreUITests; PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = NO; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = 1; TEST_TARGET_NAME = CollectSomeMore; }; name = Release; @@ -567,7 +597,7 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 8DEC3A8A2C13D0C0004D57B7 /* Build configuration list for PBXProject "CollectSomeMore" */ = { + 8DEC3A8A2C13D0C0004D57B7 /* Build configuration list for PBXProject "GamesAndThings" */ = { isa = XCConfigurationList; buildConfigurations = ( 8DEC3AB32C13D0C1004D57B7 /* Debug */, @@ -576,7 +606,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 8DEC3AB52C13D0C1004D57B7 /* Build configuration list for PBXNativeTarget "CollectSomeMore" */ = { + 8DEC3AB52C13D0C1004D57B7 /* Build configuration list for PBXNativeTarget "GamesAndThings" */ = { isa = XCConfigurationList; buildConfigurations = ( 8DEC3AB62C13D0C1004D57B7 /* Debug */, @@ -585,7 +615,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 8DEC3AB82C13D0C1004D57B7 /* Build configuration list for PBXNativeTarget "CollectSomeMoreTests" */ = { + 8DEC3AB82C13D0C1004D57B7 /* Build configuration list for PBXNativeTarget "GamesAndThingsTests" */ = { isa = XCConfigurationList; buildConfigurations = ( 8DEC3AB92C13D0C1004D57B7 /* Debug */, @@ -594,7 +624,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 8DEC3ABB2C13D0C1004D57B7 /* Build configuration list for PBXNativeTarget "CollectSomeMoreUITests" */ = { + 8DEC3ABB2C13D0C1004D57B7 /* Build configuration list for PBXNativeTarget "GamesAndThingsUITests" */ = { isa = XCConfigurationList; buildConfigurations = ( 8DEC3ABC2C13D0C1004D57B7 /* Debug */, diff --git a/CollectSomeMore.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/GamesAndThings.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 51% rename from CollectSomeMore.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to GamesAndThings.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 919434a..cbf0e48 100644 --- a/CollectSomeMore.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/GamesAndThings.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:/Users/adamjolicoeur/Documents/GitHub/CollectSomeMore/GamesAndThings.xcodeproj"> diff --git a/CollectSomeMore.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/GamesAndThings.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from CollectSomeMore.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to GamesAndThings.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/CollectSomeMore.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/GamesAndThings.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from CollectSomeMore.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to GamesAndThings.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/README.md b/README.md new file mode 100644 index 0000000..9f2e2b2 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# CollectSomeMore +> Also known as GamesAndThings on the iOS AppStore + +[![Swift](https://github.com/AdamJ/CollectSomeMore/actions/workflows/swift.yml/badge.svg?branch=testflight)](https://github.com/AdamJ/CollectSomeMore/actions/workflows/swift.yml) + +My first attempt at creating an iOS app using SwiftUI. At this time, the app is only available through TestFlight by invitation only.