Questions tagged [server-side-swift]
79 questions
1
vote
0 answers
How to use regexp in Vapor Fluent sqlite?
I have a simple model that has a string field, like this:
final class Record: Model, Content {
@ID(key: .id)
var id: UUID?
@Field(key: "name")
var name: String
...
}
And I want to query and filter this name field using a…

Axeler4t0r
- 11
- 1
1
vote
1 answer
Vapor - Create a room session with ID
I'm working on a Vapor backend and I'm looking to create sessions for single entry. The client should ask to create the session and the backend will return a session ID that the client can use.
This is the outline:
// routes.swift
func routes(_…

Eilon
- 2,698
- 3
- 16
- 32
1
vote
1 answer
Xcode giving "Cannot find type 'TYPE' in scope" errors with Swift Package
I have been doing server-side development for some years now using server-side Swift, using Xcode as a convenient editing tool. And now that Xcode has support for Swift packages, the situation has generally improved. I'm not targeting any…

Chris Prince
- 7,288
- 2
- 48
- 66
1
vote
0 answers
Nginx returns 404
I started my project (api-template) run on localhost (pid 8907) with supervisor.
Here is my project's supervisor.conf file:
[program:api-template]
command=/home/rezuan/api-template/.build/x86_64-unknown-linux-gnu/release/Run serve --env…

Michel Rivera
- 79
- 6
1
vote
1 answer
How to downgrade vapor 4 to vapor 3?
I have just downloaded vapor for the first time and I got vapor 4, and unfortunately, all the tutorials I have are built on vapor 3, how to downgrade vapor version?

Ramy Wadia
- 45
- 6
1
vote
1 answer
Vapor 3 - How to populate array property of model from Leaf template form
I have a Group, User and an App model. Within my Group model, I have a property var apps: [App] and I create a sibling relationship bw Group and User.
In my WebsiteController, I have 2 handlers:
createGroupHandler which handles the GET request at…

gflo
- 186
- 3
- 13
1
vote
1 answer
Running Swift on Heroku: error while loading shared libraries
I'm trying to deploy a Swift application to Heroku. I'm using Swift 5.0.2 and Heroku Stack 18. This application was previously working with Swift 3.0 and Heroku Stack 16.
I'm not sure what this error is even exactly telling me so I don't quite know…

Ryan Poolos
- 18,421
- 4
- 65
- 98
1
vote
1 answer
Understanding Migrations in Vapor-Fluent (Server side Swift)
I'm writing a web service in Swift using Vapor framework.
I have model named Item. Intially it has only name and id properties.
typealias VaporModel = Content & PostgreSQLModel & Parameter
final class Item: VaporModel {
var id: Int?
var…

imthath
- 1,353
- 1
- 13
- 35
1
vote
2 answers
PerfectSwift: swift package update runs endlessly
I do have an older Perfect Swift project where my package.swift looks the following:
// Generated automatically by Perfect Assistant Application
// Date: 2017-09-24 18:44:24 +0000
import PackageDescription
let package = Package(
name:…

swalkner
- 16,679
- 31
- 123
- 210
1
vote
1 answer
Network.framework: nw_read_request_get_maximum_datagram_count
I'm trying to get a UDP server functioning within Network.framework. However, whenever I managed to get my client and server connected, after some time I receive the error nw_read_request_get_maximum_datagram_count
I've tried looping with Timer and…

Emma K Alexandra
- 464
- 3
- 15
1
vote
0 answers
Server side Swift : Error when push to heroku
I have a problem when i push it to master
remote: -----> Swift app detected
remote: fatal: not a git repository (or any parent up to mount point /)
remote: Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM
not set).
remote: ! …

Ken Nguyen
- 106
- 5
1
vote
1 answer
Unable to redirect to url using Server Side Swift Perfect
I'm using Server Side Swift Perfect framework for web services.
Mustache module for serving static/dynamic content.
I want to implement login functionality following a redirect to the homepage on Successful authentication.
"I searched everywhere…

Master AgentX
- 397
- 2
- 18
1
vote
1 answer
Swift Vapor Sample Not compiling
I'm trying to get my feet wet with server side swift, and specifically Swift Vapor by trying the Ray Wenderlich HelloVapor tutorial.
Basically performed the following steps so far using (my swift -version on Apple command prompt is Apple Swift…

CoolDocMan
- 637
- 7
- 29
1
vote
0 answers
Server Side Swift Using Kitura Framework
i hope all is well
i start learning the server side swift before one week and i face the problem and no one tell me how can i fix it till this day
the problem is when i use the StencilTemplateEngine with upToNextMinor(from: "1.8.5" nthe tags not…

Dark Knight
- 370
- 3
- 13
1
vote
2 answers
How to get serverside file uploading progress in Perfect
I'm trying to create a web page using Perfect(perfect.org), Where users will browse and upload files. Can anyone tell me how can I get the progress of file upload?

KMKR
- 109
- 1
- 12