YouTube API

Discussion in 'iOS Programming' started by yaniv92648, Mar 31, 2010.

  1. yaniv92648 macrumors member

    Joined:
    Oct 26, 2009
    #1
    Hi,
    i'd like to record a video in my app and upload it to my youTube account using the youTube API (not by email). i checked in this link
    gdata-objectivec-client - Project Hosting on Google Code
    the objective-c forum and the objective-c samples including the YouTubeSample which doesn't work.
    anyone has a (relatively) clear tutorial on how to upload videos to my youTube account? can someone post a relevant code?
    Thank you.
     
  2. Luke Redpath macrumors 6502a

    Joined:
    Nov 9, 2007
    Location:
    Colchester, UK
    #2
    When you say, "didn't work", what do you mean exactly?
     
  3. yaniv92648 thread starter macrumors member

    Joined:
    Oct 26, 2009
    #3
    i get an error saying:

    "target specifies product type 'com.apple.product-type.framework', but there's no such product type for the 'iphonesimulator' platform"
     
  4. Luke Redpath macrumors 6502a

    Joined:
    Nov 9, 2007
    Location:
    Colchester, UK
    #4
  5. fishkorp macrumors 68020

    fishkorp

    Joined:
    Apr 10, 2006
    Location:
    Ellicott City, MD
    #5
    I had to test all the GData stuff on actual device, it wouldn't work in the Simulator properly.
     
  6. yaniv92648 thread starter macrumors member

    Joined:
    Oct 26, 2009
    #6
    i linked according to : linking to the iphone static library..

    Hi,
    i defined "header search path" /usr/include/libxml2, and in "other linker flags" -ObjC -lxml2.
    i dragged the GData files from YouTubeSample including the GData.Framework within but it didn't compile so i added the GData.Framework as a reference and made it "Weak" in Project->Edit Active Target" on tab General.
    i imported:
    #import <GData/GData.h>
    #import <GData/GDataFeedPhotoAlbum.h>
    #import <GData/GDataFeedPhoto.h>
    #import <GData/GDataEntryYouTubeUpload.h>
    #import <GData/GDataServiceGoogleYouTube.h>
    #import <GData/GDataEntryPhotoAlbum.h>
    #import <GData/GDataEntryPhoto.h>
    in this method: - (GDataServiceGoogleYouTube *)youTubeService, the following line:
    service = [[GDataServiceGoogleYouTube alloc] init];
    gives EXC_BAD_ACCESS.
    anyone..? i'm kinda desperate about this..
    Thanks.
     
  7. Luke Redpath macrumors 6502a

    Joined:
    Nov 9, 2007
    Location:
    Colchester, UK
    #7
    Why are you still trying to use the framework? It won't work, as I already mentioned. You should be configuring it as a static library. Follow the instructions on the Google wiki.
     
  8. yaniv92648 thread starter macrumors member

    Joined:
    Oct 26, 2009
    #8
    but that's what i did..

    i followed the instructions of "Linking to the iPhone static library" to configure it as a static library but i guess i failed doing so. like i said, i defined "header search path" /usr/include/libxml2, and in "other linker flags" -ObjC -lxml2 and dragged the GData files from YouTubeSample. did i miss any settings configuration? because it still doesn't compile if i don't add the GData.Framework...
    Thank u Luke, i really appreciate it..
     

Share This Page