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

How to open a native iOS app from a web app

Summary I have an app with a correctly functioning URL scheme that I’d like to launch from a web app stored on the home screen, and the normal JavaScript redirect methods don’t seem to work. Details I’m trying to create an iOS web app, to be opened in full-screen mode from a link saved on […]

Delete keychain items when an app is uninstalled

I am using idandersen’s scifihifi-iphone code for keychain and save password using [SFHFKeychainUtils storeUsername:@”User” andPassword:@”123″ forServiceName:@”TestService” updateExisting:YES error:&error]; When I delete the application from the device, the password remains in the keychain. I want to remove the password from the keychain when the user deletes the application from the device. How can I do this?

Fatal error: use of unimplemented initializer 'init(coder:)' for class

I decided to continue my remaining project with Swift-language.When I added the custom class (.swift class which sub class to UIViewcontroller) in my storyboard viewcontroller and loaded the project the app crash suddenly with following error: fatal error: use of unimplemented initializer ‘init(coder:)’ for class This is a code : import UIKit class TestViewController: UIViewController […]

Open a facebook link by native Facebook app on iOS

If the native Facebook app is installed on the iPhone. How do I open a facebook link into the native Facebook app from my app. In the case of opening by Safari, the link is same as: http://www.facebook.com/AlibabaUS Thank you.

How to handle background audio playing while iOS device is locked or on another application?

Designing a generative music system for iOS, using OpenFrameworks, I’d need to provide a mode in which the user could listen the music produced by the application when: the device is locked the user uses another application Some applications like BLOOM, or alarm clock, works like that and propose to users a switch to enable/disable […]

Cannot generate iOS App archive in xcode

I have a problem generating a iOS App archive from an application. The application compiles just fine and even works in the simulator. Now I wanted to make som ad hoc testing and cannot generate the iOS App Archive. When I click on the Product -> Archive it generates a generic xcode archive. Can anyone […]

shouldAutorotateToInterfaceOrientation not being called in iOS 6

I’m using MGSplitViewController and I’m usingshouldAutorotateToInterfaceOrientation to control the size of the master view controller on rotation. It’s all working fine on iOS 5 but on iOS 6 (both simulator and iPad) shouldAutorotateToInterfaceOrientation is never called. Is this a bug that I should expect to be fixed with the final release of iOS 6 or […]

Cocoa error 3840 using JSON (iOS)

I’m trying to send data to a server and receive the response in JSON format. The problem is that the server has to return “success” or “fail” but it returns “(null)”. Here’s the returned error: Error Domain=NSCocoaErrorDomain Code=3840 “The operation couldn’t be completed. (Cocoa error 3840.)” (JSON text did not start with array or object […]

UIView autoresizingMask – Interface Builder to Code – Programmatically create struts and springs – Swift or Objective-C

I’ve laid out some subviews with Interface Builder, but I’d like to do it in code instead. I’ve read the UIView docs about setting the view.autoresizingMask property. I’m looking for a logical explanation of how to translate the struts and springs by using the various masks offered (e.g. UIViewAutoresizingFlexibleLeftMargin, etc).

Two (or more) optionals in Swift

While watching an Apple’s video about LLDB debugger I found something I can’t find an explanation for; he was talking about optional values when he wrote: var optional: String? = nil; //This is ok, a common optional var twice_optional: String?? = nil; //What is this and why’s this useful?? I opened a playground and started […]