Skip to content

Commit

Permalink
necessary updates to work with IOS 11
Browse files Browse the repository at this point in the history
  • Loading branch information
cemheren committed Mar 21, 2020
1 parent 01446f3 commit 0f71902
Show file tree
Hide file tree
Showing 13 changed files with 114 additions and 58 deletions.
4 changes: 2 additions & 2 deletions Podfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Uncomment the next line to define a global platform for your project
platform :ios, '10.3'
platform :ios, '11'

target 'akifkeyboard' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod "KeyboardAdjuster", "~> 3"
pod "KeyboardAdjuster"
pod "QuickTableView"
pod 'LionheartExtensions'
pod 'SuperLayout'
Expand Down
40 changes: 20 additions & 20 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
PODS:
- KeyboardAdjuster (3.0.3)
- LionheartExtensions (3.15.0):
- LionheartExtensions/Core (= 3.15.0)
- LionheartExtensions/Core (3.15.0)
- QuickTableView (2.6.2):
- KeyboardAdjuster (~> 3)
- SuperLayout (1.0.1):
- SuperLayout/Core (= 1.0.1)
- SuperLayout/Core (1.0.1)
- TipJarViewController (0.1.3):
- LionheartExtensions (~> 3.0)
- QuickTableView (~> 2.0)
- SuperLayout (~> 1.0)
- KeyboardAdjuster (4.0.0)
- LionheartExtensions (5.0.2):
- LionheartExtensions/Core (= 5.0.2)
- LionheartExtensions/Core (5.0.2)
- QuickTableView (3.0.0):
- KeyboardAdjuster (~> 4)
- SuperLayout (2.0.0):
- SuperLayout/Core (= 2.0.0)
- SuperLayout/Core (2.0.0)
- TipJarViewController (1.1.0):
- LionheartExtensions (~> 5)
- QuickTableView (~> 3)
- SuperLayout (~> 2)

DEPENDENCIES:
- KeyboardAdjuster (~> 3)
- KeyboardAdjuster
- LionheartExtensions
- QuickTableView
- SuperLayout
Expand All @@ -29,12 +29,12 @@ SPEC REPOS:
- TipJarViewController

SPEC CHECKSUMS:
KeyboardAdjuster: 3a7d4c7ce5c120f2fdfce88334ee59339e01dd6b
LionheartExtensions: 199f618c204b3d6a3a31fb5adef49d049bb3206d
QuickTableView: 6c7689b1b392e8d4d01c26161ca0c3b7a2079435
SuperLayout: 8d8a8399366e130f244963d97bd04a66fd08d368
TipJarViewController: fa08321344b0989304817ffe26a00b13291fc65e
KeyboardAdjuster: 50eec4e8d52fd5d7f5df74fc07193cdadcc88abb
LionheartExtensions: 09fa816d98176012c8f9adf7f21774f528dbc90e
QuickTableView: 296b258f41ac91521ae517404646da4beab73fa3
SuperLayout: 0208ad821522fb50b62d9b8b808690d190a871ea
TipJarViewController: 96ca084840cec265f2aea1d9d66800f9df71b72a

PODFILE CHECKSUM: 6e6657b59d785c8be98101e294129b0316f4a034
PODFILE CHECKSUM: c3cc00e151859cf164e672e74f40de0dadc6d689

