EzDevInfo.com

objectiveflickr

ObjectiveFlickr, a Flickr API framework for Objective-C

objectiveflickr Apple Mach-O Linker Error

Using ObjectiveFlickr, Xcode 4.5.2, iOS 6.

When compiling, it gets me:

Ld /Users/axu/Library/Developer/Xcode/DerivedData/Shutterbug-ecsrjcjimihxevguffdchwqnqtzf/Build/Products/Debug-iphonesimulator/Shutterbug.    app/Shutterbug normal i386
    cd /Users/axu/prj/ios/Shutterbug
    setenv IPHONEOS_DEPLOYMENT_TARGET 6.0
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.    app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.    app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk -    L/Users/axu/Library/Developer/Xcode/DerivedData/Shutterbug-ecsrjcjimihxevguffdchwqnqtzf/Build/Products/Debug-iphonesimulator -    F/Users/axu/Library/Developer/Xcode/DerivedData/Shutterbug-ecsrjcjimihxevguffdchwqnqtzf/Build/Products/Debug-iphonesimulator -filelist     /Users/axu/Library/Developer/Xcode/DerivedData/Shutterbug-ecsrjcjimihxevguffdchwqnqtzf/Build/Intermediates/Shutterbug.build/Debug-    iphonesimulator/Shutterbug.build/Objects-normal/i386/Shutterbug.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -    Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.0 /Users/axu/Library/Developer/Xcode/DerivedData/Shutterbug-    ecsrjcjimihxevguffdchwqnqtzf/Build/Products/Debug-iphonesimulator/ObjectiveFlickr/ObjectiveFlickr     /Users/axu/Library/Developer/Xcode/DerivedData/Shutterbug-ecsrjcjimihxevguffdchwqnqtzf/Build/Products/Debug-iphonesimulator/libObjectiveFlickr.a -    framework UIKit -framework Foundation -framework CoreGraphics -o /Users/axu/Library/Developer/Xcode/DerivedData/Shutterbug-    ecsrjcjimihxevguffdchwqnqtzf/Build/Products/Debug-iphonesimulator/Shutterbug.app/Shutterbug

clang: error: no such file or directory: '/Users/axu/Library/Developer/Xcode/DerivedData/Shutterbug-ecsrjcjimihxevguffdchwqnqtzf/Build/Products/Debug-    iphonesimulator/ObjectiveFlickr/ObjectiveFlickr'    

I don't know why it is asking a **/ObjectiveFlickr/ObjectiveFlickr which I never set anywhere.


Source: (StackOverflow)

ObjectiveFlickr - Post multiple photos on Flickr from NSMutable array error

I am making an app that lets users post to their Flickr photo streams. I am using ObjectiveFlickr to handle the authorization and posting process.

For posting a single picture i am using the following code:

if (isSinglePic) {
            UIImage *img = self.singlePic;
            NSData *JPEGData = UIImageJPEGRepresentation(img, 1.0);

            self.flickrRequest.sessionInfo = __kUploadImageStep;
            [self.flickrRequest uploadImageStream:[NSInputStream inputStreamWithData:JPEGData] suggestedFilename:self.descriptionTextField.text MIMEType:@"image/jpeg" arguments:[NSDictionary dictionaryWithObjectsAndKeys:@"0", @"is_public", nil]];

            //[NSDictionary dictionaryWithObjectsAndKeys:photoID, @"photo_id", @"PicknPost", @"title", @"via PicknPost", @"description", nil]]

            [UIApplication sharedApplication].idleTimerDisabled = YES;
        }

This works just fine. However, when i try to post multiple pics that i stored in a NSMutableArray, ObjectiveFlickr uploads only the first picture.

My code for posting multiple photos looks like this:

NSMutableArray *array = [[NSMutableArray alloc] initWithArray:picsToPost copyItems:YES];


            for (UIImage *imgToPost in array) {
                NSData *JPEGData = UIImageJPEGRepresentation(imgToPost, 1.0);

                self.flickrRequest.sessionInfo = __kUploadImageStep;
                [self.flickrRequest uploadImageStream:[NSInputStream inputStreamWithData:JPEGData] suggestedFilename:self.descriptionTextField.text MIMEType:@"image/jpeg" arguments:[NSDictionary dictionaryWithObjectsAndKeys:@"0", @"is_public", nil]];

                [UIApplication sharedApplication].idleTimerDisabled = YES;

Does anyone have an idea why the for-in statement doesn't work?

Any help would be appreciated.


Source: (StackOverflow)

Advertisements

Xcode nested Framework: Project header files not found

I am trying to build a Mac application that uses ObjectiveFlickr, and thus has it as a nested framework. I followed the setup guide on ObjectiveFlickr's page. Everything works fine until I have to validate my archived application.

Validating gives me the 'not single-bundle application' error. The solution to that seems to be to set 'skip install' to YES and to move the project header files from public to projected, for the nested framework. But if I do so, the framework can not find it's internal header files and my main application can find ObjectiveFlickr.h. (Related question: Shouldn't I keep ObjectiveFlickr.h as a public header file, since my main application needs to be able to find that one?)

