Skip to content

Commit fef7d7d

Browse files
authored
Make methods end with InternalAsync internal (#720)
Make both methods ended with `InternalAsync` and `InternalAsync_DEPRECATED` internal automatically through SWIG post process.
1 parent 8b70da2 commit fef7d7d

File tree

3 files changed

+5
-33
lines changed

3 files changed

+5
-33
lines changed

auth/src/swig/auth.i

-32
Original file line numberDiff line numberDiff line change
@@ -1252,38 +1252,6 @@ static CppInstanceManager<Auth> g_auth_instances;
12521252
public string SmsCode { get { return SmsCodeInternal; } }
12531253
%}
12541254

1255-
%attributestring(firebase::auth::PhoneAuthCredential, std::string, SmsCodeInternal, sms_code);
1256-
%typemap(cscode) firebase::auth::PhoneAuthCredential %{
1257-
/// Gets the auto-retrieved SMS verification code if applicable.
1258-
///
1259-
/// This method is supported on Android devices only. It will return empty strings on
1260-
/// other platforms.
1261-
///
1262-
/// When SMS verification is used, you will be called back first via
1263-
/// @ref PhoneAuthProvider.CodeSent, and later
1264-
/// PhoneAuthProvider.VerificationCompleted with a PhoneAuthCredential containing
1265-
/// a non-null SMS code if auto-retrieval succeeded. If Firebase used another approach
1266-
/// to verify the phone number and triggers a callback via
1267-
/// @ref PhoneAuthProvider.VerificationCompleted, then the SMS code can be null.
1268-
public string SmsCode { get { return SmsCodeInternal; } }
1269-
%}
1270-
1271-
%attributestring(firebase::auth::PhoneAuthCredential, std::string, SmsCodeInternal, sms_code);
1272-
%typemap(cscode) firebase::auth::PhoneAuthCredential %{
1273-
/// Gets the auto-retrieved SMS verification code if applicable.
1274-
///
1275-
/// This method is supported on Android devices only. It will return empty strings on
1276-
/// other platforms.
1277-
///
1278-
/// When SMS verification is used, you will be called back first via
1279-
/// @ref PhoneAuthProvider.CodeSent, and later
1280-
/// PhoneAuthProvider.VerificationCompleted with a PhoneAuthCredential containing
1281-
/// a non-null SMS code if auto-retrieval succeeded. If Firebase used another approach
1282-
/// to verify the phone number and triggers a callback via
1283-
/// @ref PhoneAuthProvider.VerificationCompleted, then the SMS code can be null.
1284-
public string SmsCode { get { return SmsCodeInternal; } }
1285-
%}
1286-
12871255
%typemap(csclassmodifiers) firebase::auth::FederatedAuthProvider "public class";
12881256

12891257
%typemap(csclassmodifiers) firebase::auth::FederatedOAuthProvider

docs/readme.md

+4
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ Support
7171

7272
Release Notes
7373
-------------
74+
# TBA
75+
- Changes
76+
- Auth: Hide accidentally exposed methods.
77+
7478
### 11.0.0
7579
- Changes
7680
- App Check: Adds support for Firebase App Check on Android, iOS, tvOS,

swig_post_process.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ class InternalMethodsToInternalVisibility(SWIGPostProcessingInterface):
462462
def __init__(self):
463463
"""Initialize the instance."""
464464
self.function_property_regexp = re.compile(
465-
r'(public.*? )([^ )]+Internal)($| +|[({])')
465+
r'(public.*? )([^ )]+Internal(Async)?(_DEPRECATED)?)($| +|[({])')
466466

467467
def __call__(self, file_str, filename, iteration):
468468
"""Change "Internal" methods and properties to internal visibility.

0 commit comments

Comments
 (0)