如何解决我在Vapor 2中遇到的这些OpenSSL/TLS问题?他们阻止我在命令行和Xcode中编译我的项目.
在SPM构建期间:
note: you may be able to install ctls using your system-packager:
brew install ctls
note: you may be able to install ctls using your system-packager:
brew install openssl
Run Code Online (Sandbox Code Playgroud)
SPM构建失败后:
Linking ./.build/debug/Run
ld: library not found for -lcrypto for architecture x86_64
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: build had 1 command failures
error: exit(1): /Library/Developer/Toolchains/swift-3.1-DEVELOPMENT-SNAPSHOT-2017-03-07-a.xctoolchain/usr/bin/swift-build-tool -f /Users/tanner/Desktop/PackageConfig/.build/debug.yaml
Run Code Online (Sandbox Code Playgroud)
同样在SPM中:
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "shim.h"
^ …Run Code Online (Sandbox Code Playgroud) 升级到Swift 3.1后尝试使用Vapor工具箱时崩溃了.
dyld: lazy symbol binding failed: Symbol not found: __TTSfq4n_s___TFVSS13CharacterView38_measureExtendedGraphemeClusterForwardfT4fromVVSS17UnicodeScalarView5Index_Si
Referenced from: /usr/local/bin/vapor
Expected in: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib
dyld: Symbol not found: __TTSfq4n_s___TFVSS13CharacterView38_measureExtendedGraphemeClusterForwardfT4fromVVSS17UnicodeScalarView5Index_Si
Referenced from: /usr/local/bin/vapor
Expected in: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib
Run Code Online (Sandbox Code Playgroud) 我在尝试安装Vapor的CTLS包时遇到以下错误.
Gertrude:ctls tanner$ brew install ctls
Error: No available formula with the name "ctls"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
Run Code Online (Sandbox Code Playgroud) 基本上是标题.我想知道如何在Vapor 3中使用url查询参数.我似乎无法在文档中找到任何内容.
例如/objects?fancy=true,我如何访问fancy参数.
我已经构建了一个简单的 Vapor 3 API,我想将其部署在 Heroku 上。我希望它得到一个 PostgreSQL 数据库的支持,该数据库也附加到另一个 Heroku 应用程序(我已经成功地在 Heroku 仪表板中附加了数据库 - 并且该数据库在另一个应用程序中正常工作)。但是,我的 Vapor 应用程序从未完成启动,并因以下错误而崩溃:
Fatal error: Error raised at top level: ?? PostgreSQL Error: no pg_hba.conf entry for host "[the IP addr]", user "[heroku postgres username here]", database "[heroku psql db here]", SSL off
- id: PostgreSQLError.server.fatal.ClientAuthentication
Run Code Online (Sandbox Code Playgroud)
我曾经vapor heroku init设置过 Heroku 应用程序。我已经谷歌搜索,并尝试添加 aProcfile并弄乱configure.swift,但到目前为止还没有运气。以下是我能想到的所有相关文件:
简介:
web: Run serve --env production --hostname 0.0.0.0 --port $PORT --config:postgresql.url $DATABASE_URL
Run Code Online (Sandbox Code Playgroud)
配置.swift:
import FluentPostgreSQL
import Vapor
/// Called …Run Code Online (Sandbox Code Playgroud) 在Vapor 2中,您可以执行以下操作:
let query = <some fluent query object>
logger?.debug(query)
Run Code Online (Sandbox Code Playgroud)
它将打印出完整的SQL语句,但现在在Vapor 3中看不到任何有关如何执行此操作的文档。
如何查看我正在生成什么SQL QueryBuilder?
我目前正在关注Swift Vapor的简短介绍,在他们的网站上关注他们的"Hello World"教程.但是,当我尝试构建显示以下内容的项目时,我不断收到来自swift-package的错误.
$ vapor build
No .build folder, fetch may take a while...
Fetching Dependencies [Failed]
Error: swift-package: error: unknown command: --enable-prefetching
Run Code Online (Sandbox Code Playgroud)
我似乎无法找到如何在线解决这个问题.有人有什么想法吗?
我想知道如何实现类似于TodoMovies 3中所见的滚动视差效果?
在TodoMovies 3中,(我认为)a的背景UITableViewCell比页面的滚动更快,产生了非常棒的效果.
您将如何检测TableView滚动视图的滚动并以高效的方式调整单元格的背景图像?
或者效果无法实现UITableView?