I guess the solution lies in setting up some correct search paths for both projects. I have tried following the suggestion mentioned in Xcode 4 and nested projects — header files not found, but nothing has worked.

I am using Xcode 4.5.


Source: (StackOverflow)

Error when calling callAPIMethodWithGET in ObjectiveFlickr

I am trying to use ObjectiveFlickr with the following sample API call but my code ends with an EXC_BAD_ACCESS. I made sure that my key and shared secret exist in flickr:

OFFlickrAPIContext *context = [[OFFlickrAPIContext alloc] initWithAPIKey:apiKey sharedSecret:sharedSecret];    
OFFlickrAPIRequest *request = [[OFFlickrAPIRequest alloc] initWithAPIContext:context];
[request setDelegate:self];
[request callAPIMethodWithGET:@"flickr.photos.getRecent" arguments:[NSDictionary dictionaryWithObjectsAndKeys:@"1", @"per_page", nil]];

Source: (StackOverflow)

video shaing on flickr via iOS

I am following https://github.com/lukhnos/objectiveflickr to achieve the sharing on flickr functionlity.

The Library has methods to send input stream to flickr:

NSInputStream *imageStream = [NSInputStream inputStreamWithData:imageData];
[request uploadImageStream:imageStream suggestedFilename:@"Foobar.jpg" MIMEType:@"image/jpeg" arguments:[NSDictionary dictionaryWithObjectsAndKeys:@"0", @"is_public", nil]];

Since NSData is sent, I think changing the MIMEType will do the job. I am stuck with the invalid signature problem on the authentication process and cannot check it myself, but will solve it somehow. For now I just wanted to know that If I want to share video on flickr. Is that even possible?


Source: (StackOverflow)

Getting Flickr RecentActivity images

I want to retrieve Recent Activity images from flickr application, please any one suggest me how to retrieve that. thanks in advance.


Source: (StackOverflow)

Adding ObjectiveFlickr to Project

I'm trying to add the ObjectiveFlickr framework to my project.

I tried to follow these instructions:

Add ObjectiveFlickr.xcodeproj to your Mac project (from Xcode menu Project > Add to Project...)
On your app target, open the info window (using Get Info on the target), then in the General tab, add ObjectiveFlickr (library) to Direct Dependencies
Also, in the same window, add CFNetwork.framework to Linked Libraries
Drag libObjecitveFlickr.a to the target's Linked Binary With Libraries group
Open the Info window of your target again. Set Configuration to All Configurations, then in the Header Search Paths property, add these two paths, separately (<OF root> is where you checked out ObjectiveFlickr):

<OF root>/Source
<OF root>/LFWebAPIKit   

Use #import "ObjectiveFlickr.h" in your project

But, it seems these instructions were written for older versions of XCode (I use 4.6). I tried to "translate" these instructions to the newer version of XCode, but no matter what i do, libObjectiveFlickr.a stays in red and I get the following errors:

