-
Notifications
You must be signed in to change notification settings - Fork 577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Windows support #522
Add Windows support #522
Conversation
Adds basic Windows implementation for the module.
It's great, thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jaimecbernardo for FYI
- 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bzoz @jaimecbernardo - Why is this a 0.62 note? It looks like this is required even in 0.63?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is different from the docs, which specify "progress-view" instead of "progress_view"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the heads-up. Will submit a PR to fix this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there's PR open already: #532
Adds basic Windows implementation for the module, with some limitations:
source
support is limited to only PDFs bundled with the app - usingms-appx://
URI prefix, or from the filesystem usingfile://
prefix.andstyle
,enablePaging
andonPageSingleTap
tableContents
inonLoadComplete
The example app was updated to RN 0.63 and works on Windows:

Edit:
enablePaging
supportonPageSingleTap
supportstyle
support