This repository was archived by the owner on Sep 4, 2018. It is now read-only.
Avoid numbers in enums for Swift compatibility #38
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.
Since
WPAnalyticsStatis the name of the enum, Swift will remove thatas a prefix so you can do things like
.LoginFailed.In #36, a number of 3D Touch related constants were introduced, which
would be mapped as
.3DTouchShortcut*enum values. As I understand it,Swift names can't start with a digit, which is probably why the compiler
was only stripping the
WPAnalyticsprefix but leaving theStats, andall the enum references in Swift were broken.
I know it's not really called Force Touch on the iPhone, so feel free to
use an alternative, as long as it doesn't start with a digit.
Linking to the frameworks issue for reference: wordpress-mobile/WordPress-iOS#4434
Needs Review: @kwonye