Tag: iphone

Present UIActivityViewController- LaunchServices:invalidationHandler called

I’ve already looked at related questions here and here, and I have implemented the suggested answers to no avail. I have a UIBarButtonItem on a UIToolbar, with Connection for Send Action to btnTBAction_touch: In the ViewController’s class header I have: @property (nonatomic, strong) UIActivityViewController *activityViewController; The related method in the class implementation: – (IBAction)btnTBAction_touch:(id)sender { […]

iOS CoreLocation Altitude

Prior to iOS 4.0, CoreLocation was reporting altitude correctly, now it always reports as 0 ft. -(void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation*)newLocation fromLocation:(CLLocation *)oldLocation { NSString *tLatitude = [NSString stringWithFormat:@”%3.5f”, newLocation.coordinate.latitude]; NSString *tLongitude = [NSString stringWithFormat:@”%3.5f”, newLocation.coordinate.longitude]; /* the following returns 0 */ NSString *tAltitude = [NSString stringWithFormat:@”%i”, newLocation.altitude]; /* theres more code, but it’s not relevant, and […]

BSD Sockets don't behave in a iPhone 3G environment

I noticed that many times while developing for an iPhone 3G, BSD socket functions will simply fail. I also noticed at the time, the 3G antenna wasn’t even ON, nor was there WIFI Access to back up the network call (So it seems ridiculous that it doesn’t turn on to support the network request).. This […]

Delete object in Core Data

How I can delete an object which I had added before with this code. Its a favorites section, in the begin, I add a gray star which adds an object coming from a fetch. Then It turns yellow and the backwards method should be star yellow = deletes. But I have no idea how to […]

Access Tokens Persistence Best Practices (iOS)

Should access tokens for services like Twitter and Facebook be encrypted? In particular, should tokens be stored on the the device’s Keychain vs. UserDefaults? What are some possible security issues that could arise if a user’s device is stolen/taken This is what I have come up with so far. Pros of Keychain: Encrypted Cons: No […]

How do I use performSegueWithIdentifier: sender:?

This question already has an answer here: Understanding performSegueWithIdentifier 4 answers

Xcode 6: iOS 8.1 The Developer Disk Image could not be mounted

I keep getting this error, whenever I try to run my app on my iphone, which is running iOS 8.1.- The Developer Disk Image could not be mounted. User’s iPhone may be running a version of iOS that is not supported by this version of Xcode. I tried restarting my mac and xcode, but problem […]

Xcode – Importing different header file with same name based on Target

I have a project with multiple targets each of which builds a pretty similar versions of the app but with different images assets and plists. For plists/images that’s fine but I use the ShareKit and Appirater frameworks which have header files with #defines for their config. For each version I believe need to import a […]

Undefined symbols for architecture i386 Upgrading project to iOS 5

I’ve been scouring SO and Google but haven’t found anything helpful yet. We’re updating our existing iOS project to build against iOS 5. Our project has two targets, the first is our static library and the second is a Unit Test application (GHUnit). When building the unit test target it successfully compiles the static library, […]

UITableViewCell with UITextField losing the ability to select UITableView row?

I am almost done implementing a UITableViewCell with a UITextField in it. Rather then going through CGRectMake and UITableViewCell.contentView I have implemented it the simpler way: – (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@”Cell”]; [cell setSelectionStyle:UITableViewCellSelectionStyleBlue]; amountField = [[UITextField alloc] initWithFrame:CGRectMake(110, 10, 190, 30)]; amountField.placeholder = @”Enter amount”; amountField.keyboardType = […]