Closed mikeKane closed 7 years ago
Hi @mikeKane
I see you closed this, were you able to figure out what was happening or do you still need assistance?
@gks Thanks for responding. Using cocoapods this was not fixed. However manually dragging the .h and .m from the readme worked.
I do have some more questions but did not want to flood the issues area.
Hi @mikeKane No worries, happy to help here since this is already started. Or you can email in if you prefer: support+appex@agilebits.com
I will change to email. Thank you very much so far.
I am attempting to implement the onepassword extension to fill in a WKWebview on iOS10.1, however the code provided does not call the share sheet to appear. The extension says its available and I'm using cocoapads to install.
I made a test project just to be sure there were no other factors. I loaded the test project with the same code using a UIWebview and it worked great, when I switched the UIWebView to a WKWebview it stopped working. Any idea's?
Xcode 8.1 Min Target iOS 9 Device 7+
Test Project Provided onepasswordTest.zip
Update on debugging. It is showing the below method does not exist:
[self fillItemIntoWKWebView:webView forViewController:viewController sender:(id)sender showOnlyLogins:yesOrNo completion:^(BOOL success, NSError *error)]
If I change the the method:
[[OnePasswordExtension sharedExtension] fillItemIntoWebView:_wkWebView forViewController:self sender:sender showOnlyLogins:YES completion:^(BOOL success, NSError *error)]
to the code below and manually add:
[self fillItemIntoWKWebView:webView forViewController:viewController sender:(id)sender showOnlyLogins:yesOrNo completion:^(BOOL success, NSError *error)]
the share sheet finally appears.
pragma mark - Web View filling Support
//#ifdef IPHONE_8_0 if ([webView isKindOfClass:[UIWebView class]]) { [self fillItemIntoUIWebView:webView webViewController:viewController sender:(id)sender showOnlyLogins:yesOrNo completion:^(BOOL success, NSError *error) { if (completion) { completion(success, error); } }]; } //#if IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0 || ONE_PASSWORD_EXTENSION_ENABLE_WK_WEB_VIEW else if ([webView isKindOfClass:[WKWebView class]]) { [self fillItemIntoWKWebView:webView forViewController:viewController sender:(id)sender showOnlyLogins:yesOrNo completion:^(BOOL success, NSError *error) { if (completion) { completion(success, error); } }]; } // #endif //#endif }