Questions tagged [xcode7]

Xcode is an IDE by Apple for the development of iOS and OS X applications. Use this tag for version specific questions about Xcode 7.

is Apple's integrated development environment (IDE) for developing OS X, iOS, tvOS, and watchOS apps. Version 7 was presented at the WWDC on June 8th-12th, 2015. The new features of include an update to the programming language, making it faster than before. The latest version includes also support for .

Xcode 7 also adds support for deployment on iOS devices without an Apple Developer license.

This tag is only for IDE questions relating to Xcode version 7. Questions related to the programming languages should go to the appropriate tag, or . OS-related questions should go to and .

3952 questions
46
votes
4 answers

How do I refactor Swift in Xcode?

Is there a way to refactor swift in Xcode 7.1? When I try to rename a variable (e.g. highlight, right-click, refactor > rename), Xcode pops up an error dialog saying: Can't refactor Swift code. Xcode can only refactor C and Objective-C code. Is…
Paul Van Wieren
  • 985
  • 1
  • 7
  • 11
45
votes
3 answers

xcode: Timestamped Event Matching Error: Failed to find matching element

I'm trying to record some XCUITesting functions. I get this error. Timestamped Event Matching Error: Failed to find matching element Is this an Xcode bug and/or issues with the complexity of my UI?
emoleumassi
  • 4,881
  • 13
  • 67
  • 93
45
votes
4 answers

Iterate through a String Swift 2.0

I am trying to do a very simple piece of code in Swift playgrounds. var word = "Zebra" for i in word { print(i) } However, I always get an error on line 3. 'String' does not have a member named 'Generator' Any ideas on why this doesn't work?…
Aaron
  • 1,312
  • 3
  • 14
  • 25
43
votes
1 answer

UI Testing Failure - Failure getting snapshot for element Error -25201

I currently encountered this issue while running my UI Tests for iOS Assertion Failure: UI Testing Failure - Failure getting snapshot Error Domain=XCTestManagerErrorDomain Code=9 "Error -25201 getting snapshot for element {pid=84523}"…
Abs F.
  • 431
  • 4
  • 3
43
votes
1 answer

Excluding code from coverage stats in Xcode 7

I have enabled code coverage statistics in Xcode 7.0 and Objective C (like this) and it's working well. Is it possible to mark some source lines so that they are ignored by the coverage report? If I was using lcov then I could use LCOV_EXCL_START…
Ewan Mellor
  • 6,747
  • 1
  • 24
  • 39
42
votes
3 answers

Xcode 7.3 crashing when debugging with breakpoints

I just install the Xcode 7.3 version. I can't debug at all because it's crashing when I try to use a breakpoint while I'm debugging. I tried removing Derive Data, Reboot my macbook, reinstall pods... but unfortunately nothing is working. Is someone…
Fran Martin
  • 2,369
  • 22
  • 19
42
votes
12 answers

Xcode 7 UITests with localized UI

In my App I'm using NSLocalizedString to localize my app. Now I want to switch to UITests and have Testcode like this: [tabBarsQuery.buttons["particiants"] tap]; This works for English but fails for other…
netshark1000
  • 7,245
  • 9
  • 59
  • 116
42
votes
4 answers

Unable to profile app on device with iOS 9.0.1 using Xcode 7, 7.0.1 or 7.1 beta

I have been trying unsuccessfully to profile my device (via Instruments) using the latest version of Xcode 7.0.1 (7A1001 released 9/28), as well as the previous version of Xcode 7 (7A218), as well as Xcode 7.1 Beta 2 (7B75). My device is an iPhone…
Derek Lee
  • 3,452
  • 3
  • 30
  • 39
42
votes
7 answers

CGContextSaveGState: invalid context 0x0 (Xcode 7 GM)

I have this problem after I compiled my code with Xcode 7 GM. According to Apple this is a bug, but it still seems to be an issue. Everything works fine, but is it possible to get rid of these errors? : CGContextSaveGState: invalid context 0x0. If…
Beto
  • 3,438
  • 5
  • 30
  • 37
41
votes
6 answers

Could not attach to pid : “####” unable to attach

I just updated to Xcode 7.3.1 and my project crashes with the same error after the launch screen displays on the iOS simulator. The error is: "Could not attach to pid : “1712” unable to attach" Then I tried running another project and I…
S.Sohi
  • 671
  • 2
  • 6
  • 9
41
votes
3 answers

'UIFont' is not convertible to 'UIFont?'

So I had updated my XCode to 7.3 today evening. In one of my projects, I get the following error for few labels where I set the font: '(name: String, size: CGFloat) -> UIFont' is not convertible to '(name: String, size: CGFloat) -> UIFont?' EDIT:…
Vishal
  • 887
  • 9
  • 22
41
votes
7 answers

Xcode updating is extremely slow

After updating my gadgets with iOS 9 I've tried to update Xcode to Xcode 7 on my Mac through the App Store, but updating is too slow while speedtest.net shows that my download speed is about 30 mbps. What to do?
Dmitriy Stupivtsev
  • 832
  • 1
  • 8
  • 17
41
votes
3 answers

Swift 2.0: Type of Expression is ambiguous without more context?

The following used to work in Swift 1.2: var recordSettings = [ AVFormatIDKey: kAudioFormatMPEG4AAC, AVEncoderAudioQualityKey : AVAudioQuality.Max.rawValue, AVEncoderBitRateKey : 320000, AVNumberOfChannelsKey: 2, AVSampleRateKey…
lernerbot
  • 903
  • 2
  • 8
  • 21
41
votes
14 answers

‘NSInternalInconsistencyException’ when running UITesting with Xcode 7

Ok, I’ve not been able to run this test in any betas so far. Some of the issues I’ve encountered are here and here Now, I feel like I’m missing something. Here’s my progress so far Enabled “UI testing” option while creating a new project. This, in…
SuPotter
  • 762
  • 1
  • 8
  • 16
40
votes
10 answers

XCode 7. iOS simulators missing and not installable

Can't see any iOS 9.0 simulators. In previous Xcode 7 beta 3 all was OK. Can't install iOS 8.3 simulator. Also I can't add any simulator from 'Organizer'. By pressing "Create" nothing happened. Each time when I'm trying to download iOS…
Alexey Bondarchuk
  • 2,002
  • 2
  • 20
  • 22