Skip to content

Commit

Permalink
Merge pull request #42 from kumpeapps/Development
Browse files Browse the repository at this point in the history
Release 2.1.0
  • Loading branch information
justinkumpe authored Feb 7, 2021
2 parents baafe43 + b52be6c commit 0fdd78f
Show file tree
Hide file tree
Showing 84 changed files with 674 additions and 110 deletions.
34 changes: 18 additions & 16 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.2)
CFPropertyList (3.0.3)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
atomos (0.1.3)
aws-eventstream (1.1.0)
aws-partitions (1.396.0)
aws-sdk-core (3.109.3)
aws-partitions (1.416.0)
aws-sdk-core (3.111.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.39.0)
aws-sdk-kms (1.41.0)
aws-sdk-core (~> 3, >= 3.109.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.84.1)
aws-sdk-s3 (1.87.0)
aws-sdk-core (~> 3, >= 3.109.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
Expand All @@ -29,23 +29,25 @@ GEM
highline (~> 1.7.2)
declarative (0.0.20)
declarative-option (0.1.0)
digest-crc (0.6.1)
rake (~> 13.0)
digest-crc (0.6.3)
rake (>= 12.0.0, < 14.0.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.7.6)
emoji_regex (3.2.1)
excon (0.78.0)
faraday (1.1.0)
excon (0.78.1)
faraday (1.3.0)
faraday-net_http (~> 1.0)
multipart-post (>= 1.2, < 3)
ruby2_keywords
faraday-cookie_jar (0.0.7)
faraday (>= 0.8.0)
http-cookie (~> 1.0.0)
faraday-net_http (1.0.1)
faraday_middleware (1.0.0)
faraday (~> 1.0)
fastimage (2.2.0)
fastlane (2.168.0)
fastimage (2.2.1)
fastlane (2.171.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
aws-sdk-s3 (~> 1.0)
Expand Down Expand Up @@ -96,7 +98,7 @@ GEM
google-cloud-env (1.4.0)
faraday (>= 0.17.3, < 2.0)
google-cloud-errors (1.0.1)
google-cloud-storage (1.29.1)
google-cloud-storage (1.29.2)
addressable (~> 2.5)
digest-crc (~> 0.4)
google-api-client (~> 0.33)
Expand All @@ -115,7 +117,7 @@ GEM
domain_name (~> 0.5)
httpclient (2.8.3)
jmespath (1.4.0)
json (2.3.1)
json (2.5.1)
jwt (2.2.2)
memoist (0.16.2)
mini_magick (4.11.0)
Expand All @@ -125,9 +127,9 @@ GEM
nanaimo (0.3.0)
naturally (2.2.0)
os (1.1.1)
plist (3.5.0)
plist (3.6.0)
public_suffix (4.0.6)
rake (13.0.1)
rake (13.0.3)
representable (3.0.4)
declarative (< 0.1.0)
declarative-option (< 0.2.0)
Expand Down Expand Up @@ -167,7 +169,7 @@ GEM
nanaimo (~> 0.3.0)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.0)
xcpretty-travis-formatter (1.0.1)
xcpretty (~> 0.2, >= 0.0.7)

PLATFORMS
Expand Down
16 changes: 12 additions & 4 deletions KKid.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
0F72B1452517B13F0099D2D9 /* AllowanceLedgerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F72B1442517B13F0099D2D9 /* AllowanceLedgerViewController.swift */; };
0F72B1472517BF0B0099D2D9 /* AllowanceAddTransactionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F72B1462517BF0B0099D2D9 /* AllowanceAddTransactionViewController.swift */; };
0F72B14A251974610099D2D9 /* AddUserViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F72B149251974610099D2D9 /* AddUserViewController.swift */; };
0F91098F25A64E71008E658F /* TMDb_Token.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F91098E25A64E71008E658F /* TMDb_Token.swift */; };
0F91099325A64FD2008E658F /* TMDb_Session.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F91099225A64FD2008E658F /* TMDb_Session.swift */; };
0F99D99B25734602007169B9 /* MovieDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F99D99925734602007169B9 /* MovieDetailViewController.swift */; };
0F99D99C25734602007169B9 /* MovieSearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F99D99A25734602007169B9 /* MovieSearchViewController.swift */; };
0F99D9A525734617007169B9 /* TMDb_Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F99D9A025734617007169B9 /* TMDb_Client.swift */; };
Expand Down Expand Up @@ -141,6 +143,8 @@
0F72B1442517B13F0099D2D9 /* AllowanceLedgerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllowanceLedgerViewController.swift; sourceTree = "<group>"; };
0F72B1462517BF0B0099D2D9 /* AllowanceAddTransactionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllowanceAddTransactionViewController.swift; sourceTree = "<group>"; };
0F72B149251974610099D2D9 /* AddUserViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddUserViewController.swift; sourceTree = "<group>"; };
0F91098E25A64E71008E658F /* TMDb_Token.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TMDb_Token.swift; sourceTree = "<group>"; };
0F91099225A64FD2008E658F /* TMDb_Session.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TMDb_Session.swift; sourceTree = "<group>"; };
0F99D99925734602007169B9 /* MovieDetailViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MovieDetailViewController.swift; sourceTree = "<group>"; };
0F99D99A25734602007169B9 /* MovieSearchViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MovieSearchViewController.swift; sourceTree = "<group>"; };
0F99D9A025734617007169B9 /* TMDb_Client.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TMDb_Client.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -391,6 +395,8 @@
0F99D9A425734617007169B9 /* TMDb_Video.swift */,
0FD8FC1A2574264400DE2749 /* TMDb_Movie_ReleaseDates.swift */,
0FD8FC1E257429D400DE2749 /* TMDb_TV.swift */,
0F91098E25A64E71008E658F /* TMDb_Token.swift */,
0F91099225A64FD2008E658F /* TMDb_Session.swift */,
);
path = Structs;
sourceTree = "<group>";
Expand Down Expand Up @@ -617,6 +623,7 @@
0FB98CF724FFB52000143A6A /* UIImage+Color.swift in Sources */,
0FD8FD0B25749EE600DE2749 /* Array+RemoveIndexes.swift in Sources */,
0F72B143251594740099D2D9 /* KKidClient+DELETE.swift in Sources */,
0F91098F25A64E71008E658F /* TMDb_Token.swift in Sources */,
0F2005FC257D670B00D9E4BE /* YOLOv3Int8LUT.mlmodel in Sources */,
0F48330D25105ED700B92ADB /* ChoreStatus.swift in Sources */,
0F2005EC257D607200D9E4BE /* AVCaptureViewController.swift in Sources */,
Expand Down Expand Up @@ -653,6 +660,7 @@
0F5EC89A24F98D0000873868 /* SceneDelegate.swift in Sources */,
0F99D99C25734602007169B9 /* MovieSearchViewController.swift in Sources */,
0F72B14A251974610099D2D9 /* AddUserViewController.swift in Sources */,
0F91099325A64FD2008E658F /* TMDb_Session.swift in Sources */,
0F311185251FE3F8004BB1E4 /* API_Credentials.swift in Sources */,
0F66BE3F25085E9000014A94 /* GCDBlackBox.swift in Sources */,
0F72B13B251592A00099D2D9 /* KKidClient+GET.swift in Sources */,
Expand Down Expand Up @@ -827,15 +835,15 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = KKid/KKid.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2.0.8.2;
CURRENT_PROJECT_VERSION = 2.1.0.3;
DEVELOPMENT_TEAM = 2T42Z3DM34;
INFOPLIST_FILE = KKid/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.0.8;
MARKETING_VERSION = 2.1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.kumpeapps.ios.KKid;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -850,15 +858,15 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = KKid/KKid.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2.0.8.2;
CURRENT_PROJECT_VERSION = 2.1.0.3;
DEVELOPMENT_TEAM = 2T42Z3DM34;
INFOPLIST_FILE = KKid/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.0.8;
MARKETING_VERSION = 2.1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.kumpeapps.ios.KKid;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand Down
2 changes: 1 addition & 1 deletion KKid.xcodeproj/xcshareddata/xcschemes/KKid.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1220"
LastUpgradeVersion = "1230"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion KKid.xcodeproj/xcshareddata/xcschemes/KKidUITests.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1220"
LastUpgradeVersion = "1230"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "icons8-heart_outline.png",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "icons8-test_passed.png",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 12 additions & 6 deletions KKid/Controller/HomeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,15 @@ class HomeViewController: UIViewController, UICollectionViewDelegate, UICollecti
@objc func buildModules() {
if let selectedUser = LoggedInUser.selectedUser {
modules = [KKid_Module.init(title: "Logout", segue: nil, icon: UIImage(named: "icons8-swirl")!, getRemoteIcon: true, remoteIconName: "icons8-shutdown-80.png")]
if LoggedInUser.selectedUser == LoggedInUser.user {
self.title = "\(selectedUser.emoji!) \(selectedUser.firstName ?? "") \(selectedUser.lastName ?? "")"
} else {
self.title = "Selected: \(selectedUser.emoji!) \(selectedUser.firstName ?? "") \(selectedUser.lastName ?? "")"

dispatchOnMain {
if LoggedInUser.selectedUser == LoggedInUser.user {
self.title = "\(selectedUser.emoji!) \(selectedUser.firstName ?? "") \(selectedUser.lastName ?? "")"
} else {
self.title = "Selected: \(selectedUser.emoji!) \(selectedUser.firstName ?? "") \(selectedUser.lastName ?? "")"
}
}

if selectedUser.enableChores {
modules.append(KKid_Module.init(title: "Chores", segue: "segueChores", icon: UIImage(named: "icons8-swirl")!, getRemoteIcon: true, remoteIconName: "icons8-to-do-80.png"))
}
Expand All @@ -170,7 +174,7 @@ class HomeViewController: UIViewController, UICollectionViewDelegate, UICollecti
}

if selectedUser.enableTmdb {
modules.append(KKid_Module.init(title: "Search Movies", segue: "segueSearchMovies", icon: UIImage(named: "tmdb")!, getRemoteIcon: false, remoteIconName: nil))
modules.append(KKid_Module.init(title: "Movies DB", segue: "segueSearchMovies", icon: UIImage(named: "tmdb")!, getRemoteIcon: false, remoteIconName: nil))
}

if selectedUser.enableObjectDetection {
Expand All @@ -193,7 +197,9 @@ class HomeViewController: UIViewController, UICollectionViewDelegate, UICollecti

}

collectionView.reloadData()
dispatchOnMain {
self.collectionView.reloadData()
}
}

// MARK: pressedLogout
Expand Down
100 changes: 100 additions & 0 deletions KKid/Controller/MovieDetailViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class MovieDetailViewController: UIViewController, YTSwiftyPlayerDelegate {
@IBOutlet weak var imageBackground: UIButton!
@IBOutlet weak var buttonMovieRating: UIButton!
@IBOutlet weak var buttonTmdb: UIButton!
@IBOutlet weak var buttonFavorite: UIButton!
@IBOutlet weak var buttonWatchList: UIButton!

// MARK: images
@IBOutlet weak var imageMovieRating: UIImageView!
Expand Down Expand Up @@ -66,6 +68,8 @@ class MovieDetailViewController: UIViewController, YTSwiftyPlayerDelegate {
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
getMovieRating()
getFavorites()
getWatchlist()
}

// MARK: viewWillDisappear
Expand Down Expand Up @@ -149,4 +153,100 @@ class MovieDetailViewController: UIViewController, YTSwiftyPlayerDelegate {
}
}

@IBAction func pressedFavorite(_ sender: Any) {
guard let user = LoggedInUser.selectedUser else {
return
}
guard let sessionId = user.tmdbKey, sessionId != "" else {
ShowAlert.banner(title: "TMDb Account Not Linked", message: "This feature requires a TMDb account to be linked to this user via edit profile.")
return
}
selectedMovie.favorite = !selectedMovie.favorite!
updateFavoriteButton(selectedMovie.favorite!)
TMDb_Client.postFavorite(sessionId: sessionId, mediaType: "movie", mediaId: selectedMovie.id!, favorite: selectedMovie.favorite!) { (success) in
if success {
Logger.log(.success, "marked as favorite \(self.selectedMovie.favorite!)")
} else {
Logger.log(.error, "mark as favorite error")
}
}
}

@IBAction func pressedWatchList(_ sender: Any) {
guard let user = LoggedInUser.selectedUser else {
return
}
guard let sessionId = user.tmdbKey, sessionId != "" else {
ShowAlert.banner(title: "TMDb Account Not Linked", message: "This feature requires a TMDb account to be linked to this user via edit profile.")
return
}
selectedMovie.watchList = !selectedMovie.watchList!
updateWatchlistButton(selectedMovie.watchList!)
TMDb_Client.postWatchlist(sessionId: sessionId, mediaType: "movie", mediaId: selectedMovie.id!, watchlist: selectedMovie.watchList!) { (success) in
if success {
Logger.log(.success, "marked as watchList \(self.selectedMovie.watchList!)")
} else {
Logger.log(.error, "mark as watchList error")
}
}
}

// MARK: updateFavoriteButton
func updateFavoriteButton(_ favorite: Bool) {
if favorite {
buttonFavorite.alpha = 1
} else {
buttonFavorite.alpha = 0.5
}
}

// MARK: updateWatchlistButton
func updateWatchlistButton(_ watchlist: Bool) {
if watchlist {
buttonWatchList.alpha = 1
} else {
buttonWatchList.alpha = 0.5
}
}

// MARK: getFavorites
func getFavorites() {
guard let sessionID = LoggedInUser.selectedUser!.tmdbKey, sessionID != "" else {
return
}
let movieID = selectedMovie.id
selectedMovie.favorite = false
TMDb_Client.getFavoriteMovies(sessionId: sessionID) { (success, response) in
if success {
guard let movies = response?.results else {
return
}
for movie in movies where movie.id == movieID {
self.selectedMovie.favorite = true
self.updateFavoriteButton(true)
}
}
}
}

// MARK: getWatchlist
func getWatchlist() {
guard let sessionID = LoggedInUser.selectedUser!.tmdbKey, sessionID != "" else {
return
}
let movieID = selectedMovie.id
selectedMovie.watchList = false
TMDb_Client.getMovieWatchlist(sessionId: sessionID) { (success, response) in
if success {
guard let movies = response?.results else {
return
}
for movie in movies where movie.id == movieID {
self.selectedMovie.watchList = true
self.updateWatchlistButton(true)
}
}
}
}

}
Loading

0 comments on commit 0fdd78f

Please sign in to comment.