react-native-macos/Libraries/Linking
Ramanpreet Nara b70152cdef Fix NativeLinking split
Summary:
In D24324247 (56c363e39a), I split NativeLinking into NativeLinkingManager and NativeIntentAndroid. There was this line in NativeLinking.js, that I didn't migrate correctly:

```
export default ((Platform.OS === 'android'
  ? TurboModuleRegistry.getEnforcing<Spec>('IntentAndroid')
  : TurboModuleRegistry.getEnforcing<Spec>('LinkingManager')): Spec);
```

I separated this conditional statement into two others:
```
export default TurboModuleRegistry.getEnforcing<Spec>('IntentAndroid');
export default TurboModuleRegistry.getEnforcing<Spec>('LinkingManager');
```

The problem here is that now on iOS, we're hard requiring IntentAndroid, and on Android, we're hard requiring LinkingManager. Understandably, this started throwing errors in our e2e infra. This diff fixes this problem by:
1. Changing the relevant `getEnforcing` calls into `get` calls.
2. Wrapping all usages of NativeIntentAndroid, and NativeLinkingManager, which are already guarded by `Platform.OS` checks, by a nullthrows. This should satisfy flow. **Note:** NativeIntentAndroid is only used on Android, where it must be available. Similarly, NativeLinkingManager is only used on iOS, where it must be available.

Changelog: [Internal]

build-break
overriding_review_checks_triggers_an_audit_and_retroactive_review

Oncall Short Name: fbandroid_sheriff

Differential Revision: D24338558

fbshipit-source-id: b0d22cba77e67837834269deaa317dc73d2457dc
2020-10-15 11:49:19 -07:00
..
Linking.js Fix NativeLinking split 2020-10-15 11:49:19 -07:00
NativeIntentAndroid.js Fix NativeLinking split 2020-10-15 11:49:19 -07:00
NativeLinkingManager.js Fix NativeLinking split 2020-10-15 11:49:19 -07:00