Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for Swift 4.2 #529

Merged
merged 12 commits into from
Nov 8, 2018
Merged

Added support for Swift 4.2 #529

merged 12 commits into from
Nov 8, 2018

Conversation

guykogus
Copy link
Contributor

@guykogus guykogus commented Oct 29, 2018

Changes

The code of the library, demo app and tests are designed to be backwards compatible with older versions of Xcode and Swift.

References

Testing

No changes to code logic or testing, so nothing new to add.

Checklist

@cocojoe
Copy link
Member

cocojoe commented Oct 29, 2018

Thanks for the PR, the demo app I can kind of live with as it's not part of the library. The UI tests are really just for me as they are used for generating screenshots for comparing Ux changes and comparison across devices.

However, unit tests should run. Ideally I would like to run CI to test in both 3.x and 4.x although the former will be phased out soon.

#510 was already fixed if you read through all the comments, was actually a kind of interesting issue related to swift compiler.

@guykogus
Copy link
Contributor Author

I only linked #510 because it mentioned Swift 4.2, didn't realise it was because of that Swift compiler bug.
Also, finally fixed unit tests. Took me way too long to find the issue. In Xcode 10 you're meant to select the Test Host and it wasn't set up correctly.

@cocojoe
Copy link
Member

cocojoe commented Oct 30, 2018

Great, I'll take a look a the PR in a bit 👍

@cocojoe
Copy link
Member

cocojoe commented Oct 31, 2018

@guykogus please rebase against master, I've also added support in CI for multiple Xcode, Swift Versions. See #530

Be good if you can add an entry for Swift 4.2 then we can test the whole range which is nice.

@guykogus
Copy link
Contributor Author

@cocojoe I think I've managed to get it all working. Let's see how Circle goes...

Copy link
Member

@cocojoe cocojoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general looks fine with a few comments, also take a look at the failing 3.0 build.

@cocojoe
Copy link
Member

cocojoe commented Oct 31, 2018

If you didn't already know it's https://auth0.com/blog/celebrate-hacktoberfest-with-auth0/
Let me sort you out with a T-Shirt 😄

@cocojoe cocojoe changed the title Upgrade project to support Swift 4.2 Added support for Swift 4.2 Nov 1, 2018
@cocojoe cocojoe added this to the v2-Next milestone Nov 1, 2018
@jerdog
Copy link

jerdog commented Nov 1, 2018

If you didn't already know it's https://auth0.com/blog/celebrate-hacktoberfest-with-auth0/
Let me sort you out with a T-Shirt 😄

@guykogus can you fill out this form and we'll sort this out! =) https://docs.google.com/forms/d/e/1FAIpQLSeEExVU_OPWhedfWdq3xD0gyrq1uo8_TUwH45JMlDKR7z1WEg/viewform

Copy link
Member

@cocojoe cocojoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some feedback.

@cocojoe
Copy link
Member

cocojoe commented Nov 7, 2018

@guykogus Good job on the changes 👍

static let responderKeyboardWillShowNotification = NSNotification.Name.UIKeyboardWillShow
static let responderKeyboardWillHideNotification = NSNotification.Name.UIKeyboardWillHide
static let responderKeyboardFrameEndUserInfoKey = UIKeyboardFrameEndUserInfoKey
static let responderKeyboardAnimationDurationUserInfoKey = UIKeyboardAnimationDurationUserInfoKey // swiftlint:disable:this identifier_name
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@guykogus Are you using the latest SwiftLint v0.27? just a couple of warnings regarding superfluous_disable_command so can remove the SwiftLint exceptions for both lines 113 an 114

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're only superfluous because of the version of Swift with which you're building because of the #if(swift...). I know how to solve this problem.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, better than multiple statements.

@cocojoe
Copy link
Member

cocojoe commented Nov 8, 2018

@guykogus Thanks again for PR ✅

@@ -1135,7 +1135,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "AUTH0_PLIST=\"${SRCROOT}/Auth0.plist\"\nif [ -f $AUTH0_PLIST ];\nthen\ncp \"$AUTH0_PLIST\" \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app\"\nfi";
shellScript = "AUTH0_PLIST=\"${SRCROOT}/Auth0.plist\"\nif [ -f \"$AUTH0_PLIST\" ];\nthen\ncp \"$AUTH0_PLIST\" \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app\"\nfi\n";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot about this, why was this an issue for you? I do not have a problem here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This script fails if the file path has a space. That's why you always need quotes around it.

@cocojoe cocojoe merged commit bdcbb07 into auth0:master Nov 8, 2018
@cocojoe cocojoe mentioned this pull request Dec 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants