xcode6

Xcode6: Run two instances of the simulator

空扰寡人 提交于 2019-12-17 08:01:16
问题 I have two different targets for my iOS app. Is it possible to run simultaneously the two apps on two different instances of the simulator? It's ok if it would require not to benefit of the Xcode's debugger. So far the only solution I found was to install two versions of XCode, but that's a very heavy/space-consuming solution. 回答1: You can run two instances of the iOS simulator from the command line. They won’t be attached to Xcode debugging—indeed, it seems only to work if you do it without

How to use openURL for making a phone call in Swift?

家住魔仙堡 提交于 2019-12-17 07:23:59
问题 I have converted the code for making a phone call from Objective-C to Swift, but in Objective-C, we can set the type of the URL that we like to open (e.g. telephone, SMS, web) like this: @"tel:xx" @"mailto:info@example.es" @"http://stackoverflow.com" @"sms:768number" The code in Swift is: UIApplication.sharedApplication().openURL(NSURL(string : "9809088798") I read that have not released any scheme parameter for tel: , but I don't know if Swift can detect if the string is for making a phone

Unable to run app in Simulator : An error was encountered while running (Domain = LaunchServicesError, Code = 0)

我们两清 提交于 2019-12-17 07:23:28
问题 I am unable to run my app in simulator after having trouble with the provisioning profile. I'm doing swift coding in Xcode 6 - beta 4. This was fine before the trouble in the certificate's profile. I have tried cleaning the build. Checked the command line to xCode6-beta4 for running. Checked the build deployment, set to 7.0 so swift won't complain for compatibility Fixed the error in provisioning. 回答1: This happens if your extension's bundle ID isn't prefixed with your app's bundle ID. For

Timeout when running xcodebuild tests under Xcode 6 via SSH

和自甴很熟 提交于 2019-12-17 07:07:22
问题 I seem to be having issues with integrating Xcode6 with jenkins, I currently have this setup and working with Xcode 5. With xcode 6 running remotely via SSH the simulator time-out, when I run locally it succeeds. Command xcodebuild -workspace PROJECTNAME.xcworkspace -scheme BGO_Tests -destination 'platform=iOS Simulator,name=iPhone 5s' -derivedDataPath ./Build clean test 2014-08-19 10:46:36.591 xcodebuild[33966:381f] iPhoneSimulator: Timed out waiting 120 seconds for >simulator to boot,

Remove println() for release version iOS Swift

限于喜欢 提交于 2019-12-17 07:00:32
问题 I would like to globally ignore all println() calls in my Swift code if I am not in a Debug build. I can't find any robust step by step instructions for this and would appreciate guidance. is there a way to do this globally, or do I need to surround every println() with #IF DEBUG/#ENDIF statements? 回答1: The simplest way is to put your own global function in front of Swift's println : func println(object: Any) { Swift.println(object) } When it's time to stop logging, just comment out the body

NSUserDefaults not cleared after app uninstall on simulator

。_饼干妹妹 提交于 2019-12-17 06:34:20
问题 this may sound real NOOB! I want to check if it's the second time the user enters my application, so to keep the run count I'm using NSUserDefaults . I have implemented the following code in my rootViewController 's viewDidLoad method: NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; NSLog(@"hello %ld", (long)[userDefaults integerForKey:@"runCount"]); if ([userDefaults integerForKey:@"runCount"] != 1) { //not the 2nd run [userDefaults setInteger:1 forKey:@"runCount"];

Remove SeparatorInset on iOS 8 UITableView for Xcode 6 iPhone Simulator

*爱你&永不变心* 提交于 2019-12-17 06:25:30
问题 I found a weird white space on UITableView for iPhone 6 Simulator (iOS 8) on Xcode 6 GM. I have tried to set the SeparatorInset from both storyboard and also the code, but the white space is till there. The following code works on iOS 7 but not on iOS 8 (iPhone 6 simulator). -(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{ if ([tableView respondsToSelector:@selector(setSeparatorInset:)]) { [tableView

Xcode Beta 6.1 and Xcode 6 GM stuck indexing for weird reason

佐手、 提交于 2019-12-17 06:16:22
问题 I'm developing a swift application that at some point I have a code similar to this: import UIKit class ViewController: UIViewController { private var a: UIImageView! private var b: UIImageView! private var c: UILabel! private var d: UILabel! private var e: UILabel! private var f: UILabel! private var g: UIView! private var h: UIView! private var i: UIView! private var j: UIView! private var k: UIImageView! private var l: UIView! private var m: UIView! private var n: UIView! private var o:

Xcode beta 6 iOS 8: Simulator not working

放肆的年华 提交于 2019-12-17 05:07:34
问题 I cannot launch the simulator successfully. Once I launch the IOS Simulator this error appears: "Unable to boot the IOS Simulator." Following the IOS Simulator error, I then get an error from Xcode reading: Unable to run app in Simulator An error was encountered while running (Domain = DTiPhoneSimulatorErrorDomain, Code = 2) UPDATE: This might sound silly but I went to Xcode/preference/Downloads with intentions of seeing a IOS 8.0 Simulator but there was none. Could this be the problem? Am I

Adaptive segue in storyboard Xcode 6. Is push deprecated?

回眸只為那壹抹淺笑 提交于 2019-12-17 04:10:46
问题 Xcode 6 interface builder by default has new checkbox "use size classes". It makes views adaptive. When I try to make segue between 2 views in my storyboard I have new options: instead old: Now we have "show" and "present modally" instead of "push" and "modal". The old options are marked as deprecated. I've chosen "show" option, because in segue settings it called "show (e.g. push) But it doesn't make push. Segue animation looks like slide from the bottom (modal) and navigation bar disappears