diff --git a/ios/circolapp/Podfile b/ios/circolapp/Podfile index b3b872a..a645ab9 100644 --- a/ios/circolapp/Podfile +++ b/ios/circolapp/Podfile @@ -9,4 +9,10 @@ target 'circolapp' do pod 'Firebase/Messaging' pod 'Firebase/AppDistribution' pod 'AppStorage', '~> 1.0.3' + pod 'Carte' + + post_install do |installer| + pods_dir = File.dirname(installer.pods_project.path) + at_exit { `ruby #{pods_dir}/Carte/Sources/Carte/carte.rb configure` } + end end diff --git a/ios/circolapp/Podfile.lock b/ios/circolapp/Podfile.lock index 62dbd78..5d3d039 100644 --- a/ios/circolapp/Podfile.lock +++ b/ios/circolapp/Podfile.lock @@ -1,5 +1,6 @@ PODS: - AppStorage (1.0.3) + - Carte (2.2.1) - Firebase/AppDistribution (7.1.0): - Firebase/CoreOnly - FirebaseAppDistribution (~> 7.1.0-beta) @@ -71,6 +72,7 @@ PODS: DEPENDENCIES: - AppStorage (~> 1.0.3) + - Carte - Firebase/AppDistribution - Firebase/Messaging - shared (from `../../shared`) @@ -78,6 +80,7 @@ DEPENDENCIES: SPEC REPOS: trunk: - AppStorage + - Carte - Firebase - FirebaseAppDistribution - FirebaseCore @@ -97,6 +100,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: AppStorage: dc9e2c18b5ebb7fed666af00c103b1c1432d459b + Carte: 6bcff4eaa894ff5b979d646de833fec96e04a38c Firebase: 78e8dd2e39d653de6270432ad84fe8b59f7bf4e8 FirebaseAppDistribution: 055561ff2d0682e92492c00f4bd2acf562f9eb6f FirebaseCore: 20046127eef0fcb8fa25df7fc12f7b97d4e48611 @@ -111,6 +115,6 @@ SPEC CHECKSUMS: PromisesObjC: 8c196f5a328c2cba3e74624585467a557dcb482f shared: fb3154b4def038b2b13aa88e01dd9f91bb2de9b5 -PODFILE CHECKSUM: 072fc8452438117fc96c91f862d3a31d3cf40f14 +PODFILE CHECKSUM: 4d3dc73b66e10d6081d188d21431ccdd25a3cb9f COCOAPODS: 1.10.0 diff --git a/ios/circolapp/circolapp.xcodeproj/project.pbxproj b/ios/circolapp/circolapp.xcodeproj/project.pbxproj index 93e7b9f..a055e66 100644 --- a/ios/circolapp/circolapp.xcodeproj/project.pbxproj +++ b/ios/circolapp/circolapp.xcodeproj/project.pbxproj @@ -32,6 +32,7 @@ 95CA31B2255C1EDE00AC095B /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95CA31B1255C1EDE00AC095B /* ContentView.swift */; }; 95CA31B7255C1EE000AC095B /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 95CA31B6255C1EE000AC095B /* Preview Assets.xcassets */; }; 95CA31C0255C28C300AC095B /* CircularView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95CA31BF255C28C300AC095B /* CircularView.swift */; }; + 95DB71AB258A1C1500A78033 /* CarteView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95DB71AA258A1C1500A78033 /* CarteView.swift */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -78,6 +79,7 @@ 95CA31B6255C1EE000AC095B /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 95CA31B8255C1EE000AC095B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 95CA31BF255C28C300AC095B /* CircularView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircularView.swift; sourceTree = ""; }; + 95DB71AA258A1C1500A78033 /* CarteView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CarteView.swift; sourceTree = ""; }; 976621FBDDCA894FD23FBA8B /* Pods-circolapp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-circolapp.release.xcconfig"; path = "Target Support Files/Pods-circolapp/Pods-circolapp.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -135,6 +137,7 @@ 954AF8F72588A5CF00666D0C /* FavouritesList.swift */, 954AF8F92588A5DD00666D0C /* RemindersList.swift */, 95B4CE132588BC890090D5E8 /* SettingsView.swift */, + 95DB71AA258A1C1500A78033 /* CarteView.swift */, ); path = View; sourceTree = ""; @@ -203,7 +206,9 @@ 4D03CF28648F46ED1A6C689C /* [CP] Check Pods Manifest.lock */, 95CA31A8255C1EDD00AC095B /* Sources */, 95CA31A9255C1EDD00AC095B /* Frameworks */, + E62EED9B3D667B480F11A2F0 /* [Carte] Pre Script */, 95CA31AA255C1EDD00AC095B /* Resources */, + 6F09AC68488332B30709BADD /* [Carte] Post Script */, AEB9DCF28686980DFDC48E24 /* [CP] Embed Pods Frameworks */, 95C9CBA52570EDEE005F879D /* Embed Frameworks */, ); @@ -285,6 +290,25 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; + 6F09AC68488332B30709BADD /* [Carte] Post Script */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "[Carte] Post Script"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "ruby ${PODS_ROOT}/Carte/Sources/Carte/carte.rb post"; + showEnvVarsInLog = 0; + }; AEB9DCF28686980DFDC48E24 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -302,6 +326,25 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-circolapp/Pods-circolapp-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; + E62EED9B3D667B480F11A2F0 /* [Carte] Pre Script */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "[Carte] Pre Script"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "ruby ${PODS_ROOT}/Carte/Sources/Carte/carte.rb pre"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -317,6 +360,7 @@ 95CA31B2255C1EDE00AC095B /* ContentView.swift in Sources */, 955B7A10257D10A70091B1F9 /* ViewControllerResolver.swift in Sources */, 954E68352574E3890034EBA8 /* iOSServerApi.swift in Sources */, + 95DB71AB258A1C1500A78033 /* CarteView.swift in Sources */, 954AF8F82588A5CF00666D0C /* FavouritesList.swift in Sources */, 954AF8F62588A5C300666D0C /* CircularList.swift in Sources */, 954AF8FD2588A61000666D0C /* FavouritesViewModel.swift in Sources */, diff --git a/ios/circolapp/circolapp/View/CarteView.swift b/ios/circolapp/circolapp/View/CarteView.swift new file mode 100644 index 0000000..c2e0a92 --- /dev/null +++ b/ios/circolapp/circolapp/View/CarteView.swift @@ -0,0 +1,32 @@ +/* + * Circolapp + * Copyright (C) 2019-2020 Matteo Schiff + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import Foundation +import UIKit +import SwiftUI +import Carte + +struct CarteView: UIViewControllerRepresentable { + func makeUIViewController(context: Context) -> CarteViewController { + return CarteViewController() + } + + func updateUIViewController(_ uiViewController: CarteViewController, context: Context) { + + } +} diff --git a/ios/circolapp/circolapp/View/SettingsView.swift b/ios/circolapp/circolapp/View/SettingsView.swift index 6f6b00f..30b0732 100644 --- a/ios/circolapp/circolapp/View/SettingsView.swift +++ b/ios/circolapp/circolapp/View/SettingsView.swift @@ -28,14 +28,36 @@ struct SettingsView: View { var body: some View { NavigationView { Form { - Picker("School", selection: $school) { - ForEach(0..