Giter Club home page Giter Club logo

vimeonetworking's Introduction

⚠️⚠️⚠️ This library has been deprecated and will be removed in the future. ⚠️⚠️⚠️

VimeoNetworking

VimeoNetworking is the authoritative Swift networking library for the Vimeo API. Fully designed and implemented with Swift in mind, VimeoNetworking is type-safe, well enumerated, and never, ever, ever force-unwrapped.

Hey Creator, if you're primarily interested in uploading videos to Vimeo, you should also check out VimeoUpload.

Supported Platforms

  • iOS (8.0+)
  • tvOS (9.0+)

Installing

Cocoapods

To get started add the following to your Podfile:

use_frameworks!

target 'YourTarget' do
    pod 'VimeoNetworking'
end

Carthage

Add the following to your Cartfile:

github "vimeo/VimeoNetworking"

You can optionally specify a version number, or point directly to our develop branch. Note that breaking changes may be introduced into develop at any time, but those changes will always be behind a major or minor release version number.

Initialization

The first step towards using the Vimeo API is registering a new application on the Vimeo Developer site: My API Apps. You'll need a Vimeo account, if you don't already have one.

App Configuration

Once you have a new app set up, click into its authentication settings and make note of the "Client Identifier" and "Client Secret" fields. Next, determine which Scope permissions your application requires from the available options listed here: Supported Scopes. Use this information to instantiate a new AppConfiguration value:

