Skip to content
Merged
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
10 changes: 0 additions & 10 deletions Core/Constants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,4 @@ public enum Constants {
public static let widgetBundle = "pro.ziganshin.GrowingUp.Widget"
public static let widgetPersonIndexKey = "personIndex"
public static let openPersonNotification = Notification.Name(rawValue: "pro.ziganshin.GrowingUp.openPersonWithIndex")

// static let swiftyBearAppId = "bJPXa3"
// static let swiftyBearAppSecret = "q0fxlcfjfoajqbjpw2wlrwfc6gvunh5k"
// static let swiftyBearEncryption = "rteZzjbjHucLtxjeiaicf8nfcLkEra6e"
// static let mixpanelToken = "cf19da2125b5c9625a5de1f21696f45b"

public static let obfusSBAppId: [UInt8] = [54, 43, 35, 51, 44, 82]
public static let obfusSBAppSecret: [UInt8] = [37, 81, 21, 19, 33, 2, 8, 11, 1, 10, 19, 36, 34, 45, 8, 26, 18, 81, 3, 56, 19, 4, 13, 46, 87, 9, 23, 18, 11, 26, 123, 56]
public static let obfusSBEncryption: [UInt8] = [38, 21, 22, 49, 55, 11, 12, 11, 47, 16, 17, 2, 39, 55, 8, 15, 12, 2, 29, 55, 7, 75, 5, 43, 2, 34, 10, 34, 23, 19, 120, 54]
public static let obfusMPToken: [UInt8] = [55, 7, 66, 82, 41, 0, 92, 80, 85, 80, 16, 123, 48, 118, 84, 88, 80, 2, 65, 48, 4, 66, 13, 127, 80, 88, 88, 81, 3, 70, 123, 49]
}
15 changes: 0 additions & 15 deletions Core/Logging.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,6 @@ import Foundation
public enum Logging {

public static func setup() {
// let console = ConsoleDestination()
// let file = FileDestination()
// let obfuscator = Obfuscator()
// let appId = obfuscator.reveal(key: Constants.obfusSBAppId)
// let appSecretId = obfuscator.reveal(key: Constants.obfusSBAppSecret)
// let encryption = obfuscator.reveal(key: Constants.obfusSBEncryption)
// let platform = SBPlatformDestination(appID: appId, appSecret: appSecretId, encryptionKey: encryption)
// #if DEBUG
// file.logFileURL = URL(fileURLWithPath: "/tmp/swiftybeaver.log")
// #endif
// SwiftyBeaver.addDestination(console)
// SwiftyBeaver.addDestination(file)
// SwiftyBeaver.addDestination(platform)
//
// Mixpanel.sharedInstance(withToken: obfuscator.reveal(key: Constants.obfusMPToken))
}

public static func logError(_ error: CoreError) {
Expand Down
80 changes: 0 additions & 80 deletions Core/iOS Framework APIs/Obfuscator.swift

This file was deleted.

24 changes: 10 additions & 14 deletions GrowingUp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 56;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -67,7 +67,6 @@
096E61ED226667F6000181D4 /* AddPersonConfigurator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 096E61EC226667F6000181D4 /* AddPersonConfigurator.swift */; };
096E61EF22666D46000181D4 /* AddPersonPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 096E61EE22666D46000181D4 /* AddPersonPresenter.swift */; };
0978FDE7227256ED00487BC2 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0978FDE9227256ED00487BC2 /* Localizable.strings */; };
097E1AEE22739175003D4FB4 /* Obfuscator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 097E1AED22739175003D4FB4 /* Obfuscator.swift */; };
097E1AF82274D620003D4FB4 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 097E1AF62274D620003D4FB4 /* Localizable.strings */; };
098054F6223C296600E24D40 /* AddPersonPresenterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 098054F5223C296600E24D40 /* AddPersonPresenterTests.swift */; };
098054F9223C2A7900E24D40 /* EditPersonViewSpy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 098054F8223C2A7900E24D40 /* EditPersonViewSpy.swift */; };
Expand Down Expand Up @@ -265,7 +264,6 @@
096E61F022666DC9000181D4 /* EditPersonUseCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditPersonUseCase.swift; sourceTree = "<group>"; };
0978FDE8227256ED00487BC2 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = "<group>"; };
0978FDEA227256FF00487BC2 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
097E1AED22739175003D4FB4 /* Obfuscator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Obfuscator.swift; sourceTree = "<group>"; };
097E1AF72274D620003D4FB4 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
097E1AF92274D630003D4FB4 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = "<group>"; };
098054F5223C296600E24D40 /* AddPersonPresenterTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddPersonPresenterTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -577,7 +575,6 @@
isa = PBXGroup;
children = (
092AA35D2257C79D002EAEE8 /* TaskManager.swift */,
097E1AED22739175003D4FB4 /* Obfuscator.swift */,
);
path = "iOS Framework APIs";
sourceTree = "<group>";
Expand Down Expand Up @@ -1011,7 +1008,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1010;
LastUpgradeCheck = 1010;
LastUpgradeCheck = 2600;
ORGANIZATIONNAME = zigdanis;
TargetAttributes = {
09051B3A21C558DB008A99C6 = {
Expand Down Expand Up @@ -1201,7 +1198,6 @@
09F6B52623535E26003A1A01 /* MemoryCache.swift in Sources */,
09E75944227735E9005025AD /* UUID+Extensions.swift in Sources */,
0983E764226D9652007EC8D2 /* AddPersonUseCase.swift in Sources */,
097E1AEE22739175003D4FB4 /* Obfuscator.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -1386,7 +1382,7 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = XMSU8WJG5R;
INFOPLIST_FILE = Widget/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -1409,7 +1405,7 @@
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = XMSU8WJG5R;
INFOPLIST_FILE = Widget/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -1442,7 +1438,7 @@
GCC_DYNAMIC_NO_PIC = NO;
INFOPLIST_FILE = Core/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
LD_NO_PIE = NO;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -1479,7 +1475,7 @@
GCC_DYNAMIC_NO_PIC = NO;
INFOPLIST_FILE = Core/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
LD_NO_PIE = NO;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -1592,7 +1588,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -1648,7 +1644,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
Expand All @@ -1669,7 +1665,7 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = XMSU8WJG5R;
INFOPLIST_FILE = "GrowingUp/Supporting Files//Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -1693,7 +1689,7 @@
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = XMSU8WJG5R;
INFOPLIST_FILE = "GrowingUp/Supporting Files//Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import UIKit

protocol WDImageCropControllerDelegate: class {
protocol WDImageCropControllerDelegate: AnyObject {
func imageCropController(_ imageCropController: WDImageCropViewController, didFinishWithCroppedImage croppedImage: UIImage)
func imageCropControllerFailedCroppingImage(_ imageCropController: WDImageCropViewController)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ enum CropSize {
case circle
}

protocol WDImagePickerDelegate: class {
protocol WDImagePickerDelegate: AnyObject {
func imagePicker(_ imagePicker: WDImagePicker, pickedImage: UIImage)
func imagePickerDidCancel(_ imagePicker: WDImagePicker)
}
Expand Down
8 changes: 2 additions & 6 deletions GrowingUp/Others/UIColor+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ extension UIColor {
static let darkBg = UIColor.black

static func bgColor(for traitCollection: UITraitCollection) -> UIColor {
if #available(iOS 12.0, *) {
let isLight = traitCollection.userInterfaceStyle == .light
return isLight ? .lightBg : .darkBg
} else {
return .white
}
let isLight = traitCollection.userInterfaceStyle == .light
return isLight ? .lightBg : .darkBg
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import Foundation

protocol DateCellPresenter: class {
protocol DateCellPresenter: AnyObject {
func configure(cell: DateCellView, forRow row: Int)
func valueFor(row: Int, didChangeTo value: Date)
func valueFor(row: Int) -> Date?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import Foundation
import Core

protocol ImagesCellPresenter: class {
protocol ImagesCellPresenter: AnyObject {
func configure(cell: ImagesCellView, forRow row: Int, with delegate: ImagesCellViewDelegate)
func valueFor(row: Int, didChangeTo value: PersonImages)
func valueFor(row: Int) -> PersonImages?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
import UIKit
import Core

protocol ImagesCellView: class {
protocol ImagesCellView: AnyObject {
func display(appPic: PersonImage?)
func display(widgetPic: PersonImage?)
func setup(with delegate: ImagesCellViewDelegate, forRow row: Int)
}

protocol ImagesCellViewDelegate: class {
protocol ImagesCellViewDelegate: AnyObject {
func showAppPicImagePickerFor(row: Int)
func showWidgetPicImagePickerFor(row: Int)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import Foundation

protocol TextFieldCellPresenter: class {
protocol TextFieldCellPresenter: AnyObject {
func configure(cell: TextFieldCellView, forRow row: Int)
func valueFor(row: Int, didChangeTo value: String)
func valueFor(row: Int) -> String?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

import UIKit

protocol TextFieldCellView: class {
protocol TextFieldCellView: AnyObject {
func display(title: String)
func display(value: String)
func display(placeholder: String)
func setup(with presenter: TextFieldCellPresenter, observer: TextFieldObserver?, forRow row: Int)
}

protocol TextFieldObserver: class {
protocol TextFieldObserver: AnyObject {
func textDidChange(forView: TextFieldCellView, text: String)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import Foundation

protocol ToggleCellPresenter: class {
protocol ToggleCellPresenter: AnyObject {
func configure(cell: ToggleCellView, forRow row: Int)
func valueFor(row: Int, didChangeTo value: Bool)
func valueFor(row: Int) -> Bool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ protocol ToggleCellView {
func setup(with delegate: ToggleCellDelegate?, forRow row: Int)
}

protocol ToggleCellDelegate: class {
protocol ToggleCellDelegate: AnyObject {
func toggle(toggle: ToggleCellView, didChangeStateForRow row: Int, to state: Bool)
}

Expand Down
2 changes: 1 addition & 1 deletion GrowingUp/Scenes/EditPerson/Edit/EditPersonPresenter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ protocol EditPersonPresenter: TextFieldObserver, ToggleCellDelegate {
func shouldShowRemoveButton() -> Bool
}

protocol EditPersonPresenterDelegate: class {
protocol EditPersonPresenterDelegate: AnyObject {
func editPersonPresenter(_ presenter: EditPersonPresenter, didAdd person: Person)
func editPersonPresenter(_ presenter: EditPersonPresenter, didEdit person: Person)
func editPersonPresenter(_ presenter: EditPersonPresenter, didRemove person: Person)
Expand Down
2 changes: 1 addition & 1 deletion GrowingUp/Scenes/EditPerson/Views/DatePickerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import UIKit

protocol DatePickerViewDelegate: class {
protocol DatePickerViewDelegate: AnyObject {
func datePicker(picker: DatePickerView, selectedDate date: Date)
func datePickerDidHide(picker: DatePickerView)
}
Expand Down
2 changes: 1 addition & 1 deletion GrowingUp/Scenes/EditPerson/Views/RemoveButtonFooter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import UIKit

protocol RemoveButtonDelegate: class {
protocol RemoveButtonDelegate: AnyObject {
func removeTouched()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,12 @@ final class PersonOverviewViewController: UIViewController, PersonOverviewView {
}

private func setupPersonNameTopConstraint() {
let top = personName.topAnchor.constraint(equalTo: topLayoutGuide.bottomAnchor)
let top = personName.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor)
top.isActive = true
}

private func setupNoPicPlaceholder() {
if #available(iOS 11.0, *) {
noPicPlaceholder.text = "🤷"
} else {
noPicPlaceholder.text = "¯\\_(ツ)_/¯"
}
noPicPlaceholder.text = "🤷"
}

private func setupTapGesture() {
Expand Down
Loading