4

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 Answers1

2

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.

Harish Gupta
  • 782
  • 4
  • 12
  • Yes now its working, but when we try to upload the application to the App Store we receive this warnings [link](http://goliax.com/apperror.png) We've tried this answer [link2](http://stackoverflow.com/questions/29567690/error-itms-90086-submitting-app) , but also with no success. –  Mar 13 '17 at 21:19
  • For building you will have to set Build Settings->Build Active Architecture Only to NO. Along with this set Architecture->Standard Architecture (Arm, Arm64). Once you build the framework you can check the architecture using "lipo -info YouTubePlayer.framework/YouTubePlayer" output: armv7, arm64. I have updated the framework with both 32 and 64 bit support on github – Harish Gupta Mar 14 '17 at 02:27
  • We decided with Bogdan that you deserved the bounty but I do not see any option to release (give it) to you. Do we just wait for the time to go (23 hours left at this moment) and it assigns to you or how does it work? –  Mar 18 '17 at 16:41
  • @JackGoodman Yeah. Because you already accepted the answer, i will automatically get once the time expires. Thanks !! – Harish Gupta Mar 18 '17 at 16:54
  • Got it. Thanks a lot for your help. The reason we delayed getting back to you is that despite the fact that your answer seems to helped us to solve the issue the app is still "In review" and we was just waiting for Apple to approve it so we are 100% sure but this looks like it is going to take ages. –  Mar 18 '17 at 16:57