Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ target 'Restaurant Royale' do
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Firestore'
pod 'Firebase/Storage'

end
12 changes: 11 additions & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ PODS:
- Firebase/Firestore (5.12.0):
- Firebase/CoreOnly
- FirebaseFirestore (= 0.14.0)
- Firebase/Storage (5.12.0):
- Firebase/CoreOnly
- FirebaseStorage (= 3.0.3)
- FirebaseAnalytics (5.3.0):
- FirebaseCore (~> 5.1)
- FirebaseInstanceID (~> 3.3)
Expand Down Expand Up @@ -54,6 +57,10 @@ PODS:
- FirebaseCore (~> 5.1)
- GoogleUtilities/Environment (~> 5.3)
- GoogleUtilities/UserDefaults (~> 5.3)
- FirebaseStorage (3.0.3):
- FirebaseAuthInterop (~> 1.0)
- FirebaseCore (~> 5.1)
- GTMSessionFetcher/Core (~> 1.1)
- GoogleAppMeasurement (5.3.0):
- GoogleUtilities/AppDelegateSwizzler (~> 5.2)
- GoogleUtilities/MethodSwizzler (~> 5.2)
Expand Down Expand Up @@ -120,6 +127,7 @@ DEPENDENCIES:
- Firebase/Auth
- Firebase/Core
- Firebase/Firestore
- Firebase/Storage

SPEC REPOS:
https://github.com/cocoapods/specs.git:
Expand All @@ -131,6 +139,7 @@ SPEC REPOS:
- FirebaseCore
- FirebaseFirestore
- FirebaseInstanceID
- FirebaseStorage
- GoogleAppMeasurement
- GoogleUtilities
- gRPC
Expand All @@ -152,6 +161,7 @@ SPEC CHECKSUMS:
FirebaseCore: 027d350adc039aa5483357c6f56556f117c5170e
FirebaseFirestore: 6dc97a9685c421767cc96bf644fc963166cddbe7
FirebaseInstanceID: e2fa4cb35ef5558c200f7f0ad8a53e212215f93e
FirebaseStorage: 3d22c041370593e639fba013d1eb698a8dae2881
GoogleAppMeasurement: 5029d78f2b438bd30ffb44e6c558b57c21622727
GoogleUtilities: bb6ff5a302c97a0bc9820dad775505778c5a2676
gRPC: 9d4c549f37c7cef22478634bac7a0405b6e3dbfb
Expand All @@ -164,6 +174,6 @@ SPEC CHECKSUMS:
nanopb: 2901f78ea1b7b4015c860c2fdd1ea2fee1a18d48
Protobuf: 1eb9700044745f00181c136ef21b8ff3ad5a0fd5

PODFILE CHECKSUM: d2740cbdd7cbc9a150f30c247bb6f6895699b54f
PODFILE CHECKSUM: af335cb31ba2f1b5b4631fdac5f3a5c4da153617

COCOAPODS: 1.5.3
48 changes: 36 additions & 12 deletions Restaurant Royale.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

