Reputation: 1
I am new to programming and am trying to do an app right now. The problem started when I tried to make a Google Sign in button, and when I thought I had acheived that, I tried the simulator and none of my buttons worked when clicking on them, not even the text squares. Then the simulator started to crash with the code Thread 1: SIGABRT. I read on some place that you could do an exeption break point to see where the problem is, and when I did that I came to some lines, where on one it said Thread 1: Breakpoint 3.1.
import UIKit
import Google
class ViewController: UIViewController, GIDSignInUIDelegate {
override func viewDidLoad() {
super.viewDidLoad()
GIDSignIn.sharedInstance().uiDelegate = self
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
@IBOutlet weak var signinbutton3: GIDSignInButton!
@IBOutlet weak var signinbutton: GIDSignInButton!
func signInWillDispatch(signIn: GIDSignIn!, error: NSError!) {
}
// Present a view that prompts the user to sign in with Google
func signIn(signIn: GIDSignIn!,
presentViewController viewController: UIViewController!) {
self.present(viewController, animated: true, completion: nil)
print("Sign in presented")
}
// Dismiss the "Sign in with Google" view
func signIn(signIn: GIDSignIn!,
dismissViewController viewController: UIViewController!) {
self.dismiss(animated: true, completion: nil)
print("Sign in dismissed")
}
override func viewDidAppear(_ animated: Bool) {
self.performSegue(withIdentifier: "loginView", sender: self); //this line is where the Thread 1: Breakpoint 3.1 was.
}
}
My problem shortly:
- The buttons on the simulator does not work
- The simulatior crashes and show on xcode the code sequence I showed before with the saying Thread 1: SIGABRT and Thread 1: Breakpoint 3.1 in the last line.
What do you think the problem is and how should I solve it? Edit I recieve this when trying to start the simulator:
objc[22047]: Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x113a45cc0) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x11385c6f0). One of the two will be used. Which one is undefined. 2017-06-13 21:49:25.051 Startifyapp[22047] [Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add [FIRApp configure] to your application initialization. 2017-06-13 21:49:26.013 Startifyapp[22047:788392] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver () has no segue with identifier 'loginView'' * First throw call stack: ( 0 CoreFoundation 0x000000010bf6eb0b exceptionPreprocess + 171 1 libobjc.A.dylib
0x000000010d2ab141 objc_exception_throw + 48 2 UIKit
0x000000010e00bef3 -[UIViewController shouldPerformSegueWithIdentifier:sender:] + 0 3 Startifyapp
0x000000010b971fbf TFC11Startifyapp14ViewController13viewDidAppearfSbT + 127 4 Startifyapp 0x000000010b972021 TToFC11Startifyapp14ViewController13viewDidAppearfSbT + 49 5 UIKit 0x000000010e00ecae -[UIViewController _setViewAppearState:isAnimating:] + 704 6 UIKit 0x000000010e00f6d4 -[UIViewController _endAppearanceTransition:] + 197 7 UIKit 0x000000010dfe1f94 -[UIPresentationController transitionDidFinish:] + 868 8 UIKit 0x000000010e1f6525 -[_UICurrentContextPresentationController transitionDidFinish:] + 44 9 UIKit
0x000000010dfe5af6 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke_2 + 183 10 UIKit
0x000000010e995d1c -[_UIViewControllerTransitionContext completeTransition:] + 102 11 UIKit
0x000000010dfdeec0 -[UITransitionView notifyDidCompleteTransition:] + 251 12 UIKit 0x000000010dfdeb38 -[UITransitionView _didCompleteTransition:] + 1408 13 UIKit 0x000000010dfe1208 -[UITransitionView _transitionDidStop:finished:] + 104 14 UIKit 0x000000010def2257 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 222 15 UIKit 0x000000010def2796 -[UIViewAnimationState animationDidStop:finished:] + 136 16 QuartzCore 0x00000001151a968e _ZN2CA5Layer23run_animation_callbacksEPv + 306 17 libdispatch.dylib 0x00000001100f305c _dispatch_client_callout + 8 18 libdispatch.dylib 0x00000001100d440b _dispatch_main_queue_callback_4CF + 411 19 CoreFoundation 0x000000010bf33909 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9 20 CoreFoundation 0x000000010bef9ae4 __CFRunLoopRun + 2164 21 CoreFoundation 0x000000010bef9016 CFRunLoopRunSpecific + 406 22 GraphicsServices
0x0000000111775a24 GSEventRunModal + 62 23 UIKit
0x000000010de66134 UIApplicationMain + 159 24 Startifyapp
0x000000010b9700d7 main + 55 25 libdyld.dylib
0x000000011013f65d start + 1 26 ???
0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)
Upvotes: 0
Views: 429
Reputation: 934
I had the same issue with Xcode 9 and the simulator. I used a real device with iOS 11 and it was working fine (with some bugs though)
Upvotes: 1