Questions tagged [perfect]

Perfect is a framework for developing web and other REST services in the Swift programming language. It lets developers build using only Swift to program both the client-facing and server-side of their projects.

enter image description here

Perfect is the first enterprise-grade web server and toolkit designed exclusively for developers using Apple’s open source programming language, . Perfect eliminates the need for developers to choose and learn an additional programming language to program backend server software. Perfect runs on iOS, MacOS, and Linux.

129 questions
1
vote
1 answer

How to change process title in Swift on Linux?

Python: setproctitle How to do the same thing in Swift?
Aiden Leong
  • 121
  • 1
  • 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
0 answers

Swift command line linking fails with "duplicate symbols" error

I am referencing some C projects in my Package.swift. Recently I have added a project that references other C projects in its own Package.swift file, and while those C projects are different from my referenced projects, they contain same-name object…
Tyress
  • 3,573
  • 2
  • 22
  • 45
1
vote
1 answer

How to delete old IAM Credentials in Perfect Assistant - Server Side swift?

I am trying to delete old IAM Credentials in Perfect Assistant? of course I know how to delete IAM credentials in AWS but I need to clear it on my mac for Perfect Assistant. I can't find the instructions anywhere here or in google search how to do…
HotDudeSmith
  • 113
  • 1
  • 2
  • 13
1
vote
1 answer

WKWebView fails to load static files when served via PerfectHTTPServer

I'm trying to load WKWebView by running a local server (PerfectHTTPServer), and serving files from the documents folder in the iPhone application. The path is correct since this works with a server launched with Swifter. This is code snippet I use…
Shail
  • 11
  • 2
1
vote
1 answer

How to lock/unlock variable in Swift Perfect framework

How to lock var transactions in Swift Perfect framework, to avoid inserting new transaction by some other thread, just before I remove all items in function storeTransactions(): class Foo { var transactions: [Transaction] = [] func…
MMiroslav
  • 1,672
  • 20
  • 32
1
vote
1 answer

Using CommonCrypto/CommonHMAC.h in Swift on Linux (Ubuntu) to get SHA256

I am trying to build: static func sha256(string: String) -> String? { if let data = string.data(using: .utf8) { var hash = [UInt8](repeating: 0, count: Int(CC_SHA256_DIGEST_LENGTH)) data.withUnsafeBytes { _ =…
aepryus
  • 4,715
  • 5
  • 28
  • 41
1
vote
1 answer

How to create a Proxy Server using Swift Perfect Framework?

I want to use Swift Perfect Framework to make a proxy server. My idea is following: get the request's url ,header.etc informations. use the informations to create new request. get response from the new request.and use the response's information to…
huixing
  • 321
  • 2
  • 11
1
vote
0 answers

Perfect-Notifications: Unable to write frame

I'm sending push notifications like so: var items:[APNSNotificationItem] = [.customPayload("body",body),.contentAvailable] if alert { items.append(.badge(badge)) items.append(.alertBody(message)) …
Tyress
  • 3,573
  • 2
  • 22
  • 45
1
vote
1 answer

Unwrapping long datatype in Swift Linux

I'm trying to get a record from MongoDB which has a DateTime property. This property is ISODate but is received as a long data type (milliseconds since 1970) through the Perfect-MongoDB API. The code looks like this: if var something =…
Tyress
  • 3,573
  • 2
  • 22
  • 45
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
1
vote
1 answer

How do i deploy a Perfect (swift) backend code + PostgreSQL to Google App Engine

i'm pretty new to web development and much more in Google Cloud, sorry for anything. Basically, i'm doing the backend part of an app in Swift (using Perfect), and it's running smoothly and okay in my local computer, i'm using a local Postgre…
RoxDan
  • 53
  • 1
  • 8
1
vote
1 answer

Xcode file path error

I am developing backend with Perfect + Swift3, I want to load a text file with configuration. When I run the project in Xcode8 id does not detect the text file. However when I build the app for linux it works fine. After debug I found problem is…
Shafraz Buhary
  • 643
  • 6
  • 14
1
vote
2 answers

Point domain to a Web Application running on OS X Server (ex. Kitura, perfect, vapour server)

Using the OS X server application, I can point multiple domains to various websites. All domains can use port 80 at the same time and OS X will resolve which website to use. When I start my kitura server (I suppose the same happens with Vapor and…
zirinisp
  • 9,971
  • 5
  • 32
  • 38
1
vote
1 answer

How to read and write images to web root directory in Perfect-Swift?

I have hosted a Perfect-Swift web application in a Ubuntu Linux server. I'm looking for a way to read an image file from the web root directory and convert it to base64 compatible string to send in the response.
rajeeva9
  • 139
  • 12
1 2 3
8 9