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
4
votes
2 answers

How to make post request in CURL with Perfect

I have set up a Perfect server and I have written all my API but I'm stuck at the CURL, I don't know how do I set headers I have never worked before with CURL. I am setting up a payment gateway and I want to set authorization headers and send body…
O-mkar
  • 5,430
  • 8
  • 37
  • 61
4
votes
2 answers

OAuth 2.0 Server Provider in Swift with Perfect

How do I offer OAuth 2.0 provider services using swift? I would like to use swift as a rest API but missing this integral component. Would probably be able to build something from the spec but don't have budget on this particular project. Would…
robwithhair
  • 350
  • 3
  • 11
4
votes
1 answer

Will I be able to use Realm on Linux, with Perfect?

Perfect - https://www.perfect.org - is a new web server which lets you use the same language on the server-side as you do on your the device. It will be compatible with the Linux version of Swift when it is released before the end of this year -…
cannyboy
  • 24,180
  • 40
  • 146
  • 252
3
votes
1 answer

How do I make Pixel Perfect Camera scale like Normal Camera in Unity 2D

This is my scene Right now if I use resolutions that aren't 16:9 the Pixel Perfect Camera zooms out quite a lot showing parts that shouldn't be shown. How do I get it to scale like the Normal Camera which just cuts out parts outside the borders? The…
Sir Bob
  • 31
  • 3
3
votes
1 answer

Location of webroot (for css file) in Perfect app

I've cloned the PerfectTemplate project and am using it to serve up html as follows… import PerfectHTTP import PerfectHTTPServer var routes = Routes() routes.add(method: .get, uri: "/test") { request, response in …
Ashley Mills
  • 50,474
  • 16
  • 129
  • 160
3
votes
0 answers

Running Swift Perfect and NGINX

So I have a Swift server-side app running on my Ubuntu box, it's using the Perfect Framework and runs on port 8080. I want NGINX to forward requests on port 80 to port 8080 (behind the scenes) My config is server { listen 80; server_name…
Burf2000
  • 5,001
  • 14
  • 58
  • 117
3
votes
2 answers

Swift 3: Method expecting variadic String parameter can only receive single String argument

I'm calling a method expecting a String... variadic parameter, but the only thing it allows receiving from the enclosing function is a plain String. My method looks like this: public func deleteKeys(keysReceived:String...,…
Tyress
  • 3,573
  • 2
  • 22
  • 45
3
votes
0 answers

User authentication with Perfect Swift

Is there a good method for implementing user authentication with Perfect Swift? Something of a kind with this: https://www.raywenderlich.com/85528/user-accounts-ios-ruby-rails-swift I really like the idea of only developing in Swift for server and…
Ethan Kay
  • 657
  • 6
  • 24
3
votes
1 answer

Perfect Server HTTP - File not found

I’m using Perfect Server to create a Swift backend for my application. After following this tutorial: http://www.chrismanahan.com/creating-a-web-service-swift-perfect I get to the stage where I test my server. When PerfectServerHTTP loads, I open up…
Adam Carter
  • 4,741
  • 5
  • 42
  • 103
3
votes
0 answers

Server-side Swift - Perfect "Can not pass data from one page to another."

I wanted to write an example to pass data from one page to another but something is not going right. Figure 1: homepage to enter some text to display on next page. index.mustache file {{% handler:PerfectHandler}}
2
votes
1 answer

Making a route both intermediate and final?

In building an app with PerfectHTTP I've come up against a problem with routing: Routes that are used as intermediate routes cannot also be used as final routes. When set up as below, some URLs track correctly (/index.html in the example), while…
Williham Totland
  • 28,471
  • 6
  • 52
  • 68
2
votes
0 answers

Perfect Assistant - Error in Importing Existing Package

Version: Perfect Assistant v 3.0.5 Swift: 4.1.2 Target: x86_64-apple-darwin17.7.0 I cloned, built and ran the PerfectTemplate package. Everything runs perfectly (pun intended). I have not (yet) created the Xcode project for this package. When I…
2
votes
1 answer

Perfect template

I'm running this code in swift with the perfect template framework using Swift Package Mannager var values: MustacheEvaluationContext.MapType func extendValuesForResponse(context contxt: MustacheWebEvaluationContext, collector:…
2
votes
2 answers

How to implement multicast sockets in swift?

I'm writing a server that, among other things, needs to be constantly sending data in different multicast addresses. The packages being sent might be received by a client side (an app) which will be switching between the mentioned addresses. I'm…
doguico
  • 23
  • 6
2
votes
1 answer

Why is the --clean not available any more for Swift command line? How to do clean now?

I try to clean the build by following the instruction in Perfect (Server side Swift framework): swift build --clean but it shows error: error: unknown option --clean; use --help to list available options My swift version is >> swift…
Joe Huang
  • 6,296
  • 7
  • 48
  • 81
1
2
3
8 9