Giter VIP home page Giter VIP logo

Comments (12)

casatwy avatar casatwy commented on July 4, 2024

你pod install了么?

from ctvideoplayerview.

ryokinki avatar ryokinki commented on July 4, 2024

哦,最后pod install解决了,不过由于AFN更新了,其中一些调用方法发生了变动,屏蔽了两个报红方法,播放器可以正常运行了,3q

from ctvideoplayerview.

casatwy avatar casatwy commented on July 4, 2024

不应该啊,我这边AFNetworking3.1.0,没有任何报红的方法

from ctvideoplayerview.

ryokinki avatar ryokinki commented on July 4, 2024

CTVideoManager里面, - (void)resumeDownloadWithUrl:(NSURL *)url 和 - (void)downloadWithUrl:(NSURL *)url 这两个方法,调用AFN的[self.sessionManager downloadTaskWithRequest:request
progress:^(NSProgress * _Nonnull downloadProgress) .....会报红,貌似这个progress没有回调了,sessionManager只让传递NSProgress,所以出错;

我进入sessionManager查看了下这个方法

  • (NSURLSessionDownloadTask *)downloadTaskWithRequest:(NSURLRequest *)request
    progress:(NSProgress * __autoreleasing *)progress
    destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination
    completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler;
    貌似progress不是以block的形式传入的导致错误

from ctvideoplayerview.

casatwy avatar casatwy commented on July 4, 2024

你的AFN是3.1.0的吗?

from ctvideoplayerview.

ryokinki avatar ryokinki commented on July 4, 2024

这个怎么不知道怎么查看啊,我只是用你的Profile里面的库,直接pod install的,你的里面是

Uncomment this line to define a global platform for your project

platform :ios, '9.0'

target 'CTVideoView' do

Uncomment this line if you're using Swift or would like to use dynamic frameworks

use_frameworks!

Pods for CTVideoView

pod "AFNetworking"
pod "CTPersistance"
pod "HandyFrame"

end

from ctvideoplayerview.

casatwy avatar casatwy commented on July 4, 2024

你cd进~/.cocoapods/repos/master,然后git pull origin master,然后再回项目pod update一下。

from ctvideoplayerview.

ryokinki avatar ryokinki commented on July 4, 2024

照楼主的方法做了,
为啥Podfile自动导入的是低版本的

  • AFNetworking, 2.6.1
    • CTPersistance, 0.1.11
    • HandyFrame, 1.0.2
      索性,直接在Podfile里面改为 pod 'AFNetworking', '~> 3.0'以后,用
      pod update --verbose --no-repo-update才最终保持AFN最新,pod update 没反应.
      更新后没有报错了

就是不知为啥自动导入的是低版本的...在看楼主写的RTNetworking,写的非常好.

from ctvideoplayerview.

casatwy avatar casatwy commented on July 4, 2024

你是不是在你自己的项目里面引用CTPlayerView的?你直接在CTPlayerView这个项目里面pod install呢?

from ctvideoplayerview.

ryokinki avatar ryokinki commented on July 4, 2024

是在CTVideoPlayerView项目里面,pod install的,也有可能是我pod安装的不正确,导致的.
我只是这样安装的
gem sources -a http://ruby.taobao.org/
sudo gem install cocoapods
可能安装缺少了一些步骤导致的问题

from ctvideoplayerview.

casatwy avatar casatwy commented on July 4, 2024

淘宝源已经不可用了,装cocoapods的时候gem source要换一个源。你可以网上搜一下,貌似是开源**的源。

from ctvideoplayerview.

ryokinki avatar ryokinki commented on July 4, 2024

ok

from ctvideoplayerview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.