diff --git a/Libraries/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h b/Libraries/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h index 4e361e2bef4..6bf1ef4a993 100644 --- a/Libraries/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h +++ b/Libraries/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h @@ -1976,7 +1976,7 @@ namespace JS { RCTRequired Serial; RCTRequired Fingerprint; RCTRequired Model; - RCTRequired ServerHost; + NSString *ServerHost; RCTRequired uiMode; }; @@ -3633,7 +3633,7 @@ inline JS::NativePlatformConstantsAndroid::Constants::Builder::Builder(const Inp d[@"Fingerprint"] = Fingerprint; auto Model = i.Model.get(); d[@"Model"] = Model; - auto ServerHost = i.ServerHost.get(); + auto ServerHost = i.ServerHost; d[@"ServerHost"] = ServerHost; auto uiMode = i.uiMode.get(); d[@"uiMode"] = uiMode; diff --git a/Libraries/Utilities/NativePlatformConstantsAndroid.js b/Libraries/Utilities/NativePlatformConstantsAndroid.js index dcf276ae2ac..39aa25d8c49 100644 --- a/Libraries/Utilities/NativePlatformConstantsAndroid.js +++ b/Libraries/Utilities/NativePlatformConstantsAndroid.js @@ -27,7 +27,7 @@ export interface Spec extends TurboModule { Serial: string, Fingerprint: string, Model: string, - ServerHost: string, + ServerHost?: string, uiMode: string, |}; +getAndroidID: () => string; diff --git a/Libraries/Utilities/Platform.android.js b/Libraries/Utilities/Platform.android.js index 13b0586701e..3785bc8790a 100644 --- a/Libraries/Utilities/Platform.android.js +++ b/Libraries/Utilities/Platform.android.js @@ -38,7 +38,7 @@ const Platform = { Serial: string, Fingerprint: string, Model: string, - ServerHost: string, + ServerHost?: string, uiMode: string, |} { if (this.__constants == null) { diff --git a/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativePlatformConstantsAndroidSpec.java b/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativePlatformConstantsAndroidSpec.java index c39b6a03d53..c8340538348 100644 --- a/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativePlatformConstantsAndroidSpec.java +++ b/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativePlatformConstantsAndroidSpec.java @@ -47,11 +47,12 @@ public abstract class NativePlatformConstantsAndroidSpec extends ReactContextBas "Version", "reactNativeVersion", "Model", - "ServerHost", "isTesting", "Release" )); - Set optionalFlowConstants = new HashSet<>(); + Set optionalFlowConstants = new HashSet<>(Arrays.asList( + "ServerHost" + )); Set undeclaredConstants = new HashSet<>(constants.keySet()); undeclaredConstants.removeAll(obligatoryFlowConstants); undeclaredConstants.removeAll(optionalFlowConstants);