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

Whose view is not in the window hierarchy issue?

Warning: Attempt to present on whose view is not in the window hierarchy! Yes I have looked at the other questions and answers before posting this question. They have not helped me resolve this. Here’s what I am doing. I am calling on my singleton class socialHelper to display an action sheet, where postToFacebook method […]

Set keyboard orientation only (iOS 6)

my app has been working fine until I’ve tried making some changes using the ios 6 SDK The app runs in portrait mode 99% of the time. This has been constrained by only allowing portait mode to be available in the info.plist There is one view controller which needs to be shown in landscape mode. […]

how and where do I initialize an global NSMutableArray in Xcode 5

I am trying to initialize a global NSMutableArray that I can add integers to later. I just need to know how and where I should initialize my array so that it can be accessed and changed by any function that I use later in my program. Also I am using Xcode 5 and know that […]

Selecting language of the keyboard for UITextField with secureTextEntry

I’m stuck with a problem of changing language for the password field. In my application I need to enter login/password in hebrew with no care of current locale. When I try to enter login, then it is all right, I can change the keyboard to hebrew and enter login. But when I try to enter […]

Getting client certificate to work for mutual authentication using Swift 3 and Alamofire 4

I am trying to figure out how to use Alamofire 4.0 with Swift 3.0 to send a p12 (i also have the PEM cert and key if need be) to a website for authentication. All the examples i have seen are for Swift 2.0 and not exactly what i’m looking for. In safari on my […]

iOS EKEvent Store recreating iCloud calendars in a loop, won't save local.

I’m having a strange issue EKEventStore, iCloud and local calendars. If iCloud is enabled the Calendar is created and events are saved into the calendar as you would expect. if iCloud is turned off and you try to save an event nothing happens, however the device continues to create iCloud calendars in a loop every […]

iOS-8 and later – UITableView inside an UIAlertController

I know how to add any Custom UI inside UIAlertView by using accessoryView like UITableView but I am now curious that if we still have option to add Custom UI inside an UIAlertController, what I am wanting to have is a UITableViewController inside an UIAlertController with clear understanding.

Is there any way to “wait here…” in code – just like an empty loop?

Consider this code: [self otherStuff]; // “wait here…” until something finishes while(!self.someFlag){} [self moreStuff]; Note that this all happens ON THE SAME THREAD – we do not want to go to another thread. otherStuff could do things like connect to the cloud, get input from the user, etc. so it would take a lot of […]

iOS Push Notifications not working for Distribution

I have tried the Push Notification for my application for development and it’s working fine. When I am generating the .p12 file of production(distribution) it’s getting created. After deployin .pem file on the server it’s throwing and error. OpenSSL::SSL::SSLError (SSL_connect returned=1 errno=0 state=SSLv3 read server s ession ticket A: sslv3 alert certificate unknown):” } Server […]

Get GPS without alert view with ROOT permission(jailbreak)

how can i get gps without alert view (jailbroken iphone) ? NSString *newText; CLLocationManager * locationManager = [[CLLocationManager alloc] init]; [locationManager startUpdatingLocation]; [locationManager setDesiredAccuracy:kCLLocationAccuracyNearestTenMeters]; CLLocation* location = [locationManager location]; CLLocationCoordinate2D coordinate = [location coordinate]; newText = [[NSString alloc] initWithFormat: @”Your Position : %f %f”, coordinate.latitude, coordinate.longitude]; NSLog(@”%@”, newText);