Questions tagged [swift]

WARNING: Questions relating to programming generally belong on Stack Overflow. Scripting and automation questions using swift are on topic here and SO but may be received better here if the overall question is less about the details of the swift language.

Filter by
Sorted by
Tagged with
15
votes
7answers
46k views

Where can I download Xcode (n) Beta?

I want to start developing in Swift. I already own an apple developer account, yet am struggling to download Xcode (n) beta. How can I do this? Thank you in advance.
15
votes
1answer
13k views

Reopen Swift 2.0 migration tool in Xcode 7

I just opened a Swift project on the new Xcode 7. I didn't really look on what button I clicked and closed the migration tools without migrating anything. Any idea how I could reopen it?
10
votes
3answers
41k views

Is it possible to select which version of Swift to use in Xcode?

There's an update for Xcode 6.3 and it includes a new version of Swift (1.2). If I update, do I have to migrate all my Swift code to 1.2 or can I select an older version of Swift?
6
votes
1answer
17k views

Is Xcode with Swift on Mavericks possible?

My school computers have OS X 10.9.4 on them but they don't want to update them because of incompatibility with their Music class software. From what I see on Apple's website Xcode 6.4 and 6.3.1 both ...
5
votes
1answer
7k views

How to install Xcode 6? [duplicate]

I just got myself a MBA and I am wondering how do I install Xcode 6 on my MBA? In the Mac App Store I can see Xcode 5.1.1 so I have started installing that on the MBA. But, I want to install Xcode 6 ...
4
votes
1answer
2k views

How to find duplicate lines of code in Xcode

When I am making applications in Xcode, I sometimes find that I write duplicate code. Is there a way in Xcode to find duplicate code in all files? I would like to know this because I would put the ...
4
votes
1answer
414 views

How do you install playground books on iPad?

I found a playground book from Apple online called "Talking To The Live View". It's an updated playground from the 2016 WWDC. I want to install it on my iPad and try it out. Further, I want to ...
4
votes
1answer
96 views

VoiceOver reading results of Swift Playground print statements in Xcode

(By way of background I have been helping a local blind child learn coding. He's switching schools from a Windows based school to a Mac based school so I am trying to familiarise myself with VoiceOver ...
3
votes
2answers
349 views

Swift on Xcode 6

I'm trying to use Swift on Xcode 6 for an OS X application, but it defaults the language to Objective-C and won't let me switch it to Swift. I can use Swift for iOS but not OS X. I have the latest ...
3
votes
1answer
310 views

Compiling Swift 2 code [closed]

I have an app which is written in Swift 2.1. Is it possible to build it in Xcode 9? If not, how do I build it?
3
votes
1answer
254 views

Where to find online documentation for older versions of Swift?

Is there an official online Apple source for documentation for Swift 3? (Preferably that can be accessed without signing in to a developer account.) Browser searches for "Swift 3" are finding links to ...
2
votes
3answers
1k views

Programming Swift without OS X [duplicate]

A friend of mine suggested that I learn Swift, as it would help me get a job that I had applied for, and I thought this was a good idea. The only problem: I don't own a Mac computer, or anything with ...
2
votes
1answer
3k views

Apple guidelines for back button

Are there any guidelines for the position of the back button? I always see the back button at the top-left part of the screen, but I don't know the exact position I should place it.
2
votes
4answers
4k views

How can I download Swift?

I've been trying to get my hands on Swift, but I can't seem to find it. Is it released yet? If not, when will it be released?
2
votes
2answers
169 views

How should I organise my plist? [closed]

I'm creating a game where the player can unlock worlds, where they can unlock levels within those worlds, each levels has a highscore, and so on. I was wondering in which way should I store this data?...
2
votes
1answer
493 views

cheapest iPad necessary for running Swift Playgrounds application

What's the oldest (read: cheapest) iPad I can purchase that will run the Swift Playgrounds app for learning the Swift programming language?
2
votes
2answers
922 views

Terminal problem: “-bash: $: command not found”

I'm trying to start learning Swift and when I use the terminal line $ export PATH=/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin:"${PATH}" it gives me -bash: $: command not found ...
2
votes
2answers
1k views

Install unsupported iOS version

I am developing iOS apps with Swift, and don't want to buy an Apple device to test them, and have just got an iPod 4gen which supports iOS up to 6.1. I just wanna know if there is absolutely no ...
2
votes
1answer
806 views

How to have both Swift 2 and Swift 3 books in iBooks library

I'm a professional software developer who is still supporting clients using Swift 2. However, I'd like to be getting up to speed on Swift 3 since clearly it is the wave of the future. My copy of ...
2
votes
2answers
7k views

ERROR ITMS-90158: URL schemes need to begin with an alphabetic character - Google client ID

When trying to Upload to App Store... received the following error: ERROR ITMS-90158: "The following URL schemes found in your app are not in the correct format: ... URL schemes need to begin with an ...
2
votes
1answer
1k views

XCode debug error Thread 1

Ok so I'm trying to work with swift on XCode but every time I start to run my code I get this Thread 1 Queue: com.apple.main-thread(serial) What does this mean?, and how do I fix it? Also i've ...
2
votes
0answers
403 views

Apple Xcode: remapping camera's Pan, Orbit and Dolly controls in SceneKit module

I'd like to remap the following camera controls in SceneKit module of Xcode 9.2 (I'm coding in Swift): panning – alt + LMB orbiting – LMB dollying – alt + MMB Pan drags the virtual camera ...
2
votes
0answers
135 views

