Questions tagged [xcode6]
Xcode 6 is Apple's integrated development environment (IDE). This tag should only be used for questions about Xcode itself, and not for general Mac or iOS programming topics. Use [cocoa] for Mac programming questions, and [cocoa-touch] or [ios] for iOS programming questions.
xcode6
6,120
questions
987
votes
9
answers
119k
views
Swift Beta performance: sorting arrays
I was implementing an algorithm in Swift Beta and noticed that the performance was very poor. After digging deeper I realized that one of the bottlenecks was something as simple as sorting arrays. The ...
639
votes
52
answers
235k
views
Xcode 6 Bug: Unknown class in Interface Builder file
I upgraded to Xcode 6 beta 4 and now my App continuously crashes with the message
Unknown class X in Interface Builder file.
It crashes because supposedly Xcode can't find my custom classes that I ...
334
votes
4
answers
118k
views
What's the difference between all the Selection Segues?
Show
Show Detail
Present Modally
Popover presentation
Custom
What is the difference between them? I couldn't find any documentation on it. There used to be some which I found in a Google search, but ...
322
votes
10
answers
101k
views
Automatic Preferred Max Layout Width is not available on iOS versions prior to 8.0
I opened an existing iOS project with Xcode6 beta6, and Xcode lists the following warning for both Storyboard and Xib files:
Automatic Preferred Max Layout Width is not available on iOS versions
...
321
votes
32
answers
144k
views
Ineligible Devices section appeared in Xcode 6.x.x
After installing Xcode 6 my devices moved to greyed-out section Ineligible Devices and I can't select them as deploy target:
Update:
This error occurs in all versions of Xcode 6.x.x.
There are so ...
320
votes
8
answers
85k
views
How do I create a category in Xcode 6 or higher?
I want to create a category on UIColor in my app using Xcode 6. But the thing is that in Xcode 6 there is no Objective-C category file template.
Is there any option to create a category in Xcode 6?
306
votes
7
answers
158k
views
Animating a constraint in Swift
I have a UITextField that I want to enlarge its width when tapped on. I set up the constraints and made sure the constraint on the left has the lower priority then the one that I am trying to animate ...
294
votes
60
answers
189k
views
"The file "MyApp.app" couldn't be opened because you don't have permission to view it" when running app in Xcode 6 Beta 4
Whenever I try to run my app in Xcode 6 Beta 4 I am getting the error:
The file "MyApp.app" couldn't be opened because you don't have permission to view it.
This error appears no matter what ...
292
votes
28
answers
205k
views
Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost."
I have an application which works fine on Xcode6-Beta1 and Xcode6-Beta2 with both iOS7 and iOS8. But with Xcode6-Beta3, Beta4, Beta5 I'm facing network issues with iOS8 but everything works fine on ...
265
votes
8
answers
113k
views
Why isn't ProjectName-Prefix.pch created automatically in Xcode 6?
Why isn't ProjectName-Prefix.pch created automatically in Xcode 6 ?
Is the precompile header no longer needed ?
Where should I write the code that was in ProjectName-Prefix.pch before ?
258
votes
3
answers
95k
views
What is "Constrain to margin" in Storyboard in Xcode 6
I am Working with autolayout and constraints and found there is a Constrain to margins option in Xcode 6 which was not present in Xcode 5 and is checked by default.
I created a test project then I ...
237
votes
30
answers
108k
views
My prerelease app has been "processing" for over a week in iTunes Connect, what gives?
I used Xcode 6.1.1 to upload a new version of a prerelease app to iTunes Connect so I could distribute it to my external beta testers. I've done this with two versions of the same app previously and ...
234
votes
37
answers
309k
views
Changing the Status Bar Color for specific ViewControllers using Swift in iOS8
override func preferredStatusBarStyle() -> UIStatusBarStyle {
return UIStatusBarStyle.LightContent;
}
Using the above code in any ViewController to set the statusBar color to White for a specific ...
231
votes
6
answers
50k
views
Simulator error FBSSystemServiceDomain code 4
I'm trying to run an app in the simulator but get this error message:
Unable to run app in Simulator
An error was encountered while running (Domain = FBSSystemServiceDomain, Code = 4)
I've not seen ...
201
votes
15
answers
197k
views
Change tab bar item selected color in a storyboard
I want to change my tab bar items to be pink when selected instead of the default blue.
How can i accomplish this using the storyboard editor in Xcode 6?
Here are my current setting which are not ...
200
votes
13
answers
17k
views
Xcode 6 crashes on submitting Archive
Today I uploaded my first build of first app successfully to App Store for beta testing. After making a few changes, when I tried to submit the new archive again Xcode crashed, and still crashes.
It'...
194
votes
8
answers
103k
views
How to enable native resolution for apps on iPhone 6 and 6 Plus?
Xcode 6 GM now includes simulators for iPhone 6 and 6 Plus, and by default they run apps in a scaled mode.
To enable the new screen size I tried adding [email protected] which seems to do a part of ...
194
votes
27
answers
91k
views
Xcode 6 beta 2 issue exporting .ipa: "Your account already has a valid iOS distribution certificate"
I'm having trouble exporting an app for Ad Hoc Distribution on Xcode 6 beta 2:
When exporting my project for ad hoc development on Xcode 6, I receive this alert. I've tried exporting it on Xcode 5 ...
191
votes
12
answers
51k
views
FBSOpenApplicationErrorDomain code =4 error
When I'm trying to run iOS application in Xcode 6 in iPhone 6 simulator, I'm getting error Unable to run app in Simulator.
And error code is:
An error was encountered while running (Domain =
...
182
votes
6
answers
76k
views
PCH File in Xcode 6
In my previous projects, I can find the .pch file under Supporting Files.
But now in Xcode 6, I couldn't find any .pch file. Any steps should I do to produce this file?
175
votes
21
answers
133k
views
Importing Project-Swift.h into a Objective-C class...file not found
I have a project that was started in Objective-C, and I am trying to import some Swift code into the same class files that I have previously written Objective-C in.
I have consulted the Apple docs on ...
173
votes
25
answers
207k
views
Move a view up only when the keyboard covers an input field
I am trying to build an input screen for the iPhone. The screen has a number of input fields. Most of them on the top of the screen, but two fields are at the bottom.
When the user tries to edit the ...
170
votes
39
answers
176k
views
No suitable records were found verify your bundle identifier is correct
I have created an app in App Store Connect and it has been in the "prepare for submission" state for more than 3 days. When I try to archive my app, and submit it to the app store it, displays this ...
164
votes
13
answers
184k
views
How do I import a Swift file from another Swift file?
I simply want to include my Swift class from another file, like its test
PrimeNumberModel.swift
import Foundation
class PrimeNumberModel { }
PrimeNumberModelTests.swift
import XCTest
import ...
161
votes
12
answers
56k
views
Autoresizing issue of UICollectionViewCell contentView's frame in Storyboard prototype cell (Xcode 6, iOS 8 SDK) happens when running on iOS 7 only
I'm using Xcode 6 Beta 3, iOS 8 SDK. Build Target iOS 7.0 using Swift. Please refer to my problem step by step with screenshots below.
I have a UICollectionView in Storyboard. 1 Prototype ...
153
votes
16
answers
93k
views
NSDate Comparison using Swift
I am working on an app the requires checking the due date for homework. I want to know if a due date is within the next week, and if it is then perform an action.
Most of the documentation I could ...
153
votes
14
answers
31k
views
Xcode Storyboard warning: Constraint referencing items turned off in current configuration. Turn off this constraint in the current configuration
This warning happens in Xcode 6.1. Anyone have ideas what does this warning mean and what will happen with it? Many thanks!
Below is a screenshot with the warnings opened in source code"
How to find ...
152
votes
29
answers
180k
views
unable to dequeue a cell with identifier Cell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard
My UITableViewController is causing a crash with the following error message:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to dequeue a cell with ...
149
votes
28
answers
129k
views
Launch Image does not show up in my iOS App
I want to get a simple launch screen to show in my app, built using Xcode 6.0.1.
I have added a launch screen in two ways: As an XIB (with the default name, LaunchScreen.xib) and as a launchimage set ...
148
votes
14
answers
77k
views
How to create an Empty Application in Xcode without Storyboard
Xcode6 has removed the Empty Application template when creating a new project. How can we create an empty application (without Storyboard) in Xcode6 and above, like in earlier versions?
144
votes
3
answers
122k
views
Swift performSelector:withObject:afterDelay: is unavailable [duplicate]
I have an app in Objective C that I'm transitioning to Swift. In Objective C, I have this method:
[self.view performSelector:@selector(someSelector) withObject:self afterDelay:0.1f];
I'm working ...
144
votes
18
answers
97k
views
Xcode 6 - How to pick signing certificate/provisioning profile for Ad-Hoc distribution?
To distribute the app to our testers we use Xcode, which we do using the following process:
Archive application
Distribute for Ad-Hoc
Choose provisioning profile
Save the .ipa to a folder
But with ...
139
votes
9
answers
103k
views
Xcode 6 Storyboard the wrong size?
Built a new project from scratch in Swift in Xcode 6 (Beta 1) and have seen some strange behaviour with Storyboards and the output that I am viewing.
I have built a simple interface (as shown below) -...
138
votes
12
answers
32k
views
You are not authorised to use this service iTunes app upload error [closed]
Since the Apple "Users & Roles" update to iTunesConnect end of november 2015 some people have been experiencing an error message "iTunes Store operation Failed" and "You are not authorized to use ...
137
votes
16
answers
119k
views
Xcode 6 iPhone Simulator Application Support location
In Xcode 6, I have an app I'm using Core Data in, but there is no folder in Application Support for the iOS 8 iPhone Simulator. Where are my files and Core Data sqlite database being stored?
137
votes
8
answers
43k
views
How can Xcode 6 adaptive UIs be backwards-compatible with iOS 7 and iOS 6?
I just watched the WWDC video #216, "Building Adaptive UI with UIKit."
At about 45:10 Tony Ricciardi talks about changes to IB in Xcode 6 to support the new changes.
He says "You can deploy these ...
134
votes
2
answers
53k
views
What does "Protocol ... can only be used as a generic constraint because it has Self or associated type requirements" mean?
I am trying to create a Dictionary (actually a HashSet) keyed on a custom protocol in Swift, but it is giving me the error in the title:
Protocol 'myProtocol' can only be used as a generic ...
128
votes
19
answers
144k
views
Swift Bridging Header import issue
Following instructions, I've created a bridging header and added to my project. Unfortunately, the following error occurred:
:0: error: could not import Objective-C header '---path--to---header/.......
126
votes
8
answers
140k
views
Class 'ViewController' has no initializers in swift
Getting the complaint from the compiler when I am doing this
class ViewController: UIViewController {
var delegate : AppDelegate
override func viewDidLoad() {
super.viewDidLoad()
...
125
votes
1
answer
106k
views
Xcode - how to see build command and log?
I have build errors in my Xcode project (Objective-C), and I no longer "stumble upon" the build command string nor the build output logs. This is Xcode 6.3.1.
All I can inspect is a left-side panel ...
123
votes
7
answers
57k
views
Xcode6: Run two instances of the simulator
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 ...
120
votes
7
answers
76k
views
Adaptive segue in storyboard Xcode 6. Is push deprecated?
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:...
115
votes
11
answers
23k
views
Xcode 6 with Swift super slow typing and autocompletion
Is it just me or Xcode 6 (6.0.1) with Swift seems to be super slow when you type your code, especially with autocompletion?
A normal Objective-C class, even if inside a Swift project, works almost ...
114
votes
14
answers
49k
views
Cannot find executable for CFBundle CertUIFramework.axbundle
Just updated to Xcode 5 and this is the first error its throwing on the logger for all my apps. Can't seem to understand why this is happening.
2013-09-19 10:46:54.341 MyApp[1156:a0b] Cannot find ...
110
votes
9
answers
51k
views
error: module file's minimum deployment target is ios8.3 v8.3
All attempts to import a dynamic framework in an Xcode playground yield the following error:
error: module file's minimum deployment target is ios8.3 v8.3
109
votes
13
answers
70k
views
How do I create a new Swift project without using Storyboards?
Creating a new project in XCode 6 doesn't allow to disable Storyboards. You can only select Swift or Objective-C and to use or not Core Data.
I tried deleting the storyboard and from the project ...
106
votes
16
answers
55k
views
Attributed string with custom fonts in storyboard does not load correctly
We are using custom fonts in our project. It works well in Xcode 5. In Xcode 6, it works in plain text, attributed string in code. But those attributed strings set in storyboard all revert to ...
104
votes
9
answers
89k
views
Xcode 6 - Launch simulator from command line
I want to launch iPhone simulator from command line.
until now I have been using the below command
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/...
104
votes
6
answers
23k
views
Xcode can only refactor C and Objective-C code. How to rename swift class name in Xcode 6?
I have created a new Single View Application Project in Xcode 6 beta version. I want to rename swift class from ViewController.swift to some other name. But when I select Refactor -> Rename, it gives ...
104
votes
14
answers
17k
views
Custom Font Sizing in Xcode 6 Size Classes not working properly with Custom Fonts
Xcode 6 has a new feature where fonts and font sizes in UILabel, UITextField, and UIButton can be set automatically based on the size class of the current device configuration, right in the storyboard....