XCode 8.2.1 error - No such module YouTubePlayer

2019-05-07 04:06发布

I am using https://github.com/gilesvangruisen/Swift-YouTube-Player

First I've tried to import it manually from everywhere include dropping, copyng, embed framewordks, embedded binaries, linked frameworks, but it was unsuccessfully with error message No such module YouTubePlayer

Next I used cocoapods. Install it and run it from .xcworkspace. Then try to run it and again error message No such module YoutubePlayer

This is list tree directories after pod install

errors

Maybe this is the solution, but I don't know where is repo and how to do the described action. https://github.com/gilesvangruisen/Swift-YouTube-Player/issues/42

1条回答
Bombasti
2楼-- · 2019-05-07 04:42

The reason why its failing with cocoapod is because the pod written is in old swift version. So, unless until we don't compile the pod successfully, we can't import that. You can change the old swift code to new using :

Xcode->Edit->Convert->To Current Swift Syntax

Also you can use the latest release and build the framework from the repo you mentioned: https://github.com/gilesvangruisen/Swift-YouTube-Player

I downloaded the latest release and created the youTubePlayer framework and linked it to a sample app and able to import it.

Please check this link for the sample app which is having YouTubePlayer framework as well which you can use in your own project.

查看更多
登录 后发表回答