Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
version: 2.1

orbs:
ios: wordpress-mobile/ios@0.0.20
ios: wordpress-mobile/ios@0.0.25

workflows:
wordpress_ios:
jobs:
- ios/test:
name: build_and_test
xcode-version: "10.2.0"
workspace: WordPress.xcworkspace
scheme: WordPress
device: iPhone XS
ios-version: "12.1"
ios-version: "12.2"
# If you want to reset the CircleCI cache, increment the number in the cache prefix below
cache-prefix: dependency-cache-v1
6 changes: 3 additions & 3 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def aztec
#pod 'WordPress-Aztec-iOS', :git => 'https://github.com/wordpress-mobile/AztecEditor-iOS.git', :commit => 'a916afc713e5d650f47fd03772022c01ca0ac8a8'
#pod 'WordPress-Editor-iOS', :git => 'https://github.com/wordpress-mobile/AztecEditor-iOS.git', :commit => 'a916afc713e5d650f47fd03772022c01ca0ac8a8'
##pod 'WordPress-Editor-iOS', :git => 'https://github.com/wordpress-mobile/AztecEditor-iOS.git', :tag => '1.5.0.beta.1'
pod 'WordPress-Editor-iOS', '1.5.2'
pod 'WordPress-Editor-iOS', '~> 1.6.0-beta'
end

def wordpress_ui
Expand Down Expand Up @@ -120,7 +120,7 @@ target 'WordPress' do
pod 'MRProgress', '0.8.3'
pod 'Starscream', '3.0.6'
pod 'SVProgressHUD', '2.2.5'
pod 'ZendeskSDK', '2.2.0'
pod 'ZendeskSDK', '2.3.1'
pod 'ZIPFoundation', '~> 0.9.8'

## Automattic libraries
Expand All @@ -133,7 +133,7 @@ target 'WordPress' do
#pod 'Automattic-Tracks-iOS', :git => 'https://github.com/Automattic/Automattic-Tracks-iOS.git', :commit => 'f6332b67448a4e9c2661513cbb98fa5bb12b7c8f'

