Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
9d69224
fix podfile error due to format error
esikmalazman Apr 5, 2023
0d1444a
add gitignore to project
esikmalazman Apr 5, 2023
5238152
upgrade podfile version
esikmalazman Apr 5, 2023
0431890
replace objective c app delegate to swift, https://medium.com/@kennet…
esikmalazman Apr 5, 2023
69f60cf
esikmalazman Apr 5, 2023
7468f77
replace storyboard based UITabBar and UINavigation to programmaticall…
esikmalazman Apr 5, 2023
096113b
replace food2fork API with to forkify API since it was shutdown
esikmalazman Apr 5, 2023
378712b
refactor FoodbLogCollectionViewController to swift file
esikmalazman Apr 5, 2023
16d3f3b
Fix navigation bar transparent which cause the navigation bar style n…
esikmalazman Apr 5, 2023
a907544
add additional location privacy usage description
esikmalazman Apr 5, 2023
8272048
refactor FoodLogDetailViewController to swift file
esikmalazman Apr 5, 2023
724777b
Fix launch screen contraints
esikmalazman Apr 5, 2023
8300110
refactor CreateLogViewController to swift file
esikmalazman Apr 5, 2023
1a8b842
create FoodLogService to handle and decode api get request
esikmalazman Apr 5, 2023
38c5986
create URLSessionContract to enable testability for networking
esikmalazman Apr 5, 2023
c3e4dde
create MockURLSession class
esikmalazman Apr 5, 2023
620b025
create http client for network request
esikmalazman Apr 9, 2023
f9facb6
prepare mock for network request and json decoding test
esikmalazman Apr 9, 2023
5ba4869
create FoodbLog service for foursquare api and endpoint
esikmalazman Apr 9, 2023
8003af9
complete refactor api call for restaurant search
esikmalazman Apr 9, 2023
92ae7cd
complete refactor api call for recipes search
esikmalazman Apr 10, 2023
dfe773e
create secrets file
esikmalazman Apr 14, 2023
14ebe63
complete refactor api call for food images search, replace IG Api wit…
esikmalazman Apr 14, 2023
1ad320b
store foursquare api key in secrets
esikmalazman Apr 14, 2023
d09dc68
Delete FoodbLog/Pods directory
esikmalazman Apr 14, 2023
e241b03
refactor RestaurantPickerTableVC to Swift
esikmalazman Apr 14, 2023
153c634
Refactor InstagramImagePicker to Swift
esikmalazman Apr 14, 2023
8a45421
Refactor RecipeTableViewController to Swift
esikmalazman Apr 15, 2023
64edb4d
Update .gitattributes
esikmalazman Apr 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FoodbLog filter=lfs diff=lfs merge=lfs -text
*.gitattributes filter=lfs diff=lfs merge=lfs -text
*.gif filter=lfs diff=lfs merge=lfs -text
# FoodbLog filter=lfs diff=lfs merge=lfs -text
# *.gitattributes filter=lfs diff=lfs merge=lfs -text
# *.gif filter=lfs diff=lfs merge=lfs -text
72 changes: 72 additions & 0 deletions FoodbLog/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
*.DS_Store

# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## User settings
xcuserdata/
xcshareddata/

## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
*.xcscmblueprint
*.xccheckout

## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
build/
DerivedData/
*.moved-aside
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3

## Obj-C/Swift specific
*.hmap

## App packaging
*.ipa
*.dSYM.zip
*.dSYM

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
Pods/

#
# Add this line if you want to avoid checking in source code from the Xcode workspace
*.xcworkspace

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build/

# fastlane
#
# It is recommended to not store the screenshots in the git repo.
# Instead, use fastlane to re-generate the screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output

# Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode

iOSInjectionProject/
501 changes: 328 additions & 173 deletions FoodbLog/FoodbLog.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions FoodbLog/FoodbLog/APIService.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
//
// APIService.swift
// FoodbLog
//
// Created by Ikmal Azman on 09/04/2023.
// Copyright © 2023 Ayuna Vogel. All rights reserved.
//

import Foundation

protocol APIService {
var baseURL : APIProvider {get}
var endpoint : String {get}
func createEndpoint(_ endpoint : String)-> String
}

enum APIProvider {
case foursquare
case fork2forkCA
case unsplash
}

extension APIProvider {
var url : String {
switch self {
case .foursquare:
return "https://api.foursquare.com/v3/"
case .fork2forkCA :
return "https://food2fork.ca/api/recipe/"
case .unsplash:
return "https://api.unsplash.com/"
}
}
}
18 changes: 0 additions & 18 deletions FoodbLog/FoodbLog/AppDelegate.h

This file was deleted.

74 changes: 0 additions & 74 deletions FoodbLog/FoodbLog/AppDelegate.m

This file was deleted.

61 changes: 61 additions & 0 deletions FoodbLog/FoodbLog/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
//
// AppDelegate.swift
// FoodbLog
//
// Created by Ikmal Azman on 05/04/2023.
// Copyright © 2023 Ayuna Vogel. All rights reserved.
//

import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?
let services : [UIApplicationDelegate] = [ParseDBAppDelegate(), ChameleonAppDelegate()]

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
self.configureWindow()

for service in services {
_ = service.application?(application, didFinishLaunchingWithOptions: launchOptions)
}

return true
}
}

extension AppDelegate {
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.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}

func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground.
}
}

private extension AppDelegate {
func configureWindow() {
let rootTabBarVC = RootTabBarVC()

window = UIWindow(frame: UIScreen.main.bounds)
window?.rootViewController = rootTabBarVC
window?.makeKeyAndVisible()
}
}
55 changes: 35 additions & 20 deletions FoodbLog/FoodbLog/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,59 @@
{
"images" : [
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "icon58@2x.png",
"scale" : "2x"
"scale" : "2x",
"size" : "20x20"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "icon87@3x.png",
"scale" : "3x"
"scale" : "3x",
"size" : "20x20"
},
{
"size" : "40x40",
"filename" : "icon58@2x.png",
"idiom" : "iphone",
"filename" : "icon80@2x.png",
"scale" : "2x"
"scale" : "2x",
"size" : "29x29"
},
{
"size" : "40x40",
"filename" : "icon87@3x.png",
"idiom" : "iphone",
"filename" : "icon120@3x.png",
"scale" : "3x"
"scale" : "3x",
"size" : "29x29"
},
{
"size" : "60x60",
"filename" : "icon80@2x.png",
"idiom" : "iphone",
"filename" : "icon120@2x.png",
"scale" : "2x"
"scale" : "2x",
"size" : "40x40"
},
{
"filename" : "icon120@3x.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"size" : "60x60",
"filename" : "icon120@2x.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"filename" : "icon180@3x.png",
"scale" : "3x"
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
}
Loading