Skip to content

Conversation

sjchmiela
Copy link
Contributor

@sjchmiela sjchmiela commented Sep 9, 2019

Why

Otherwise Apple may reject our apps.

How

Reimplemented expo-print functionality using WKWebView.

x-ref: expo/react-native#17

Test Plan

NCL Print screen looks ok.

@sjchmiela sjchmiela requested review from tsapeta and ide September 9, 2019 13:50
@sjchmiela sjchmiela marked this pull request as ready for review September 9, 2019 13:50
@sjchmiela sjchmiela force-pushed the @sjchmiela/remove_uiwebview branch from 1c159f1 to afb5b6b Compare September 9, 2019 13:53
Copy link
Member

@ide ide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving so we can start versioning and cut the release branch but left some comments for requested changes.

[window addSubview:_containerView];

UM_WEAKIFY(self);
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this delay waiting for? Is it something we can wait for explicitly rather than hoping that 100ms is correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't find a better way to trigger WKWebView's rendering. Without the delay the only things that are rendered are divs, no text.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sjchmiela sjchmiela force-pushed the @sjchmiela/remove_uiwebview branch from afb5b6b to bd05e1e Compare September 10, 2019 10:08
@sjchmiela sjchmiela merged commit 064af40 into master Sep 10, 2019
@sjchmiela sjchmiela deleted the @sjchmiela/remove_uiwebview branch September 10, 2019 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants