Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8735539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:04:57+00:00 2026-06-13T10:04:57+00:00

I am experimenting with the Social Framework. I was wondering if there is any

  • 0

I am experimenting with the Social Framework.
I was wondering if there is any possible way to attach the last photo taken and currently saved in the camera roll using this implementation from my app:

 - (IBAction)shareByActivity:(id)sender {
    NSArray *activityItems;

    if (self.sharingImage != nil) {
        activityItems = @[self.sharingImage, self.sharingText, self.addURL];
    } else {
        activityItems = @[self.sharingText, self.addURL];
    }

    UIActivityViewController *activityController =
    [[UIActivityViewController alloc] initWithActivityItems:activityItems
                                      applicationActivities:nil];

    [self presentViewController:activityController
                       animated:YES completion:nil];
}

If so how do I modify the shareImage name in this specific portion of my -(void)viewDidLoad ?

self.sharingImage = [UIImage imageNamed:@"notSureWhatToPutHere"];

Everything works well, the social panel opens and has all the needed service. My only request is to find out how to call the latest image from the camera roll.
I am not sure if I need the image real name or if there is any other way to achieve what i would like: a post with a picture attached (most recent picture in camera roll).

Any help is appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T10:04:58+00:00Added an answer on June 13, 2026 at 10:04 am

    You can pretty painlessly get the last image in the camera roll using the asset library framework. Give this a try:

    #import <AssetsLibrary/AssetsLibrary.h>
    

    Then to get the image:

    ALAssetsLibrary *cameraRoll = [[ALAssetsLibrary alloc] init];
    [cameraRoll enumerateGroupsWithTypes:ALAssetsGroupSavedPhotos usingBlock:^(ALAssetsGroup *images, BOOL *stop) {
        [images setAssetsFilter:[ALAssetsFilter allPhotos]];
        [images enumerateAssetsAtIndexes:[NSIndexSet indexSetWithIndex:[images numberOfAssets] - 1] options:0 usingBlock:^(ALAsset *result, NSUInteger index, BOOL *stop){
            if (result) {
                ALAssetRepresentation *rep = [result defaultRepresentation];
                self.sharingImage = [UIImage imageWithCGImage:[rep fullScreenImage]];
            }
        }];
    
    
    }
                            failureBlock: ^(NSError *error) {
                                NSLog(@"An error occured: %@",error);
                            }];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From experimenting with the r.js optimizer, it seems that there is no way for
I'm experimenting by making a social network from scratch in PHP/MySQL, but I'm having
I'm experimenting for the first time with JQuery/JQUI to create a simple social icon
Experimenting with android game development. I'm using PNG format for images, and was wondering
I've been experimenting with Rhino Mocks for unit testing my .Net Compact Framework application,
I'm experimenting with SWFUpload ( http://swfupload.org ) and I'm wondering if, in PHP, its
Experimenting with Swing, I learnt that there are two ways of using JOptionPane and
Experimenting with arrays and wondering why the following DOESN'T seem to print the values
Experimenting with existential types. Seems to be a great way to get some type
I'm currently experimenting with custom (level 2 DOM) events and I've now arrived at

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.