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
Binary file modified .DS_Store
Binary file not shown.
68 changes: 68 additions & 0 deletions FoodForThought.xcodeproj/project.pbxproj
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@
objects = {

/* Begin PBXBuildFile section */
DF47C74C20E69A3E002F1D8A /* MealTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF47C74B20E69A3E002F1D8A /* MealTableViewCell.swift */; };
DF47C74E20E69F8A002F1D8A /* ScheduledMeal.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF47C74D20E69F8A002F1D8A /* ScheduledMeal.swift */; };
DF707BC020F68ABF006B611A /* StartMealViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF707BBF20F68ABF006B611A /* StartMealViewController.swift */; };
DF76E74120F6A85700AE5236 /* InMealViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF76E74020F6A85700AE5236 /* InMealViewController.swift */; };
DF86C5E720ED5FA5001F3778 /* MusicController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF86C5E620ED5FA4001F3778 /* MusicController.swift */; };
DFA39A1620E80AAE00E54064 /* MealTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFA39A1520E80AAE00E54064 /* MealTableViewController.swift */; };
DFE0DACC20E56628000D63E1 /* MealProfileViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFE0DACB20E56628000D63E1 /* MealProfileViewController.swift */; };
DFECD16D20ED70D000515451 /* Kiss The Rain.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = DFECD16920ED70D000515451 /* Kiss The Rain.mp3 */; };
DFECD16E20ED70D000515451 /* m.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = DFECD16A20ED70D000515451 /* m.mp3 */; };
DFECD16F20ED70D000515451 /* October.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = DFECD16B20ED70D000515451 /* October.mp3 */; };
DFECD17020ED70D000515451 /* The Truth That You Leave.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = DFECD16C20ED70D000515451 /* The Truth That You Leave.mp3 */; };
DFECD17220ED732300515451 /* mealProfile.xml in Resources */ = {isa = PBXBuildFile; fileRef = DFECD17120ED732300515451 /* mealProfile.xml */; };
F632C3F820E48DD0005D5805 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F632C3F720E48DD0005D5805 /* AppDelegate.swift */; };
F632C3FA20E48DD0005D5805 /* FirstViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F632C3F920E48DD0005D5805 /* FirstViewController.swift */; };
F632C3FC20E48DD0005D5805 /* SecondViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F632C3FB20E48DD0005D5805 /* SecondViewController.swift */; };
Expand Down Expand Up @@ -35,6 +47,18 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
DF47C74B20E69A3E002F1D8A /* MealTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MealTableViewCell.swift; sourceTree = "<group>"; };
DF47C74D20E69F8A002F1D8A /* ScheduledMeal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScheduledMeal.swift; sourceTree = "<group>"; };
DF707BBF20F68ABF006B611A /* StartMealViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StartMealViewController.swift; sourceTree = "<group>"; };
DF76E74020F6A85700AE5236 /* InMealViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InMealViewController.swift; sourceTree = "<group>"; };
DF86C5E620ED5FA4001F3778 /* MusicController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MusicController.swift; sourceTree = "<group>"; };
DFA39A1520E80AAE00E54064 /* MealTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MealTableViewController.swift; sourceTree = "<group>"; };
DFE0DACB20E56628000D63E1 /* MealProfileViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MealProfileViewController.swift; sourceTree = "<group>"; };
DFECD16920ED70D000515451 /* Kiss The Rain.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = "Kiss The Rain.mp3"; sourceTree = "<group>"; };
DFECD16A20ED70D000515451 /* m.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = m.mp3; sourceTree = "<group>"; };
DFECD16B20ED70D000515451 /* October.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = October.mp3; sourceTree = "<group>"; };
DFECD16C20ED70D000515451 /* The Truth That You Leave.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = "The Truth That You Leave.mp3"; sourceTree = "<group>"; };
DFECD17120ED732300515451 /* mealProfile.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = mealProfile.xml; sourceTree = "<group>"; };
F632C3F420E48DD0005D5805 /* FoodForThought.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FoodForThought.app; sourceTree = BUILT_PRODUCTS_DIR; };
F632C3F720E48DD0005D5805 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
F632C3F920E48DD0005D5805 /* FirstViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirstViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -76,6 +100,17 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
DFECD16820ED70D000515451 /* Music */ = {
isa = PBXGroup;
children = (
DFECD16920ED70D000515451 /* Kiss The Rain.mp3 */,
DFECD16A20ED70D000515451 /* m.mp3 */,
DFECD16B20ED70D000515451 /* October.mp3 */,
DFECD16C20ED70D000515451 /* The Truth That You Leave.mp3 */,
);
path = Music;
sourceTree = "<group>";
};
F632C3EB20E48DD0005D5805 = {
isa = PBXGroup;
children = (
Expand All @@ -99,13 +134,22 @@
F632C3F620E48DD0005D5805 /* FoodForThought */ = {
isa = PBXGroup;
children = (
DFECD17120ED732300515451 /* mealProfile.xml */,
DFECD16820ED70D000515451 /* Music */,
F632C3F720E48DD0005D5805 /* AppDelegate.swift */,
F632C3F920E48DD0005D5805 /* FirstViewController.swift */,
F632C3FB20E48DD0005D5805 /* SecondViewController.swift */,
F632C3FD20E48DD0005D5805 /* Main.storyboard */,
DF76E74020F6A85700AE5236 /* InMealViewController.swift */,
DF707BBF20F68ABF006B611A /* StartMealViewController.swift */,
DF47C74B20E69A3E002F1D8A /* MealTableViewCell.swift */,
F632C40020E48DD0005D5805 /* Assets.xcassets */,
F632C40220E48DD0005D5805 /* LaunchScreen.storyboard */,
F632C40520E48DD0005D5805 /* Info.plist */,
DFE0DACB20E56628000D63E1 /* MealProfileViewController.swift */,
DFA39A1520E80AAE00E54064 /* MealTableViewController.swift */,
DF47C74D20E69F8A002F1D8A /* ScheduledMeal.swift */,
DF86C5E620ED5FA4001F3778 /* MusicController.swift */,
);
path = FoodForThought;
sourceTree = "<group>";
Expand Down Expand Up @@ -196,6 +240,7 @@
TargetAttributes = {
F632C3F320E48DD0005D5805 = {
CreatedOnToolsVersion = 9.2;
LastSwiftMigration = 0920;
ProvisioningStyle = Automatic;
};
F632C40920E48DD0005D5805 = {
Expand Down Expand Up @@ -235,8 +280,13 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
DFECD16E20ED70D000515451 /* m.mp3 in Resources */,
F632C40420E48DD0005D5805 /* LaunchScreen.storyboard in Resources */,
DFECD16F20ED70D000515451 /* October.mp3 in Resources */,
F632C40120E48DD0005D5805 /* Assets.xcassets in Resources */,
DFECD16D20ED70D000515451 /* Kiss The Rain.mp3 in Resources */,
DFECD17020ED70D000515451 /* The Truth That You Leave.mp3 in Resources */,
DFECD17220ED732300515451 /* mealProfile.xml in Resources */,
F632C3FF20E48DD0005D5805 /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -262,8 +312,15 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
DF707BC020F68ABF006B611A /* StartMealViewController.swift in Sources */,
DF47C74E20E69F8A002F1D8A /* ScheduledMeal.swift in Sources */,
F632C3FC20E48DD0005D5805 /* SecondViewController.swift in Sources */,
DFE0DACC20E56628000D63E1 /* MealProfileViewController.swift in Sources */,
F632C3F820E48DD0005D5805 /* AppDelegate.swift in Sources */,
DF47C74C20E69A3E002F1D8A /* MealTableViewCell.swift in Sources */,
DF86C5E720ED5FA5001F3778 /* MusicController.swift in Sources */,
DFA39A1620E80AAE00E54064 /* MealTableViewController.swift in Sources */,
DF76E74120F6A85700AE5236 /* InMealViewController.swift in Sources */,
F632C3FA20E48DD0005D5805 /* FirstViewController.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -430,11 +487,17 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = DB3D83U263;
HEADER_SEARCH_PATHS = "";
INFOPLIST_FILE = FoodForThought/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = edu.self.FoodForThought;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
Expand All @@ -444,11 +507,16 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = DB3D83U263;
HEADER_SEARCH_PATHS = "";
INFOPLIST_FILE = FoodForThought/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = edu.self.FoodForThought;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "";
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
Expand Down
2 changes: 1 addition & 1 deletion FoodForThought.xcodeproj/project.xcworkspace/contents.xcworkspacedata
100644 → 100755

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:FoodForThought.xcodeproj">
</FileRef>
</Workspace>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?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/>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?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/>
</plist>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?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>BuildLocationStyle</key>
<string>UseAppPreferences</string>
<key>CustomBuildLocationType</key>
<string>RelativeToDerivedData</string>
<key>DerivedDataLocationStyle</key>
<string>Default</string>
<key>EnabledFullIndexStoreVisibility</key>
<false/>
<key>IssueFilterStyle</key>
<string>ShowActiveSchemeOnly</string>
<key>LiveSourceIssuesEnabled</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?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>BuildLocationStyle</key>
<string>UseAppPreferences</string>
<key>CustomBuildLocationType</key>
<string>RelativeToDerivedData</string>
<key>DerivedDataLocationStyle</key>
<string>Default</string>
<key>EnabledFullIndexStoreVisibility</key>
<false/>
<key>IssueFilterStyle</key>
<string>ShowActiveSchemeOnly</string>
<key>LiveSourceIssuesEnabled</key>
<true/>
</dict>
</plist>
Binary file modified ...deproj/project.xcworkspace/xcuserdata/jehrenho.xcuserdatad/UserInterfaceState.xcuserstate
100644 → 100755
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
</Bucket>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "FoodForThought/ScheduledMealControl.swift"
timestampString = "552082784.763815"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "29"
endingLineNumber = "29"
landmarkName = "displayNoMealsScheduled()"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?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>SchemeUserState</key>
<dict>
<key>FoodForThought.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>
Empty file.
Binary file added FoodForThought/.DS_Store
Binary file not shown.
44 changes: 42 additions & 2 deletions FoodForThought/AppDelegate.swift
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,57 @@
//

import UIKit
import UserNotifications

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate {

var window: UIWindow?
var isGrantedAccess = false


func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping ([UNNotificationPresentationOptions]) -> Void) {
completionHandler([.alert, .sound])
}

func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
}

func requestAuthorization(options: UNAuthorizationOptions = [],
completionHandler: @escaping (Bool, Error?) -> Void) {

}

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
UNUserNotificationCenter.current().delegate = self
UNUserNotificationCenter.current().requestAuthorization(
options: [.alert,.sound,.badge],
completionHandler: { (granted,error) in
self.isGrantedAccess = granted
if granted{
self.setCategories()
} else {
let alert = UIAlertController(title: "Notification Access", message: "In order to use this application, turn on notification permissions.", preferredStyle: .alert)
let alertAction = UIAlertAction(title: "Okay", style: .default, handler: nil)
alert.addAction(alertAction)
self.window?.rootViewController?.present(alert , animated: true, completion: nil)
}
})
return true
}

func setCategories() {

}

func addNotification(content:UNNotificationContent, trigger:UNNotificationTrigger?, indentifier:String) {
let request = UNNotificationRequest(identifier: indentifier, content: content, trigger: trigger)
UNUserNotificationCenter.current().add(request, withCompletionHandler: { (errorObject) in
if let error = errorObject {
print("Error \(error.localizedDescription) in notification \(indentifier)")
}
})
}

func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
Expand Down
30 changes: 30 additions & 0 deletions FoodForThought/Assets.xcassets/AppIcon.appiconset/Contents.json
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
Expand Down Expand Up @@ -30,6 +40,16 @@
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "29x29",
Expand Down Expand Up @@ -59,6 +79,16 @@
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
Expand Down
Empty file modified FoodForThought/Assets.xcassets/first.imageset/Contents.json
100644 → 100755
Empty file.
Empty file modified FoodForThought/Assets.xcassets/first.imageset/first.pdf
100644 → 100755
Empty file.
Empty file modified FoodForThought/Assets.xcassets/second.imageset/Contents.json
100644 → 100755
Empty file.
Empty file modified FoodForThought/Assets.xcassets/second.imageset/second.pdf
100644 → 100755
Empty file.
Binary file added FoodForThought/Base.lproj/.DS_Store
Binary file not shown.
Empty file modified FoodForThought/Base.lproj/LaunchScreen.storyboard
100644 → 100755
Empty file.
Loading