diff --git a/DemoApp/DemoApp.xcodeproj/project.pbxproj b/DemoApp/DemoApp.xcodeproj/project.pbxproj index 5b92db66..94fc73e0 100644 --- a/DemoApp/DemoApp.xcodeproj/project.pbxproj +++ b/DemoApp/DemoApp.xcodeproj/project.pbxproj @@ -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 */; }; @@ -495,8 +494,6 @@ 379A6CA31E95B47300625984 /* Sources */, 379A6CA41E95B47300625984 /* Frameworks */, 379A6CA51E95B47300625984 /* Resources */, - 5CC95A89CCCE654AA61DD03A /* [CP] Embed Pods Frameworks */, - DADBA983E9AF3AB8D69609B8 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -519,7 +516,6 @@ 379A6CC11E95B47300625984 /* Resources */, EE0BE018629DD8ED153A1F64 /* EarlGrey Copy Files */, 2ED58B3EEB5ADD287CE9AFAE /* [CP] Embed Pods Frameworks */, - 552F865AFBDC07010AC075C4 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -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 = { @@ -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 */, ); @@ -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 */ = { @@ -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 */ @@ -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; @@ -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; @@ -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; }; @@ -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; }; diff --git a/DemoApp/DemoApp.xcodeproj/xcshareddata/xcschemes/DemoApp.xcscheme b/DemoApp/DemoApp.xcodeproj/xcshareddata/xcschemes/DemoApp.xcscheme index 5a089c0f..d41381c3 100644 --- a/DemoApp/DemoApp.xcodeproj/xcshareddata/xcschemes/DemoApp.xcscheme +++ b/DemoApp/DemoApp.xcodeproj/xcshareddata/xcschemes/DemoApp.xcscheme @@ -1,6 +1,6 @@ + + + + IDEDidComputeMac32BitWarning + + + diff --git a/DemoApp/DemoApp/Authentication/AuthenticationViewController.swift b/DemoApp/DemoApp/Authentication/AuthenticationViewController.swift index 244c4d6f..36e8c146 100644 --- a/DemoApp/DemoApp/Authentication/AuthenticationViewController.swift +++ b/DemoApp/DemoApp/Authentication/AuthenticationViewController.swift @@ -14,8 +14,8 @@ extension CGRect { } } -@objc protocol AuthenticationViewControllerDelegate { - @objc func authenticationViewControllerDidTapHome(viewController: AuthenticationViewController) +protocol AuthenticationViewControllerDelegate : class { + func authenticationViewControllerDidTapHome(viewController: AuthenticationViewController) } class AuthenticationViewController: UIViewController { @@ -76,7 +76,7 @@ class AuthenticationViewController: UIViewController { // MARK: - Actions - func home() { + @objc func home() { delegate?.authenticationViewControllerDidTapHome(viewController: self) } diff --git a/DemoApp/DemoApp/Authentication/LoginViewController.swift b/DemoApp/DemoApp/Authentication/LoginViewController.swift index 2e81a19b..e3e7f9fb 100644 --- a/DemoApp/DemoApp/Authentication/LoginViewController.swift +++ b/DemoApp/DemoApp/Authentication/LoginViewController.swift @@ -8,7 +8,7 @@ import UIKit -@objc protocol LoginViewControllerDelegate { +protocol LoginViewControllerDelegate : class { func loginViewController(viewController: LoginViewController, didAuthWith session: TWTRSession) func loginViewControllerDidClearAccounts(viewController: LoginViewController) } @@ -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) { @@ -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) diff --git a/DemoApp/DemoApp/Authentication/TwitterLoginCollectionViewCell.swift b/DemoApp/DemoApp/Authentication/TwitterLoginCollectionViewCell.swift index 02bb25c8..810cc280 100644 --- a/DemoApp/DemoApp/Authentication/TwitterLoginCollectionViewCell.swift +++ b/DemoApp/DemoApp/Authentication/TwitterLoginCollectionViewCell.swift @@ -8,7 +8,7 @@ import UIKit -@objc protocol TwitterLoginCollectionViewCellDelegate { +protocol TwitterLoginCollectionViewCellDelegate :class { func loginCollectionViewCellDidTapAddAccountButton(cell: TwitterLoginCollectionViewCell) } @@ -48,7 +48,7 @@ class TwitterLoginCollectionViewCell: UICollectionViewCell { // MARK: - Actions - func addAccount() { + @objc func addAccount() { delegate?.loginCollectionViewCellDidTapAddAccountButton(cell: self) } diff --git a/DemoApp/DemoApp/Authentication/TwitterSessionCollectionViewCell.swift b/DemoApp/DemoApp/Authentication/TwitterSessionCollectionViewCell.swift index ebd23da4..cd2bb80d 100644 --- a/DemoApp/DemoApp/Authentication/TwitterSessionCollectionViewCell.swift +++ b/DemoApp/DemoApp/Authentication/TwitterSessionCollectionViewCell.swift @@ -8,7 +8,7 @@ import UIKit -@objc protocol TwitterSessionCollectionViewCellDelegate { +protocol TwitterSessionCollectionViewCellDelegate : class { func sessionCollectionViewCell(collectionViewCell: TwitterSessionCollectionViewCell, didTapLogoutFor session: TWTRSession) } @@ -112,7 +112,7 @@ class TwitterSessionCollectionViewCell: UICollectionViewCell { // MARK: - Actions - func logout() { + @objc func logout() { if let session = session { delegate?.sessionCollectionViewCell(collectionViewCell: self, didTapLogoutFor: session) } diff --git a/DemoApp/DemoApp/Demos/Timelines Demo/ESPNTimelineViewController.swift b/DemoApp/DemoApp/Demos/Timelines Demo/ESPNTimelineViewController.swift index e107b02e..deab3142 100644 --- a/DemoApp/DemoApp/Demos/Timelines Demo/ESPNTimelineViewController.swift +++ b/DemoApp/DemoApp/Demos/Timelines Demo/ESPNTimelineViewController.swift @@ -15,7 +15,6 @@ func offset(indexPath: IndexPath) -> IndexPath { return newIndexPath } -@objc(ESPNTimelineViewController) class ESPNTimelineViewController: TWTRTimelineViewController { let numberOfAds = 1 diff --git a/DemoApp/DemoApp/Demos/Timelines Demo/ListFilteredTimelineViewController.swift b/DemoApp/DemoApp/Demos/Timelines Demo/ListFilteredTimelineViewController.swift index f18d2b5d..423f77ef 100644 --- a/DemoApp/DemoApp/Demos/Timelines Demo/ListFilteredTimelineViewController.swift +++ b/DemoApp/DemoApp/Demos/Timelines Demo/ListFilteredTimelineViewController.swift @@ -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 diff --git a/DemoApp/DemoApp/Demos/Timelines Demo/SearchFilteredTimelineViewController.swift b/DemoApp/DemoApp/Demos/Timelines Demo/SearchFilteredTimelineViewController.swift index 9fea640b..79c4d4eb 100644 --- a/DemoApp/DemoApp/Demos/Timelines Demo/SearchFilteredTimelineViewController.swift +++ b/DemoApp/DemoApp/Demos/Timelines Demo/SearchFilteredTimelineViewController.swift @@ -8,7 +8,6 @@ import UIKit -@objc (SearchFilteredTimelineViewController) class SearchFilteredTimelineViewController: TWTRTimelineViewController, DZNEmptyDataSetSource { convenience init() { diff --git a/DemoApp/DemoApp/Demos/Timelines Demo/SearchTimelineViewController.swift b/DemoApp/DemoApp/Demos/Timelines Demo/SearchTimelineViewController.swift index 690b5d9a..2cbf3c2f 100644 --- a/DemoApp/DemoApp/Demos/Timelines Demo/SearchTimelineViewController.swift +++ b/DemoApp/DemoApp/Demos/Timelines Demo/SearchTimelineViewController.swift @@ -8,7 +8,6 @@ import UIKit -@objc (SearchTimelineViewController) class SearchTimelineViewController: TWTRTimelineViewController, DZNEmptyDataSetSource { convenience init() { @@ -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) } diff --git a/DemoApp/DemoApp/Demos/Timelines Demo/UserFilteredTimelineViewController.swift b/DemoApp/DemoApp/Demos/Timelines Demo/UserFilteredTimelineViewController.swift index b4dee2cb..80acc585 100644 --- a/DemoApp/DemoApp/Demos/Timelines Demo/UserFilteredTimelineViewController.swift +++ b/DemoApp/DemoApp/Demos/Timelines Demo/UserFilteredTimelineViewController.swift @@ -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 diff --git a/DemoApp/DemoApp/Demos/TweetView demo/TweetViewStylerViewController.swift b/DemoApp/DemoApp/Demos/TweetView demo/TweetViewStylerViewController.swift index 1d3edbc1..0cf7d912 100644 --- a/DemoApp/DemoApp/Demos/TweetView demo/TweetViewStylerViewController.swift +++ b/DemoApp/DemoApp/Demos/TweetView demo/TweetViewStylerViewController.swift @@ -81,7 +81,7 @@ class TweetViewStylerViewController: UIViewController { // MARK: - Actions - func updateTweetView() { + @objc func updateTweetView() { if let tweet = tweet { configureTweetView(with: tweet) } diff --git a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Contents.json b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Contents.json index 0b2170b4..c8477e67 100644 --- a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Contents.json @@ -1,144 +1,158 @@ { + "info" : { + "author" : "xcode", + "version" : 1 + }, "images" : [ { - "idiom" : "iphone", - "size" : "20x20", + "filename" : "Icon-40.png", + "size" : "40x40", + "idiom" : "ipad", + "scale" : "1x" + }, + { + "filename" : "Icon-40@2x.png", + "size" : "40x40", + "idiom" : "ipad", "scale" : "2x" }, { + "filename" : "Icon-60@2x.png", + "size" : "60x60", "idiom" : "iphone", - "size" : "20x20", - "scale" : "3x" + "scale" : "2x" }, { - "idiom" : "iphone", - "size" : "29x29", + "filename" : "Icon-72.png", + "size" : "72x72", + "idiom" : "ipad", "scale" : "1x" }, { - "idiom" : "iphone", - "size" : "29x29", + "filename" : "Icon-72@2x.png", + "size" : "72x72", + "idiom" : "ipad", "scale" : "2x" }, { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" + "filename" : "Icon-76.png", + "size" : "76x76", + "idiom" : "ipad", + "scale" : "1x" }, { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-40@2x.png", + "filename" : "Icon-76@2x.png", + "size" : "76x76", + "idiom" : "ipad", "scale" : "2x" }, { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-40@3x.png", - "scale" : "3x" - }, - { - "size" : "57x57", - "idiom" : "iphone", - "filename" : "Icon.png", + "filename" : "Icon-Small-50.png", + "size" : "50x50", + "idiom" : "ipad", "scale" : "1x" }, { - "size" : "57x57", - "idiom" : "iphone", - "filename" : "Icon@2x.png", + "filename" : "Icon-Small-50@2x.png", + "size" : "50x50", + "idiom" : "ipad", "scale" : "2x" }, { - "size" : "60x60", + "filename" : "Icon-Small.png", + "size" : "29x29", "idiom" : "iphone", - "filename" : "Icon-60@2x-1.png", - "scale" : "2x" + "scale" : "1x" }, { - "size" : "60x60", + "filename" : "Icon-Small@2x.png", + "size" : "29x29", "idiom" : "iphone", - "filename" : "Icon-60@3x.png", - "scale" : "3x" + "scale" : "2x" }, { - "idiom" : "ipad", - "size" : "20x20", + "filename" : "Icon.png", + "size" : "57x57", + "idiom" : "iphone", "scale" : "1x" }, { - "idiom" : "ipad", - "size" : "20x20", + "filename" : "Icon@2x.png", + "size" : "57x57", + "idiom" : "iphone", "scale" : "2x" }, { - "idiom" : "ipad", + "filename" : "Icon-Small@3x.png", "size" : "29x29", - "scale" : "1x" + "idiom" : "iphone", + "scale" : "3x" }, { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "2x" + "filename" : "Icon-40@3x.png", + "size" : "40x40", + "idiom" : "iphone", + "scale" : "3x" }, { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-40.png", - "scale" : "1x" + "filename" : "Icon-60@3x.png", + "size" : "60x60", + "idiom" : "iphone", + "scale" : "3x" }, { + "filename" : "Icon-40@2x.png", "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-40@2x-1.png", + "idiom" : "iphone", "scale" : "2x" }, { + "filename" : "Icon-Small.png", + "size" : "29x29", "idiom" : "ipad", - "size" : "50x50", "scale" : "1x" }, { + "filename" : "Icon-Small@2x.png", + "size" : "29x29", "idiom" : "ipad", - "size" : "50x50", "scale" : "2x" }, { + "filename" : "Icon-83.5@2x.png", + "size" : "83.5x83.5", "idiom" : "ipad", - "size" : "72x72", - "scale" : "1x" + "scale" : "2x" }, { - "idiom" : "ipad", - "size" : "72x72", + "filename" : "NotificationIcon@2x.png", + "size" : "20x20", + "idiom" : "iphone", "scale" : "2x" }, { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-76.png", - "scale" : "1x" + "filename" : "NotificationIcon@3x.png", + "size" : "20x20", + "idiom" : "iphone", + "scale" : "3x" }, { - "size" : "76x76", + "filename" : "NotificationIcon~ipad.png", + "size" : "20x20", "idiom" : "ipad", - "filename" : "Icon-76@2x.png", - "scale" : "2x" + "scale" : "1x" }, { - "size" : "83.5x83.5", + "filename" : "NotificationIcon~ipad@2x.png", + "size" : "20x20", "idiom" : "ipad", - "filename" : "Icon-167.png", "scale" : "2x" }, { - "idiom" : "ios-marketing", + "filename" : "ios-marketing.png", "size" : "1024x1024", + "idiom" : "ios-marketing", "scale" : "1x" } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } + ] } \ No newline at end of file diff --git a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-167.png b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-167.png deleted file mode 100644 index 0d6c3fc6..00000000 Binary files a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-167.png and /dev/null differ diff --git a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-40.png b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-40.png index 6331acfe..9853d79f 100644 Binary files a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-40.png and b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-40.png differ diff --git a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-40@2x-1.png b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-40@2x-1.png deleted file mode 100644 index c0e21c1d..00000000 Binary files a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-40@2x-1.png and /dev/null differ diff --git a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png index c0e21c1d..63833796 100644 Binary files a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png and b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png differ diff --git a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png index a6205de0..bc16f08a 100644 Binary files a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png and b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png differ diff --git a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-60@2x-1.png b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-60@2x-1.png deleted file mode 100644 index a6205de0..00000000 Binary files a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-60@2x-1.png and /dev/null differ diff --git a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png new file mode 100644 index 00000000..bc16f08a Binary files /dev/null and b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png differ diff --git a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png index ac19169f..fd23b612 100644 Binary files a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png and b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png differ diff --git a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-72.png b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-72.png new file mode 100644 index 00000000..faafec4a Binary files /dev/null and b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-72.png differ diff --git a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png new file mode 100644 index 00000000..3c60afc7 Binary files /dev/null and b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png differ diff --git a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-76.png b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-76.png index e3d718b4..c8688d5f 100644 Binary files a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-76.png and b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-76.png differ diff --git a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png index 9a550f33..2fa2ba94 100644 Binary files a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png and b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png differ diff --git a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png new file mode 100644 index 00000000..eaefc91b Binary files /dev/null and b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png differ diff --git a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-Small-50.png b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-Small-50.png new file mode 100644 index 00000000..6378b273 Binary files /dev/null and b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-Small-50.png differ diff --git a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png new file mode 100644 index 00000000..6b8cc5ad Binary files /dev/null and b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png differ diff --git a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-Small.png b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-Small.png new file mode 100644 index 00000000..aaddb39d Binary files /dev/null and b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-Small.png differ diff --git a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png new file mode 100644 index 00000000..d956c861 Binary files /dev/null and b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png differ diff --git a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png new file mode 100644 index 00000000..432f885e Binary files /dev/null and b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png differ diff --git a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon.png b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon.png index 76773db3..dd82f756 100644 Binary files a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon.png and b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon.png differ diff --git a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon@2x.png b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon@2x.png index aa40ed68..ea355092 100644 Binary files a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon@2x.png and b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/Icon@2x.png differ diff --git a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/NotificationIcon@2x.png b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/NotificationIcon@2x.png new file mode 100644 index 00000000..9853d79f Binary files /dev/null and b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/NotificationIcon@2x.png differ diff --git a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/NotificationIcon@3x.png b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/NotificationIcon@3x.png new file mode 100644 index 00000000..9a82f504 Binary files /dev/null and b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/NotificationIcon@3x.png differ diff --git a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/NotificationIcon~ipad.png b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/NotificationIcon~ipad.png new file mode 100644 index 00000000..b3986520 Binary files /dev/null and b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/NotificationIcon~ipad.png differ diff --git a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/NotificationIcon~ipad@2x.png b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/NotificationIcon~ipad@2x.png new file mode 100644 index 00000000..9853d79f Binary files /dev/null and b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/NotificationIcon~ipad@2x.png differ diff --git a/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/ios-marketing.png b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/ios-marketing.png new file mode 100644 index 00000000..9e22d467 Binary files /dev/null and b/DemoApp/DemoApp/Images.xcassets/AppIcon.appiconset/ios-marketing.png differ diff --git a/DemoApp/DemoApp/Navigation/HomeViewController.swift b/DemoApp/DemoApp/Navigation/HomeViewController.swift index 49244d95..4ed6fe58 100644 --- a/DemoApp/DemoApp/Navigation/HomeViewController.swift +++ b/DemoApp/DemoApp/Navigation/HomeViewController.swift @@ -8,8 +8,8 @@ import UIKit -@objc protocol HomeViewControllerDelegate { - @objc func homeViewControllerDidTapProfileButton(viewController: HomeViewController) +protocol HomeViewControllerDelegate : class { + func homeViewControllerDidTapProfileButton(viewController: HomeViewController) } class HomeViewController: DemoCollectionViewController { @@ -43,7 +43,7 @@ class HomeViewController: DemoCollectionViewController { // MARK: - Actions - func didTapProfile() { + @objc func didTapProfile() { delegate?.homeViewControllerDidTapProfileButton(viewController: self) } } diff --git a/DemoApp/Podfile.lock b/DemoApp/Podfile.lock index c825ea56..c3c73947 100644 --- a/DemoApp/Podfile.lock +++ b/DemoApp/Podfile.lock @@ -4,9 +4,13 @@ PODS: DEPENDENCIES: - EarlGrey +SPEC REPOS: + https://github.com/cocoapods/specs.git: + - EarlGrey + SPEC CHECKSUMS: EarlGrey: 704eb520225eeec801e77ad0583095f4f2624520 PODFILE CHECKSUM: 9694f9ee5cc00659fb6039a8b4f7876d50c160d1 -COCOAPODS: 1.2.0 +COCOAPODS: 1.5.3 diff --git a/DemoApp/Pods/Manifest.lock b/DemoApp/Pods/Manifest.lock index c825ea56..c3c73947 100644 --- a/DemoApp/Pods/Manifest.lock +++ b/DemoApp/Pods/Manifest.lock @@ -4,9 +4,13 @@ PODS: DEPENDENCIES: - EarlGrey +SPEC REPOS: + https://github.com/cocoapods/specs.git: + - EarlGrey + SPEC CHECKSUMS: EarlGrey: 704eb520225eeec801e77ad0583095f4f2624520 PODFILE CHECKSUM: 9694f9ee5cc00659fb6039a8b4f7876d50c160d1 -COCOAPODS: 1.2.0 +COCOAPODS: 1.5.3 diff --git a/DemoApp/Pods/Pods.xcodeproj/project.pbxproj b/DemoApp/Pods/Pods.xcodeproj/project.pbxproj index 3ce61133..a568792b 100644 --- a/DemoApp/Pods/Pods.xcodeproj/project.pbxproj +++ b/DemoApp/Pods/Pods.xcodeproj/project.pbxproj @@ -7,40 +7,40 @@ objects = { /* Begin PBXBuildFile section */ - 21A436A9BCCCA8E0BCFC3A99CFD739C0 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; - 52FAB62D1877BF4B13BD648F32127524 /* Pods-DemoAppTests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E607A69D99409EC8D6DCB3524D9E85C /* Pods-DemoAppTests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 94157C2616A96845F51D6D9B73A8E096 /* Pods-DemoApp-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A7CFFA2E49D94998213C239F056425A /* Pods-DemoApp-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E20246E57B623B3D381945992CC2FD62 /* Pods-DemoApp-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A1D24A69B4340791858D9D4FCF79B670 /* Pods-DemoApp-dummy.m */; }; - EFE2A15F7301A377B5B053BC0EDF9F11 /* Pods-DemoAppTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 89C6AF9CD43123DBBACD764015AB4252 /* Pods-DemoAppTests-dummy.m */; }; - FFEC7578285D8227BAD8754CAB871F0C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; + 52FAB62D1877BF4B13BD648F32127524 /* Pods-DemoAppTests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F974990DC294DECC43872E6C2D01D3CB /* Pods-DemoAppTests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 94157C2616A96845F51D6D9B73A8E096 /* Pods-DemoApp-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EF08BF4CA648FA896A685C19DB3FFC4 /* Pods-DemoApp-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 974C6E02D0B3F15831EF11EF2E6D11D6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A16F4CFC63FAC439D7A04994F579A03 /* Foundation.framework */; }; + B5211FE06D74CB8BBB5B05CAEFCD6CF5 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A16F4CFC63FAC439D7A04994F579A03 /* Foundation.framework */; }; + E20246E57B623B3D381945992CC2FD62 /* Pods-DemoApp-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 09A3CC756769BEB8E271BC89B3BB7216 /* Pods-DemoApp-dummy.m */; }; + EFE2A15F7301A377B5B053BC0EDF9F11 /* Pods-DemoAppTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E2504C4BF4FF0200AEB8B023F5894B2 /* Pods-DemoAppTests-dummy.m */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 05230101EC2F1EE4334E36C4DA4743F1 /* Pods-DemoAppTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-DemoAppTests-acknowledgements.plist"; sourceTree = ""; }; + 09A3CC756769BEB8E271BC89B3BB7216 /* Pods-DemoApp-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-DemoApp-dummy.m"; sourceTree = ""; }; + 0CF31474B9279687D39E2AD2697A7C50 /* Pods-DemoApp-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-DemoApp-acknowledgements.markdown"; sourceTree = ""; }; + 0E2504C4BF4FF0200AEB8B023F5894B2 /* Pods-DemoAppTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-DemoAppTests-dummy.m"; sourceTree = ""; }; 1486CC0BE4AC6FEA8A95D2D4D4722585 /* Pods_DemoAppTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_DemoAppTests.framework; path = "Pods-DemoAppTests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - 1A4ED427ACF1E66214C9E462112A672B /* Pods-DemoApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-DemoApp.debug.xcconfig"; sourceTree = ""; }; - 20CCA68B0DE9A3F31744B9359B7097E5 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 2A7CFFA2E49D94998213C239F056425A /* Pods-DemoApp-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-DemoApp-umbrella.h"; sourceTree = ""; }; - 2C003200E892AF74CD4E79A83F440950 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 1FC9EEFC08156AAB4AA528A35A2F0B4A /* Pods-DemoAppTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-DemoAppTests.modulemap"; sourceTree = ""; }; + 27C1E196946BC39461823668FDB982B6 /* Pods-DemoAppTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-DemoAppTests-acknowledgements.markdown"; sourceTree = ""; }; + 2AEF67BD0D6575A91CDF4B393856391B /* Pods-DemoApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-DemoApp.debug.xcconfig"; sourceTree = ""; }; + 2EF08BF4CA648FA896A685C19DB3FFC4 /* Pods-DemoApp-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-DemoApp-umbrella.h"; sourceTree = ""; }; 360ACA4CEA1700C0A10C94F07A808822 /* EarlGrey.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = EarlGrey.framework; path = EarlGrey/EarlGrey.framework; sourceTree = ""; }; - 3CA90349FC55DE260B65D2159BB2D119 /* Pods-DemoApp-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-DemoApp-acknowledgements.plist"; sourceTree = ""; }; - 3E607A69D99409EC8D6DCB3524D9E85C /* Pods-DemoAppTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-DemoAppTests-umbrella.h"; sourceTree = ""; }; - 4CAAAB9E0A1C6766A4DD09060C8EDE63 /* Pods-DemoApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-DemoApp.release.xcconfig"; sourceTree = ""; }; - 65C626ADD44D2223768B3CD90EA1FB02 /* Pods-DemoAppTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-DemoAppTests-acknowledgements.plist"; sourceTree = ""; }; - 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 70D4898DD84E08EA0C4435AE8D7AA429 /* Pods-DemoApp-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-DemoApp-frameworks.sh"; sourceTree = ""; }; + 579EC3F8D41A0ACDA4117C6F0123E822 /* Pods-DemoAppTests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-DemoAppTests-frameworks.sh"; sourceTree = ""; }; + 5A16F4CFC63FAC439D7A04994F579A03 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 68CA1920DB2C0F296AFA26B12C72F68C /* Pods-DemoApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-DemoApp.release.xcconfig"; sourceTree = ""; }; + 7BB5465716F847C88C8E3BF251F98031 /* Pods-DemoApp-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-DemoApp-frameworks.sh"; sourceTree = ""; }; + 804AF4D59178FC5297377417D9307234 /* Pods-DemoApp.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-DemoApp.modulemap"; sourceTree = ""; }; + 8051115CD3A75E242A5F84A147061FF0 /* Pods-DemoApp-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-DemoApp-acknowledgements.plist"; sourceTree = ""; }; 87A044480824C7CC341CBC64939A5B94 /* Pods_DemoApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_DemoApp.framework; path = "Pods-DemoApp.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - 885A71C1A811D13080897A2918575EA3 /* Pods-DemoAppTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-DemoAppTests-acknowledgements.markdown"; sourceTree = ""; }; - 89C6AF9CD43123DBBACD764015AB4252 /* Pods-DemoAppTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-DemoAppTests-dummy.m"; sourceTree = ""; }; + 8C213C15A4EDAD795A85355ACA51F92A /* Pods-DemoAppTests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-DemoAppTests-resources.sh"; sourceTree = ""; }; 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - A1D24A69B4340791858D9D4FCF79B670 /* Pods-DemoApp-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-DemoApp-dummy.m"; sourceTree = ""; }; - BC43ED7F797125EFD6F15D95787D4E81 /* Pods-DemoApp-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-DemoApp-acknowledgements.markdown"; sourceTree = ""; }; - C16ECF98197545210D4D32914B9A7CDB /* Pods-DemoAppTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-DemoAppTests.debug.xcconfig"; sourceTree = ""; }; - C181EB8E41A528DCA228033441540843 /* Pods-DemoApp-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-DemoApp-resources.sh"; sourceTree = ""; }; - CD1DA9CCC369B1EC88A9A3C47E4A1396 /* Pods-DemoAppTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-DemoAppTests.modulemap"; sourceTree = ""; }; - D857B12C524B4A8FBC79763EF9382880 /* Pods-DemoAppTests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-DemoAppTests-resources.sh"; sourceTree = ""; }; - DCD1980C7C839BAB0F4385CB1393D961 /* Pods-DemoAppTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-DemoAppTests.release.xcconfig"; sourceTree = ""; }; - E8D2A7138D18096D90449476FBEEC448 /* Pods-DemoAppTests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-DemoAppTests-frameworks.sh"; sourceTree = ""; }; - F42656FBA45D0D7F39F0AA51EE188BA4 /* Pods-DemoApp.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-DemoApp.modulemap"; sourceTree = ""; }; + 9BD74FC25A7ECDBAD632EA1E87C375E8 /* Pods-DemoAppTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-DemoAppTests.release.xcconfig"; sourceTree = ""; }; + ACE9B9BBC69D3B28EC5B9D2B4940D6EF /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + AEBE057D71FDE4F87C5C9BB4499AD2EC /* Pods-DemoAppTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-DemoAppTests.debug.xcconfig"; sourceTree = ""; }; + BDC5A144AA934B3B6466C5719CA6382C /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + D5E0CACE0C01BD93546D0B75C485BE1F /* Pods-DemoApp-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-DemoApp-resources.sh"; sourceTree = ""; }; + F974990DC294DECC43872E6C2D01D3CB /* Pods-DemoAppTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-DemoAppTests-umbrella.h"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -48,7 +48,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 21A436A9BCCCA8E0BCFC3A99CFD739C0 /* Foundation.framework in Frameworks */, + B5211FE06D74CB8BBB5B05CAEFCD6CF5 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -56,7 +56,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - FFEC7578285D8227BAD8754CAB871F0C /* Foundation.framework in Frameworks */, + 974C6E02D0B3F15831EF11EF2E6D11D6 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -79,22 +79,12 @@ name = Frameworks; sourceTree = ""; }; - 50E0B13282BF06E254948CCA326415B1 /* Pods-DemoApp */ = { + 5E0D919E635D23B70123790B8308F8EF /* iOS */ = { isa = PBXGroup; children = ( - 2C003200E892AF74CD4E79A83F440950 /* Info.plist */, - F42656FBA45D0D7F39F0AA51EE188BA4 /* Pods-DemoApp.modulemap */, - BC43ED7F797125EFD6F15D95787D4E81 /* Pods-DemoApp-acknowledgements.markdown */, - 3CA90349FC55DE260B65D2159BB2D119 /* Pods-DemoApp-acknowledgements.plist */, - A1D24A69B4340791858D9D4FCF79B670 /* Pods-DemoApp-dummy.m */, - 70D4898DD84E08EA0C4435AE8D7AA429 /* Pods-DemoApp-frameworks.sh */, - C181EB8E41A528DCA228033441540843 /* Pods-DemoApp-resources.sh */, - 2A7CFFA2E49D94998213C239F056425A /* Pods-DemoApp-umbrella.h */, - 1A4ED427ACF1E66214C9E462112A672B /* Pods-DemoApp.debug.xcconfig */, - 4CAAAB9E0A1C6766A4DD09060C8EDE63 /* Pods-DemoApp.release.xcconfig */, + 5A16F4CFC63FAC439D7A04994F579A03 /* Foundation.framework */, ); - name = "Pods-DemoApp"; - path = "Target Support Files/Pods-DemoApp"; + name = iOS; sourceTree = ""; }; 7DB346D0F39D3F0E887471402A8071AB = { @@ -129,42 +119,52 @@ BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { isa = PBXGroup; children = ( - D35AF013A5F0BAD4F32504907A52519E /* iOS */, + 5E0D919E635D23B70123790B8308F8EF /* iOS */, ); name = Frameworks; sourceTree = ""; }; - D35AF013A5F0BAD4F32504907A52519E /* iOS */ = { + CC69A47FF01841E9D3F5480245AA6B39 /* Pods-DemoAppTests */ = { isa = PBXGroup; children = ( - 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */, + ACE9B9BBC69D3B28EC5B9D2B4940D6EF /* Info.plist */, + 1FC9EEFC08156AAB4AA528A35A2F0B4A /* Pods-DemoAppTests.modulemap */, + 27C1E196946BC39461823668FDB982B6 /* Pods-DemoAppTests-acknowledgements.markdown */, + 05230101EC2F1EE4334E36C4DA4743F1 /* Pods-DemoAppTests-acknowledgements.plist */, + 0E2504C4BF4FF0200AEB8B023F5894B2 /* Pods-DemoAppTests-dummy.m */, + 579EC3F8D41A0ACDA4117C6F0123E822 /* Pods-DemoAppTests-frameworks.sh */, + 8C213C15A4EDAD795A85355ACA51F92A /* Pods-DemoAppTests-resources.sh */, + F974990DC294DECC43872E6C2D01D3CB /* Pods-DemoAppTests-umbrella.h */, + AEBE057D71FDE4F87C5C9BB4499AD2EC /* Pods-DemoAppTests.debug.xcconfig */, + 9BD74FC25A7ECDBAD632EA1E87C375E8 /* Pods-DemoAppTests.release.xcconfig */, ); - name = iOS; + name = "Pods-DemoAppTests"; + path = "Target Support Files/Pods-DemoAppTests"; sourceTree = ""; }; - D652CBF4B9FDAE663D00794D99EFD853 /* Pods-DemoAppTests */ = { + E40794132B884DEEC3A2B6282822246D /* Pods-DemoApp */ = { isa = PBXGroup; children = ( - 20CCA68B0DE9A3F31744B9359B7097E5 /* Info.plist */, - CD1DA9CCC369B1EC88A9A3C47E4A1396 /* Pods-DemoAppTests.modulemap */, - 885A71C1A811D13080897A2918575EA3 /* Pods-DemoAppTests-acknowledgements.markdown */, - 65C626ADD44D2223768B3CD90EA1FB02 /* Pods-DemoAppTests-acknowledgements.plist */, - 89C6AF9CD43123DBBACD764015AB4252 /* Pods-DemoAppTests-dummy.m */, - E8D2A7138D18096D90449476FBEEC448 /* Pods-DemoAppTests-frameworks.sh */, - D857B12C524B4A8FBC79763EF9382880 /* Pods-DemoAppTests-resources.sh */, - 3E607A69D99409EC8D6DCB3524D9E85C /* Pods-DemoAppTests-umbrella.h */, - C16ECF98197545210D4D32914B9A7CDB /* Pods-DemoAppTests.debug.xcconfig */, - DCD1980C7C839BAB0F4385CB1393D961 /* Pods-DemoAppTests.release.xcconfig */, + BDC5A144AA934B3B6466C5719CA6382C /* Info.plist */, + 804AF4D59178FC5297377417D9307234 /* Pods-DemoApp.modulemap */, + 0CF31474B9279687D39E2AD2697A7C50 /* Pods-DemoApp-acknowledgements.markdown */, + 8051115CD3A75E242A5F84A147061FF0 /* Pods-DemoApp-acknowledgements.plist */, + 09A3CC756769BEB8E271BC89B3BB7216 /* Pods-DemoApp-dummy.m */, + 7BB5465716F847C88C8E3BF251F98031 /* Pods-DemoApp-frameworks.sh */, + D5E0CACE0C01BD93546D0B75C485BE1F /* Pods-DemoApp-resources.sh */, + 2EF08BF4CA648FA896A685C19DB3FFC4 /* Pods-DemoApp-umbrella.h */, + 2AEF67BD0D6575A91CDF4B393856391B /* Pods-DemoApp.debug.xcconfig */, + 68CA1920DB2C0F296AFA26B12C72F68C /* Pods-DemoApp.release.xcconfig */, ); - name = "Pods-DemoAppTests"; - path = "Target Support Files/Pods-DemoAppTests"; + name = "Pods-DemoApp"; + path = "Target Support Files/Pods-DemoApp"; sourceTree = ""; }; E8D1F285C39DC43E8A8A43D98E9B347E /* Targets Support Files */ = { isa = PBXGroup; children = ( - 50E0B13282BF06E254948CCA326415B1 /* Pods-DemoApp */, - D652CBF4B9FDAE663D00794D99EFD853 /* Pods-DemoAppTests */, + E40794132B884DEEC3A2B6282822246D /* Pods-DemoApp */, + CC69A47FF01841E9D3F5480245AA6B39 /* Pods-DemoAppTests */, ); name = "Targets Support Files"; sourceTree = ""; @@ -231,8 +231,8 @@ D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0830; - LastUpgradeCheck = 0700; + LastSwiftUpdateCheck = 0930; + LastUpgradeCheck = 0930; }; buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; @@ -272,82 +272,94 @@ /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ - 4E487F173E6C9664F4E9E26B9635D23C /* Debug */ = { + 199D972A13F2B4C56847F7A89CCA83BC /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = 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_OBJC_ROOT_CLASS = 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_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_ALLOWED = NO; CODE_SIGNING_REQUIRED = NO; COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "POD_CONFIGURATION_DEBUG=1", "DEBUG=1", "$(inherited)", ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; - PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + PRODUCT_NAME = "$(TARGET_NAME)"; STRIP_INSTALLED_PRODUCT = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SYMROOT = "${SRCROOT}/../build"; }; name = Debug; }; - 5AAA1C2A61EBDCAFD72FAE02F174AF73 /* Debug */ = { + 39C4F483D3BECF9AE427A83DF27D9120 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C16ECF98197545210D4D32914B9A7CDB /* Pods-DemoAppTests.debug.xcconfig */; + baseConfigurationReference = AEBE057D71FDE4F87C5C9BB4499AD2EC /* Pods-DemoAppTests.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "Target Support Files/Pods-DemoAppTests/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; MODULEMAP_FILE = "Target Support Files/Pods-DemoAppTests/Pods-DemoAppTests.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_DemoAppTests; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -356,155 +368,162 @@ }; name = Debug; }; - 5DA83B0E9255423C8EFBFD3D0F2C3DCE /* Debug */ = { + 96036C146DDCD7D70259AC92C0670C4F /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1A4ED427ACF1E66214C9E462112A672B /* Pods-DemoApp.debug.xcconfig */; + baseConfigurationReference = 9BD74FC25A7ECDBAD632EA1E87C375E8 /* Pods-DemoAppTests.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-DemoAppTests/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-DemoAppTests/Pods-DemoAppTests.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + AF67A715B57B97E147A923E3AC85E496 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 68CA1920DB2C0F296AFA26B12C72F68C /* Pods-DemoApp.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "Target Support Files/Pods-DemoApp/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; MODULEMAP_FILE = "Target Support Files/Pods-DemoApp/Pods-DemoApp.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_DemoApp; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - 7CCCBE6DFB6947F49CF8A5E9B944F4DE /* Release */ = { + E0B2DE61FBDE6245F77361B3CA59AFA8 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = DCD1980C7C839BAB0F4385CB1393D961 /* Pods-DemoAppTests.release.xcconfig */; + baseConfigurationReference = 2AEF67BD0D6575A91CDF4B393856391B /* Pods-DemoApp.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-DemoAppTests/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-DemoApp/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-DemoAppTests/Pods-DemoAppTests.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; + MODULEMAP_FILE = "Target Support Files/Pods-DemoApp/Pods-DemoApp.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_DemoAppTests; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - BDD0139D6EB93FA375F887ABD62DAB2E /* Release */ = { + FDB2FC4A1E5891381CD9D922145497F1 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = 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_OBJC_ROOT_CLASS = 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_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_ALLOWED = NO; CODE_SIGNING_REQUIRED = NO; - COPY_PHASE_STRIP = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "POD_CONFIGURATION_RELEASE=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.0; - PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; STRIP_INSTALLED_PRODUCT = NO; SYMROOT = "${SRCROOT}/../build"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - EBB7869D25A4D3D419E46D3FCC433773 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 4CAAAB9E0A1C6766A4DD09060C8EDE63 /* Pods-DemoApp.release.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-DemoApp/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-DemoApp/Pods-DemoApp.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_DemoApp; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; }; name = Release; }; @@ -514,8 +533,8 @@ 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - 4E487F173E6C9664F4E9E26B9635D23C /* Debug */, - BDD0139D6EB93FA375F887ABD62DAB2E /* Release */, + 199D972A13F2B4C56847F7A89CCA83BC /* Debug */, + FDB2FC4A1E5891381CD9D922145497F1 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -523,8 +542,8 @@ 89A1A53B9F9657E05830855A3517F59B /* Build configuration list for PBXNativeTarget "Pods-DemoAppTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 5AAA1C2A61EBDCAFD72FAE02F174AF73 /* Debug */, - 7CCCBE6DFB6947F49CF8A5E9B944F4DE /* Release */, + 39C4F483D3BECF9AE427A83DF27D9120 /* Debug */, + 96036C146DDCD7D70259AC92C0670C4F /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -532,8 +551,8 @@ BCA3EE93C3F029D79DA7C62E8557D8D7 /* Build configuration list for PBXNativeTarget "Pods-DemoApp" */ = { isa = XCConfigurationList; buildConfigurations = ( - 5DA83B0E9255423C8EFBFD3D0F2C3DCE /* Debug */, - EBB7869D25A4D3D419E46D3FCC433773 /* Release */, + E0B2DE61FBDE6245F77361B3CA59AFA8 /* Debug */, + AF67A715B57B97E147A923E3AC85E496 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/DemoApp/Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp-frameworks.sh b/DemoApp/Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp-frameworks.sh index 0f29f13c..08e3eaac 100755 --- a/DemoApp/Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp-frameworks.sh +++ b/DemoApp/Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp-frameworks.sh @@ -1,11 +1,28 @@ #!/bin/sh set -e +set -u +set -o pipefail + +if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then + # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy + # frameworks to, so exit 0 (signalling the script phase was successful). + exit 0 +fi echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" +# Used as a return value for each invocation of `strip_invalid_archs` function. +STRIP_BINARY_RETVAL=0 + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +# Copies and strips a vendored framework install_framework() { if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then @@ -23,9 +40,9 @@ install_framework() source="$(readlink "${source}")" fi - # use filter instead of exclude so missing patterns dont' throw errors - echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + # Use filter instead of exclude so missing patterns don't throw errors. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" local basename basename="$(basename -s .framework "$1")" @@ -54,12 +71,40 @@ install_framework() fi } +# Copies and strips a vendored dSYM +install_dsym() { + local source="$1" + if [ -r "$source" ]; then + # Copy the dSYM into a the targets temp dir. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" + + local basename + basename="$(basename -s .framework.dSYM "$source")" + binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then + strip_invalid_archs "$binary" + fi + + if [[ $STRIP_BINARY_RETVAL == 1 ]]; then + # Move the stripped file into its final destination. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" + else + # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. + touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" + fi + fi +} + # Signs a framework with the provided identity code_sign_if_enabled() { - if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then # Use the current code_sign_identitiy echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then code_sign_cmd="$code_sign_cmd &" @@ -72,11 +117,19 @@ code_sign_if_enabled() { # Strip invalid architectures strip_invalid_archs() { binary="$1" - # Get architectures for current file - archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" + # Get architectures for current target binary + binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" + # Intersect them with the architectures we are building for + intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" + # If there are no archs supported by this binary then warn the user + if [[ -z "$intersected_archs" ]]; then + echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." + STRIP_BINARY_RETVAL=0 + return + fi stripped="" - for arch in $archs; do - if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then + for arch in $binary_archs; do + if ! [[ "${ARCHS}" == *"$arch"* ]]; then # Strip non-valid architectures in-place lipo -remove "$arch" -output "$binary" "$binary" || exit 1 stripped="$stripped $arch" @@ -85,6 +138,7 @@ strip_invalid_archs() { if [[ "$stripped" ]]; then echo "Stripped $binary of architectures:$stripped" fi + STRIP_BINARY_RETVAL=1 } if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then diff --git a/DemoApp/Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp-resources.sh b/DemoApp/Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp-resources.sh index 4602c68a..345301f2 100755 --- a/DemoApp/Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp-resources.sh +++ b/DemoApp/Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp-resources.sh @@ -1,5 +1,13 @@ #!/bin/sh set -e +set -u +set -o pipefail + +if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then + # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy + # resources to, so exit 0 (signalling the script phase was successful). + exit 0 +fi mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" @@ -8,7 +16,11 @@ RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt XCASSET_FILES=() -case "${TARGETED_DEVICE_FAMILY}" in +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +case "${TARGETED_DEVICE_FAMILY:-}" in 1,2) TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" ;; @@ -21,6 +33,9 @@ case "${TARGETED_DEVICE_FAMILY}" in 3) TARGET_DEVICE_ARGS="--target-device tv" ;; + 4) + TARGET_DEVICE_ARGS="--target-device watch" + ;; *) TARGET_DEVICE_ARGS="--target-device mac" ;; @@ -41,29 +56,29 @@ EOM fi case $RESOURCE_PATH in *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ;; *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ;; *.framework) - echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" ;; *.xcdatamodel) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" ;; *.xcdatamodeld) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" ;; *.xcmappingmodel) - echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" ;; *.xcassets) @@ -71,7 +86,7 @@ EOM XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") ;; *) - echo "$RESOURCE_PATH" + echo "$RESOURCE_PATH" || true echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" ;; esac @@ -85,7 +100,7 @@ if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then fi rm -f "$RESOURCES_TO_COPY" -if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] then # Find all other xcassets (this unfortunately includes those of path pods and other targets). OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) @@ -95,5 +110,9 @@ then fi done <<<"$OTHER_XCASSETS" - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + else + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" + fi fi diff --git a/DemoApp/Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp.debug.xcconfig b/DemoApp/Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp.debug.xcconfig index 9aff382d..566aa026 100644 --- a/DemoApp/Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp.debug.xcconfig +++ b/DemoApp/Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp.debug.xcconfig @@ -1,5 +1,6 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods diff --git a/DemoApp/Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp.release.xcconfig b/DemoApp/Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp.release.xcconfig index 9aff382d..566aa026 100644 --- a/DemoApp/Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp.release.xcconfig +++ b/DemoApp/Pods/Target Support Files/Pods-DemoApp/Pods-DemoApp.release.xcconfig @@ -1,5 +1,6 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods diff --git a/DemoApp/Pods/Target Support Files/Pods-DemoAppTests/Pods-DemoAppTests-frameworks.sh b/DemoApp/Pods/Target Support Files/Pods-DemoAppTests/Pods-DemoAppTests-frameworks.sh index dc21e82d..bf27e8fe 100755 --- a/DemoApp/Pods/Target Support Files/Pods-DemoAppTests/Pods-DemoAppTests-frameworks.sh +++ b/DemoApp/Pods/Target Support Files/Pods-DemoAppTests/Pods-DemoAppTests-frameworks.sh @@ -1,11 +1,28 @@ #!/bin/sh set -e +set -u +set -o pipefail + +if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then + # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy + # frameworks to, so exit 0 (signalling the script phase was successful). + exit 0 +fi echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" +# Used as a return value for each invocation of `strip_invalid_archs` function. +STRIP_BINARY_RETVAL=0 + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +# Copies and strips a vendored framework install_framework() { if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then @@ -23,9 +40,9 @@ install_framework() source="$(readlink "${source}")" fi - # use filter instead of exclude so missing patterns dont' throw errors - echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + # Use filter instead of exclude so missing patterns don't throw errors. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" local basename basename="$(basename -s .framework "$1")" @@ -54,12 +71,40 @@ install_framework() fi } +# Copies and strips a vendored dSYM +install_dsym() { + local source="$1" + if [ -r "$source" ]; then + # Copy the dSYM into a the targets temp dir. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" + + local basename + basename="$(basename -s .framework.dSYM "$source")" + binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then + strip_invalid_archs "$binary" + fi + + if [[ $STRIP_BINARY_RETVAL == 1 ]]; then + # Move the stripped file into its final destination. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" + else + # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. + touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" + fi + fi +} + # Signs a framework with the provided identity code_sign_if_enabled() { - if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then # Use the current code_sign_identitiy echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then code_sign_cmd="$code_sign_cmd &" @@ -72,11 +117,19 @@ code_sign_if_enabled() { # Strip invalid architectures strip_invalid_archs() { binary="$1" - # Get architectures for current file - archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" + # Get architectures for current target binary + binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" + # Intersect them with the architectures we are building for + intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" + # If there are no archs supported by this binary then warn the user + if [[ -z "$intersected_archs" ]]; then + echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." + STRIP_BINARY_RETVAL=0 + return + fi stripped="" - for arch in $archs; do - if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then + for arch in $binary_archs; do + if ! [[ "${ARCHS}" == *"$arch"* ]]; then # Strip non-valid architectures in-place lipo -remove "$arch" -output "$binary" "$binary" || exit 1 stripped="$stripped $arch" @@ -85,6 +138,7 @@ strip_invalid_archs() { if [[ "$stripped" ]]; then echo "Stripped $binary of architectures:$stripped" fi + STRIP_BINARY_RETVAL=1 } diff --git a/DemoApp/Pods/Target Support Files/Pods-DemoAppTests/Pods-DemoAppTests-resources.sh b/DemoApp/Pods/Target Support Files/Pods-DemoAppTests/Pods-DemoAppTests-resources.sh index 4602c68a..345301f2 100755 --- a/DemoApp/Pods/Target Support Files/Pods-DemoAppTests/Pods-DemoAppTests-resources.sh +++ b/DemoApp/Pods/Target Support Files/Pods-DemoAppTests/Pods-DemoAppTests-resources.sh @@ -1,5 +1,13 @@ #!/bin/sh set -e +set -u +set -o pipefail + +if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then + # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy + # resources to, so exit 0 (signalling the script phase was successful). + exit 0 +fi mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" @@ -8,7 +16,11 @@ RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt XCASSET_FILES=() -case "${TARGETED_DEVICE_FAMILY}" in +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +case "${TARGETED_DEVICE_FAMILY:-}" in 1,2) TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" ;; @@ -21,6 +33,9 @@ case "${TARGETED_DEVICE_FAMILY}" in 3) TARGET_DEVICE_ARGS="--target-device tv" ;; + 4) + TARGET_DEVICE_ARGS="--target-device watch" + ;; *) TARGET_DEVICE_ARGS="--target-device mac" ;; @@ -41,29 +56,29 @@ EOM fi case $RESOURCE_PATH in *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ;; *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ;; *.framework) - echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" ;; *.xcdatamodel) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" ;; *.xcdatamodeld) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" ;; *.xcmappingmodel) - echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" ;; *.xcassets) @@ -71,7 +86,7 @@ EOM XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") ;; *) - echo "$RESOURCE_PATH" + echo "$RESOURCE_PATH" || true echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" ;; esac @@ -85,7 +100,7 @@ if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then fi rm -f "$RESOURCES_TO_COPY" -if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] then # Find all other xcassets (this unfortunately includes those of path pods and other targets). OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) @@ -95,5 +110,9 @@ then fi done <<<"$OTHER_XCASSETS" - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + else + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" + fi fi diff --git a/DemoApp/Pods/Target Support Files/Pods-DemoAppTests/Pods-DemoAppTests.debug.xcconfig b/DemoApp/Pods/Target Support Files/Pods-DemoAppTests/Pods-DemoAppTests.debug.xcconfig index 9ea259ef..8d187f5e 100644 --- a/DemoApp/Pods/Target Support Files/Pods-DemoAppTests/Pods-DemoAppTests.debug.xcconfig +++ b/DemoApp/Pods/Target Support Files/Pods-DemoAppTests/Pods-DemoAppTests.debug.xcconfig @@ -1,9 +1,8 @@ FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" "${PODS_ROOT}/EarlGrey/EarlGrey" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/EarlGrey" LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/EarlGrey" OTHER_LDFLAGS = $(inherited) -framework "CoreData" -framework "CoreFoundation" -framework "CoreGraphics" -framework "EarlGrey" -framework "Foundation" -framework "IOKit" -framework "QuartzCore" -framework "UIKit" -framework "XCTest" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods diff --git a/DemoApp/Pods/Target Support Files/Pods-DemoAppTests/Pods-DemoAppTests.release.xcconfig b/DemoApp/Pods/Target Support Files/Pods-DemoAppTests/Pods-DemoAppTests.release.xcconfig index 9ea259ef..8d187f5e 100644 --- a/DemoApp/Pods/Target Support Files/Pods-DemoAppTests/Pods-DemoAppTests.release.xcconfig +++ b/DemoApp/Pods/Target Support Files/Pods-DemoAppTests/Pods-DemoAppTests.release.xcconfig @@ -1,9 +1,8 @@ FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" "${PODS_ROOT}/EarlGrey/EarlGrey" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/EarlGrey" LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/EarlGrey" OTHER_LDFLAGS = $(inherited) -framework "CoreData" -framework "CoreFoundation" -framework "CoreGraphics" -framework "EarlGrey" -framework "Foundation" -framework "IOKit" -framework "QuartzCore" -framework "UIKit" -framework "XCTest" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods diff --git a/TwitterCore/TwitterCore.xcodeproj/project.pbxproj b/TwitterCore/TwitterCore.xcodeproj/project.pbxproj index 4bfd13a5..b77eda23 100644 --- a/TwitterCore/TwitterCore.xcodeproj/project.pbxproj +++ b/TwitterCore/TwitterCore.xcodeproj/project.pbxproj @@ -1181,7 +1181,6 @@ 3D98960F1B9621CF00B9CABD /* TWTRTokenOnlyAuthSession.h in Headers */, 9D30C5CF1ACE60E200D0B1FA /* TWTRIdentifier.h in Headers */, 9D0AE5B71AC7400500884B45 /* TWTRDateUtil.h in Headers */, - 9DF52D9C1ABB67F6004345D0 /* TWTRColorUtil.h in Headers */, 6C37A1CA1B22505900C360B4 /* TWTRCoreLanguage.h in Headers */, 3DEEF7C31B7A769A00A1B457 /* TWTRNetworkingConstants.h in Headers */, 9DBB70511ABB76BB00ED4051 /* TWTRResourcesUtil.h in Headers */, @@ -1384,7 +1383,7 @@ 9D5A92191AAA89730039EFCC /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0830; + LastUpgradeCheck = 0940; ORGANIZATIONNAME = "Twitter Inc."; TargetAttributes = { 9D5A92201AAA89730039EFCC = { @@ -1597,7 +1596,9 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = NO; 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; @@ -1605,8 +1606,12 @@ 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; @@ -1648,7 +1653,9 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = NO; 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; @@ -1656,8 +1663,12 @@ 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; diff --git a/TwitterCore/TwitterCore.xcodeproj/xcshareddata/xcschemes/TwitterCore-static.xcscheme b/TwitterCore/TwitterCore.xcodeproj/xcshareddata/xcschemes/TwitterCore-static.xcscheme index 1fd53d58..ba942442 100644 --- a/TwitterCore/TwitterCore.xcodeproj/xcshareddata/xcschemes/TwitterCore-static.xcscheme +++ b/TwitterCore/TwitterCore.xcodeproj/xcshareddata/xcschemes/TwitterCore-static.xcscheme @@ -1,6 +1,6 @@ -NSString *TWTRIdentifierForAdvertising(); +NSString *TWTRIdentifierForAdvertising(void); /** * This class contains analytics code ported from Crashlytics. diff --git a/TwitterCore/TwitterCore/Identity/TWTRCoreOAuthSigning.h b/TwitterCore/TwitterCore/Identity/TWTRCoreOAuthSigning.h index 17e9cad2..a5526d5a 100644 --- a/TwitterCore/TwitterCore/Identity/TWTRCoreOAuthSigning.h +++ b/TwitterCore/TwitterCore/Identity/TWTRCoreOAuthSigning.h @@ -44,7 +44,7 @@ FOUNDATION_EXTERN NSString *const TWTROAuthEchoAuthorizationHeaderKey; * * @see More information about OAuth Echo: https://dev.twitter.com/oauth/echo */ -- (NSDictionary *)OAuthEchoHeadersForRequestMethod:(NSString *)method URLString:(NSString *)URLString parameters:(nullable NSDictionary *)parameters error:(NSError **)error; +- (NSDictionary *)OAuthEchoHeadersForRequestMethod:(NSString *)method URLString:(NSString *)URLString parameters:(nullable NSDictionary *)parameters error:(NSError * __autoreleasing *)error; /** * This method provides you with the OAuth signature, as well as the formed URL with the query string, to send a request to `verify_credentials`. diff --git a/TwitterCore/TwitterCore/Identity/TWTRGenericKeychainItem.h b/TwitterCore/TwitterCore/Identity/TWTRGenericKeychainItem.h index 68e2459f..eb185d85 100644 --- a/TwitterCore/TwitterCore/Identity/TWTRGenericKeychainItem.h +++ b/TwitterCore/TwitterCore/Identity/TWTRGenericKeychainItem.h @@ -71,10 +71,14 @@ extern NSString *const TWTRGenericKeychainItemErrorDomain; */ + (instancetype)queryForAccount:(NSString *)account; +NS_ASSUME_NONNULL_END + /** * A query that will match all items that contain both the service and account. */ -+ (instancetype)queryForService:(NSString *)service account:(NSString *)account; ++ (nonnull instancetype)queryForService:(nonnull NSString *)service account:(nullable NSString *)account; + +NS_ASSUME_NONNULL_BEGIN /** * A query that will return all items with the given generic value. @@ -151,12 +155,12 @@ extern NSString *const TWTRGenericKeychainItemErrorDomain; * The query results will depend on the specificity of the query * object as described in its documetation. */ -+ (NSArray *)storedItemsMatchingQuery:(TWTRGenericKeychainQuery *)query error:(NSError **)error; ++ (NSArray *)storedItemsMatchingQuery:(TWTRGenericKeychainQuery *)query error:(NSError * __autoreleasing *)error; /** * Removes all the items matching the given query. */ -+ (BOOL)removeAllItemsForQuery:(TWTRGenericKeychainQuery *)query error:(NSError **)error; ++ (BOOL)removeAllItemsForQuery:(TWTRGenericKeychainQuery *)query error:(NSError * __autoreleasing *)error; /** * Initializes a TWTRGenericKeychainItem object with the given values. @@ -190,7 +194,7 @@ extern NSString *const TWTRGenericKeychainItemErrorDomain; * @return a value representing if the operation was successful */ - (BOOL)storeInKeychain:(NSError **)error; -- (BOOL)storeInKeychainReplacingExisting:(BOOL)replaceExisting error:(NSError **)error; +- (BOOL)storeInKeychainReplacingExisting:(BOOL)replaceExisting error:(NSError * __autoreleasing *)error; /** * Attempts to remove the wrapper from the keychain. diff --git a/TwitterCore/TwitterCore/Identity/TWTRGenericKeychainItem.m b/TwitterCore/TwitterCore/Identity/TWTRGenericKeychainItem.m index ae2e8e7f..02daa264 100644 --- a/TwitterCore/TwitterCore/Identity/TWTRGenericKeychainItem.m +++ b/TwitterCore/TwitterCore/Identity/TWTRGenericKeychainItem.m @@ -192,7 +192,7 @@ - (BOOL)storeInKeychain:(NSError **)error return [self storeInKeychainReplacingExisting:YES error:error]; } -- (BOOL)storeInKeychainReplacingExisting:(BOOL)replaceExisting error:(NSError **)error; +- (BOOL)storeInKeychainReplacingExisting:(BOOL)replaceExisting error:(NSError * __autoreleasing *)error; { __block BOOL success = YES; @@ -223,7 +223,7 @@ - (BOOL)storeInKeychainReplacingExisting:(BOOL)replaceExisting error:(NSError ** return success; } -- (BOOL)removeFromKeychain:(NSError **)error +- (BOOL)removeFromKeychain:(NSError * __autoreleasing *)error { __block BOOL success = YES; @@ -234,7 +234,7 @@ - (BOOL)removeFromKeychain:(NSError **)error return success; } -+ (BOOL)removeAllItemsForQuery:(TWTRGenericKeychainQuery *)query error:(NSError **)error; ++ (BOOL)removeAllItemsForQuery:(TWTRGenericKeychainQuery *)query error:(NSError * __autoreleasing *)error; { __block BOOL success = YES; @@ -279,14 +279,14 @@ - (BOOL)unsynchronizedRemoveFromKeychain:(NSError **)error * This method fetches all the items that match the query but in an unsynchronized manner. * This method can safely be called from with the synchronouslyAccessKeychain: method. */ -+ (NSArray *)unsynchronizedStoredItemsMatchingQuery:(TWTRGenericKeychainQuery *)query error:(NSError **)error ++ (NSArray *)unsynchronizedStoredItemsMatchingQuery:(TWTRGenericKeychainQuery *)query error:(NSError * __autoreleasing *)error { NSMutableDictionary *queryDict = [query queryDictionary]; return [self storedItemsMatchingQueryDictionary:queryDict error:error]; } #pragma mark - Query -+ (NSArray *)storedItemsMatchingQuery:(TWTRGenericKeychainQuery *)query error:(NSError **)error ++ (NSArray *)storedItemsMatchingQuery:(TWTRGenericKeychainQuery *)query error:(NSError * __autoreleasing *)error { NSArray *__block items = nil; @@ -297,7 +297,7 @@ + (NSArray *)storedItemsMatchingQuery:(TWTRGenericKeychainQuery *)query error:(N return items; } -+ (NSArray *)storedItemsMatchingQueryDictionary:(NSDictionary *)queryDict error:(NSError **)error ++ (NSArray *)storedItemsMatchingQueryDictionary:(NSDictionary *)queryDict error:(NSError * __autoreleasing *)error { NSMutableArray *objects = nil; NSMutableDictionary *query = [queryDict mutableCopy]; diff --git a/TwitterCore/TwitterCore/Networking/Pipeline/TWTRNetworkingPipeline.h b/TwitterCore/TwitterCore/Networking/Pipeline/TWTRNetworkingPipeline.h index 2d77dd12..0c224360 100644 --- a/TwitterCore/TwitterCore/Networking/Pipeline/TWTRNetworkingPipeline.h +++ b/TwitterCore/TwitterCore/Networking/Pipeline/TWTRNetworkingPipeline.h @@ -76,7 +76,7 @@ typedef void (^TWTRNetworkingPipelineCallback)(NSData *_Nullable data, NSURLResp /** * This method should return an NO if the response represents an error state. */ -- (BOOL)validateResponse:(nullable NSURLResponse *)response data:(nullable NSData *)data error:(NSError **)error; +- (BOOL)validateResponse:(nullable NSURLResponse *)response data:(nullable NSData *)data error:(NSError * __autoreleasing *)error; @end diff --git a/TwitterCore/TwitterCore/Networking/Pipeline/TWTRNetworkingPipelineQueue.m b/TwitterCore/TwitterCore/Networking/Pipeline/TWTRNetworkingPipelineQueue.m index 77cb0be6..dd9241f9 100644 --- a/TwitterCore/TwitterCore/Networking/Pipeline/TWTRNetworkingPipelineQueue.m +++ b/TwitterCore/TwitterCore/Networking/Pipeline/TWTRNetworkingPipelineQueue.m @@ -444,7 +444,7 @@ - (void)invokeCallbackForPackage:(TWTRNetworkingPipelinePackage *)package withDa } } -- (BOOL)validateResponse:(nullable NSURLResponse *)response data:(nullable NSData *)data error:(NSError **)error +- (BOOL)validateResponse:(nullable NSURLResponse *)response data:(nullable NSData *)data error:(NSError * __autoreleasing *)error { if (self.responseValidator) { return [self.responseValidator validateResponse:response data:data error:error]; diff --git a/TwitterCore/TwitterCore/Networking/Pipeline/TWTRRequestSigningOperation.h b/TwitterCore/TwitterCore/Networking/Pipeline/TWTRRequestSigningOperation.h index 088840e3..07df3a5a 100644 --- a/TwitterCore/TwitterCore/Networking/Pipeline/TWTRRequestSigningOperation.h +++ b/TwitterCore/TwitterCore/Networking/Pipeline/TWTRRequestSigningOperation.h @@ -61,10 +61,14 @@ typedef TWTRSession *_Nonnull (^TWTRUserSessionProvider)(void); - (instancetype)init NS_UNAVAILABLE; +NS_ASSUME_NONNULL_END + /** * Subclasses must implement this method to return the signed request. */ -- (NSURLRequest *)signRequest:(NSURLRequest *)request; +- (nullable NSURLRequest *)signRequest:(nonnull NSURLRequest *)request; + +NS_ASSUME_NONNULL_BEGIN @end diff --git a/TwitterCore/TwitterCore/Networking/TWTRAPINetworkErrorsShim.m b/TwitterCore/TwitterCore/Networking/TWTRAPINetworkErrorsShim.m index c0b20155..ab1d970c 100644 --- a/TwitterCore/TwitterCore/Networking/TWTRAPINetworkErrorsShim.m +++ b/TwitterCore/TwitterCore/Networking/TWTRAPINetworkErrorsShim.m @@ -125,7 +125,7 @@ - (NSDictionary *)firstNormalizedAPIErrorInResponseBody:(id)errors @implementation TWTRAPIResponseValidator -- (BOOL)validateResponse:(NSHTTPURLResponse *)response data:(NSData *)data error:(NSError **)error +- (BOOL)validateResponse:(NSHTTPURLResponse *)response data:(NSData *)data error:(NSError * __autoreleasing *)error { TWTRAPINetworkErrorsShim *shim = [[TWTRAPINetworkErrorsShim alloc] initWithHTTPResponse:response responseData:data]; NSError *validationError = [shim validate]; diff --git a/TwitterCore/TwitterCore/Utilities/TWTRColorUtil.h b/TwitterCore/TwitterCore/Utilities/TWTRColorUtil.h index d74bf09d..a2c27048 100644 --- a/TwitterCore/TwitterCore/Utilities/TWTRColorUtil.h +++ b/TwitterCore/TwitterCore/Utilities/TWTRColorUtil.h @@ -119,13 +119,15 @@ NS_ASSUME_NONNULL_BEGIN */ + (UIColor *)contrastingTextColorFromBackgroundColor:(UIColor *)backgroundColor; +NS_ASSUME_NONNULL_END + /** * Returns a darker color based on the original color and a percent to darken. * * @param color The original color * @param lightnessLevel Lightness levels to lighten. Capped to 0 and 1.0. */ -+ (UIColor *)darkerColorForColor:(UIColor *)color lightnessLevel:(CGFloat)lightnessLevel; ++ (nullable UIColor *)darkerColorForColor:(nonnull UIColor *)color lightnessLevel:(CGFloat)lightnessLevel; /** * Returns a darker color based on the original color and a percent to lighten. @@ -133,8 +135,6 @@ NS_ASSUME_NONNULL_BEGIN * @param color The original color * @param lightnessLevel Lightness levels to lighten. Capped to 0 and 1.0. */ -+ (UIColor *)lighterColorForColor:(UIColor *)color lightnessLevel:(CGFloat)lightnessLevel; ++ (nullable UIColor *)lighterColorForColor:(nonnull UIColor *)color lightnessLevel:(CGFloat)lightnessLevel; @end - -NS_ASSUME_NONNULL_END diff --git a/TwitterCore/TwitterCore/Utilities/TWTRKeychainWrapper.m b/TwitterCore/TwitterCore/Utilities/TWTRKeychainWrapper.m index 2db30141..7f556bf7 100644 --- a/TwitterCore/TwitterCore/Utilities/TWTRKeychainWrapper.m +++ b/TwitterCore/TwitterCore/Utilities/TWTRKeychainWrapper.m @@ -111,12 +111,11 @@ - (id)objectForKey:(id)key - (void)resetKeychainItem { - OSStatus result = noErr; if (![self keychainItemData]) { [self setKeychainItemData:[[NSMutableDictionary alloc] init]]; } else if ([self keychainItemData]) { NSMutableDictionary *tempDictionary = [self dictionaryToSecItemFormat:[self keychainItemData]]; - result = [TWTRSecItemWrapper secItemDelete:(__bridge CFDictionaryRef)tempDictionary]; + [TWTRSecItemWrapper secItemDelete:(__bridge CFDictionaryRef)tempDictionary]; } // Default attributes for keychain item. diff --git a/TwitterCore/TwitterCoreTests/NetworkingTests/PipelineTests/TWTRNetworkingPipelineQueueTests.m b/TwitterCore/TwitterCoreTests/NetworkingTests/PipelineTests/TWTRNetworkingPipelineQueueTests.m index bf17f216..ab48725c 100644 --- a/TwitterCore/TwitterCoreTests/NetworkingTests/PipelineTests/TWTRNetworkingPipelineQueueTests.m +++ b/TwitterCore/TwitterCoreTests/NetworkingTests/PipelineTests/TWTRNetworkingPipelineQueueTests.m @@ -566,7 +566,7 @@ - (TWTRGuestSession *)guestSession } #pragma mark - Response Validating -- (BOOL)validateResponse:(NSHTTPURLResponse *)response data:(NSData *)data error:(NSError **)error +- (BOOL)validateResponse:(NSHTTPURLResponse *)response data:(NSData *)data error:(NSError * __autoreleasing *)error { if (!self.responseValidatorError) { return YES; diff --git a/TwitterKit/TwitterKit.xcodeproj/project.pbxproj b/TwitterKit/TwitterKit.xcodeproj/project.pbxproj index 0bdd7729..c06b73dd 100644 --- a/TwitterKit/TwitterKit.xcodeproj/project.pbxproj +++ b/TwitterKit/TwitterKit.xcodeproj/project.pbxproj @@ -2960,11 +2960,11 @@ A97654DD18E0B29B00E25169 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0830; + LastUpgradeCheck = 0940; ORGANIZATIONNAME = Twitter; TargetAttributes = { A966541318EB687000B61CEE = { - LastSwiftMigration = 0830; + LastSwiftMigration = 0940; ProvisioningStyle = Manual; TestTargetID = A97654E418E0B29B00E25169; }; @@ -3454,7 +3454,8 @@ SDKROOT = iphoneos; SWIFT_OBJC_BRIDGING_HEADER = "TwitterKitTests/TwitterKit Tests-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; WRAPPER_EXTENSION = xctest; }; name = Debug; @@ -3473,7 +3474,8 @@ SDKROOT = iphoneos; SWIFT_OBJC_BRIDGING_HEADER = "TwitterKitTests/TwitterKit Tests-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; WRAPPER_EXTENSION = xctest; }; name = Release; @@ -3484,12 +3486,19 @@ buildSettings = { CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_MODULES_AUTOLINK = NO; + 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_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_LITERAL_CONVERSION = YES; + 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; @@ -3514,12 +3523,19 @@ buildSettings = { CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_MODULES_AUTOLINK = NO; + 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_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_LITERAL_CONVERSION = YES; + 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; @@ -3574,7 +3590,7 @@ "-all_load", ); PRODUCT_BUNDLE_IDENTIFIER = com.twitter.sdk.ios; - SDKROOT = iphoneos11.1; + SDKROOT = iphoneos; }; name = Debug; }; @@ -3591,7 +3607,7 @@ "-all_load", ); PRODUCT_BUNDLE_IDENTIFIER = com.twitter.sdk.ios; - SDKROOT = iphoneos11.1; + SDKROOT = iphoneos; }; name = Release; }; diff --git a/TwitterKit/TwitterKit.xcodeproj/xcshareddata/xcschemes/TwitterKit-static.xcscheme b/TwitterKit/TwitterKit.xcodeproj/xcshareddata/xcschemes/TwitterKit-static.xcscheme index 95d12416..836e3fdc 100644 --- a/TwitterKit/TwitterKit.xcodeproj/xcshareddata/xcschemes/TwitterKit-static.xcscheme +++ b/TwitterKit/TwitterKit.xcodeproj/xcshareddata/xcschemes/TwitterKit-static.xcscheme @@ -1,6 +1,6 @@ dataSource; +@property (nonatomic, nullable, copy) id dataSource; /** * The configuration of MoPub ads to show in the timeline. You must @@ -67,12 +65,14 @@ NS_ASSUME_NONNULL_BEGIN /** * If set, this value will be passed to all TWTRTweetView instances in the timeline. */ -@property (nonatomic, weak) id tweetViewDelegate; +@property (nonatomic, nullable, weak) id tweetViewDelegate; /** * The object that acts as the delegate for the timeline. */ -@property (nonatomic, weak) id timelineDelegate; +@property (nonatomic, nullable, weak) id timelineDelegate; + +NS_ASSUME_NONNULL_BEGIN /** Initializes a timeline view controller. Does not start loading tweets until diff --git a/TwitterKit/TwitterKit/Social/Syndication/Controllers/TWTRTimelineViewController.m b/TwitterKit/TwitterKit/Social/Syndication/Controllers/TWTRTimelineViewController.m index 7390bcee..99a64ec6 100644 --- a/TwitterKit/TwitterKit/Social/Syndication/Controllers/TWTRTimelineViewController.m +++ b/TwitterKit/TwitterKit/Social/Syndication/Controllers/TWTRTimelineViewController.m @@ -156,10 +156,12 @@ - (void)viewWillAppear:(BOOL)animated } if (self.dataSource) { - NSString *timelineID = nil; if ([self.dataSource respondsToSelector:@selector(collectionID)]) { TWTRCollectionTimelineDataSource *collectionDataSource = (TWTRCollectionTimelineDataSource *)self.dataSource; - timelineID = collectionDataSource.collectionID; +#ifdef DEBUG + NSString *timelineID = collectionDataSource.collectionID; + NSLog(@"[TwitterKit] timelineID = %@", timelineID); +#endif } } [self loadNewestTweets]; diff --git a/TwitterKit/TwitterKit/Social/Syndication/Controllers/TWTRTweetPresenter.h b/TwitterKit/TwitterKit/Social/Syndication/Controllers/TWTRTweetPresenter.h index 5ea0f1e6..b6a4eccb 100644 --- a/TwitterKit/TwitterKit/Social/Syndication/Controllers/TWTRTweetPresenter.h +++ b/TwitterKit/TwitterKit/Social/Syndication/Controllers/TWTRTweetPresenter.h @@ -66,6 +66,8 @@ typedef NS_OPTIONS(NSInteger, TWTRTweetEntityDisplayType) { - (NSString *)textForTweet:(nullable TWTRTweet *)tweet; - (NSAttributedString *)attributedTextForText:(NSString *)text withEntityRanges:(NSArray *)entityRanges; +NS_ASSUME_NONNULL_END + /** * Returns the retweeted by attribution text given a retweet. * @@ -73,7 +75,9 @@ typedef NS_OPTIONS(NSInteger, TWTRTweetEntityDisplayType) { * * @return retweeted by attribution text string */ -- (NSString *)retweetedByTextForRetweet:(nullable TWTRTweet *)retweet; +- (nullable NSString *)retweetedByTextForRetweet:(nullable TWTRTweet *)retweet; + +NS_ASSUME_NONNULL_BEGIN /** * If the tweet displays media, return the aspect ratio for the diff --git a/TwitterKit/TwitterKit/Social/Syndication/Controllers/TWTRWebAuthenticationViewController.m b/TwitterKit/TwitterKit/Social/Syndication/Controllers/TWTRWebAuthenticationViewController.m index e4e5204c..4bf5b39f 100644 --- a/TwitterKit/TwitterKit/Social/Syndication/Controllers/TWTRWebAuthenticationViewController.m +++ b/TwitterKit/TwitterKit/Social/Syndication/Controllers/TWTRWebAuthenticationViewController.m @@ -70,7 +70,7 @@ - (void)viewDidLoad [super viewDidLoad]; [self embedViewController:[self webController]]; - self.title = @"Twitter"; + self.title = NSLocalizedString(@"Twitter", nil); self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(handleCancelButton)]; } diff --git a/TwitterKit/TwitterKit/Social/Syndication/Libraries/TWTRImageLoader/TWTRImageLoader.m b/TwitterKit/TwitterKit/Social/Syndication/Libraries/TWTRImageLoader/TWTRImageLoader.m index e5ed437c..019509a5 100644 --- a/TwitterKit/TwitterKit/Social/Syndication/Libraries/TWTRImageLoader/TWTRImageLoader.m +++ b/TwitterKit/TwitterKit/Social/Syndication/Libraries/TWTRImageLoader/TWTRImageLoader.m @@ -107,7 +107,7 @@ - (void)cancelImageWithRequestID:(id)requestID * @param cacheHitCompletion completion block to run on the main queue if image is found in cache * @param cacheMissCompletion completion block to run on the default global queue if image is not found in cache */ -- (void)fetchCachedImageWithImageKey:(NSString *)imageKey cacheHitCompletion:(TWTRImageLoaderFetchCompletion)cacheHitCompletion cacheMissCompletion:(void (^)())cacheMissCompletion +- (void)fetchCachedImageWithImageKey:(NSString *)imageKey cacheHitCompletion:(TWTRImageLoaderFetchCompletion)cacheHitCompletion cacheMissCompletion:(void (^)(void))cacheMissCompletion { dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ UIImage *cachedImage = [self.cache fetchImageForKey:imageKey]; diff --git a/TwitterKit/TwitterKit/Social/Syndication/Models/TWTRTweetRepository.m b/TwitterKit/TwitterKit/Social/Syndication/Models/TWTRTweetRepository.m index a5e8019a..7c7d3b5b 100644 --- a/TwitterKit/TwitterKit/Social/Syndication/Models/TWTRTweetRepository.m +++ b/TwitterKit/TwitterKit/Social/Syndication/Models/TWTRTweetRepository.m @@ -225,7 +225,7 @@ + (NSString *)cacheDirectoryPath #pragma mark - Request Builders -- (NSURLRequest *)lookupRequestForTweetIDs:(NSArray *)tweetIDsStrings APIClient:(TWTRAPIClient *)client additionalParameters:(nullable NSDictionary *)additionalParams error:(NSError **)error +- (NSURLRequest *)lookupRequestForTweetIDs:(NSArray *)tweetIDsStrings APIClient:(TWTRAPIClient *)client additionalParameters:(nullable NSDictionary *)additionalParams error:(NSError * __autoreleasing *)error { id config = [[TWTRAPIServiceConfigRegistry defaultRegistry] configForType:TWTRAPIServiceConfigTypeDefault]; NSURL *URL = TWTRAPIURLWithPath(config, TWTRAPIConstantsStatusLookUpURL); diff --git a/TwitterKit/TwitterKit/Social/Syndication/Utilities/TWTRViewUtil.h b/TwitterKit/TwitterKit/Social/Syndication/Utilities/TWTRViewUtil.h index a2d25a2d..059365d2 100644 --- a/TwitterKit/TwitterKit/Social/Syndication/Utilities/TWTRViewUtil.h +++ b/TwitterKit/TwitterKit/Social/Syndication/Utilities/TWTRViewUtil.h @@ -38,6 +38,8 @@ CGFloat TWTRRoundHalfInteger(CGFloat); - (instancetype)init NS_UNAVAILABLE; +NS_ASSUME_NONNULL_END + /* * Returns the TWTRMediaEntitySize that best matches the media entity sizes. * @@ -45,7 +47,9 @@ CGFloat TWTRRoundHalfInteger(CGFloat); * @param fittingWidth (required) the target width. * @return a best fit size or nil. */ -+ (TWTRMediaEntitySize *)bestMatchSizeFromMediaEntity:(TWTRTweetMediaEntity *)mediaEntity fittingWidth:(CGFloat)fittingWidth; ++ (nullable TWTRMediaEntitySize *)bestMatchSizeFromMediaEntity:(TWTRTweetMediaEntity *)mediaEntity fittingWidth:(CGFloat)fittingWidth; + +NS_ASSUME_NONNULL_BEGIN /** * Returns an average of the aspect ratios in the given media diff --git a/TwitterKit/TwitterKit/Social/Syndication/Views/TWTRLikeButton.m b/TwitterKit/TwitterKit/Social/Syndication/Views/TWTRLikeButton.m index b366a94d..b8bcfaaf 100644 --- a/TwitterKit/TwitterKit/Social/Syndication/Views/TWTRLikeButton.m +++ b/TwitterKit/TwitterKit/Social/Syndication/Views/TWTRLikeButton.m @@ -158,7 +158,9 @@ - (void)likeTapped } else { // Must revert assumed state [self configureWithTweet:originalTweet]; - [[TWTRTweetRepository sharedInstance] cacheTweet:originalTweet perspective:client.userID]; + if (client.userID != nil) { + [[TWTRTweetRepository sharedInstance] cacheTweet:originalTweet perspective:client.userID]; + } NSLog(@"[TwitterKit] Error attempting to %@: %@", attemptingToLike ? @"like" : @"unlike", [likeError localizedDescription]); } }; diff --git a/TwitterKit/TwitterKit/Social/Syndication/Views/TWTRTweetImageView.m b/TwitterKit/TwitterKit/Social/Syndication/Views/TWTRTweetImageView.m index e5007f2a..2432334f 100644 --- a/TwitterKit/TwitterKit/Social/Syndication/Views/TWTRTweetImageView.m +++ b/TwitterKit/TwitterKit/Social/Syndication/Views/TWTRTweetImageView.m @@ -81,12 +81,11 @@ - (void)configureWithMediaEntityConfiguration:(nullable TWTRMediaEntityDisplayCo [self loadImageWithShouldUpdateImageViewCallback:^BOOL { return mediaEntityConfiguration == self.mediaConfiguration; }]; + [self updatePillViewWithMediaEntityConfiguration:mediaEntityConfiguration]; } - - [self updatePillViewWithMediaEntityConfiguration:mediaEntityConfiguration]; } -- (void)updatePillViewWithMediaEntityConfiguration:(TWTRMediaEntityDisplayConfiguration *)mediaEntityConfig +- (void)updatePillViewWithMediaEntityConfiguration:(nonnull TWTRMediaEntityDisplayConfiguration *)mediaEntityConfig { [self.pillView configureWithMediaEntityConfiguration:mediaEntityConfig]; diff --git a/TwitterKit/TwitterKit/Social/Syndication/Views/TWTRTweetMediaView.m b/TwitterKit/TwitterKit/Social/Syndication/Views/TWTRTweetMediaView.m index bc6bbdc5..b6b2d1a8 100644 --- a/TwitterKit/TwitterKit/Social/Syndication/Views/TWTRTweetMediaView.m +++ b/TwitterKit/TwitterKit/Social/Syndication/Views/TWTRTweetMediaView.m @@ -178,7 +178,6 @@ - (void)setAspectRatioConstraintNeedsUpdate self.aspectRatioConstraint.active = NO; [self setNeedsUpdateConstraints]; } - _aspectRatioConstraint = nil; } #pragma mark - Configuration diff --git a/TwitterKit/TwitterKit/Social/Syndication/Views/TWTRTweetView.m b/TwitterKit/TwitterKit/Social/Syndication/Views/TWTRTweetView.m index 46a2ce1f..d55b4b28 100644 --- a/TwitterKit/TwitterKit/Social/Syndication/Views/TWTRTweetView.m +++ b/TwitterKit/TwitterKit/Social/Syndication/Views/TWTRTweetView.m @@ -424,7 +424,9 @@ - (void)configureWithTweet:(TWTRTweet *)tweet self.profileUserToDisplay = tweetToDisplay.author; [self.contentView updateTweetTextWithTweet:tweetToDisplay]; - [self.contentView updateProfileHeaderWithTweet:tweet]; + if (tweet != nil) { + [self.contentView updateProfileHeaderWithTweet:tweet]; + } BOOL isSameTweetAsBefore = [tweet.tweetID isEqualToString:previousTweet.tweetID]; diff --git a/TwitterKit/TwitterKit/Social/Syndication/Views/TWTRVideoControlsView.m b/TwitterKit/TwitterKit/Social/Syndication/Views/TWTRVideoControlsView.m index 255f7ea2..bb6dc5df 100644 --- a/TwitterKit/TwitterKit/Social/Syndication/Views/TWTRVideoControlsView.m +++ b/TwitterKit/TwitterKit/Social/Syndication/Views/TWTRVideoControlsView.m @@ -180,7 +180,7 @@ - (CGFloat)desirableWidthForTimeRemainingLabel return [@"88:88" sizeWithAttributes:@{NSFontAttributeName: self.timeRemainingLabel.font}].width; } -- (NSString *)displayStringForTimeInterval:(NSTimeInterval)interval +- (NSString *)displayStringForTimeInterval:(NSTimeInterval)interval __attribute__((annotate("returns_localized_nsstring"))) { return [TWTRStringUtil displayStringFromTimeInterval:interval] ?: @"--"; } diff --git a/TwitterKit/TwitterKit/Social/Syndication/Views/TWTRVideoPlayerOutputView.m b/TwitterKit/TwitterKit/Social/Syndication/Views/TWTRVideoPlayerOutputView.m index 665a8388..2b357e61 100644 --- a/TwitterKit/TwitterKit/Social/Syndication/Views/TWTRVideoPlayerOutputView.m +++ b/TwitterKit/TwitterKit/Social/Syndication/Views/TWTRVideoPlayerOutputView.m @@ -379,6 +379,8 @@ - (NSTimeInterval)timeIntervalFromTime:(CMTime)time return (NSTimeInterval)time.value / (NSTimeInterval)time.timescale; } +NS_ASSUME_NONNULL_END + #pragma mark - Vine Seemless Looping Player From BlueBird // https://cgit.twitter.biz/twitter-ios/tree/TwitterPlatform/UI/UI/VineGif/TFNVinePlayer.m#n160 + (AVPlayerItem *)seamlessLoopingVinePlayerItemFromURL:(NSURL *)url; @@ -421,7 +423,7 @@ + (AVPlayerItem *)seamlessLoopingVinePlayerItemFromURL:(NSURL *)url; CMTimeRange editRange = CMTimeRangeMake([self standardTrim], CMTimeSubtract(duration, [self standardTotalTrimAmount])); CMTimeRange editAudioRange = CMTimeRangeMake([self standardTrim], CMTimeSubtract(duration, [self standardTrim])); - duration = editRange.duration; + //duration = editRange.duration; BOOL result = [compositionVideoTrack insertTimeRange:editRange ofTrack:sourceVideoTrack atTime:nextStartTime error:&editError]; if (!result) { @@ -500,6 +502,8 @@ + (AVPlayerItem *)seamlessLoopingVinePlayerItemFromURL:(NSURL *)url; return item; } +NS_ASSUME_NONNULL_BEGIN + + (CMTime)standardTrim { return CMTimeMakeWithSeconds(TWTRStandardTrimAmountInSeconds, NSEC_PER_SEC); diff --git a/TwitterKit/TwitterKit/TwitterShareExtensionUI/Private/Composer/TWTRSETweetComposerTableViewDataSource.m b/TwitterKit/TwitterKit/TwitterShareExtensionUI/Private/Composer/TWTRSETweetComposerTableViewDataSource.m index 31c3a9cf..8e7a3e3b 100644 --- a/TwitterKit/TwitterKit/TwitterShareExtensionUI/Private/Composer/TWTRSETweetComposerTableViewDataSource.m +++ b/TwitterKit/TwitterKit/TwitterShareExtensionUI/Private/Composer/TWTRSETweetComposerTableViewDataSource.m @@ -162,7 +162,7 @@ - (void)_tseui_updateTweet:(void (^_Nonnull)(TWTRSETweet *tweet))updateTweet [_tweetTextViewContainer updateText:self.composedTweet.text]; } -- (void)_tseui_updateTweetText:(NSString *)updatedText textSelection:(NSRange)textSelection allowUndo:(BOOL)allowUndo +- (void)_tseui_updateTweetText:(nonnull NSString *)updatedText textSelection:(NSRange)textSelection allowUndo:(BOOL)allowUndo { NSString *existingText = _composedTweet.text; if ((updatedText || existingText) && updatedText != existingText && ![updatedText isEqualToString:existingText]) { diff --git a/TwitterKit/TwitterKit/TwitterShareExtensionUI/Private/Composer/TWTRSETweetComposerViewController.m b/TwitterKit/TwitterKit/TwitterShareExtensionUI/Private/Composer/TWTRSETweetComposerViewController.m index 490f5c25..4e6e5f71 100644 --- a/TwitterKit/TwitterKit/TwitterShareExtensionUI/Private/Composer/TWTRSETweetComposerViewController.m +++ b/TwitterKit/TwitterKit/TwitterShareExtensionUI/Private/Composer/TWTRSETweetComposerViewController.m @@ -171,9 +171,9 @@ @interface TWTRSETweetComposerViewController () @end -@implementation TWTRSETweetTextViewContainer { - dispatch_once_t _containerConstraintsToken; - dispatch_once_t _attachmentViewConstraintsToken; -} +static dispatch_once_t _containerConstraintsToken; +static dispatch_once_t _attachmentViewConstraintsToken; + +@implementation TWTRSETweetTextViewContainer @dynamic minNumberOfLinesToDisplay; diff --git a/TwitterKit/TwitterKitTests/MoPubTests/TWTRMopubVersionCheckerTests.m b/TwitterKit/TwitterKitTests/MoPubTests/TWTRMopubVersionCheckerTests.m index 9d3915b8..284dd0af 100644 --- a/TwitterKit/TwitterKitTests/MoPubTests/TWTRMopubVersionCheckerTests.m +++ b/TwitterKit/TwitterKitTests/MoPubTests/TWTRMopubVersionCheckerTests.m @@ -96,7 +96,7 @@ - (void)testIsValidVersion_handlesPlusKit }]; } -- (void)testVersionParsingWithMoPubVersion:(NSString *)versionString test:(BOOL (^)())testBlock +- (void)testVersionParsingWithMoPubVersion:(NSString *)versionString test:(BOOL (^)(void))testBlock { id mockMopub = OCMClassMock([MoPub class]); OCMStub([mockMopub sharedInstance]).andReturn(mockMopub); diff --git a/shared/TwitterTestFoundation/URLMocking/TWTRStubTwitterClient.m b/shared/TwitterTestFoundation/URLMocking/TWTRStubTwitterClient.m index 55e99745..e251e5f9 100644 --- a/shared/TwitterTestFoundation/URLMocking/TWTRStubTwitterClient.m +++ b/shared/TwitterTestFoundation/URLMocking/TWTRStubTwitterClient.m @@ -23,7 +23,7 @@ + (instancetype)stubTwitterClient return client; } -- (NSURLRequest *)URLRequestWithMethod:(NSString *)method URLString:(NSString *)URLString parameters:(NSDictionary *)parameters error:(NSError **)error +- (NSURLRequest *)URLRequestWithMethod:(NSString *)method URLString:(NSString *)URLString parameters:(NSDictionary *)parameters error:(NSError * __autoreleasing *)error { if (self.urlRequestError) { *error = self.urlRequestError; diff --git a/vendor/MoPub.framework/Headers/MPCoreInstanceProvider.h b/vendor/MoPub.framework/Headers/MPCoreInstanceProvider.h index 3d6af00e..c1d8d9b1 100644 --- a/vendor/MoPub.framework/Headers/MPCoreInstanceProvider.h +++ b/vendor/MoPub.framework/Headers/MPCoreInstanceProvider.h @@ -30,7 +30,7 @@ @class MPLogEventRecorder; @class MPNetworkManager; -typedef id(^MPSingletonProviderBlock)(); +typedef id(^MPSingletonProviderBlock)(void); typedef NS_OPTIONS(NSUInteger, MPATSSetting) { diff --git a/vendor/MoPub.framework/Headers/MPNativeAdError.h b/vendor/MoPub.framework/Headers/MPNativeAdError.h index 7a346861..cfefa0fc 100644 --- a/vendor/MoPub.framework/Headers/MPNativeAdError.h +++ b/vendor/MoPub.framework/Headers/MPNativeAdError.h @@ -23,13 +23,13 @@ typedef enum MPNativeAdErrorCode { extern NSString * const MoPubNativeAdsSDKDomain; NSError *MPNativeAdNSErrorForInvalidAdServerResponse(NSString *reason); -NSError *MPNativeAdNSErrorForAdUnitWarmingUp(); -NSError *MPNativeAdNSErrorForNoInventory(); -NSError *MPNativeAdNSErrorForNetworkConnectionError(); -NSError *MPNativeAdNSErrorForInvalidImageURL(); -NSError *MPNativeAdNSErrorForImageDownloadFailure(); -NSError *MPNativeAdNSErrorForContentDisplayErrorMissingRootController(); -NSError *MPNativeAdNSErrorForContentDisplayErrorInvalidURL(); -NSError *MPNativeAdNSErrorForVASTParsingFailure(); -NSError *MPNativeAdNSErrorForVideoConfigInvalid(); -NSError *MPNativeAdNSErrorForRenderValueTypeError(); +NSError *MPNativeAdNSErrorForAdUnitWarmingUp(void); +NSError *MPNativeAdNSErrorForNoInventory(void); +NSError *MPNativeAdNSErrorForNetworkConnectionError(void); +NSError *MPNativeAdNSErrorForInvalidImageURL(void); +NSError *MPNativeAdNSErrorForImageDownloadFailure(void); +NSError *MPNativeAdNSErrorForContentDisplayErrorMissingRootController(void); +NSError *MPNativeAdNSErrorForContentDisplayErrorInvalidURL(void); +NSError *MPNativeAdNSErrorForVASTParsingFailure(void); +NSError *MPNativeAdNSErrorForVideoConfigInvalid(void); +NSError *MPNativeAdNSErrorForRenderValueTypeError(void); diff --git a/vendor/MoPub.framework/Headers/MPVASTModel.h b/vendor/MoPub.framework/Headers/MPVASTModel.h index bbee686b..d7147d46 100644 --- a/vendor/MoPub.framework/Headers/MPVASTModel.h +++ b/vendor/MoPub.framework/Headers/MPVASTModel.h @@ -17,9 +17,9 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// id MPParseArrayOf(id internalMapper); -id MPParseURLFromString(); +id MPParseURLFromString(void); id MPParseNumberFromString(NSNumberFormatterStyle numberStyle); -id MPParseTimeIntervalFromDurationString(); +id MPParseTimeIntervalFromDurationString(void); id MPParseClass(Class destinationClass); ////////////////////////////////////////////////////////////////////////////////////////////////////