diff --git a/WordPress/Classes/Extensions/Colors and Styles/UIColor+MurielColorsObjC.swift b/WordPress/Classes/Extensions/Colors and Styles/UIColor+MurielColorsObjC.swift index 53cbe904e846..23b02d467b6b 100644 --- a/WordPress/Classes/Extensions/Colors and Styles/UIColor+MurielColorsObjC.swift +++ b/WordPress/Classes/Extensions/Colors and Styles/UIColor+MurielColorsObjC.swift @@ -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 } } diff --git a/WordPress/Classes/Models/Blog/Blog+Creation.swift b/WordPress/Classes/Models/Blog/Blog+Creation.swift index b5346d6e64e6..18c167b4e497 100644 --- a/WordPress/Classes/Models/Blog/Blog+Creation.swift +++ b/WordPress/Classes/Models/Blog/Blog+Creation.swift @@ -2,7 +2,7 @@ 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 @@ -10,14 +10,14 @@ extension 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 } diff --git a/WordPress/Classes/Models/Blog/Blog+WordPressComRestAPI.swift b/WordPress/Classes/Models/Blog/Blog+WordPressComRestAPI.swift index fb1d0b9774bf..494f41dc2c57 100644 --- a/WordPress/Classes/Models/Blog/Blog+WordPressComRestAPI.swift +++ b/WordPress/Classes/Models/Blog/Blog+WordPressComRestAPI.swift @@ -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 } } diff --git a/WordPress/Classes/Models/ReaderPost+Swift.swift b/WordPress/Classes/Models/ReaderPost+Swift.swift index ee6bb789957a..50aee9f227c3 100644 --- a/WordPress/Classes/Models/ReaderPost+Swift.swift +++ b/WordPress/Classes/Models/ReaderPost+Swift.swift @@ -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) } @@ -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) } diff --git a/WordPress/Classes/Services/MediaRepository.swift b/WordPress/Classes/Services/MediaRepository.swift index 93ddb3407a4e..3f72e8f4f144 100644 --- a/WordPress/Classes/Services/MediaRepository.swift +++ b/WordPress/Classes/Services/MediaRepository.swift @@ -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) } @@ -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:)) diff --git a/WordPress/Classes/Services/NotificationSupportService.swift b/WordPress/Classes/Services/NotificationSupportService.swift index 4e013e672eaa..d39549389f1c 100644 --- a/WordPress/Classes/Services/NotificationSupportService.swift +++ b/WordPress/Classes/Services/NotificationSupportService.swift @@ -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, diff --git a/WordPress/Classes/Stores/StatsPeriodCache.swift b/WordPress/Classes/Stores/StatsPeriodCache.swift index 988fdccbc361..997481deb9e1 100644 --- a/WordPress/Classes/Stores/StatsPeriodCache.swift +++ b/WordPress/Classes/Stores/StatsPeriodCache.swift @@ -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() diff --git a/WordPress/Classes/System/WordPressAppDelegate.swift b/WordPress/Classes/System/WordPressAppDelegate.swift index fa6cc364a00d..c8d1d78e5bbd 100644 --- a/WordPress/Classes/System/WordPressAppDelegate.swift +++ b/WordPress/Classes/System/WordPressAppDelegate.swift @@ -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) } } diff --git a/WordPress/Classes/Utility/Analytics/WPAnalytics+Domains.swift b/WordPress/Classes/Utility/Analytics/WPAnalytics+Domains.swift index c98a872dac9d..08f522c0c5f0 100644 --- a/WordPress/Classes/Utility/Analytics/WPAnalytics+Domains.swift +++ b/WordPress/Classes/Utility/Analytics/WPAnalytics+Domains.swift @@ -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 } diff --git a/WordPress/Classes/Utility/Analytics/WPAnalyticsEvent.swift b/WordPress/Classes/Utility/Analytics/WPAnalyticsEvent.swift index 2f98c38b900d..dbd280e4a3d5 100644 --- a/WordPress/Classes/Utility/Analytics/WPAnalyticsEvent.swift +++ b/WordPress/Classes/Utility/Analytics/WPAnalyticsEvent.swift @@ -2,7 +2,7 @@ import Foundation import WordPressShared // WPiOS-only events -@objc enum WPAnalyticsEvent: Int { +@objc public enum WPAnalyticsEvent: Int { case createSheetShown case createSheetActionTapped @@ -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" @@ -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) } @@ -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) } @@ -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) } @@ -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) @@ -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) @@ -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 { diff --git a/WordPress/Classes/Utility/Analytics/WPAppAnalytics+Extensions.swift b/WordPress/Classes/Utility/Analytics/WPAppAnalytics+Extensions.swift index 9397eb685f1d..7b8817a68f32 100644 --- a/WordPress/Classes/Utility/Analytics/WPAppAnalytics+Extensions.swift +++ b/WordPress/Classes/Utility/Analytics/WPAppAnalytics+Extensions.swift @@ -3,23 +3,23 @@ import WordPressShared extension WPAppAnalytics { - @objc class func track(_ stat: WPAnalyticsStat) { + @objc public class func track(_ stat: WPAnalyticsStat) { WPAnalytics.track(stat) } - @objc class func track(_ stat: WPAnalyticsStat, withProperties properties: [AnyHashable: Any]?) { + @objc public class func track(_ stat: WPAnalyticsStat, withProperties properties: [AnyHashable: Any]?) { WPAnalytics.track(stat, withProperties: properties) } // MARK: WPAppAnalytics (Blog) @objc(track:withBlog:) - class func track(_ stat: WPAnalyticsStat, blog: Blog?) { + public class func track(_ stat: WPAnalyticsStat, blog: Blog?) { track(stat, properties: nil, blog: blog) } @objc(track:withProperties:withBlog:) - class func track(_ stat: WPAnalyticsStat, properties: [String: Any]?, blog: Blog?) { + public class func track(_ stat: WPAnalyticsStat, properties: [String: Any]?, blog: Blog?) { var properties = properties ?? [:] if let blog { if let blogID = blog.dotComID { @@ -31,12 +31,12 @@ extension WPAppAnalytics { } @objc(track:withBlogID:) - class func track(_ stat: WPAnalyticsStat, blogID: NSNumber?) { + public class func track(_ stat: WPAnalyticsStat, blogID: NSNumber?) { track(stat, properties: nil, blogID: blogID) } @objc(track:withProperties:withBlogID:) - class func track(_ stat: WPAnalyticsStat, properties: [String: Any]?, blogID: NSNumber?) { + public class func track(_ stat: WPAnalyticsStat, properties: [String: Any]?, blogID: NSNumber?) { if Thread.isMainThread { _track(stat, properties: properties, blogID: blogID) } else { @@ -86,7 +86,7 @@ extension WPAppAnalytics { } @objc(track:error:withBlogID:) - class func track(_ stat: WPAnalyticsStat, error: Error, blogID: NSNumber?) { + public class func track(_ stat: WPAnalyticsStat, error: Error, blogID: NSNumber?) { let error = self.sanitizedError(fromError: error) as NSError track(stat, withProperties: [ "error_code": String(error.code), diff --git a/WordPress/Classes/Utility/Notifications/PushNotificationsManager.swift b/WordPress/Classes/Utility/Notifications/PushNotificationsManager.swift index 60b8c8ffb11a..f62c44eb4061 100644 --- a/WordPress/Classes/Utility/Notifications/PushNotificationsManager.swift +++ b/WordPress/Classes/Utility/Notifications/PushNotificationsManager.swift @@ -6,7 +6,7 @@ import UserNotifications /// The purpose of this helper is to encapsulate all the tasks related to Push Notifications Registration + Handling, /// including iOS "Actionable" Notifications. /// -final public class PushNotificationsManager: NSObject { +public final class PushNotificationsManager: NSObject { // MARK: Initializer @@ -17,11 +17,11 @@ final public class PushNotificationsManager: NSObject { /// Returns the shared PushNotificationsManager instance. /// - @objc static let shared = PushNotificationsManager() + @objc public static let shared = PushNotificationsManager() /// Stores the Apple's Push Notifications Token /// - @objc var deviceToken: String? { + @objc public var deviceToken: String? { get { return UserPersistentStoreFactory.instance().string(forKey: Device.tokenKey) ?? String() } @@ -32,7 +32,7 @@ final public class PushNotificationsManager: NSObject { /// Stores the WordPress.com Device identifier /// - @objc var deviceId: String? { + @objc public var deviceId: String? { get { return UserPersistentStoreFactory.instance().string(forKey: Device.idKey) ?? String() } @@ -43,13 +43,13 @@ final public class PushNotificationsManager: NSObject { /// Returns the SharedApplication instance. This is meant for Unit Testing purposes. /// - @objc var sharedApplication: UIApplication { + @objc public var sharedApplication: UIApplication { return UIApplication.shared } /// Returns the Application Execution State. This is meant for Unit Testing purposes. /// - @objc var applicationState: UIApplication.State { + @objc public var applicationState: UIApplication.State { return sharedApplication.applicationState } @@ -58,7 +58,7 @@ final public class PushNotificationsManager: NSObject { /// Enables or disables remote notifications based on current settings. /// Registers the device for Remote Notifications: Badge + Sounds + Alerts /// - @objc func setupRemoteNotifications() { + @objc public func setupRemoteNotifications() { guard JetpackNotificationMigrationService.shared.shouldPresentNotifications() else { disableRemoteNotifications() return @@ -80,7 +80,7 @@ final public class PushNotificationsManager: NSObject { /// Checks asynchronously if Notifications are enabled in the Device's Settings, or not. /// - @objc func loadAuthorizationStatus(completion: @escaping ((_ authorized: UNAuthorizationStatus) -> Void)) { + @objc public func loadAuthorizationStatus(completion: @escaping ((_ authorized: UNAuthorizationStatus) -> Void)) { UNUserNotificationCenter.current().getNotificationSettings { settings in DispatchQueue.main.async { completion(settings.authorizationStatus) @@ -94,7 +94,7 @@ final public class PushNotificationsManager: NSObject { /// /// - Note: Support will also be initialized. The token will be persisted across App Sessions. /// - @objc func registerDeviceToken(_ tokenData: Data) { + @objc public func registerDeviceToken(_ tokenData: Data) { // Don't bother registering for WordPress anything if the user isn't logged in guard AccountHelper.isDotcomAvailable() else { @@ -130,14 +130,14 @@ final public class PushNotificationsManager: NSObject { /// /// - Parameter error: Details the reason of failure /// - @objc func registrationDidFail(_ error: NSError) { + @objc public func registrationDidFail(_ error: NSError) { DDLogError("Failed to register for push notifications: \(error)") unregisterDeviceToken() } /// Unregister the device from WordPress.com notifications /// - @objc func unregisterDeviceToken() { + @objc public func unregisterDeviceToken() { wpAssert(Thread.isMainThread) // It's possible for the unregister server call to fail, so always unregister the device locally @@ -180,7 +180,7 @@ final public class PushNotificationsManager: NSObject { /// - userInteraction: Indicates if the user interacted with the Push Notification /// - completionHandler: A callback, to be executed on completion /// - @objc func handleNotification(_ userInfo: NSDictionary, userInteraction: Bool = false, completionHandler: ((UIBackgroundFetchResult) -> Void)?) { + @objc public func handleNotification(_ userInfo: NSDictionary, userInteraction: Bool = false, completionHandler: ((UIBackgroundFetchResult) -> Void)?) { DDLogVerbose("Received push notification:\nPayload: \(userInfo)\n") DDLogVerbose("Current Application state: \(applicationState.rawValue)") @@ -263,7 +263,7 @@ extension PushNotificationsManager { /// /// - Returns: True when handled. False otherwise /// - @objc func handleSupportNotification(_ userInfo: NSDictionary, userInteraction: Bool, completionHandler: ((UIBackgroundFetchResult) -> Void)?) -> Bool { + @objc public func handleSupportNotification(_ userInfo: NSDictionary, userInteraction: Bool, completionHandler: ((UIBackgroundFetchResult) -> Void)?) -> Bool { guard let type = userInfo.string(forKey: ZendeskUtils.PushNotificationIdentifiers.key), type == ZendeskUtils.PushNotificationIdentifiers.type else { @@ -295,7 +295,7 @@ extension PushNotificationsManager { /// /// - Returns: True when handled. False otherwise /// - @objc func handleAuthenticationNotification(_ userInfo: NSDictionary, userInteraction: Bool, completionHandler: ((UIBackgroundFetchResult) -> Void)?) -> Bool { + @objc public func handleAuthenticationNotification(_ userInfo: NSDictionary, userInteraction: Bool, completionHandler: ((UIBackgroundFetchResult) -> Void)?) -> Bool { // WordPress.com Push Authentication Notification // Due to the Background Notifications entitlement, any given Push Notification's userInfo might be received // while the app is in BG, and when it's about to become active. In order to prevent UI glitches, let's skip @@ -332,7 +332,7 @@ extension PushNotificationsManager { /// - Parameter userInfo: The Notification's Payload /// - Returns: True if successful. False otherwise. /// - @objc func handleAuthenticationApprovedAction(_ userInfo: NSDictionary) -> Bool { + @objc public func handleAuthenticationApprovedAction(_ userInfo: NSDictionary) -> Bool { let authenticationManager = PushAuthenticationManager() guard authenticationManager.isAuthenticationNotification(userInfo) else { return false @@ -352,7 +352,7 @@ extension PushNotificationsManager { /// /// - Returns: True when handled. False otherwise /// - @objc func handleInactiveNotification(_ userInfo: NSDictionary, userInteraction: Bool, completionHandler: ((UIBackgroundFetchResult) -> Void)?) -> Bool { + @objc public func handleInactiveNotification(_ userInfo: NSDictionary, userInteraction: Bool, completionHandler: ((UIBackgroundFetchResult) -> Void)?) -> Bool { guard applicationState == .inactive else { return false } @@ -378,7 +378,7 @@ extension PushNotificationsManager { /// /// - Returns: True when handled. False otherwise /// - @objc func handleBackgroundNotification(_ userInfo: NSDictionary, userInteraction: Bool, completionHandler: ((UIBackgroundFetchResult) -> Void)?) -> Bool { + @objc public func handleBackgroundNotification(_ userInfo: NSDictionary, userInteraction: Bool, completionHandler: ((UIBackgroundFetchResult) -> Void)?) -> Bool { guard userInfo.number(forKey: Notification.identifierKey)?.stringValue != nil else { return false } diff --git a/WordPress/Classes/ViewRelated/Jetpack/Branding/Coordinator/JetpackFeaturesRemovalCoordinator.swift b/WordPress/Classes/ViewRelated/Jetpack/Branding/Coordinator/JetpackFeaturesRemovalCoordinator.swift index fe28a4f8db87..78248588885b 100644 --- a/WordPress/Classes/ViewRelated/Jetpack/Branding/Coordinator/JetpackFeaturesRemovalCoordinator.swift +++ b/WordPress/Classes/ViewRelated/Jetpack/Branding/Coordinator/JetpackFeaturesRemovalCoordinator.swift @@ -2,7 +2,7 @@ import Foundation import WordPressShared /// A class containing convenience methods for the the Jetpack features removal experience -class JetpackFeaturesRemovalCoordinator: NSObject { +public class JetpackFeaturesRemovalCoordinator: NSObject { /// Enum describing the current phase of the Jetpack features removal enum GeneralPhase: String { @@ -157,7 +157,7 @@ class JetpackFeaturesRemovalCoordinator: NSObject { /// It is possible for JP features to be disabled, but still be displayed (`shouldShowJetpackFeatures`) /// This will happen in the "Static Screens" phase. @objc - static func jetpackFeaturesEnabled() -> Bool { + public static func jetpackFeaturesEnabled() -> Bool { return jetpackFeaturesEnabled(featureFlagStore: RemoteFeatureFlagStore()) } @@ -179,7 +179,7 @@ class JetpackFeaturesRemovalCoordinator: NSObject { /// But if the current app UI type is not set, we determine if the Jetpack Features /// are to be displayed based on the removal phase regardless of the app UI state. @objc - static func shouldShowJetpackFeatures() -> Bool { + public static func shouldShowJetpackFeatures() -> Bool { return shouldShowJetpackFeatures(featureFlagStore: RemoteFeatureFlagStore()) }