Tag: swift

How to build Swift Perfect Server using Xcode for Ubuntu?

So I understand how we can build it for OSX but how do we build perfect server http on Linux? Is there a way we can build the source code using Xcode but have it compile for Ubuntu?

Container view segue to same size view controller

I have the following Storyboard: So far, I could only achieve same size Third View Controller in the storyboard if I segue via show, but I would prefer custom method. My goal is, to segue from Second View Controller to Third View Controller and only replace the Second View Controller which is a Container View […]

Swift: Segmentation fault 11 on importing files to bridging header

I have this legacy code base written in objective C, I recently tried to incorporate swift, I made all the necessary changes for using swift like bridging headers and build settings. When I add new objective C files and import them to bridging header everything works fine, but when I try to import old objective […]

How to reorder cells under UITests?

Along with UITests and UITableView I need to reorder cells. Is it possible? I tried myTable.swipeDown() but it is called in that place of cell which do not respond for reordering. How can I do this? Is it possible at all?

I'm trying to pass data between view controllers, but only half of my 16 variables pass?

This question already has an answer here: My variable value is different than the value the prepareForSegue takes when transferring? 2 answers

How can I replace my .xib file with pure Swift 3?

I am making a macOS Cocoa application which only runs in the menu bar. When I initially created the project, Xcode gave me a file called MainMenu.xib. This MainMenu.xib file does not appear to contain anything relevant to my menu bar application, so I wish to remove it. The Cocoa entry point, the function NSApplicationMain, […]

Build failed with error Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc

I am using Xcode 8.2.1. I am also using CoreData in my project. When I try to generate a build or when I archive I am seeing the following error. Files mentioned in the error also changes at times. ERROR: <unknown>:0: error: no such file or directory: ‘/Users/anuragparashar/Library/Developer/Xcode/DerivedData/app-drgjxhipxxqdrcatqfdgpayyxnud/Build/Intermediates/app.build/Debug-iphoneos/app.build/DerivedSources/CoreDataGenerated/app/BuildingRoofMapping+CoreDataClass.swift’ <unknown>:0: error: no such file or directory: […]

Segmentation fault: 11 – Cross-reference to module

I’m trying to resolve an Segmentation Fault with Cross-references to modules. Don’t know how to make this work. Part of error below: 1. While reading from /Users/damiandudycz/Library/Developer/Xcode/DerivedData/Hypno-azmcjycezcoqnfauqcbgimvipjyj/Build/Intermediates/Hypno.build/Debug-iphonesimulator/Hypno.build/Objects-normal/x86_64/WorldObjectBasedAugmentedRealityObject~partial.swiftmodule 2. While deserializing ‘WorldObjectBasedAugmentedRealityObject’ (ClassDecl #12) 3. While deserializing decl #31 (XREF) 4. Cross-reference to module ‘AugmentedReality’ … AugmentedRealityView … in an extension in module ‘AugmentedReality’ … Object […]

How do I access variables that are inside closures in Swift?

I’m new to Swift and I’m trying to get the result from this function. I don’t know how to access variables that are inside the closure that is passed to the sendAsynchronousRequest function from outside the closure. I have read the chapter on closures in the Apple Swift guide and I didn’t find an answer […]

Swift TextField has no width

I have just started learning swift and have been trying to create a layout using the scoreboard. I have placed two textfields and set the constraints properly using the document outline. However when I run the emulator the Text Fields display wrong. I have attached a screenshot, The left is what happens in my emulator […]