Skip to content
This repository has been archived by the owner on Oct 5, 2019. It is now read-only.

Kellyroach/fix warnings #76

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
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
89 changes: 33 additions & 56 deletions DemoApp/DemoApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

/* Begin PBXBuildFile section */
191FF0FFCC8156460546E43A /* Pods_DemoApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E13E2EBAF8AC955FF850B86 /* Pods_DemoApp.framework */; };
2001BA381FA0EF0F0074EA67 /* Config.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 2001BA371FA0EF0F0074EA67 /* Config.xcconfig */; };
20ABD1D71F0188DD00DCA2E0 /* TweetCollectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20ABD1D61F0188DC00DCA2E0 /* TweetCollectionViewController.swift */; };
377340651ECA3D080065FFE0 /* DeletedTweet.json in Resources */ = {isa = PBXBuildFile; fileRef = 377340641ECA3D080065FFE0 /* DeletedTweet.json */; };
377783891E96AF1700BC4830 /* TwitterKitResources.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 377783881E96AF1700BC4830 /* TwitterKitResources.bundle */; };
Expand Down Expand Up @@ -495,8 +494,6 @@
379A6CA31E95B47300625984 /* Sources */,
379A6CA41E95B47300625984 /* Frameworks */,
379A6CA51E95B47300625984 /* Resources */,
5CC95A89CCCE654AA61DD03A /* [CP] Embed Pods Frameworks */,
DADBA983E9AF3AB8D69609B8 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand All @@ -519,7 +516,6 @@
379A6CC11E95B47300625984 /* Resources */,
EE0BE018629DD8ED153A1F64 /* EarlGrey Copy Files */,
2ED58B3EEB5ADD287CE9AFAE /* [CP] Embed Pods Frameworks */,
552F865AFBDC07010AC075C4 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand All @@ -539,12 +535,12 @@
379A6C9F1E95B47300625984 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0830;
LastUpgradeCheck = 0940;
ORGANIZATIONNAME = Twitter;
TargetAttributes = {
379A6CA61E95B47300625984 = {
CreatedOnToolsVersion = 8.3;
LastSwiftMigration = 0830;
LastSwiftMigration = 0940;
ProvisioningStyle = Automatic;
};
379A6CC21E95B47300625984 = {
Expand Down Expand Up @@ -636,7 +632,6 @@
files = (
377783891E96AF1700BC4830 /* TwitterKitResources.bundle in Resources */,
379A6CBD1E95B47300625984 /* LaunchScreen.storyboard in Resources */,
2001BA381FA0EF0F0074EA67 /* Config.xcconfig in Resources */,
377340651ECA3D080065FFE0 /* DeletedTweet.json in Resources */,
3777838B1E96AFD500BC4830 /* Images.xcassets in Resources */,
);
Expand All @@ -658,13 +653,16 @@
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-DemoAppTests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
2ED58B3EEB5ADD287CE9AFAE /* [CP] Embed Pods Frameworks */ = {
Expand All @@ -673,73 +671,34 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-DemoAppTests/Pods-DemoAppTests-frameworks.sh",
"${PODS_ROOT}/EarlGrey/EarlGrey/EarlGrey.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/EarlGrey.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-DemoAppTests/Pods-DemoAppTests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
552F865AFBDC07010AC075C4 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-DemoAppTests/Pods-DemoAppTests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
5CC95A89CCCE654AA61DD03A /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
9F0835A6DCA75B971207E8EB /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-DemoApp-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
DADBA983E9AF3AB8D69609B8 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp-resources.sh\"\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -850,15 +809,23 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -900,15 +867,23 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -952,7 +927,8 @@
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "DemoApp/DemoApp-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -973,7 +949,8 @@
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "DemoApp/DemoApp-Bridging-Header.h";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
LastUpgradeVersion = "0940"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,7 +26,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
Expand Down Expand Up @@ -76,7 +75,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ extension CGRect {
}
}

@objc protocol AuthenticationViewControllerDelegate {
@objc func authenticationViewControllerDidTapHome(viewController: AuthenticationViewController)
protocol AuthenticationViewControllerDelegate : class {
func authenticationViewControllerDidTapHome(viewController: AuthenticationViewController)
}

class AuthenticationViewController: UIViewController {
Expand Down Expand Up @@ -76,7 +76,7 @@ class AuthenticationViewController: UIViewController {

// MARK: - Actions

func home() {
@objc func home() {
delegate?.authenticationViewControllerDidTapHome(viewController: self)
}

Expand Down
8 changes: 4 additions & 4 deletions DemoApp/DemoApp/Authentication/LoginViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import UIKit

@objc protocol LoginViewControllerDelegate {
protocol LoginViewControllerDelegate : class {
func loginViewController(viewController: LoginViewController, didAuthWith session: TWTRSession)
func loginViewControllerDidClearAccounts(viewController: LoginViewController)
}
Expand Down Expand Up @@ -119,11 +119,11 @@ class LoginViewController: UIViewController {

// MARK: - Actions

func backgroundTap() {
@objc func backgroundTap() {
dismiss(animated: true, completion: nil)
}

func login() {
@objc func login() {
TWTRTwitter.sharedInstance().logIn(with: self) { (session, error) in
if let session = session {
self.dismiss(animated: true) {
Expand All @@ -135,7 +135,7 @@ class LoginViewController: UIViewController {
}
}

func clearAccounts() {
@objc func clearAccounts() {
for session in TWTRTwitter.sharedInstance().sessionStore.existingUserSessions() {
if let session = session as? TWTRSession {
TWTRTwitter.sharedInstance().sessionStore.logOutUserID(session.userID)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import UIKit

@objc protocol TwitterLoginCollectionViewCellDelegate {
protocol TwitterLoginCollectionViewCellDelegate :class {
func loginCollectionViewCellDidTapAddAccountButton(cell: TwitterLoginCollectionViewCell)
}

Expand Down Expand Up @@ -48,7 +48,7 @@ class TwitterLoginCollectionViewCell: UICollectionViewCell {

// MARK: - Actions

func addAccount() {
@objc func addAccount() {
delegate?.loginCollectionViewCellDidTapAddAccountButton(cell: self)
}

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

import UIKit

@objc protocol TwitterSessionCollectionViewCellDelegate {
protocol TwitterSessionCollectionViewCellDelegate : class {
func sessionCollectionViewCell(collectionViewCell: TwitterSessionCollectionViewCell, didTapLogoutFor session: TWTRSession)
}

Expand Down Expand Up @@ -112,7 +112,7 @@ class TwitterSessionCollectionViewCell: UICollectionViewCell {

// MARK: - Actions

func logout() {
@objc func logout() {
if let session = session {
delegate?.sessionCollectionViewCell(collectionViewCell: self, didTapLogoutFor: session)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ func offset(indexPath: IndexPath) -> IndexPath {
return newIndexPath
}

@objc(ESPNTimelineViewController)
class ESPNTimelineViewController: TWTRTimelineViewController {

let numberOfAds = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ListFilteredTimelineViewController: TWTRTimelineViewController, TWTRTimeli
// filter the search timeline
let filter = TWTRTimelineFilter()
filter.handles = [ "newyorker", "benward", "mollie" ]
self.dataSource.timelineFilter = filter
self.dataSource?.timelineFilter = filter

self.showTweetActions = true
self.view.backgroundColor = .lightGray
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import UIKit

@objc (SearchFilteredTimelineViewController)
class SearchFilteredTimelineViewController: TWTRTimelineViewController, DZNEmptyDataSetSource {

convenience init() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import UIKit

@objc (SearchTimelineViewController)
class SearchTimelineViewController: TWTRTimelineViewController, DZNEmptyDataSetSource {

convenience init() {
Expand All @@ -30,8 +29,8 @@ class SearchTimelineViewController: TWTRTimelineViewController, DZNEmptyDataSetS

func title(forEmptyDataSet scrollView: UIScrollView) -> NSAttributedString {
let text = "Could not find Tweets.";
let attributes = [NSFontAttributeName: UIFont.boldSystemFont(ofSize: 18),
NSForegroundColorAttributeName: UIColor.darkGray]
let attributes = [NSAttributedStringKey.font: UIFont.boldSystemFont(ofSize: 18),
NSAttributedStringKey.foregroundColor: UIColor.darkGray]

return NSAttributedString(string: text, attributes: attributes)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class UserFilteredTimelineViewController: TWTRTimelineViewController {
// filter the user timeline
let filter = TWTRTimelineFilter()
filter.urls = ["fabric.io", "twitter.com", "answers.io"]
self.dataSource.timelineFilter = filter;
self.dataSource?.timelineFilter = filter;

self.title = "@fabric"
self.showTweetActions = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class TweetViewStylerViewController: UIViewController {

// MARK: - Actions

func updateTweetView() {
@objc func updateTweetView() {
if let tweet = tweet {
configureTweetView(with: tweet)
}
Expand Down
Loading