我在尝试使用Xcode 6在iOS模拟器中启动我的应用程序时收到错误(Domain = LaunchServicesError,Code = 0).我在谷歌寻找解决方案,但我没有找到任何实用的东西.
这个错误是什么意思?
按下Submit按钮时,我在loginViewController中调用了这个调用:
let http = HTTPHelper()
http.post("http://someUrl.com/Login/userEmail/\(username.text)/Pswd/\(userPass.text)", postCompleted: self.checkLogin)
Run Code Online (Sandbox Code Playgroud)
而我发送的checkLogin函数只执行:
func checkLogin(succeed: Bool, msg: String){
if (succeed){
self.performSegueWithIdentifier("logInTrue", sender: self)
}
}
Run Code Online (Sandbox Code Playgroud)
post函数是HTTPHelper类是:
func post(url : String, postCompleted : (succeeded: Bool, msg: String) -> ()) {
var request = NSMutableURLRequest(URL: NSURL(string: url)!)
var session = NSURLSession.sharedSession()
request.HTTPMethod = "POST"
var err: NSError?
self.task = session.dataTaskWithURL(NSURL(string: url)!) {(data, response, error) in
var strData = NSString(data: data, encoding: NSUTF8StringEncoding)
var err: NSError?
var json = NSJSONSerialization.JSONObjectWithData(data, options: .AllowFragments, error: &err) as? NSDictionary
var …Run Code Online (Sandbox Code Playgroud) 最近我开始添加我的应用程序IOS 10功能,而我遇到了一个奇怪的错误:
当我在嵌入式浏览器中单击facebook本身的确认按钮时,通过浏览器使用facebook SDK进行身份验证时,应用程序崩溃了.
不幸的是,这个bug没有提供信息,控制台没有告诉我任何关于它的信息,并且没有调用堆栈来查看发生此异常的位置.
用于演示此错误的两点导致:1.如果登录是通过系统帐户进行登录,但只有在浏览器中登录时才会出现此错误,如下图所示:

(一旦我点击OK,就会发生异常)
希望有人能够回答这个问题,或者想知道如何调试这种无信息的bug.提前谢谢,丽然.
这是我的locationManager init方法:
func initLocationManager() {
seenError = false
locationFixAchieved = false
locationManager = CLLocationManager()
locationManager.delegate = self
locationManager.desiredAccuracy = kCLLocationAccuracyBest
locationManager.requestAlwaysAuthorization()
locationManager.startUpdatingLocation()
}
Run Code Online (Sandbox Code Playgroud)
在调用此方法之后这一行
println(self.locationManager.location)
Run Code Online (Sandbox Code Playgroud)
打印为零,为什么会这样?它在过去很适合我,我只是在我的应用程序中做了一些更改,它现在不能正常工作..
我有UIScrollView覆盖整个屏幕,在里面我有3个UIView并排的对象,通过分页管理.我想做出正确的约束,因此它也适合iPhone 6.
拖动时看起来像这样:

这些约束条件UIScrollView运作良好,但我如何安排内部视图的约束UIScrollView?
提前致谢!!
ios ×4
swift ×4
autolayout ×1
constraints ×1
facebook ×1
http ×1
ios10 ×1
json ×1
location ×1
session ×1
xcode6 ×1
xcode6-beta6 ×1
xcode8 ×1