测试已测试 | ✗ |
语言语言 | Obj-CObjective C |
许可证 | WTFPL |
发布最新版本 | 2014年12月 |
由 Unclaimed 维护。
依赖项 | |
ReactiveCocoa | >= 1.4.0 |
libextobjc/EXTScope | >= 0.2.5 |
BrynKit/Main | >= 1.2.1 |
BrynKit/RACHelpers | >= 1.2.1 |
BrynKit/CocoaLumberjack | >= 1.2.1 |
StateMachine-GCDThreadsafe | >= 2.0.1 |
CocoaLumberjack | >= 0 |
Facebook-iOS-SDK | >= 3.1.1 |
iOS-GTLYouTube | >= 0.0.2 |
星际级的 iOS 视频上传。
使用 CocoaPods。
在 Podfile 中
pod 'SEBeamMeUpScotty'
然后在 shell 中
$ pod install
初始化会话控制器。
SEFacebookSessionController *facebookSessionController
= [[SEFacebookSessionController alloc] initAppID:kAppID];
SEYouTubeSessionController *youtubeSessionController
= [[SEYouTubeSessionController alloc]
initWithKeychainItemName:kKeychainItemName
clientID:kYouTubeClientID
clientSecret:kYouTubeClientSecret];
准备上传控制器。
NSURL *videoFileURL = ... ;
SEFacebookUploadController *facebookUploadController
= [facebookSessionController uploadControllerForVideoFileURL: videoFileURL];
SEYouTubeUploadController *youtubeUploadController
= [youtubeSessionController uploadControllerForVideoFileURL: videoFileURL];
一些会话控制器可以从密钥链中自动登录(如果用户之前已登录)。其他则不能。
assert(facebookSessionController.isSignedIn == YES or NO);
assert(youtubeSessionController.isSignedIn == NO);
使用 ReactiveCocoa 来观测您需要响应的属性。
// disable the upload button when the user is signed out
RAC(self.uploadButton.enabled) =
RACAbleWithStart(facebookSessionController, isSignedIn);
// dim the upload button when the user is signed out
RAC(self.uploadButton.alpha) =
[RACAbleWithStart(facebookSessionController, isSignedIn)
map:^id (NSNumber *isSignedIn) {
if (isSignedIn.boolValue == YES)
return @1.0f;
else
return @0.4f
}];
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <[email protected]>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.