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

  • SEARCH
  • Home
  • 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 7952925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:00:34+00:00 2026-06-04T03:00:34+00:00

I am new to iPhone development.Currently I am working on an application in which

  • 0

I am new to iPhone development.Currently I am working on an application in which I need to send an image as well as text. So I thought of using json technology by sending the string as json data. Now I need to append this image to this string. Can anyone suggest a method to do this?

This application should also be able to bump with an android phone. Is there any method to do this?
I heard of converting the image to base64 and send as string. Is that the right method to do it?

  • 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-04T03:00:36+00:00Added an answer on June 4, 2026 at 3:00 am

    converting image to base64 is the right method for this. please have look at following code snippet

    public String convertToBase64(Bitmap bm){
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        bm.compress(Bitmap.CompressFormat.PNG, 100, baos);
        byte[] image = baos.toByteArray();
    
        String encodedImage = Base64.encodeToString(image, Base64.DEFAULT);
        return encodedImage;
    }
    

    You can use this string to send through JSON data

    Edited Part
    For iPhone Try this code

    -(NSString *)getStringFromImage:(UIImage *)image{
    
     if(image){
    
      NSData *dataObj = UIImagePNGRepresentation(image);
    
       return [dataObj base64Encoding];
    
       } else {
    
      return @"";
    
     }
    }
    

    Hope this will solve your problem

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am pretty new to iPhone development and currently working on an application which
I am new in iPhone application development and currently working on .net (C#). Please
I am new to iPhone application development and currently working on a simple paint
I am new to iPhone development and I am currently working on a simple
I am working on iPhone app development currently (primarily native app using Obj-C and
I'm new to iPhone application development. I like to show comments which are posted
I am new to iphone development. I am currently doing a restaurant app which
I am currently working on an iPhone 2.1 application. I am new to Objective
I'm new to iPhone development,currently i have to develop my application as dynamic one,Where
I am new to iphone development, and i'm currently using xcode 4.2. I drew

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.