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
Original file line number Diff line number Diff line change
Expand Up @@ -5,122 +5,122 @@ import WordPressUI
@objc extension UIColor {

@available(swift, obsoleted: 1.0)
static func murielPrimary() -> UIColor {
public static func murielPrimary() -> UIColor {
return UIAppColor.primary
}

@available(swift, obsoleted: 1.0)
static func murielPrimary40() -> UIColor {
public static func murielPrimary40() -> UIColor {
return UIAppColor.primary(.shade40)
}

@available(swift, obsoleted: 1.0)
static func murielPrimaryDark() -> UIColor {
public static func murielPrimaryDark() -> UIColor {
return UIAppColor.primaryDark
}

@available(swift, obsoleted: 1.0)
static func murielNeutral() -> UIColor {
public static func murielNeutral() -> UIColor {
return UIAppColor.neutral
}

@available(swift, obsoleted: 1.0)
static func murielNeutral0() -> UIColor {
public static func murielNeutral0() -> UIColor {
return UIAppColor.neutral(.shade0)
}

@available(swift, obsoleted: 1.0)
static func murielNeutral5() -> UIColor {
public static func murielNeutral5() -> UIColor {
return UIAppColor.neutral(.shade5)
}

@available(swift, obsoleted: 1.0)
static func murielNeutral10() -> UIColor {
public static func murielNeutral10() -> UIColor {
return UIAppColor.neutral(.shade10)
}

@available(swift, obsoleted: 1.0)
static func murielNeutral20() -> UIColor {
public static func murielNeutral20() -> UIColor {
return UIAppColor.neutral(.shade20)
}

@available(swift, obsoleted: 1.0)
static func murielNeutral30() -> UIColor {
public static func murielNeutral30() -> UIColor {
return UIAppColor.neutral(.shade30)
}

@available(swift, obsoleted: 1.0)
static func murielNeutral40() -> UIColor {
public static func murielNeutral40() -> UIColor {
return UIAppColor.neutral(.shade40)
}

@available(swift, obsoleted: 1.0)
static func murielNeutral60() -> UIColor {
public static func murielNeutral60() -> UIColor {
return UIAppColor.neutral(.shade60)
}

@available(swift, obsoleted: 1.0)
static func murielNeutral70() -> UIColor {
public static func murielNeutral70() -> UIColor {
return UIAppColor.neutral(.shade70)
}

@available(swift, obsoleted: 1.0)
static func murielSuccess() -> UIColor {
public static func murielSuccess() -> UIColor {
return UIAppColor.success
}

@available(swift, obsoleted: 1.0)
static func murielText() -> UIColor {
public static func murielText() -> UIColor {
return .label
}

@available(swift, obsoleted: 1.0)
static func murielTextSubtle() -> UIColor {
public static func murielTextSubtle() -> UIColor {
return .secondaryLabel
}

@available(swift, obsoleted: 1.0)
static func murielTextTertiary() -> UIColor {
public static func murielTextTertiary() -> UIColor {
return .tertiaryLabel
}

@available(swift, obsoleted: 1.0)
static func murielError() -> UIColor {
public static func murielError() -> UIColor {
return UIAppColor.error
}

@available(swift, obsoleted: 1.0)
static func murielBasicBackground() -> UIColor {
public static func murielBasicBackground() -> UIColor {
return .systemBackground
}

@available(swift, obsoleted: 1.0)
static func murielTextPlaceholder() -> UIColor {
public static func murielTextPlaceholder() -> UIColor {
return .tertiaryLabel
}

@available(swift, obsoleted: 1.0)
static func murielListForeground() -> UIColor {
public static func murielListForeground() -> UIColor {
return .secondarySystemGroupedBackground
}

@available(swift, obsoleted: 1.0)
static func murielListBackground() -> UIColor {
public static func murielListBackground() -> UIColor {
return .systemGroupedBackground
}

@available(swift, obsoleted: 1.0)
static func murielListIcon() -> UIColor {
public static func murielListIcon() -> UIColor {
return .secondaryLabel
}

@available(swift, obsoleted: 1.0)
static func murielAppBarText() -> UIColor {
public static func murielAppBarText() -> UIColor {
return UIAppColor.appBarText
}

@available(swift, obsoleted: 1.0)
static func murielAppBarBackground() -> UIColor {
public static func murielAppBarBackground() -> UIColor {
return UIAppColor.appBarTint
}
}
6 changes: 3 additions & 3 deletions WordPress/Classes/Models/Blog/Blog+Creation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@ extension Blog {

/// Creates a blank `Blog` object for this account
@objc(createBlankBlogWithAccount:)
static func createBlankBlog(with account: WPAccount) -> Blog {
public static func createBlankBlog(with account: WPAccount) -> Blog {
let blog = createBlankBlog(in: account.managedObjectContext!)
blog.account = account
return blog
}

/// Creates a blank `Blog` object with no account
@objc(createBlankBlogInContext:)
static func createBlankBlog(in context: NSManagedObjectContext) -> Blog {
public static func createBlankBlog(in context: NSManagedObjectContext) -> Blog {
let blog = Blog(context: context)
blog.addSettingsIfNecessary()
return blog
}

@objc
func addSettingsIfNecessary() {
public func addSettingsIfNecessary() {
guard settings == nil else {
return
}
Expand Down
4 changes: 2 additions & 2 deletions WordPress/Classes/Models/Blog/Blog+WordPressComRestAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ public extension Blog {
///
/// - Warning: this method doesn't know if a Jetpack blog has the JSON API disabled.
@objc
var wordPressComRestApi: WordPressComRestApi? {
public var wordPressComRestApi: WordPressComRestApi? {
account?.wordPressComRestApi
}

/// Whether the blog is hosted on WordPress.com or connected through Jetpack.
@objc
func isAccessibleThroughWPCom() -> Bool {
public func isAccessibleThroughWPCom() -> Bool {
wordPressComRestApi != nil
}
}
4 changes: 2 additions & 2 deletions WordPress/Classes/Models/ReaderPost+Swift.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ extension ReaderPost {
/// - Parameter id: The comment id
/// - Returns: The `Comment` object associated with the given id, or `nil` if none is found.
@objc
func comment(withID id: NSNumber) -> Comment? {
public func comment(withID id: NSNumber) -> Comment? {
comment(withID: id.int32Value)
}

Expand Down Expand Up @@ -57,7 +57,7 @@ extension ReaderPost {
/// - Parameter siteID: ID of the site the post belongs to.
/// - Returns: the matching `ReaderPost`, or `nil` if none is found.
@objc(lookupWithID:forSiteWithID:inContext:)
static func objc_lookup(withID postID: NSNumber, forSiteWithID siteID: NSNumber, in context: NSManagedObjectContext) -> ReaderPost? {
public static func objc_lookup(withID postID: NSNumber, forSiteWithID siteID: NSNumber, in context: NSManagedObjectContext) -> ReaderPost? {
try? lookup(withID: postID, forSiteWithID: siteID, in: context)
}

Expand Down
6 changes: 3 additions & 3 deletions WordPress/Classes/Services/MediaRepository.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ private extension MediaRepository {
}
}

@objc class MediaServiceRemoteFactory: NSObject {
@objc public class MediaServiceRemoteFactory: NSObject {

@objc(remoteForBlog:error:)
func remote(for blog: Blog) throws -> MediaServiceRemote {
public func remote(for blog: Blog) throws -> MediaServiceRemote {
if blog.supports(.wpComRESTAPI), let dotComID = blog.dotComID, let api = blog.wordPressComRestApi {
return MediaServiceRemoteREST(wordPressComRestApi: api, siteID: dotComID)
}
Expand Down Expand Up @@ -132,7 +132,7 @@ extension MediaServiceRemote {
extension RemoteMedia {

@objc(remoteMediaWithMedia:)
static func from(_ media: Media) -> RemoteMedia {
public static func from(_ media: Media) -> RemoteMedia {
let remoteMedia = RemoteMedia()
remoteMedia.mediaID = media.mediaID
remoteMedia.url = media.remoteURL.flatMap(URL.init(string:))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ open class NotificationSupportService: NSObject {
/// Attempts to delete the current WPCOM Username used by the Notification Service Extension.
///
@objc
func deleteServiceExtensionUserID() {
public func deleteServiceExtensionUserID() {
do {
try SFHFKeychainUtils.deleteItem(
forUsername: configuration.keychainUserIDKey,
Expand Down
4 changes: 2 additions & 2 deletions WordPress/Classes/Stores/StatsPeriodCache.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ final class StatsPediodCache {
}
}

final class StatsCache: NSObject {
@objc class func clearCaches() {
public final class StatsCache: NSObject {
@objc public class func clearCaches() {
StatsPediodCache.shared.removeAll()
StatsInsightsCache.shared.removeAll()
StatsSubscribersCache.shared.removeAll()
Expand Down
4 changes: 2 additions & 2 deletions WordPress/Classes/System/WordPressAppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -630,13 +630,13 @@ extension WordPressAppDelegate {
}
}

@objc class func setLogLevel(_ level: DDLogLevel) {
@objc public class func setLogLevel(_ level: DDLogLevel) {
SetCocoaLumberjackObjCLogLevel(level.rawValue)
CocoaLumberjackSwift.dynamicLogLevel = level
}

/// Logs the error in Sentry.
@objc class func logError(_ error: Error) {
@objc public class func logError(_ error: Error) {
crashLogging?.logError(error)
}
}
Expand Down
4 changes: 2 additions & 2 deletions WordPress/Classes/Utility/Analytics/WPAnalytics+Domains.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import BuildSettingsKit
import WordPressShared

extension WPAnalytics {
@objc class var eventNamePrefix: String {
@objc public class var eventNamePrefix: String {
WPAnalyticsTesting.eventNamePrefix ?? BuildSettings.current.eventNamePrefix
}

@objc class var explatPlatform: String {
@objc public class var explatPlatform: String {
WPAnalyticsTesting.explatPlatform ?? BuildSettings.current.explatPlatform
}

Expand Down
18 changes: 9 additions & 9 deletions WordPress/Classes/Utility/Analytics/WPAnalyticsEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Foundation
import WordPressShared

// WPiOS-only events
@objc enum WPAnalyticsEvent: Int {
@objc public enum WPAnalyticsEvent: Int {

case createSheetShown
case createSheetActionTapped
Expand Down Expand Up @@ -1721,7 +1721,7 @@ import WordPressShared

extension WPAnalytics {

@objc static var subscriptionCount: Int = 0
@objc public static var subscriptionCount: Int = 0

private static let WPAppAnalyticsKeySubscriptionCount: String = "subscription_count"

Expand Down Expand Up @@ -1788,7 +1788,7 @@ extension WPAnalytics {
/// This will call each registered tracker and fire the given event
/// - Parameter event: a `String` that represents the event name
///
@objc static func trackEvent(_ event: WPAnalyticsEvent) {
@objc public static func trackEvent(_ event: WPAnalyticsEvent) {
WPAnalytics.trackString(event.value)
}

Expand All @@ -1798,7 +1798,7 @@ extension WPAnalytics {
/// - Parameter event: a `WPAnalyticsEvent` that represents the event name
/// - Parameter properties: a `Hash` that represents the properties
///
@objc static func trackEvent(_ event: WPAnalyticsEvent, properties: [AnyHashable: Any]) {
@objc public static func trackEvent(_ event: WPAnalyticsEvent, properties: [AnyHashable: Any]) {
track(event, properties: properties)
}

Expand All @@ -1809,7 +1809,7 @@ extension WPAnalytics {
/// - event: a `WPAnalyticsEvent` that represents the event name
/// - properties: a `Hash` that represents the properties
/// - blog: a `Blog` asssociated with the event
@objc static func trackEvent(_ event: WPAnalyticsEvent, properties: [AnyHashable: Any], blog: Blog) {
@objc public static func trackEvent(_ event: WPAnalyticsEvent, properties: [AnyHashable: Any], blog: Blog) {
track(event, properties: properties, blog: blog)
}

Expand All @@ -1819,7 +1819,7 @@ extension WPAnalytics {
/// - Parameter event: a `String` that represents the Reader event name
/// - Parameter properties: a `Hash` that represents the properties
///
@objc static func trackReaderEvent(_ event: WPAnalyticsEvent, properties: [AnyHashable: Any]) {
@objc public static func trackReaderEvent(_ event: WPAnalyticsEvent, properties: [AnyHashable: Any]) {
var props = properties
props[WPAppAnalyticsKeySubscriptionCount] = subscriptionCount
WPAnalytics.track(event, properties: props)
Expand All @@ -1831,7 +1831,7 @@ extension WPAnalytics {
/// - Parameter stat: a `String` that represents the Reader stat name
/// - Parameter properties: a `Hash` that represents the properties
///
@objc static func trackReaderStat(_ stat: WPAnalyticsStat, properties: [AnyHashable: Any]) {
@objc public static func trackReaderStat(_ stat: WPAnalyticsStat, properties: [AnyHashable: Any]) {
var props = properties
props[WPAppAnalyticsKeySubscriptionCount] = subscriptionCount
WPAnalytics.track(stat, withProperties: props)
Expand All @@ -1857,11 +1857,11 @@ extension WPAnalytics {
}
}

@objc static func trackSettingsChange(_ page: String, fieldName: String) {
@objc public static func trackSettingsChange(_ page: String, fieldName: String) {
Self.trackSettingsChange(page, fieldName: fieldName, value: nil)
}

@objc static func trackSettingsChange(_ page: String, fieldName: String, value: Any?) {
@objc public static func trackSettingsChange(_ page: String, fieldName: String, value: Any?) {
var properties: [AnyHashable: Any] = ["page": page, "field_name": fieldName]

if let value {
Expand Down
Loading