function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vivek SoniVivek Soni 

How to sync Feed detail and contact into salesforce from my native ios app?

salesforce mesalesforce me
Hi Soni check it once...

1) https://developer.salesforce.com/docs/atlas.en-us.mobile_sdk.meta/mobile_sdk/entity_framework_native_using.htm


2) https://developer.salesforce.com/page/Building_a_Mobile_SDK_Hybrid_App_for_iOS

 
@interface RootViewController : UITableViewController <SFRestDelegate, UIImagePickerControllerDelegate, UINavigationControllerDelegate>

- (void) uploadImage {
    UIImagePickerController *imgPicker = [[UIImagePickerController alloc] init];
    imgPicker.delegate = self;
    imgPicker.allowsEditing = YES;
    imgPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
    [self presentViewController:imgPicker animated:YES completion:NULL];
}

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {

    UIImage *chosenImage = info[UIImagePickerControllerEditedImage];
    self.imageView.image = chosenImage;
    NSData *imageData= UIImageJPEGRepresentation(chosenImage,0.0);

    SFRestRequest *request =
    [[SFRestAPI sharedInstance] requestForUploadFile:imageData
                                                name:@"myimage.png"
                                         description:@"Test Img"
                                            mimeType:@"image/png"];
    [[SFRestAPI sharedInstance] send:request delegate:self];
    [picker dismissViewControllerAnimated:YES completion:NULL];
}