pod 'NSURL+IDN', '0.3'
pod 'WPMediaPicker', '1.3.2'
pod 'WPMediaPicker', '1.3.3'
pod 'Gridicons', '~> 0.16'
## while PR is in review:
## pod 'WPMediaPicker', :git => 'https://github.com/wordpress-mobile/MediaPicker-iOS.git', :commit => 'e546205cd2a992838837b0a4de502507b89b6e63'
Expand Down
36 changes: 18 additions & 18 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ PODS:
- Starscream (3.0.6)
- SVProgressHUD (2.2.5)
- UIDeviceIdentifier (1.1.4)
- WordPress-Aztec-iOS (1.5.2)
- WordPress-Editor-iOS (1.5.2):
- WordPress-Aztec-iOS (= 1.5.2)
- WordPress-Aztec-iOS (1.6.0-beta.1)
- WordPress-Editor-iOS (1.6.0-beta.1):
- WordPress-Aztec-iOS (= 1.6.0-beta.1)
- WordPressAuthenticator (1.4.0-beta.1):
- 1PasswordExtension (= 1.8.5)
- Alamofire (= 4.7.3)
Expand All @@ -219,16 +219,16 @@ PODS:
- CocoaLumberjack (~> 3.4)
- FormatterKit/TimeIntervalFormatter (= 1.8.2)
- WordPressUI (1.2.0)
- WPMediaPicker (1.3.2)
- WPMediaPicker (1.3.3)
- wpxmlrpc (0.8.4)
- yoga (0.59.3.React)
- ZendeskSDK (2.2.0):
- ZendeskSDK/Providers (= 2.2.0)
- ZendeskSDK/UI (= 2.2.0)
- ZendeskSDK/Core (2.2.0)
- ZendeskSDK/Providers (2.2.0):
- ZendeskSDK (2.3.1):
- ZendeskSDK/Providers (= 2.3.1)
- ZendeskSDK/UI (= 2.3.1)
- ZendeskSDK/Core (2.3.1)
- ZendeskSDK/Providers (2.3.1):
- ZendeskSDK/Core
- ZendeskSDK/UI (2.2.0):
- ZendeskSDK/UI (2.3.1):
- ZendeskSDK/Core
- ZendeskSDK/Providers
- ZIPFoundation (0.9.9)
Expand Down Expand Up @@ -265,14 +265,14 @@ DEPENDENCIES:
- SimulatorStatusMagic
- Starscream (= 3.0.6)
- SVProgressHUD (= 2.2.5)
- WordPress-Editor-iOS (= 1.5.2)
- WordPress-Editor-iOS (~> 1.6.0-beta)
- WordPressAuthenticator (~> 1.4.0-beta)
- WordPressKit (~> 4.0.0-beta)
- WordPressShared (~> 1.7.3)
- WordPressUI (from `https://github.com/wordpress-mobile/WordPressUI-iOS.git`, tag `1.2.0`)
- WPMediaPicker (= 1.3.2)
- WPMediaPicker (= 1.3.3)
- yoga (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.2.0/react-native-gutenberg-bridge/third-party-podspecs/yoga.podspec.json`)
- ZendeskSDK (= 2.2.0)
- ZendeskSDK (= 2.3.1)
- ZIPFoundation (~> 0.9.8)

SPEC REPOS:
Expand Down Expand Up @@ -403,18 +403,18 @@ SPEC CHECKSUMS:
Starscream: ef3ece99d765eeccb67de105bfa143f929026cf5
SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6
UIDeviceIdentifier: 8f8a24b257a4d978c8d40ad1e7355b944ffbfa8c
WordPress-Aztec-iOS: 16339a831d5d605ba9300b3722b75ba78e53cf09
WordPress-Editor-iOS: b90649909f99c1d02cef2bb79c0641322b31fa52
WordPress-Aztec-iOS: 3b12eea844ff38b3b82c66f3ed5b01b0fc2f6327
WordPress-Editor-iOS: d3352429009ba5a75f6ae81deded7156b7a6ffb8
WordPressAuthenticator: f0e30e8e555e33bea8e13e6f1245172d557a8ee4
WordPressKit: 1ddb164dcca4a03ed8e9bd7c6050a8deea1264e0
WordPressShared: 0853172642668b0fbf5c8d56e743896ebf9aae01
WordPressUI: 44fe43a9c5c504dfd534286e39e1ce6ebcd69ff5
WPMediaPicker: e50edd8f30f5d87288840941ef3ff9cd11860937
WPMediaPicker: 6d23120b16c0f66987fd98ec2b294864e1df03bf
wpxmlrpc: 6ba55c773cfa27083ae4a2173e69b19f46da98e2
yoga: 0cb6e1c4f763ba12d1c825f2d6f863da6614a2a4
ZendeskSDK: 44ee00338dd718495f0364369420ae11b389c878
ZendeskSDK: cbd49d65efb2f2cdbdcaac84e618896ae87b861e
ZIPFoundation: 89df685c971926b0323087952320bdfee9f0b6ef

PODFILE CHECKSUM: 7466f8cf3ef2c83e65afe23ae3659aa3f78b7ed0
PODFILE CHECKSUM: 36cf7950699299ed7f9a616e828f39058dd614d9

COCOAPODS: 1.6.1
4 changes: 2 additions & 2 deletions WordPress/Classes/Models/JetpackSiteRef.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ struct JetpackSiteRef: Hashable, Codable {
self.username = username
}

var hashValue: Int {
return "\(username)-\(siteID)".hashValue
public func hash(into hasher: inout Hasher) {
hasher.combine("\(username)-\(siteID)")
}

static func ==(lhs: JetpackSiteRef, rhs: JetpackSiteRef) -> Bool {
Expand Down
8 changes: 4 additions & 4 deletions WordPress/Classes/Stores/StatsInsightsStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ enum InsightAction: Action {
case receivedTodaysStats(_ todaysStats: StatsTodayInsight?)
case receivedPostingActivity(_ postingActivity: StatsPostingStreakInsight?)
case receivedTagsAndCategories(_ tagsAndCategories: StatsTagsAndCategoriesInsight?)
case refreshInsights()
case refreshInsights

// Insights details
case receivedAllDotComFollowers(_ allDotComFollowers: StatsDotComFollowersInsight?)
case receivedAllEmailFollowers(_ allDotComFollowers: StatsEmailFollowersInsight?)
case refreshFollowers()
case refreshFollowers

case receivedAllCommentsInsight(_ commentsInsight: StatsCommentsInsight?)
case refreshComments()
case refreshComments

case receivedAllTagsAndCategories(_ allTagsAndCategories: StatsTagsAndCategoriesInsight?)
case refreshTagsAndCategories()
case refreshTagsAndCategories
}

enum InsightQuery {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public extension WPAppAnalytics {
/// - selectionMethod: The Media's method of selection.
/// - Returns: Dictionary
///
public class func properties(for media: Media, selectionMethod: MediaSelectionMethod) -> [String: Any] {
class func properties(for media: Media, selectionMethod: MediaSelectionMethod) -> [String: Any] {
var properties = WPAppAnalytics.properties(for: media)
properties[MediaOriginKey] = String(describing: selectionMethod)
return properties
Expand All @@ -19,7 +19,7 @@ public extension WPAppAnalytics {
- parameter media: the Media object
- returns: Dictionary
*/
@objc public class func properties(for media: Media) -> Dictionary<String, Any> {
@objc class func properties(for media: Media) -> Dictionary<String, Any> {
var properties = [String: Any]()
properties[MediaProperties.mime] = media.mimeType()
if let fileExtension = media.fileExtension(), !fileExtension.isEmpty {
Expand Down
6 changes: 3 additions & 3 deletions WordPress/Classes/Utility/CoreDataHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ extension NSManagedObjectContext {
do {
result = try count(for: request)
} catch {
DDLogError("Error counting objects [\(T.entityName)]: \(error)")
DDLogError("Error counting objects [\(String(describing: T.entityName))]: \(error)")
assertionFailure()
}

Expand Down Expand Up @@ -113,7 +113,7 @@ extension NSManagedObjectContext {
do {
result = try existingObject(with: objectID) as? T
} catch {
DDLogError("Error loading Object [\(T.entityName)]")
DDLogError("Error loading Object [\(String(describing: T.entityName))]")
}

return result
Expand All @@ -140,7 +140,7 @@ extension NSManagedObjectContext {
do {
objects = try fetch(request) as? [T]
} catch {
DDLogError("Error loading Objects [\(T.entityName)")
DDLogError("Error loading Objects [\(String(describing: T.entityName))")
assertionFailure()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ extension FormattableContentRange {
}

public extension FormattableContentRange where Self: LinkContentRange {
public func apply(_ styles: FormattableContentStyles, to string: NSMutableAttributedString, withShift shift: Int) -> Shift {
func apply(_ styles: FormattableContentStyles, to string: NSMutableAttributedString, withShift shift: Int) -> Shift {
let shiftedRange = rangeShifted(by: shift)

apply(styles, to: string, at: shiftedRange)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ extension FormattableMediaItem {
public extension FormattableMediaItem {
/// Known kinds of Media Entities
///
public enum Kind: String {
enum Kind: String {
case image = "image"
case badge = "badge"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public extension SiteSettingsViewController {

/// Presents confirmation alert for Export Content
///
@objc public func confirmExportContent() {
@objc func confirmExportContent() {
tableView.deselectSelectedRowWithAnimation(true)

WPAppAnalytics.track(.siteSettingsExportSiteAccessed, with: self.blog)
Expand Down Expand Up @@ -72,7 +72,7 @@ public extension SiteSettingsViewController {

/// Requests site purchases to determine whether site is deletable
///
@objc public func checkSiteDeletable() {
@objc func checkSiteDeletable() {
tableView.deselectSelectedRowWithAnimation(true)

let status = NSLocalizedString("Checking purchases…", comment: "Overlay message displayed while checking if site has premium purchases")
Expand Down
6 changes: 3 additions & 3 deletions WordPress/Classes/ViewRelated/Cells/PostFeaturedImageCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
@class PostFeaturedImageCell;

@protocol PostFeaturedImageCellDelegate <NSObject>
- (void)postFeatureImageCellDidFinishLoadingImage:(PostFeaturedImageCell *)cell;
- (void)postFeatureImageCell:(PostFeaturedImageCell *)cell didFinishLoadingAnimatedImageWithData:(NSData *)animationData;
- (void)postFeatureImageCell:(PostFeaturedImageCell *)cell didFinishLoadingImageWithError:(NSError *)error;
- (void)postFeatureImageCellDidFinishLoadingImage:(nonnull PostFeaturedImageCell *)cell;
- (void)postFeatureImageCell:(nonnull PostFeaturedImageCell *)cell didFinishLoadingAnimatedImageWithData:(nullable NSData *)animationData;
- (void)postFeatureImageCell:(nonnull PostFeaturedImageCell *)cell didFinishLoadingImageWithError:(nullable NSError *)error;
@end

@interface PostFeaturedImageCell : WPTableViewCell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,9 @@ public class CachedAnimatedImageView: UIImageView, GIFAnimatable {
}

public func addLoadingIndicator(_ loadingIndicator: ActivityIndicatorType, style: LoadingIndicatorStyle) {
guard let loadingView = loadingIndicator as? UIView else {
assertionFailure("Loading indicator must be a UIView subclass")
return
}

removeCustomLoadingIndicator()
customLoadingIndicator = loadingIndicator
addCustomLoadingIndicator(loadingView, style: style)
addCustomLoadingIndicator(loadingIndicator, style: style)
}

// MARK: - Private methods
Expand Down Expand Up @@ -228,7 +223,7 @@ public class CachedAnimatedImageView: UIImageView, GIFAnimatable {
// MARK: Loading indicator

private func removeCustomLoadingIndicator() {
if let oldLoadingIndicator = customLoadingIndicator as? UIView {
if let oldLoadingIndicator = customLoadingIndicator {
oldLoadingIndicator.removeFromSuperview()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ extension DomainSuggestionsTableViewController {
}
styledDomain.addAttribute(.foregroundColor,
value: WPStyleGuide.darkGrey(),
range: NSMakeRange(0, dotPosition.encodedOffset))
range: NSMakeRange(0, dotPosition.utf16Offset(in: domain)))
return styledDomain
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,7 @@ private extension SignupEpilogueViewController {
}
} else {
if !changesMade {
defer {
WordPressAuthenticator.track(.signupEpilogueUnchanged, properties: tracksProperties())
}
WordPressAuthenticator.track(.signupEpilogueUnchanged, properties: tracksProperties())
}
self.refreshAccountDetails() {
SVProgressHUD.dismiss()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ class SignupUsernameTableViewController: NUXTableViewController {
let service = AccountSettingsService(userID: account.userID.intValue, api: api)
service.suggestUsernames(base: searchTerm) { [weak self] (newSuggestions) in
if newSuggestions.count == 0 {
defer {
WordPressAuthenticator.track(.signupEpilogueUsernameSuggestionsFailed)
}
WordPressAuthenticator.track(.signupEpilogueUsernameSuggestionsFailed)
}
self?.isSearching = false
SVProgressHUD.dismiss()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,15 +264,15 @@ final class ErrorStateView: UIView {

@objc
private extension ErrorStateView {
func contactSupportTapped() {
@objc func contactSupportTapped() {
configuration.contactSupportActionHandler?()
}

func dismissTapped() {
@objc func dismissTapped() {
configuration.dismissalActionHandler?()
}

func retryTapped() {
@objc func retryTapped() {
configuration.retryActionHandler?()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class SiteStatsInsightsViewModel: Observable {
self.store = store

insightsReceipt = store.query(.insights)
store.actionDispatcher.dispatch(InsightAction.refreshInsights())
store.actionDispatcher.dispatch(InsightAction.refreshInsights)

changeReceipt = store.onChange { [weak self] in
self?.emitChange()
Expand Down Expand Up @@ -95,7 +95,7 @@ class SiteStatsInsightsViewModel: Observable {
// MARK: - Refresh Data

func refreshInsights() {
ActionDispatcher.dispatch(InsightAction.refreshInsights())
ActionDispatcher.dispatch(InsightAction.refreshInsights)
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,15 @@ class SiteStatsDetailsViewModel: Observable {
// MARK: - Refresh Data

func refreshFollowers() {
ActionDispatcher.dispatch(InsightAction.refreshFollowers())
ActionDispatcher.dispatch(InsightAction.refreshFollowers)
}

func refreshComments() {
ActionDispatcher.dispatch(InsightAction.refreshComments())
ActionDispatcher.dispatch(InsightAction.refreshComments)
}

func refreshTagsAndCategories() {
ActionDispatcher.dispatch(InsightAction.refreshTagsAndCategories())
ActionDispatcher.dispatch(InsightAction.refreshTagsAndCategories)
}

func refreshPostsAndPages() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public extension NSAttributedString {
///
/// - Returns: NSAttributedString Optional
///
public class func attributedStringFromHTMLString(
class func attributedStringFromHTMLString(
_ string: String,
defaultAttributes: [NSAttributedString.Key: Any]?) throws -> NSAttributedString? {

Expand Down
Loading