hanton / Fisheye

Open Source iOS 360 Degree Panorama Video Player. (HTY360Player is renamed to Fisheye)
MIT License
2.1k stars 432 forks source link

'Could not load NIB in bundle ... .app (loaded) with name 'HTY360PlayerVC' #21

Open hdinhof1 opened 7 years ago

hdinhof1 commented 7 years ago

Hello I have a question about integration with CocoaPods, I am getting the fatal error listed in the title every time I try to present the player.

func testHTY360Player() {

        guard let hty360Player = HTY360PlayerVC(nibName: "HTY360PlayerVC", bundle: nil, url: url)
                else { return }
        present(hty360Player, animated: true, completion: nil)

    }

Additionally I have tried to get the bundle this way. Unfortunately that gets an empty bundleURL, so you never get to the bundle.

let podBundle = Bundle(for: HTY360PlayerVC.classForCoder())
if  let bundleURL = podBundle.url(forResource: "HTY360Player", withExtension: "bundle"),
    let bundle = Bundle(url: bundleURL) {
        // ... never gets to here
}

Thank you for your consideration in advance with regards to this matter, I really appreciate it.

Best, Henry

AndreyMomot commented 6 years ago

Had the same problem. Solved it only by using it as a external library. You can find an example here: https://github.com/AnchorFreePartner/HTY360Player