COCOAPODS: 1.5.3
30 changes: 24 additions & 6 deletions akifkeyboard.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
3A3D28322186CB630058B4EB /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3ACC4A0B212538ED006A7EC5 /* Main.storyboard */; };
3A55FBCC223598C1006C4C8C /* KeyButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A55FBCB223598C1006C4C8C /* KeyButton.swift */; };
3A55FBCD223598C1006C4C8C /* KeyButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A55FBCB223598C1006C4C8C /* KeyButton.swift */; };
3A55FBD022505D7B006C4C8C /* UndoController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A55FBCF22505D7B006C4C8C /* UndoController.swift */; };
3A55FBD122505D7B006C4C8C /* UndoController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A55FBCF22505D7B006C4C8C /* UndoController.swift */; };
3A79C4C5213E85FF00218EE8 /* English.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A79C4C4213E85FF00218EE8 /* English.swift */; };
3A79C4C6213E85FF00218EE8 /* English.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A79C4C4213E85FF00218EE8 /* English.swift */; };
3A79C4C8213E885900218EE8 /* SettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A79C4C7213E885900218EE8 /* SettingsViewController.swift */; };
Expand Down Expand Up @@ -132,6 +134,7 @@
3A34F45E21426CA4009FA33C /* english_bigram_probabilities.csv */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = english_bigram_probabilities.csv; path = prep/english/english_bigram_probabilities.csv; sourceTree = SOURCE_ROOT; };
3A34F46121426DA9009FA33C /* NextWord.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NextWord.swift; sourceTree = "<group>"; };
3A55FBCB223598C1006C4C8C /* KeyButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyButton.swift; sourceTree = "<group>"; };
3A55FBCF22505D7B006C4C8C /* UndoController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UndoController.swift; sourceTree = "<group>"; };
3A79C4C4213E85FF00218EE8 /* English.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = English.swift; sourceTree = "<group>"; };
3A79C4C7213E885900218EE8 /* SettingsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsViewController.swift; sourceTree = "<group>"; };
3A79C4CA213E8E0D00218EE8 /* keyboardExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = keyboardExtension.entitlements; sourceTree = "<group>"; };
Expand Down Expand Up @@ -230,6 +233,14 @@
path = KeyboardVisual;
sourceTree = "<group>";
};
3A55FBCE22505D66006C4C8C /* Undo */ = {
isa = PBXGroup;
children = (
3A55FBCF22505D7B006C4C8C /* UndoController.swift */,
);
path = Undo;
sourceTree = "<group>";
};
3A79C4C3213E85E100218EE8 /* Specializations */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -307,6 +318,7 @@
3ACC4A1E21253901006A7EC5 /* keyboardExtension */ = {
isa = PBXGroup;
children = (
3A55FBCE22505D66006C4C8C /* Undo */,
3A55FBCA22359890006C4C8C /* KeyboardVisual */,
3AF10FA922192CFC00CA845E /* SpecialRow */,
3AF10FA22218F27000CA845E /* Extensions */,
Expand Down Expand Up @@ -506,13 +518,15 @@
"${BUILT_PRODUCTS_DIR}/LionheartExtensions/LionheartExtensions.framework",
"${BUILT_PRODUCTS_DIR}/QuickTableView/QuickTableView.framework",
"${BUILT_PRODUCTS_DIR}/SuperLayout/SuperLayout.framework",
"${BUILT_PRODUCTS_DIR}/TipJarViewController/TipJarViewController.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/KeyboardAdjuster.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/LionheartExtensions.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/QuickTableView.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SuperLayout.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/TipJarViewController.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand Down Expand Up @@ -567,6 +581,7 @@
3A34F46221426DA9009FA33C /* NextWord.swift in Sources */,
3ACC4A2A21253B41006A7EC5 /* KeyboardViewController.swift in Sources */,
3A55FBCC223598C1006C4C8C /* KeyButton.swift in Sources */,
3A55FBD022505D7B006C4C8C /* UndoController.swift in Sources */,
3A1F65C2219D0C630035D4F7 /* TipJarTableViewCell.swift in Sources */,
3AF10FAB22192D4000CA845E /* SpecialRowKeyButton.swift in Sources */,
3AA7F0AA212BA76E00949D0B /* SpecialRowController.swift in Sources */,
Expand Down Expand Up @@ -622,6 +637,7 @@
3ABB722C22264587003B7AC9 /* StoreKitItemDelegate.swift in Sources */,
3AF10FAF221A39B400CA845E /* QuickFixTextExtension.swift in Sources */,
3A34F46321426DA9009FA33C /* NextWord.swift in Sources */,
3A55FBD122505D7B006C4C8C /* UndoController.swift in Sources */,
3AF03E06212E81DB000C07C7 /* CorrectSpelling.swift in Sources */,
3ABB722F22264819003B7AC9 /* ExtensionConfigurations.swift in Sources */,
3AEE552521294BB4006979FE /* SpellcheckController.swift in Sources */,
Expand Down Expand Up @@ -716,6 +732,7 @@
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand Down Expand Up @@ -769,6 +786,7 @@
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_VERSION = 5.0;
VALIDATE_PRODUCT = YES;
};
name = Release;
Expand All @@ -783,14 +801,14 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 28RCJTKZ47;
INFOPLIST_FILE = akifkeyboard/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.heren.kifboard;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -805,14 +823,14 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 28RCJTKZ47;
INFOPLIST_FILE = akifkeyboard/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.heren.kifboard;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand All @@ -834,7 +852,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.heren.kifboard.keyboardExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
};
name = Debug;
Expand All @@ -856,7 +874,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.heren.kifboard.keyboardExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
};
name = Release;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<key>akifkeyboard.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>6</integer>
<integer>7</integer>
</dict>
<key>keyboardExtension.xcscheme</key>
<dict>
Expand All @@ -22,7 +22,7 @@
<key>keyboardExtension.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>7</integer>
<integer>8</integer>
</dict>
</dict>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion akifkeyboard/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
let storyBoard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let nav = storyBoard.instantiateInitialViewController()
Expand Down
18 changes: 9 additions & 9 deletions akifkeyboard/Extensions/ExtensionsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class ExtensionsController: UIViewController, UITableViewDelegate, UITableViewDa
func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {

if(self.selectedExtensions.contains(self.extensions[indexPath.row].identifier)){
self.tableView.selectRow(at: indexPath, animated: true, scrollPosition: UITableViewScrollPosition.none)
self.tableView.selectRow(at: indexPath, animated: true, scrollPosition: UITableView.ScrollPosition.none)
//self.tableView.delegate?.tableView!(self.tableView, didSelectRowAt: indexPath)
}
}
Expand All @@ -100,19 +100,19 @@ class ExtensionsController: UIViewController, UITableViewDelegate, UITableViewDa
// create a new cell if needed or reuse an old one
let c = self.tableView.dequeueReusableCell(withIdentifier: self.cellReuseIdentifier);
let cell: ExtensionCell = c as! ExtensionCell
cell.selectionStyle = UITableViewCellSelectionStyle.none;
cell.selectionStyle = UITableViewCell.SelectionStyle.none;

