Questions tagged [xcode9]

This tag should only be used for questions specific to the usage and features of Xcode 9. Do not use this tag just because you are using Xcode to develop your app. General Xcode questions should use the non-version specific xcode tag. Use tags appropriate for the OS such as ios or macos.

Xcode is the complete developer toolset used to create apps for Apple TV, Apple Watch, iPad, iPhone, and Mac. The Xcode development environment bundles the Instruments analysis tool, Simulator, and the OS frameworks in the form of tvOS SDKs, watchOS SDKs, iOS SDKs, and macOS SDKs.

1766 questions
93
votes
1 answer

iOS 11: ATS (App Transport Security) no longer accepts custom anchor certs?

I am leasing a self signed certificate using NSMutableURLRequest and when the certificate is anchored using a custom certificate with SecTrustSetAnchorCertificates IOS 11 fails with the following error message: refreshPreferences: HangTracerEnabled:…
Wayne
  • 3,359
  • 3
  • 30
  • 50
92
votes
9 answers

Module compiled with Swift 4.0 cannot be imported in Swift 4.0.1

However I have recompiled the framework using the same Xcode and it still gives me this error. Base SDK iOS 11.1 for both Swift Language Version Swift 4.0 for both Not using Pods/Carthage I hope someone might know
Simon
  • 2,419
  • 2
  • 18
  • 30
76
votes
11 answers

Code Signing "No account for team" message when signing for different developer account

I’ve been working on an app for a client using my own Apple Developer account so far while waiting for them to register a Developer account themselves. They have done this— and the time has come for them to be able to build and run the project on…
chmod
  • 1,173
  • 1
  • 9
  • 17
75
votes
7 answers

Enable code-folding by default

Is there a way to tell XCode fold methods/functions by default when opening a file?
Infinite
  • 2,931
  • 2
  • 27
  • 33
68
votes
9 answers

Safe area layout guides in xib files - iOS 10

I started adapting my app for iPhone X and found an issue in Interface Builder. The safe area layout guides are supposed to be backwards compatible, according to official Apple videos. I found that it works just fine in storyboards. But in my XIB…
Tiago Lira
  • 2,543
  • 1
  • 18
  • 17
66
votes
22 answers

Xcode 9: Could not attach to pid

I've been facing an issue (frequently) with the recent major release of the iOS application development tool - Xcode 9-beta. It's showing me the following error frequently while running/debugging app in Simulator (iOS 11). Could not attach to pid :…
Krunal
  • 77,632
  • 48
  • 245
  • 261
62
votes
2 answers

Time profiler in instruments is not working

I recently update my Xcode to version 9.3, so is instruments. After that, time profiler won't work anymore, it usually works fine before. I tried to run it via Xcode, and I tried to run it manually. Doesn't work. The life cycle row stuck in…
Carusd Ray
  • 993
  • 7
  • 11
61
votes
4 answers

Xcode 9 Bug: Cannot find cdtool

After installing Xcode 9 beta, Xcode 8 gives me an error when compiling a project: Cannot find cdtool at '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Agents/cdtool': Cannot find a simulator…
Jason C. Howlin
  • 3,858
  • 3
  • 21
  • 29
58
votes
4 answers

How to use swift 4 Codable in Core Data?

Codable seems a very exciting feature. But I wonder how we can use it in Core Data? In particular, is it possible to directly encode/decode a JSON from/to a NSManagedObject? I tried a very simple example: and defined Foo myself: import…
hgl
  • 2,034
  • 4
  • 21
  • 30
51
votes
12 answers

Xcode 9 - failed to emit precompiled header

I have a project in Objective-C as well as in swift by taking MyProjectName-Bridging-Header.h and i also configured the Objective-C Bridging Header. Also i have added 'MyprojectName-Swift.h' in .pch file. This works fine on xcode 8.2 but when i…
Shubham
  • 1,230
  • 2
  • 12
  • 26
48
votes
14 answers

Unable to do refactoring on my Swift file in Xcode 9

I am using Xcode 9 and I am trying to do Refactoring on my Swift based file but every time I am getting below error: Refactoring engine ranges didn't match initial ranges Why isn't it matching the initial range?
CodeChanger
  • 7,953
  • 5
  • 49
  • 80
47
votes
5 answers

Xcode says my "iPhone has recently restarted" and won't run

I am making an app in Xcode 9.2 and trying to run it on my iPhone (5S running iOS 11.2.1), Xcode compiles the application fine (I can run it in the simulator) but it does not run on my iPhone. When I try to run it on my iPhone it just says "iPhone…
brettfazio
  • 1,136
  • 10
  • 25
47
votes
4 answers

Rename failed in Xcode 9

I used "renamed" function to rename a variable named "DefaultRequestURL" in Xcode 9, it alert this: alert image I have checked the file "ComposeController.swift", there is no "DefaultRequestURL"。 I have restart Xcode and do "Product -> Clean", it…
zephyr
  • 1,078
  • 1
  • 10
  • 13
46
votes
8 answers

100+ "Class implemented in both MapKit and VectorKit" warnings with Xcode 9.0.1 and above

While running my project (which doesn't even use MapKit), my console gets spammed with more than a hundred class duplicate warnings: objc[6377]: Class ___MKPlaceBusinessInfoItemAccessibility_super is implemented in both…
Tamás Sengel
  • 55,884
  • 29
  • 169
  • 223
46
votes
6 answers

Xcode 9 expand/collapse braces/brackets {} side bar missing

Can't find one under Xcode ▶ Preferences/Text Editing ▶ "Code Folding Ribbon" box.
Yakiv Kovalskyi
  • 1,737
  • 1
  • 15
  • 29