chore(windows): Add a .gitattributes to fix line endings across myriad files. (#1431 by @trcoffman)
[skip ci]
This commit is contained in:
parent
a2029d2d47
commit
b0ac0c15be
|
@ -0,0 +1,12 @@
|
|||
* text=auto
|
||||
|
||||
*.bat text eol=crlf
|
||||
*.def text eol=crlf
|
||||
*.filters text eol=crlf
|
||||
*.idl text eol=crlf
|
||||
*.props text eol=crlf
|
||||
*.ps1 text eol=crlf
|
||||
*.sln text eol=crlf
|
||||
*.vcxproj text eol=crlf
|
||||
*.xaml text eol=crlf
|
||||
|
|
@ -1,100 +1,100 @@
|
|||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem http://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem http://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
|
|
|
@ -1,42 +1,42 @@
|
|||
require_relative '../../node_modules/@react-native-community/cli-platform-ios/native_modules'
|
||||
|
||||
abstract_target 'Shared' do
|
||||
use_native_modules!
|
||||
|
||||
pod 'react-native-webview', :path => "../.."
|
||||
|
||||
pod 'React', :path => "../../node_modules/react-native-macos/"
|
||||
pod 'React-Core', :path => "../../node_modules/react-native-macos/React"
|
||||
pod 'React-fishhook', :path => "../../node_modules/react-native-macos/Libraries/fishhook"
|
||||
pod 'React-RCTActionSheet', :path => "../../node_modules/react-native-macos/Libraries/ActionSheetIOS"
|
||||
pod 'React-RCTAnimation', :path => "../../node_modules/react-native-macos/Libraries/NativeAnimation"
|
||||
pod 'React-RCTBlob', :path => "../../node_modules/react-native-macos/Libraries/Blob"
|
||||
pod 'React-RCTImage', :path => "../../node_modules/react-native-macos/Libraries/Image"
|
||||
pod 'React-RCTLinking', :path => "../../node_modules/react-native-macos/Libraries/LinkingIOS"
|
||||
pod 'React-RCTNetwork', :path => "../../node_modules/react-native-macos/Libraries/Network"
|
||||
pod 'React-RCTSettings', :path => "../../node_modules/react-native-macos/Libraries/Settings"
|
||||
pod 'React-RCTText', :path => "../../node_modules/react-native-macos/Libraries/Text"
|
||||
pod 'React-RCTVibration', :path => "../../node_modules/react-native-macos/Libraries/Vibration"
|
||||
pod 'React-RCTWebSocket', :path => "../../node_modules/react-native-macos/Libraries/WebSocket"
|
||||
pod 'React-cxxreact', :path => "../../node_modules/react-native-macos/ReactCommon/cxxreact"
|
||||
pod 'React-jscallinvoker', :path => "../../node_modules/react-native-macos/ReactCommon/jscallinvoker"
|
||||
pod 'React-jsi', :path => "../../node_modules/react-native-macos/ReactCommon/jsi"
|
||||
pod 'React-jsiexecutor', :path => "../../node_modules/react-native-macos/ReactCommon/jsiexecutor"
|
||||
pod 'React-jsinspector', :path => "../../node_modules/react-native-macos/ReactCommon/jsinspector"
|
||||
pod 'yoga', :path => "../../node_modules/react-native-macos/ReactCommon/yoga"
|
||||
pod 'DoubleConversion', :podspec => "../../node_modules/react-native-macos/third-party-podspecs/DoubleConversion.podspec"
|
||||
pod 'glog', :podspec => "../../node_modules/react-native-macos/third-party-podspecs/glog.podspec"
|
||||
pod 'Folly', :podspec => "../../node_modules/react-native-macos/third-party-podspecs/Folly.podspec"
|
||||
pod 'boost-for-react-native', :podspec => "../../node_modules/react-native-macos/third-party-podspecs/boost-for-react-native.podspec"
|
||||
pod 'React-DevSupport', :path => "../../node_modules/react-native-macos/React"
|
||||
|
||||
target 'example-macOS' do
|
||||
platform :macos, '10.14'
|
||||
# Pods specifically for macOS target
|
||||
end
|
||||
|
||||
target 'example-iOS' do
|
||||
platform :ios, '9'
|
||||
# Pods specifically for iOS target
|
||||
end
|
||||
end
|
||||
require_relative '../../node_modules/@react-native-community/cli-platform-ios/native_modules'
|
||||
|
||||
abstract_target 'Shared' do
|
||||
use_native_modules!
|
||||
|
||||
pod 'react-native-webview', :path => "../.."
|
||||
|
||||
pod 'React', :path => "../../node_modules/react-native-macos/"
|
||||
pod 'React-Core', :path => "../../node_modules/react-native-macos/React"
|
||||
pod 'React-fishhook', :path => "../../node_modules/react-native-macos/Libraries/fishhook"
|
||||
pod 'React-RCTActionSheet', :path => "../../node_modules/react-native-macos/Libraries/ActionSheetIOS"
|
||||
pod 'React-RCTAnimation', :path => "../../node_modules/react-native-macos/Libraries/NativeAnimation"
|
||||
pod 'React-RCTBlob', :path => "../../node_modules/react-native-macos/Libraries/Blob"
|
||||
pod 'React-RCTImage', :path => "../../node_modules/react-native-macos/Libraries/Image"
|
||||
pod 'React-RCTLinking', :path => "../../node_modules/react-native-macos/Libraries/LinkingIOS"
|
||||
pod 'React-RCTNetwork', :path => "../../node_modules/react-native-macos/Libraries/Network"
|
||||
pod 'React-RCTSettings', :path => "../../node_modules/react-native-macos/Libraries/Settings"
|
||||
pod 'React-RCTText', :path => "../../node_modules/react-native-macos/Libraries/Text"
|
||||
pod 'React-RCTVibration', :path => "../../node_modules/react-native-macos/Libraries/Vibration"
|
||||
pod 'React-RCTWebSocket', :path => "../../node_modules/react-native-macos/Libraries/WebSocket"
|
||||
pod 'React-cxxreact', :path => "../../node_modules/react-native-macos/ReactCommon/cxxreact"
|
||||
pod 'React-jscallinvoker', :path => "../../node_modules/react-native-macos/ReactCommon/jscallinvoker"
|
||||
pod 'React-jsi', :path => "../../node_modules/react-native-macos/ReactCommon/jsi"
|
||||
pod 'React-jsiexecutor', :path => "../../node_modules/react-native-macos/ReactCommon/jsiexecutor"
|
||||
pod 'React-jsinspector', :path => "../../node_modules/react-native-macos/ReactCommon/jsinspector"
|
||||
pod 'yoga', :path => "../../node_modules/react-native-macos/ReactCommon/yoga"
|
||||
pod 'DoubleConversion', :podspec => "../../node_modules/react-native-macos/third-party-podspecs/DoubleConversion.podspec"
|
||||
pod 'glog', :podspec => "../../node_modules/react-native-macos/third-party-podspecs/glog.podspec"
|
||||
pod 'Folly', :podspec => "../../node_modules/react-native-macos/third-party-podspecs/Folly.podspec"
|
||||
pod 'boost-for-react-native', :podspec => "../../node_modules/react-native-macos/third-party-podspecs/boost-for-react-native.podspec"
|
||||
pod 'React-DevSupport', :path => "../../node_modules/react-native-macos/React"
|
||||
|
||||
target 'example-macOS' do
|
||||
platform :macos, '10.14'
|
||||
# Pods specifically for macOS target
|
||||
end
|
||||
|
||||
target 'example-iOS' do
|
||||
platform :ios, '9'
|
||||
# Pods specifically for iOS target
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#import <React/RCTBridgeDelegate.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate>
|
||||
|
||||
@property (nonatomic, strong) UIWindow *window;
|
||||
|
||||
@end
|
||||
#import <React/RCTBridgeDelegate.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate>
|
||||
|
||||
@property (nonatomic, strong) UIWindow *window;
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,35 +1,35 @@
|
|||
#import "AppDelegate.h"
|
||||
|
||||
#import <React/RCTBridge.h>
|
||||
#import <React/RCTBundleURLProvider.h>
|
||||
#import <React/RCTRootView.h>
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||
{
|
||||
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
|
||||
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
|
||||
moduleName:@"example"
|
||||
initialProperties:nil];
|
||||
|
||||
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
|
||||
|
||||
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
||||
UIViewController *rootViewController = [UIViewController new];
|
||||
rootViewController.view = rootView;
|
||||
self.window.rootViewController = rootViewController;
|
||||
[self.window makeKeyAndVisible];
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
|
||||
{
|
||||
#if DEBUG
|
||||
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"example/index" fallbackResource:nil];
|
||||
#else
|
||||
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
|
||||
#endif
|
||||
}
|
||||
|
||||
@end
|
||||
#import "AppDelegate.h"
|
||||
|
||||
#import <React/RCTBridge.h>
|
||||
#import <React/RCTBundleURLProvider.h>
|
||||
#import <React/RCTRootView.h>
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||
{
|
||||
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
|
||||
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
|
||||
moduleName:@"example"
|
||||
initialProperties:nil];
|
||||
|
||||
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
|
||||
|
||||
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
||||
UIViewController *rootViewController = [UIViewController new];
|
||||
rootViewController.view = rootView;
|
||||
self.window.rootViewController = rootViewController;
|
||||
[self.window makeKeyAndVisible];
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
|
||||
{
|
||||
#if DEBUG
|
||||
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"example/index" fallbackResource:nil];
|
||||
#else
|
||||
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
|
||||
#endif
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,42 +1,42 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7702" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/>
|
||||
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Powered by React Native" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
|
||||
<rect key="frame" x="20" y="439" width="441" height="21"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="example" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
|
||||
<rect key="frame" x="20" y="140" width="441" height="43"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
|
||||
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
|
||||
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
|
||||
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
|
||||
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
|
||||
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
|
||||
</constraints>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<point key="canvasLocation" x="548" y="455"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7702" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/>
|
||||
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Powered by React Native" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
|
||||
<rect key="frame" x="20" y="439" width="441" height="21"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="example" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
|
||||
<rect key="frame" x="20" y="140" width="441" height="43"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
|
||||
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
|
||||
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
|
||||
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
|
||||
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
|
||||
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
|
||||
</constraints>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<point key="canvasLocation" x="548" y="455"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
||||
|
|
|
@ -1,38 +1,38 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,57 +1,57 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
<key>NSExceptionDomains</key>
|
||||
<dict>
|
||||
<key>localhost</key>
|
||||
<dict>
|
||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>NSLocationWhenInUseUsageDescription</key>
|
||||
<string></string>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
<key>NSExceptionDomains</key>
|
||||
<dict>
|
||||
<key>localhost</key>
|
||||
<dict>
|
||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>NSLocationWhenInUseUsageDescription</key>
|
||||
<string></string>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
@autoreleasepool {
|
||||
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
|
||||
}
|
||||
}
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
@autoreleasepool {
|
||||
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@class RCTBridge;
|
||||
|
||||
@interface AppDelegate : NSObject <NSApplicationDelegate>
|
||||
|
||||
@property (nonatomic, readonly) RCTBridge *bridge;
|
||||
|
||||
@end
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@class RCTBridge;
|
||||
|
||||
@interface AppDelegate : NSObject <NSApplicationDelegate>
|
||||
|
||||
@property (nonatomic, readonly) RCTBridge *bridge;
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
#import "AppDelegate.h"
|
||||
|
||||
#import <React/RCTBridge.h>
|
||||
#import <React/RCTBundleURLProvider.h>
|
||||
|
||||
@interface AppDelegate () <RCTBridgeDelegate>
|
||||
|
||||
@end
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
|
||||
_bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:nil];
|
||||
}
|
||||
|
||||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
|
||||
// Insert code here to initialize your application
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(NSNotification *)aNotification {
|
||||
// Insert code here to tear down your application
|
||||
}
|
||||
|
||||
#pragma mark - RCTBridgeDelegate Methods
|
||||
|
||||
- (NSURL *)sourceURLForBridge:(__unused RCTBridge *)bridge {
|
||||
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"example/index" fallbackResource:@"main"]; // .jsbundle;
|
||||
}
|
||||
|
||||
@end
|
||||
#import "AppDelegate.h"
|
||||
|
||||
#import <React/RCTBridge.h>
|
||||
#import <React/RCTBundleURLProvider.h>
|
||||
|
||||
@interface AppDelegate () <RCTBridgeDelegate>
|
||||
|
||||
@end
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
|
||||
_bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:nil];
|
||||
}
|
||||
|
||||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
|
||||
// Insert code here to initialize your application
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(NSNotification *)aNotification {
|
||||
// Insert code here to tear down your application
|
||||
}
|
||||
|
||||
#pragma mark - RCTBridgeDelegate Methods
|
||||
|
||||
- (NSURL *)sourceURLForBridge:(__unused RCTBridge *)bridge {
|
||||
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"example/index" fallbackResource:@"main"]; // .jsbundle;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,58 +1,58 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "16x16"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "16x16"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "32x32"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "32x32"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "128x128"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "128x128"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "256x256"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "256x256"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "512x512"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "512x512"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "16x16"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "16x16"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "32x32"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "32x32"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "128x128"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "128x128"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "256x256"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "256x256"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "512x512"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "512x512"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,47 +1,47 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
<key>NSExceptionDomains</key>
|
||||
<dict>
|
||||
<key>localhost</key>
|
||||
<dict>
|
||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>NSMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>NSSupportsAutomaticTermination</key>
|
||||
<true/>
|
||||
<key>NSSupportsSuddenTermination</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
<key>NSExceptionDomains</key>
|
||||
<dict>
|
||||
<key>localhost</key>
|
||||
<dict>
|
||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>NSMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>NSSupportsAutomaticTermination</key>
|
||||
<true/>
|
||||
<key>NSSupportsSuddenTermination</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface ViewController : NSViewController
|
||||
|
||||
@end
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface ViewController : NSViewController
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
#import "ViewController.h"
|
||||
#import "AppDelegate.h"
|
||||
|
||||
#import <React/RCTRootView.h>
|
||||
|
||||
@implementation ViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
RCTBridge *bridge = [((AppDelegate *)[NSApp delegate])bridge];
|
||||
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"example" initialProperties:nil];
|
||||
|
||||
NSView *view = [self view];
|
||||
|
||||
[view addSubview:rootView];
|
||||
[rootView setBackgroundColor:[NSColor windowBackgroundColor]];
|
||||
[rootView setFrame:[view bounds]];
|
||||
[rootView setAutoresizingMask:(NSViewMinXMargin | NSViewMinXMargin | NSViewMinYMargin | NSViewMaxYMargin | NSViewWidthSizable | NSViewHeightSizable)];
|
||||
}
|
||||
|
||||
@end
|
||||
#import "ViewController.h"
|
||||
#import "AppDelegate.h"
|
||||
|
||||
#import <React/RCTRootView.h>
|
||||
|
||||
@implementation ViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
RCTBridge *bridge = [((AppDelegate *)[NSApp delegate])bridge];
|
||||
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"example" initialProperties:nil];
|
||||
|
||||
NSView *view = [self view];
|
||||
|
||||
[view addSubview:rootView];
|
||||
[rootView setBackgroundColor:[NSColor windowBackgroundColor]];
|
||||
[rootView setFrame:[view bounds]];
|
||||
[rootView setAutoresizingMask:(NSViewMinXMargin | NSViewMinXMargin | NSViewMinYMargin | NSViewMaxYMargin | NSViewWidthSizable | NSViewHeightSizable)];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<key>com.apple.security.files.user-selected.read-only</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.client</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<key>com.apple.security.files.user-selected.read-only</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.client</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
return NSApplicationMain(argc, argv);
|
||||
}
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
return NSApplicationMain(argc, argv);
|
||||
}
|
||||
|
|
|
@ -1,78 +1,78 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1140"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||
BuildableName = "example.app"
|
||||
BlueprintName = "example-iOS"
|
||||
ReferencedContainer = "container:example.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||
BuildableName = "example.app"
|
||||
BlueprintName = "example-iOS"
|
||||
ReferencedContainer = "container:example.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||
BuildableName = "example.app"
|
||||
BlueprintName = "example-iOS"
|
||||
ReferencedContainer = "container:example.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1140"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||
BuildableName = "example.app"
|
||||
BlueprintName = "example-iOS"
|
||||
ReferencedContainer = "container:example.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||
BuildableName = "example.app"
|
||||
BlueprintName = "example-iOS"
|
||||
ReferencedContainer = "container:example.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||
BuildableName = "example.app"
|
||||
BlueprintName = "example-iOS"
|
||||
ReferencedContainer = "container:example.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
|
|
|
@ -1,78 +1,78 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1140"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "514201482437B4B30078DB4F"
|
||||
BuildableName = "example.app"
|
||||
BlueprintName = "example-macOS"
|
||||
ReferencedContainer = "container:example.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "514201482437B4B30078DB4F"
|
||||
BuildableName = "example.app"
|
||||
BlueprintName = "example-macOS"
|
||||
ReferencedContainer = "container:example.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "514201482437B4B30078DB4F"
|
||||
BuildableName = "example.app"
|
||||
BlueprintName = "example-macOS"
|
||||
ReferencedContainer = "container:example.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1140"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "514201482437B4B30078DB4F"
|
||||
BuildableName = "example.app"
|
||||
BlueprintName = "example-macOS"
|
||||
ReferencedContainer = "container:example.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "514201482437B4B30078DB4F"
|
||||
BuildableName = "example.app"
|
||||
BlueprintName = "example-macOS"
|
||||
ReferencedContainer = "container:example.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "514201482437B4B30078DB4F"
|
||||
BuildableName = "example.app"
|
||||
BlueprintName = "example-macOS"
|
||||
ReferencedContainer = "container:example.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
#pragma once
|
||||
|
||||
#define NOMINMAX
|
||||
#include <hstring.h>
|
||||
#include <restrictederrorinfo.h>
|
||||
#include <unknwn.h>
|
||||
#include <windows.h>
|
||||
#include <winrt/Windows.ApplicationModel.Activation.h>
|
||||
#include <winrt/Windows.Foundation.Collections.h>
|
||||
#include <winrt/Windows.Foundation.h>
|
||||
#include <winrt/Windows.UI.Xaml.Controls.Primitives.h>
|
||||
#include <winrt/Windows.UI.Xaml.Controls.h>
|
||||
#include <winrt/Windows.UI.Xaml.Data.h>
|
||||
#include <winrt/Windows.UI.Xaml.Interop.h>
|
||||
#include <winrt/Windows.UI.Xaml.Markup.h>
|
||||
#include <winrt/Windows.UI.Xaml.Navigation.h>
|
||||
#include <winrt/Windows.UI.Xaml.h>
|
||||
|
||||
#include <winrt/Microsoft.ReactNative.h>
|
||||
|
||||
#include <winrt/Microsoft.UI.Xaml.Automation.Peers.h>
|
||||
#include <winrt/Microsoft.UI.Xaml.Controls.Primitives.h>
|
||||
#include <winrt/Microsoft.UI.Xaml.Controls.h>
|
||||
#include <winrt/Microsoft.UI.Xaml.Media.h>
|
||||
#pragma once
|
||||
|
||||
#define NOMINMAX
|
||||
#include <hstring.h>
|
||||
#include <restrictederrorinfo.h>
|
||||
#include <unknwn.h>
|
||||
#include <windows.h>
|
||||
#include <winrt/Windows.ApplicationModel.Activation.h>
|
||||
#include <winrt/Windows.Foundation.Collections.h>
|
||||
#include <winrt/Windows.Foundation.h>
|
||||
#include <winrt/Windows.UI.Xaml.Controls.Primitives.h>
|
||||
#include <winrt/Windows.UI.Xaml.Controls.h>
|
||||
#include <winrt/Windows.UI.Xaml.Data.h>
|
||||
#include <winrt/Windows.UI.Xaml.Interop.h>
|
||||
#include <winrt/Windows.UI.Xaml.Markup.h>
|
||||
#include <winrt/Windows.UI.Xaml.Navigation.h>
|
||||
#include <winrt/Windows.UI.Xaml.h>
|
||||
|
||||
#include <winrt/Microsoft.ReactNative.h>
|
||||
|
||||
#include <winrt/Microsoft.UI.Xaml.Automation.Peers.h>
|
||||
#include <winrt/Microsoft.UI.Xaml.Controls.Primitives.h>
|
||||
#include <winrt/Microsoft.UI.Xaml.Controls.h>
|
||||
#include <winrt/Microsoft.UI.Xaml.Media.h>
|
||||
#include <winrt/Microsoft.UI.Xaml.XamlTypeInfo.h>
|
182
package.json
182
package.json
|
@ -1,91 +1,91 @@
|
|||
{
|
||||
"name": "react-native-webview",
|
||||
"description": "React Native WebView component for iOS, Android, macOS, and Windows",
|
||||
"main": "index.js",
|
||||
"typings": "index.d.ts",
|
||||
"author": "Jamon Holmgren <jamon@infinite.red>",
|
||||
"contributors": [
|
||||
"Thibault Malbranche <malbranche.thibault@gmail.com>"
|
||||
],
|
||||
"license": "MIT",
|
||||
"version": "10.3.1",
|
||||
"homepage": "https://github.com/react-native-community/react-native-webview#readme",
|
||||
"scripts": {
|
||||
"start": "node node_modules/react-native/local-cli/cli.js start",
|
||||
"start:android": "react-native run-android",
|
||||
"start:ios": "react-native run-ios",
|
||||
"start:macos": "node node_modules/react-native-macos/local-cli/cli.js start --use-react-native-macos",
|
||||
"start:windows": "react-native start --use-react-native-windows",
|
||||
"ci": "CI=true && yarn lint",
|
||||
"ci:publish": "yarn semantic-release",
|
||||
"lint": "yarn tsc --noEmit && yarn eslint ./src --ext .ts,.tsx",
|
||||
"build": "yarn tsc",
|
||||
"prepare": "yarn build",
|
||||
"appium": "appium",
|
||||
"test:windows": "yarn jest --setupFiles=./jest-setups/jest.setup.windows.js"
|
||||
},
|
||||
"rn-docs": {
|
||||
"title": "Webview",
|
||||
"type": "Component"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "16.11.0",
|
||||
"react-native": ">=0.60 <0.63"
|
||||
},
|
||||
"dependencies": {
|
||||
"escape-string-regexp": "2.0.0",
|
||||
"invariant": "2.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.4.5",
|
||||
"@babel/runtime": "7.4.5",
|
||||
"@react-native-community/cli": "^4.8.0",
|
||||
"@react-native-community/cli-platform-android": "^4.8.0",
|
||||
"@react-native-community/cli-platform-ios": "^4.8.0",
|
||||
"@semantic-release/git": "7.0.16",
|
||||
"@types/invariant": "^2.2.30",
|
||||
"@types/jest": "24.0.18",
|
||||
"@types/react": "16.9.34",
|
||||
"@types/react-native": "0.62.5",
|
||||
"@types/selenium-webdriver": "4.0.9",
|
||||
"@typescript-eslint/eslint-plugin": "2.1.0",
|
||||
"@typescript-eslint/parser": "2.1.0",
|
||||
"babel-eslint": "10.0.3",
|
||||
"babel-jest": "24.8.0",
|
||||
"babel-plugin-module-resolver": "3.1.3",
|
||||
"eslint": "6.3.0",
|
||||
"eslint-config-airbnb": "18.0.1",
|
||||
"eslint-config-prettier": "6.2.0",
|
||||
"eslint-plugin-import": "2.18.2",
|
||||
"eslint-plugin-jsx-a11y": "6.2.3",
|
||||
"eslint-plugin-react": "7.14.3",
|
||||
"eslint-plugin-react-native": "3.7.0",
|
||||
"jest": "24.9.0",
|
||||
"metro": "0.56.4",
|
||||
"metro-react-native-babel-preset": "^0.59.0",
|
||||
"react": "16.11.0",
|
||||
"react-native": "0.62.2",
|
||||
"react-native-macos": "0.60.0-microsoft.73",
|
||||
"react-native-windows": "^0.62.0-0",
|
||||
"semantic-release": "15.13.24",
|
||||
"typescript": "3.8.3",
|
||||
"appium": "1.17.0",
|
||||
"selenium-appium": "0.0.15",
|
||||
"selenium-webdriver": "4.0.0-alpha.7"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/react-native-community/react-native-webview.git"
|
||||
},
|
||||
"files": [
|
||||
"android",
|
||||
"apple",
|
||||
"ios",
|
||||
"macos",
|
||||
"windows",
|
||||
"lib",
|
||||
"index.js",
|
||||
"index.d.ts",
|
||||
"react-native-webview.podspec"
|
||||
]
|
||||
}
|
||||
{
|
||||
"name": "react-native-webview",
|
||||
"description": "React Native WebView component for iOS, Android, macOS, and Windows",
|
||||
"main": "index.js",
|
||||
"typings": "index.d.ts",
|
||||
"author": "Jamon Holmgren <jamon@infinite.red>",
|
||||
"contributors": [
|
||||
"Thibault Malbranche <malbranche.thibault@gmail.com>"
|
||||
],
|
||||
"license": "MIT",
|
||||
"version": "10.3.1",
|
||||
"homepage": "https://github.com/react-native-community/react-native-webview#readme",
|
||||
"scripts": {
|
||||
"start": "node node_modules/react-native/local-cli/cli.js start",
|
||||
"start:android": "react-native run-android",
|
||||
"start:ios": "react-native run-ios",
|
||||
"start:macos": "node node_modules/react-native-macos/local-cli/cli.js start --use-react-native-macos",
|
||||
"start:windows": "react-native start --use-react-native-windows",
|
||||
"ci": "CI=true && yarn lint",
|
||||
"ci:publish": "yarn semantic-release",
|
||||
"lint": "yarn tsc --noEmit && yarn eslint ./src --ext .ts,.tsx",
|
||||
"build": "yarn tsc",
|
||||
"prepare": "yarn build",
|
||||
"appium": "appium",
|
||||
"test:windows": "yarn jest --setupFiles=./jest-setups/jest.setup.windows.js"
|
||||
},
|
||||
"rn-docs": {
|
||||
"title": "Webview",
|
||||
"type": "Component"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "16.11.0",
|
||||
"react-native": ">=0.60 <0.63"
|
||||
},
|
||||
"dependencies": {
|
||||
"escape-string-regexp": "2.0.0",
|
||||
"invariant": "2.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.4.5",
|
||||
"@babel/runtime": "7.4.5",
|
||||
"@react-native-community/cli": "^4.8.0",
|
||||
"@react-native-community/cli-platform-android": "^4.8.0",
|
||||
"@react-native-community/cli-platform-ios": "^4.8.0",
|
||||
"@semantic-release/git": "7.0.16",
|
||||
"@types/invariant": "^2.2.30",
|
||||
"@types/jest": "24.0.18",
|
||||
"@types/react": "16.9.34",
|
||||
"@types/react-native": "0.62.5",
|
||||
"@types/selenium-webdriver": "4.0.9",
|
||||
"@typescript-eslint/eslint-plugin": "2.1.0",
|
||||
"@typescript-eslint/parser": "2.1.0",
|
||||
"babel-eslint": "10.0.3",
|
||||
"babel-jest": "24.8.0",
|
||||
"babel-plugin-module-resolver": "3.1.3",
|
||||
"eslint": "6.3.0",
|
||||
"eslint-config-airbnb": "18.0.1",
|
||||
"eslint-config-prettier": "6.2.0",
|
||||
"eslint-plugin-import": "2.18.2",
|
||||
"eslint-plugin-jsx-a11y": "6.2.3",
|
||||
"eslint-plugin-react": "7.14.3",
|
||||
"eslint-plugin-react-native": "3.7.0",
|
||||
"jest": "24.9.0",
|
||||
"metro": "0.56.4",
|
||||
"metro-react-native-babel-preset": "^0.59.0",
|
||||
"react": "16.11.0",
|
||||
"react-native": "0.62.2",
|
||||
"react-native-macos": "0.60.0-microsoft.73",
|
||||
"react-native-windows": "^0.62.0-0",
|
||||
"semantic-release": "15.13.24",
|
||||
"typescript": "3.8.3",
|
||||
"appium": "1.17.0",
|
||||
"selenium-appium": "0.0.15",
|
||||
"selenium-webdriver": "4.0.0-alpha.7"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/react-native-community/react-native-webview.git"
|
||||
},
|
||||
"files": [
|
||||
"android",
|
||||
"apple",
|
||||
"ios",
|
||||
"macos",
|
||||
"windows",
|
||||
"lib",
|
||||
"index.js",
|
||||
"index.d.ts",
|
||||
"react-native-webview.podspec"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,266 +1,266 @@
|
|||
/**
|
||||
* 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.
|
||||
*
|
||||
* Portions copyright for react-native-windows:
|
||||
*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import {
|
||||
UIManager as NotTypedUIManager,
|
||||
View,
|
||||
requireNativeComponent,
|
||||
StyleSheet,
|
||||
Image,
|
||||
ImageSourcePropType,
|
||||
findNodeHandle,
|
||||
} from 'react-native';
|
||||
import {
|
||||
createOnShouldStartLoadWithRequest,
|
||||
} from './WebViewShared';
|
||||
import {
|
||||
NativeWebViewWindows,
|
||||
WebViewSharedProps,
|
||||
WebViewProgressEvent,
|
||||
WebViewNavigationEvent,
|
||||
WebViewErrorEvent,
|
||||
WebViewHttpErrorEvent,
|
||||
WebViewMessageEvent,
|
||||
RNCWebViewUIManagerWindows,
|
||||
State,
|
||||
} from './WebViewTypes';
|
||||
|
||||
const UIManager = NotTypedUIManager as RNCWebViewUIManagerWindows;
|
||||
const { resolveAssetSource } = Image;
|
||||
const RCTWebView: typeof NativeWebViewWindows = requireNativeComponent(
|
||||
'RCTWebView',
|
||||
);
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
},
|
||||
hidden: {
|
||||
height: 0,
|
||||
flex: 0, // disable 'flex:1' when hiding a View
|
||||
},
|
||||
loadingView: {
|
||||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
},
|
||||
loadingProgressBar: {
|
||||
height: 20,
|
||||
},
|
||||
});
|
||||
|
||||
export default class WebView extends React.Component<WebViewSharedProps, State> {
|
||||
|
||||
static defaultProps = {
|
||||
javaScriptEnabled: true,
|
||||
};
|
||||
|
||||
state: State = {
|
||||
viewState: this.props.startInLoadingState ? 'LOADING' : 'IDLE',
|
||||
lastErrorEvent: null,
|
||||
}
|
||||
|
||||
webViewRef = React.createRef<NativeWebViewWindows>();
|
||||
|
||||
goForward = () => {
|
||||
UIManager.dispatchViewManagerCommand(
|
||||
this.getWebViewHandle(),
|
||||
UIManager.getViewManagerConfig('RCTWebView').Commands.goForward,
|
||||
undefined,
|
||||
);
|
||||
}
|
||||
|
||||
goBack = () => {
|
||||
UIManager.dispatchViewManagerCommand(
|
||||
this.getWebViewHandle(),
|
||||
UIManager.getViewManagerConfig('RCTWebView').Commands.goBack,
|
||||
undefined,
|
||||
);
|
||||
}
|
||||
|
||||
reload = () => {
|
||||
UIManager.dispatchViewManagerCommand(
|
||||
this.getWebViewHandle(),
|
||||
UIManager.getViewManagerConfig('RCTWebView').Commands.reload,
|
||||
undefined,
|
||||
);
|
||||
}
|
||||
|
||||
injectJavaScript = (data: string) => {
|
||||
UIManager.dispatchViewManagerCommand(
|
||||
this.getWebViewHandle(),
|
||||
UIManager.getViewManagerConfig('RCTWebView').Commands.injectJavaScript,
|
||||
[data],
|
||||
);
|
||||
}
|
||||
|
||||
postMessage = (data: string) => {
|
||||
UIManager.dispatchViewManagerCommand(
|
||||
this.getWebViewHandle(),
|
||||
UIManager.getViewManagerConfig('RCTWebView').Commands.postMessage,
|
||||
[String(data)],
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* We return an event with a bunch of fields including:
|
||||
* url, title, loading, canGoBack, canGoForward
|
||||
*/
|
||||
updateNavigationState = (event: WebViewNavigationEvent) => {
|
||||
if (this.props.onNavigationStateChange) {
|
||||
this.props.onNavigationStateChange(event.nativeEvent);
|
||||
}
|
||||
}
|
||||
|
||||
getWebViewHandle = () => {
|
||||
// eslint-disable-next-line react/no-string-refs
|
||||
return findNodeHandle(this.webViewRef.current);
|
||||
}
|
||||
|
||||
onLoadingStart = (event: WebViewNavigationEvent) => {
|
||||
const { onLoadStart } = this.props;
|
||||
if(onLoadStart) {
|
||||
onLoadStart(event);
|
||||
}
|
||||
this.updateNavigationState(event);
|
||||
}
|
||||
|
||||
onLoadingProgress = (event: WebViewProgressEvent) => {
|
||||
const { onLoadProgress } = this.props;
|
||||
if (onLoadProgress) {
|
||||
onLoadProgress(event);
|
||||
}
|
||||
};
|
||||
|
||||
onLoadingError = (event: WebViewErrorEvent) => {
|
||||
event.persist(); // persist this event because we need to store it
|
||||
const {onError, onLoadEnd} = this.props;
|
||||
if(onError) {
|
||||
onError(event);
|
||||
}
|
||||
if(onLoadEnd) {
|
||||
onLoadEnd(event);
|
||||
}
|
||||
console.error('Encountered an error loading page', event.nativeEvent);
|
||||
this.setState({
|
||||
lastErrorEvent: event.nativeEvent,
|
||||
viewState: 'ERROR',
|
||||
});
|
||||
}
|
||||
|
||||
onLoadingFinish =(event: WebViewNavigationEvent) => {
|
||||
const {onLoad, onLoadEnd} = this.props;
|
||||
if(onLoad) {
|
||||
onLoad(event);
|
||||
}
|
||||
if(onLoadEnd) {
|
||||
onLoadEnd(event);
|
||||
}
|
||||
this.setState({
|
||||
viewState: 'IDLE',
|
||||
});
|
||||
this.updateNavigationState(event);
|
||||
}
|
||||
|
||||
onMessage = (event: WebViewMessageEvent) => {
|
||||
const { onMessage } = this.props;
|
||||
if (onMessage) {
|
||||
onMessage(event);
|
||||
}
|
||||
}
|
||||
|
||||
onHttpError = (event: WebViewHttpErrorEvent) => {
|
||||
const { onHttpError } = this.props;
|
||||
if (onHttpError) {
|
||||
onHttpError(event);
|
||||
}
|
||||
}
|
||||
|
||||
render () {
|
||||
const {
|
||||
nativeConfig = {},
|
||||
onMessage,
|
||||
onShouldStartLoadWithRequest: onShouldStartLoadWithRequestProp,
|
||||
originWhitelist,
|
||||
renderError,
|
||||
renderLoading,
|
||||
style,
|
||||
containerStyle,
|
||||
...otherProps
|
||||
} = this.props;
|
||||
|
||||
let otherView = null;
|
||||
|
||||
if (this.state.viewState === 'LOADING') {
|
||||
otherView = this.props.renderLoading && this.props.renderLoading();
|
||||
} else if (this.state.viewState === 'ERROR') {
|
||||
const errorEvent = this.state.lastErrorEvent;
|
||||
otherView = this.props.renderError
|
||||
&& this.props.renderError(
|
||||
errorEvent.domain,
|
||||
errorEvent.code,
|
||||
errorEvent.description,
|
||||
);
|
||||
} else if (this.state.viewState !== 'IDLE') {
|
||||
console.error('RCTWebView invalid state encountered: ', this.state.viewState);
|
||||
}
|
||||
|
||||
const webViewStyles = [styles.container, this.props.style];
|
||||
if (
|
||||
this.state.viewState === 'LOADING'
|
||||
|| this.state.viewState === 'ERROR'
|
||||
) {
|
||||
// if we're in either LOADING or ERROR states, don't show the webView
|
||||
webViewStyles.push(styles.hidden);
|
||||
}
|
||||
|
||||
const onShouldStartLoadWithRequest = createOnShouldStartLoadWithRequest(
|
||||
()=>{},
|
||||
// casting cause it's in the default props
|
||||
originWhitelist as readonly string[],
|
||||
onShouldStartLoadWithRequestProp,
|
||||
);
|
||||
|
||||
const NativeWebView
|
||||
= (nativeConfig.component as typeof NativeWebViewWindows | undefined)
|
||||
|| RCTWebView;
|
||||
|
||||
const webView = (
|
||||
<NativeWebView
|
||||
ref={this.webViewRef}
|
||||
key="webViewKey"
|
||||
{...otherProps}
|
||||
messagingEnabled={typeof onMessage === 'function'}
|
||||
onLoadingError={this.onLoadingError}
|
||||
onLoadingFinish={this.onLoadingFinish}
|
||||
onLoadingProgress={this.onLoadingProgress}
|
||||
onLoadingStart={this.onLoadingStart}
|
||||
onHttpError={this.onHttpError}
|
||||
onMessage={this.onMessage}
|
||||
onScroll={this.props.onScroll}
|
||||
onShouldStartLoadWithRequest={onShouldStartLoadWithRequest}
|
||||
source={resolveAssetSource(this.props.source as ImageSourcePropType)}
|
||||
style={webViewStyles}
|
||||
{...nativeConfig.props}
|
||||
/>
|
||||
);
|
||||
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{webView}
|
||||
{otherView}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* Portions copyright for react-native-windows:
|
||||
*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import {
|
||||
UIManager as NotTypedUIManager,
|
||||
View,
|
||||
requireNativeComponent,
|
||||
StyleSheet,
|
||||
Image,
|
||||
ImageSourcePropType,
|
||||
findNodeHandle,
|
||||
} from 'react-native';
|
||||
import {
|
||||
createOnShouldStartLoadWithRequest,
|
||||
} from './WebViewShared';
|
||||
import {
|
||||
NativeWebViewWindows,
|
||||
WebViewSharedProps,
|
||||
WebViewProgressEvent,
|
||||
WebViewNavigationEvent,
|
||||
WebViewErrorEvent,
|
||||
WebViewHttpErrorEvent,
|
||||
WebViewMessageEvent,
|
||||
RNCWebViewUIManagerWindows,
|
||||
State,
|
||||
} from './WebViewTypes';
|
||||
|
||||
const UIManager = NotTypedUIManager as RNCWebViewUIManagerWindows;
|
||||
const { resolveAssetSource } = Image;
|
||||
const RCTWebView: typeof NativeWebViewWindows = requireNativeComponent(
|
||||
'RCTWebView',
|
||||
);
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
},
|
||||
hidden: {
|
||||
height: 0,
|
||||
flex: 0, // disable 'flex:1' when hiding a View
|
||||
},
|
||||
loadingView: {
|
||||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
},
|
||||
loadingProgressBar: {
|
||||
height: 20,
|
||||
},
|
||||
});
|
||||
|
||||
export default class WebView extends React.Component<WebViewSharedProps, State> {
|
||||
|
||||
static defaultProps = {
|
||||
javaScriptEnabled: true,
|
||||
};
|
||||
|
||||
state: State = {
|
||||
viewState: this.props.startInLoadingState ? 'LOADING' : 'IDLE',
|
||||
lastErrorEvent: null,
|
||||
}
|
||||
|
||||
webViewRef = React.createRef<NativeWebViewWindows>();
|
||||
|
||||
goForward = () => {
|
||||
UIManager.dispatchViewManagerCommand(
|
||||
this.getWebViewHandle(),
|
||||
UIManager.getViewManagerConfig('RCTWebView').Commands.goForward,
|
||||
undefined,
|
||||
);
|
||||
}
|
||||
|
||||
goBack = () => {
|
||||
UIManager.dispatchViewManagerCommand(
|
||||
this.getWebViewHandle(),
|
||||
UIManager.getViewManagerConfig('RCTWebView').Commands.goBack,
|
||||
undefined,
|
||||
);
|
||||
}
|
||||
|
||||
reload = () => {
|
||||
UIManager.dispatchViewManagerCommand(
|
||||
this.getWebViewHandle(),
|
||||
UIManager.getViewManagerConfig('RCTWebView').Commands.reload,
|
||||
undefined,
|
||||
);
|
||||
}
|
||||
|
||||
injectJavaScript = (data: string) => {
|
||||
UIManager.dispatchViewManagerCommand(
|
||||
this.getWebViewHandle(),
|
||||
UIManager.getViewManagerConfig('RCTWebView').Commands.injectJavaScript,
|
||||
[data],
|
||||
);
|
||||
}
|
||||
|
||||
postMessage = (data: string) => {
|
||||
UIManager.dispatchViewManagerCommand(
|
||||
this.getWebViewHandle(),
|
||||
UIManager.getViewManagerConfig('RCTWebView').Commands.postMessage,
|
||||
[String(data)],
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* We return an event with a bunch of fields including:
|
||||
* url, title, loading, canGoBack, canGoForward
|
||||
*/
|
||||
updateNavigationState = (event: WebViewNavigationEvent) => {
|
||||
if (this.props.onNavigationStateChange) {
|
||||
this.props.onNavigationStateChange(event.nativeEvent);
|
||||
}
|
||||
}
|
||||
|
||||
getWebViewHandle = () => {
|
||||
// eslint-disable-next-line react/no-string-refs
|
||||
return findNodeHandle(this.webViewRef.current);
|
||||
}
|
||||
|
||||
onLoadingStart = (event: WebViewNavigationEvent) => {
|
||||
const { onLoadStart } = this.props;
|
||||
if(onLoadStart) {
|
||||
onLoadStart(event);
|
||||
}
|
||||
this.updateNavigationState(event);
|
||||
}
|
||||
|
||||
onLoadingProgress = (event: WebViewProgressEvent) => {
|
||||
const { onLoadProgress } = this.props;
|
||||
if (onLoadProgress) {
|
||||
onLoadProgress(event);
|
||||
}
|
||||
};
|
||||
|
||||
onLoadingError = (event: WebViewErrorEvent) => {
|
||||
event.persist(); // persist this event because we need to store it
|
||||
const {onError, onLoadEnd} = this.props;
|
||||
if(onError) {
|
||||
onError(event);
|
||||
}
|
||||
if(onLoadEnd) {
|
||||
onLoadEnd(event);
|
||||
}
|
||||
console.error('Encountered an error loading page', event.nativeEvent);
|
||||
this.setState({
|
||||
lastErrorEvent: event.nativeEvent,
|
||||
viewState: 'ERROR',
|
||||
});
|
||||
}
|
||||
|
||||
onLoadingFinish =(event: WebViewNavigationEvent) => {
|
||||
const {onLoad, onLoadEnd} = this.props;
|
||||
if(onLoad) {
|
||||
onLoad(event);
|
||||
}
|
||||
if(onLoadEnd) {
|
||||
onLoadEnd(event);
|
||||
}
|
||||
this.setState({
|
||||
viewState: 'IDLE',
|
||||
});
|
||||
this.updateNavigationState(event);
|
||||
}
|
||||
|
||||
onMessage = (event: WebViewMessageEvent) => {
|
||||
const { onMessage } = this.props;
|
||||
if (onMessage) {
|
||||
onMessage(event);
|
||||
}
|
||||
}
|
||||
|
||||
onHttpError = (event: WebViewHttpErrorEvent) => {
|
||||
const { onHttpError } = this.props;
|
||||
if (onHttpError) {
|
||||
onHttpError(event);
|
||||
}
|
||||
}
|
||||
|
||||
render () {
|
||||
const {
|
||||
nativeConfig = {},
|
||||
onMessage,
|
||||
onShouldStartLoadWithRequest: onShouldStartLoadWithRequestProp,
|
||||
originWhitelist,
|
||||
renderError,
|
||||
renderLoading,
|
||||
style,
|
||||
containerStyle,
|
||||
...otherProps
|
||||
} = this.props;
|
||||
|
||||
let otherView = null;
|
||||
|
||||
if (this.state.viewState === 'LOADING') {
|
||||
otherView = this.props.renderLoading && this.props.renderLoading();
|
||||
} else if (this.state.viewState === 'ERROR') {
|
||||
const errorEvent = this.state.lastErrorEvent;
|
||||
otherView = this.props.renderError
|
||||
&& this.props.renderError(
|
||||
errorEvent.domain,
|
||||
errorEvent.code,
|
||||
errorEvent.description,
|
||||
);
|
||||
} else if (this.state.viewState !== 'IDLE') {
|
||||
console.error('RCTWebView invalid state encountered: ', this.state.viewState);
|
||||
}
|
||||
|
||||
const webViewStyles = [styles.container, this.props.style];
|
||||
if (
|
||||
this.state.viewState === 'LOADING'
|
||||
|| this.state.viewState === 'ERROR'
|
||||
) {
|
||||
// if we're in either LOADING or ERROR states, don't show the webView
|
||||
webViewStyles.push(styles.hidden);
|
||||
}
|
||||
|
||||
const onShouldStartLoadWithRequest = createOnShouldStartLoadWithRequest(
|
||||
()=>{},
|
||||
// casting cause it's in the default props
|
||||
originWhitelist as readonly string[],
|
||||
onShouldStartLoadWithRequestProp,
|
||||
);
|
||||
|
||||
const NativeWebView
|
||||
= (nativeConfig.component as typeof NativeWebViewWindows | undefined)
|
||||
|| RCTWebView;
|
||||
|
||||
const webView = (
|
||||
<NativeWebView
|
||||
ref={this.webViewRef}
|
||||
key="webViewKey"
|
||||
{...otherProps}
|
||||
messagingEnabled={typeof onMessage === 'function'}
|
||||
onLoadingError={this.onLoadingError}
|
||||
onLoadingFinish={this.onLoadingFinish}
|
||||
onLoadingProgress={this.onLoadingProgress}
|
||||
onLoadingStart={this.onLoadingStart}
|
||||
onHttpError={this.onHttpError}
|
||||
onMessage={this.onMessage}
|
||||
onScroll={this.props.onScroll}
|
||||
onShouldStartLoadWithRequest={onShouldStartLoadWithRequest}
|
||||
source={resolveAssetSource(this.props.source as ImageSourcePropType)}
|
||||
style={webViewStyles}
|
||||
{...nativeConfig.props}
|
||||
/>
|
||||
);
|
||||
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{webView}
|
||||
{otherView}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,204 +1,204 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29609.76
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactNativeWebView", "ReactNativeWebView\ReactNativeWebView.vcxproj", "{729D9AF8-CD9E-4427-9F6C-FB757E287729}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ReactNative", "ReactNative", "{6030669C-4F4D-4889-B38E-0299826D8C01}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra", "..\node_modules\react-native-windows\Chakra\Chakra.vcxitems", "{C38970C0-5FBF-4D69-90D8-CBAC225AE895}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "..\node_modules\react-native-windows\Common\Common.vcxproj", "{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Folly", "..\node_modules\react-native-windows\Folly\Folly.vcxproj", "{A990658C-CE31-4BCC-976F-0FC6B1AF693D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JSI.Shared", "..\node_modules\react-native-windows\JSI\Shared\JSI.Shared.vcxitems", "{0CC28589-39E4-4288-B162-97B959F8B843}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JSI.Universal", "..\node_modules\react-native-windows\JSI\Universal\JSI.Universal.vcxproj", "{A62D504A-16B8-41D2-9F19-E2E86019E5E4}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.ReactNative", "..\node_modules\react-native-windows\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj", "{F7D32BD0-2749-483E-9A0D-1635EF7E3136}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.ReactNative.Cxx", "..\node_modules\react-native-windows\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems", "{DA8B35B3-DA00-4B02-BDE6-6A397B3FD46B}"
|
||||
EndProject
|
||||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Microsoft.ReactNative.SharedManaged", "..\node_modules\react-native-windows\Microsoft.ReactNative.SharedManaged\Microsoft.ReactNative.SharedManaged.shproj", "{67A1076F-7790-4203-86EA-4402CCB5E782}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactCommon", "..\node_modules\react-native-windows\ReactCommon\ReactCommon.vcxproj", "{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactUWP", "..\node_modules\react-native-windows\ReactUWP\ReactUWP.vcxproj", "{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactWindowsCore", "..\node_modules\react-native-windows\ReactWindowsCore\ReactWindowsCore.vcxproj", "{11C084A3-A57C-4296-A679-CAC17B603144}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SharedMSBuildProjectFiles) = preSolution
|
||||
..\node_modules\react-native-windows\JSI\Shared\JSI.Shared.vcxitems*{0cc28589-39e4-4288-b162-97b959f8b843}*SharedItemsImports = 9
|
||||
..\node_modules\react-native-windows\Chakra\Chakra.vcxitems*{2d5d43d9-cffc-4c40-b4cd-02efb4e2742b}*SharedItemsImports = 4
|
||||
..\node_modules\react-native-windows\Shared\Shared.vcxitems*{2d5d43d9-cffc-4c40-b4cd-02efb4e2742b}*SharedItemsImports = 4
|
||||
..\node_modules\react-native-windows\Microsoft.ReactNative.SharedManaged\Microsoft.ReactNative.SharedManaged.projitems*{67a1076f-7790-4203-86ea-4402ccb5e782}*SharedItemsImports = 13
|
||||
..\node_modules\react-native-windows\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems*{729d9af8-cd9e-4427-9f6c-fb757e287729}*SharedItemsImports = 4
|
||||
..\node_modules\react-native-windows\JSI\Shared\JSI.Shared.vcxitems*{a62d504a-16b8-41d2-9f19-e2e86019e5e4}*SharedItemsImports = 4
|
||||
..\node_modules\react-native-windows\Chakra\Chakra.vcxitems*{c38970c0-5fbf-4d69-90d8-cbac225ae895}*SharedItemsImports = 9
|
||||
..\node_modules\react-native-windows\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems*{da8b35b3-da00-4b02-bde6-6a397b3fd46b}*SharedItemsImports = 9
|
||||
..\node_modules\react-native-windows\Chakra\Chakra.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4
|
||||
..\node_modules\react-native-windows\JSI\Shared\JSI.Shared.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4
|
||||
..\node_modules\react-native-windows\Mso\Mso.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4
|
||||
..\node_modules\react-native-windows\Shared\Shared.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|ARM64 = Debug|ARM64
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|ARM = Release|ARM
|
||||
Release|ARM64 = Release|ARM64
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{729D9AF8-CD9E-4427-9F6C-FB757E287729}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{729D9AF8-CD9E-4427-9F6C-FB757E287729}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{729D9AF8-CD9E-4427-9F6C-FB757E287729}.Debug|ARM64.ActiveCfg = Debug|Win32
|
||||
{729D9AF8-CD9E-4427-9F6C-FB757E287729}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{729D9AF8-CD9E-4427-9F6C-FB757E287729}.Debug|x64.Build.0 = Debug|x64
|
||||
{729D9AF8-CD9E-4427-9F6C-FB757E287729}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{729D9AF8-CD9E-4427-9F6C-FB757E287729}.Debug|x86.Build.0 = Debug|Win32
|
||||
{729D9AF8-CD9E-4427-9F6C-FB757E287729}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{729D9AF8-CD9E-4427-9F6C-FB757E287729}.Release|ARM.Build.0 = Release|ARM
|
||||
{729D9AF8-CD9E-4427-9F6C-FB757E287729}.Release|ARM64.ActiveCfg = Release|Win32
|
||||
{729D9AF8-CD9E-4427-9F6C-FB757E287729}.Release|x64.ActiveCfg = Release|x64
|
||||
{729D9AF8-CD9E-4427-9F6C-FB757E287729}.Release|x64.Build.0 = Release|x64
|
||||
{729D9AF8-CD9E-4427-9F6C-FB757E287729}.Release|x86.ActiveCfg = Release|Win32
|
||||
{729D9AF8-CD9E-4427-9F6C-FB757E287729}.Release|x86.Build.0 = Release|Win32
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x64.Build.0 = Debug|x64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x86.Build.0 = Debug|Win32
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM.Build.0 = Release|ARM
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x64.ActiveCfg = Release|x64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x64.Build.0 = Release|x64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x86.ActiveCfg = Release|Win32
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x86.Build.0 = Release|Win32
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x64.Build.0 = Debug|x64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x86.Build.0 = Debug|Win32
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM.Build.0 = Release|ARM
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x64.ActiveCfg = Release|x64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x64.Build.0 = Release|x64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x86.ActiveCfg = Release|Win32
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x86.Build.0 = Release|Win32
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x64.Build.0 = Debug|x64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x86.Build.0 = Debug|Win32
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM.Build.0 = Release|ARM
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x64.ActiveCfg = Release|x64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x64.Build.0 = Release|x64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x86.ActiveCfg = Release|Win32
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x86.Build.0 = Release|Win32
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x64.Build.0 = Debug|x64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x86.Build.0 = Debug|Win32
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM.Build.0 = Release|ARM
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x64.ActiveCfg = Release|x64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x64.Build.0 = Release|x64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x86.ActiveCfg = Release|Win32
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x86.Build.0 = Release|Win32
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x64.Build.0 = Debug|x64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x86.Build.0 = Debug|Win32
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM.Build.0 = Release|ARM
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x64.ActiveCfg = Release|x64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x64.Build.0 = Release|x64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x86.ActiveCfg = Release|Win32
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x86.Build.0 = Release|Win32
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Debug|x64.Build.0 = Debug|x64
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Debug|x86.Build.0 = Debug|Win32
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Release|ARM.Build.0 = Release|ARM
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Release|x64.ActiveCfg = Release|x64
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Release|x64.Build.0 = Release|x64
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Release|x86.ActiveCfg = Release|Win32
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Release|x86.Build.0 = Release|Win32
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x64.Build.0 = Debug|x64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x86.Build.0 = Debug|Win32
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM.Build.0 = Release|ARM
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|x64.ActiveCfg = Release|x64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|x64.Build.0 = Release|x64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|x86.ActiveCfg = Release|Win32
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{C38970C0-5FBF-4D69-90D8-CBAC225AE895} = {6030669C-4F4D-4889-B38E-0299826D8C01}
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D} = {6030669C-4F4D-4889-B38E-0299826D8C01}
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D} = {6030669C-4F4D-4889-B38E-0299826D8C01}
|
||||
{0CC28589-39E4-4288-B162-97B959F8B843} = {6030669C-4F4D-4889-B38E-0299826D8C01}
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4} = {6030669C-4F4D-4889-B38E-0299826D8C01}
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136} = {6030669C-4F4D-4889-B38E-0299826D8C01}
|
||||
{DA8B35B3-DA00-4B02-BDE6-6A397B3FD46B} = {6030669C-4F4D-4889-B38E-0299826D8C01}
|
||||
{67A1076F-7790-4203-86EA-4402CCB5E782} = {6030669C-4F4D-4889-B38E-0299826D8C01}
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD} = {6030669C-4F4D-4889-B38E-0299826D8C01}
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B} = {6030669C-4F4D-4889-B38E-0299826D8C01}
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144} = {6030669C-4F4D-4889-B38E-0299826D8C01}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {D1E18B0A-0D27-4F39-8A8B-7E3D784A99FC}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29609.76
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactNativeWebView", "ReactNativeWebView\ReactNativeWebView.vcxproj", "{729D9AF8-CD9E-4427-9F6C-FB757E287729}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ReactNative", "ReactNative", "{6030669C-4F4D-4889-B38E-0299826D8C01}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra", "..\node_modules\react-native-windows\Chakra\Chakra.vcxitems", "{C38970C0-5FBF-4D69-90D8-CBAC225AE895}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "..\node_modules\react-native-windows\Common\Common.vcxproj", "{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Folly", "..\node_modules\react-native-windows\Folly\Folly.vcxproj", "{A990658C-CE31-4BCC-976F-0FC6B1AF693D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JSI.Shared", "..\node_modules\react-native-windows\JSI\Shared\JSI.Shared.vcxitems", "{0CC28589-39E4-4288-B162-97B959F8B843}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JSI.Universal", "..\node_modules\react-native-windows\JSI\Universal\JSI.Universal.vcxproj", "{A62D504A-16B8-41D2-9F19-E2E86019E5E4}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.ReactNative", "..\node_modules\react-native-windows\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj", "{F7D32BD0-2749-483E-9A0D-1635EF7E3136}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.ReactNative.Cxx", "..\node_modules\react-native-windows\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems", "{DA8B35B3-DA00-4B02-BDE6-6A397B3FD46B}"
|
||||
EndProject
|
||||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Microsoft.ReactNative.SharedManaged", "..\node_modules\react-native-windows\Microsoft.ReactNative.SharedManaged\Microsoft.ReactNative.SharedManaged.shproj", "{67A1076F-7790-4203-86EA-4402CCB5E782}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactCommon", "..\node_modules\react-native-windows\ReactCommon\ReactCommon.vcxproj", "{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactUWP", "..\node_modules\react-native-windows\ReactUWP\ReactUWP.vcxproj", "{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactWindowsCore", "..\node_modules\react-native-windows\ReactWindowsCore\ReactWindowsCore.vcxproj", "{11C084A3-A57C-4296-A679-CAC17B603144}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SharedMSBuildProjectFiles) = preSolution
|
||||
..\node_modules\react-native-windows\JSI\Shared\JSI.Shared.vcxitems*{0cc28589-39e4-4288-b162-97b959f8b843}*SharedItemsImports = 9
|
||||
..\node_modules\react-native-windows\Chakra\Chakra.vcxitems*{2d5d43d9-cffc-4c40-b4cd-02efb4e2742b}*SharedItemsImports = 4
|
||||
..\node_modules\react-native-windows\Shared\Shared.vcxitems*{2d5d43d9-cffc-4c40-b4cd-02efb4e2742b}*SharedItemsImports = 4
|
||||
..\node_modules\react-native-windows\Microsoft.ReactNative.SharedManaged\Microsoft.ReactNative.SharedManaged.projitems*{67a1076f-7790-4203-86ea-4402ccb5e782}*SharedItemsImports = 13
|
||||
..\node_modules\react-native-windows\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems*{729d9af8-cd9e-4427-9f6c-fb757e287729}*SharedItemsImports = 4
|
||||
..\node_modules\react-native-windows\JSI\Shared\JSI.Shared.vcxitems*{a62d504a-16b8-41d2-9f19-e2e86019e5e4}*SharedItemsImports = 4
|
||||
..\node_modules\react-native-windows\Chakra\Chakra.vcxitems*{c38970c0-5fbf-4d69-90d8-cbac225ae895}*SharedItemsImports = 9
|
||||
..\node_modules\react-native-windows\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems*{da8b35b3-da00-4b02-bde6-6a397b3fd46b}*SharedItemsImports = 9
|
||||
..\node_modules\react-native-windows\Chakra\Chakra.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4
|
||||
..\node_modules\react-native-windows\JSI\Shared\JSI.Shared.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4
|
||||
..\node_modules\react-native-windows\Mso\Mso.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4
|
||||
..\node_modules\react-native-windows\Shared\Shared.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|ARM64 = Debug|ARM64
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|ARM = Release|ARM
|
||||
Release|ARM64 = Release|ARM64
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{729D9AF8-CD9E-4427-9F6C-FB757E287729}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{729D9AF8-CD9E-4427-9F6C-FB757E287729}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{729D9AF8-CD9E-4427-9F6C-FB757E287729}.Debug|ARM64.ActiveCfg = Debug|Win32
|
||||
{729D9AF8-CD9E-4427-9F6C-FB757E287729}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{729D9AF8-CD9E-4427-9F6C-FB757E287729}.Debug|x64.Build.0 = Debug|x64
|
||||
{729D9AF8-CD9E-4427-9F6C-FB757E287729}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{729D9AF8-CD9E-4427-9F6C-FB757E287729}.Debug|x86.Build.0 = Debug|Win32
|
||||
{729D9AF8-CD9E-4427-9F6C-FB757E287729}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{729D9AF8-CD9E-4427-9F6C-FB757E287729}.Release|ARM.Build.0 = Release|ARM
|
||||
{729D9AF8-CD9E-4427-9F6C-FB757E287729}.Release|ARM64.ActiveCfg = Release|Win32
|
||||
{729D9AF8-CD9E-4427-9F6C-FB757E287729}.Release|x64.ActiveCfg = Release|x64
|
||||
{729D9AF8-CD9E-4427-9F6C-FB757E287729}.Release|x64.Build.0 = Release|x64
|
||||
{729D9AF8-CD9E-4427-9F6C-FB757E287729}.Release|x86.ActiveCfg = Release|Win32
|
||||
{729D9AF8-CD9E-4427-9F6C-FB757E287729}.Release|x86.Build.0 = Release|Win32
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x64.Build.0 = Debug|x64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x86.Build.0 = Debug|Win32
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM.Build.0 = Release|ARM
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x64.ActiveCfg = Release|x64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x64.Build.0 = Release|x64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x86.ActiveCfg = Release|Win32
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x86.Build.0 = Release|Win32
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x64.Build.0 = Debug|x64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x86.Build.0 = Debug|Win32
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM.Build.0 = Release|ARM
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x64.ActiveCfg = Release|x64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x64.Build.0 = Release|x64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x86.ActiveCfg = Release|Win32
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x86.Build.0 = Release|Win32
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x64.Build.0 = Debug|x64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x86.Build.0 = Debug|Win32
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM.Build.0 = Release|ARM
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x64.ActiveCfg = Release|x64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x64.Build.0 = Release|x64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x86.ActiveCfg = Release|Win32
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x86.Build.0 = Release|Win32
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x64.Build.0 = Debug|x64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x86.Build.0 = Debug|Win32
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM.Build.0 = Release|ARM
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x64.ActiveCfg = Release|x64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x64.Build.0 = Release|x64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x86.ActiveCfg = Release|Win32
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x86.Build.0 = Release|Win32
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x64.Build.0 = Debug|x64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x86.Build.0 = Debug|Win32
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM.Build.0 = Release|ARM
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x64.ActiveCfg = Release|x64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x64.Build.0 = Release|x64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x86.ActiveCfg = Release|Win32
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x86.Build.0 = Release|Win32
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Debug|x64.Build.0 = Debug|x64
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Debug|x86.Build.0 = Debug|Win32
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Release|ARM.Build.0 = Release|ARM
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Release|x64.ActiveCfg = Release|x64
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Release|x64.Build.0 = Release|x64
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Release|x86.ActiveCfg = Release|Win32
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B}.Release|x86.Build.0 = Release|Win32
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x64.Build.0 = Debug|x64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x86.Build.0 = Debug|Win32
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM.Build.0 = Release|ARM
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|x64.ActiveCfg = Release|x64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|x64.Build.0 = Release|x64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|x86.ActiveCfg = Release|Win32
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{C38970C0-5FBF-4D69-90D8-CBAC225AE895} = {6030669C-4F4D-4889-B38E-0299826D8C01}
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D} = {6030669C-4F4D-4889-B38E-0299826D8C01}
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D} = {6030669C-4F4D-4889-B38E-0299826D8C01}
|
||||
{0CC28589-39E4-4288-B162-97B959F8B843} = {6030669C-4F4D-4889-B38E-0299826D8C01}
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4} = {6030669C-4F4D-4889-B38E-0299826D8C01}
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136} = {6030669C-4F4D-4889-B38E-0299826D8C01}
|
||||
{DA8B35B3-DA00-4B02-BDE6-6A397B3FD46B} = {6030669C-4F4D-4889-B38E-0299826D8C01}
|
||||
{67A1076F-7790-4203-86EA-4402CCB5E782} = {6030669C-4F4D-4889-B38E-0299826D8C01}
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD} = {6030669C-4F4D-4889-B38E-0299826D8C01}
|
||||
{2D5D43D9-CFFC-4C40-B4CD-02EFB4E2742B} = {6030669C-4F4D-4889-B38E-0299826D8C01}
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144} = {6030669C-4F4D-4889-B38E-0299826D8C01}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {D1E18B0A-0D27-4F39-8A8B-7E3D784A99FC}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets" />
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<!--
|
||||
To customize common C++/WinRT project properties:
|
||||
* right-click the project node
|
||||
* expand the Common Properties item
|
||||
* select the C++/WinRT property page
|
||||
|
||||
For more advanced scenarios, and complete documentation, please see:
|
||||
https://github.com/Microsoft/cppwinrt/tree/master/nuget
|
||||
-->
|
||||
<PropertyGroup />
|
||||
<ItemDefinitionGroup />
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets" />
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<!--
|
||||
To customize common C++/WinRT project properties:
|
||||
* right-click the project node
|
||||
* expand the Common Properties item
|
||||
* select the C++/WinRT property page
|
||||
|
||||
For more advanced scenarios, and complete documentation, please see:
|
||||
https://github.com/Microsoft/cppwinrt/tree/master/nuget
|
||||
-->
|
||||
<PropertyGroup />
|
||||
<ItemDefinitionGroup />
|
||||
</Project>
|
|
@ -1,3 +1,3 @@
|
|||
EXPORTS
|
||||
DllCanUnloadNow = WINRT_CanUnloadNow PRIVATE
|
||||
DllGetActivationFactory = WINRT_GetActivationFactory PRIVATE
|
||||
EXPORTS
|
||||
DllCanUnloadNow = WINRT_CanUnloadNow PRIVATE
|
||||
DllGetActivationFactory = WINRT_GetActivationFactory PRIVATE
|
||||
|
|
|
@ -1,33 +1,33 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Resources">
|
||||
<UniqueIdentifier>accd3aa8-1ba0-4223-9bbe-0c431709210b</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tga;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Generated Files">
|
||||
<UniqueIdentifier>{926ab91d-31b4-48c3-b9a4-e681349f27f0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="pch.cpp" />
|
||||
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
|
||||
<ClCompile Include="ReactPackageProvider.cpp" />
|
||||
<ClCompile Include="WebViewManager.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="pch.h" />
|
||||
<ClInclude Include="ReactPackageProvider.h" />
|
||||
<ClInclude Include="WebViewManager.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="ReactNativeWebView.def" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="PropertySheet.props" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Midl Include="ReactPackageProvider.idl" />
|
||||
</ItemGroup>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Resources">
|
||||
<UniqueIdentifier>accd3aa8-1ba0-4223-9bbe-0c431709210b</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tga;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Generated Files">
|
||||
<UniqueIdentifier>{926ab91d-31b4-48c3-b9a4-e681349f27f0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="pch.cpp" />
|
||||
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
|
||||
<ClCompile Include="ReactPackageProvider.cpp" />
|
||||
<ClCompile Include="WebViewManager.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="pch.h" />
|
||||
<ClInclude Include="ReactPackageProvider.h" />
|
||||
<ClInclude Include="WebViewManager.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="ReactNativeWebView.def" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="PropertySheet.props" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Midl Include="ReactPackageProvider.idl" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,160 +1,160 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.190730.2\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.190730.2\build\native\Microsoft.Windows.CppWinRT.props')" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<CppWinRTOptimized>true</CppWinRTOptimized>
|
||||
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
|
||||
<MinimalCoreWin>true</MinimalCoreWin>
|
||||
<ProjectGuid>{729d9af8-cd9e-4427-9f6c-fb757e287729}</ProjectGuid>
|
||||
<ProjectName>ReactNativeWebView</ProjectName>
|
||||
<RootNamespace>ReactNativeWebView</RootNamespace>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
|
||||
<AppContainerApplication>true</AppContainerApplication>
|
||||
<ApplicationType>Windows Store</ApplicationType>
|
||||
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
|
||||
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.18362.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformMinVersion>10.0.15063.0</WindowsTargetPlatformMinVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|ARM">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<PropertyGroup>
|
||||
<ReactNativeWindowsDir Condition="'$(ReactNativeWindowsDir)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\</ReactNativeWindowsDir>
|
||||
</PropertyGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
<Import Project="$(ReactNativeWindowsDir)\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems" Label="Shared" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="PropertySheet.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup />
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<AdditionalOptions>%(AdditionalOptions) /bigobj</AdditionalOptions>
|
||||
<!--Temporarily disable cppwinrt heap enforcement to work around xaml compiler generated std::shared_ptr use -->
|
||||
<AdditionalOptions Condition="'$(CppWinRTHeapEnforcement)'==''">/DWINRT_NO_MAKE_DETECTION %(AdditionalOptions)</AdditionalOptions>
|
||||
<DisableSpecificWarnings>28204</DisableSpecificWarnings>
|
||||
<PreprocessorDefinitions>_WINRT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateWindowsMetadata>true</GenerateWindowsMetadata>
|
||||
<ModuleDefinitionFile>ReactNativeWebView.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="ReactWebView.h">
|
||||
<DependentUpon>ReactWebView.idl</DependentUpon>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ReactWebViewManager.h" />
|
||||
<ClInclude Include="pch.h" />
|
||||
<ClInclude Include="ReactPackageProvider.h">
|
||||
<DependentUpon>ReactPackageProvider.idl</DependentUpon>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="ReactWebView.cpp">
|
||||
<DependentUpon>ReactWebView.idl</DependentUpon>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ReactWebViewManager.cpp" />
|
||||
<ClCompile Include="pch.cpp">
|
||||
<PrecompiledHeader>Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ReactPackageProvider.cpp">
|
||||
<DependentUpon>ReactPackageProvider.idl</DependentUpon>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Midl Include="ReactWebView.idl" />
|
||||
<Midl Include="ReactPackageProvider.idl" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
<None Include="ReactNativeWebView.def" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="PropertySheet.props" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="$(ReactNativeWindowsDir)\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj">
|
||||
<Project>{f7d32bd0-2749-483e-9a0d-1635ef7e3136}</Project>
|
||||
<Private>false</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.190730.2\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.190730.2\build\native\Microsoft.Windows.CppWinRT.targets')" />
|
||||
</ImportGroup>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.190730.2\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.190730.2\build\native\Microsoft.Windows.CppWinRT.props'))" />
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.190730.2\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.190730.2\build\native\Microsoft.Windows.CppWinRT.targets'))" />
|
||||
</Target>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.190730.2\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.190730.2\build\native\Microsoft.Windows.CppWinRT.props')" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<CppWinRTOptimized>true</CppWinRTOptimized>
|
||||
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
|
||||
<MinimalCoreWin>true</MinimalCoreWin>
|
||||
<ProjectGuid>{729d9af8-cd9e-4427-9f6c-fb757e287729}</ProjectGuid>
|
||||
<ProjectName>ReactNativeWebView</ProjectName>
|
||||
<RootNamespace>ReactNativeWebView</RootNamespace>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
|
||||
<AppContainerApplication>true</AppContainerApplication>
|
||||
<ApplicationType>Windows Store</ApplicationType>
|
||||
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
|
||||
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.18362.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformMinVersion>10.0.15063.0</WindowsTargetPlatformMinVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|ARM">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<PropertyGroup>
|
||||
<ReactNativeWindowsDir Condition="'$(ReactNativeWindowsDir)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\</ReactNativeWindowsDir>
|
||||
</PropertyGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
<Import Project="$(ReactNativeWindowsDir)\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems" Label="Shared" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="PropertySheet.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup />
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<AdditionalOptions>%(AdditionalOptions) /bigobj</AdditionalOptions>
|
||||
<!--Temporarily disable cppwinrt heap enforcement to work around xaml compiler generated std::shared_ptr use -->
|
||||
<AdditionalOptions Condition="'$(CppWinRTHeapEnforcement)'==''">/DWINRT_NO_MAKE_DETECTION %(AdditionalOptions)</AdditionalOptions>
|
||||
<DisableSpecificWarnings>28204</DisableSpecificWarnings>
|
||||
<PreprocessorDefinitions>_WINRT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateWindowsMetadata>true</GenerateWindowsMetadata>
|
||||
<ModuleDefinitionFile>ReactNativeWebView.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="ReactWebView.h">
|
||||
<DependentUpon>ReactWebView.idl</DependentUpon>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ReactWebViewManager.h" />
|
||||
<ClInclude Include="pch.h" />
|
||||
<ClInclude Include="ReactPackageProvider.h">
|
||||
<DependentUpon>ReactPackageProvider.idl</DependentUpon>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="ReactWebView.cpp">
|
||||
<DependentUpon>ReactWebView.idl</DependentUpon>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ReactWebViewManager.cpp" />
|
||||
<ClCompile Include="pch.cpp">
|
||||
<PrecompiledHeader>Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ReactPackageProvider.cpp">
|
||||
<DependentUpon>ReactPackageProvider.idl</DependentUpon>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Midl Include="ReactWebView.idl" />
|
||||
<Midl Include="ReactPackageProvider.idl" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
<None Include="ReactNativeWebView.def" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="PropertySheet.props" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="$(ReactNativeWindowsDir)\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj">
|
||||
<Project>{f7d32bd0-2749-483e-9a0d-1635ef7e3136}</Project>
|
||||
<Private>false</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.190730.2\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.190730.2\build\native\Microsoft.Windows.CppWinRT.targets')" />
|
||||
</ImportGroup>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.190730.2\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.190730.2\build\native\Microsoft.Windows.CppWinRT.props'))" />
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.190730.2\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.190730.2\build\native\Microsoft.Windows.CppWinRT.targets'))" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,17 +1,17 @@
|
|||
#include "pch.h"
|
||||
#include "ReactPackageProvider.h"
|
||||
#if __has_include("ReactPackageProvider.g.cpp")
|
||||
#include "ReactPackageProvider.g.cpp"
|
||||
#endif
|
||||
|
||||
#include "ReactWebViewManager.h"
|
||||
|
||||
using namespace winrt::Microsoft::ReactNative;
|
||||
|
||||
namespace winrt::ReactNativeWebView::implementation {
|
||||
|
||||
void ReactPackageProvider::CreatePackage(IReactPackageBuilder const &packageBuilder) noexcept {
|
||||
packageBuilder.AddViewManager(L"ReactWebViewManager", []() { return winrt::make<ReactWebViewManager>(); });
|
||||
}
|
||||
|
||||
} // namespace winrt::ReactNativeWebView::implementation
|
||||
#include "pch.h"
|
||||
#include "ReactPackageProvider.h"
|
||||
#if __has_include("ReactPackageProvider.g.cpp")
|
||||
#include "ReactPackageProvider.g.cpp"
|
||||
#endif
|
||||
|
||||
#include "ReactWebViewManager.h"
|
||||
|
||||
using namespace winrt::Microsoft::ReactNative;
|
||||
|
||||
namespace winrt::ReactNativeWebView::implementation {
|
||||
|
||||
void ReactPackageProvider::CreatePackage(IReactPackageBuilder const &packageBuilder) noexcept {
|
||||
packageBuilder.AddViewManager(L"ReactWebViewManager", []() { return winrt::make<ReactWebViewManager>(); });
|
||||
}
|
||||
|
||||
} // namespace winrt::ReactNativeWebView::implementation
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
#pragma once
|
||||
#include "ReactPackageProvider.g.h"
|
||||
|
||||
using namespace winrt::Microsoft::ReactNative;
|
||||
|
||||
namespace winrt::ReactNativeWebView::implementation {
|
||||
|
||||
struct ReactPackageProvider : ReactPackageProviderT<ReactPackageProvider> {
|
||||
ReactPackageProvider() = default;
|
||||
|
||||
void CreatePackage(IReactPackageBuilder const &packageBuilder) noexcept;
|
||||
};
|
||||
|
||||
} // namespace winrt::ReactNativeWebView::implementation
|
||||
|
||||
namespace winrt::ReactNativeWebView::factory_implementation {
|
||||
|
||||
struct ReactPackageProvider : ReactPackageProviderT<ReactPackageProvider, implementation::ReactPackageProvider> {};
|
||||
|
||||
} // namespace winrt::ReactNativeWebView::factory_implementation
|
||||
#pragma once
|
||||
#include "ReactPackageProvider.g.h"
|
||||
|
||||
using namespace winrt::Microsoft::ReactNative;
|
||||
|
||||
namespace winrt::ReactNativeWebView::implementation {
|
||||
|
||||
struct ReactPackageProvider : ReactPackageProviderT<ReactPackageProvider> {
|
||||
ReactPackageProvider() = default;
|
||||
|
||||
void CreatePackage(IReactPackageBuilder const &packageBuilder) noexcept;
|
||||
};
|
||||
|
||||
} // namespace winrt::ReactNativeWebView::implementation
|
||||
|
||||
namespace winrt::ReactNativeWebView::factory_implementation {
|
||||
|
||||
struct ReactPackageProvider : ReactPackageProviderT<ReactPackageProvider, implementation::ReactPackageProvider> {};
|
||||
|
||||
} // namespace winrt::ReactNativeWebView::factory_implementation
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
namespace ReactNativeWebView {
|
||||
[webhosthidden]
|
||||
[default_interface]
|
||||
runtimeclass ReactPackageProvider : Microsoft.ReactNative.IReactPackageProvider {
|
||||
ReactPackageProvider();
|
||||
};
|
||||
} // namespace ReactNativeWebView
|
||||
namespace ReactNativeWebView {
|
||||
[webhosthidden]
|
||||
[default_interface]
|
||||
runtimeclass ReactPackageProvider : Microsoft.ReactNative.IReactPackageProvider {
|
||||
ReactPackageProvider();
|
||||
};
|
||||
} // namespace ReactNativeWebView
|
||||
|
|
|
@ -1,148 +1,148 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#include "pch.h"
|
||||
#include "JSValueXaml.h"
|
||||
#include "ReactWebView.h"
|
||||
#include "ReactWebView.g.cpp"
|
||||
|
||||
namespace winrt {
|
||||
using namespace Microsoft::ReactNative;
|
||||
using namespace Windows::Data::Json;
|
||||
using namespace Windows::Foundation;
|
||||
using namespace Windows::UI;
|
||||
using namespace Windows::UI::Popups;
|
||||
using namespace Windows::UI::Xaml;
|
||||
using namespace Windows::UI::Xaml::Controls;
|
||||
using namespace Windows::UI::Xaml::Input;
|
||||
using namespace Windows::UI::Xaml::Media;
|
||||
} // namespace winrt
|
||||
|
||||
namespace winrt::ReactNativeWebView::implementation {
|
||||
|
||||
ReactWebView::ReactWebView(winrt::IReactContext const& reactContext) : m_reactContext(reactContext) {
|
||||
#ifdef CHAKRACORE_UWP
|
||||
m_webView = winrt::WebView(winrt::WebViewExecutionMode::SeparateProcess);
|
||||
#else
|
||||
m_webView = winrt::WebView();
|
||||
#endif
|
||||
RegisterEvents();
|
||||
}
|
||||
|
||||
winrt::WebView ReactWebView::GetView() {
|
||||
return m_webView;
|
||||
}
|
||||
|
||||
void ReactWebView::RegisterEvents() {
|
||||
m_navigationStartingRevoker = m_webView.NavigationStarting(
|
||||
winrt::auto_revoke, [ref = get_weak()](auto const& sender, auto const& args) {
|
||||
if (auto self = ref.get()) {
|
||||
self->OnNavigationStarting(sender, args);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
m_navigationCompletedRevoker = m_webView.NavigationCompleted(
|
||||
winrt::auto_revoke, [ref = get_weak()](auto const& sender, auto const& args) {
|
||||
if (auto self = ref.get()) {
|
||||
self->OnNavigationCompleted(sender, args);
|
||||
}
|
||||
});
|
||||
|
||||
m_navigationFailedRevoker = m_webView.NavigationFailed(
|
||||
winrt::auto_revoke, [ref = get_weak()](auto const& sender, auto const& args) {
|
||||
if (auto self = ref.get()) {
|
||||
self->OnNavigationFailed(sender, args);
|
||||
}
|
||||
});
|
||||
|
||||
m_scriptNotifyRevoker = m_webView.ScriptNotify(
|
||||
winrt::auto_revoke, [ref = get_weak()](auto const& sender, auto const& args) {
|
||||
if (auto self = ref.get()) {
|
||||
self->OnScriptNotify(sender, args);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void ReactWebView::WriteWebViewNavigationEventArg(winrt::IJSValueWriter const& eventDataWriter) {
|
||||
auto tag = m_webView.GetValue(winrt::FrameworkElement::TagProperty()).as<winrt::IPropertyValue>().GetInt64();
|
||||
WriteProperty(eventDataWriter, L"canGoBack", m_webView.CanGoBack());
|
||||
WriteProperty(eventDataWriter, L"canGoForward", m_webView.CanGoForward());
|
||||
WriteProperty(eventDataWriter, L"loading", !m_webView.IsLoaded());
|
||||
WriteProperty(eventDataWriter, L"target", tag);
|
||||
WriteProperty(eventDataWriter, L"title", m_webView.DocumentTitle());
|
||||
if (auto uri = m_webView.Source()) {
|
||||
WriteProperty(eventDataWriter, L"url", uri.AbsoluteCanonicalUri());
|
||||
}
|
||||
}
|
||||
|
||||
void ReactWebView::OnNavigationStarting(winrt::WebView const& webView, winrt::WebViewNavigationStartingEventArgs const& /*args*/) {
|
||||
m_reactContext.DispatchEvent(
|
||||
webView,
|
||||
L"topLoadingStart",
|
||||
[&](winrt::IJSValueWriter const& eventDataWriter) noexcept {
|
||||
eventDataWriter.WriteObjectBegin();
|
||||
WriteWebViewNavigationEventArg(eventDataWriter);
|
||||
eventDataWriter.WriteObjectEnd();
|
||||
});
|
||||
}
|
||||
|
||||
void ReactWebView::OnNavigationCompleted(winrt::WebView const& webView, winrt::WebViewNavigationCompletedEventArgs const& /*args*/) {
|
||||
m_reactContext.DispatchEvent(
|
||||
webView,
|
||||
L"topLoadingFinish",
|
||||
[&](winrt::IJSValueWriter const& eventDataWriter) noexcept {
|
||||
eventDataWriter.WriteObjectBegin();
|
||||
WriteWebViewNavigationEventArg(eventDataWriter);
|
||||
eventDataWriter.WriteObjectEnd();
|
||||
});
|
||||
|
||||
winrt::hstring windowAlert = L"window.alert = function (msg) {window.external.notify(`{\"type\":\"__alert\",\"message\":\"${msg}\"}`)};";
|
||||
winrt::hstring postMessage = L"window.ReactNativeWebView = {postMessage: function (data) {window.external.notify(String(data))}};";
|
||||
m_webView.InvokeScriptAsync(L"eval", { windowAlert + postMessage });
|
||||
}
|
||||
|
||||
void ReactWebView::OnNavigationFailed(winrt::IInspectable const& /*sender*/, winrt::WebViewNavigationFailedEventArgs const& args) {
|
||||
m_reactContext.DispatchEvent(
|
||||
m_webView,
|
||||
L"topLoadingError",
|
||||
[&](winrt::IJSValueWriter const& eventDataWriter) noexcept {
|
||||
auto httpCode = static_cast<int32_t>(args.WebErrorStatus());
|
||||
eventDataWriter.WriteObjectBegin();
|
||||
{
|
||||
WriteProperty(eventDataWriter, L"code", httpCode);
|
||||
WriteWebViewNavigationEventArg(eventDataWriter);
|
||||
}
|
||||
eventDataWriter.WriteObjectEnd();
|
||||
});
|
||||
}
|
||||
|
||||
void ReactWebView::OnScriptNotify(winrt::IInspectable const& /*sender*/, winrt::Windows::UI::Xaml::Controls::NotifyEventArgs const& args) {
|
||||
winrt::JsonObject jsonObject;
|
||||
if (winrt::JsonObject::TryParse(args.Value(), jsonObject) && jsonObject.HasKey(L"type")) {
|
||||
auto type = jsonObject.GetNamedString(L"type");
|
||||
if (type == L"__alert") {
|
||||
auto dialog = winrt::MessageDialog(jsonObject.GetNamedString(L"message"));
|
||||
dialog.Commands().Append(winrt::UICommand(L"OK"));
|
||||
dialog.ShowAsync();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
PostMessage(winrt::hstring(args.Value()));
|
||||
}
|
||||
|
||||
void ReactWebView::PostMessage(winrt::hstring const& message) {
|
||||
m_reactContext.DispatchEvent(
|
||||
m_webView,
|
||||
L"topMessage",
|
||||
[&](winrt::Microsoft::ReactNative::IJSValueWriter const& eventDataWriter) noexcept {
|
||||
eventDataWriter.WriteObjectBegin();
|
||||
{
|
||||
WriteProperty(eventDataWriter, L"data", message);
|
||||
}
|
||||
eventDataWriter.WriteObjectEnd();
|
||||
});
|
||||
}
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#include "pch.h"
|
||||
#include "JSValueXaml.h"
|
||||
#include "ReactWebView.h"
|
||||
#include "ReactWebView.g.cpp"
|
||||
|
||||
namespace winrt {
|
||||
using namespace Microsoft::ReactNative;
|
||||
using namespace Windows::Data::Json;
|
||||
using namespace Windows::Foundation;
|
||||
using namespace Windows::UI;
|
||||
using namespace Windows::UI::Popups;
|
||||
using namespace Windows::UI::Xaml;
|
||||
using namespace Windows::UI::Xaml::Controls;
|
||||
using namespace Windows::UI::Xaml::Input;
|
||||
using namespace Windows::UI::Xaml::Media;
|
||||
} // namespace winrt
|
||||
|
||||
namespace winrt::ReactNativeWebView::implementation {
|
||||
|
||||
ReactWebView::ReactWebView(winrt::IReactContext const& reactContext) : m_reactContext(reactContext) {
|
||||
#ifdef CHAKRACORE_UWP
|
||||
m_webView = winrt::WebView(winrt::WebViewExecutionMode::SeparateProcess);
|
||||
#else
|
||||
m_webView = winrt::WebView();
|
||||
#endif
|
||||
RegisterEvents();
|
||||
}
|
||||
|
||||
winrt::WebView ReactWebView::GetView() {
|
||||
return m_webView;
|
||||
}
|
||||
|
||||
void ReactWebView::RegisterEvents() {
|
||||
m_navigationStartingRevoker = m_webView.NavigationStarting(
|
||||
winrt::auto_revoke, [ref = get_weak()](auto const& sender, auto const& args) {
|
||||
if (auto self = ref.get()) {
|
||||
self->OnNavigationStarting(sender, args);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
m_navigationCompletedRevoker = m_webView.NavigationCompleted(
|
||||
winrt::auto_revoke, [ref = get_weak()](auto const& sender, auto const& args) {
|
||||
if (auto self = ref.get()) {
|
||||
self->OnNavigationCompleted(sender, args);
|
||||
}
|
||||
});
|
||||
|
||||
m_navigationFailedRevoker = m_webView.NavigationFailed(
|
||||
winrt::auto_revoke, [ref = get_weak()](auto const& sender, auto const& args) {
|
||||
if (auto self = ref.get()) {
|
||||
self->OnNavigationFailed(sender, args);
|
||||
}
|
||||
});
|
||||
|
||||
m_scriptNotifyRevoker = m_webView.ScriptNotify(
|
||||
winrt::auto_revoke, [ref = get_weak()](auto const& sender, auto const& args) {
|
||||
if (auto self = ref.get()) {
|
||||
self->OnScriptNotify(sender, args);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void ReactWebView::WriteWebViewNavigationEventArg(winrt::IJSValueWriter const& eventDataWriter) {
|
||||
auto tag = m_webView.GetValue(winrt::FrameworkElement::TagProperty()).as<winrt::IPropertyValue>().GetInt64();
|
||||
WriteProperty(eventDataWriter, L"canGoBack", m_webView.CanGoBack());
|
||||
WriteProperty(eventDataWriter, L"canGoForward", m_webView.CanGoForward());
|
||||
WriteProperty(eventDataWriter, L"loading", !m_webView.IsLoaded());
|
||||
WriteProperty(eventDataWriter, L"target", tag);
|
||||
WriteProperty(eventDataWriter, L"title", m_webView.DocumentTitle());
|
||||
if (auto uri = m_webView.Source()) {
|
||||
WriteProperty(eventDataWriter, L"url", uri.AbsoluteCanonicalUri());
|
||||
}
|
||||
}
|
||||
|
||||
void ReactWebView::OnNavigationStarting(winrt::WebView const& webView, winrt::WebViewNavigationStartingEventArgs const& /*args*/) {
|
||||
m_reactContext.DispatchEvent(
|
||||
webView,
|
||||
L"topLoadingStart",
|
||||
[&](winrt::IJSValueWriter const& eventDataWriter) noexcept {
|
||||
eventDataWriter.WriteObjectBegin();
|
||||
WriteWebViewNavigationEventArg(eventDataWriter);
|
||||
eventDataWriter.WriteObjectEnd();
|
||||
});
|
||||
}
|
||||
|
||||
void ReactWebView::OnNavigationCompleted(winrt::WebView const& webView, winrt::WebViewNavigationCompletedEventArgs const& /*args*/) {
|
||||
m_reactContext.DispatchEvent(
|
||||
webView,
|
||||
L"topLoadingFinish",
|
||||
[&](winrt::IJSValueWriter const& eventDataWriter) noexcept {
|
||||
eventDataWriter.WriteObjectBegin();
|
||||
WriteWebViewNavigationEventArg(eventDataWriter);
|
||||
eventDataWriter.WriteObjectEnd();
|
||||
});
|
||||
|
||||
winrt::hstring windowAlert = L"window.alert = function (msg) {window.external.notify(`{\"type\":\"__alert\",\"message\":\"${msg}\"}`)};";
|
||||
winrt::hstring postMessage = L"window.ReactNativeWebView = {postMessage: function (data) {window.external.notify(String(data))}};";
|
||||
m_webView.InvokeScriptAsync(L"eval", { windowAlert + postMessage });
|
||||
}
|
||||
|
||||
void ReactWebView::OnNavigationFailed(winrt::IInspectable const& /*sender*/, winrt::WebViewNavigationFailedEventArgs const& args) {
|
||||
m_reactContext.DispatchEvent(
|
||||
m_webView,
|
||||
L"topLoadingError",
|
||||
[&](winrt::IJSValueWriter const& eventDataWriter) noexcept {
|
||||
auto httpCode = static_cast<int32_t>(args.WebErrorStatus());
|
||||
eventDataWriter.WriteObjectBegin();
|
||||
{
|
||||
WriteProperty(eventDataWriter, L"code", httpCode);
|
||||
WriteWebViewNavigationEventArg(eventDataWriter);
|
||||
}
|
||||
eventDataWriter.WriteObjectEnd();
|
||||
});
|
||||
}
|
||||
|
||||
void ReactWebView::OnScriptNotify(winrt::IInspectable const& /*sender*/, winrt::Windows::UI::Xaml::Controls::NotifyEventArgs const& args) {
|
||||
winrt::JsonObject jsonObject;
|
||||
if (winrt::JsonObject::TryParse(args.Value(), jsonObject) && jsonObject.HasKey(L"type")) {
|
||||
auto type = jsonObject.GetNamedString(L"type");
|
||||
if (type == L"__alert") {
|
||||
auto dialog = winrt::MessageDialog(jsonObject.GetNamedString(L"message"));
|
||||
dialog.Commands().Append(winrt::UICommand(L"OK"));
|
||||
dialog.ShowAsync();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
PostMessage(winrt::hstring(args.Value()));
|
||||
}
|
||||
|
||||
void ReactWebView::PostMessage(winrt::hstring const& message) {
|
||||
m_reactContext.DispatchEvent(
|
||||
m_webView,
|
||||
L"topMessage",
|
||||
[&](winrt::Microsoft::ReactNative::IJSValueWriter const& eventDataWriter) noexcept {
|
||||
eventDataWriter.WriteObjectBegin();
|
||||
{
|
||||
WriteProperty(eventDataWriter, L"data", message);
|
||||
}
|
||||
eventDataWriter.WriteObjectEnd();
|
||||
});
|
||||
}
|
||||
|
||||
} // namespace winrt::ReactNativeWebView::implementation
|
|
@ -1,37 +1,37 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "winrt/Microsoft.ReactNative.h"
|
||||
#include "NativeModules.h"
|
||||
#include "ReactWebView.g.h"
|
||||
|
||||
namespace winrt::ReactNativeWebView::implementation {
|
||||
|
||||
class ReactWebView : public ReactWebViewT<ReactWebView> {
|
||||
public:
|
||||
ReactWebView(Microsoft::ReactNative::IReactContext const& reactContext);
|
||||
winrt::Windows::UI::Xaml::Controls::WebView GetView();
|
||||
void PostMessage(winrt::hstring const& message);
|
||||
|
||||
private:
|
||||
winrt::Windows::UI::Xaml::Controls::WebView m_webView{ nullptr };
|
||||
Microsoft::ReactNative::IReactContext m_reactContext{ nullptr };
|
||||
winrt::Windows::UI::Xaml::Controls::WebView::NavigationStarting_revoker m_navigationStartingRevoker{};
|
||||
winrt::Windows::UI::Xaml::Controls::WebView::NavigationCompleted_revoker m_navigationCompletedRevoker{};
|
||||
winrt::Windows::UI::Xaml::Controls::WebView::NavigationFailed_revoker m_navigationFailedRevoker{};
|
||||
winrt::Windows::UI::Xaml::Controls::WebView::ScriptNotify_revoker m_scriptNotifyRevoker{};
|
||||
|
||||
void RegisterEvents();
|
||||
void WriteWebViewNavigationEventArg(winrt::Microsoft::ReactNative::IJSValueWriter const& eventDataWriter);
|
||||
void OnNavigationStarting(winrt::Windows::UI::Xaml::Controls::WebView const& sender, winrt::Windows::UI::Xaml::Controls::WebViewNavigationStartingEventArgs const& args);
|
||||
void OnNavigationCompleted(winrt::Windows::UI::Xaml::Controls::WebView const& sender, winrt::Windows::UI::Xaml::Controls::WebViewNavigationCompletedEventArgs const& args);
|
||||
void OnNavigationFailed(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::UI::Xaml::Controls::WebViewNavigationFailedEventArgs const& args);
|
||||
void OnScriptNotify(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::UI::Xaml::Controls::NotifyEventArgs const& args);
|
||||
};
|
||||
} // namespace winrt::ReactNativeWebView::implementation
|
||||
|
||||
namespace winrt::ReactNativeWebView::factory_implementation {
|
||||
struct ReactWebView : ReactWebViewT<ReactWebView, implementation::ReactWebView> {};
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "winrt/Microsoft.ReactNative.h"
|
||||
#include "NativeModules.h"
|
||||
#include "ReactWebView.g.h"
|
||||
|
||||
namespace winrt::ReactNativeWebView::implementation {
|
||||
|
||||
class ReactWebView : public ReactWebViewT<ReactWebView> {
|
||||
public:
|
||||
ReactWebView(Microsoft::ReactNative::IReactContext const& reactContext);
|
||||
winrt::Windows::UI::Xaml::Controls::WebView GetView();
|
||||
void PostMessage(winrt::hstring const& message);
|
||||
|
||||
private:
|
||||
winrt::Windows::UI::Xaml::Controls::WebView m_webView{ nullptr };
|
||||
Microsoft::ReactNative::IReactContext m_reactContext{ nullptr };
|
||||
winrt::Windows::UI::Xaml::Controls::WebView::NavigationStarting_revoker m_navigationStartingRevoker{};
|
||||
winrt::Windows::UI::Xaml::Controls::WebView::NavigationCompleted_revoker m_navigationCompletedRevoker{};
|
||||
winrt::Windows::UI::Xaml::Controls::WebView::NavigationFailed_revoker m_navigationFailedRevoker{};
|
||||
winrt::Windows::UI::Xaml::Controls::WebView::ScriptNotify_revoker m_scriptNotifyRevoker{};
|
||||
|
||||
void RegisterEvents();
|
||||
void WriteWebViewNavigationEventArg(winrt::Microsoft::ReactNative::IJSValueWriter const& eventDataWriter);
|
||||
void OnNavigationStarting(winrt::Windows::UI::Xaml::Controls::WebView const& sender, winrt::Windows::UI::Xaml::Controls::WebViewNavigationStartingEventArgs const& args);
|
||||
void OnNavigationCompleted(winrt::Windows::UI::Xaml::Controls::WebView const& sender, winrt::Windows::UI::Xaml::Controls::WebViewNavigationCompletedEventArgs const& args);
|
||||
void OnNavigationFailed(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::UI::Xaml::Controls::WebViewNavigationFailedEventArgs const& args);
|
||||
void OnScriptNotify(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::UI::Xaml::Controls::NotifyEventArgs const& args);
|
||||
};
|
||||
} // namespace winrt::ReactNativeWebView::implementation
|
||||
|
||||
namespace winrt::ReactNativeWebView::factory_implementation {
|
||||
struct ReactWebView : ReactWebViewT<ReactWebView, implementation::ReactWebView> {};
|
||||
} // namespace winrt::ReactNativeWebView::factory_implementation
|
|
@ -1,8 +1,8 @@
|
|||
namespace ReactNativeWebView{
|
||||
[default_interface]
|
||||
runtimeclass ReactWebView : Windows.UI.Xaml.Controls.UserControl{
|
||||
ReactWebView(Microsoft.ReactNative.IReactContext context);
|
||||
Windows.UI.Xaml.Controls.WebView GetView();
|
||||
void PostMessage(String message);
|
||||
};
|
||||
namespace ReactNativeWebView{
|
||||
[default_interface]
|
||||
runtimeclass ReactWebView : Windows.UI.Xaml.Controls.UserControl{
|
||||
ReactWebView(Microsoft.ReactNative.IReactContext context);
|
||||
Windows.UI.Xaml.Controls.WebView GetView();
|
||||
void PostMessage(String message);
|
||||
};
|
||||
} // namespace ReactNativeWebView
|
|
@ -1,145 +1,145 @@
|
|||
#include "pch.h"
|
||||
#include "ReactWebViewManager.h"
|
||||
#include "NativeModules.h"
|
||||
#include "ReactWebView.h"
|
||||
#include "JSValueXaml.h"
|
||||
|
||||
namespace winrt {
|
||||
using namespace Microsoft::ReactNative;
|
||||
using namespace Windows::Foundation;
|
||||
using namespace Windows::Foundation::Collections;
|
||||
using namespace Windows::UI;
|
||||
using namespace Windows::UI::Xaml;
|
||||
using namespace Windows::UI::Xaml::Controls;
|
||||
}
|
||||
|
||||
namespace winrt::ReactNativeWebView::implementation {
|
||||
|
||||
ReactWebViewManager::ReactWebViewManager() {}
|
||||
|
||||
// IViewManager
|
||||
winrt::hstring ReactWebViewManager::Name() noexcept {
|
||||
return L"RCTWebView";
|
||||
}
|
||||
|
||||
winrt::FrameworkElement ReactWebViewManager::CreateView() noexcept {
|
||||
m_reactWebView = *winrt::make_self<ReactWebView>(m_reactContext);
|
||||
return m_reactWebView.GetView();
|
||||
}
|
||||
|
||||
// IViewManagerWithReactContext
|
||||
winrt::IReactContext ReactWebViewManager::ReactContext() noexcept {
|
||||
return m_reactContext;
|
||||
}
|
||||
|
||||
void ReactWebViewManager::ReactContext(IReactContext reactContext) noexcept {
|
||||
m_reactContext = reactContext;
|
||||
}
|
||||
|
||||
// IViewManagerWithNativeProperties
|
||||
IMapView<hstring, ViewManagerPropertyType> ReactWebViewManager::NativeProps() noexcept {
|
||||
auto nativeProps = winrt::single_threaded_map<hstring, ViewManagerPropertyType>();
|
||||
nativeProps.Insert(L"source", ViewManagerPropertyType::Map);
|
||||
return nativeProps.GetView();
|
||||
}
|
||||
|
||||
void ReactWebViewManager::UpdateProperties(
|
||||
FrameworkElement const& view,
|
||||
IJSValueReader const& propertyMapReader) noexcept {
|
||||
if (auto webView = view.try_as<winrt::WebView>()) {
|
||||
const JSValueObject& propertyMap = JSValueObject::ReadFrom(propertyMapReader);
|
||||
|
||||
for (auto const& pair : propertyMap) {
|
||||
auto const& propertyName = pair.first;
|
||||
auto const& propertyValue = pair.second;
|
||||
if (propertyValue.IsNull()) continue;
|
||||
|
||||
if (propertyName == "source") {
|
||||
auto const& srcMap = propertyValue.AsObject();
|
||||
if (srcMap.find("uri") != srcMap.end()) {
|
||||
auto uriString = srcMap.at("uri").AsString();
|
||||
if (uriString.length() == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
bool isPackagerAsset = false;
|
||||
if (srcMap.find("__packager_asset") != srcMap.end()) {
|
||||
isPackagerAsset = srcMap.at("__packager_asset").AsBoolean();
|
||||
}
|
||||
if (isPackagerAsset && uriString.find("file://") == 0) {
|
||||
auto bundleRootPath = winrt::to_string(ReactNativeHost().InstanceSettings().BundleRootPath());
|
||||
uriString.replace(0, 7, bundleRootPath.empty() ? "ms-appx-web:///Bundle/" : bundleRootPath);
|
||||
}
|
||||
|
||||
webView.Navigate(winrt::Uri(to_hstring(uriString)));
|
||||
}
|
||||
else if (srcMap.find("html") != srcMap.end()) {
|
||||
auto htmlString = srcMap.at("html").AsString();
|
||||
webView.NavigateToString(to_hstring(htmlString));
|
||||
}
|
||||
}
|
||||
else if (propertyName == "backgroundColor") {
|
||||
auto color = propertyValue.To<winrt::Color>();
|
||||
webView.DefaultBackgroundColor(color.A==0 ? winrt::Colors::Transparent() : color);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// IViewManagerWithExportedEventTypeConstants
|
||||
ConstantProviderDelegate ReactWebViewManager::ExportedCustomBubblingEventTypeConstants() noexcept {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ConstantProviderDelegate ReactWebViewManager::ExportedCustomDirectEventTypeConstants() noexcept {
|
||||
return [](winrt::IJSValueWriter const& constantWriter) {
|
||||
WriteCustomDirectEventTypeConstant(constantWriter, "LoadingStart");
|
||||
WriteCustomDirectEventTypeConstant(constantWriter, "LoadingFinish");
|
||||
WriteCustomDirectEventTypeConstant(constantWriter, "LoadingError");
|
||||
WriteCustomDirectEventTypeConstant(constantWriter, "Message");
|
||||
};
|
||||
}
|
||||
|
||||
// IViewManagerWithCommands
|
||||
IVectorView<hstring> ReactWebViewManager::Commands() noexcept {
|
||||
auto commands = winrt::single_threaded_vector<hstring>();
|
||||
commands.Append(L"goForward");
|
||||
commands.Append(L"goBack");
|
||||
commands.Append(L"reload");
|
||||
commands.Append(L"stopLoading");
|
||||
commands.Append(L"injectJavaScript");
|
||||
commands.Append(L"postMessage");
|
||||
return commands.GetView();
|
||||
}
|
||||
|
||||
void ReactWebViewManager::DispatchCommand(
|
||||
FrameworkElement const& view,
|
||||
winrt::hstring const& commandId,
|
||||
winrt::IJSValueReader const& commandArgsReader) noexcept {
|
||||
auto commandArgs = JSValue::ReadArrayFrom(commandArgsReader);
|
||||
if (auto webView = view.try_as<winrt::WebView>()) {
|
||||
if (commandId == L"goForward") {
|
||||
if (webView.CanGoForward()) {
|
||||
webView.GoForward();
|
||||
}
|
||||
}
|
||||
else if (commandId == L"goBack") {
|
||||
if (webView.CanGoBack()) {
|
||||
webView.GoBack();
|
||||
}
|
||||
}
|
||||
else if (commandId == L"reload") {
|
||||
webView.Refresh();
|
||||
}
|
||||
else if (commandId == L"stopLoading") {
|
||||
webView.Stop();
|
||||
}
|
||||
else if (commandId == L"injectJavaScript") {
|
||||
webView.InvokeScriptAsync(L"eval", { winrt::to_hstring(commandArgs[0].AsString()) });
|
||||
} else if(commandId == L"postMessage") {
|
||||
m_reactWebView.PostMessage(winrt::to_hstring(commandArgs[0].AsString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#include "pch.h"
|
||||
#include "ReactWebViewManager.h"
|
||||
#include "NativeModules.h"
|
||||
#include "ReactWebView.h"
|
||||
#include "JSValueXaml.h"
|
||||
|
||||
namespace winrt {
|
||||
using namespace Microsoft::ReactNative;
|
||||
using namespace Windows::Foundation;
|
||||
using namespace Windows::Foundation::Collections;
|
||||
using namespace Windows::UI;
|
||||
using namespace Windows::UI::Xaml;
|
||||
using namespace Windows::UI::Xaml::Controls;
|
||||
}
|
||||
|
||||
namespace winrt::ReactNativeWebView::implementation {
|
||||
|
||||
ReactWebViewManager::ReactWebViewManager() {}
|
||||
|
||||
// IViewManager
|
||||
winrt::hstring ReactWebViewManager::Name() noexcept {
|
||||
return L"RCTWebView";
|
||||
}
|
||||
|
||||
winrt::FrameworkElement ReactWebViewManager::CreateView() noexcept {
|
||||
m_reactWebView = *winrt::make_self<ReactWebView>(m_reactContext);
|
||||
return m_reactWebView.GetView();
|
||||
}
|
||||
|
||||
// IViewManagerWithReactContext
|
||||
winrt::IReactContext ReactWebViewManager::ReactContext() noexcept {
|
||||
return m_reactContext;
|
||||
}
|
||||
|
||||
void ReactWebViewManager::ReactContext(IReactContext reactContext) noexcept {
|
||||
m_reactContext = reactContext;
|
||||
}
|
||||
|
||||
// IViewManagerWithNativeProperties
|
||||
IMapView<hstring, ViewManagerPropertyType> ReactWebViewManager::NativeProps() noexcept {
|
||||
auto nativeProps = winrt::single_threaded_map<hstring, ViewManagerPropertyType>();
|
||||
nativeProps.Insert(L"source", ViewManagerPropertyType::Map);
|
||||
return nativeProps.GetView();
|
||||
}
|
||||
|
||||
void ReactWebViewManager::UpdateProperties(
|
||||
FrameworkElement const& view,
|
||||
IJSValueReader const& propertyMapReader) noexcept {
|
||||
if (auto webView = view.try_as<winrt::WebView>()) {
|
||||
const JSValueObject& propertyMap = JSValueObject::ReadFrom(propertyMapReader);
|
||||
|
||||
for (auto const& pair : propertyMap) {
|
||||
auto const& propertyName = pair.first;
|
||||
auto const& propertyValue = pair.second;
|
||||
if (propertyValue.IsNull()) continue;
|
||||
|
||||
if (propertyName == "source") {
|
||||
auto const& srcMap = propertyValue.AsObject();
|
||||
if (srcMap.find("uri") != srcMap.end()) {
|
||||
auto uriString = srcMap.at("uri").AsString();
|
||||
if (uriString.length() == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
bool isPackagerAsset = false;
|
||||
if (srcMap.find("__packager_asset") != srcMap.end()) {
|
||||
isPackagerAsset = srcMap.at("__packager_asset").AsBoolean();
|
||||
}
|
||||
if (isPackagerAsset && uriString.find("file://") == 0) {
|
||||
auto bundleRootPath = winrt::to_string(ReactNativeHost().InstanceSettings().BundleRootPath());
|
||||
uriString.replace(0, 7, bundleRootPath.empty() ? "ms-appx-web:///Bundle/" : bundleRootPath);
|
||||
}
|
||||
|
||||
webView.Navigate(winrt::Uri(to_hstring(uriString)));
|
||||
}
|
||||
else if (srcMap.find("html") != srcMap.end()) {
|
||||
auto htmlString = srcMap.at("html").AsString();
|
||||
webView.NavigateToString(to_hstring(htmlString));
|
||||
}
|
||||
}
|
||||
else if (propertyName == "backgroundColor") {
|
||||
auto color = propertyValue.To<winrt::Color>();
|
||||
webView.DefaultBackgroundColor(color.A==0 ? winrt::Colors::Transparent() : color);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// IViewManagerWithExportedEventTypeConstants
|
||||
ConstantProviderDelegate ReactWebViewManager::ExportedCustomBubblingEventTypeConstants() noexcept {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ConstantProviderDelegate ReactWebViewManager::ExportedCustomDirectEventTypeConstants() noexcept {
|
||||
return [](winrt::IJSValueWriter const& constantWriter) {
|
||||
WriteCustomDirectEventTypeConstant(constantWriter, "LoadingStart");
|
||||
WriteCustomDirectEventTypeConstant(constantWriter, "LoadingFinish");
|
||||
WriteCustomDirectEventTypeConstant(constantWriter, "LoadingError");
|
||||
WriteCustomDirectEventTypeConstant(constantWriter, "Message");
|
||||
};
|
||||
}
|
||||
|
||||
// IViewManagerWithCommands
|
||||
IVectorView<hstring> ReactWebViewManager::Commands() noexcept {
|
||||
auto commands = winrt::single_threaded_vector<hstring>();
|
||||
commands.Append(L"goForward");
|
||||
commands.Append(L"goBack");
|
||||
commands.Append(L"reload");
|
||||
commands.Append(L"stopLoading");
|
||||
commands.Append(L"injectJavaScript");
|
||||
commands.Append(L"postMessage");
|
||||
return commands.GetView();
|
||||
}
|
||||
|
||||
void ReactWebViewManager::DispatchCommand(
|
||||
FrameworkElement const& view,
|
||||
winrt::hstring const& commandId,
|
||||
winrt::IJSValueReader const& commandArgsReader) noexcept {
|
||||
auto commandArgs = JSValue::ReadArrayFrom(commandArgsReader);
|
||||
if (auto webView = view.try_as<winrt::WebView>()) {
|
||||
if (commandId == L"goForward") {
|
||||
if (webView.CanGoForward()) {
|
||||
webView.GoForward();
|
||||
}
|
||||
}
|
||||
else if (commandId == L"goBack") {
|
||||
if (webView.CanGoBack()) {
|
||||
webView.GoBack();
|
||||
}
|
||||
}
|
||||
else if (commandId == L"reload") {
|
||||
webView.Refresh();
|
||||
}
|
||||
else if (commandId == L"stopLoading") {
|
||||
webView.Stop();
|
||||
}
|
||||
else if (commandId == L"injectJavaScript") {
|
||||
webView.InvokeScriptAsync(L"eval", { winrt::to_hstring(commandArgs[0].AsString()) });
|
||||
} else if(commandId == L"postMessage") {
|
||||
m_reactWebView.PostMessage(winrt::to_hstring(commandArgs[0].AsString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace winrt::ReactWebView::implementation
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.Windows.CppWinRT" version="2.0.190730.2" targetFramework="native" />
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.Windows.CppWinRT" version="2.0.190730.2" targetFramework="native" />
|
||||
</packages>
|
|
@ -1 +1 @@
|
|||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
#pragma once
|
||||
|
||||
#define NOMINMAX
|
||||
#include <unknwn.h>
|
||||
#include <winrt/Windows.Data.Json.h>
|
||||
#include <winrt/Windows.Foundation.h>
|
||||
#include <winrt/Windows.Foundation.Collections.h>
|
||||
#include <winrt/Windows.UI.Popups.h>
|
||||
#include <winrt/Windows.UI.Xaml.h>
|
||||
#include <winrt/Windows.UI.Xaml.Controls.h>
|
||||
#include <winrt/Windows.UI.Xaml.Markup.h>
|
||||
#include <winrt/Windows.UI.Xaml.Navigation.h>
|
||||
#include <winrt/Microsoft.ReactNative.h>
|
||||
#pragma once
|
||||
|
||||
#define NOMINMAX
|
||||
#include <unknwn.h>
|
||||
#include <winrt/Windows.Data.Json.h>
|
||||
#include <winrt/Windows.Foundation.h>
|
||||
#include <winrt/Windows.Foundation.Collections.h>
|
||||
#include <winrt/Windows.UI.Popups.h>
|
||||
#include <winrt/Windows.UI.Xaml.h>
|
||||
#include <winrt/Windows.UI.Xaml.Controls.h>
|
||||
#include <winrt/Windows.UI.Xaml.Markup.h>
|
||||
#include <winrt/Windows.UI.Xaml.Navigation.h>
|
||||
#include <winrt/Microsoft.ReactNative.h>
|
||||
|
|
Loading…
Reference in New Issue