This repository was archived by the owner on Sep 15, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Make properties be backwards compatible with the original ObjC API #562
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -27,23 +27,23 @@ private let DeliveryMethodEmailKey = "email" | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| private let DeliveryMethodNotificationKey = "notification" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @objcMembers public class RemoteReaderSiteInfo: NSObject { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var feedID: NSNumber? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var feedURL: String? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var feedID: NSNumber! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var feedURL: String! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var isFollowing: Bool = false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var isJetpack: Bool = false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var isPrivate: Bool = false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var isVisible: Bool = false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var organizationID: NSNumber? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var postCount: NSNumber? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var siteBlavatar: String? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var siteDescription: String? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var siteID: NSNumber? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var siteName: String? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var siteURL: String? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var subscriberCount: NSNumber? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var unseenCount: NSNumber? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var postsEndpoint: String? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var endpointPath: String? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var organizationID: NSNumber! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var postCount: NSNumber! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var siteBlavatar: String! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var siteDescription: String! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var siteID: NSNumber! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var siteName: String! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var siteURL: String! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var subscriberCount: NSNumber! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var unseenCount: NSNumber! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var postsEndpoint: String! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var endpointPath: String! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var postSubscription: RemoteReaderSiteInfoSubscriptionPost? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public var emailSubscription: RemoteReaderSiteInfoSubscriptionEmail? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The two properties above are kept as Optional since we know for sure that they are: WordPressKit-iOS/WordPressKit/RemoteReaderSiteInfo.swift Lines 123 to 135 in 1baed48
WordPressKit-iOS/WordPressKit/RemoteReaderSiteInfo.swift Lines 141 to 153 in 1baed48
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm not mistaken, this would be an un-breaking change, so we could probably move this out of the
Breaking Changessection (and thus avoid cutting a new major version unnecessarily?)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically speaking, I'd argue they are still breaking changes, even if we revert the two properties changes I mentioned above. The types are changed from Objective-C classes to Swift classes. And Swift class has its restrictions that Objective-C class don't have, like they cann't be inherited by an Objective-C class. I guess it's not likely that the apps have a subclass of these model types, but I'd say it's best to follow semantic version strictly, what do you think?