// set the text from the data model
//cell.textLabel?.text = self.extensions[indexPath.row]
cell.cellTitle.text = self.extensions[indexPath.row].identifier
cell.cellDescription.text = self.extensions[indexPath.row].description

cell.purchaseButton.setTitle(self.extensions[indexPath.row].price, for: UIControlState.normal)
cell.purchaseButton.setTitle(self.extensions[indexPath.row].price, for: UIControl.State.normal)

if(cell.isSelected ||
self.selectedExtensions.contains(self.extensions[indexPath.row].identifier))
{
cell.purchaseButton.setTitle("Enabled", for: UIControlState.normal)
cell.purchaseButton.setTitle("Enabled", for: UIControl.State.normal)
}

cell.purchaseButton.layer.borderColor = self.view.tintColor.cgColor;
Expand All @@ -130,7 +130,7 @@ class ExtensionsController: UIViewController, UITableViewDelegate, UITableViewDa
print("You de-selected cell \(self.extensions[indexPath.row]).")

var selectedCell = self.tableView.cellForRow(at: indexPath) as! ExtensionCell
selectedCell.purchaseButton.setTitle("Removed", for: UIControlState.normal)
selectedCell.purchaseButton.setTitle("Removed", for: UIControl.State.normal)

self.selectedExtensions.remove(self.extensions[indexPath.row].identifier)

Expand All @@ -146,7 +146,7 @@ class ExtensionsController: UIViewController, UITableViewDelegate, UITableViewDa
self.storeKit?.purchase(productID: self.extensions[indexPath.row].sku)

let selectedCell = self.tableView.cellForRow(at: indexPath) as! ExtensionCell
selectedCell.purchaseButton.setTitle("Waiting", for: UIControlState.normal)
selectedCell.purchaseButton.setTitle("Waiting", for: UIControl.State.normal)

self.selectedCell = selectedCell
self.selectedExtension = self.extensions[indexPath.row]
Expand Down Expand Up @@ -183,7 +183,7 @@ class ExtensionsController: UIViewController, UITableViewDelegate, UITableViewDa
self.selectedExtension = e;
self.selectedCell = self.tableView.cellForRow(at: IndexPath(row: i, section: 0)) as! ExtensionCell

self.tableView.selectRow(at: IndexPath(row: i, section: 0), animated: true, scrollPosition: UITableViewScrollPosition.none)
self.tableView.selectRow(at: IndexPath(row: i, section: 0), animated: true, scrollPosition: UITableView.ScrollPosition.none)