Monitoring directory in finderSync extension failed to work [closed]

I have developed a Cocoa application with a FinderSync extension through which a newly created directory is monitored. Sometimes it works fine but sometimes when I activate the Drive and Dropbox ...
2
votes
0answers
1k views

How to disable indexing for a big Swift project?

I have a big Swift project. It's about 40 ViewControllers, 2 storyboards and some frameworks. When I make some changes XCode begins indexing all the project and it takes a very long time! How can I ...
2
votes
0answers
496 views

What does Swift mean for people learning iOS development for the first time [closed]

I quit my job to pursue programming full time and I was planning to take an ios app development course at a college near me that teaches iphone & ipad dev using Objective C. Now that Swift has ...
1
vote
1answer
45 views

Do you need a Macbook Pro w touchID to test the authentication in your Swift app?

I'm thinking of buying a MBP base model for Swift programming, and I know that Xcode has a simulator for the touch-bar, but do I need the one with actual touchID hardware if I want my app to require a ...
1
vote
1answer
27 views

Can I lock my app until user give me a permission (like location permission)?

I am developing an app and I am highly in need of location services and without that my app is not working. Can I block users from using my app (showing a page to them) until they go to settings and ...
1
vote
0answers
45 views

iOS Newsstand app background mode [closed]

Does Apple still support Newsstand apps? I searched a lot but I can't find any tutorial or a demo for such an app with NewsstandKit. If this is not used anymore, why does the Newsstand background ...
1
vote
0answers
35 views

How can I remove annoying messages about versioning from Xcode?

Practicing a bit with the Swift language, I am currently using Xcode v.9.2 in the playground mode. While coding, every time I just add a single statement, the following window appears: Is it possible ...
1
vote
0answers
45 views

How to find out fully qualified hostname in osX (Terminal / Swift)? [duplicate]

i've checked several posts, for example - (Make `hostname -f` return fully qualified hostname) My apple machine is connected to the domain and i'm logged on with a domain user. the thing is, that ...
1
vote
0answers
63 views

iTunes Connect developer API for own statistics site [duplicate]

I'd like to setup my own statistics site for my own released apps. I'm just wondering, if it's possible to have an iTunes Connect API where I can fetch all statistics from the iTunes Analytics area ...
1
vote
0answers
69 views

How do I stop Xcode from replacing “selected” character with another character?

I made some changes to some source code today, and noticed that when I replaced "inDirectory" in a Bundle.mainBundle.pathForResource call with "subdirectory" and subsequently put it back in, Xcode ...
1
vote
0answers
133 views

Get Swift Playgrounds back? iOS 10 GM Warning

I just updated to the final release of iOS 10.0.1 on iPad Pro 12.9 inch Swift Playgrounds is gone, and it's not in the App Store. I've lost all my Playgrounds, I presume. No great loss. But how do ...
0
votes
2answers
11k views

iOS background image height width in Xcode for 1x, 2x, 3x [closed]

I am trying to add a background image to iOS app. I am not sure about the dimensions of the image for the 1x, 2x, 3x. I want the background image working for all screen sizes.
0
votes
1answer
22 views

Why when I make a change to a project on xcode the previous project is affected? [closed]

I recognize that I'm new in using Xcode but I noticed A very strange behavior from XCODE, when I clone a project and I make changes in the Localizable.strings. these changes are automatically ...
0
votes
1answer
74 views

can't swift auth in Sierra

swift auth yields the error: error: unable to invoke subcommand: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-auth (No such file or directory) when ...
0
votes
1answer
198 views

Can't use my 9.0.1 iPhone with Xcode

My Macbook and my iPhone are updated to the OS X 10.11 Capitan and iOS 9.0.1, but when I try to use my iPhone as a running device with Xcode, it tells me I can't use it because of the version of them. ...
0
votes
1answer
160 views

Swift is not available for OS X Application?

I just had a clean install of Yosemite Version 10.10 (14A389), and my Xcode is Version 6.0.1 (6A317). When I create a new iOS project, I can choose languages from Swift and Objective-C. However, when ...
0
votes
0answers
7 views

Choose HCI Host Controller from command line

How can I choose the the Host Controller OSX is using from the command line? I'm looking to duplicate the functionality pictured below (which is from the Xcode Bluetooth Explorer tool). Is there a ...
0
votes
0answers
155 views

Extracting info.plist file from an iOS app binaries

I want to retrieve the privacy permissions declared by an iOS app (it could be any app on App store) in their info.plist file. In order to do this I need to first get the binaries for the app. Is ...
0
votes
1answer
92 views

What is Visual Studio Code? Is it an efficient tool for Swift Development? [closed]

Scrolling to the #Linkedin feeds I have come across the term #VSCode. Please, anybody, explain the pure purpose of the tool or it's really trending in development Visual Studio Code combines the ...