Cocoa application with SPM

My general goal is to create an app, that grabs all data from the postgreSQL database. Firstly, I connected C API libpq to connect my database. Then, I found a nice wrapper around libpq to make my life easier, thanks to Perfect. To install this wrapp...
more »

2017-01-11 22:01 (1) Answers

Custom UICollectionView in Swift 3 not working

So I am new to swift and am trying to create a custom UiCollectionView that you can horizontally scroll through, and when tapping on a button, you can add an image from your camera roll to the array of images in the collection view. This is what I ha...
more »

2017-01-11 19:01 (1) Answers

Alamofire memory leaks Instruments

I am trying to clean my app from memory leaks and I have a few problems understanding this Why Alamofire function Request.serializeResponseJSON is called 30 seconds after I've launched app: I did not touch anything or navigate anywhere, the scree...
more »

2017-01-11 16:01 (0) Answers

Xcode not generating correct coredata model files

Im generating my core data model after changing my models files using Editor -> Create NSManagedObj... I changed an entity relationship to a different entity (if this matters) Iv cleaned my project and build folder. But the generated files don't s...
more »

2017-01-11 12:01 (1) Answers

Dramatically long Swift compile time

I like Apple, I like things that they do, but Swift... oh I have a problem with Swift compile time on my machine. Configuration: MacBook Pro (Retina, 13-inch, Mid 2014) 2,6 GHz Intel Core i5 8 Gb 1600 MHz DDR3 SSD 256 (up to 800 mb/s) About tes...
more »

2017-01-11 08:01 (1) Answers

Get me card details from Contacts

Is there any way to fetch the My Card details from Contacts or from Settings > Mail, Contacts, Calendar > My Info. I have tried [[NSUserDefaults standardUserDefaults] objectForKey:@"SBFormattedPhoneNumber"]; but this returns null. ...
more »

2017-01-11 06:01 (0) Answers

Json Parsing Swift 3 Alamofire

I am new at swift 3.00 and I got problems with getting Json return then sending request. I am trying to send post request to server with parameters username and password and get respond with Json with information, but I haven't been able to get the d...
more »

2017-01-10 19:01 (1) Answers

Can't connect php file with Xcode through iPhone

I am working on an app which includes a database. I use PHP to connect to a MySQl database. Here is my connection code: var request = URLRequest(url: URL(string: "http://localhost/Workspace/Twitter/register.php")!) request.httpMethod = "POST" let bo...
more »

2017-01-10 19:01 (1) Answers

Present active searchBar on segue swift

I have two view controllers. A view controller with a button, and a view controller with a UITableView and a UISearchBar. When the user taps on the button in the first view controller, the app should segue to the table view and immediately present ...
more »

2017-01-10 18:01 (0) Answers

iPad Pro 12"9 simulator with wrong resolution?

I have ensured that I'm using the latest version of Xcode, but when launch my iPad Pro 12"9 simulator (full screen, 100% scale) and programatically get the width and height of the screen, I get 1024x768. Shouldn't it be 1366x1024 instead? What could ...
more »

2017-01-10 18:01 (1) Answers

Xcode installing on mac

I am new to mac and I want to install Xcode. I have macOS Sierra Version 10.12.2. I found online that I have to run in terminal: xcode-select --install I did that but I get this: xcode-select: error: command line tools are already installed, use ...
more »

2017-01-10 15:01 (1) Answers

Google Cast iOS SDK v3.3 archive upload issue

I use latest version of Xcode (8.2.1 b8C1002) and latest version of GoogleCast.framework (3.3.0) Obviously i followed these steps to integrate the SDK When i try to upload my archived application i found these issues someone had this trouble and...
more »

2017-01-10 12:01 (1) Answers

Safari ViewController with enabled address bar

I'm using Safari ViewController and address bar is disabled. How can I make it enabled so user can enter other url? Here is the code that I'm using class ViewController: UIViewController, SFSafariViewControllerDelegate { override func viewD...
more »

2017-01-10 09:01 (1) Answers

Issue in passing data back to viewcontroller

a small issue when trying to pass data back from tableviewcontroller to viewcontroller. i have 3 buttons and 3 textfields in viewcontroller when clicked on each button will navigate to same tableview with static data like (Headache, Fever, Cough, Col...
more »

2017-01-10 09:01 (1) Answers

iOS Rename Project

I'm trying to rename my project but I'm unable to figure out how to rename it where the arrow is pointed. Any help would be appreshated. ...
more »

2017-01-10 06:01 (3) Answers

Swift - Adding touch to UIImageView

I'm following a tutorial online and I'm trying to add touch detection to an UIImageView. I realize that this can be done with a gesture recognizer but I have a different problem and I don't know how to ask for it. Basically, I added an overlay UIBut...
more »

2017-01-10 06:01 (3) Answers

Xcode is not pulling the new files from git

I have my project in git and we are 2 programmers working in the project. User B using (xcode 8.2.1) added some files and pushed to remote. User A using (xcode 8.0) also added some files committed changes clicked to pull it went through with out any ...
more »

2017-01-09 20:01 (1) Answers

How to check app is installed or not in phone

I don't know how to check if app is installed or not on phone! Or when App is installed, open the app, otherwise open the Appstore link to download the app. I'm using swift 3. I want to do it using app name or bundle identifier. Thank You! ...
more »

2017-01-09 10:01 (4) Answers

debug view in Xcode

When I debug in Xcode, how can I add the view of picture 1(main()) and the view of picture 2(sort()) at the same time? Or how can I see the value in array: a[10] when debug in function: sort()? picture 1(main()): picture 2(sort()): picture 3(w...
more »

2017-01-09 02:01 (0) Answers