diff --git a/.circleci/config.yml b/.circleci/config.yml index fe8559e14..aa058ec4b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,31 +2,31 @@ version: 2.1 orbs: # This uses the iOS Orb located at https://github.com/wordpress-mobile/circleci-orbs - ios: wordpress-mobile/ios@0.0.25 + ios: wordpress-mobile/ios@0.0.32 workflows: test_and_validate: jobs: - ios/test: name: Test - xcode-version: "10.2.0" + xcode-version: "11.0" carthage-update: true carthage-working-directory: Example bundle-install: false pod-install: false workspace: Aztec.xcworkspace scheme: AztecExample - device: iPhone XS - ios-version: "12.2" + device: iPhone 11 + ios-version: "13.0" - ios/validate-podspec: name: Validate WordPress-Aztec-iOS.podspec - xcode-version: "10.2.0" + xcode-version: "11.0" podspec-path: WordPress-Aztec-iOS.podspec - ios/validate-podspec: name: Validate WordPress-Editor-iOS.podspec - xcode-version: "10.2.0" + xcode-version: "11.0" podspec-path: WordPress-Editor-iOS.podspec # Updating specs is needed since WordPress-Editor-iOS depends on WordPress-Aztec-iOS update-specs-repo: true diff --git a/Aztec.xcodeproj/project.pbxproj b/Aztec.xcodeproj/project.pbxproj index d27d5faed..826034637 100644 --- a/Aztec.xcodeproj/project.pbxproj +++ b/Aztec.xcodeproj/project.pbxproj @@ -1435,12 +1435,12 @@ 5951CB8D1D8BC93600E1866F = { CreatedOnToolsVersion = 8.0; DevelopmentTeam = PZYM8XX95Q; - LastSwiftMigration = 1010; + LastSwiftMigration = 1100; ProvisioningStyle = Manual; }; 5951CB961D8BC93600E1866F = { CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1010; + LastSwiftMigration = 1100; ProvisioningStyle = Automatic; }; E8CE3EFE1F213AAA003254AB = { @@ -1899,7 +1899,7 @@ SKIP_INSTALL = YES; STRIP_INSTALLED_PRODUCT = NO; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; }; name = Debug; @@ -1927,7 +1927,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; STRIP_INSTALLED_PRODUCT = NO; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; }; name = Release; @@ -1947,7 +1947,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.wordpress.AztecTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -1965,7 +1965,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.wordpress.AztecTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -2100,7 +2100,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; STRIP_INSTALLED_PRODUCT = NO; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; }; name = Profiling; @@ -2119,7 +2119,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.wordpress.AztecTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Profiling; }; @@ -2214,7 +2214,7 @@ SKIP_INSTALL = YES; STRIP_INSTALLED_PRODUCT = NO; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; }; name = "Release-Alpha"; @@ -2234,7 +2234,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.wordpress.AztecTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = "Release-Alpha"; }; diff --git a/Aztec/Classes/EditorView/EditorView.swift b/Aztec/Classes/EditorView/EditorView.swift index 3128cee57..a10643e10 100644 --- a/Aztec/Classes/EditorView/EditorView.swift +++ b/Aztec/Classes/EditorView/EditorView.swift @@ -323,7 +323,7 @@ extension EditorView: UITextInput { } set { - activeView.selectedTextRange = selectedTextRange + activeView.selectedTextRange = newValue } } } diff --git a/Aztec/Classes/Extensions/Array+Attribute.swift b/Aztec/Classes/Extensions/Array+Attribute.swift index 0bbb9f984..2b8ebba5f 100644 --- a/Aztec/Classes/Extensions/Array+Attribute.swift +++ b/Aztec/Classes/Extensions/Array+Attribute.swift @@ -22,7 +22,7 @@ public extension Array where Element == Attribute { } mutating func set(_ value: Attribute.Value, for name: String) { - guard let attributeIndex = index(where: { $0.name == name }) else { + guard let attributeIndex = firstIndex(where: { $0.name == name }) else { let newAttribute = Attribute(name: name, value: value) append(newAttribute) @@ -33,7 +33,7 @@ public extension Array where Element == Attribute { } mutating func remove(named name: String) { - guard let attributeIndex = index(where: { $0.name == name }) else { + guard let attributeIndex = firstIndex(where: { $0.name == name }) else { return } diff --git a/Aztec/Classes/Extensions/Array+ShortcodeAttribute.swift b/Aztec/Classes/Extensions/Array+ShortcodeAttribute.swift index 6243c5925..10b3db8e0 100644 --- a/Aztec/Classes/Extensions/Array+ShortcodeAttribute.swift +++ b/Aztec/Classes/Extensions/Array+ShortcodeAttribute.swift @@ -15,7 +15,7 @@ public extension Array where Element == ShortcodeAttribute { mutating func set(_ value: ShortcodeAttribute.Value, forKey key: String) { let newAttribute = ShortcodeAttribute(key: key, value: value) - guard let attributeIndex = index(where: { $0.key == key }) else { + guard let attributeIndex = firstIndex(where: { $0.key == key }) else { append(newAttribute) return } @@ -24,7 +24,7 @@ public extension Array where Element == ShortcodeAttribute { } mutating func remove(key: String) { - guard let attributeIndex = index(where: { $0.key == key }) else { + guard let attributeIndex = firstIndex(where: { $0.key == key }) else { return } diff --git a/Aztec/Classes/GUI/FormatBar/FormatBar.swift b/Aztec/Classes/GUI/FormatBar/FormatBar.swift index 39efd86bd..82ca1300a 100644 --- a/Aztec/Classes/GUI/FormatBar/FormatBar.swift +++ b/Aztec/Classes/GUI/FormatBar/FormatBar.swift @@ -712,6 +712,8 @@ private extension FormatBar { constant: 0 ) self.overflowToggleItemRTLLeadingConstraint = overflowLeadingConstraint + @unknown default: + overflowLeadingConstraint = overflowToggleItem.leadingAnchor.constraint(greaterThanOrEqualTo: scrollableStackView.trailingAnchor) } ///Trailing item @@ -726,6 +728,8 @@ private extension FormatBar { trailingItemLeadingConstraint = trailingItemContainer.leadingAnchor.constraint(greaterThanOrEqualTo: scrollableStackView.trailingAnchor) case .rightToLeft: trailingItemLeadingConstraint = trailingItemContainer.leadingAnchor.constraint(greaterThanOrEqualTo: scrollableStackView.leadingAnchor) + @unknown default: + trailingItemLeadingConstraint = trailingItemContainer.leadingAnchor.constraint(greaterThanOrEqualTo: scrollableStackView.trailingAnchor) } NSLayoutConstraint.activate([ diff --git a/Aztec/Classes/Libxml2/DOM/Data/ElementNode.swift b/Aztec/Classes/Libxml2/DOM/Data/ElementNode.swift index 782bd2778..4aa2ec720 100644 --- a/Aztec/Classes/Libxml2/DOM/Data/ElementNode.swift +++ b/Aztec/Classes/Libxml2/DOM/Data/ElementNode.swift @@ -115,7 +115,7 @@ public class ElementNode: Node { private func updateParentForChildren() { for child in children where child.parent !== self { if let oldParent = child.parent, - let childIndex = oldParent.children.index(where: { child === $0 }) { + let childIndex = oldParent.children.firstIndex(where: { child === $0 }) { oldParent.children.remove(at: childIndex) } @@ -349,7 +349,7 @@ public class ElementNode: Node { /// - Returns: the index of the specified child node. /// func indexOf(childNode: Node) -> Int { - guard let index = children.index(where: { childNode === $0 } ) else { + guard let index = children.firstIndex(where: { childNode === $0 } ) else { fatalError("Broken parent-child relationship found.") } diff --git a/Aztec/Classes/Libxml2/DOM/Data/Node.swift b/Aztec/Classes/Libxml2/DOM/Data/Node.swift index 93dd6b196..1bef92668 100644 --- a/Aztec/Classes/Libxml2/DOM/Data/Node.swift +++ b/Aztec/Classes/Libxml2/DOM/Data/Node.swift @@ -167,7 +167,7 @@ public class Node: Equatable, CustomReflectable, Hashable { return nil } - let index = parent.children.index { node -> Bool in + let index = parent.children.firstIndex { node -> Bool in return node === self }! diff --git a/Aztec/Classes/NSAttributedString/Conversions/AttributedStringParser.swift b/Aztec/Classes/NSAttributedString/Conversions/AttributedStringParser.swift index 5c5317e24..94d4fcd3d 100644 --- a/Aztec/Classes/NSAttributedString/Conversions/AttributedStringParser.swift +++ b/Aztec/Classes/NSAttributedString/Conversions/AttributedStringParser.swift @@ -333,7 +333,7 @@ private extension AttributedStringParser { var nonDuplicates = [ElementNode]() for node in previous where current.contains(node) { - guard let index = current.index(of: node) else { + guard let index = current.firstIndex(of: node) else { continue } diff --git a/Aztec/Classes/TextKit/ParagraphStyle.swift b/Aztec/Classes/TextKit/ParagraphStyle.swift index 1b2f04a1e..201dddee0 100644 --- a/Aztec/Classes/TextKit/ParagraphStyle.swift +++ b/Aztec/Classes/TextKit/ParagraphStyle.swift @@ -181,7 +181,7 @@ open class ParagraphStyle: NSMutableParagraphStyle, CustomReflectable { public var blockquoteIndent: CGFloat { let blockquoteIndex = properties.filter({ property in return property is Blockquote || property is TextList - }).index(where: { property in + }).firstIndex(where: { property in return property is Blockquote }) diff --git a/Aztec/Classes/TextKit/TextView.swift b/Aztec/Classes/TextKit/TextView.swift index 71295404d..1b956173c 100644 --- a/Aztec/Classes/TextKit/TextView.swift +++ b/Aztec/Classes/TextKit/TextView.swift @@ -418,7 +418,7 @@ open class TextView: UITextView { } storage.attachmentsDelegate = self font = defaultFont - linkTextAttributes = [.underlineStyle: NSNumber(value: NSUnderlineStyle.single.rawValue), .foregroundColor: self.tintColor] + linkTextAttributes = [.underlineStyle: NSNumber(value: NSUnderlineStyle.single.rawValue), .foregroundColor: tintColor as Any] typingAttributes = defaultAttributes setupMenuController() setupAttachmentTouchDetection() @@ -1342,8 +1342,7 @@ open class TextView: UITextView { open func replaceWithImage(at range: NSRange, sourceURL url: URL, placeHolderImage: UIImage?, identifier: String = UUID().uuidString) -> ImageAttachment { let attachment = ImageAttachment(identifier: identifier, url: url) attachment.delegate = storage - attachment.image = placeHolderImage - attachment.alignment = .none + attachment.image = placeHolderImage replace(at: range, with: attachment) return attachment } diff --git a/AztecTests/Resources/UIImageResizeImage1_2x.png.dat b/AztecTests/Resources/UIImageResizeImage1_2x.png.dat index 9279c1249..c195fc1a2 100644 Binary files a/AztecTests/Resources/UIImageResizeImage1_2x.png.dat and b/AztecTests/Resources/UIImageResizeImage1_2x.png.dat differ diff --git a/AztecTests/Resources/UIImageResizeImage2_2x.png.dat b/AztecTests/Resources/UIImageResizeImage2_2x.png.dat index 9279c1249..c195fc1a2 100644 Binary files a/AztecTests/Resources/UIImageResizeImage2_2x.png.dat and b/AztecTests/Resources/UIImageResizeImage2_2x.png.dat differ diff --git a/Example/AztecExample.xcodeproj/project.pbxproj b/Example/AztecExample.xcodeproj/project.pbxproj index dc334e39d..88248f3c4 100644 --- a/Example/AztecExample.xcodeproj/project.pbxproj +++ b/Example/AztecExample.xcodeproj/project.pbxproj @@ -362,12 +362,12 @@ 607FACCF1AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; DevelopmentTeam = PZYM8XX95Q; - LastSwiftMigration = 1010; + LastSwiftMigration = 1100; ProvisioningStyle = Manual; }; CC400F161E9EC04200859AB4 = { CreatedOnToolsVersion = 8.3.1; - LastSwiftMigration = 1010; + LastSwiftMigration = 1100; ProvisioningStyle = Automatic; TestTargetID = 607FACCF1AFB9204008FA782; }; @@ -664,7 +664,7 @@ PROVISIONING_PROFILE = ""; PROVISIONING_PROFILE_SPECIFIER = "Aztec Example Development"; STRIP_INSTALLED_PRODUCT = NO; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -687,7 +687,7 @@ PROVISIONING_PROFILE = ""; PROVISIONING_PROFILE_SPECIFIER = "Aztec Example Ad Hoc"; STRIP_INSTALLED_PRODUCT = NO; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; @@ -704,7 +704,7 @@ PRODUCT_BUNDLE_IDENTIFIER = WP.AztecUITests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TEST_TARGET_NAME = AztecExample; }; name = Debug; @@ -719,7 +719,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = WP.AztecUITests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TEST_TARGET_NAME = AztecExample; }; name = "Release-Alpha"; @@ -734,7 +734,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = WP.AztecUITests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TEST_TARGET_NAME = AztecExample; }; name = Release; @@ -749,7 +749,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = WP.AztecUITests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TEST_TARGET_NAME = AztecExample; }; name = Profiling; @@ -826,7 +826,7 @@ PROVISIONING_PROFILE = ""; PROVISIONING_PROFILE_SPECIFIER = "Aztec Example Development"; STRIP_INSTALLED_PRODUCT = NO; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Profiling; @@ -909,7 +909,7 @@ PROVISIONING_PROFILE = ""; PROVISIONING_PROFILE_SPECIFIER = "Aztec Example Alpha Distribution"; STRIP_INSTALLED_PRODUCT = NO; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = "Release-Alpha"; diff --git a/Example/Example/EditorDemoController.swift b/Example/Example/EditorDemoController.swift index 78ab2df54..5cd6472e0 100644 --- a/Example/Example/EditorDemoController.swift +++ b/Example/Example/EditorDemoController.swift @@ -635,7 +635,7 @@ extension EditorDemoController { return OptionsTableViewOption(image: headerType.iconImage, title: title) } - let selectedIndex = Constants.headers.index(of: headerLevelForSelectedText()) + let selectedIndex = Constants.headers.firstIndex(of: headerLevelForSelectedText()) let optionsTableViewController = OptionsTableViewController(options: options) optionsTableViewController.cellDeselectedTintColor = .gray @@ -665,7 +665,7 @@ extension EditorDemoController { var index: Int? = nil if let listType = listTypeForSelectedText() { - index = Constants.lists.index(of: listType) + index = Constants.lists.firstIndex(of: listType) } let optionsTableViewController = OptionsTableViewController(options: options) @@ -1294,7 +1294,7 @@ private extension EditorDemoController let attachment = richTextView.replaceWithImage(at: richTextView.selectedRange, sourceURL: fileURL, placeHolderImage: image) attachment.size = .full - attachment.alignment = .none + attachment.alignment = ImageAttachment.Alignment.none if let attachmentRange = richTextView.textStorage.ranges(forAttachment: attachment).first { richTextView.setLink(fileURL, inRange: attachmentRange) } diff --git a/Gemfile b/Gemfile index fd43c049c..652ca282c 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,3 @@ source 'https://rubygems.org' do - gem 'cocoapods', '1.6.1' + gem 'cocoapods', '1.7.5' end diff --git a/Gemfile.lock b/Gemfile.lock index 8dd63d70e..376b79767 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,19 +1,19 @@ GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.0) + CFPropertyList (3.0.1) activesupport (4.2.11.1) i18n (~> 0.7) minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) atomos (0.1.3) - claide (1.0.2) - cocoapods (1.6.1) + claide (1.0.3) + cocoapods (1.7.5) activesupport (>= 4.0.2, < 5) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.6.1) - cocoapods-deintegrate (>= 1.0.2, < 2.0) + cocoapods-core (= 1.7.5) + cocoapods-deintegrate (>= 1.0.3, < 2.0) cocoapods-downloader (>= 1.2.2, < 2.0) cocoapods-plugins (>= 1.0.0, < 2.0) cocoapods-search (>= 1.0.0, < 2.0) @@ -22,13 +22,13 @@ GEM cocoapods-try (>= 1.1.0, < 2.0) colored2 (~> 3.1) escape (~> 0.0.4) - fourflusher (>= 2.2.0, < 3.0) + fourflusher (>= 2.3.0, < 3.0) gh_inspector (~> 1.0) molinillo (~> 0.6.6) nap (~> 1.0) ruby-macho (~> 1.4) - xcodeproj (>= 1.8.1, < 2.0) - cocoapods-core (1.6.1) + xcodeproj (>= 1.10.0, < 2.0) + cocoapods-core (1.7.5) activesupport (>= 4.0.2, < 6) fuzzy_match (~> 2.0.4) nap (~> 1.0) @@ -38,19 +38,19 @@ GEM nap cocoapods-search (1.0.0) cocoapods-stats (1.1.0) - cocoapods-trunk (1.3.1) + cocoapods-trunk (1.4.0) nap (>= 0.8, < 2.0) netrc (~> 0.11) cocoapods-try (1.1.0) colored2 (3.1.2) concurrent-ruby (1.1.5) escape (0.0.4) - fourflusher (2.2.0) + fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) i18n (0.9.5) concurrent-ruby (~> 1.0) - minitest (5.11.3) + minitest (5.12.0) molinillo (0.6.6) nanaimo (0.2.6) nap (1.1.0) @@ -59,7 +59,7 @@ GEM thread_safe (0.3.6) tzinfo (1.2.5) thread_safe (~> 0.1) - xcodeproj (1.8.2) + xcodeproj (1.12.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) @@ -70,7 +70,7 @@ PLATFORMS ruby DEPENDENCIES - cocoapods (= 1.6.1)! + cocoapods (= 1.7.5)! BUNDLED WITH - 1.17.2 + 2.0.2 diff --git a/WordPress-Aztec-iOS.podspec b/WordPress-Aztec-iOS.podspec index 54e1be3b1..0cab08f87 100644 --- a/WordPress-Aztec-iOS.podspec +++ b/WordPress-Aztec-iOS.podspec @@ -28,7 +28,7 @@ Pod::Spec.new do |s| s.social_media_url = "http://twitter.com/WordPressiOS" s.source = { :git => 'https://github.com/wordpress-mobile/WordPress-Aztec-iOS.git', :tag => s.version.to_s } s.ios.deployment_target = '10.0' - s.swift_version = '4.2' + s.swift_version = '5.0' s.module_name = "Aztec" s.source_files = 'Aztec/Classes/**/*' diff --git a/WordPress-Editor-iOS.podspec b/WordPress-Editor-iOS.podspec index c1631ac64..0282af172 100644 --- a/WordPress-Editor-iOS.podspec +++ b/WordPress-Editor-iOS.podspec @@ -28,7 +28,7 @@ Pod::Spec.new do |s| s.social_media_url = "http://twitter.com/WordPressiOS" s.source = { :git => 'https://github.com/wordpress-mobile/WordPress-Aztec-iOS.git', :tag => s.version.to_s } s.ios.deployment_target = '10.0' - s.swift_version = '4.2' + s.swift_version = '5.0' s.module_name = "WordPressEditor" s.source_files = 'WordPressEditor/WordPressEditor/Classes/**/*' diff --git a/WordPressEditor/WordPressEditor.xcodeproj/project.pbxproj b/WordPressEditor/WordPressEditor.xcodeproj/project.pbxproj index 24dcb3c53..9dae87d91 100644 --- a/WordPressEditor/WordPressEditor.xcodeproj/project.pbxproj +++ b/WordPressEditor/WordPressEditor.xcodeproj/project.pbxproj @@ -560,11 +560,11 @@ TargetAttributes = { F1D360AC2092947500B4E7A5 = { CreatedOnToolsVersion = 9.3; - LastSwiftMigration = 1010; + LastSwiftMigration = 1100; }; F1D360B52092947500B4E7A5 = { CreatedOnToolsVersion = 9.3; - LastSwiftMigration = 1010; + LastSwiftMigration = 1100; }; }; }; @@ -795,7 +795,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPress; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Profiling; @@ -814,7 +814,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Profiling; @@ -963,7 +963,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPress; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -988,7 +988,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPress; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; @@ -1007,7 +1007,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -1026,7 +1026,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; diff --git a/WordPressEditor/WordPressEditor/Classes/ViewControllers/OptionsTableViewController/OptionsTablePresenter.swift b/WordPressEditor/WordPressEditor/Classes/ViewControllers/OptionsTableViewController/OptionsTablePresenter.swift index f2ffb19da..5ba9c9a7e 100644 --- a/WordPressEditor/WordPressEditor/Classes/ViewControllers/OptionsTableViewController/OptionsTablePresenter.swift +++ b/WordPressEditor/WordPressEditor/Classes/ViewControllers/OptionsTableViewController/OptionsTablePresenter.swift @@ -122,11 +122,11 @@ public class OptionsTablePresenter: NSObject { // extension OptionsTablePresenter: UIPopoverPresentationControllerDelegate { - private func adaptivePresentationStyle(for controller: UIPresentationController, traitCollection: UITraitCollection) -> UIModalPresentationStyle { + public func adaptivePresentationStyle(for controller: UIPresentationController, traitCollection: UITraitCollection) -> UIModalPresentationStyle { return .none } - private func popoverPresentationControllerDidDismissPopover(_ popoverPresentationController: UIPopoverPresentationController) { + public func popoverPresentationControllerDidDismissPopover(_ popoverPresentationController: UIPopoverPresentationController) { if optionsTableViewController != nil { optionsTableViewController = nil } diff --git a/WordPressEditor/WordPressEditorTests/Resources/GutenpackAttachmentRender_2x.png.dat b/WordPressEditor/WordPressEditorTests/Resources/GutenpackAttachmentRender_2x.png.dat index 0ea89492d..057ef62e5 100644 Binary files a/WordPressEditor/WordPressEditorTests/Resources/GutenpackAttachmentRender_2x.png.dat and b/WordPressEditor/WordPressEditorTests/Resources/GutenpackAttachmentRender_2x.png.dat differ