Tag: objective c

CoreData iOS – How to create unique ID for objects?

I have a project in IOS for iPhones and iPads and such. For the project I am using CoreData to hold the data the user feeds in the app. For ease of understanding lets say its like a contacts app. So basically you know you have your name, work, phone etc. Well this app also […]

How to create SourceList to show Core Data ToMany relations?

Coming from iOS, I am stuck at NSOutlineView as Source list, I have read many resources but cannot grasp it clearly. What I want is, just to show coreData ToMany relationship as sourceList using NSTreeController. I am persisting data from text file to disk. Entities and relations are as follow: Group >> Item >> Description […]

How to get latitude and longitude of an image using PHAsset in iOS?

I am trying to fetch images from photo library within the range of two dates and I am getting the images successfully. And I am also getting the info of the image by using below code. PHContentEditingInputRequestOptions *options = [[PHContentEditingInputRequestOptions alloc] init]; options.networkAccessAllowed = YES; //download asset metadata from iCloud if needed [asset requestContentEditingInputWithOptions:options completionHandler:^(PHContentEditingInput […]

Call Receive to receiver to play sound

Call rececive to play sound in recevier speacker but not error accer and not sound play any one speacker in device to plz solution this problem. NSString *voice=[[NSUserDefaults standardUserDefaults] objectForKey:TB_Voice_conversation_value]; NSError *error; BOOL Errors; NSString *filePath = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:voice]; NSURL *myFileURL = [NSURL fileURLWithPath:filePath]; AVAudioPlayer *player = [[AVAudioPlayer alloc] initWithContentsOfURL:myFileURL error:nil]; [player setDelegate:self]; […]

iOS 9 cancelLocalNotification problems

I’ve had an app on the App Store for over a year now which uses UILocalNotifications to act as reminders. The UILocalNotifications use the repeatInterval, set to NSCalendarUnitMinute, to keep reminding the user of whatever they wanted to be reminded of. Everything was fine with the app when building against iOS 7/8 but now that […]

AWS SES sending mail with attachement using Amazon iOS SDK

Does anyone know how to send a mail with an attachment using Amazon SES with the iOS SDK.

How to parse the following XML?

<colors> <color colorName=”Abracadabra” colorNumber=”D51-2″ rColor=”209″ gColor=”224″ bColor=”229″ colorCollection=”Harmony” colorFamily=”Shaded” rating=”3″ surfaces=”” colorGroup=”Blues” /> <color colorName=”Abyss” colorNumber=”B50-1″ rColor=”233″ gColor=”247″ bColor=”249″ colorCollection=”” colorFamily=”Clean” rating=”3″ surfaces=”” colorGroup=”Blues” /> <colors> I am getting the above XML data from web service. I am not getting how to parse it.I would like to have ‘colorNameArray’ containing all the color names, ‘colorNumberArray’ […]

GIF image not show

I follow this post to show GIF image. I have tried: #import “ViewController.h” @interface ViewController () @end @implementation ViewController – (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. UIImageView* animatedImageView = [[UIImageView alloc] initWithFrame:self.view.bounds]; animatedImageView.animationImages = [NSArray arrayWithObjects: [UIImage imageNamed:@”splash.gif”], nil]; animatedImageView.animationDuration = 6.0f; animatedImageView.animationRepeatCount = […]

Simulate a Detail Disclosure Button press

Does anyone know of a way to simulate pressing a detail disclosure button?

Obstacles With GameplayKit

Here is my question: How can I convert an SKSpriteNodearray into an array of GKObstacles so that an agent can appropriately avoid these obstacles by using the goalToAvoidObstacles:(nonnull NSArray<GKObstacle *> *) maxPredictionTime:(NSTimeInterval)/? It seems that the way in which I am creating the GKObstacle array is not allowing the GKGoal to identify these as obstacles […]