Add Windows support#522
Merged
Merged
Conversation
Adds basic Windows implementation for the module.
Owner
|
It's great, thank you. |
2 tasks
stmoy
reviewed
Jan 19, 2021
| - Open your solution in Visual Studio 2019 (eg. `windows\yourapp.sln`) | ||
| - Right-click Solution icon in Solution Explorer > Add > Existing Project... | ||
| - Add `node_modules\@react-native-community\progress-view\windows\progress-view\progress-view.vcxproj` | ||
| - If running RNW 0.62: add `node_modules\react-native-pdf\windows\RCTPdf\RCTPdf.vcxproj` |
There was a problem hiding this comment.
@bzoz @jaimecbernardo - Why is this a 0.62 note? It looks like this is required even in 0.63?
Contributor
There was a problem hiding this comment.
This action isn't needed for RNW 0.63 for RCTPdf, since auto-linking does it.
Adding the #include "winrt/RCTPdf.h" line is still needed, though, due to the existing XAML component or there'll be an error on XamlTypeInfo.g.cpp.
Manual linking is still needed for the @react-native-community/progress-view module though.
| #include <winrt/Microsoft.UI.Xaml.XamlTypeInfo.h> | ||
|
|
||
| #include "winrt/RCTPdf.h" | ||
| #include "winrt/progress_view.h" |
There was a problem hiding this comment.
This is different from the docs, which specify "progress-view" instead of "progress_view"
Contributor
There was a problem hiding this comment.
Thank you for the heads-up. Will submit a PR to fix this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds basic Windows implementation for the module, with some limitations:
sourcesupport is limited to only PDFs bundled with the app - usingms-appx://URI prefix, or from the filesystem usingfile://prefix.andstyle,enablePagingandonPageSingleTaptableContentsinonLoadCompleteThe example app was updated to RN 0.63 and works on Windows:

Edit:
enablePagingsupportonPageSingleTapsupportstylesupport