Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions Libraries/Linking/NativeLinking.desktop-qt.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
* @format
*/

'use strict';

import type {TurboModule} from 'RCTExport';
import * as TurboModuleRegistry from 'TurboModuleRegistry';
import Platform from 'Platform';

export interface Spec extends TurboModule {
// Common interface
+getInitialURL: () => Promise<string>;
+canOpenURL: (url: string) => Promise<boolean>;
+openURL: (url: string) => Promise<void>;
+openSettings: () => Promise<void>;

// Android only
+sendIntent: (
action: string,
extras: ?Array<{key: string, value: string | number | boolean}>,
) => Promise<void>;

// Events
+addListener: (eventName: string) => void;
+removeListeners: (count: number) => void;
}

export default ((Platform.OS === 'ios' || Platform.OS == 'desktop-qt')
? TurboModuleRegistry.getEnforcing<Spec>('LinkingManager')
: TurboModuleRegistry.getEnforcing<Spec>('IntentAndroid'));
8 changes: 4 additions & 4 deletions RNTester/js/RNTesterList.desktop-qt.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,10 @@ const APIExamples: Array<RNTesterExample> = [
key: 'LayoutExample',
module: require('./LayoutExample'),
},
// {
// key: 'LinkingExample',
// module: require('./LinkingExample'),
// },
{
key: 'LinkingExample',
module: require('./LinkingExample'),
},
{
key: 'NativeAnimationsExample',
module: require('./NativeAnimationsExample'),
Expand Down
2 changes: 2 additions & 0 deletions babel/babel-config-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ function createRnToRndMap(rndPath) {
["../../../Components/ScrollView/ScrollView", path.resolve(rndPath, "Libraries/Components/ScrollView/ScrollView")],
["SafeAreaView", path.resolve(rndPath, "Libraries/Components/SafeAreaView/SafeAreaView")],
["../../Components/SafeAreaView/SafeAreaView", path.resolve(rndPath, "Libraries/Components/SafeAreaView/SafeAreaView")],
["../../Components/SafeAreaView/SafeAreaView", path.resolve(rndPath, "Libraries/Components/SafeAreaView/SafeAreaView")],
["./NativeLinking", path.resolve(rndPath, "Libraries/Linking/NativeLinking")],
]);
}

Expand Down