1P iOS Extension API: page blinks after filling login/password through the extension

Options

Hello,

I am the maker of app named Loadouts for Destiny, and I have added 1Password integration in 1.0.2. However, after invoking the extension via the standard documented call

    [[OnePasswordExtension sharedExtension] fillItemIntoWebView:self.webView forViewController:self sender:sender showOnlyLogins:YES completion:^(BOOL success, NSError *error) {
            if (!success) {
                NSLog(@"Failed to fill into webview: <%@>", error);
            }
        }];

I can see the username/password being filled in, then the page seems to reload itself quickly and everything inserted by 1P is gone.

You can verify it yourself by downloading the app and attempting to login after the launch. Is there anything I am doing wrong? The controller is a vanilla UIViewController with an embedded UIWebView.

Standard Safari.app seems to be working fine, though.

Comments

  • AGAlumB
    AGAlumB
    1Password Alumni
    edited May 2015
    Options

    @slavikus: Thanks for getting in touch. I'm sorry for the trouble! (I deleted the duplicate discussions -- just in case you get a notification and wonder why.)

    Not being a developer myself, I'm not sure what might be going wrong for you here. If you haven't already done so, be sure to check out the resources in our dev outreach portal.

    I'll pass this along to our extension dev so he can touch base with you here to help! :)

  • slavikus
    slavikus
    Community Member
    Options

    @brenty Thank you! Sorry for duplicate posts, for some reason they were posted every time I was viewing my drafts. Oops. Looking forward for the dev guys reply as I double checked and did everything as suggested on the dev outreach portal. Moreover, 1P extension works well (it does fills the password), its just the underlying webpage seems to reload itself right after 1P inserts credentials.

  • Rad
    Rad
    1Password Alumni
    edited May 2015
    Options

    Hi @slavikus,

    First of all thank you for integrating 1Password into Loadouts for Destiny and for using the updated API for filling into web views. You’re Awesome! :+1:

    I downloaded Loadouts for Destiny from the App Store and I was able to reproduce the bug that you’re describing. I also tested the PlayStation Network and the Xbox Live URLs in Mobile Safari, 1Browser and ACME Browser (our sample app which uses the exact same API that you are using). This leads me to believe that you are reloading your web view some time after the 1Password extension fills into it.

    Please make sure that you double-check all your [self.webView reload]; calls. Especially in the UIWebView delegate call backs and in viewDidAppear:. I strongly suspect that you have a [self.webView reload]; call in viewDidAppear:. Note that when the 1Password extension is dismissed your view “appears” again. If that’s the problem, try and move the [self.webView reload]; in viewDidLoad instead.

    Hope that this helps :smile:

    Have an amazing weekend!

This discussion has been closed.