前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >iOS VLC Swift 版 : 使用 cocoapods 集成 MobileVLCKit-3.3.2

iOS VLC Swift 版 : 使用 cocoapods 集成 MobileVLCKit-3.3.2

作者头像
iOSDevLog
发布2019-07-18 16:36:30
1.7K0
发布2019-07-18 16:36:30
举报
文章被收录于专栏:iOSDevLogiOSDevLog

screenshot

swift-vlc.png

https://www.videolan.org/vlc/download-ios.html

Binary

You can also get the binary from our servers instead of the App Store: [VLC for iOS 3.1.5 binary](http://get.videolan.org/vlc-iOS/3.1.5/vlc-ios-3.1.5.ipa). A binary version of MobileVLCKit is available through CocoaPods.

创建 VLC 项目

代码语言:javascript
复制
pod init
cat Podfile
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

target 'VLC' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for VLC
  pod 'MobileVLCKit'

end

更新 pod

代码语言:javascript
复制
pod repo update

安装 MobileVLCKit

代码语言:javascript
复制
pod install --verbose

下载实在太慢了

代码语言:javascript
复制
cat ~/.cocoapods/repos/master/Specs/b/f/7/MobileVLCKit/3.3.2/MobileVLCKit.podspec.json | grep http
...
     "http": "https://download.videolan.org/pub/cocoapods/prod/MobileVLCKit-3.3.2-e16829a-774a96ae6.tar.xz",

Motrix 下载上面的 MobileVLCKit-3.3.2-***.tar.xz

更换 http 地址,进入下载好的地址

启动 Python3 Http Server

代码语言:javascript
复制
python3 -m http.server 80

更换 http 地址为本地地址

代码语言:javascript
复制
diff --git a/Specs/b/f/7/MobileVLCKit/3.3.2/MobileVLCKit.podspec.json b/Specs/b/f/7/MobileVLCKit/3.3.2/MobileVLCKit.podspec.json
index e6f4d118c5f..d3b15240c40 100644
--- a/Specs/b/f/7/MobileVLCKit/3.3.2/MobileVLCKit.podspec.json
+++ b/Specs/b/f/7/MobileVLCKit/3.3.2/MobileVLCKit.podspec.json
@@ -59,7 +59,7 @@
     "Benjamin Adolphi": "b.adolphi@gmail.com"
   },
   "source": {
-    "http": "https://download.videolan.org/pub/cocoapods/prod/MobileVLCKit-3.3.2-e16829a-774a96ae6.tar.xz",
+    "http": "http://127.0.0.1/MobileVLCKit-3.3.2-e16829a-774a96ae6.tar.xz",
     "sha256": "143877baa4e362b673c324d5319983a6023f9ed769c3b045fd49fd5efa53ec0c"
   },
   "ios": {
(END)

重新安装

代码语言:javascript
复制
pod install --verbose

终于安装成功了!

使用

添加 Project-Bridge-Header.h 头文件

这里的是 VLC-Bridge-Header.h

  1. 添加 VLC-Bridge-Header.h -> "#import "MobileVLCKit/MobileVLCKit.h""
  2. Build Settings -> Objective-C Bridging Header -> "VLC/VLC-Bridge-Header.h"

源码:https://github.com/iOSDevLog/VLC-iOS

AIDevLog

License

iOSDevLog.github.io is released under the MIT license. See LICENSE for details.

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2019.07.16 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • screenshot
  • Binary
  • 创建 VLC 项目
    • 更新 pod
      • 安装 MobileVLCKit
        • 下载实在太慢了
          • 用 Motrix 下载上面的 MobileVLCKit-3.3.2-***.tar.xz
          • 更换 http 地址,进入下载好的地址
            • 启动 Python3 Http Server
              • 更换 http 地址为本地地址
                • 重新安装
                • 使用
                  • 添加 Project-Bridge-Header.h 头文件
                  • 源码:https://github.com/iOSDevLog/VLC-iOS
                  • License
                  领券
                  问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档