paypal SDK integration objective c - ios

I'm trying to integrate Paypal to my objective c project.
After the Paypal login screen appears and i enter my login data and login success and this view pops to the previous view which should display the logged client data the application crashes giving me the following error
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'
*** First throw call stack:
(
0 CoreFoundation 0x0000000113defd85 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x00000001137f7deb objc_exception_throw + 48
2 CoreFoundation 0x0000000113cec23e -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 318
3 CoreFoundation 0x0000000113cfe5bb +[NSDictionary dictionaryWithObjects:forKeys:count:] + 59
4 AppCreator 0x000000010d890e1e +[PPZebraUI text:withAnnotation:] + 810
5 AppCreator 0x000000010d875c87 -[PPFundingOption titleForDisplay] + 318
6 AppCreator 0x000000010d8b187f -[PPPaymentFundingOptionSelectionCell refreshContent] + 653
7 AppCreator 0x000000010d8b0bfc -[PPPaymentAttributeSelectionCell initWithViewController:withTitle:withPickerTitle:withDataSource:] + 1293
8 AppCreator 0x000000010d88db04 -[PPSelectPayMethodViewController paymentAttributeSelectionCells] + 310
9 AppCreator 0x000000010d8d4601 -[PPSelectPayMethodViewControllerIOS7 updateTableToConfirm:] + 977
10 AppCreator 0x000000010d8d416e -[PPSelectPayMethodViewControllerIOS7 refreshTable:] + 100
11 AppCreator 0x000000010d8d4229 -[PPSelectPayMethodViewControllerIOS7 viewDidAppear:] + 87
12 UIKit 0x000000010f41d335 -[UIViewController _setViewAppearState:isAnimating:] + 830
13 UIKit 0x000000010f41dcb8 -[UIViewController _endAppearanceTransition:] + 262
14 UIKit 0x000000010f45886f -[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:] + 1290
15 UIKit 0x000000010f44e630 __49-[UINavigationController _startCustomTransition:]_block_invoke + 233
16 UIKit 0x000000010fcaa4c8 -[_UIViewControllerTransitionContext completeTransition:] + 101
17 UIKit 0x000000010f2658a3 __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke95 + 834
18 UIKit 0x000000010f32d53e -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 644
19 UIKit 0x000000010f30a7ff -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 241
20 UIKit 0x000000010f30abae -[UIViewAnimationState animationDidStop:finished:] + 80
21 QuartzCore 0x000000010f12e3c8 _ZN2CA5Layer23run_animation_callbacksEPv + 308
22 libdispatch.dylib 0x000000011440b3eb _dispatch_client_callout + 8
23 libdispatch.dylib 0x00000001143f31ef _dispatch_main_queue_callback_4CF + 1738
24 CoreFoundation 0x0000000113d490f9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
25 CoreFoundation 0x0000000113d0ab99 __CFRunLoopRun + 2073
26 CoreFoundation 0x0000000113d0a0f8 CFRunLoopRunSpecific + 488
27 GraphicsServices 0x0000000115780ad2 GSEventRunModal + 161
28 UIKit 0x000000010f27cf09 UIApplicationMain + 171
29 AppCreator 0x000000010d3251df main + 111
30 libdyld.dylib 0x000000011444092d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
I tried the SDk in separated application and it works perfectly .this error happens when i add the sdk to my project .
can anyone please help me what can be causing this error

I found out that problem was in another Library i was using .
It had a function which override the
"preferredFontForTextStyle" in the "UIFont" class
that was causing the problem for me.
in case anyone facing that kind of unjustified crash , try to remove all the other classes one by one to check that the error is not caused by conflict with another line in a far class

Related

iOS Contacts Picker

So i was doing a tutorial from Sinch! on how to Fetch and Call Contacts,
Well it loads up the Contacts just fine.
The problem is that whenever I select a Contact to call, the app crashes and Xcode shows this error on the console.
Can anyone help me with that?
inchAppToPhoneTutorial[1143:42160] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Parameter 'applicationKey' is invalid (was '')'
*** First throw call stack:
(
0 CoreFoundation 0x000000010a70634b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010a08821e objc_exception_throw + 48
2 SinchAppToPhoneTutorial 0x0000000108cca77b SINCallOrderByStartTimeComparator + 66724
3 SinchAppToPhoneTutorial 0x0000000108cb1c6b _ZN6rebrtc13OfflineInvite6encodeERKS0_PhmPm + 4418449
4 SinchAppToPhoneTutorial 0x0000000108cc4d45 SINCallOrderByStartTimeComparator + 43630
5 SinchAppToPhoneTutorial 0x0000000108cc496c SINCallOrderByStartTimeComparator + 42645
6 SinchAppToPhoneTutorial 0x00000001088268e9 -[DetailViewController initSinchClient] + 89
7 SinchAppToPhoneTutorial 0x0000000108825e8a -[DetailViewController viewDidLoad] + 234
8 UIKit 0x000000010accb06d -[UIViewController loadViewIfRequired] + 1258
9 UIKit 0x000000010acd14d6 -[UIViewController __viewWillAppear:] + 118
10 UIKit 0x000000010acfc393 -[UINavigationController _startCustomTransition:] + 1290
11 UIKit 0x000000010ad0d008 -[UINavigationController _startDeferredTransitionIfNeeded:] + 697
12 UIKit 0x000000010ad0e19b -[UINavigationController __viewWillLayoutSubviews] + 58
13 UIKit 0x000000010af051b7 -[UILayoutContainerView layoutSubviews] + 223
14 UIKit 0x000000010abee344 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1237
15 QuartzCore 0x000000010e03bcdc -[CALayer layoutSublayers] + 146
16 QuartzCore 0x000000010e02f7a0 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
17 QuartzCore 0x000000010e02f61e _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
18 QuartzCore 0x000000010dfbd62c _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 280
19 QuartzCore 0x000000010dfea713 _ZN2CA11Transaction6commitEv + 475
20 UIKit 0x000000010ab54878 _afterCACommitHandler + 346
21 CoreFoundation 0x000000010a6aae17 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
22 CoreFoundation 0x000000010a6aad87 __CFRunLoopDoObservers + 391
23 CoreFoundation 0x000000010a68fb9e __CFRunLoopRun + 1198
24 CoreFoundation 0x000000010a68f494 CFRunLoopRunSpecific + 420
25 GraphicsServices 0x000000010e959a6f GSEventRunModal + 161
26 UIKit 0x000000010ab29f34 UIApplicationMain + 159
27 SinchAppToPhoneTutorial 0x00000001088257bf main + 111
28 libdyld.dylib 0x000000010c4fe68d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
It says what happened at the very top
inchAppToPhoneTutorial[1143:42160] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Parameter 'applicationKey' is invalid (was '')'
So figure out where you're calling something that utilizes an applicationKey and figure out why it's blank :)

How to return the same viewController multiple times in swift(iOS) in a single run of the program?

I am writing a program using SpriteKit and UIKit.
I have two view controller in my program, first for main page and second for GameViewController (which includes GameScene). I have added a back button to the GameViewController which goes to main page (MainPageViewController). Everything works fine so far.
In my first page, when I wanted to go back again to GameViewController, program crashes and the following error is given:
GitarTelleri[959:47801] 15:21:39.405 ERROR:
AVAudioEngineGraph.mm:1743: _Connect: required condition is false:
!destNodeMixerConns.empty() && !isDestNodeConnectedToIONode 2016-09-19
15:21:39.413 GitarTelleri[959:47801] * Terminating app due to
uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'required
condition is false: !destNodeMixerConns.empty() &&
!isDestNodeConnectedToIONode'
* First throw call stack: ( 0 CoreFoundation 0x0000000104250d85 exceptionPreprocess + 165 1 libobjc.A.dylib
0x00000001061d2deb objc_exception_throw + 48 2 CoreFoundation
0x0000000104250bea +[NSException raise:format:arguments:] + 106 3
libAVFAudio.dylib 0x000000010915eff3
_Z19AVAE_RaiseExceptionP8NSStringz + 176 4 libAVFAudio.dylib 0x0000000109171bc3
_ZN18AVAudioEngineGraph8_ConnectEP19AVAudioNodeImplBaseS1_jjP13AVAudioFormat
+ 1281 5 libAVFAudio.dylib 0x0000000109174df0 _ZN18AVAudioEngineGraph7ConnectEP11AVAudioNodeS1_mmP13AVAudioFormat + 322 6 libAVFAudio.dylib 0x00000001091a7a71
_ZN17AVAudioEngineImpl7ConnectEP11AVAudioNodeS1_mmP13AVAudioFormat + 301 7 libAVFAudio.dylib 0x00000001091a7ad8
-[AVAudioEngine connect:to:format:] + 83 8 AudioKit 0x00000001037a611b
_TTSf4n_d___TZFC8AudioKit8AudioKits6outputGSqCS_6AKNode_ + 267 9 GitarTelleri 0x000000010362c234
TFC12GitarTelleri18GameViewController13viewDidAppearfSbT + 196 10 GitarTelleri 0x000000010362c341
TToFC12GitarTelleri18GameViewController13viewDidAppearfSbT + 49 11 UIKit 0x0000000104df7335
-[UIViewController _setViewAppearState:isAnimating:] + 830 12 UIKit 0x0000000104e30589 -[UINavigationController viewDidAppear:] + 207 13
UIKit 0x0000000104df7335
-[UIViewController _setViewAppearState:isAnimating:] + 830 14 UIKit 0x0000000104df7cb8 -[UIViewController _endAppearanceTransition:] + 262
15 UIKit 0x0000000104dc208a
-[UIPresentationController transitionDidFinish:] + 827 16 UIKit 0x0000000104f9f38f -[_UICurrentContextPresentationController
transitionDidFinish:] + 42 17 UIKit
0x0000000104dc57c1 __56-[UIPresentationController
runTransitionForCurrentState]_block_invoke_2 + 183 18 UIKit
0x00000001056844c8 -[_UIViewControllerTransitionContext
completeTransition:] + 101 19 UIKit
0x0000000104dbef77 -[UITransitionView notifyDidCompleteTransition:] +
252 20 UIKit 0x0000000104dbec88
-[UITransitionView _didCompleteTransition:] + 1344 21 UIKit 0x0000000104dc13f4 -[UITransitionView _transitionDidStop:finished:] +
104 22 UIKit 0x0000000104ce47ff
-[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 241 23 UIKit 0x0000000104ce4bae
-[UIViewAnimationState animationDidStop:finished:] + 80 24 QuartzCore 0x0000000107d7d3c8
_ZN2CA5Layer23run_animation_callbacksEPv + 308 25 libdispatch.dylib 0x0000000108c773eb _dispatch_client_callout + 8 26 libdispatch.dylib
0x0000000108c5f1ef _dispatch_main_queue_callback_4CF + 1738 27
CoreFoundation 0x00000001041aa0f9
__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9 28 CoreFoundation 0x000000010416bb99 __CFRunLoopRun
+ 2073 29 CoreFoundation 0x000000010416b0f8 CFRunLoopRunSpecific + 488 30 GraphicsServices
0x000000010a189ad2 GSEventRunModal + 161 31 UIKit
0x0000000104c56f09 UIApplicationMain + 171 32 GitarTelleri
0x0000000103630372 main + 114 33 libdyld.dylib
0x0000000108cab92d start + 1 34 ???
0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating with
uncaught exception of type NSException (lldb)
Should I change something in AppDelegate.swift or should I clean something when BackButton is clicked?
check your back button have AudioKit.stop()

Uncaught exception 'NSInvalidArgumentException',reason: 'Receiver .. has no segue'

I just started recently. I can't fix it and I don't know How to do
I have attached files and images. When I run my app, I receive the following error:
2015-11-26 12:17:08.175 login[6107:324531]
*** Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: 'Receiver (<login.ViewController: 0x7fc0d94b28d0>)
has no segue with identifier 'loginView''
*** First throw call stack:
(
0 CoreFoundation 0x0000000100457f45 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010217bdeb objc_exception_throw + 48
2 UIKit 0x0000000100e099ea -[UIViewController shouldPerformSegueWithIdentifier:sender:] + 0
3 login 0x000000010025fc85 _TFC5login14ViewController13viewDidAppearfS0_FSbT_ + 309
4 login 0x000000010025fce1 _TToFC5login14ViewController13viewDidAppearfS0_FSbT_ + 49
5 UIKit 0x0000000100e0c675 -[UIViewController _setViewAppearState:isAnimating:] + 830
6 UIKit 0x0000000100e0cff8 -[UIViewController _endAppearanceTransition:] + 262
7 UIKit 0x0000000100e47a00 -[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:] + 1290
8 UIKit 0x0000000100e3d917 __49-[UINavigationController _startCustomTransition:]_block_invoke + 233
9 UIKit 0x000000010166db24 -[_UIViewControllerTransitionContext completeTransition:] + 101
10 UIKit 0x0000000100c5cf4a __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke93 + 834
11 UIKit 0x0000000100d1eace -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 644
12 UIKit 0x0000000100cfc9df -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 241
13 UIKit 0x0000000100cfcd8e -[UIViewAnimationState animationDidStop:finished:] + 80
14 QuartzCore 0x00000001051b9fa0 _ZN2CA5Layer23run_animation_callbacksEPv + 308
15 libdispatch.dylib 0x0000000102c4f49b _dispatch_client_callout + 8
16 libdispatch.dylib 0x0000000102c372af _dispatch_main_queue_callback_4CF + 1738
17 CoreFoundation 0x00000001003b82e9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
18 CoreFoundation 0x00000001003798a9 __CFRunLoopRun + 2073
19 CoreFoundation 0x0000000100378e08 CFRunLoopRunSpecific + 488
20 GraphicsServices 0x0000000104a4bad2 GSEventRunModal + 161
21 UIKit 0x0000000100c7430d UIApplicationMain + 171
22 login 0x00000001002630dd main + 109
23 libdyld.dylib 0x0000000102c8392d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
My screenshots of code are here:
Screenshots of code
Your error tells you exactly what you need to do.
Receiver (<login.ViewController: 0x7fc0d94b28d0>) has no segue with identifier 'loginView'
so check your segue in storyboard and ensure that segue identifier from LoginViewController is loginView.

how to even start reading this iphone crash log to debug?

I have this crash happening in my app. iOS noob here, don't even know where to start debugging this. How to read this crash log? Where/which file/function is the problem starting?
2015-04-26 16:55:53.743 MyTestApp[10058:924348] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Can only call -[PFObject init] on subclasses conforming to PFSubclassing.'
*** First throw call stack:
(
0 CoreFoundation 0x00000001032c6c65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000102f5fbb7 objc_exception_throw + 45
2 CoreFoundation 0x00000001032c6b9d +[NSException raise:format:] + 205
3 MyTestApp 0x00000001014d8823 -[PFObject(Private) init] + 144
4 MyTestApp 0x00000001014a91b0 _TTOFCSo8PFObjectcfMS_FT_S_ + 16
5 MyTestApp 0x00000001014a7c67 _TFCSo8PFObjectCfMS_FT_S_ + 71
6 MyTestApp 0x00000001014a1965 _TFC8MyTestApp22MessagesViewControllercfMS0_FT5coderCSo7NSCoder_S0_ + 213
7 MyTestApp 0x00000001014a1a1d _TToFC8MyTestApp22MessagesViewControllercfMS0_FT5coderCSo7NSCoder_S0_ + 45
8 UIKit 0x0000000103bc828b -[UIClassSwapper initWithCoder:] + 205
9 UIKit 0x0000000103d19ab6 UINibDecoderDecodeObjectForValue + 705
10 UIKit 0x0000000103d197ec -[UINibDecoder decodeObjectForKey:] + 276
11 UIKit 0x0000000103bc7e84 -[UIRuntimeConnection initWithCoder:] + 153
12 UIKit 0x0000000103d19ab6 UINibDecoderDecodeObjectForValue + 705
13 UIKit 0x0000000103d19c85 UINibDecoderDecodeObjectForValue + 1168
14 UIKit 0x0000000103d197ec -[UINibDecoder decodeObjectForKey:] + 276
15 UIKit 0x0000000103bc7327 -[UINib instantiateWithOwner:options:] + 990
16 UIKit 0x0000000103e29aba -[UIStoryboard instantiateViewControllerWithIdentifier:] + 181
17 MyTestApp 0x000000010148b406 _TFC8MyTestApp22OverviewViewController9tableViewfS0_FTCSo11UITableView23didSelectRowAtIndexPathCSo11NSIndexPath_T_ + 246
18 MyTestApp 0x000000010148bbff _TToFC8MyTestApp22OverviewViewController9tableViewfS0_FTCSo11UITableView23didSelectRowAtIndexPathCSo11NSIndexPath_T_ + 79
19 UIKit 0x00000001039e0dc9 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1293
20 UIKit 0x00000001039e0f0a -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 219
21 UIKit 0x000000010391362c _applyBlockToCFArrayCopiedToStack + 314
22 UIKit 0x00000001039134a6 _afterCACommitHandler + 533
23 CoreFoundation 0x00000001031f9ca7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
24 CoreFoundation 0x00000001031f9c00 __CFRunLoopDoObservers + 368
25 CoreFoundation 0x00000001031efa33 __CFRunLoopRun + 1123
26 CoreFoundation 0x00000001031ef366 CFRunLoopRunSpecific + 470
27 GraphicsServices 0x0000000105032a3e GSEventRunModal + 161
28 UIKit 0x00000001038ef900 UIApplicationMain + 1282
29 MyTestApp 0x000000010149f137 main + 135
30 libdyld.dylib 0x0000000108ac6145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
The reason for the crash is on the first line:
reason: 'Can only call -[PFObject init] on subclasses conforming to
PFSubclassing.'
This means that your subclass is inheriting from PFObject but not conforming to the protocol PFSubclassing. Thus, init cannot be called on your subclass.
Ex.
#interface MyPFSubclass : PFObject
Should be replaced with:
#interface MyPFSubclass : PFObject <PFSubclassing>
For more information on interpreting the stacktrace I recommend this tutorial: My App Crashed, Now What? – Part 1

iOS app crash when keyboard showing on iPad

I have an app which work perfectly on iPhone. But when i starting it on iPad and tap on UITextField it’s crash with error:
Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 1 beyond bounds [0 .. 0]'
*** First throw call stack:
(
0 CoreFoundation 0x032a05e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x02c1e8b6 objc_exception_throw + 44
2 CoreFoundation 0x032414e6 -[__NSArrayM objectAtIndex:] + 246
3 Parking 0x002b0ccd -[UIView(Hackery) pd_swizzled_exchangeSubviewAtIndex:withSubviewAtIndex:] + 141
4 UIKit 0x020a89ef -[_UIBackdropView ensureProperSubviewOrdering] + 666
5 UIKit 0x020a810e -[_UIBackdropView updateSubviewHierarchyIfNeededForSettings:] + 127
6 UIKit 0x020a47dc -[_UIBackdropView setComputesColorSettings:] + 235
7 UIKit 0x01b1c87a -[UIKBBackdropView triggerUpdate:] + 400
8 Foundation 0x028f1bf9 __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke + 40
9 CoreFoundation 0x032fc524 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
10 CoreFoundation 0x0325400b _CFXNotificationPost + 2859
11 Foundation 0x0282b951 -[NSNotificationCenter postNotificationName:object:userInfo:] + 98
12 UIKit 0x01e1cb1b -[UIInputViewTransition postNotificationsForTransitionEnd] + 1054
13 UIKit 0x0c69c453 -[UIInputViewTransitionAccessibility(SafeCategory) postNotificationsForTransitionEnd] + 51
14 UIKit 0x01e13138 __53-[UIPeripheralHost(UIKitInternal) executeTransition:]_block_invoke1332 + 455
15 UIKit 0x019ef005 -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 306
16 UIKit 0x019d8c6c -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 267
17 UIKit 0x019d8f58 -[UIViewAnimationState animationDidStop:finished:] + 80
18 UIKit 0x0c6a4b67 -[UIViewAnimationStateAccessibility(SafeCategory) animationDidStop:finished:] + 66
19 QuartzCore 0x00821a44 _ZN2CA5Layer23run_animation_callbacksEPv + 304
20 libdispatch.dylib 0x0362b4b0 _dispatch_client_callout + 14
21 libdispatch.dylib 0x0361975e _dispatch_main_queue_callback_4CF + 340
22 CoreFoundation 0x03305a5e __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 14
23 CoreFoundation 0x032466bb __CFRunLoopRun + 1963
24 CoreFoundation 0x03245ac3 CFRunLoopRunSpecific + 467
25 CoreFoundation 0x032458db CFRunLoopRunInMode + 123
26 GraphicsServices 0x03f7d9e2 GSEventRunModal + 192
27 GraphicsServices 0x03f7d809 GSEventRun + 104
28 UIKit 0x0198cd3b UIApplicationMain + 1225
29 Parking 0x00073cad main + 141
30 libdyld.dylib 0x038bd70d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
I tried comment all my code to find a reason. Even created an empty view controller and add text field to it. But it’s didn't helped. Any idea?
It is an issue with PonyDebugger which has been fixed in the latest release. Use a version >= 0.3.1.
pod 'PonyDebugger', '~> 0.3.1'

Resources