iOS Development is easy with XCode, Swift3, UITableView, cocatouch, let's build iPhone, iPad and Macbook Applications.

Return back to iPhone app from safari

This question already has an answer here: Return to app from safari 4 answers

iOS :GMail API – Send Attachments with email

I am able to successfully able to send emails without attachments. However, when I try to upload attachments using GTLUploadParamaters, I am getting a 501 error. I have tried adding the NSData of an attachment from the Photo Library, as well as just sending the URL of an image. In both cases I got the […]

Different ways to initialize singletons

Working in C# and Java, I’ve seen basically one way everybody initializes singletons: static obj _inst = null; obj getInstance() { if (_inst == null) { _inst = new obj(); } return _inst; } Now, when I move to Objective-C for the iPhone, whenever I see code samples, I see basically the same thing: static […]

iOS and mutable IBOutletCollections

I have the property: @property(nonatomic, strong) IBOutletCollection(UIView) NSMutableArray *allOpposition; which is wired up in IB to a bunch of subviews and synthesized. Later I have: – (void)willRemoveSubview:(UIView *)subview { [[self allOpposition] removeObject:subview]; // Crash occurs here. [super willRemoveSubview:subview]; } When the time comes to remove the view representing an opposing entity, I get the following […]

Add phone number to existing contact

I am trying to add a phone number to an existing contact using the AddressBook framework, after selecting a person with the picker this method is called: – (BOOL) peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person { if(_phoneNumber != nil) { ABMutableMultiValueRef multiPhone = ABMultiValueCreateMutableCopy (ABRecordCopyValue(person, kABPersonPhoneProperty)); ABMultiValueAddValueAndLabel(multiPhone, (__bridge CFTypeRef)_phoneNumber, kABPersonPhoneOtherFAXLabel, NULL); ABRecordSetValue(person, kABPersonPhoneProperty, multiPhone,nil); CFRelease(multiPhone); } return FALSE; […]

Can't reverse AVAsset audio properly. The only result is white noise

I’m trying to reverse an AVAsset audio and save it to a file. To make things clear, I’ve made simple application with the issue The application takes mp4 video file from bundle, exports it to Temporary folder in the sandbox as single m4a file, then tries to read it from there, reverse and save […]

Restkit fails when I update architecture to arm64

When I update my project architecture to 64 bit these issues appear. My deployment target is 7.1. Undefined symbols for architecture x86_64: “OBJC_CLASS$RKClient”, referenced from: objc-class-ref in AppDelegate.o objc-class-ref in SSRSuggestion.o “_OBJC_CLASS$RKObjectManager”, referenced from: objc-class-ref in CinemaDetails-3BD8C6BC69EF1F23.o objc-class-ref in AppDelegate.o objc-class-ref in HomeScreen.o objc-class-ref in MovieDetails.o objc-class-ref in CinemaFilter-46E8309ACAC69139.o objc-class-ref in FilterView.o “_OBJC_CLASS$RKObjectMapping”, referenced from: […]

Uploading a large video from iphone to web server

I’m trying to upload a large video from iphone to a web server that has php script. I’m using NSInputStream to get file video chunks and I’m creating a request(POST) on each traversal of the – (void)stream:(NSStream *)stream handleEvent:(NSStreamEvent)eventCode method, with the read data passed as parameter. Here is the code I’m using to get […]

Glib use in an iPhone App

I would like to develop an iPhone App based on an existing open-source Objective-C framework, however that framework makes extensive use of the glib library and I cannot find a way to build and include the glib library for an iPhone app (non jailbreak). Is there any way this can be done, or is there […]

How would I send an NSArray filled with objects over a HTTP POST?

I have a product/shopping list (consisting of product objects with a name, product_id etc) on the iPhone side. I wish to send this list to the server where I will compare the list on the server with the one from the iphone (to merge the changes made and send the merged list back to the […]