Skip to content

Commit

Permalink
Handle user exist error in TouchID signup.
Browse files Browse the repository at this point in the history
  • Loading branch information
hzalaz committed Nov 27, 2014
1 parent 17bedff commit 69c0536
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Pod/Assets/TouchID/A0TouchIDRegisterViewController.xib
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6250" systemVersion="14A389" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6250" systemVersion="14B25" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6244"/>
</dependencies>
Expand Down
6 changes: 3 additions & 3 deletions Pod/Assets/TouchID/A0TouchIDSignUpViewController.xib
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6250" systemVersion="14A389" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6250" systemVersion="14B25" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6244"/>
</dependencies>
Expand Down Expand Up @@ -38,10 +38,10 @@
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="EKL-Oy-0Cy" customClass="A0CredentialFieldView">
<rect key="frame" x="0.0" y="0.0" width="558" height="50"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Please enter your email" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="2Cd-SC-Pyf">
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Please enter your email" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="2Cd-SC-Pyf">
<rect key="frame" x="44" y="10" width="507" height="30"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" returnKeyType="go"/>
<textInputTraits key="textInputTraits" keyboardType="emailAddress" returnKeyType="go"/>
<connections>
<action selector="signUp:" destination="-1" eventType="editingDidEndOnExit" id="Ulu-Ee-qUj"/>
</connections>
Expand Down
2 changes: 1 addition & 1 deletion Pod/Classes/Core/A0Errors.m
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ + (NSString *)localizedStringForSignUpError:(NSError *)error {
NSDictionary *apiErrorInfo = error.userInfo[A0JSONResponseSerializerErrorDataKey];
NSString *errorKey = apiErrorInfo[@"code"];
NSString *localizedString;
if ([errorKey isEqualToString:@"user_exists"]) {
if ([errorKey isEqualToString:@"user_exists"] || [errorKey isEqualToString:@"username_exists"]) {
localizedString = A0LocalizedString(@"The user already exists.");
} else {
localizedString = A0LocalizedString(@"There was an error processing the sign up.");
Expand Down

0 comments on commit 69c0536

Please sign in to comment.