Skip to content
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

Initializing a BellerophonManager with a UIWindow #27

Open
phillfarrugia opened this issue Dec 5, 2017 · 1 comment
Open

Initializing a BellerophonManager with a UIWindow #27

phillfarrugia opened this issue Dec 5, 2017 · 1 comment

Comments

@phillfarrugia
Copy link
Contributor

phillfarrugia commented Dec 5, 2017

Way back when there was a change made to the project which removed the sharedInstance of BellerophonManager. https://github.com/prolificinteractive/Bellerophon/pull/17/files

Previously accessing this singleton instance would take care of the attaching to the UIWindow, and creating a new UIWindow required to display it's User Interface.

I understand the motivation for this change, which was to remove the use of accessing UIKit specific methods directly, such that Bellerophon was usable within App Extensions. And I agree with the removal of the Singleton. But I believe that the public facing API for Bellerophon lost out on this change, and now the consuming application is required to initialize it's own instance of a Bellerophon Manager by passing in a UIWindow.

As a consumer of this framework I now need to handle logic that I believe is within the domain of the framework itself, and not the app like - "What if there is no key UIWindow (it's an optional property)?"

I suppose I'm asking - is there any way that we can remove this friction between the Client Application and Bellerophon, so that setup is simple, and Bellerophon takes care of these details for me?

@phillfarrugia
Copy link
Contributor Author

It also looks like the delegate method receivedError(error:) was added to BellerophonManagerDelegate but the documentation doesn't provide any additional detail about when this function is called?

/// The app is notified when a error was received.
    ///
    /// - Parameter error: The error received.
    func receivedError(error: NSError)

It would be great if we could update the documentation here. As our project is upgrading the version of Bellerophon used, and this method has since been added, but we are unable to determine how we are expected to handle this function from the headers itself - without digging into the implementation details.

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

No branches or pull requests

1 participant