We have launched a new Objective C / Cocoa client library!

As you know, the Kaltura server provides an API that can be used to access all its functionality. These APIs are REST based (or REST-ful), this means that in order to execute an API call, you can just retrieve a URL, like you’d open a webpage.
Any language that can retrieve data from a URL can work with our system, meaning almost all possible programming languages.

However, in practice it would require a fair amount of effort to put together the correct URLs and to interpret the results that come back. This is where client libraries come in. These libraries are created by Kaltura in a variety of programming languages, to make it easier to use the Kaltura API.  Also, as experts in our own APIs, we create these in the best possible way, so everything should work faster and better.

All our client libraries are available to download here (or under http://[YourKalturaServer]/api_v3/testme/client-libs.php).

The new objective C library enables native iOS / Mac-OS applications to use the Kaltura API. As all other client libraries, this library is auto-generated, and therefore always updated with the latest API changes. This library is bundled with a static library Xcode project, for easy integration with existing projects.

Kaltura on iPhone


This is probably one of the best Kaltura client libraries to date, for the following reasons:

  1. Performance
    • The server response is parsed as it arrives rather than waiting for the entire response to arrive before parsing. For example, let’s assume the library is used to execute an API request asking for a big list of video titles. The response will be delivered back in several chunks. When the first chunk arrives, the client library can immediately start processing it, rather than waiting for the complete list. Depending on the size of the list this could result in a dramatic improvement in the speed experienced by the end user.
    • Support for asynchronous mode – allows the processing of API requests to occur in the background while the application UI remains active (without the need to spawn additional threads)
    • Support for multi-request – like all other Kaltura client libraries, this library has built-in support for multi-request. Multi-requests enable the client application to pack several API calls together, reducing the number of round trips to Kaltura.
    • Optimized to perform the bare minimum of memory copy operations, for maximum performance and minimum CPU utilization
  2. Bandwidth
    • Supports gzip compressed responses – the gzip compression significantly reduces the response size, saving both bandwidth and time (especially when using a slow connection)
  3. Memory usage
    • The library was optimized to reduce its memory consumption to the minimum, both the request and response parameters are stored in memory only once, while executing the API call
  4. Testing
    • Thoroughly tested with over 40 different test cases, including instrumentation for memory leak detection

Here you can download the library and create your first Kaltura powered iPhone application.

Stay tuned for more news and updates on the mobile front.

Share this
Share on FacebookTweet about this on TwitterShare on LinkedInShare on Google+Email this to someone

Website Comments

  1. Pooja

    Does this library supports live video streaming from IOS device to RTMP server? I have tested the code but in it we can record the video and then can upload it. Video is not being streamed live.

    Kindly reply ASAP.

    Thanks a lot.

  2. Eran Kornblau

    It appears the PHP code got stripped while pasting it in the comment ;(.
    So, I guess we can use option #1:
    #define KALTURA_CLIENT_TEST_URL (@”http://www.kaltura.com/clientTest”)


  3. Eran Kornblau

    Don’t think you can comment it out, it will most likely break quite a few tests. I think it would be easier either to use the kaltura.com version (as I previously wrote) or set it up locally:
    1. paste the following in api_v3/web/clientTest.php under your Kaltura installation (by default it will be /opt/kaltura/app/api_v3/web/clientTest.php):
    die(‘responseBuffer too big !’);

    if ($responseBuffer == ” ||
    (substr($responseBuffer, 0, 13) == ” && substr($responseBuffer, -15) == ”))
    echo $responseBuffer;

    2. add the following apache rewrite rule:
    RewriteRule clientTest/api_v3/index.php /api_v3/web/clientTest.php [L]
    3. verify that it works by building a URL such as:
    and make sure you get back the value of responseBuffer ( in this case)

    Regarding the thumbnail problem, I will need some more information – what is the error, the relevant Kaltura log section etc.


  4. Maziyar

    Hi Eran,

    Thanks for the reply,

    So is it OK to just change the Service URL to my own server and comment out the “[self startNextTest];”? Seems here only use TEST URL. Is it OK to not perform this or is it mandatory?

    And another question is about the thumbnail that every time I upload from iPhone it says error in Kaltura Server in thumbnail section. (it uploads both image and video)

    Is it possible that I miss something in my server? (Ubuntu Server 12.04 64-bit)

    Thank you

  5. Eran.Kornblau


    The default settings are:
    #define DEFAULT_SERVICE_URL (@”http://www.kaltura.com”)
    #define KALTURA_CLIENT_TEST_URL (@”http://www.kaltura.com/clientTest”)

    So, it should probably be http:///api_v3/web/clientTest.php. An apache rewrite rule redirects /clientTest/api_v3/index.php to api_v3/web/clientTest.php. Since this is a standalone script that is not related the Kaltura server installation, if you don’t have it, you can just run against the default URL on kaltura.com.


  6. Maziyar

    Hi everyone,

    Just to inform you that I’ve tested KalturaClientTester on Xcode 4.5 and iOS 6 on Kaltura CE v5.0 and it worked. It successfully uploaded the video on my self-hosted Kaltura which I installed on VMware on my laptop.

    The only problem here is I don’t know what this #define KALTURA_CLIENT_TEST_URL means. It shows me an error which I will paste it here but I think it’s because I don’t know what should I write in test URL. But everything on a server is good. It’s been uploaded and convert it. (only no thumbnail, it has error on that part).

    Thanks for any help.


    2012-10-20 17:53:19.466 kalturavideo[13156:c07] request url: http://mykalturavideo.com/api_v3/index.php?service=playlist&action=executeFromFilters
    2012-10-20 17:53:19.773 kalturavideo[13156:c07] api call took 0.31 seconds
    2012-10-20 17:53:19.773 kalturavideo[13156:c07] Running testSyncMultiReqFlow (2/50)…
    2012-10-20 17:53:19.875 kalturavideo[13156:c07] request url: http://mykalturavideo.com/api_v3/index.php?service=multirequest
    2012-10-20 17:53:21.212 kalturavideo[13156:c07] api call took 1.34 seconds
    2012-10-20 17:53:21.212 kalturavideo[13156:c07] -[NSError status]: unrecognized selector sent to instance 0x757cf60
    2012-10-20 17:53:21.214 kalturavideo[13156:c07] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[NSError status]: unrecognized selector sent to instance 0x757cf60’

  7. Ramkumar

    Hi all,

    I badly requires this library integrated for live video streaming from iphone to our server.Please help me with some samples and documents.Our requirement is live video streaming from iphone to our server

  8. lizardcircus

    Ok I installed CE5 from SVN because the download package and the VMware packages are completely FUBAR. SVN version installs fine. I am able to upload but on some check after it upload it fails with:
    [KalturaClientTester testUnknownNestedArrayObjectReturned]

    in this method:

    – (void)testUnknownNestedArrayObjectReturned
    self->_client.config.serviceUrl = KALTURA_CLIENT_TEST_URL;
    [self->_client.params addIfDefinedKey:@”responseBuffer” withString:@”KalturaBaseEntryListResponseUnknownObjectTypeabcdef”];
    KalturaBaseEntryListResponse* result = [self->_client.baseEntry list];
    assert(self->_client.error == nil); <—————————–this line
    assert(result.objects.count == 1);
    KalturaBaseEntry* entry = [result.objects objectAtIndex:0];
    assert([entry isKindOfClass:[KalturaBaseEntry class]]);
    assert([entry.id compare:@"abcdef"] == NSOrderedSame);

    on the iphone textbox says:
    testUnknownNestedArrayObjectReturned (3/50)

  9. Eran.Kornblau

    The media.add API is a pretty new API, it may not exist on your environment. You can check it by inspecting the value of self->_client.error in the debugger when the assertion fails. Or, by going to the testme console on your environment (URL is: /api_v3/testmeDoc/index.php, like http://www.kaltura.com/api_v3/testmeDoc/index.php). If you don’t have this API, you can still use the older APIs to upload entries, for example, invoke the media.upload action and then media.addFromUploadedFile.

  10. lizardcircus

    I think the media file is not being importet into the app, when I go through the files in the application’s folders I don’t see DemoVideo.flv anywhere
    though it’s in the Resources folder in the xocde project.

    seems to be this line:

    – (KalturaBaseEntry*)uploadEntryWithFileName:(NSString*)fileBase withFileExt:(NSString*)fileExt withMediaType:(int)mediaType
    NSString* fileName = [NSString stringWithFormat:@”%@.%@”, fileBase, fileExt];

    // return: object, params: object
    KalturaUploadToken* token = [[[KalturaUploadToken alloc] init] autorelease];
    token.fileName = fileName;
    token = [self->_client.uploadToken addWithUploadToken:token];
    assert(self->_client.error == nil);

    // return: object, params: object
    KalturaMediaEntry* entry = [[[KalturaMediaEntry alloc] init] autorelease];
    entry.name = fileName;
    entry.mediaType = mediaType;
    entry = [self->_client.media addWithEntry:entry];
    assert(self->_client.error == nil);<——————————this one

    thanks for helping Eran

  11. Eran.Kornblau

    Please check what the error code is, and on which line the assertion fails (there are many such error==nil assertions in the test code)
    My guess is that the client library tester uses APIs that are not yet available on CE…

  12. lizardcircus

    it’s a different xcode project, I figured it out it was set up to run the library not the application lol
    but the main project “Kaltura.xcodeproj” in the objc_client_library_02-04-2012 is set up to login against kaltura.com I’m trying to login to my CE server. it seems like it’s the administrator app for the server.

    the client tester project “KalturaClientTester.xcodeproj” just uploads a flv movie file to your server now I’m getting error

    KalturaClientTester[5442:f803] api call took 0.94 seconds
    Assertion failed: (self->_client.error == nil)

    it stops there, no video uploaded to the server
    url to server is correct


  13. Eran.Kornblau

    I tested on iOS SDK 4.x, although I don’t think that’s the issue here. I already bumped into this issue of the simulator not starting, but after closing everything deleting the temp files and starting over, it worked for me.
    I didn’t understand though – how come you get login failures if you couldn’t get the simulator to launch ?


  14. lizardcircus

    nope still won’t start the simulator, it build’s successfully though.
    Ideally I would like to get the Kaltura.xcodeproj to login against my CE version but I keep getting login failures. I have changed all references to kaltura.com to my CE server.

    I’m using CE3 and iOS SDK for 5.1

    Thanks Eran

  15. Eran.Kornblau

    In general, the client library can work against a CE version, but some of the APIs we have on our SaaS environment may not be available yet on Kaltura CE. APIs that are supported in the CE version you are using, will work from the Objective C client (or any other client for that matter). Regarding the second question, try closing xCode, delete all the temporary folders it created (like xcuserdata) and start it again.

  16. lizardcircus

    does this work on kaltura CE edition? I’m trying to get the kalturaclienttester to run in the simulator but it won’t start

    I’m kind of a noob at iOS dev

  17. Eran.Kornblau

    In the test code included with the objective C client library, there is a method that uploads an image / video – search for uploadEntryWithFileName in KalturaClientTester.m. This method returns the newly created Kaltura entry object, to get its id simply read the id property, for example:
    KalturaBaseEntry* imageEntry = [[self uploadEntryWithFileName:@”DemoImage” withFileExt:@”jpg” withMediaType:[KalturaMediaType IMAGE]];
    NSLog(@”Id is %@”, imageEntry.id);

  18. Vinay Kumar

    I Try a lot, I wants to get VideoID or Image ID which has genersting after uploading video & Images onto Kaltura Server, so Please help which method inside the Objective C code get Video & Images ID..?????????????

  19. Scott Terry

    Integrated this with my app, have some issues with tracking progress of uploads/downloads…

    Where is the forum for IOS Library?

Post a comment