{"action":"created","issue":{"url":"https://api.github.com/repos/AgileBits/onepassword-app-extension/issues/310","repository_url":"https://api.github.com/repos/AgileBits/onepassword-app-extension","labels_url":"https://api.github.com/repos/AgileBits/onepassword-app-extension/issues/310/labels{/name}","comments_url":"https://api.github.com/repos/AgileBits/onepassword-app-extension/issues/310/comments","events_url":"https://api.github.com/repos/AgileBits/onepassword-app-extension/issues/310/events","html_url":"https://github.com/AgileBits/onepassword-app-extension/issues/310","id":142300178,"number":310,"title":"Making param sender nullable for iPad. Support for Cordova Plugin","user":{"login":"Raphy1302","id":17412866,"avatar_url":"https://avatars.githubusercontent.com/u/17412866?v=3","gravatar_id":"","url":"https://api.github.com/users/Raphy1302","html_url":"https://github.com/Raphy1302","followers_url":"https://api.github.com/users/Raphy1302/followers","following_url":"https://api.github.com/users/Raphy1302/following{/other_user}","gists_url":"https://api.github.com/users/Raphy1302/gists{/gist_id}","starred_url":"https://api.github.com/users/Raphy1302/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Raphy1302/subscriptions","organizations_url":"https://api.github.com/users/Raphy1302/orgs","repos_url":"https://api.github.com/users/Raphy1302/repos","events_url":"https://api.github.com/users/Raphy1302/events{/privacy}","received_events_url":"https://api.github.com/users/Raphy1302/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/AgileBits/onepassword-app-extension/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-21T09:53:42Z","updated_at":"2016-03-21T13:58:34Z","closed_at":"2016-03-21T13:58:34Z","body":"I've used this app extension for building an cordova plugin. (https://github.com/SPIRIT-21/cordova-plugin-1password ). This extension simply passes the functions available in your extension to a cordova plugin. The only issue I have with it is the requirement of a sender with an iPad. In an cordova plugin the functions are not an native iOS Event so I don't have any sender object. Is there any way you could make this param nullable or is there any workaround possible?\r\n\r\nKind regards\r\nRaphael"},"comment":{"url":"https://api.github.com/repos/AgileBits/onepassword-app-extension/issues/comments/199295635","html_url":"https://github.com/AgileBits/onepassword-app-extension/issues/310#issuecomment-199295635","issue_url":"https://api.github.com/repos/AgileBits/onepassword-app-extension/issues/310","id":199295635,"user":{"login":"radazzouz","id":7443038,"avatar_url":"https://avatars.githubusercontent.com/u/7443038?v=3","gravatar_id":"","url":"https://api.github.com/users/radazzouz","html_url":"https://github.com/radazzouz","followers_url":"https://api.github.com/users/radazzouz/followers","following_url":"https://api.github.com/users/radazzouz/following{/other_user}","gists_url":"https://api.github.com/users/radazzouz/gists{/gist_id}","starred_url":"https://api.github.com/users/radazzouz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radazzouz/subscriptions","organizations_url":"https://api.github.com/users/radazzouz/orgs","repos_url":"https://api.github.com/users/radazzouz/repos","events_url":"https://api.github.com/users/radazzouz/events{/privacy}","received_events_url":"https://api.github.com/users/radazzouz/received_events","type":"User","site_admin":false},"created_at":"2016-03-21T13:58:34Z","updated_at":"2016-03-21T13:58:34Z","body":"Hi Raphael,\r\n\r\nThanks for taking the time to write in :+1: \r\n\r\nSending a `nil` sender to `findLoginForURLString:` will crash the app when running it on iPad.\r\n\r\nThe method signature allows you to pass a `nil` sender.\r\n\r\n```\r\n- (void)findLoginForURLString:(non null NSString *)URLString forViewController:(non null UIViewController *)viewController sender:(nullable id)sender completion:(nullable void (^)(NSDictionary * __nullable loginDictionary, NSError * __nullable error))completion\r\n```\r\n\r\nHowever, even if you remove the [NSAssert from `OnePasswordExtension.m` line 507](https://github.com/AgileBits/onepassword-app-extension/blob/master/OnePasswordExtension.m#L507) from your fork, it will still crash on iPad, as the `UIActivityViewController` needs a non-nil `sourceView` and `sourceRect`.\r\n\r\nI recommend that you try and send an instance of a `UIView` or even `self` (the current view controller).\r\n\r\nHope that this helps. I'll be closing this issue for now. Please feel free to join the conversion about Cordova support in issue #155.\r\n\r\nCheers!"}}