我在从osx swift应用程序发送邮件时遇到了问题。为了发送邮件,我使用了以下代码
import Foundation
import Cocoa
class sendemail : NSObject, NSSharingServiceDelegate{
func sendEmail() throws
{
print("enter email sending")
let body = "This is an email for auto testing throug code."
let shareItems = [body] a
OSX 10.11.6,Xcode 7.3.1
我从App Store安装了Xcode 7.3.1,我可以在IDE中编译Swift代码。但是,我无法从命令行构建。当我尝试这样做时,我得到一个错误:
error: unable to invoke subcommand: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-build (No such file or directory)
我的Preferences -> Components对话框中没有to
我正在将Xcode框架“转换”成Cocoapod。我已经在这个过程中走了很远,但是我不能把豆荚弄成绒线。这有点像一个混合项目,同时使用了ObjC和Swift,但它在Xcode中构建得很好,但不是通过lint,这让我觉得涉及Cocoapods的东西很奇怪。
错误:
- ERROR | [OSX] xcodebuild: EonilFileSystemEvents/EonilFileSystemEvents/FileSystemEventMonitor.swift:17:43: error: use of undeclared type 'EonilFileSystemEvent
我正在尝试打开一个包,即尝试导入并运行this存储库下的swift文件夹。 当我在XCode 11中打开->Package.swift文件时,它实际上打开了该目录下的所有文件。因此,我认为我离运行它又近了一步。 但现在,当我尝试构建它时,我得到了一个错误: package at RepositoryName/swift’ is using Swift tools version 3.1.0 which is no longer supported; consider using ‘// swift-tools-version:5.1’ to specify the current to