xcode7

Adding a GitHub repository in Xcode 7 using SSH authentication gives an authentication error

非 Y 不嫁゛ 提交于 2020-01-11 09:32:08
问题 I'm trying to set up a Bot in Xcode 7 for integration testing. As part of setting this up I am adding a remote repository to the project using Xcode > Preferences > Accounts > Add Repository... but it fails with the message Authentication failed : GitHub is working at the command line using this SSH key, why is Xcode 7 not working? 回答1: After thinking that this was an Xcode 7 bug, because of posts like this one I finally found that the problem was actually caused by GitHub. GitHub implemented

Error with Parse Query findObjectsInBackgroundWithBlock

依然范特西╮ 提交于 2020-01-11 05:41:08
问题 I am new to ios development and I recently found a tutorial to build a tweeter like ios app using a parse backend. My current set up is Xcode 7.1 with swift 2.0, the tutorial was done on an older version of swift so I had to adjust some of the swift syntax in order to make it work. I was doing fine until I hit the following error, func loadData(){ timelineData.removeAllObjects() var findTimelineData:PFQuery = PFQuery(className: "Tweet") findTimelineData.findObjectsInBackgroundWithBlock{

My data changes in UITableViewCell when I scroll down and get back

浪尽此生 提交于 2020-01-10 19:59:42
问题 When I'm populating new data in my tableView Controller, my top cell is being rewrite by the bottom one. Let me explain. I have one image that is loading async in the latest cell row, in the bottom. All the other cells are loading static with an image that is in the app. When I scroll down my app and display my bottom cell which have a different image than the others cells, and I scroll up again, I see the first shop image has changed to the dynamic one loaded in the bottom cell. Does anyone

Is there a way to find if the XCUIElement has focus or not?

我们两清 提交于 2020-01-10 13:03:27
问题 One of my screen has multiple text fields, I can land to this screen from different other screens. In each case I am making one or another text field as first responder. I am not able to write test to determine whether the desired textField has focus or not. When I print the textfield in console - Output: { TextField 0x131171d40: traits: 146031247360, Focused , {{6.0, 108.3}, {402.0, 35.0}}, value: ​ } But I could not find any focus/isFocus property on XCUIElement. Is there a way to achieve

Exclude Files/Lines of code in Xcode 7 Code Coverage

ⅰ亾dé卋堺 提交于 2020-01-10 08:39:15
问题 How would you exclude a few methods, or say the AppDelegate file, from being tested during Code Coverage in Xcode 7? I am not using Gcov. 回答1: Xcode coverage is generated by target (you can enabled it per scheme). Something I often do is separate all my testable code into a separate DynamicFramework from all my UI code. I can generate coverage just for that one framework if i like. Alternatively you could look at some of the 3rd party coverage parsing tools such as: xcov slather Each tool

NSURLConnection initWithRequest is deprecated

落爺英雄遲暮 提交于 2020-01-09 19:08:33
问题 I am adopting the Gmail API in iOS and I am getting the warning: initWithRequest is deprecated in the following line: connection_ = [[connectionClass alloc] initWithRequest:request_ delegate:self startImmediately:NO]; The line is in the source file GTMHTTPFetcher.m of the API library. What is the substitute for the deprecated -initWithRequest: method? 回答1: It seems that the whole NSURLConnection API has been deprecated in iOS 9. Existing apps will continue to work, but new builds (linked

NSURLConnection initWithRequest is deprecated

廉价感情. 提交于 2020-01-09 19:05:13
问题 I am adopting the Gmail API in iOS and I am getting the warning: initWithRequest is deprecated in the following line: connection_ = [[connectionClass alloc] initWithRequest:request_ delegate:self startImmediately:NO]; The line is in the source file GTMHTTPFetcher.m of the API library. What is the substitute for the deprecated -initWithRequest: method? 回答1: It seems that the whole NSURLConnection API has been deprecated in iOS 9. Existing apps will continue to work, but new builds (linked

Authenticated http request swift Alamofire

走远了吗. 提交于 2020-01-06 19:43:09
问题 I'm struggling with getting this to work to make request to my API. Without a token works, but when I try to add additional headers, things turn to be complicated, for me. First, the structure. one class called: APIAsyncTask that makes the requests one class called APIParams , just a data holder to send parameters to the APIAsyncTask class. one class called DatabaseAPI that makes that builds the parameters, and send that to the APIAsyncTask class. DatabaseAPI func someMethod() { let task =

Re open the review and converter to Swift 2.0-Xcode 7

我的未来我决定 提交于 2020-01-06 03:09:18
问题 I open my project (swift 1.2) by Xcode 7, and the Xcode suggestion to me convert to Swift 2.0. But I canceled it, now I want to open the review and converter of Xcode 7. How to do that? 回答1: This is the answer you are looking for To Latest Swift Syntax at the latest menu. 来源: https://stackoverflow.com/questions/32692935/re-open-the-review-and-converter-to-swift-2-0-xcode-7

App crash when cable disconnected from Mac

你离开我真会死。 提交于 2020-01-06 02:42:08
问题 this app is running normally on simulator, is running normally while attached in my Mac, but when disconnected it crashes. There are other very old posts in StackOverflow, but even that I tried to follow did not work as well. What I did till now was: 1-To stop Xcode first and after disconnect the cable does not work. 2-To Stop the app first and after disconnect the iPhone does not work, the app does not run in the iPhone 3-Delete the app from the iPhone and run it again 4-Product Clean in