From 5c410e0647a3b6743f3414b4425bf187568ac0a8 Mon Sep 17 00:00:00 2001 From: Alan Maynard Date: Wed, 21 Nov 2018 20:54:57 -0500 Subject: [PATCH] Remove boilerplate/unused classes and storyboard objects --- .../Base.lproj/Interface.storyboard | 51 +++---------------- .../InterfaceController.swift | 31 ----------- .../NotificationController.swift | 38 -------------- .../PushNotificationPayload.apns | 20 -------- .../project.pbxproj | 14 ----- .../SynchronyFinancial/ViewController.swift | 20 -------- 6 files changed, 8 insertions(+), 166 deletions(-) delete mode 100644 SynchronyFinancial/SynchronyFinancial WatchKit Extension/InterfaceController.swift delete mode 100644 SynchronyFinancial/SynchronyFinancial WatchKit Extension/NotificationController.swift delete mode 100644 SynchronyFinancial/SynchronyFinancial WatchKit Extension/PushNotificationPayload.apns delete mode 100644 SynchronyFinancial/SynchronyFinancial/ViewController.swift diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit App/Base.lproj/Interface.storyboard b/SynchronyFinancial/SynchronyFinancial WatchKit App/Base.lproj/Interface.storyboard index 365e83e..48b3384 100644 --- a/SynchronyFinancial/SynchronyFinancial WatchKit App/Base.lproj/Interface.storyboard +++ b/SynchronyFinancial/SynchronyFinancial WatchKit App/Base.lproj/Interface.storyboard @@ -1,47 +1,12 @@ - + + + + - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/InterfaceController.swift b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/InterfaceController.swift deleted file mode 100644 index 3b91734..0000000 --- a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/InterfaceController.swift +++ /dev/null @@ -1,31 +0,0 @@ -// -// InterfaceController.swift -// SynchronyFinancial WatchKit Extension -// -// Created by Alan Maynard on 11/15/18. -// Copyright © 2018 Alan Maynard. All rights reserved. -// - -import WatchKit -import Foundation - - -class InterfaceController: WKInterfaceController { - - override func awake(withContext context: Any?) { - super.awake(withContext: context) - - // Configure interface objects here. - } - - override func willActivate() { - // This method is called when watch view controller is about to be visible to user - super.willActivate() - } - - override func didDeactivate() { - // This method is called when watch view controller is no longer visible - super.didDeactivate() - } - -} diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/NotificationController.swift b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/NotificationController.swift deleted file mode 100644 index e29845a..0000000 --- a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/NotificationController.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// NotificationController.swift -// SynchronyFinancial WatchKit Extension -// -// Created by Alan Maynard on 11/15/18. -// Copyright © 2018 Alan Maynard. All rights reserved. -// - -import WatchKit -import Foundation -import UserNotifications - - -class NotificationController: WKUserNotificationInterfaceController { - - override init() { - // Initialize variables here. - super.init() - - // Configure interface objects here. - } - - override func willActivate() { - // This method is called when watch view controller is about to be visible to user - super.willActivate() - } - - override func didDeactivate() { - // This method is called when watch view controller is no longer visible - super.didDeactivate() - } - - override func didReceive(_ notification: UNNotification) { - // This method is called when a notification needs to be presented. - // Implement it if you use a dynamic notification interface. - // Populate your dynamic notification interface as quickly as possible. - } -} diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/PushNotificationPayload.apns b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/PushNotificationPayload.apns deleted file mode 100644 index 5ac5526..0000000 --- a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/PushNotificationPayload.apns +++ /dev/null @@ -1,20 +0,0 @@ -{ - "aps": { - "alert": { - "body": "Test message", - "title": "Optional title", - "subtitle": "Optional subtitle" - }, - "category": "myCategory", - "thread-id":"5280" - }, - - "WatchKit Simulator Actions": [ - { - "title": "First Button", - "identifier": "firstButtonAction" - } - ], - - "customKey": "Use this file to define a testing payload for your notifications. The aps dictionary specifies the category, alert text and title. The WatchKit Simulator Actions array can provide info for one or more action buttons in addition to the standard Dismiss button. Any other top level keys are custom payload. If you have multiple such JSON files in your project, you'll be able to select them when choosing to debug the notification interface of your Watch App." -} diff --git a/SynchronyFinancial/SynchronyFinancial.xcodeproj/project.pbxproj b/SynchronyFinancial/SynchronyFinancial.xcodeproj/project.pbxproj index f4be485..a968053 100644 --- a/SynchronyFinancial/SynchronyFinancial.xcodeproj/project.pbxproj +++ b/SynchronyFinancial/SynchronyFinancial.xcodeproj/project.pbxproj @@ -8,7 +8,6 @@ /* Begin PBXBuildFile section */ 67BAC269219E254700713FEF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67BAC268219E254700713FEF /* AppDelegate.swift */; }; - 67BAC26B219E254700713FEF /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67BAC26A219E254700713FEF /* ViewController.swift */; }; 67BAC26E219E254700713FEF /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 67BAC26C219E254700713FEF /* Main.storyboard */; }; 67BAC270219E254800713FEF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 67BAC26F219E254800713FEF /* Assets.xcassets */; }; 67BAC273219E254800713FEF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 67BAC271219E254800713FEF /* LaunchScreen.storyboard */; }; @@ -16,9 +15,7 @@ 67BAC27E219E254800713FEF /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 67BAC27C219E254800713FEF /* Interface.storyboard */; }; 67BAC280219E254800713FEF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 67BAC27F219E254800713FEF /* Assets.xcassets */; }; 67BAC287219E254900713FEF /* SynchronyFinancial WatchKit Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 67BAC286219E254900713FEF /* SynchronyFinancial WatchKit Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; - 67BAC28C219E254900713FEF /* InterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67BAC28B219E254900713FEF /* InterfaceController.swift */; }; 67BAC28E219E254900713FEF /* ExtensionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67BAC28D219E254900713FEF /* ExtensionDelegate.swift */; }; - 67BAC290219E254900713FEF /* NotificationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67BAC28F219E254900713FEF /* NotificationController.swift */; }; 67BAC292219E254900713FEF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 67BAC291219E254900713FEF /* Assets.xcassets */; }; /* End PBXBuildFile section */ @@ -67,7 +64,6 @@ /* Begin PBXFileReference section */ 67BAC265219E254700713FEF /* SynchronyFinancial.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SynchronyFinancial.app; sourceTree = BUILT_PRODUCTS_DIR; }; 67BAC268219E254700713FEF /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 67BAC26A219E254700713FEF /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 67BAC26D219E254700713FEF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 67BAC26F219E254800713FEF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 67BAC272219E254800713FEF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; @@ -77,12 +73,9 @@ 67BAC27F219E254800713FEF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 67BAC281219E254800713FEF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 67BAC286219E254900713FEF /* SynchronyFinancial WatchKit Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "SynchronyFinancial WatchKit Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; - 67BAC28B219E254900713FEF /* InterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InterfaceController.swift; sourceTree = ""; }; 67BAC28D219E254900713FEF /* ExtensionDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionDelegate.swift; sourceTree = ""; }; - 67BAC28F219E254900713FEF /* NotificationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationController.swift; sourceTree = ""; }; 67BAC291219E254900713FEF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 67BAC293219E254900713FEF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 67BAC294219E254900713FEF /* PushNotificationPayload.apns */ = {isa = PBXFileReference; lastKnownFileType = text; path = PushNotificationPayload.apns; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -127,7 +120,6 @@ isa = PBXGroup; children = ( 67BAC268219E254700713FEF /* AppDelegate.swift */, - 67BAC26A219E254700713FEF /* ViewController.swift */, 67BAC26C219E254700713FEF /* Main.storyboard */, 67BAC26F219E254800713FEF /* Assets.xcassets */, 67BAC271219E254800713FEF /* LaunchScreen.storyboard */, @@ -149,12 +141,9 @@ 67BAC28A219E254900713FEF /* SynchronyFinancial WatchKit Extension */ = { isa = PBXGroup; children = ( - 67BAC28B219E254900713FEF /* InterfaceController.swift */, 67BAC28D219E254900713FEF /* ExtensionDelegate.swift */, - 67BAC28F219E254900713FEF /* NotificationController.swift */, 67BAC291219E254900713FEF /* Assets.xcassets */, 67BAC293219E254900713FEF /* Info.plist */, - 67BAC294219E254900713FEF /* PushNotificationPayload.apns */, ); path = "SynchronyFinancial WatchKit Extension"; sourceTree = ""; @@ -291,7 +280,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 67BAC26B219E254700713FEF /* ViewController.swift in Sources */, 67BAC269219E254700713FEF /* AppDelegate.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -300,9 +288,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 67BAC290219E254900713FEF /* NotificationController.swift in Sources */, 67BAC28E219E254900713FEF /* ExtensionDelegate.swift in Sources */, - 67BAC28C219E254900713FEF /* InterfaceController.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/SynchronyFinancial/SynchronyFinancial/ViewController.swift b/SynchronyFinancial/SynchronyFinancial/ViewController.swift deleted file mode 100644 index d80e182..0000000 --- a/SynchronyFinancial/SynchronyFinancial/ViewController.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// ViewController.swift -// SynchronyFinancial -// -// Created by Alan Maynard on 11/15/18. -// Copyright © 2018 Alan Maynard. All rights reserved. -// - -import UIKit - -class ViewController: UIViewController { - - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view, typically from a nib. - } - - -} -