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

Postgres + Perfect + Swift uploading UIImage as Base64

What I have to is just let user pick photo, upload it on server and then decode back and display it. What I am doing now is encode image and then pass it to a model as Base64. I store it as bytea in PosgtgreSQL. let imageb: NSData =…
JuicyFruit
  • 2,638
  • 2
  • 18
  • 35
1
vote
1 answer

Making api highly available in Swift Perfect

I have defined an API for giving data from MongoDB. But, the problem is, if I hit the api continuously from same IP address, the results are not consistent. If it gives proper result for first time, the next time it gives failed to connect. If I hit…
Vikas B L
  • 397
  • 1
  • 10
1
vote
1 answer

Connecting to Oracle Database Using Server Side Swift

Is it possible yet to connect to an Oracle Database using Swift (raw or a Swift framework) on Linux? What I have done is tried to build a Docker VM, install the Oracle binaries, add the OCILIB package and then connect [tried] using a package called…
kschlagel
  • 11
  • 4
1
vote
0 answers

Models in Perfect (Server-Side Swift) and StORM

I have some question about modeling in Perfect and using StORM (MySQL-StORM in my case). Assume we have models named User and Note with these simple rules: Users have id, firstName, lastName, age(optional) Notes have id, title, content Users could…
Omid Golparvar
  • 468
  • 5
  • 12
1
vote
1 answer

Perfect + Mongo project build errors on ubuntu

I'm getting these errors when trying to build swift app that uses Perfect-HTTPServer and Perfect-MongoDB package dependensies Compile Swift Module 'MongoDB' (7 sources) :1:10: note: in file included from…
Dannie P
  • 4,464
  • 3
  • 29
  • 48
1
vote
1 answer

Swift Perfect does not load image or css

I am new to perfect, and the thing is, it does not load css or image for some reason. I have put them all in the same directory: webroot: index.html styles.css pic.jpg And the code is just:
WatashiJ
  • 722
  • 6
  • 19
1
vote
1 answer

Link model object to existing database table in Vapor

I have a database with some complex relationships mapped and populated with a large amount of data. My requirement is that I need to use this database with Swift-Vapor server. So that I created a model object (with Fluent framework constructs)…
Alex Andrews
  • 1,498
  • 2
  • 19
  • 33
1
vote
1 answer

Authenticating FOS user outside of Symfony

I am developing an API that needs to work with an existing Symfony installation. The API is written in Swift using Perfect. I've determined that Symfony uses the FOS user bundle and MessageDigest encoder (aka SHA 512 hashing). Looking at the…
1
vote
2 answers

Swift: Perfect Server: How to send Push Notification?

I'm using PerfectlySoft Perfect-Notifications and try to import it via the following: .Package( url:"https://github.com/PerfectlySoft/Perfect-Notifications.git", majorVersion: 2) but I always get the following…
swalkner
  • 16,679
  • 31
  • 123
  • 210
1
vote
1 answer

How to call update() method of in Angular 2 Perfect Scrollbar wrapper?

I try to implement Perfect Scrollbar to my Angular 2 Application and use Angular 2 Perfect Scrollbar wrapper: https://github.com/zefoy/angular2-perfect-scrollbar If i have large content at application start moment my scrollbar appears and works…
valer_1
  • 11
  • 3
1
vote
2 answers

Using Dispatch queue in swift 3 perfect 2.0

I'm using swift perfect 2.0 and i need to call a function after 10 seconds. I can make it work on a normal iOS application with this code: let when = DispatchTime.now() + 10 DispatchQueue.main.asyncAfter(deadline: when){ //call function } But i…
Phuzer
  • 41
  • 5
1
vote
2 answers

Synchronous or asynchronous in swift server (Perfect)

I have created a Swift 3.0 server using the Perfect Framework. Everything works great as expected but i am trying to learn if there is a better way to do some things. Coming from an iOS background I know to always call any blocking function in a…
gabriellanata
  • 3,946
  • 2
  • 21
  • 27
1
vote
1 answer

xcode 8.1 debug symbols missing

When generating projects with swift package manager (specifically https://github.com/PerfectlySoft/PerfectTemplate.git) that have an executable (a main.swift), I loose the ability to access local debug symbols when using Xcode 8.1 and later (see…
Ethan Kay
  • 657
  • 6
  • 24
1
vote
1 answer

Perfect/Swift Compilation Working in OSX, Failing in Linux

So I'm using Perfect server to develop an application that returns values to a client. At the moment, it requires it to download some data from another API, process it, and send it down to a client. For some reason however, it compiles fine in OSX…
Frogger
  • 86
  • 1
  • 8
1
vote
1 answer

What is the best practice for terminating a Swift-Server using Perfect during server startup?

I'm using Perfect server-side Swift, and have some conditions in the main.swift where the server should be terminated before actually starting up. Is there a best-practice for handling this termination? Currently, I'm throwing an error because a…
Chris Prince
  • 7,288
  • 2
  • 48
  • 66
1 2 3
8 9