草庐IT

invoke-command

全部标签

ios - 构建失败,出现错误 Command/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc

我正在使用Xcode8.2.1。我也在我的项目中使用CoreData。当我尝试生成构建或存档时,我看到以下错误。错误中提到的文件有时也会更改。错误::0:error:nosuchfileordirectory:'/Users/anuragparashar/Library/Developer/Xcode/DerivedData/app-drgjxhipxxqdrcatqfdgpayyxnud/Build/Intermediates/app.build/Debug-iphoneos/app.build/DerivedSources/CoreDataGenerated/app/Buildin

ios - Command/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang 退出失败

我在申请中遇到以下错误。clang:error:nosuchfileordirectory:'/Users/madhavadudipalli/Desktop/iosprojects/LittleFlowerPublicSchool/LittleFlowerPublicSchoolIpad/LittleFlowerPublicSchoolHD-Prefix*.pch'clang:error:noinputfilesCommand/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/us

swift - 是否有 NSAppleScript 的应用商店授权(来源 : "do shell script\"sudo"commands?

例如,我的应用使用以下命令,操作系统处理弹出警报,请求管理员密码以root身份进行身份验证。是否有允许我从沙盒中运行它的权利?@IBActionfuncclearFonts(sender:NSButton){NSAppleScript(source:"doshellscript\"sudoatsutildatabases-remove;sudoatsutilserver-shutdown\"withadministrator"+"privileges")!.executeAndReturnError(nil)} 最佳答案 如果应用程

Swift 编译器错误 : Command failed due to signal: Segmentation fault: 11

我是Xcode和swift的新手,但我已经能够将错误源缩小到这行代码。我到处搜索但找不到解决方案。我目前正在使用Xcode8.1。button.addTarget(self,action:#selector(handleRegister),for:.touchUpInside)这是我的一些代码importUIKitclassLoginController:UIViewController{letbackGroundImageView:UIImageView={letimageView=UIImageView()imageView.image=UIImage(named:"backgrd

swift - 整数类型 : Cannot invoke 'init' with an argument of type 'T'

我有一个返回范围内整数的函数:funcrandomNumber(min:T,max:T)->T{letn=max-min+1letu=UInt32(n)//Error:Cannotinvoke'init'withanargumentoftype'T'letr=arc4random_uniform(u)returnr+min}我不明白为什么这不起作用,因为UInt32最上面的协议(protocol)是UnsignedIntegerType,它符合IntegerType。我必须将n变成UInt32因为arc4random_uniform()需要一个UInt32作为参数为什么这行不通?

ios - 无法使用 Google Places API 获取地点的详细信息 - "Cannot invoke ' lookUpPlaceID' "

我正在尝试使用适用于iOS的GooglePlacesAPI获取有关地点的详细信息。尝试调用lookUpPlaceID函数时,收到以下Swift编译器错误:Cannotinvoke'lookUpPlaceID'withanargumentlistoftype'(String,callback:(GMSPlace!,_)->Void)'letplaceID="ChIJV4k8_9UodTERU5KXbkYpSYs"placesClient!.lookUpPlaceID(placeID,callback:{(place:GMSPlace!,error)->Voidiniferror!=nil

Swift 2.0 : Cannot invoke with an argument list of type. ..(HTTP 请求)

自从我升级到Xcode7beta后,我遇到了一个无法修复的错误。这是我的DataManager.swift中的完整代码importFoundationvarTopAppURL:String=String()varnumberAsked:String=String()classDataManager{classfuncgetInfo(ID:String){TopAppURL="http://sweetapi.com/?=\(ID)"numberAsked=ID}classfuncloadDataFromURL(url:NSURL,completion:(data:NSData?,erro

ios - 在 Swift 数组上使用过滤器会给出 "cannot invoke filter with an argument list of type (Object) throws -> Bool,"但参数不会抛出

我无法确切地弄清楚Swift在这里期望什么样的参数列表,因为当我在swift数组上调用“filter”时出现错误。这是我的代码:funcsetDefaultBook(){varbook:BookletfetchRequest:NSFetchRequest=Book.fetchRequest()ifletfetchResults=try?managedObjectContext.fetch(fetchRequest){book=fetchResults.filter{$0.title==defaultBookTitle}}...}一本书是一个NSManagedObject,一本书的标题是

ios - 带有类型为 "cannot invoke initializer for type ' 的参数列表的 'UITextField' Int' 是什么意思?

在我的应用程序中,我有一串代码是lrs24=(30*Int(weight)!+70)*Int(factor)!;。看起来一切正常,但编译器说它“无法使用类型为‘UITextField’的参数列表为类型‘Int’调用初始化程序”。这是什么意思,我该如何解决?谢谢!PS-这是所有我的代码-importUIKitclassViewController:UIViewController,UITextFieldDelegate{@IBOutletweakvaranimalNum:UITextField!@IBOutletweakvarlogLabel:UILabel!@IBOutletweakv

command-line - 如何在不使用 Xcode 的情况下将多个 Swift 文件编译在一起?

我对Swift编程很感兴趣,但我不想使用Xcode,因为它对于我的实际使用来说太臃肿了。我知道这可能与Objective-C类似clang-fobjc-arcmain.mmyclass.m-oprog1刚刚列出了不同的.m文件,但我不知道如何使用Swift执行此操作。我可以使用基本的Swift命令行工具,比如swiftMyProgram.swift,它只生成一个名为MyProgram的二进制文件。据我所知,此命令不会让您同时编译多个.swift文件。理想情况下,像C++的makefile这样的系统将是理想的。目前有什么方法可以从命令行使用Swift执行此操作吗?