Working on iOS12 and prior, but crashes on iOS13 with this error
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'UISearchController's control over its search bar has been destroyed. Please use the search bar provided by the UISearchController. searchController = <AdvancedSearchController: 0x7fbd9d224a00>, searchBar = <TDSearchBar: 0x7fbd9b768480; baseClass = UISearchBar; frame = (0 0; 1024 50); text = ''; gestureRecognizers = <NSArray: 0x600002791770>; layer = <CALayer: 0x600002ef9be0>>'
How con i solve? What does this exception mean?
*** First throw call stack:
(
0 CoreFoundation 0x000000010e296c3e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x000000010e104de0 objc_exception_throw + 48
2 CoreFoundation 0x000000010e296a7c +[NSException raise:format:] + 188
3 UIKitCore 0x000000011fa6e6b0 -[UISearchController _animatorForBarPresentationStyle:dismissing:] + 185
4 UIKitCore 0x000000011fa6eb24 -[UISearchController animationControllerForPresentedController:presentingController:sourceController:] + 34
5 UIKitCore 0x000000011f3a03a0 -[UIViewController _customAnimatorForPresentedController:presentingController:sourceController:] + 154
6 UIKitCore 0x000000011f3a4534 -[UIViewController _presentViewController:withAnimationController:completion:] + 4472
7 UIKitCore 0x000000011f3a6d1b __63-[UIViewController _presentViewController:animated:completion:]_block_invoke + 98
8 UIKitCore 0x000000011f3a7233 -[UIViewController _performCoordinatedPresentOrDismiss:animated:] + 511
9 UIKitCore 0x000000011f3a6c79 -[UIViewController _presentViewController:animated:completion:] + 187
10 UIKitCore 0x000000011f3a6ee0 -[UIViewController presentViewController:animated:completion:] + 150
Solved. You cannot neither subclass UISearchBar in UISearchController...at least in beta 3.
Related
I got the app crashed on the iOS Simulator 16.2 when layout 2 text fields horizontally.
Step by step to reproduce on iOS Simulator 16.2:
Environments:
Xcode 14.2
iOS 16.2
Simulator
Step 1: 2 text fields (UITextField) into a horizontal stackview with leading, trailing, top and bottom constraints.
Step 2: Set a long text for both of 2 text fields (appear three dots at the end of the textfield)
Step 3: click on the first text field
Step 4: click on the second text field
Result: The app is crashed at step 4
Error information:
2023-01-30 14:16:57.647873+0700 iOS16dot2TextFieldBug[18988:1850296] *** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan 274.667]. Layer: <CALayer:0x60000281a600; position = CGPoint (0 0); bounds = CGRect (0 0; 199.667 48); delegate = <_UIEditMenuListView: 0x7f9bac61b960; frame = (-99.8333 -24; 199.667 48); alpha = 0; layer = <CALayer: 0x60000281a600>>; sublayers = (<CALayer: 0x6000028d3740>); opaque = YES; opacity = 0; shadowOpacity = 0.25; shadowOffset = CGSize (0 3); shadowRadius = 12>'
*** First throw call stack:
(
0 CoreFoundation 0x00007ff8004288ab __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007ff80004dba3 objc_exception_throw + 48
2 CoreFoundation 0x00007ff800428789 -[NSException initWithCoder:] + 0
3 QuartzCore 0x00007ff80897d05e -[CALayer setPosition:] + 388
4 UIKitCore 0x000000010a2d90f4 -[UIView setCenter:] + 253
5 UIKitCore 0x0000000109105c2a -[_UIEditMenuPresentation _displayMenu:reason:] + 1959
6 UIKitCore 0x0000000109105387 -[_UIEditMenuPresentation displayMenu:configuration:] + 81
7 UIKitCore 0x000000010a29772a __58-[UIEditMenuInteraction presentEditMenuWithConfiguration:]_block_invoke + 207
8 UIKitCore 0x000000010a299222 __80-[UIEditMenuInteraction _prepareMenuAtLocation:configuration:completionHandler:]_block_invoke + 87
9 UIKitCore 0x000000010a0085cb __133-[_UIContextMenuInteractionBasedTextContextInteraction _editMenuInteraction:menuForConfiguration:suggestedActions:completionHandler:]_block_invoke + 208
10 UIKitCore 0x000000010a008732 -[_UIContextMenuInteractionBasedTextContextInteraction _querySelectionCommandsForConfiguration:suggestedActions:completionHandler:] + 325
11 UIKitCore 0x000000010a0084da -[_UIContextMenuInteractionBasedTextContextInteraction _editMenuInteraction:menuForConfiguration:suggestedActions:completionHandler:] + 126
12 UIKitCore 0x000000010a29918f -[UIEditMenuInteraction _prepareMenuAtLocation:configuration:completionHandler:] + 296
13 UIKitCore 0x000000010a297485 -[UIEditMenuInteraction presentEditMenuWithConfiguration:] + 240
14 UIKitCore 0x000000010a008d6d -[_UIContextMenuInteractionBasedTextContextInteraction presentSelectionCommandsWithConfiguration:] + 94
15 UIKitCore 0x000000010a05cb6f -[UITextSelectionView _presentEditMenuWithPreferredDirection:replacements:] + 103
16 UIKitCore 0x000000010a05c792 -[UITextSelectionView _showCommandsWithReplacements:isForContextMenu:forDictation:arrowDirection:] + 1487
17 UIKitCore 0x000000010a05c157 __77-[UITextSelectionView _showCommandsWithReplacements:forDictation:afterDelay:]_block_invoke + 262
18 libdispatch.dylib 0x000000010246bf5b _dispatch_client_callout + 8
19 libdispatch.dylib 0x000000010246f164 _dispatch_continuation_pop + 836
20 libdispatch.dylib 0x0000000102486d2e _dispatch_source_invoke + 2198
21 libdispatch.dylib 0x000000010247cbc7 _dispatch_main_queue_drain + 1065
22 libdispatch.dylib 0x000000010247c790 _dispatch_main_queue_callback_4CF + 31
23 CoreFoundation 0x00007ff800387b1f __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
24 CoreFoundation 0x00007ff800382436 __CFRunLoopRun + 2482
25 CoreFoundation 0x00007ff8003816a7 CFRunLoopRunSpecific + 560
26 GraphicsServices 0x00007ff809cb128a GSEventRunModal + 139
27 UIKitCore 0x0000000109ccbad3 -[UIApplication _run] + 994
28 UIKitCore 0x0000000109cd09ef UIApplicationMain + 123
29 libswiftUIKit.dylib 0x0000000102a18c72 $s5UIKit17UIApplicationMainys5Int32VAD_SpySpys4Int8VGGSgSSSgAJtF + 98
30 iOS16dot2TextFieldBug 0x000000010223c908 $sSo21UIApplicationDelegateP5UIKitE4mainyyFZ + 104
31 iOS16dot2TextFieldBug 0x000000010223c897 $s21iOS16dot2TextFieldBug11AppDelegateC5$mainyyFZ + 39
32 iOS16dot2TextFieldBug 0x000000010223c988 main + 24
33 dyld 0x00000001025912bf start_sim + 10
34 ??? 0x0000000102375310 0x0 + 4332147472
)
libc++abi: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan 274.667]. Layer: <CALayer:0x60000281a600; position = CGPoint (0 0); bounds = CGRect (0 0; 199.667 48); delegate = <_UIEditMenuListView: 0x7f9bac61b960; frame = (-99.8333 -24; 199.667 48); alpha = 0; layer = <CALayer: 0x60000281a600>>; sublayers = (<CALayer: 0x6000028d3740>); opaque = YES; opacity = 0; shadowOpacity = 0.25; shadowOffset = CGSize (0 3); shadowRadius = 12>'
terminating with uncaught exception of type NSException
CoreSimulator 857.14 - Device: iPhone 14 (BA2F723B-EEE6-48D0-89DD-9DAEC9E9A11E) - Runtime: iOS 16.2 (20C52) - DeviceType: iPhone 14
I just got this issue on iOS Simulator 16.2. Everything is normal on the lower than iOS 16.2.
Full of code here
I don't know this is an issue from iOS 16.2 or not.
Have you seen this issue? Please help me fix it if you can.
Thank you.
It certainly appears to be a bug.
One work-around is to add this in viewDidLoad() (or set in Storyboard):
[emailTextField, websiteTextField].forEach {
if let tf = $0 {
tf.autocorrectionType = .no
tf.spellCheckingType = .no
}
}
Your example is looking for "email" and "website" entries, so you probably don't want/need those anyway.
I have a problem when I follow this tutorial. It doesn't work. Can anyone help me fix this error? This tutorial uses Swift 4, iOS 11, and Xcode 9 but I used iOS 12 and Xcode 10.1. Did that cause the problem? Because I just followed the tutorial correctly.
Here is the error message:
2019-03-09 22:27:39.775603+0700 Ratings[667:8658] libMobileGestalt MobileGestalt.c:890: MGIsDeviceOneOfType is not supported on this platform.
2019-03-09 22:27:40.020185+0700 Ratings[667:8658] *** Assertion failure in -[UITableView _dequeueReusableCellWithIdentifier:forIndexPath:usingPresentationValues:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKitCore_Sim/UIKit-3698.93.8/UITableView.m:8054
2019-03-09 22:27:40.062689+0700 Ratings[667:8658] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to dequeue a cell with identifier PlayerCell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'
*** First throw call stack:
(
0 CoreFoundation 0x000000010ed561bb __exceptionPreprocess + 331
1 libobjc.A.dylib 0x000000010d399735 objc_exception_throw + 48
2 CoreFoundation 0x000000010ed55f42 +[NSException raise:format:arguments:] + 98
3 Foundation 0x000000010cd9c877 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 194
4 UIKitCore 0x00000001119ec5b1 -[UITableView _dequeueReusableCellWithIdentifier:forIndexPath:usingPresentationValues:] + 868
5 UIKitCore 0x00000001119ec219 -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:] + 91
6 Ratings 0x000000010ca6f950 $S7Ratings21PlayersViewControllerC05tableC0_12cellForRowAtSo07UITableC4CellCSo0jC0C_10Foundation9IndexPathVtF + 240
7 Ratings 0x000000010ca6fd9c $S7Ratings21PlayersViewControllerC05tableC0_12cellForRowAtSo07UITableC4CellCSo0jC0C_10Foundation9IndexPathVtFTo + 108
8 UIKitCore 0x0000000111a0766e -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 771
9 UIKitCore 0x0000000111a07bfb -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 73
10 UIKitCore 0x00000001119cec36 -[UITableView _updateVisibleCellsNow:isRecursive:] + 2863
11 UIKitCore 0x00000001119ef8ee -[UITableView layoutSubviews] + 165
12 UIKitCore 0x0000000111cad795 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1441
13 QuartzCore 0x0000000113235b19 -[CALayer layoutSublayers] + 175
14 QuartzCore 0x000000011323a9d3 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 395
15 QuartzCore 0x00000001131b37ca _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 342
16 QuartzCore 0x00000001131ea97e _ZN2CA11Transaction6commitEv + 576
17 UIKitCore 0x00000001117de2d0 __34-[UIApplication _firstCommitBlock]_block_invoke_2 + 139
18 CoreFoundation 0x000000010ecbb62c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
19 CoreFoundation 0x000000010ecbade0 __CFRunLoopDoBlocks + 336
20 CoreFoundation 0x000000010ecb5654 __CFRunLoopRun + 1284
21 CoreFoundation 0x000000010ecb4e11 CFRunLoopRunSpecific + 625
22 GraphicsServices 0x0000000116f541dd GSEventRunModal + 62
23 UIKitCore 0x00000001117c381d UIApplicationMain + 140
24 Ratings 0x000000010ca6e547 main + 71
25 libdyld.dylib 0x00000001102d0575 start + 1
26 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
You can find my source code on my github repo here.
You defined cell identifier as PlayersCell in storyboard.
change it to PlayerCell
Please read the error message carefully. The most significant parts are
unable to dequeue a cell with identifier PlayerCell
and the line before the NSAssertionHandler handleFailureInMethod line which indicates where the error occurs:
0x00000001119ec5b1 -[UITableView _dequeueReusableCellWithIdentifier:forIndexPath:usingPresentationValues:] + 868
It means that the reuse identifier of the table view cell in Interface Builder is not set or doesn't match the identifier specified in cellForRow in your case a simple typo.
my App does crash on every UIViewController.init(rootViewController:) call.
If I replace it with:
let nav = UINavigationController.init()
nav.addChildViewController(vc)
Then it works, but I can't change my dependencies. So I need a proper fix for this.
Example code:
func showSettingScreen() {
let vc = MAIN_STORYBOARD().instantiateViewController(withIdentifier: "SettingViewController")
self.window?.rootViewController?.present(UINavigationController(rootViewController: vc), animated: true, completion: nil)
}
Crash:
2018-10-30 08:43:14.360304+0100 App[16881:5287132] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArray0 objectAtIndex:]: index 0 beyond bounds for empty NSArray'
*** First throw call stack:
(
0 CoreFoundation 0x000000010b75129b __exceptionPreprocess + 331
1 libobjc.A.dylib 0x000000010a55f735 objc_exception_throw + 48
2 CoreFoundation 0x000000010b62b20d -[__NSArray0 objectAtIndex:] + 93
3 libswiftCore.dylib 0x000000010be93cb2 $Ss12_ArrayBufferV19_getElementSlowPathyyXlSiF + 146
4 libswiftCore.dylib 0x000000010bead0b6 $SSa11_getElement_20wasNativeTypeChecked22matchingSubscriptCheckxSi_Sbs16_DependenceTokenVtF + 118
5 libswiftCore.dylib 0x000000010beacf92 $SSayxSicig + 130
6 App 0x00000001034a2c84 $SSo22UINavigationControllerC5AppE28setNeedsNavigationBackground33_B4C9FD2C89DE46C2041196DCEE1BF2ACLL5alphay12CoreGraphics7CGFloatV_tF + 244
7 App 0x00000001034a52b5 $SSo22UINavigationControllerC5AppE13navigationBar_10shouldPushSbSo0aE0C_So0A4ItemCtF + 229
8 App 0x00000001034a53e1 $SSo22UINavigationControllerC5AppE13navigationBar_10shouldPushSbSo0aE0C_So0A4ItemCtFTo + 81
9 UIKitCore 0x000000011353d797 -[UINavigationBar _pushNavigationItem:transitionAssistant:] + 128
10 UIKitCore 0x000000011353d0af -[UINavigationBar _pushNavigationItemUsingCurrentTransition:] + 368
11 UIKitCore 0x000000011353d214 -[UINavigationBar pushNavigationItem:animated:] + 179
12 UIKitCore 0x0000000113537a50 -[UINavigationBar _performUpdatesIgnoringLock:] + 45
13 UIKitCore 0x000000011353d30b -[UINavigationBar _pushNavigationItem:transition:] + 133
14 UIKitCore 0x000000011356de53 __71-[UINavigationController pushViewController:transition:forceImmediate:]_block_invoke + 363
15 UIKitCore 0x000000011356c040 -[UINavigationController _executeNavigationHandler:deferred:] + 290
16 UIKitCore 0x000000011356dbcf -[UINavigationController pushViewController:transition:forceImmediate:] + 2083
17 UIKitCore 0x000000011356d12e -[UINavigationController pushViewController:animated:] + 681
18 UIKitCore 0x000000011354cc9d -[UINavigationController initWithRootViewController:] + 123
19 App 0x000000010337505f $SSo22UINavigationControllerC08rootViewB0ABSo06UIViewB0C_tcfcTO + 31
20 App 0x0000000103364ff7 $SSo22UINavigationControllerC08rootViewB0ABSo06UIViewB0C_tcfC + 39
21 App 0x0000000103364f72 $S5App11AppDelegateC17showSettingScreenyyF + 434
22 App 0x00000001033e328e $S5App22SideMenuViewControllerC05tableD0_14didSelectRowAtySo07UITableD0C_10Foundation9IndexPathVtF + 2910
23 App 0x00000001033e34bb $S5App22SideMenuViewControllerC05tableD0_14didSelectRowAtySo07UITableD0C_10Foundation9IndexPathVtFTo + 107
24 UIKitCore 0x00000001137d3d29 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1813
25 UIKitCore 0x00000001137d3f44 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 344
26 UIKitCore 0x000000011328a97e _runAfterCACommitDeferredBlocks + 318
27 UIKitCore 0x0000000113279424 _cleanUpAfterCAFlushAndRunDeferredBlocks + 384
28 UIKitCore 0x00000001132a8870 _afterCACommitHandler + 135
29 CoreFoundation 0x000000010b6b4037 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
30 CoreFoundation 0x000000010b6ae4ce __CFRunLoopDoObservers + 430
31 CoreFoundation 0x000000010b6aeb61 __CFRunLoopRun + 1537
32 CoreFoundation 0x000000010b6ae221 CFRunLoopRunSpecific + 625
33 GraphicsServices 0x000000010dad91dd GSEventRunModal + 62
34 UIKitCore 0x000000011327f115 UIApplicationMain + 140
35 App 0x0000000103374634 main + 68
36 libdyld.dylib 0x000000010cacf551 start + 1
37 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
It does happen on Simulator and real Device on iOS 12. With iOS 11.4 everything works great.
It appears you are getting an array out of bounds exception which means somewhere your code is accessing a nonexistent index in an array.
Add an exception breakpoint, then recreate the crash. Xcode will then show you where the exception is occurring.
Look at the sentence in the print log of crash:
Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArray0 objectAtIndex:]: index 0 beyond bounds for empty NSArray'.`
This means that an array of your code accesses an element beyond its maximum index value.
I am getting the following crash. I am using Layer messaging sdk and on it Atlas messenger sample. This issue is coming sometime when i am navigating from conversationListView to conversationView. Is there any solution to it.
(
0 CoreFoundation 0x000000010ba10b0b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010b47c141 objc_exception_throw + 48
2 CoreFoundation 0x000000010ba14cf2 +[NSException raise:format:arguments:] + 98
3 Foundation 0x000000010b0163b6 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 193
4 UIKit 0x000000010a03053d -[UICollectionView _endItemAnimationsWithInvalidationContext:tentativelyForReordering:animator:] + 15364
5 UIKit 0x000000010a039259 -[UICollectionView _endUpdatesWithInvalidationContext:tentativelyForReordering:animator:] + 71
6 UIKit 0x000000010a0395a0 -[UICollectionView _performBatchUpdates:completion:invalidationContext:tentativelyForReordering:animator:] + 437
7 UIKit 0x000000010a0393c8 -[UICollectionView _performBatchUpdates:completion:invalidationContext:tentativelyForReordering:] + 91
8 UIKit 0x000000010a03934a -[UICollectionView _performBatchUpdates:completion:invalidationContext:] + 74
9 UIKit 0x000000010a03929f -[UICollectionView performBatchUpdates:completion:] + 53
10 Atlas 0x0000000104ed30ce -[ATLConversationViewController queryControllerDidChangeContent:] + 1134
11 LayerKit 0x0000000106bb2b0a __76-[LYRQueryController updateWithObjectIdentifiers:changedObjectsIdentifiers:]_block_invoke.239 + 74
12 libdispatch.dylib 0x000000010cde905c _dispatch_client_callout + 8
13 libdispatch.dylib 0x000000010cdcc0f8 _dispatch_barrier_sync_f_slow_invoke + 579
14 libdispatch.dylib 0x000000010cde905c _dispatch_client_callout + 8
15 libdispatch.dylib 0x000000010cdca40b _dispatch_main_queue_callback_4CF + 411
16 CoreFoundation 0x000000010b9d5909 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
17 CoreFoundation 0x000000010b99bae4 __CFRunLoopRun + 2164
18 CoreFoundation 0x000000010b99b016 CFRunLoopRunSpecific + 406
19 GraphicsServices 0x000000010de41a24 GSEventRunModal + 62
20 UIKit 0x00000001096e50d4 UIApplicationMain + 159
21 SampleApp 0x000000010439f797 main + 55
22 libdyld.dylib 0x00000001095c865d start + 1
)
Error Description:
[ATLConversationCollectionView _endItemAnimationsWithInvalidationContext:tentativelyForReordering:animator:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3600.7.47/UICollectionView.m:5765
2017-06-23 11:33:27.473137+0530 SampleApp[1815:546610] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of sections. The number of sections contained in the collection view after the update (3) must be equal to the number of sections contained in the collection view before the update (3), plus or minus the number of sections inserted or deleted (1 inserted, 0 deleted).'
*** First throw call stack:
(0x19207afd8 0x190adc538 0x19207aeac 0x192b12710 0x198ab47cc 0x198ab865c 0x198ab893c 0x198ab879c 0x198ab8720 0x198380558 0x10099f14c 0x101eb12b4 0x105039a10 0x10504a5e4 0x105039a10 0x10503eb78 0x1920290c0 0x192026cdc 0x191f56d94 0x1939c0074 0x19820f130 0x10010b454 0x190f6559c)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: 'Unacceptable type of value for attribute: property = "name";
desired type = NSString; given type = UITextField; value =
<UITextField: 0x7fb13a63f7d0; frame = (39 246; 297 30); text =
myworld'; clipsToBounds = YES; opaque = NO; autoresize = RM+BM;
gestureRecognizers = <NSArray: 0x7fb13a71f740>; layer = <CALayer: 0x7fb13a63fa80>>.'
First throw call stack:
(
0 CoreFoundation 0x000000010da88c65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010d71fbb7 objc_exception_throw + 45
2 CoreData 0x000000010cf208a3 _PFManagedObject_coerceValueForKeyWithDescription + 3203
3 CoreData 0x000000010cef92f1 _sharedIMPL_setvfk_core + 177
4 MyStore 0x000000010ce2b2f7 -[DetailViewController save:] + 183
5 UIKit 0x000000010de83d62 -[UIApplication sendAction:to:from:forEvent:] + 75
6 UIKit 0x000000010de83d62 -[UIApplication sendAction:to:from:forEvent:] + 75
7 UIKit 0x000000010df9550a -[UIControl _sendActionsForEvents:withEvent:] + 467
8 UIKit 0x000000010df948d9 -[UIControl touchesEnded:withEvent:] + 522
9 UIKit 0x000000010ded0958 -[UIWindow _sendTouchesForEvent:] + 735
10 UIKit 0x000000010ded1282 -[UIWindow sendEvent:] + 682
11 UIKit 0x000000010de97541 -[UIApplication sendEvent:] + 246
12 UIKit 0x000000010dea4cdc _UIApplicationHandleEventFromQueueEvent + 18265
13 UIKit 0x000000010de7f59c _UIApplicationHandleEventQueue + 2066
14 CoreFoundation 0x000000010d9bc431 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
15 CoreFoundation 0x000000010d9b22fd __CFRunLoopDoSources0 + 269
16 CoreFoundation 0x000000010d9b1934 __CFRunLoopRun + 868
17 CoreFoundation 0x000000010d9b1366 CFRunLoopRunSpecific + 470
18 GraphicsServices 0x0000000110feaa3e GSEventRunModal + 161
19 UIKit 0x000000010de828c0 UIApplicationMain + 1282
20 MyStore 0x000000010ce2b07f main + 111
21 libdyld.dylib 0x0000000110156145 start + 1
22 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
As per crash report error is telling you, the value you are giving is a UITextField instead of textfield.text i.e of NSString for "name" property
For Similar issue you can refer here
unacceptable-type-of-value-for-attribute-property