Skip to content

Commit b17c930

Browse files
authored
Update instructions for custom application. (#154)
After updating to `react-native-windows` 0.54.0 windows now links correctly. Therefore some updates to the instructions could be made. Also we now advise to set the minimum target to `15063` keep in line with the SDK.
1 parent a848177 commit b17c930

File tree

2 files changed

+18
-30
lines changed

2 files changed

+18
-30
lines changed

README.md

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -651,24 +651,22 @@ Let's create a simple app that integrates PSPDFKit and uses the react-native-psp
651651
2. Make sure `react-native-cli` is installed: `yarn global add react-native-cli`.
652652
3. Install Windows Tool for React Native: `yarn add global windows-build-tools`.
653653
4. Open `x64 Native Tools Command Prompt for VS 2017` program.
654-
5. Create the app with `react-native init --version=0.53.0 YourApp` in a location of your choice.
654+
5. Create the app with `react-native init --version=0.55.4 YourApp` in a location of your choice.
655655
6. Step into your newly created app folder: `cd YourApp`.
656656
7. Install the Windows helper plugin: `yarn add --dev rnpm-plugin-windows`.
657657
8. Install `react-native-pspdfkit` from GitHub: `yarn add github:PSPDFKit/react-native`.
658-
9. Install all modules for Windows: `yarn install`. (Because of a [bug](https://github.com/yarnpkg/yarn/issues/2165) you may need to clean `yarn`'s cache with `yarn cache clean` before.)
659-
10. Link module `react-native-pspdfkit`: `react-native link react-native-pspdfkit`. (Note: On windows yarn does not link correctly, therefore any chages made in the ReactNativePSPDFKit project will have to be manually copied to the `windows` folder at the base of the repo in order to commit changes.)
658+
9. Install `react-native-fs` from GitHub: `yarn add react-native-fs`.
659+
10. Install all modules for Windows: `yarn install`. (Because of a [bug](https://github.com/yarnpkg/yarn/issues/2165) you may need to clean `yarn`'s cache with `yarn cache clean` before.)
660660
11. Initialize the windows project: `react-native windows`.
661-
12. Open the Visual Studio solution in `react-native\YourApp\windows`.
662-
13. Accept and install any required extensions when prompted.
663-
14. If the settings window opens, click on `Developer` and select `yes`.
664-
15. Add `react-native-pspdfkit` to your soloution: Right click on the solution -> Add -> Existing Project.
665-
Navigate to `node_modules/react-native-pspdfkit/windows/ReactNativePSPDFKit/ReactNativePSPDFKit/` and select the `ReactNativePSPDFKit.csproj`
666-
![Deployment Target](screenshots/windowsAddExistingProject.PNG)
667-
16. Mark `react-native-pspdfkit`, `PSPDFKit SDK` and `Visual C++ Runtime` as dependancies for `YourApp`:
661+
12. Link module `react-native-pspdfkit`: `react-native link react-native-pspdfkit`.
662+
13. Open the Visual Studio solution in `react-native\YourApp\windows`.
663+
14. Accept and install any required extensions when prompted.
664+
15. If the settings window opens, click on `Developer` and select `yes`.
665+
16. Mark `PSPDFKit SDK` and `Visual C++ Runtime` as dependencies for `YourApp`:
668666
Right click on `YourApp` -> Add -> Refererece... Click on Projects and tick `ReactNativePSPDFKit`. Click on Universal Windows -> Extensions and tick `PSPDFKit for UWP` and `Visual C++ 2015 Runtime for Universal Windows Platform Apps` then click ok.
669667
![Deployment Target](screenshots/windowsAddReferences.PNG)
670668
![Deployment Target](screenshots/windowsSelectRNPSPDFKit.PNG)
671-
![Deployment Target](screenshots/windowsSelectPSPDFKit+UWP.PNG)
669+
![Deployment Target]
672670
17. Add an application resource to your `Appl.xaml` to reference your License key.
673671
674672
```diff
@@ -690,7 +688,7 @@ Let's create a simple app that integrates PSPDFKit and uses the react-native-psp
690688
</rn:ReactApplication>
691689
```
692690
693-
18. Create a new file resouce called `License.xaml` with your PSPDFKit license key at the top level of the
691+
18. Create a new file resource called `License.xaml` with your PSPDFKit license key at the top level of the
694692
project. (Replace `ENTER LICENSE KEY HERE` with your key)
695693
696694
```xaml
@@ -703,22 +701,11 @@ Let's create a simple app that integrates PSPDFKit and uses the react-native-psp
703701
</ResourceDictionary>
704702
```
705703
706-
19. Add `react-native-pspdfkit` to `YourApp` package list: open
707-
`MainReactNativeHost.cs` in `YourApp` project and add the following line.
708-
709-
```diff
710-
protected override List<IReactPackage> Packages => new List<IReactPackage>
711-
{
712-
new MainReactPackage(),
713-
+ new ReactNativePSPDFKit.PSPDFKitPackage()
714-
};
715-
```
716-
717-
20. Change the target SDK of YourApp to >= 10.0.16299 : Right Click on YourApp -> Properties. Go to
718-
Application and change Target Version to >= 10.0.16299.
704+
19. Change the target SDK of YourApp to >= 10.0.16299 and Min Version to >= 10.0.15063 : Right Click on YourApp -> Properties. Go to
705+
Application and change Target Version to >= 10.0.16299 and change Min Version to >= 10.0.15063.
719706
![Development Target](screenshots/changeVersionSDK.png)
720-
21. Save Changes: File -> Save All
721-
22. Add the `PSPDFKitView` and `PSPDFKit` module into your `App.windows.js` file, and add a open button to allow the user
707+
20. Save Changes: File -> Save All
708+
21. Add the `PSPDFKitView` and `PSPDFKit` module into your `App.windows.js` file, and add a open button to allow the user
722709
to navigate the file system.
723710
724711
```javascript
@@ -782,9 +769,9 @@ var styles = StyleSheet.create({
782769
});
783770
```
784771
785-
23. Now run the application on the command line: `react-native run-windows`.
786-
24. Press Yes when PowerShell wants to run.
787-
25. Type 'y' when asking if you want to install the certificate.
772+
22. Now run the application on the command line: `react-native run-windows`.
773+
23. Press Yes when PowerShell wants to run.
774+
24. Type 'y' when asking if you want to install the certificate.
788775
789776
#### Running Catalog Project
790777
@@ -809,6 +796,7 @@ var styles = StyleSheet.create({
809796
810797
9. From the command prompt run `react-native run-windows`.
811798
10. Enter `y` to accept the certificate when prompted and allow socket access for reactive when prompted.
799+
(Note: On windows yarn does not link correctly, therefore any changes made in the ReactNativePSPDFKit project will have to be manually copied to the `windows` folder at the base of the repo in order to commit changes.)
812800
813801
#### API
814802
-19.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)