let appConfiguration = AppConfiguration(
		clientIdentifier: "Your client identifier goes here",
		clientSecret: "Your client secret goes here",
		scope: [.Public, .Private, .Interact] //replace with your scopes)

Client

To interact with the Vimeo API, we use a VimeoClient instance. The client is the primary interface of VimeoNetworking, it takes care of executing requests, cache storage and retrieval, tracking the current authenticated account, and handling global error conditions. You can instantiate one with the application configuration you created a moment ago.

let vimeoClient = VimeoClient(configuration: appConfiguration)

Authenticating

Before we can actually start getting meaningful data from the API, there's one last step: authentication. AuthenticationController handles and simplifies this process. It uses the configuration of an associated VimeoClient to make requests. On successful authentication, it passes the new Vimeo account back to this client, and that client can then make requests to API endpoints. There are two ways to authenticate: Client Credentials grant and Code grant, detailed below:

Client Credentials

Client credentials allow you to see everything that's publicly available on Vimeo. This is essentially equivalent to visiting Vimeo.com without signing up for an account or logging in. This is the simplest authentication method to implement, just one function completes the grant.

let authenticationController = AuthenticationController(client: vimeoClient)

authenticationController.clientCredentialsGrant { result in
	switch result {
	case .Success(let account):
		print("Successfully authenticated with account: \(account)")
	case .Failure(let error):
		print("error authenticating: \(error)")
	}
}

Code Grant

If you want to log in as a user, the Vimeo API provides a process called Code Grant authentication. This is a bit more involved than a client credentials grant, but it gives your application the benefit of making requests on behalf of a Vimeo user, and viewing their personal content.

To authenticate via code grant, your app launches a specific URL in Safari. The user signs up or logs in on Vimeo.com, and chooses which permissions to grant. Then, control is redirected back to your application where authentication completes.

To prepare your application to receive this redirect, navigate to your app's target's settings > Info > URL Types. Add a new URL Type, and under url scheme enter vimeo followed by your client identifier (for example, if your client identifier is 1234, enter vimeo1234). You also need to add this redirect URL to your app on the Vimeo API site. Under “App Callback URL”, add vimeo{CLIENT_IDENTIFIER}://auth (for the example above, vimeo1234://auth).

Now, in an appropriate place in your app, open the code grant authorization URL in Safari:

let authenticationController = AuthenticationController(client: vimeoClient)

let URL = authenticationController.codeGrantAuthorizationURL()
UIApplication.sharedApplication.openURL(URL)

The user will be prompted to log in and grant permissions to your application. When they accept, your redirect URL will be opened, which will reopen your application. Handle this event in your application delegate:

func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool
    {
        authenticationController.codeGrant(responseURL: url) { result in
            switch result
            {
            case .Success(let account):
                print("authenticated successfully: \(account)")
            case .Failure(let error):
                print("failure authenticating: \(error)")
            }
        }

        return true
    }

Lightweight Use

If you want to use your own OAuth token, for example a contant token generated for your API's application, you can circumvent code grant authorization mechanisms and use the accessToken function of AuthenticationController.

let authenticationController = AuthenticationController(client: vimeoClient)
authenticationController.accessToken("your_access_tocken") { result in
    switch result
    {
        case .Success(let account):
            print("authenticated successfully: \(account)")
        case .Failure(let error):
           print("failure authenticating: \(error)")
    }
}

Saved Accounts

AuthenticationController saves the accounts it successfully authenticates in the Keychain. The next time your application launches, you should first attempt to load a previously authenticated account before prompting the user to authenticate.

do
{
	if let account = try authenticationController.loadSavedAccount()
	{
		print("account loaded successfully: \(account)"
	}
	else
	{
		print("no saved account found, authenticate...")
	}
}
catch let error
{
	print("error loading account: \(error)")
}

Interacting with Vimeo

You're initialized, you're configured, you're authenticated. Now you're ready to rock! Let's start hitting some endpoints. 🤘

Constructing Requests

We represent each interaction with the Vimeo API as an instance of Request. Each one holds its own understanding of HTTP method, URL path, parameters (if any), expected model object type, caching behavior, and (if desired) retry-after-failure behavior. That's a lot to grasp up front, so let's step back and look at the simplest request we can make, a single video:

let videoRequest = Request<VIMVideo>(path: "/videos/45196609")

There are two critical takeaways here:

  • <VIMVideo>: the generic type of the model object. This is what the request will return in the Response if it's successful.
  • path: "...": the API endpoint we want to call, you can see a whole host of other options at Vimeo API Endpoints

By declaring the expected model object type, we can ensure that both the request and the parsing of the JSON is successful, and we can guarantee that our Response precisely matches this expectation. All potential Vimeo models are already implemented in VimeoNetworking, and they're available for use in your own implementation. Model classes are all named with the VIM prefix: VIMUser, VIMChannel, VIMCategory, and so on.

Sending Requests and Handling Responses

After we send that request, we'll get a Result enum back. This could be either a .Success or a .Failure value. .Success will contain a Response object, while .Failure will contain an NSError. Switch between these two cases to handle whichever is encountered:

vimeoClient.request(videoRequest) { result in
	switch result {
	case .Success(let response: Response):
		let video: VIMVideo = response.model
		print("retrieved video: \(video)")
	case .Failure(let error: NSError):
		print("error retrieving video: \(error)"
	}
}

Collections

One neat ProTip: Your Request model type doesn't just have to be a single model object, you can also specify an array with a model object element type, like [VIMVideo]. When you do so, the model property of your Response will be an array of the same type. Note that API requests that return multiple objects like this are often paginated, see documentation on the Response class for tips on how to request additional pages of content.

let staffPickedVideosRequest = Request<[VIMVideo]>(path: "/channels/staffpicks/videos")

vimeoClient.request(staffPickedVideosRequest) { result in
	switch result
	{
	case .Success(let response: Response):
		let videos: [VIMVideo] = response.model
		for video in videos
		{
			print("retrieved video: \(video)")
		}
	case .Failure(let error: NSError):
		print("error retrieving videos: \(error)"
	}
}

Last remarks

With all that said, you now have a pretty solid understanding of what VimeoNetworking can do. There's always more to explore, and we encourage you to play with the sample project, or dive right into the code and try it out yourself. Most of our classes and functions are decently documented in the source files, so more detail on any topic can be found there. If you still have questions or you're running into trouble, feel free to file an issue. Better yet, if you fixed an issue or you have an improvement you'd like to share, send us a pull request.

VimeoNetworking is available under the MIT license, see the LICENSE file for more info.

Thanks for reading, Happy Swifting!

Questions?

Tweet at us here: @vimeoeng. Post on Stackoverflow with the tag vimeo-ios. Get in touch here. Interested in working at Vimeo? We're hiring!

vimeonetworking's People

Contributors

addisonbean avatar alfiehanssen avatar antonklevets avatar asongvimeo avatar bryantjustin avatar fyell avatar ghking avatar huebnerob avatar jasonhawkins avatar jenniferlim avatar jumhyn avatar lironxyz avatar mikew-personal avatar nicolasabric avatar nicolelehrer avatar sof4real avatar supperspidey avatar tagabat avatar tomcarey avatar wilrnh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vimeonetworking's Issues

Full url to video is broken in the latest versions. Pro account.

This problem has already been opened many times, but looks like it is not resolved yet!

We want to get full url to video files, but in the last versions we cannot do this - "files" array is empty in the received object.
We can get files array not empty only in version 3.1.0. Any version newer than that returns nil.
New version 3.3.1 has been released recently. But the fields array is still nil.

We have a paid Pro account.
We have created tokens after subscribing to Pro.
We have recreated tokens later.

Steps to reproduce:

Create Single View App project.
Clone VimeoNetworking to project directory:
git clone https://github.com/vimeo/VimeoNetworking
Add to Podfile pod, referencing VimeoNetworking from folder (due to version 3.1.0 is not available in CocoaPods repository):
pod 'VimeoNetworking', :path => './VimeoNetworking'"
Install pods:
pod install

Add this file to project:
`import Foundation
import VimeoNetworking

class VimeoService {
static let shared = VimeoService()

private let appConfiguration: AppConfiguration
private let vimeoClient: VimeoClient

private init() {
    appConfiguration = AppConfiguration(
        clientIdentifier: VimeoKeys.clientId,
        clientSecret: VimeoKeys.clientSecret,
        scopes: [.Private],
        keychainService: "\(Bundle.main.bundleIdentifier ?? "").vimeoKeychainService")
    
    vimeoClient = VimeoClient(appConfiguration: appConfiguration)
}

func test() {
    auth {
        self.request(videoId: VimeoKeys.testVideoId, completion: { (vimVideo) in
            print(vimVideo.files)
            print()
        })
    }
}

func auth(completion: @escaping () -> Void) {
    let authController = AuthenticationController(client: vimeoClient, appConfiguration: appConfiguration)
    
    authController.accessToken(token: VimeoKeys.token) { (result) in
        switch result {
        case .success(let account):
            assert(account.user?.accountType == VIMUserAccountType.pro)
            completion()
        case .failure(let nsError):
            print(nsError)
        }
    }
}

func request(videoId: String, completion: @escaping (VIMVideo) -> Void) {
    let videoRequest = VideoRequest(path: "/videos/\(videoId)")
    let _ = vimeoClient.request(videoRequest) { (result) in
        switch result {
        case .success(let response):
            completion(response.model)
        case .failure(let nsError):
            print(nsError)
        }
    }
}

}`

Add file with keys, which looks like this one:
enum VimeoKeys { static let testVideoId = "<videoId>" static let token = "<your token>" static let clientId = "<your client id>" static let clientSecret = "<your client secret>" }

Call VimeoService.shared.test() in AppDelegate didFinishLaunchingWithOptions method.

Set 3.3.1 version:
cd VimeoNetworking
git checkout 3.3.1
cd ..
pod install

Build and run the App
vimVideo.files will be nil

Set 3.1.0 version:
cd VimeoNetworking
git checkout 3.1.0
cd ..
pod install

Build and run the App (you may need to Clean Build Folder and Derived Data)
vimVideo.files will have some VIMVideoFile objects, every contains the "link" property with full url to video file for streaming.

Swift 3.2 / 4.0

Can you please update us on plans to support Swift 3.2 or Swift 4 so that we are able to use Vimeo on Xcode 9.

Can't access to "files" array in response /video/\(id)

Hi.
I need to implement Vimeo's videos playback functionality in my application.
Vimeo account: "live premium",
VimeoNetwork library (release 4.0.0).
iOS 13.1
Xcode 11.0

Here is code:

class VimeoService {
    var authController:AuthenticationController?

    let appConf = AppConfiguration(clientIdentifier: "blablabla", clientSecret: "blablablablablablablabla", scopes: [.Private, .Public, .Upload, .Interact,.VideoFiles], keychainService: "KeychainServiceVimeo")
    
    let backgroundSessionIdentifier = "vimeoBackgroundSessionIdentifier"

    let client:VimeoClient = VimeoClient.sharedClient
    var user:VIMAccount?
    
    init() {
        self.authController = AuthenticationController(client: client, appConfiguration: self.client.configuration ?? appConf, configureSessionManagerBlock: nil)

        if self.user == nil {
            self.authController?.clientCredentialsGrant(completion: {[weak self] (result) in

                switch result {
                case .success(result: let account):
                    print(account)
                    self?.user = account
                case .failure(error: let error):
                    print(error)
                }
            })
        }
    }
    
    func getVideo(id:String, completion:@escaping((VIMVideoFile?) -> ())) {
        let videoFiles = VideoRequest.videoRequest(forVideoURI: "/videos/"+id)
        _ = self.client.request(videoFiles) { (result) in
                switch result {
                case .success(result: let videoInf):
                    print(videoInf.model.files)
                    completion(videoInf.model.files?.last as? VIMVideoFile)
                case .failure(error: let error):
                    print(error)
                }
            }
    }
}

As result I got all information about videoFile, beside the "files" array.

Private Video 404 Error

Hi,

Having obtained a premium Vimeo account, I would like to be able to use the provided Video API in order to access specific Private videos.
I have successfully authenticated the application with the premium account using the following code:

screenshot 2019-01-22 at 11 47 37

Upon successful authentication I am making a call to request a specific private video via the video ID, using the following code:

screenshot 2019-01-22 at 11 47 46

The response I receive is a 404 - not found.

When modifying the specified video to “Public”, I am able to use the above code to access all necessary information about the video without receiving a 404 - not found error.

Any help on this situation would be greatly appreciated.

How to play private Vimeo videos in iPhone/Android?

Just integrated VimeoNetworking with my project. My videos are private, and I am able to fetch and list these private videos in my App. But I have no idea, how I can play these videos.

I have VIMVideo object. I am able to get the video link & URI from this object. There is no direct way to find the actual file URL from this object. So how I am supposed to play the video? I can't pass the VIMVideo link to a Player in the iOS system, because there is no file in that URL.

I saw repository PlayerKit by Vimeo, this PlayerKit directly takes a file URL. But in my case all my videos are private, and I have no idea how to get the actual file URL of these videos which I can pass into the PlayerKit.

Please explain, how does this work? that will be really helpful for me get started.

Simply put, How am I supposed to play videos in an iOS App from my Vimeo Business Account in which all videos are private.

Objective C

Are there any examples of how to use the SDK in an Objective C app?

Generating Access Token through API with scope to private & video_files

I have a PRO account and I have few video files which are "private" or "hide from vimeo". I need to get the video_files value (for streaming url) for these videos with the access token generated through API but I do not wish to use client authentication to view the private/hidden videos in the app. Basically I don't want the user to log in to view my private/hidden videos. Can I generate the access token with private/video_files scope? I don't want to keep the access token anywhere in my app.

Update dependency AFNetworking to 4.0

Hello,

I am getting Apple rejection of using depreciated UIWebView. AFNetworking was using UIWebView they have a fix released with version 4.0. When I am updating the my pod I getting below error.

VimeoNetworking (from Vimeo) was resolved to 3.3.1, which depends on AFNetworking (= 3.1.0)

What is "keychainService" in AppConfiguration constructor?

The instructions show an example of creating an instance of AppConfiguration using the parameters clientIdentifier, clientSecret, and scopes. But the actual AppConfiguration class requires a fourth parameter called keychainService. What is this? I see no mention of it anywhere in the documentation, and searching elsewhere hasn't helped me in any way.

Can you please clarify this? It would also be nice to update the documentation so others don't run into this problem.

Single user application, lightweight use

Issue Summary

It should be possible to use the token generated for an API app (https://developer.vimeo.com/apps) to authenticate api calls issued by the VimeoClient. On the VIMNetworking repo this technique seemed to be referred as Lightweight Use.

Reproduction Steps

  • Go to https://developer.vimeo.com/apps
  • Create an app or use an existing one
  • Generate an Access Token
  • On your application try to use the generated access token as a way to authenticate api calls.

Expected Behavior

VimeoClient class provide a way to set the generated access token. Following api calls use this token.

Actual Behavior

As of today we can only authenticate using the two approaches mentioned in the README.md, client credentials or code grant.

One quick (but dirty?) fix could be to modify the access level of the currentAccount property in the VimeoClient class. With this modification users of the library would be able to write the following code

let vimeoClient = VimeoClient(appConfiguration: appConfiguration)
vimeoClient.currentAccount = VIMAccount(keyValueDictionary: ["accessToken" : "generated acess token", "tokenType" : "Bearer", "scope" : "scope associated with access token"])
let videoRequest = Request<VIMVideo>(path: "/videos/video_id")

and hence bypass the authentication controller. If this is something that you would consider let me know and I will create a PR for this fix.

Failed to build scheme (Carthage)

Hey everyone!

I'm trying to install framework with Carthage but it returns me an error:
Dependency "VimeoNetworking" has no shared framework schemes for any of the platforms: iOS

Can anyone help me please? Thanks!

What is "sessionManager" in VimeoClient constructor?

Another discrepancy I found in the documentation.

It says that VimeoClient can be constructed like this:

let vimeoClient = VimeoClient(configuration: appConfiguration)

But the actual class requires more in its constructor:

let vimeoClient = VimeoClient(
            appConfiguration: <#T##AppConfiguration?#>,
            sessionManager: <#T##VimeoSessionManager?#>
        )

I don't see anything about this sessionManager in the documentation. Can you update it to include that?

Safari cannot open the page because the address is invalid.

vimeo client id = 6152cbcfb474f296704bef9be3eb914c7cbcca8f

I've set callback url in vimeo app = vimeo6152cbcfb474f296704bef9be3eb914c7cbcca8f://auth

and in my ios application plist =

CFBundleURLTypes


vimeo
vimeo6152cbcfb474f296704bef9be3eb914c7cbcca8f

for login it goes to safari and asks for login and then authentication which is working fine but after clicking 'Allow' button it doesn't return to ios app !

hoping for quick response

thank you

Get private videos

I have a private vdeo and I want to get it, but always receive Request failed: unauthorized (401) as redponse. I have client Id, client secret and access token. What am I doing wrong?

func configVimeoApp() {
let clienId = "xxxx";
let clientSecret = "xxx"
let appConfiguration = AppConfiguration(
clientIdentifier: clienId,
clientSecret: clientSecret,
scopes: [.Private], keychainService: "")

    let vimeoClient = VimeoClient(appConfiguration: appConfiguration)
    
    let authenticationController = AuthenticationController(client: vimeoClient, appConfiguration: appConfiguration)
    authenticationController.accessToken(token: "xxxxx") { result in
        switch result
        {
        case .success(let result):
            print("authenticated successfully: \(result)")
        case .failure(let error):
            print("failure authenticating: \(error)")
        }
    }
    
    let videoRequest = Request<VIMVideo>(path: "/videos/236223517")
    vimeoClient.request(videoRequest) { result in
        switch result {
            case .success(let response):
                let video: VIMVideo = response.model
                print("retrieved video: \(video)")
            case .failure(let error):
                print("error retrieving video: \(error)")
            }
    }

}

Can't access private videos.

HI there! So, I'm using the swift 4.0 branch. Authentication went well.

I've found that I'm only able to access the public videos for this account. Here's a screen shot of the example code running from your README.. and the video detail page from the site showing the video is set to private.

(And the breakpoint showing the error.. it's a 404 NOT FOUND)

screen shot 2018-01-19 at 7 52 08 pm

Here's what happens after I change the video to be public.. It begins to start being returned.

screen shot 2018-01-19 at 7 53 15 pm

I suppose I am on a development branch of a git submodule. Kind of makes me nervous to think about using this anyway... What is the timeline for a sort of stable release?

Vimeo Pro members can NOT access playback URLs for Vimeo videos which are created by others

Here https://github.com/vimeo/VIMVideoPlayer
It describes: "Vimeo Pro members can access playback URLs for Vimeo videos using the Vimeo API. Playback URLs are only included in the response object if the requesting account is a Vimeo Pro account.".

I did a test here and found:

  1. I can get playback URLs if the videos are created by myself, and I can play via VIMVideoPlayer. I noticed that there's a token in the url, will this token expire?
  2. I could NOT get playback URLs if the video are NOT created by myself

Is that true?

Getting private video files

Hi , i'm unable to get the list of files from VIMVideo.

Have changed the scopes to scopes: [.Public, .Private, .Interact,.VideoFiles] in authentication (authentication works right) ("video_files")

I can get video name strongSelf.videodir?.name , but when request strongSelf.videodir?.files is returning null.

I have a Pro account. This have been working until have upgraded to last version.

thanks in advance,

Carthage support

I am adding
github "vimeo/VimeoNetworking" to my Cartfile
And then running
carthage update VimeoNetworking --platform io
And receive the error:
Dependency "VimeoNetworking" has no shared framework schemes for any of the platforms: iOS

If you believe this to be an error, please file an issue with the maintainers at https://github.com/vimeo/VimeoNetworking/issues/new

Mac Catalyst issue in iOS app

To compile an application, one of the libraries included in the SDK uses a discontinued method

File --> UIKit+AFNetworking/AFImageDownloader.m

Error:
return [[NSURLCache alloc] initWithMemoryCapacity:20 * 1024 * 1024
diskCapacity:150 * 1024 * 1024
diskPath:@"com.alamofire.imagedownloader"];

Solution: AFNetworking/AFNetworking#4470

In the Alamofire git they have solved it. I say this to be considered in future updates

Doing Pod Install Not Working.

Hi,

When doing a pod install using pod 'VimeoNetworking', '1.1' Cocoapods complains that it can't find a specification. I tried doing pod 'VimeoNetworking' without specifying the version number and that doesn't work either. Is the documentation wrong for the version to use since I looked at the podspec and the version there was 0.0.1. Thanks.

Can't find Video .mp4 url

Hi guys.
I would like to play vimeo video in my iOS app.
I successfully loaded video details with request
Request(path: "/videos/363351622")

But I don't see video .mp4 url that I can play in player.
Where I can find it ?
Thanks

P.S. I have PRO account. And I included .VideoFiles to scope

Can't get video_files

Hello,

I'm testing this API but can't get the video files.

I intend to download the files to permanently cache some videos in my APP (I'm testing with my own token and my own video, via "Lightweight auth use informed in the Readme").

I can get the user, the video (thumbs, names, etc). But can't find a way to retrieve the video files.

I need to be PRO user to access the video files?

I need to use PlayerKit to achieve this?

Cannot retrieve video link

I'm using a Pro account, and try to retrieve the link of one of my own video, so I can play it in my app. I got the video object, but the files property is always nil.

I suspect it may related to the scopes declaration, but Scope enum doesn't have a video_files value.

I also tried to make that call on API playground, the response payload doesn't have a files field, or anything looks like a video file link.

I do see the embed data, but VIMVideo doesn't expose that.

Any suggestion on what can I do to get the video link?

Carthage support

Hi, can you provide Carthage support for this library? For now I got an error:

*** Skipped building VimeoNetworking due to the error:
Dependency "VimeoNetworking" has no shared framework schemes for any of the platforms: iOS

https://github.com/Carthage/Carthage#supporting-carthage-for-your-framework

Carthage only officially supports dynamic frameworks. Dynamic frameworks can be used on any version of OS X, but only on iOS 8 or later.

Because Carthage has no centralized package list, and no project specification format, most frameworks should build automatically.

The specific requirements of any framework project are listed below.

New Release

Looks like there's been some work on this since the last release in August. Any chance we could get a release any time soon?

Specifically I'm interested in this commit that fixes an issue with compile times, as I'm seeing an increase of about 130 seconds in compile times when adding this framework.

@jasonhawkins 👋

Add Swift 3 Support

Like the title says, Swift 3 support is currently missing from VimeoNetworking.

Fix For Integrating with Swift 3

Incase you (like me) tried to drop the folder "VimeoNetworking/VimeoNetworking/" that contains the 'Sources' and 'Resources' folder into your Swift (3) project and begin to get build errors; here is how to fix them :-

Get AFNetworking as it is a dependency (pod install available)
Get VIMObjectMapper as it is a dependency (pod install available)

Next in your objective-c bridging header, import VimeoNetworking.h
like this. : #import "VimeoNetworking.h" and not #import <VimeoNetworking/VimeoNetworking.h>

Next open VimeoNetworking/Sources/VimeoNetworking.h file, replace all imports with the quotation format. e.g.
#import <VimeoNetworking/VIMAccount.h> to #import "VIMAccount.h"
#import <VimeoNetworking/VIMActivity.h> to #import "VIMActivity.h"
...

Next, either build so the build errors will point you to files containing
#import <VimeoNetworking/VimeoNetworking.h>
or find them manually and replace the import with the quotation format
#import "VimeoNetworking.h"

Next, Open the file VimeoNetworking/Sources/Models/PlayProgress.swift :
Replace the class declaration
public class PlayProgress : VIMModelObject
with
@objc open class PlayProgress : VIMModelObject

Next, Open the file VimeoNetworking/Sources/Models/VIMVideo.m and VimeoNetworking/Sources/Models/VIMVideoPlayRepresentation.h
Replace the import
#import <VimeoNetworking/VimeoNetworking-Swift.h>
with
#import "YourProjectNameHere-Swift.h"
(Use you project name instead, don't worry about not having such a file, just do it, it just works )

Now build and it should build successfully.

Caption / Subtitle

Does the current video player for iOS supports subtitles? How's that work? Thanks!

VimeoNetworking.h file not found

Issue Summary

Adding and using VimeoNetworking (v0.0.1) as a (git) pod dependency result in the following error:

VimeoNetworking-Swift.h: 100:9: 'VimeoNetworking/VimeoNetworking.h' file not found

Reproduction Steps

  • Create a new tvOS project (Single View Application) and add the following dependency to your pod file:
    pod 'VimeoNetworking', :git => 'https://github.com/vimeo/VimeoNetworking.git'
  • Run the pod install command
  • Open the generated workspace
  • Import VimeoNetworking in your AppDelegate
  • Create, let say, an AppConfiguration object in didFinishLaunchingWithOptions (for the sake of issue reproduction)
  • Build the project

Expected Behavior

Build should terminate without any error

Actual Behavior

Build failed with the following stack trace:

<module-includes>:2:9: note: in file included from <module-includes>:2:
#import "Headers/VimeoNetworking-Swift.h"
        ^
../Debug-appletvos/VimeoNetworking/VimeoNetworking.framework/Headers/VimeoNetworking-Swift.h: 100:9: error: 'VimeoNetworking/VimeoNetworking.h' file not found
#import <VimeoNetworking/VimeoNetworking.h>
        ^
<unknown>:0: error: could not build Objective-C module 'VimeoNetworking'

After a quick check it appears that the missing file is excluded on purpose from the podspec. Deleting the following line in the podspec:

s.exclude_files = "VimeoNetworking/VimeoNetworking/VimeoNetworking.h" (line 24)

and pod installing the modified local pod seems to resolve the issue. If removing the line is something that you would consider let me know and I will create a PR for this fix.

Notes:

  • I did not test this with an iOS project but I guess result will be the same.
  • iOS example in the repo build successfully.

App crashes at launch

There are no images in the Assets.

dyld: Library not loaded: @rpath/VimeoNetworking.framework/VimeoNetworking
Referenced from: /private/var/containers/Bundle/Application/B35BBDF4-5F80-4303-9D37-B927AB0BA4C1/Example.app/Example
Reason: image not found

VimVideo.Files come as nil for version 3.3.1

In VIMVideo objects Files are coming as nil. In version 3.0.1 it is working fine but in version 3.3.1 which is necessary for XCode 10.2 and swift version upgrade it is failing. I am not sure where the issue is, Please help me in this, Thanks.

Unable to find a specification for `VimeoNetworking`

when using Pod, I got this error: "Unable to find a specification for VimeoNetworking"
in Podfile:
pod 'VimeoNetworking'

if in Podfile:
pod 'VimeoNetworking', '1.0'
the error is :
Analyzing dependencies
[!] Unable to find a specification for VimeoNetworking (= 1.0)

it seems do not support iOS10

VimeoNetworking support iOS10 or not?

VimeoNetworking also run well on iOS9.3 simulator, but when I turn to iOS10, VimeoNetworkingExample-iOS tell me I misconfig Client Identifier

I am sure the Client Identifier and secret are right because I run the same code in iPhone6 with iSO9.3, it works very well.
image

Error:

2016-09-21 15:12:28.853904 VimeoNetworkingExample-iOS[15673:209008] subsystem: com.apple.UIKit, category: HIDEventFiltered, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0
2016-09-21 15:12:28.855025 VimeoNetworkingExample-iOS[15673:209008] subsystem: com.apple.UIKit, category: HIDEventIncoming, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0
2016-09-21 15:12:28.865747 VimeoNetworkingExample-iOS[15673:209006] subsystem: com.apple.BaseBoard, category: MachPort, enable_level: 1, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0, enable_private_data: 0
2016-09-21 15:12:28.970491 VimeoNetworkingExample-iOS[15673:208960] subsystem: com.apple.siri, category: Intents, enable_level: 1, persist_level: 1, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0, enable_private_data: 0
2016-09-21 15:12:29.031973 VimeoNetworkingExample-iOS[15673:208960] subsystem: com.apple.Accessibility, category: AccessibilityBundleLoading, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0
2016-09-21 15:12:29.060256 VimeoNetworkingExample-iOS[15673:208960] subsystem: com.apple.UIKit, category: StatusBar, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0
2016-09-21 15:12:29.136049 VimeoNetworkingExample-iOS[15673:208960] subsystem: com.apple.SystemConfiguration, category: SCNetworkReachability, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 2, enable_private_data: 0
Failed to load User account
Failed to load ClientCredentials account
2016-09-21 15:12:29.157566 VimeoNetworkingExample-iOS[15673:209000] subsystem: com.apple.libsqlite3, category: logging, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0
2016-09-21 15:12:29.166897 VimeoNetworkingExample-iOS[15673:209000] subsystem: com.apple.network, category: , enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 2, enable_private_data: 0
2016-09-21 15:12:29.167811 VimeoNetworkingExample-iOS[15673:209000] [] tcp_connection_create_with_endpoint_and_parameters 1 api.vimeo.com 443
2016-09-21 15:12:29.168922 VimeoNetworkingExample-iOS[15673:209000] [] tcp_connection_start 1 starting
2016-09-21 15:12:29.169710 VimeoNetworkingExample-iOS[15673:209000] [] nw_connection_create creating connection to api.vimeo.com:443
2016-09-21 15:12:29.170757 VimeoNetworkingExample-iOS[15673:209000] [] tcp_connection_start starting tc_nwconn=0x7f82b0f10400
2016-09-21 15:12:29.172275 VimeoNetworkingExample-iOS[15673:209000] [] __nw_connection_start_block_invoke 1 starting
2016-09-21 15:12:29.173972 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_handler_start [1 api.vimeo.com:443 initial path (null)]
2016-09-21 15:12:29.174701 VimeoNetworkingExample-iOS[15673:209000] [] nw_connection_endpoint_report [1 api.vimeo.com:443 initial path (null)] reported event path:start
2016-09-21 15:12:29.177320 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_handler_path_change [1 api.vimeo.com:443 waiting path (satisfied)]
2016-09-21 15:12:29.178931 VimeoNetworkingExample-iOS[15673:209000] [] nw_connection_endpoint_report [1 api.vimeo.com:443 waiting path (satisfied)] reported event path:satisfied
2016-09-21 15:12:29.179230 VimeoNetworkingExample-iOS[15673:209000] [] nw_connection_endpoint_report [1 api.vimeo.com:443 waiting path (satisfied)] skipping state update
2016-09-21 15:12:29.179712 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_proxy_handler_should_use_proxy Looking up proxy for hostname: api.vimeo.com, ifindex: 0
2016-09-21 15:12:29.181253 VimeoNetworkingExample-iOS[15673:209000] subsystem: com.apple.SystemConfiguration, category: SCPreferences, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 2, enable_private_data: 0
2016-09-21 15:12:29.183432 VimeoNetworkingExample-iOS[15673:209000] [] -[NWConcrete_nw_endpoint_resolver startWithHandler:] [1 api.vimeo.com:443 waiting resolver (satisfied)]
2016-09-21 15:12:29.184988 VimeoNetworkingExample-iOS[15673:209000] [] nw_connection_endpoint_report [1 api.vimeo.com:443 in_progress resolver (satisfied)] reported event resolver:start_dns
2016-09-21 15:12:29.186380 VimeoNetworkingExample-iOS[15673:209000] [] nw_resolver_create_dns_service_on_queue Starting host resolution api.vimeo.com:443, flags 0x4000d000
2016-09-21 15:12:29.187602 VimeoNetworkingExample-iOS[15673:209000] [] nw_resolver_host_resolve_callback flags=0x2 ifindex=0 error=NoSuchRecord(-65554) hostname=api.vimeo.com. addr=::.0 ttl=60
2016-09-21 15:12:29.188429 VimeoNetworkingExample-iOS[15673:209000] [] nw_resolver_start_query_timer Starting 1s query timer to receive all address families for api.vimeo.com:443
2016-09-21 15:12:29.189243 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_resolver_update [1 api.vimeo.com:443 in_progress resolver (satisfied)] resolver is in_progress
2016-09-21 15:12:29.189871 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_resolver_update [1 api.vimeo.com:443 in_progress resolver (satisfied)] Updated endpoint list is ()
2016-09-21 15:12:29.192677 VimeoNetworkingExample-iOS[15673:208960] subsystem: com.apple.UIKit, category: GestureEnvironment, enable_level: 0, persist_level: 0, default_ttl: 1, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0
2016-09-21 15:12:29.209955 VimeoNetworkingExample-iOS[15673:208960] subsystem: com.apple.BackBoardServices.fence, category: App, enable_level: 1, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0, enable_private_data: 0
2016-09-21 15:12:29.376124 VimeoNetworkingExample-iOS[15673:209000] [] nw_resolver_host_resolve_callback flags=0x3 ifindex=0 error=NoError(0) hostname=vimeo.com. addr=104.156.85.217:0 ttl=39
2016-09-21 15:12:29.376789 VimeoNetworkingExample-iOS[15673:209000] [] nw_resolver_host_resolve_callback flags=0x3 ifindex=0 error=NoError(0) hostname=vimeo.com. addr=23.235.37.217:0 ttl=39
2016-09-21 15:12:29.377725 VimeoNetworkingExample-iOS[15673:209000] [] nw_host_stats_add_src recv too small, received 24, expected 28
2016-09-21 15:12:29.378377 VimeoNetworkingExample-iOS[15673:209000] [] nw_host_stats_add_src recv too small, received 24, expected 28
2016-09-21 15:12:29.378849 VimeoNetworkingExample-iOS[15673:209000] [] sa_dst_compare_internal 23.235.37.217:443@0 = 104.156.85.217:443@0
2016-09-21 15:12:29.379882 VimeoNetworkingExample-iOS[15673:209000] [] nw_resolver_host_resolve_callback flags=0x3 ifindex=0 error=NoError(0) hostname=vimeo.com. addr=23.235.33.217:0 ttl=39
2016-09-21 15:12:29.380494 VimeoNetworkingExample-iOS[15673:209000] [] nw_host_stats_add_src recv too small, received 24, expected 28
2016-09-21 15:12:29.380923 VimeoNetworkingExample-iOS[15673:209000] [] sa_dst_compare_internal 23.235.33.217:443@0 = 104.156.85.217:443@0
2016-09-21 15:12:29.381478 VimeoNetworkingExample-iOS[15673:209000] [] sa_dst_compare_internal 23.235.33.217:443@0 = 23.235.37.217:443@0
2016-09-21 15:12:29.381727 VimeoNetworkingExample-iOS[15673:209000] [] nw_resolver_host_resolve_callback flags=0x2 ifindex=0 error=NoError(0) hostname=vimeo.com. addr=104.156.81.217:0 ttl=39
2016-09-21 15:12:29.382273 VimeoNetworkingExample-iOS[15673:209000] [] nw_host_stats_add_src recv too small, received 24, expected 28
2016-09-21 15:12:29.382998 VimeoNetworkingExample-iOS[15673:209000] [] sa_dst_compare_internal 104.156.81.217:443@0 = 104.156.85.217:443@0
2016-09-21 15:12:29.383666 VimeoNetworkingExample-iOS[15673:209000] [] sa_dst_compare_internal 104.156.81.217:443@0 = 23.235.37.217:443@0
2016-09-21 15:12:29.384130 VimeoNetworkingExample-iOS[15673:209000] [] sa_dst_compare_internal 104.156.81.217:443@0 = 23.235.33.217:443@0
2016-09-21 15:12:29.385123 VimeoNetworkingExample-iOS[15673:209000] [] nw_resolver_cancel_query_timer Cancelling query timer for api.vimeo.com
2016-09-21 15:12:29.386252 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_resolver_update [1 api.vimeo.com:443 in_progress resolver (satisfied)] resolver is complete
2016-09-21 15:12:29.386894 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_resolver_update [1 api.vimeo.com:443 in_progress resolver (satisfied)] Adding endpoint handler for 104.156.85.217:443
2016-09-21 15:12:29.387415 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_resolver_update [1 api.vimeo.com:443 in_progress resolver (satisfied)] Adding endpoint handler for 23.235.37.217:443
2016-09-21 15:12:29.388051 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_resolver_update [1 api.vimeo.com:443 in_progress resolver (satisfied)] Adding endpoint handler for 23.235.33.217:443
2016-09-21 15:12:29.388322 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_resolver_update [1 api.vimeo.com:443 in_progress resolver (satisfied)] Adding endpoint handler for 104.156.81.217:443
2016-09-21 15:12:29.388797 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_resolver_update [1 api.vimeo.com:443 in_progress resolver (satisfied)] Updated endpoint list is (104.156.85.217:443,23.235.37.217:443,23.235.33.217:443,104.156.81.217:443)
2016-09-21 15:12:29.389125 VimeoNetworkingExample-iOS[15673:209000] [] nw_connection_endpoint_report [1 api.vimeo.com:443 in_progress resolver (satisfied)] reported event resolver:receive_dns
2016-09-21 15:12:29.390076 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_resolver_start_next_child [1 api.vimeo.com:443 in_progress resolver (satisfied)] starting child endpoint 104.156.85.217:443
2016-09-21 15:12:29.390618 VimeoNetworkingExample-iOS[15673:209000] [] nw_host_stats_add_src recv too small, received 24, expected 28
2016-09-21 15:12:29.390923 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_resolver_start_next_child [1 api.vimeo.com:443 in_progress resolver (satisfied)] starting next child endpoint in 250ms
2016-09-21 15:12:29.391306 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_handler_start [1.1 104.156.85.217:443 initial path (null)]
2016-09-21 15:12:29.391622 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_resolver_receive_report [1 api.vimeo.com:443 in_progress resolver (satisfied)] received child report:[1.1 104.156.85.217:443 initial path (null)]
2016-09-21 15:12:29.391921 VimeoNetworkingExample-iOS[15673:209000] [] nw_connection_endpoint_report [1.1 104.156.85.217:443 initial path (null)] reported event path:start
2016-09-21 15:12:29.392615 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_handler_path_change [1.1 104.156.85.217:443 waiting path (satisfied)]
2016-09-21 15:12:29.392992 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_resolver_receive_report [1 api.vimeo.com:443 in_progress resolver (satisfied)] received child report:[1.1 104.156.85.217:443 waiting path (satisfied)]
2016-09-21 15:12:29.393377 VimeoNetworkingExample-iOS[15673:209000] [] nw_connection_endpoint_report [1.1 104.156.85.217:443 waiting path (satisfied)] reported event path:satisfied
2016-09-21 15:12:29.393645 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_proxy_handler_should_use_proxy Looking up proxy for hostname: , ifindex: 0
2016-09-21 15:12:29.394717 VimeoNetworkingExample-iOS[15673:209000] [] -[NWConcrete_nw_endpoint_flow startWithHandler:] [1.1 104.156.85.217:443 waiting socket-flow (satisfied)]
2016-09-21 15:12:29.395121 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_flow_setup_socket [1.1 104.156.85.217:443 in_progress socket-flow (satisfied)] creating socket
2016-09-21 15:12:29.395365 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_flow_attach_protocols [1.1 104.156.85.217:443 in_progress socket-flow (satisfied)]
2016-09-21 15:12:29.397575 VimeoNetworkingExample-iOS[15673:209000] [] ____nwlog_simulate_crash_inner_block_invoke dlopen CrashReporterSupport failed
2016-09-21 15:12:29.397917 VimeoNetworkingExample-iOS[15673:209000] [] __nwlog_err_simulate_crash simulate crash failed "nw_socket_set_common_sockopts setsockopt SO_NOAPNFALLBK failed: [42] Protocol not available"
2016-09-21 15:12:29.398490 VimeoNetworkingExample-iOS[15673:209000] [] nw_socket_set_common_sockopts setsockopt SO_NOAPNFALLBK failed: [42] Protocol not available, dumping backtrace:
[x86_64] libnetcore-856.1.8
0 libsystem_network.dylib 0x0000000104d8b80e __nw_create_backtrace_string + 123
1 libnetwork.dylib 0x000000010525f194 nw_socket_add_input_handler + 3002
2 libnetwork.dylib 0x000000010523cdb8 nw_endpoint_flow_attach_protocols + 3768
3 libnetwork.dylib 0x000000010523bdd5 nw_endpoint_flow_setup_socket + 563
4 libnetwork.dylib 0x000000010523ab34 -[NWConcrete_nw_endpoint_flow startWithHandler:] + 2612
5 libnetwork.dylib 0x0000000105255d11 nw_endpoint_handler_path_change + 1261
6 libnetwork.dylib 0x0000000105255740 nw_endpoint_handler_start + 570
7 libnetwork.dylib 0x000000010526d003 nw_endpoint_resolver_start_next_child + 2240
8 libdispatch.dylib 0x000000
2016-09-21 15:12:29.399761 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_flow_attach_protocols [1.1 104.156.85.217:443 in_progress socket-flow (satisfied)] Attached flow protocol
2016-09-21 15:12:29.400923 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_resolver_receive_report [1 api.vimeo.com:443 in_progress resolver (satisfied)] received child report:[1.1 104.156.85.217:443 in_progress socket-flow (satisfied)]
2016-09-21 15:12:29.402078 VimeoNetworkingExample-iOS[15673:209000] [] nw_connection_endpoint_report [1.1 104.156.85.217:443 in_progress socket-flow (satisfied)] reported event flow:start_connect
2016-09-21 15:12:29.416558 VimeoNetworkingExample-iOS[15673:209000] [] nw_socket_handle_socket_event Event mask: 0x800
2016-09-21 15:12:29.417128 VimeoNetworkingExample-iOS[15673:209000] [] nw_socket_handle_socket_event Socket received CONNECTED event
2016-09-21 15:12:29.417844 VimeoNetworkingExample-iOS[15673:209000] [] nw_socket_setup_notsent_lowat Set TCP_NOTSENT_LOWAT(16384)
2016-09-21 15:12:29.418529 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_flow_protocol_connected [1.1 104.156.85.217:443 in_progress socket-flow (satisfied)] Output protocol connected
2016-09-21 15:12:29.419952 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_flow_connected_path_change [1.1 104.156.85.217:443 ready socket-flow (satisfied)]
2016-09-21 15:12:29.420265 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_flow_connected_path_change [1.1 104.156.85.217:443 ready socket-flow (satisfied)] Connected path is satisfied
2016-09-21 15:12:29.420763 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_resolver_receive_report [1 api.vimeo.com:443 in_progress resolver (satisfied)] received child report:[1.1 104.156.85.217:443 ready socket-flow (satisfied)]
2016-09-21 15:12:29.421241 VimeoNetworkingExample-iOS[15673:209000] [] nw_connection_endpoint_report [1.1 104.156.85.217:443 ready socket-flow (satisfied)] reported event flow:finish_connect
2016-09-21 15:12:29.421650 VimeoNetworkingExample-iOS[15673:209000] [] nw_connection_endpoint_report [1 api.vimeo.com:443 ready resolver (satisfied)] reported event flow:finish_connect
2016-09-21 15:12:29.421918 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_resolver_receive_report [1 api.vimeo.com:443 ready resolver (satisfied)] received child report:[1.1 104.156.85.217:443 ready socket-flow (satisfied)]
2016-09-21 15:12:29.422242 VimeoNetworkingExample-iOS[15673:209000] [] nw_connection_endpoint_report [1.1 104.156.85.217:443 ready socket-flow (satisfied)] reported event flow:changed_viability
2016-09-21 15:12:29.422593 VimeoNetworkingExample-iOS[15673:209000] [] nw_connection_endpoint_report [1 api.vimeo.com:443 ready resolver (satisfied)] reported event flow:changed_viability
2016-09-21 15:12:29.422981 VimeoNetworkingExample-iOS[15673:209006] [] __tcp_connection_start_block_invoke 1 sending event TCP_CONNECTION_EVENT_CONNECTED in response to state ready and error (null)
2016-09-21 15:12:29.423209 VimeoNetworkingExample-iOS[15673:209006] [] tcp_connection_event_notify 1 event: TCP_CONNECTION_EVENT_CONNECTED, reason: nw_connection event, should deliver: true
2016-09-21 15:12:29.423831 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_start_tls_while_connected [1.1 104.156.85.217:443 ready socket-flow (satisfied)]
2016-09-21 15:12:29.424052 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_start_tls_while_connected [1.1 104.156.85.217:443 ready socket-flow (satisfied)] Using CoreTLS
2016-09-21 15:12:29.424665 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_start_tls_while_connected [1.1 104.156.85.217:443 ready socket-flow (satisfied)] Set custom TLS client queue
2016-09-21 15:12:29.424905 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_start_tls_while_connected [1.1 104.156.85.217:443 ready socket-flow (satisfied)] Set custom TLS prepare handler
2016-09-21 15:12:29.425623 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_start_tls_while_connected [1.1 104.156.85.217:443 ready socket-flow (satisfied)] Set custom TLS message handler
2016-09-21 15:12:29.426122 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_start_tls_while_connected [1.1 104.156.85.217:443 ready socket-flow (satisfied)] Attached TLS protocol to connected flow
2016-09-21 15:12:29.426692 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_resolver_receive_report [1 api.vimeo.com:443 ready resolver (satisfied)] received child report:[1.1 104.156.85.217:443 in_progress socket-flow (satisfied)]
2016-09-21 15:12:29.427374 VimeoNetworkingExample-iOS[15673:209000] [] nw_connection_endpoint_report [1.1 104.156.85.217:443 in_progress socket-flow (satisfied)] reported event flow:start_secondary_connect
2016-09-21 15:12:29.427816 VimeoNetworkingExample-iOS[15673:209000] [] nw_connection_endpoint_report [1 api.vimeo.com:443 in_progress resolver (satisfied)] reported event flow:start_secondary_connect
2016-09-21 15:12:29.428172 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_resolver_receive_report [1 api.vimeo.com:443 in_progress resolver (satisfied)] received child report:[1.1 104.156.85.217:443 in_progress socket-flow (satisfied)]
2016-09-21 15:12:29.428508 VimeoNetworkingExample-iOS[15673:209000] [] nw_connection_endpoint_report [1.1 104.156.85.217:443 in_progress socket-flow (satisfied)] reported event flow:start_connect
2016-09-21 15:12:29.428840 VimeoNetworkingExample-iOS[15673:209000] [] nw_connection_endpoint_report [1 api.vimeo.com:443 in_progress resolver (satisfied)] reported event flow:start_connect
2016-09-21 15:12:29.442629 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_flow_protocol_connected [1.1 104.156.85.217:443 in_progress socket-flow (satisfied)] Transport protocol connected
2016-09-21 15:12:29.442842 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_resolver_receive_report [1 api.vimeo.com:443 in_progress resolver (satisfied)] received child report:[1.1 104.156.85.217:443 in_progress socket-flow (satisfied)]
2016-09-21 15:12:29.443044 VimeoNetworkingExample-iOS[15673:209000] [] nw_connection_endpoint_report [1.1 104.156.85.217:443 in_progress socket-flow (satisfied)] reported event flow:finish_transport
2016-09-21 15:12:29.443251 VimeoNetworkingExample-iOS[15673:209000] [] nw_connection_endpoint_report [1 api.vimeo.com:443 in_progress resolver (satisfied)] reported event flow:finish_transport
2016-09-21 15:12:29.464897 VimeoNetworkingExample-iOS[15673:208960] subsystem: com.apple.Accessibility, category: VOTHandwriting, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0
2016-09-21 15:12:29.486057 VimeoNetworkingExample-iOS[15673:209006] [] nw_endpoint_flow_protocol_connected [1.1 104.156.85.217:443 in_progress socket-flow (satisfied)] Output protocol connected
2016-09-21 15:12:29.487596 VimeoNetworkingExample-iOS[15673:209006] [] nw_endpoint_flow_connected_path_change [1.1 104.156.85.217:443 ready socket-flow (satisfied)]
2016-09-21 15:12:29.487934 VimeoNetworkingExample-iOS[15673:209006] [] nw_endpoint_flow_connected_path_change [1.1 104.156.85.217:443 ready socket-flow (satisfied)] Connected path is satisfied
2016-09-21 15:12:29.488628 VimeoNetworkingExample-iOS[15673:209006] [] nw_endpoint_resolver_receive_report [1 api.vimeo.com:443 in_progress resolver (satisfied)] received child report:[1.1 104.156.85.217:443 ready socket-flow (satisfied)]
2016-09-21 15:12:29.489560 VimeoNetworkingExample-iOS[15673:209006] [] nw_connection_endpoint_report [1.1 104.156.85.217:443 ready socket-flow (satisfied)] reported event flow:finish_connect
2016-09-21 15:12:29.490112 VimeoNetworkingExample-iOS[15673:209006] [] nw_connection_endpoint_report [1 api.vimeo.com:443 ready resolver (satisfied)] reported event flow:finish_connect
2016-09-21 15:12:29.490978 VimeoNetworkingExample-iOS[15673:209000] [] __tcp_connection_start_block_invoke 1 sending event TCP_CONNECTION_EVENT_TLS_HANDSHAKE_COMPLETE in response to state ready and error (null)
2016-09-21 15:12:29.491790 VimeoNetworkingExample-iOS[15673:209000] [] tcp_connection_event_notify 1 event: TCP_CONNECTION_EVENT_TLS_HANDSHAKE_COMPLETE, reason: nw_connection event, should deliver: true
2016-09-21 15:12:29.492745 VimeoNetworkingExample-iOS[15673:209000] [] tcp_connection_get_statistics DNS: 204ms/215ms since start, TCP: 41ms/269ms since start, TLS: 62ms/315ms since start
2016-09-21 15:12:30.636370 VimeoNetworkingExample-iOS[15673:208960] subsystem: com.apple.securityd, category: OSStatus, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 2, enable_private_data: 0
failure authenticating: Error Domain=KeychainErrorDomain Code=-34018 "undefined error" UserInfo={NSLocalizedDescription=undefined error}
Client Credentials Authentication Failed: Make sure that your client identifier and client secret are set correctly in VimeoClient+Shared.swift
2016-09-21 15:12:30.668569 VimeoNetworkingExample-iOS[15673:209013] [] tcp_connection_create_with_endpoint_and_parameters 2 api.vimeo.com 443
2016-09-21 15:12:30.669045 VimeoNetworkingExample-iOS[15673:209013] [] tcp_connection_start 2 starting
2016-09-21 15:12:30.669465 VimeoNetworkingExample-iOS[15673:209013] [] nw_connection_create creating connection to api.vimeo.com:443
2016-09-21 15:12:30.669933 VimeoNetworkingExample-iOS[15673:209013] [] tcp_connection_start starting tc_nwconn=0x7f82b0f0c610
2016-09-21 15:12:30.670266 VimeoNetworkingExample-iOS[15673:209013] [] __nw_connection_start_block_invoke 2 starting
2016-09-21 15:12:30.670839 VimeoNetworkingExample-iOS[15673:209013] [] nw_endpoint_handler_start [2 api.vimeo.com:443 initial path (null)]
2016-09-21 15:12:30.671304 VimeoNetworkingExample-iOS[15673:209013] [] nw_connection_endpoint_report [2 api.vimeo.com:443 initial path (null)] reported event path:start
2016-09-21 15:12:30.672583 VimeoNetworkingExample-iOS[15673:209013] [] nw_endpoint_handler_path_change [2 api.vimeo.com:443 waiting path (satisfied)]
2016-09-21 15:12:30.673005 VimeoNetworkingExample-iOS[15673:209013] [] nw_connection_endpoint_report [2 api.vimeo.com:443 waiting path (satisfied)] reported event path:satisfied
2016-09-21 15:12:30.673553 VimeoNetworkingExample-iOS[15673:209013] [] nw_connection_endpoint_report [2 api.vimeo.com:443 waiting path (satisfied)] skipping state update
2016-09-21 15:12:30.674047 VimeoNetworkingExample-iOS[15673:209013] [] nw_endpoint_proxy_handler_should_use_proxy Looking up proxy for hostname: api.vimeo.com, ifindex: 0
2016-09-21 15:12:30.674917 VimeoNetworkingExample-iOS[15673:209013] [] -[NWConcrete_nw_endpoint_resolver startWithHandler:] [2 api.vimeo.com:443 waiting resolver (satisfied)]
2016-09-21 15:12:30.675249 VimeoNetworkingExample-iOS[15673:209013] [] nw_connection_endpoint_report [2 api.vimeo.com:443 in_progress resolver (satisfied)] reported event resolver:start_dns
2016-09-21 15:12:30.675824 VimeoNetworkingExample-iOS[15673:209013] [] nw_resolver_create_dns_service_on_queue Starting host resolution api.vimeo.com:443, flags 0x4000d000
2016-09-21 15:12:30.676213 VimeoNetworkingExample-iOS[15673:209013] [] nw_resolver_host_resolve_callback flags=0x3 ifindex=0 error=NoSuchRecord(-65554) hostname=api.vimeo.com. addr=::.0 ttl=60
2016-09-21 15:12:30.676511 VimeoNetworkingExample-iOS[15673:209013] [] nw_resolver_host_resolve_callback flags=0x3 ifindex=0 error=NoError(0) hostname=vimeo.com. addr=104.156.85.217:0 ttl=39
2016-09-21 15:12:30.676844 VimeoNetworkingExample-iOS[15673:209013] [] nw_resolver_host_resolve_callback flags=0x3 ifindex=0 error=NoError(0) hostname=vimeo.com. addr=23.235.37.217:0 ttl=39
2016-09-21 15:12:30.677310 VimeoNetworkingExample-iOS[15673:209013] [] nw_host_stats_add_src recv too small, received 24, expected 28
2016-09-21 15:12:30.677724 VimeoNetworkingExample-iOS[15673:209013] [] nw_host_stats_add_src recv too small, received 24, expected 28
2016-09-21 15:12:30.678229 VimeoNetworkingExample-iOS[15673:209013] [] sa_dst_compare_internal 23.235.37.217:443@0 = 104.156.85.217:443@0
2016-09-21 15:12:30.678542 VimeoNetworkingExample-iOS[15673:209013] [] nw_resolver_host_resolve_callback flags=0x3 ifindex=0 error=NoError(0) hostname=vimeo.com. addr=23.235.33.217:0 ttl=39
2016-09-21 15:12:30.678957 VimeoNetworkingExample-iOS[15673:209013] [] nw_host_stats_add_src recv too small, received 24, expected 28
2016-09-21 15:12:30.679181 VimeoNetworkingExample-iOS[15673:209013] [] sa_dst_compare_internal 23.235.33.217:443@0 = 104.156.85.217:443@0
2016-09-21 15:12:30.679450 VimeoNetworkingExample-iOS[15673:209013] [] sa_dst_compare_internal 23.235.33.217:443@0 = 23.235.37.217:443@0
2016-09-21 15:12:30.679928 VimeoNetworkingExample-iOS[15673:209013] [] nw_resolver_host_resolve_callback flags=0x2 ifindex=0 error=NoError(0) hostname=vimeo.com. addr=104.156.81.217:0 ttl=39
2016-09-21 15:12:30.680273 VimeoNetworkingExample-iOS[15673:209013] [] nw_host_stats_add_src recv too small, received 24, expected 28
2016-09-21 15:12:30.680714 VimeoNetworkingExample-iOS[15673:209013] [] sa_dst_compare_internal 104.156.81.217:443@0 = 104.156.85.217:443@0
2016-09-21 15:12:30.681011 VimeoNetworkingExample-iOS[15673:209013] [] sa_dst_compare_internal 104.156.81.217:443@0 = 23.235.37.217:443@0
2016-09-21 15:12:30.681384 VimeoNetworkingExample-iOS[15673:209013] [] sa_dst_compare_internal 104.156.81.217:443@0 = 23.235.33.217:443@0
2016-09-21 15:12:30.682048 VimeoNetworkingExample-iOS[15673:209006] [] nw_endpoint_resolver_update [2 api.vimeo.com:443 in_progress resolver (satisfied)] resolver is complete
2016-09-21 15:12:30.682285 VimeoNetworkingExample-iOS[15673:209006] [] nw_endpoint_resolver_update [2 api.vimeo.com:443 in_progress resolver (satisfied)] Adding endpoint handler for 104.156.85.217:443
2016-09-21 15:12:30.682706 VimeoNetworkingExample-iOS[15673:209006] [] nw_endpoint_resolver_update [2 api.vimeo.com:443 in_progress resolver (satisfied)] Adding endpoint handler for 23.235.37.217:443
2016-09-21 15:12:30.682958 VimeoNetworkingExample-iOS[15673:209006] [] nw_endpoint_resolver_update [2 api.vimeo.com:443 in_progress resolver (satisfied)] Adding endpoint handler for 23.235.33.217:443
2016-09-21 15:12:30.683383 VimeoNetworkingExample-iOS[15673:209006] [] nw_endpoint_resolver_update [2 api.vimeo.com:443 in_progress resolver (satisfied)] Adding endpoint handler for 104.156.81.217:443
2016-09-21 15:12:30.683732 VimeoNetworkingExample-iOS[15673:209006] [] nw_endpoint_resolver_update [2 api.vimeo.com:443 in_progress resolver (satisfied)] Updated endpoint list is (104.156.85.217:443,23.235.37.217:443,23.235.33.217:443,104.156.81.217:443)
2016-09-21 15:12:30.684152 VimeoNetworkingExample-iOS[15673:209006] [] nw_connection_endpoint_report [2 api.vimeo.com:443 in_progress resolver (satisfied)] reported event resolver:receive_dns
2016-09-21 15:12:30.684669 VimeoNetworkingExample-iOS[15673:209006] [] nw_endpoint_resolver_start_next_child [2 api.vimeo.com:443 in_progress resolver (satisfied)] starting child endpoint 104.156.85.217:443
2016-09-21 15:12:30.685280 VimeoNetworkingExample-iOS[15673:209006] [] nw_host_stats_add_src recv too small, received 24, expected 28
2016-09-21 15:12:30.686136 VimeoNetworkingExample-iOS[15673:209006] [] nw_endpoint_resolver_start_next_child [2 api.vimeo.com:443 in_progress resolver (satisfied)] starting next child endpoint in 250ms
2016-09-21 15:12:30.686827 VimeoNetworkingExample-iOS[15673:209006] [] nw_endpoint_handler_start [2.1 104.156.85.217:443 initial path (null)]
2016-09-21 15:12:30.687856 VimeoNetworkingExample-iOS[15673:209006] [] nw_endpoint_resolver_receive_report [2 api.vimeo.com:443 in_progress resolver (satisfied)] received child report:[2.1 104.156.85.217:443 initial path (null)]
2016-09-21 15:12:30.688333 VimeoNetworkingExample-iOS[15673:209006] [] nw_connection_endpoint_report [2.1 104.156.85.217:443 initial path (null)] reported event path:start
2016-09-21 15:12:30.689543 VimeoNetworkingExample-iOS[15673:209006] [] nw_endpoint_handler_path_change [2.1 104.156.85.217:443 waiting path (satisfied)]
2016-09-21 15:12:30.690102 VimeoNetworkingExample-iOS[15673:209006] [] nw_endpoint_resolver_receive_report [2 api.vimeo.com:443 in_progress resolver (satisfied)] received child report:[2.1 104.156.85.217:443 waiting path (satisfied)]
2016-09-21 15:12:30.690673 VimeoNetworkingExample-iOS[15673:209006] [] nw_connection_endpoint_report [2.1 104.156.85.217:443 waiting path (satisfied)] reported event path:satisfied
2016-09-21 15:12:30.691163 VimeoNetworkingExample-iOS[15673:209006] [] nw_endpoint_proxy_handler_should_use_proxy Looking up proxy for hostname: , ifindex: 0
2016-09-21 15:12:30.696191 VimeoNetworkingExample-iOS[15673:209006] [] -[NWConcrete_nw_endpoint_flow startWithHandler:] [2.1 104.156.85.217:443 waiting socket-flow (satisfied)]
2016-09-21 15:12:30.696429 VimeoNetworkingExample-iOS[15673:209006] [] nw_endpoint_flow_setup_socket [2.1 104.156.85.217:443 in_progress socket-flow (satisfied)] creating socket
2016-09-21 15:12:30.696615 VimeoNetworkingExample-iOS[15673:209006] [] nw_endpoint_flow_attach_protocols [2.1 104.156.85.217:443 in_progress socket-flow (satisfied)]
2016-09-21 15:12:30.696933 VimeoNetworkingExample-iOS[15673:209006] [] __nwlog_err_simulate_crash simulate crash already simulated "nw_socket_set_common_sockopts setsockopt SO_NOAPNFALLBK failed: [42] Protocol not available"
2016-09-21 15:12:30.697245 VimeoNetworkingExample-iOS[15673:209006] [] nw_socket_set_common_sockopts setsockopt SO_NOAPNFALLBK failed: [42] Protocol not available, dumping backtrace:
[x86_64] libnetcore-856.1.8
0 libsystem_network.dylib 0x0000000104d8b80e __nw_create_backtrace_string + 123
1 libnetwork.dylib 0x000000010525f194 nw_socket_add_input_handler + 3002
2 libnetwork.dylib 0x000000010523cdb8 nw_endpoint_flow_attach_protocols + 3768
3 libnetwork.dylib 0x000000010523bdd5 nw_endpoint_flow_setup_socket + 563
4 libnetwork.dylib 0x000000010523ab34 -[NWConcrete_nw_endpoint_flow startWithHandler:] + 2612
5 libnetwork.dylib 0x0000000105255d11 nw_endpoint_handler_path_change + 1261
6 libnetwork.dylib 0x0000000105255740 nw_endpoint_handler_start + 570
7 libnetwork.dylib 0x000000010526d003 nw_endpoint_resolver_start_next_child + 2240
8 libdispatch.dylib 0x000000
2016-09-21 15:12:30.707102 VimeoNetworkingExample-iOS[15673:209006] [] nw_endpoint_flow_attach_protocols [2.1 104.156.85.217:443 in_progress socket-flow (satisfied)] Attached flow protocol
2016-09-21 15:12:30.712300 VimeoNetworkingExample-iOS[15673:209006] [] nw_endpoint_resolver_receive_report [2 api.vimeo.com:443 in_progress resolver (satisfied)] received child report:[2.1 104.156.85.217:443 in_progress socket-flow (satisfied)]
2016-09-21 15:12:30.713079 VimeoNetworkingExample-iOS[15673:209006] [] nw_connection_endpoint_report [2.1 104.156.85.217:443 in_progress socket-flow (satisfied)] reported event flow:start_connect
2016-09-21 15:12:30.764614 VimeoNetworkingExample-iOS[15673:209006] [] nw_socket_handle_socket_event Event mask: 0x800
2016-09-21 15:12:30.764876 VimeoNetworkingExample-iOS[15673:209006] [] nw_socket_handle_socket_event Socket received CONNECTED event
2016-09-21 15:12:30.765133 VimeoNetworkingExample-iOS[15673:209006] [] nw_socket_setup_notsent_lowat Set TCP_NOTSENT_LOWAT(16384)
2016-09-21 15:12:30.765399 VimeoNetworkingExample-iOS[15673:209006] [] nw_endpoint_flow_protocol_connected [2.1 104.156.85.217:443 in_progress socket-flow (satisfied)] Output protocol connected
2016-09-21 15:12:30.766016 VimeoNetworkingExample-iOS[15673:209006] [] nw_endpoint_flow_connected_path_change [2.1 104.156.85.217:443 ready socket-flow (satisfied)]
2016-09-21 15:12:30.766193 VimeoNetworkingExample-iOS[15673:209006] [] nw_endpoint_flow_connected_path_change [2.1 104.156.85.217:443 ready socket-flow (satisfied)] Connected path is satisfied
2016-09-21 15:12:30.766388 VimeoNetworkingExample-iOS[15673:209006] [] nw_endpoint_resolver_receive_report [2 api.vimeo.com:443 in_progress resolver (satisfied)] received child report:[2.1 104.156.85.217:443 ready socket-flow (satisfied)]
2016-09-21 15:12:30.768743 VimeoNetworkingExample-iOS[15673:209006] [] nw_connection_endpoint_report [2.1 104.156.85.217:443 ready socket-flow (satisfied)] reported event flow:finish_connect
2016-09-21 15:12:30.769346 VimeoNetworkingExample-iOS[15673:209006] [] nw_connection_endpoint_report [2 api.vimeo.com:443 ready resolver (satisfied)] reported event flow:finish_connect
2016-09-21 15:12:30.769622 VimeoNetworkingExample-iOS[15673:209006] [] nw_endpoint_resolver_receive_report [2 api.vimeo.com:443 ready resolver (satisfied)] received child report:[2.1 104.156.85.217:443 ready socket-flow (satisfied)]
2016-09-21 15:12:30.770129 VimeoNetworkingExample-iOS[15673:209006] [] nw_connection_endpoint_report [2.1 104.156.85.217:443 ready socket-flow (satisfied)] reported event flow:changed_viability
2016-09-21 15:12:30.770506 VimeoNetworkingExample-iOS[15673:209006] [] nw_connection_endpoint_report [2 api.vimeo.com:443 ready resolver (satisfied)] reported event flow:changed_viability
2016-09-21 15:12:30.770979 VimeoNetworkingExample-iOS[15673:209013] [] __tcp_connection_start_block_invoke 2 sending event TCP_CONNECTION_EVENT_CONNECTED in response to state ready and error (null)
2016-09-21 15:12:30.771479 VimeoNetworkingExample-iOS[15673:209013] [] tcp_connection_event_notify 2 event: TCP_CONNECTION_EVENT_CONNECTED, reason: nw_connection event, should deliver: true
2016-09-21 15:12:30.772697 VimeoNetworkingExample-iOS[15673:209013] [] nw_endpoint_start_tls_while_connected [2.1 104.156.85.217:443 ready socket-flow (satisfied)]
2016-09-21 15:12:30.772983 VimeoNetworkingExample-iOS[15673:209013] [] nw_endpoint_start_tls_while_connected [2.1 104.156.85.217:443 ready socket-flow (satisfied)] Using CoreTLS
2016-09-21 15:12:30.773328 VimeoNetworkingExample-iOS[15673:209013] [] nw_endpoint_start_tls_while_connected [2.1 104.156.85.217:443 ready socket-flow (satisfied)] Set custom TLS client queue
2016-09-21 15:12:30.773628 VimeoNetworkingExample-iOS[15673:209013] [] nw_endpoint_start_tls_while_connected [2.1 104.156.85.217:443 ready socket-flow (satisfied)] Set custom TLS prepare handler
2016-09-21 15:12:30.773975 VimeoNetworkingExample-iOS[15673:209013] [] nw_endpoint_start_tls_while_connected [2.1 104.156.85.217:443 ready socket-flow (satisfied)] Set custom TLS message handler
2016-09-21 15:12:30.774261 VimeoNetworkingExample-iOS[15673:209013] [] nw_endpoint_start_tls_while_connected [2.1 104.156.85.217:443 ready socket-flow (satisfied)] Attached TLS protocol to connected flow
2016-09-21 15:12:30.774576 VimeoNetworkingExample-iOS[15673:209013] [] nw_endpoint_resolver_receive_report [2 api.vimeo.com:443 ready resolver (satisfied)] received child report:[2.1 104.156.85.217:443 in_progress socket-flow (satisfied)]
2016-09-21 15:12:30.774781 VimeoNetworkingExample-iOS[15673:209013] [] nw_connection_endpoint_report [2.1 104.156.85.217:443 in_progress socket-flow (satisfied)] reported event flow:start_secondary_connect
2016-09-21 15:12:30.775167 VimeoNetworkingExample-iOS[15673:209013] [] nw_connection_endpoint_report [2 api.vimeo.com:443 in_progress resolver (satisfied)] reported event flow:start_secondary_connect
2016-09-21 15:12:30.775552 VimeoNetworkingExample-iOS[15673:209013] [] nw_endpoint_resolver_receive_report [2 api.vimeo.com:443 in_progress resolver (satisfied)] received child report:[2.1 104.156.85.217:443 in_progress socket-flow (satisfied)]
2016-09-21 15:12:30.775901 VimeoNetworkingExample-iOS[15673:209013] [] nw_connection_endpoint_report [2.1 104.156.85.217:443 in_progress socket-flow (satisfied)] reported event flow:start_connect
2016-09-21 15:12:30.776289 VimeoNetworkingExample-iOS[15673:209013] [] nw_connection_endpoint_report [2 api.vimeo.com:443 in_progress resolver (satisfied)] reported event flow:start_connect
2016-09-21 15:12:30.776515 VimeoNetworkingExample-iOS[15673:209013] [] nw_endpoint_flow_protocol_connected [2.1 104.156.85.217:443 in_progress socket-flow (satisfied)] Transport protocol connected
2016-09-21 15:12:30.776861 VimeoNetworkingExample-iOS[15673:209013] [] nw_endpoint_resolver_receive_report [2 api.vimeo.com:443 in_progress resolver (satisfied)] received child report:[2.1 104.156.85.217:443 in_progress socket-flow (satisfied)]
2016-09-21 15:12:30.777385 VimeoNetworkingExample-iOS[15673:209013] [] nw_connection_endpoint_report [2.1 104.156.85.217:443 in_progress socket-flow (satisfied)] reported event flow:finish_transport
2016-09-21 15:12:30.777731 VimeoNetworkingExample-iOS[15673:209013] [] nw_connection_endpoint_report [2 api.vimeo.com:443 in_progress resolver (satisfied)] reported event flow:finish_transport
2016-09-21 15:12:30.821279 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_flow_protocol_connected [2.1 104.156.85.217:443 in_progress socket-flow (satisfied)] Output protocol connected
2016-09-21 15:12:30.822318 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_flow_connected_path_change [2.1 104.156.85.217:443 ready socket-flow (satisfied)]
2016-09-21 15:12:30.822578 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_flow_connected_path_change [2.1 104.156.85.217:443 ready socket-flow (satisfied)] Connected path is satisfied
2016-09-21 15:12:30.822866 VimeoNetworkingExample-iOS[15673:209000] [] nw_endpoint_resolver_receive_report [2 api.vimeo.com:443 in_progress resolver (satisfied)] received child report:[2.1 104.156.85.217:443 ready socket-flow (satisfied)]
2016-09-21 15:12:30.823091 VimeoNetworkingExample-iOS[15673:209000] [] nw_connection_endpoint_report [2.1 104.156.85.217:443 ready socket-flow (satisfied)] reported event flow:finish_connect
2016-09-21 15:12:30.823291 VimeoNetworkingExample-iOS[15673:209000] [] nw_connection_endpoint_report [2 api.vimeo.com:443 ready resolver (satisfied)] reported event flow:finish_connect
2016-09-21 15:12:30.823575 VimeoNetworkingExample-iOS[15673:209013] [] __tcp_connection_start_block_invoke 2 sending event TCP_CONNECTION_EVENT_TLS_HANDSHAKE_COMPLETE in response to state ready and error (null)
2016-09-21 15:12:30.825514 VimeoNetworkingExample-iOS[15673:209013] [] tcp_connection_event_notify 2 event: TCP_CONNECTION_EVENT_TLS_HANDSHAKE_COMPLETE, reason: nw_connection event, should deliver: true
2016-09-21 15:12:30.825763 VimeoNetworkingExample-iOS[15673:209013] [] tcp_connection_get_statistics DNS: 9ms/13ms since start, TCP: 64ms/106ms since start, TLS: 48ms/152ms since start
2016-09-21 15:12:31.289006 VimeoNetworkingExample-iOS[15673:208960] subsystem: com.apple.Accessibility, category: ElementTraversal, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0
starting next page request
next page request completed!
2016-09-21 15:13:01.624348 VimeoNetworkingExample-iOS[15673:209056] [] tcp_connection_cancel 1
2016-09-21 15:13:01.625105 VimeoNetworkingExample-iOS[15673:209007] [] nw_socket_handle_socket_event Event mask: 0x4
2016-09-21 15:13:01.625476 VimeoNetworkingExample-iOS[15673:209007] [] nw_socket_handle_socket_event Socket received WRITE_CLOSE event
2016-09-21 15:13:01.626013 VimeoNetworkingExample-iOS[15673:209007] [] nw_endpoint_handler_cancel [1 api.vimeo.com:443 ready resolver (satisfied)]
2016-09-21 15:13:01.626482 VimeoNetworkingExample-iOS[15673:209007] [] nw_endpoint_handler_cancel [1.1 104.156.85.217:443 ready socket-flow (satisfied)]
2016-09-21 15:13:01.627047 VimeoNetworkingExample-iOS[15673:209007] [] __nw_socket_service_writes_block_invoke sendmsg(fd 7, 31 bytes): socket has been closed
2016-09-21 15:13:01.627437 VimeoNetworkingExample-iOS[15673:209007] [] nw_endpoint_flow_protocol_error [1.1 104.156.85.217:443 cancelled socket-flow (null)] Socket protocol sent error: [32] Broken pipe
2016-09-21 15:13:01.627816 VimeoNetworkingExample-iOS[15673:209007] [] nw_endpoint_flow_protocol_disconnected [1.1 104.156.85.217:443 cancelled socket-flow (null)] Output protocol disconnected
2016-09-21 15:13:01.628076 VimeoNetworkingExample-iOS[15673:209007] [] nw_endpoint_handler_cancel [1.2 23.235.37.217:443 initial path (null)]
2016-09-21 15:13:01.628393 VimeoNetworkingExample-iOS[15673:209007] [] nw_endpoint_handler_cancel [1.3 23.235.33.217:443 initial path (null)]
2016-09-21 15:13:01.628717 VimeoNetworkingExample-iOS[15673:209007] [] nw_endpoint_handler_cancel [1.4 104.156.81.217:443 initial path (null)]
2016-09-21 15:13:01.629040 VimeoNetworkingExample-iOS[15673:209007] [] nw_resolver_cancel_on_queue 0x600000108700
2016-09-21 15:13:01.629379 VimeoNetworkingExample-iOS[15673:209007] [] -[NWConcrete_tcp_connection dealloc] 1
2016-09-21 15:13:05.901352 VimeoNetworkingExample-iOS[15673:209056] [] tcp_connection_cancel 2
2016-09-21 15:13:05.902297 VimeoNetworkingExample-iOS[15673:209007] [] nw_socket_handle_socket_event Event mask: 0x4
2016-09-21 15:13:05.902714 VimeoNetworkingExample-iOS[15673:209007] [] nw_socket_handle_socket_event Socket received WRITE_CLOSE event
2016-09-21 15:13:05.903199 VimeoNetworkingExample-iOS[15673:209007] [] nw_endpoint_handler_cancel [2 api.vimeo.com:443 ready resolver (satisfied)]
2016-09-21 15:13:05.903641 VimeoNetworkingExample-iOS[15673:209007] [] nw_endpoint_handler_cancel [2.1 104.156.85.217:443 ready socket-flow (satisfied)]
2016-09-21 15:13:05.904207 VimeoNetworkingExample-iOS[15673:209007] [] __nw_socket_service_writes_block_invoke sendmsg(fd 9, 31 bytes): socket has been closed
2016-09-21 15:13:05.904636 VimeoNetworkingExample-iOS[15673:209007] [] nw_endpoint_flow_protocol_error [2.1 104.156.85.217:443 cancelled socket-flow (null)] Socket protocol sent error: [32] Broken pipe
2016-09-21 15:13:05.904961 VimeoNetworkingExample-iOS[15673:209007] [] nw_endpoint_flow_protocol_disconnected [2.1 104.156.85.217:443 cancelled socket-flow (null)] Output protocol disconnected
2016-09-21 15:13:05.905254 VimeoNetworkingExample-iOS[15673:209007] [] nw_endpoint_handler_cancel [2.2 23.235.37.217:443 initial path (null)]
2016-09-21 15:13:05.905586 VimeoNetworkingExample-iOS[15673:209007] [] nw_endpoint_handler_cancel [2.3 23.235.33.217:443 initial path (null)]
2016-09-21 15:13:05.905774 VimeoNetworkingExample-iOS[15673:209007] [] nw_endpoint_handler_cancel [2.4 104.156.81.217:443 initial path (null)]
2016-09-21 15:13:05.906078 VimeoNetworkingExample-iOS[15673:209007] [] nw_resolver_cancel_on_queue 0x600000109c60
2016-09-21 15:13:05.906394 VimeoNetworkingExample-iOS[15673:209007] [] -[NWConcrete_tcp_connection dealloc] 2

ITMS-90809: Deprecated API Usage

Hi guys.
My app uses VimeoNetworking which works great. Thank you.
However, when uploading app to appstoreconnect, I'm receiving message from apple:
ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs . See https://developer.apple.com/documentation/uikit/uiwebview for more information.

This message appears because VimeoNetworking uses AFNetworking. And AFNetworking use UIWebView APIs.

Do you know if AFNetworking already removed or going to remove deprecated API ?
Or maybe you plan to replace AFNetworking ?
Otherwise, application will not be accepted by AppStore.

How to get Albums?

The latest version's model doesn't include Album - what should I use to get albums? Thank you!

Is VideoFiles still a supported Scope?

I have a Pro account and I'm trying to play videos from the files array as mentioned here: vimeo/PlayerKit#29

However, VideoFiles seems to no longer be a case for the Scope enum.

Is there another way to access that link URL in the files array?

screen shot 2018-08-23 at 2 46 47 pm

Always getting 404

`import VimeoNetworking
fileprivate func initVemo() {
    
    
    let appConfiguration = AppConfiguration(
    clientIdentifier: "myclientID", //"Your client identifier goes here",
    clientSecret: "mysecret", //"Your client secret goes here",
    scopes: [.Public], //, .Private, .Interact],
    keychainService: "KeychainServiceVimeo")
    
    let vimeoClient = VimeoClient(appConfiguration: appConfiguration, configureSessionManagerBlock: nil)
   
    let authenticationController = AuthenticationController(client: vimeoClient, appConfiguration: appConfiguration, configureSessionManagerBlock: nil)

    authenticationController.clientCredentialsGrant { result in
        switch result {
                        
        case .success(let account):
            print("Successfully authenticated with account: \(account)")
                        
            
            let videoRequest = Request<VIMVideo>(path: "/videos/383661322")

            vimeoClient.request(videoRequest) { result in
                switch result {
                case .success(let response):
                    let video: VIMVideo = response.model
                    print("retrieved video: \(video)")
                case .failure(let error ):
                    print("error retrieving video: \(error)")
                }
            }
            
            
            
        case .failure(let error):
            print("error authenticating: \(error)")
            
            
        }
    }
}`

Missing VIMUpload file/class

I have pulled the master branch, and when I try to compile I get the following error:

VimeoNetworking/Sources/Models/VIMVideo.m:153:17: Receiver 'VIMUpload' for class message is a forward declaration

I cannot find the VIMUpload file or class. Looking at the Models folder, looks like VIMSizeQuota and VIMUploadQuota (both .h and .m) files are expected but missing.

Is there a different branch I should be using? I want to use VimeoNetworking with VimeoUpload.

iOS Example app not compiling due to minimum deployment target

Compiling the iOS Example leads to compile error:
Compiling for iOS 9.0, but module 'VimeoNetworking' has a minimum deployment target of iOS 10.3: /Users/davidbemerguy/Library/Developer/Xcode/DerivedData/VimeoNetworking-ehdrjazwcfjehebpihhnbpxkhzlm/Build/Products/Debug-iphonesimulator/VimeoNetworking.framework/Modules/VimeoNetworking.swiftmodule/x86_64.swiftmodule

cannot get authorize only with access token

The following example is wrong, there is no initializer without AppConfiguration.

let authenticationController = AuthenticationController(client: vimeoClient)
authenticationController.accessToken("your_access_tocken") { result in
switch result
{
case .Success(let account):
print("authenticated successfully: (account)")
case .Failure(let error):
print("failure authenticating: (error)")
}
}

In Android I need only an access token to get video streams, but in iOS there is an issue.

How can I download URL stream by video Id on iOS ?

Thanks!

How to use in Objective C

Hi,
I want to vimeo integration in Objective C? I have to upload video on vimeo server. Please guide me.
Thanks.

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.