diff --git a/Example/Auth/Tests/FIRPhoneAuthProviderTests.m b/Example/Auth/Tests/FIRPhoneAuthProviderTests.m index 564f888fcb3..18b5db918bb 100644 --- a/Example/Auth/Tests/FIRPhoneAuthProviderTests.m +++ b/Example/Auth/Tests/FIRPhoneAuthProviderTests.m @@ -43,7 +43,6 @@ #import "FIRVerifyClientResponse.h" #import "OCMStubRecorder+FIRAuthUnitTests.h" #import "Phone/FIRPhoneAuthCredential_Internal.h" -#import "Phone/NSString+FIRAuth.h" @import SafariServices; @@ -328,7 +327,6 @@ - (void)testVerifyPhoneNumber { XCTAssertTrue([NSThread isMainThread]); XCTAssertNil(error); XCTAssertEqualObjects(verificationID, kTestVerificationID); - XCTAssertEqualObjects(verificationID.fir_authPhoneNumber, kTestPhoneNumber); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kExpectationTimeout handler:nil]; @@ -443,7 +441,6 @@ - (void)testVerifyPhoneNumberUIDelegate { XCTAssertTrue([NSThread isMainThread]); XCTAssertNil(error); XCTAssertEqualObjects(verificationID, kTestVerificationID); - XCTAssertEqualObjects(verificationID.fir_authPhoneNumber, kTestPhoneNumber); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kExpectationTimeout handler:nil]; @@ -711,7 +708,6 @@ - (void)testVerifyClient { XCTAssertTrue([NSThread isMainThread]); XCTAssertNil(error); XCTAssertEqualObjects(verificationID, kTestVerificationID); - XCTAssertEqualObjects(verificationID.fir_authPhoneNumber, kTestPhoneNumber); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kExpectationTimeout handler:nil]; @@ -893,7 +889,6 @@ - (void)testSendVerificationCodeSuccessFulRetry { completion:^(NSString *_Nullable verificationID, NSError *_Nullable error) { XCTAssertNil(error); XCTAssertEqualObjects(verificationID, kTestVerificationID); - XCTAssertEqualObjects(verificationID.fir_authPhoneNumber, kTestPhoneNumber); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kExpectationTimeout handler:nil]; diff --git a/Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m b/Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m index 3a098a56827..fd4ce58279f 100644 --- a/Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m +++ b/Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m @@ -20,7 +20,6 @@ #import "FIRLogger.h" #import "FIRPhoneAuthCredential_Internal.h" -#import "NSString+FIRAuth.h" #import "FIRApp.h" #import "FIRAuthAPNSToken.h" #import "FIRAuthAPNSTokenManager.h" @@ -194,8 +193,6 @@ - (void)verifyPhoneNumber:(NSString *)phoneNumber callBackOnMainThread(nil, error); return; } - // Associate the phone number with the verification ID. - response.verificationID.fir_authPhoneNumber = phoneNumber; callBackOnMainThread(response.verificationID, nil); }]; }]; @@ -381,8 +378,6 @@ - (void)verifyClientAndSendVerificationCodeToPhoneNumber:(NSString *)phoneNumber callback(nil, error); return; } - // Associate the phone number with the verification ID. - response.verificationID.fir_authPhoneNumber = phoneNumber; callback(response.verificationID, nil); }]; }]; diff --git a/Firebase/Auth/Source/AuthProviders/Phone/NSString+FIRAuth.h b/Firebase/Auth/Source/AuthProviders/Phone/NSString+FIRAuth.h deleted file mode 100644 index ba123faabe2..00000000000 --- a/Firebase/Auth/Source/AuthProviders/Phone/NSString+FIRAuth.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2017 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import - -NS_ASSUME_NONNULL_BEGIN - -/** @category NSString(FIRAuth) - @brief A FIRAuth category for extending the functionality of NSString for specific Firebase Auth - use cases. - */ -@interface NSString (FIRAuth) - -/** @property fir_authPhoneNumber - @brief A phone number associated with the verification ID (NSString instance). - @remarks Allows an instance on NSString to be associated with a phone number in order to link - phone number with the verificationID returned from verifyPhoneNumber:completion: - */ -@property(nonatomic, strong) NSString *fir_authPhoneNumber; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Firebase/Auth/Source/AuthProviders/Phone/NSString+FIRAuth.m b/Firebase/Auth/Source/AuthProviders/Phone/NSString+FIRAuth.m deleted file mode 100644 index 87f3b1c9430..00000000000 --- a/Firebase/Auth/Source/AuthProviders/Phone/NSString+FIRAuth.m +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2017 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import "NSString+FIRAuth.h" - -#import - -NS_ASSUME_NONNULL_BEGIN - -@implementation NSString (FIRAuth) - -- (void)setFir_authPhoneNumber:(NSString *)phoneNumber { - objc_setAssociatedObject(self, @selector(fir_authPhoneNumber), phoneNumber, - OBJC_ASSOCIATION_RETAIN_NONATOMIC); -} - -- (NSString *)fir_authPhoneNumber { - return objc_getAssociatedObject(self, @selector(fir_authPhoneNumber)); -} - -@end - -NS_ASSUME_NONNULL_END