Questions tagged [kitura]

This tag should be used to discuss issues related to the Swift server framework Kitura.

Kitura is a server framework developed by IBM and written in the Swift programming language. This tag should be used when discussing issues and errors regarding the operation of Kitura. The tag should not be used for erroneous code that is running on Kitura if the framework has no relation to the error at hand.

89 questions
1
vote
1 answer

Kitura failed to deploy to bluemix

I created a local swift kitura app which works fine locally. But when I push it to bluemix the instance starts running and then fails.
Amith Shaju
  • 143
  • 7
1
vote
1 answer

How to use tag {%include example.html%} Stencil with Swift

I embedded template Stencil in my project (Kitura https://github.com/IBM-Swift/Kitura ,template engine Stencil https://github.com/kylef/Stencil#include). I don't understand how to use tag {% include "comment.html" %}. my example , but not…
duck
  • 47
  • 5
1
vote
1 answer

Can't compile Swift package with Kitura on Xcode 8

Trying Kitura from IBM. I made swift package using swift package init --type executable then I made xcode proj with swift package generate-xcodeproj My Packages.swift file is like this import PackageDescription let package = Package( name:…
Andrei Malygin
  • 365
  • 2
  • 12
0
votes
1 answer

how to deal with responses containing unicode in Kitura (swift)

I have a route ("/states"): func initializeCodableRoutes(app: App) { app.router.get("/states", handler: app.getStatesHandler) } here is the corresponding handler (Codable handler): extension App { func getStatesHandler(completion:…
0
votes
0 answers

AVQueuePlayer not playing when I load an http url pointing to data in memory MacOS/IOS

I am developing an app which extracts the contents of a remote URL to memory then attempts to serve it from my app's http server, using Kitura. If I write the data to a file before loading to AVQueuePlayer it plays just fine; but if I add the data…
0
votes
1 answer

Incomplete image sent over TCP using BlueSocket framework

I’ve been trying to send image over TCP using Kitura BlueSocket. Every time I try to decode image from Data object I get Warning! [0x7fb6f205e400] Decoding incomplete with error code -1. This is expected if the image has not been fully…
Veiserath
  • 1
  • 1
0
votes
3 answers

SwiftJWT crashes iOS App on JWT.init() call

The following code crashes on iPad mini 2 / 3 only when executed from the AppStore distributed executable. let jwtVerifier = JWTVerifier.es512(publicKey: publicKey.data(using: .utf8)!) do { let parsedJwt = try JWT(jwtString: jwt,…
Dennis Stritzke
  • 5,198
  • 1
  • 19
  • 28
0
votes
1 answer

Trimming a String inside a loop in Swift 5

I am using Swift 5 for a server side development (Kitura) and since the template engine doesn't have a way to trim long text (think the body of a blog post) I was wondering how to trim it in Swift directly. Other questions address it differently…
devnull
  • 2,752
  • 1
  • 21
  • 38
0
votes
0 answers

kitura docker error checking context: 'can't stat '/home/conor/workspace/UserInstruction/.build-ubuntu/checkouts''

I am unable to build the docker image which will be uploaded to DockerHub/AWS EC2, the folder is owned by root. The docker install is as directed on the official docker docs, the hello-world test runs without error. I am following the post here…
Conor
  • 426
  • 7
  • 22
0
votes
1 answer

Alternative for Calendar function in Swift for ubuntu?

i am trying to build a running Docker Image for my Kitura AppServer. I am doing the Coding in XCode on my MacBookbut i want to deploy the server to a Cloud Environment by using Docker. This requires to make a build in Unix in my case an ibm Version…
Bliv_Dev
  • 557
  • 7
  • 19
0
votes
0 answers

How to add array of objects to stencil context?

I created Codable struct Person. And I tried to add array of objects of this struct to stencil's context (See code down). But it doesn't work. How do it right? struct Person: Codable { public var name: String public var age: UInt8 …
0
votes
1 answer

Use UIKit with Vapor or Kitura

I have developed an iOS App and would like to create a web API with some parts of my code. This API will send an UIImage generated from a UIView. The problem I have with Vapor is that I only managed to use AppKit, not UIKit. Certainly because the…
Adz
  • 281
  • 3
  • 16
0
votes
1 answer

support for chunked encoding in responses

Does Kitura support sending responses using chunked encoding? I'm looking for the equivalent of this from Vapor 2. Not seeing anything in the docs/source for it.
user81434
0
votes
1 answer

How to call mysql stored procedure in kitura application

I need to call MySQL stored procedures in kitura application and use it for the query result. how can I do that
Mac3n
  • 4,189
  • 3
  • 16
  • 29
0
votes
0 answers

How to retrieve CouchDB attachments from Server-Side Swift

I’m struggling on how to retrieve an attachment from a CouchDB in Server-Swift. I understand that CouchDB has a kind of ‘flag’ (called stub) to indicate that there is an attachment. In the JSON structure I get back from CouchDB I can spot under the…
thewall
  • 53
  • 6