return
}
Expand All @@ -197,7 +197,7 @@ class ExtensionsController: UIViewController, UITableViewDelegate, UITableViewDa
func AddSelectedExtension(){
self.selectedExtensions.insert(self.selectedExtension!.identifier)

self.selectedCell!.purchaseButton.setTitle("Enabled", for: UIControlState.normal)
self.selectedCell!.purchaseButton.setTitle("Enabled", for: UIControl.State.normal)

if let userDefaults = UserDefaults(suiteName: "group.heren.kifboard") {
userDefaults.set(Array(self.selectedExtensions), forKey: "extensions")
Expand All @@ -207,7 +207,7 @@ class ExtensionsController: UIViewController, UITableViewDelegate, UITableViewDa
func OnTransactionError(error: NSError) {
let alert = UIAlertController(title: "Error", message: "There was an error with your transaction. Please try restoring your purchases.", preferredStyle: .actionSheet)

self.selectedCell!.purchaseButton.setTitle("Error", for: UIControlState.normal)
self.selectedCell!.purchaseButton.setTitle("Error", for: UIControl.State.normal)

alert.addAction(UIAlertAction(title: "OK", style: .default, handler: { action in
switch action.style{
Expand Down
2 changes: 1 addition & 1 deletion akifkeyboard/SettingsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class SettingsController: UIViewController, UITableViewDelegate, UITableViewData
// create a cell for each table view row
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
// create a new cell if needed or reuse an old one
let cell:UITableViewCell = self.tableView.dequeueReusableCell(withIdentifier: cellReuseIdentifier) as UITableViewCell!
let cell:UITableViewCell = (self.tableView.dequeueReusableCell(withIdentifier: cellReuseIdentifier) as UITableViewCell?)!

// set the text from the data model
cell.textLabel?.text = self.flavors[indexPath.row]
Expand Down
11 changes: 3 additions & 8 deletions akifkeyboard/TipJar/ActivityIndicatorTableViewCell.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
//
// ActivityIndicatorTableViewCell.swift
//
// Created by Daniel Loewenherz on 10/21/17.
// Copyright © 2017 Lionheart Software. All rights reserved.
//


import Foundation

Expand All @@ -14,12 +9,12 @@ import SuperLayout
final class ActivityIndicatorTableViewCell: UITableViewCell {
var activityIndicator: UIActivityIndicatorView!

override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: .default, reuseIdentifier: reuseIdentifier)

textLabel?.text = "Loading..."

activityIndicator = UIActivityIndicatorView(activityIndicatorStyle: .gray)
activityIndicator = UIActivityIndicatorView(style: .gray)
activityIndicator.startAnimating()

accessoryView = activityIndicator
Expand Down
2 changes: 1 addition & 1 deletion akifkeyboard/TipJar/MultilineTableViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class MultilineTableViewCell: UITableViewCell {
override var textLabel: UILabel? { return theTextLabel }
override var detailTextLabel: UILabel? { return theDetailTextLabel }

override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: .default, reuseIdentifier: reuseIdentifier)

theTextLabel = UILabel()
Expand Down
2 changes: 1 addition & 1 deletion akifkeyboard/TipJar/TipJarTableViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ final class TipJarTableViewCell: UITableViewCell {
override var textLabel: UILabel? { return theTextLabel }
override var detailTextLabel: UILabel? { return theDetailTextLabel }

override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: .default, reuseIdentifier: reuseIdentifier)

accessoryType = .none
Expand Down
8 changes: 4 additions & 4 deletions akifkeyboard/TipJar/TipJarViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ open class TipJarViewController<T>: BaseTableViewController, UITableViewDelegate
super.init()
}

@objc override init(style: UITableViewStyle) {
@objc override init(style: UITableView.Style) {
super.init(style: style)
}

Expand Down Expand Up @@ -251,7 +251,7 @@ open class TipJarViewController<T>: BaseTableViewController, UITableViewDelegate
}

public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
switch Section(section: section, container: sectionContainer) {
switch Section(at: section, container: sectionContainer) {
case .top: return 1
// case .legal: return LegalRow.count
case .couldNotLoad: return 1
Expand All @@ -264,7 +264,7 @@ open class TipJarViewController<T>: BaseTableViewController, UITableViewDelegate
}

public func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
switch Section(section: section, container: sectionContainer) {
switch Section(at: section, container: sectionContainer) {
case .top: return nil
// case .legal: return LegalRow.title
case .couldNotLoad: return nil
Expand All @@ -277,7 +277,7 @@ open class TipJarViewController<T>: BaseTableViewController, UITableViewDelegate
}

public func tableView(_ tableView: UITableView, titleForFooterInSection section: Int) -> String? {
switch Section(section: section, container: sectionContainer) {
switch Section(at: section, container: sectionContainer) {
case .top: return nil
// case .legal: return nil
case .couldNotLoad: return nil
Expand Down
Loading

0 comments on commit 0f71902

Please sign in to comment.