/* Begin PBXBuildFile section */
0131FCF721B08F3A0087BAA6 /* TabViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0131FCF621B08F3A0087BAA6 /* TabViewController.swift */; };
0131FCF921B0933F0087BAA6 /* RewardsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0131FCF821B0933F0087BAA6 /* RewardsViewController.swift */; };
0131FCF921B0933F0087BAA6 /* SearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0131FCF821B0933F0087BAA6 /* SearchViewController.swift */; };
01A7E02121C1836700C5D5DC /* TableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01A7E02021C1836700C5D5DC /* TableViewCell.swift */; };
01A7E02321C184D900C5D5DC /* infoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01A7E02221C184D900C5D5DC /* infoViewController.swift */; };
30362D0621B319FC00AB07E8 /* gif.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30362D0521B319FC00AB07E8 /* gif.swift */; };
30362D0821B31A1700AB07E8 /* money.gif in Resources */ = {isa = PBXBuildFile; fileRef = 30362D0721B31A1600AB07E8 /* money.gif */; };
30362D0A21B31A2100AB07E8 /* slots.gif in Resources */ = {isa = PBXBuildFile; fileRef = 30362D0921B31A2100AB07E8 /* slots.gif */; };
CB00DE048DF123642887EB65 /* Pods_Restaurant_Royale.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E00D4DEFE6DFD07D30EAC895 /* Pods_Restaurant_Royale.framework */; };
D90CB6531A739B7A00228A1F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D90CB6521A739B7A00228A1F /* AppDelegate.swift */; };
D90CB6581A739B7A00228A1F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D90CB6561A739B7A00228A1F /* Main.storyboard */; };
Expand All @@ -22,21 +22,27 @@
D90CB6821A73CBC600228A1F /* AddGeotificationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D90CB67C1A73B2BD00228A1F /* AddGeotificationViewController.swift */; };
D9835AF31AA6076800D265BC /* Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9835AF21AA6076800D265BC /* Utilities.swift */; };
D9C1AF6C1A77CD6C00A06B2F /* Apple.gpx in Resources */ = {isa = PBXBuildFile; fileRef = D9C1AF6B1A77CD6C00A06B2F /* Apple.gpx */; };
E978543221C053BD003313D1 /* money.gif in Resources */ = {isa = PBXBuildFile; fileRef = E978543121C053BD003313D1 /* money.gif */; };
E978543421C053CA003313D1 /* rouletteWheel.gif in Resources */ = {isa = PBXBuildFile; fileRef = E978543321C053CA003313D1 /* rouletteWheel.gif */; };
E978543621C053D5003313D1 /* slots.gif in Resources */ = {isa = PBXBuildFile; fileRef = E978543521C053D5003313D1 /* slots.gif */; };
E978543821C05DAC003313D1 /* profileHeader.jpg in Resources */ = {isa = PBXBuildFile; fileRef = E978543721C05DAB003313D1 /* profileHeader.jpg */; };
E9CC65DF219CD82500B3EDE1 /* InitialViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CC65DE219CD82500B3EDE1 /* InitialViewController.swift */; };
E9CC65E1219CDE5D00B3EDE1 /* SignUpViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CC65E0219CDE5D00B3EDE1 /* SignUpViewController.swift */; };
E9CC65E3219CDE6700B3EDE1 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CC65E2219CDE6700B3EDE1 /* LoginViewController.swift */; };
E9CC65E5219CE1E500B3EDE1 /* ProfileViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CC65E4219CE1E500B3EDE1 /* ProfileViewController.swift */; };
E9F340BE21B63A6C00779987 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = E9F340BD21B63A6C00779987 /* GoogleService-Info.plist */; };
E9F340C021B63F1600779987 /* Restaurant.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9F340BF21B63F1600779987 /* Restaurant.swift */; };
E9F340C221BF86B900779987 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9F340C121BF86B900779987 /* Constants.swift */; };
E9FD90A321C07E0900864EA7 /* RestaurantManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9FD90A221C07E0900864EA7 /* RestaurantManager.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
0131FCF621B08F3A0087BAA6 /* TabViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabViewController.swift; sourceTree = "<group>"; };
0131FCF821B0933F0087BAA6 /* RewardsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RewardsViewController.swift; sourceTree = "<group>"; };
0131FCF821B0933F0087BAA6 /* SearchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchViewController.swift; sourceTree = "<group>"; };
01A7E02021C1836700C5D5DC /* TableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableViewCell.swift; sourceTree = "<group>"; };
01A7E02221C184D900C5D5DC /* infoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = infoViewController.swift; sourceTree = "<group>"; };
2C7E16726DE474D67283AED2 /* Pods-Restaurant Royale.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Restaurant Royale.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Restaurant Royale/Pods-Restaurant Royale.debug.xcconfig"; sourceTree = "<group>"; };
30362D0521B319FC00AB07E8 /* gif.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = gif.swift; sourceTree = "<group>"; };
30362D0721B31A1600AB07E8 /* money.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = money.gif; sourceTree = "<group>"; };
30362D0921B31A2100AB07E8 /* slots.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = slots.gif; sourceTree = "<group>"; };
308B7289218FDB950027F45B /* TollyToLocal.gpx */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = TollyToLocal.gpx; sourceTree = "<group>"; };
7DBB1DD8B77C6707E9D01F9D /* Pods-Restaurant Royale.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Restaurant Royale.release.xcconfig"; path = "Pods/Target Support Files/Pods-Restaurant Royale/Pods-Restaurant Royale.release.xcconfig"; sourceTree = "<group>"; };
A16373B92054471A0065C2D9 /* Google.gpx */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = Google.gpx; sourceTree = "<group>"; };
Expand All @@ -53,12 +59,18 @@
D9835AF21AA6076800D265BC /* Utilities.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Utilities.swift; sourceTree = "<group>"; };
D9C1AF6B1A77CD6C00A06B2F /* Apple.gpx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Apple.gpx; sourceTree = "<group>"; };
E00D4DEFE6DFD07D30EAC895 /* Pods_Restaurant_Royale.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Restaurant_Royale.framework; sourceTree = BUILT_PRODUCTS_DIR; };
E978543121C053BD003313D1 /* money.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; name = money.gif; path = Images.xcassets/money.dataset/money.gif; sourceTree = "<group>"; };
E978543321C053CA003313D1 /* rouletteWheel.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; name = rouletteWheel.gif; path = Images.xcassets/rouletteWheel.dataset/rouletteWheel.gif; sourceTree = "<group>"; };
E978543521C053D5003313D1 /* slots.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; name = slots.gif; path = Images.xcassets/slots.dataset/slots.gif; sourceTree = "<group>"; };
E978543721C05DAB003313D1 /* profileHeader.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = profileHeader.jpg; sourceTree = "<group>"; };
E9CC65DE219CD82500B3EDE1 /* InitialViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InitialViewController.swift; sourceTree = "<group>"; };
E9CC65E0219CDE5D00B3EDE1 /* SignUpViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignUpViewController.swift; sourceTree = "<group>"; };
E9CC65E2219CDE6700B3EDE1 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = "<group>"; };
E9CC65E4219CE1E500B3EDE1 /* ProfileViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileViewController.swift; sourceTree = "<group>"; };
E9F340BD21B63A6C00779987 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
E9F340BF21B63F1600779987 /* Restaurant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Restaurant.swift; sourceTree = "<group>"; };
E9F340C121BF86B900779987 /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; };
E9FD90A221C07E0900864EA7 /* RestaurantManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RestaurantManager.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -108,6 +120,7 @@
isa = PBXGroup;
children = (
D90CB6521A739B7A00228A1F /* AppDelegate.swift */,
E9F340C121BF86B900779987 /* Constants.swift */,
E9CC65DE219CD82500B3EDE1 /* InitialViewController.swift */,
E9CC65E0219CDE5D00B3EDE1 /* SignUpViewController.swift */,
E9CC65E2219CDE6700B3EDE1 /* LoginViewController.swift */,
Expand All @@ -116,12 +129,17 @@
D9835AF21AA6076800D265BC /* Utilities.swift */,
30362D0521B319FC00AB07E8 /* gif.swift */,
E9F340BF21B63F1600779987 /* Restaurant.swift */,
E978543121C053BD003313D1 /* money.gif */,
E978543521C053D5003313D1 /* slots.gif */,
E978543321C053CA003313D1 /* rouletteWheel.gif */,
D90CB6561A739B7A00228A1F /* Main.storyboard */,
0131FCF821B0933F0087BAA6 /* RewardsViewController.swift */,
01A7E02021C1836700C5D5DC /* TableViewCell.swift */,
0131FCF821B0933F0087BAA6 /* SearchViewController.swift */,
01A7E02221C184D900C5D5DC /* infoViewController.swift */,
E9FD90A221C07E0900864EA7 /* RestaurantManager.swift */,
0131FCF621B08F3A0087BAA6 /* TabViewController.swift */,
D90CB6591A739B7A00228A1F /* Images.xcassets */,
30362D0921B31A2100AB07E8 /* slots.gif */,
30362D0721B31A1600AB07E8 /* money.gif */,
E978543721C05DAB003313D1 /* profileHeader.jpg */,
D90CB65B1A739B7A00228A1F /* LaunchScreen.xib */,
D90CB6501A739B7A00228A1F /* Supporting Files */,
);
Expand Down Expand Up @@ -220,11 +238,13 @@
files = (
D90CB6581A739B7A00228A1F /* Main.storyboard in Resources */,
D90CB65D1A739B7A00228A1F /* LaunchScreen.xib in Resources */,
30362D0A21B31A2100AB07E8 /* slots.gif in Resources */,
E978543621C053D5003313D1 /* slots.gif in Resources */,
E978543821C05DAC003313D1 /* profileHeader.jpg in Resources */,
E978543421C053CA003313D1 /* rouletteWheel.gif in Resources */,
D9C1AF6C1A77CD6C00A06B2F /* Apple.gpx in Resources */,
D90CB65A1A739B7A00228A1F /* Images.xcassets in Resources */,
30362D0821B31A1700AB07E8 /* money.gif in Resources */,
E9F340BE21B63A6C00779987 /* GoogleService-Info.plist in Resources */,
E978543221C053BD003313D1 /* money.gif in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -299,12 +319,16 @@
E9CC65E1219CDE5D00B3EDE1 /* SignUpViewController.swift in Sources */,
30362D0621B319FC00AB07E8 /* gif.swift in Sources */,
D90CB6531A739B7A00228A1F /* AppDelegate.swift in Sources */,
01A7E02121C1836700C5D5DC /* TableViewCell.swift in Sources */,
E9CC65E3219CDE6700B3EDE1 /* LoginViewController.swift in Sources */,
E9CC65DF219CD82500B3EDE1 /* InitialViewController.swift in Sources */,
E9FD90A321C07E0900864EA7 /* RestaurantManager.swift in Sources */,
D9835AF31AA6076800D265BC /* Utilities.swift in Sources */,
0131FCF721B08F3A0087BAA6 /* TabViewController.swift in Sources */,
0131FCF921B0933F0087BAA6 /* RewardsViewController.swift in Sources */,
0131FCF921B0933F0087BAA6 /* SearchViewController.swift in Sources */,
01A7E02321C184D900C5D5DC /* infoViewController.swift in Sources */,
E9CC65E5219CE1E500B3EDE1 /* ProfileViewController.swift in Sources */,
E9F340C221BF86B900779987 /* Constants.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
Binary file modified RestaurantRoyale/.DS_Store
Binary file not shown.
42 changes: 12 additions & 30 deletions RestaurantRoyale/AddGeotificationViewController.swift
Original file line number Diff line number Diff line change
@@ -1,60 +1,42 @@
import UIKit
import MapKit
import FirebaseFirestore

let db = Firestore.firestore()
let settings = db.settings
import Firebase

class AddGeotificationViewController: UIViewController{

// Two values used to store the random location for the user
var restaurantID = String()
var restaurantName = String()
var manager = RestaurantManager()
var randomRestaurant = Restaurant()

@IBOutlet weak var slots: UIImageView!
@IBOutlet weak var background: UIImageView!
@IBOutlet weak var randomRestaurantButton: UIButton!
@IBAction func randomRestaurantRequest(_ sender: UIButton) {
//Perform all actions when a button is tapped
//Want to generate a random number, link it to the index of a restaurant in the restaurants array
//Use that restaurant to generate the next pin drop
//Possibly bring out a text box stating which restaurant was chosen, then asking if user wants to go there
// or select again

let randomIndex = Int.random(in: 0..<restaurants.count)
restaurantID = restaurants[randomIndex].id

@IBAction func mexicanRestaurantRequest(_ sender: UIButton) {

randomRestaurant.loadRestaurant(restaurantID: restaurantID, completion: {
randomRestaurant = manager.GetRestaurantByCategory(category: "Mexican", completion: {
self.randomRestaurant.openMapToRestaurant()
})

}

// List of restaurants in Alphabetical order
var restaurants: [(name: String, id: String)] = [
("Canes", "6YI7ekMfD3xs6u04PVmC"),
("Chipotle", "bmnzNLBxZ9jshG7BpkEI"),
("Local Taco", "dUGaUGDC8xeSLpGICNpU"),
("McDonalds", "lj2aSybH94VKs1vrpGOy"),
("Pazzo's Pizza Pub", "nzkjAfMY4rvKayCuvsr7"),
("Tolly Ho", "rPyOHTck8RK2BPNIdrbF")
]
@IBAction func randomRestaurantRequest(_ sender: UIButton) {

randomRestaurant = manager.GetRandomRestaurant(completion: {
self.randomRestaurant.openMapToRestaurant()
})

}

override func viewDidLoad() {
super.viewDidLoad()
randomRestaurantButton.setTitle("Let's Eat!", for: .normal)
randomRestaurantButton.layer.cornerRadius = 4
restaurantID = restaurants[0].id // Sets the default value of the picker to be the first value in the array
restaurantName = restaurants[0].name // Same ^^^

background.loadGif(name: "money")
slots.loadGif(name: "slots")
view.bringSubview(toFront: slots)
view.bringSubview(toFront: randomRestaurantButton)

print(self)

}

}
Loading