Undefined symbols for architecture armv7:
  "_SCNetworkReachabilityUnscheduleFromRunLoop", referenced from:
      -[LFSiteReachability stopChecking] in libObjectiveFlickr.a(LFSiteReachability.o)
  "_SCNetworkReachabilitySetCallback", referenced from:
      -[LFSiteReachability startChecking] in libObjectiveFlickr.a(LFSiteReachability.o)
  "_SCNetworkReachabilityCreateWithAddress", referenced from:
      -[LFSiteReachability networkConnectivityExists] in libObjectiveFlickr.a(LFSiteReachability.o)
      -[LFSiteReachability startChecking] in libObjectiveFlickr.a(LFSiteReachability.o)
  "_SCNetworkReachabilityScheduleWithRunLoop", referenced from:
      -[LFSiteReachability startChecking] in libObjectiveFlickr.a(LFSiteReachability.o)
  "_SCNetworkReachabilityGetFlags", referenced from:
      -[LFSiteReachability networkConnectivityExists] in libObjectiveFlickr.a(LFSiteReachability.o)
      -[LFSiteReachability startChecking] in libObjectiveFlickr.a(LFSiteReachability.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Source: (StackOverflow)

how to call viewWillAppear after redirecting from safari to view controller in IOS

I am using Flickr in my app. When I click on Flickr button it is redirecting to safari to login with Flickr and Authorization.

Then after successful authorization it is redirecting to my app. But after redirecting I want to call ViewWillAppear. I also set <UIApplicationDelegate> at my view. But it is not calling any of the below methods.

 -(void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:YES];

    NSLog(@"@@@@@@@@@@@@@@@@@@@@@Flickr Authorized is completed");
}
- (void)UIApplicationWillEnterForeground:(UIApplication *)application
{
    NSLog(@"@@@@@@@@@@@@@@@@@@@@@Flickr Authorized is completed at foreground");
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
    /*
     Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
     */
    NSLog(@"@@@@@@@@@@@@@@@@@@@@@Flickr Authorized is completed at become active");
}
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
    NSLog(@"@@@@@@@@@@@@@@@@@@@@@@Flickr Authorized is completed at openURL");
}
-(void)viewWillAppear:(BOOL)animated
{
    NSLog(@"@@@@@@@@@@@@@@@@@@@@@Flickr Authorized is completed at viewWillAppear");

    [super viewWillAppear:YES];
}

But Below method is calling after redirecting from safari at AppDelegate. I have used Code from SnapAndRun flickr sample.

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
    NSLog(@"@@@@@@@@@@@@@@@@@@@@@@Call Back Here@@@@@@@@@@@");

    if ([self flickrRequest].sessionInfo)
    {
        // already running some other request
        NSLog(@"Already running some other request");
    }
    else {
        NSString *token = nil;
        NSString *verifier = nil;
        BOOL result = OFExtractOAuthCallback(url, [NSURL URLWithString:SRCallbackURLBaseString], &token, &verifier);

        if (!result) {
            NSLog(@"Cannot obtain token/secret from URL: %@", [url absoluteString]);
            return NO;
        }

        [self flickrRequest].sessionInfo = kGetAccessTokenStep;
        [flickrRequest fetchOAuthAccessTokenWithRequestToken:token verifier:verifier];
        [activityIndicator startAnimating];
        //[viewController.view addSubview:progressView];
    }

    return YES;
}

I know that we can call my view controllers method here. But Is there any alternative for default delegate method to be called after redirecting at my view itself.

Any Suggestions will be appreciated. Thanks in Advance.


Source: (StackOverflow)

iOS Flicker API to simply upload a public image? [closed]

Is there suppose to be a Flickr API (provided by Flickr)?

If not, i see a couple of flickr "kits" on GitHub (objectiveflickr and flickrkit). Which is preferred?

Or maybe it is better to just write my own custom routine (all i need to do is authenticate (if required) and upload an image)?

Your thoughts appreciated.


Source: (StackOverflow)

ObjectiveFlickr & Xcode 4.5.2

I'm attempting to integrate ObjectiveFlickr into my project - everything seems to run fine, however as soon as I execute the following:

[request callAPIMethodWithGET:@"flickr.photos.getRecent" arguments:[NSDictionary dictionaryWithObjectsAndKeys:@"1", @"per_page", nil]]

I get an exc bad access error. I've been trying to figure this out for a while and any help appreciated.


Source: (StackOverflow)

objectiveflickr authentication fails

I've setup the ObjectiveFlickr according to the documentations, and i've wrote this block in a button action

OFFlickrAPIContext *context = [[OFFlickrAPIContext alloc] initWithAPIKey:FLICKR_API_KEY sharedSecret:FLICKR_API_SHARED_SECRET];
OFFlickrAPIRequest *request = [[OFFlickrAPIRequest alloc] initWithAPIContext:context];
[request setDelegate:self];
[request fetchOAuthRequestTokenWithCallbackURL: [NSURL URLWithString:FLICKR_CALLBACK]];

but when i click on the button nothings happens

- (void)flickrAPIRequest:(OFFlickrAPIRequest *)inRequest didObtainOAuthRequestToken:(NSString *)inRequestToken secret:(NSString *)inSecret

does not get called, pretty much nothing happens


Source: (StackOverflow)