I have downloaded and played with the github project for the paypal ios app.
https://github.com/paypal/PayPal-iOS-SDK
I ran it just fine without any errors. When I try to link it into my iOS 8 swift project I can load all the files and connect the view controllers just fine and I believe my bridge header file is working just fine. I basically moved all the viewcontroller files from the sample app into my project and just connected what I needed to. I have the client id and secret id working I believe. It is when I try to create a FuturePaymentViewController :
- (IBAction)getUserAuthorizationForFuturePayments:(id)sender {
NSLog(#"\n\n\nbegin getting user authorization\n\n\nPAYPAL CONFIG:::: %#", self.payPalConfig);
PayPalFuturePaymentViewController *futurePaymentViewController = [[PayPalFuturePaymentViewController alloc] initWithConfiguration:self.payPalConfig delegate:self];
//breaks here when trying to send the config init.
NSLog(#"\n\n\nafter initializtion of paypal future payment view controller\n\n\n");
[self presentViewController:futurePaymentViewController animated:YES completion:nil];
NSLog(#"after present");
}
Error I get is :
PAYPAL CONFIG:::: <PayPalConfiguration: 0x7fb23e212af0>
2014-10-12 16:31:38.979 Project[2161:69146] -[PayPalFuturePaymentViewController payPalServiceManager]: unrecognized selector sent to instance 0x7fb23e2207d0
2014-10-12 16:31:38.981 Project[2161:69146] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[PayPalFuturePaymentViewController payPalServiceManager]: unrecognized selector sent to instance 0x7fb23e2207d0'
*** First throw call stack:
(
0 CoreFoundation 0x00000001055bf3f5 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000105258bb7 objc_exception_throw + 45
2 CoreFoundation 0x00000001055c650d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x000000010551e7fc ___forwarding___ + 988
4 CoreFoundation 0x000000010551e398 _CF_forwarding_prep_0 + 120
5 CutInLineSwift 0x000000010262c0b1 -[PayPalFuturePaymentViewController initWithConfiguration:delegate:] + 361
6 CutInLineSwift 0x00000001025d28de -[ZZMainViewController getUserAuthorizationForFuturePayments:] + 190
7 UIKit 0x00000001029639ee -[UIApplication sendAction:to:from:forEvent:] + 75
8 UIKit 0x0000000102a69bd0 -[UIControl _sendActionsForEvents:withEvent:] + 467
9 UIKit 0x0000000102a68f9f -[UIControl touchesEnded:withEvent:] + 522
10 UIKit 0x00000001029a93b8 -[UIWindow _sendTouchesForEvent:] + 735
11 UIKit 0x00000001029a9ce3 -[UIWindow sendEvent:] + 683
12 UIKit 0x0000000102976ae1 -[UIApplication sendEvent:] + 246
13 UIKit 0x0000000102983bad _UIApplicationHandleEventFromQueueEvent + 17370
14 UIKit 0x000000010295f233 _UIApplicationHandleEventQueue + 1961
15 CoreFoundation 0x00000001054f4ad1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
16 CoreFoundation 0x00000001054ea99d __CFRunLoopDoSources0 + 269
17 CoreFoundation 0x00000001054e9fd4 __CFRunLoopRun + 868
18 CoreFoundation 0x00000001054e9a06 CFRunLoopRunSpecific + 470
19 GraphicsServices 0x00000001071eb9f0 GSEventRunModal + 161
20 UIKit 0x0000000102962550 UIApplicationMain + 1282
21 CutInLineSwift 0x00000001025d093e top_level_code + 78
22 CutInLineSwift 0x00000001025d097a main + 42
23 libdyld.dylib 0x0000000105f93145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
This should not be breaking since no different from the sample project but I have no idea why it is. Please help me, thank you!
Dave from PayPal here.
I believe that your problem will be solved by step 3 of our integration instructions:
In your project's Build Settings (in the TARGETS section, not the PROJECTS section):
add -lc++ -ObjC to Other Linker Flags
Also, please note Step 1 of our sample code, which indicates that you must call [PayPalMobile initializeWithClientIdsForEnvironments:] to initialize the SDK, prior to calling other methods.
Related
The first view controller of my project crashed when segue'd to from another view controller - but not when it loads. I get this error message:
2016-01-05 20:06:33.836 collaboration[48812:1788623] -[collaboration.createAccountViewController loginExisting:]: unrecognized selector sent to instance 0x796cc950
2016-01-05 20:06:33.849 collaboration[48812:1788623] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[collaboration.createAccountViewController loginExisting:]: unrecognized selector sent to instance 0x796cc950'
*** First throw call stack:
(
0 CoreFoundation 0x00396a14 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x022c5e02 objc_exception_throw + 50
2 CoreFoundation 0x0039fd63 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x002dd6bd ___forwarding___ + 1037
4 CoreFoundation 0x002dd28e _CF_forwarding_prep_0 + 14
5 libobjc.A.dylib 0x022da0b5 -[NSObject performSelector:withObject:withObject:] + 84
6 UIKit 0x00df7b79 -[UIApplication sendAction:to:from:forEvent:] + 118
7 UIKit 0x00df7af8 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 64
8 UIKit 0x00f978f8 -[UIControl sendAction:to:forEvent:] + 79
9 UIKit 0x00f97c78 -[UIControl _sendActionsForEvents:withEvent:] + 408
10 UIKit 0x00f96c7e -[UIControl touchesEnded:withEvent:] + 714
11 UIKit 0x00e74182 -[UIWindow _sendTouchesForEvent:] + 1095
12 UIKit 0x00e75220 -[UIWindow sendEvent:] + 1159
13 UIKit 0x00e19f93 -[UIApplication sendEvent:] + 266
14 UIKit 0x00def668 _UIApplicationHandleEventQueue + 7802
15 CoreFoundation 0x002b06ff __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
16 CoreFoundation 0x002a638b __CFRunLoopDoSources0 + 523
17 CoreFoundation 0x002a57a8 __CFRunLoopRun + 1032
18 CoreFoundation 0x002a50e6 CFRunLoopRunSpecific + 470
19 CoreFoundation 0x002a4efb CFRunLoopRunInMode + 123
20 GraphicsServices 0x07075664 GSEventRunModal + 192
21 GraphicsServices 0x070754a1 GSEventRun + 104
22 UIKit 0x00df5bfa UIApplicationMain + 160
23 collaboration 0x00085a3c main + 140
24 libdyld.dylib 0x039bca21 start + 1
25 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
As you can see, it cites the variable 'loginExisting' as the issue, however loginExisting is not a variable on in any of my scripts (it was before but has since been removes). How can I 'refresh' XCode so that it forgets about the absent variable? I have tried restarting my machine and cleaning XCode but have had not success.
Thank you for your help.
Go to your storyboard that's crashing and right click the yellow icon at the top of the ViewController.
After right clicking, look towards the bottom where it says "Received actions" and delete all of the actions pertaining to the loginExisting method.
This is one of many possible culprits, but this tends to be the most common.
EDIT: It's also possible that you have a property (IBOutlet) connected to the storyboard that no longer exists which will throw an error.
I'm trying to integrate the braintree sdk payment system into my app. I've done everything in the instructions (https://developers.braintreepayments.com/guides/drop-in/ios/v3) and I'm getting a strange error. Here's my code:
#IBAction func purchase(sender: AnyObject) {
let dropInViewController: BTDropInViewController = braintree!.dropInViewControllerWithDelegate(self)
dropInViewController.navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.Cancel, target: self, action: Selector("userDidCancel"))
dropInViewController.summaryTitle = "Pass"
dropInViewController.summaryDescription = "Purchase the product"
dropInViewController.displayAmount = "$5"
var navigationController: UINavigationController = UINavigationController(rootViewController: dropInViewController)
self.presentViewController(navigationController, animated: true, completion: nil)
}
and here's the error I'm getting when I touch the button to show the Braintree Drop In View
2015-12-15 20:06:39.764 TheDiner[1169:22409] +[UIColor bt_colorWithBytesR:G:B:]: unrecognized selector sent to class 0x104e4abc8
2015-12-15 20:06:39.828 TheDiner[1169:22409] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[UIColor bt_colorWithBytesR:G:B:]: unrecognized selector sent to class 0x104e4abc8'
*** First throw call stack:
(
0 CoreFoundation 0x000000010565bc65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x00000001061dcbb7 objc_exception_throw + 45
2 CoreFoundation 0x0000000105662fad +[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x00000001055b913c ___forwarding___ + 988
4 CoreFoundation 0x00000001055b8cd8 _CF_forwarding_prep_0 + 120
5 TheDiner 0x0000000103004f70 -[BTUI borderColor] + 64
6 TheDiner 0x0000000102fd8564 -[BTDropInContentView initWithFrame:] + 964
7 UIKit 0x00000001040d7393 -[UIView init] + 62
8 TheDiner 0x00000001030f794e -[BTUIThemedView init] + 62
9 TheDiner 0x0000000102fe0cb2 -[BTDropInViewController initWithClient:] + 226
10 TheDiner 0x0000000102fbfba1 -[Braintree dropInViewControllerWithDelegate:] + 209
11 TheDiner 0x0000000102fa9e7c _TFC8TheDiner22ZiftPassViewController16purchaseZiftPassfS0_FPSs9AnyObject_T_ + 572
12 TheDiner 0x0000000102faa206 _TToFC8TheDiner22ZiftPassViewController16purchaseZiftPassfS0_FPSs9AnyObject_T_ + 54
13 UIKit 0x0000000104075d62 -[UIApplication sendAction:to:from:forEvent:] + 75
14 UIKit 0x000000010418750a -[UIControl _sendActionsForEvents:withEvent:] + 467
15 UIKit 0x00000001041868d9 -[UIControl touchesEnded:withEvent:] + 522
16 UIKit 0x00000001040c2958 -[UIWindow _sendTouchesForEvent:] + 735
17 UIKit 0x00000001040c3282 -[UIWindow sendEvent:] + 682
18 UIKit 0x0000000104089541 -[UIApplication sendEvent:] + 246
19 UIKit 0x0000000104096cdc _UIApplicationHandleEventFromQueueEvent + 18265
20 UIKit 0x000000010407159c _UIApplicationHandleEventQueue + 2066
21 CoreFoundation 0x000000010558f431 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
22 CoreFoundation 0x00000001055852fd __CFRunLoopDoSources0 + 269
23 CoreFoundation 0x0000000105584934 __CFRunLoopRun + 868
24 CoreFoundation 0x0000000105584366 CFRunLoopRunSpecific + 470
25 GraphicsServices 0x0000000107c0fa3e GSEventRunModal + 161
26 UIKit 0x00000001040748c0 UIApplicationMain + 1282
27 TheDiner 0x0000000102fbea37 main + 135
28 libdyld.dylib 0x000000010694d145 start + 1
29 ??? 0x0000000000000001 0x0 + 1
)
I'm using Xcode 6 for ios8. I have the braintree header file in the bridging header.
#import <Braintree/Braintree.h>
#endif
Please point me in the right direction I've been stuck on this for a few hours. I'm thinking maybe I need to import another header in my bridge file but when I do it gives errors as well. Thanks
So the issue causing the crash is this:
5 TheDiner 0x0000000103004f70 -[BTUI borderColor] + 64
It appears that borderColor is a class method on BTUI, but that method calls +[UIColor bt_colorWithBytesR:G:B:], and the runtime can't find the implementation for +[UIColor bt_colorWithBytesR:G:B:]. This method is defined in UIColor+BTUI.h
Make sure you that you were able to import all of the headers for Brain Tree in the bridging header if you are using swift.
Try importing the header for the category file UIColor+BTUI.h manually in the bridging header and do a clean build and try again....
Updated Steps:
I got this to work, looks like something is messed up in your project file... I ran into the same problems you were having. But try these steps:
1) Create a new xcode project, (no need for bridged headers file).
2) Then change your podfile to:
use_frameworks!
pod 'Braintree', '~> 3.9'
then do a pod update
3)then at the top of your ViewController class add import Braintree then do a clean build
I was messing with my storyboard with no code involved and got this error after I connected "Terms of use" button to a view controller. It was working fine before this action.
-I created and connected a class to Terms of Use View Controller
-I used action push segue to connect
2014-01-22 17:26:45.434 Project[1162:a0b] -[AboutViewController termsOfUseButton:]: unrecognized selector sent to instance 0x8c89d40
2014-01-22 17:26:45.437 Project[1162:a0b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[AboutViewController termsOfUseButton:]: unrecognized selector sent to instance 0x8c89d40'
*** First throw call stack:
(
0 CoreFoundation 0x0173b5e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x014be8b6 objc_exception_throw + 44
2 CoreFoundation 0x017d8903 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x0172b90b ___forwarding___ + 1019
4 CoreFoundation 0x0172b4ee _CF_forwarding_prep_0 + 14
5 libobjc.A.dylib 0x014d0874 -[NSObject performSelector:withObject:withObject:] + 77
6 UIKit 0x0022e0c2 -[UIApplication sendAction:to:from:forEvent:] + 108
7 UIKit 0x0022e04e -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
8 UIKit 0x003260c1 -[UIControl sendAction:to:forEvent:] + 66
9 UIKit 0x00326484 -[UIControl _sendActionsForEvents:withEvent:] + 577
10 UIKit 0x00325733 -[UIControl touchesEnded:withEvent:] + 641
11 UIKit 0x0026b51d -[UIWindow _sendTouchesForEvent:] + 852
12 UIKit 0x0026c184 -[UIWindow sendEvent:] + 1232
13 UIKit 0x0023fe86 -[UIApplication sendEvent:] + 242
14 UIKit 0x0022a18f _UIApplicationHandleEventQueue + 11421
15 CoreFoundation 0x016c483f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
16 CoreFoundation 0x016c41cb __CFRunLoopDoSources0 + 235
17 CoreFoundation 0x016e129e __CFRunLoopRun + 910
18 CoreFoundation 0x016e0ac3 CFRunLoopRunSpecific + 467
19 CoreFoundation 0x016e08db CFRunLoopRunInMode + 123
20 GraphicsServices 0x036909e2 GSEventRunModal + 192
21 GraphicsServices 0x03690809 GSEventRun + 104
22 UIKit 0x0022cd3b UIApplicationMain + 1225
23 Project 0x00003a9d main + 141
24 libdyld.dylib 0x01d77725 start + 0
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
(Lame but I found the solution after I finished writing the question)
The reason for this error is I created an IBAction-UIButton method on touch up inside.
I deleted that code and hoped the traces were deleted.
It seems it wasnt, I had to unconnect the touch up inside by clicking the X in red squared spot.
I would try recreating the button and the segue, maybe you changed the IBOutlet name by accident or any other thing.
GL HF
For the first time I'm trying to use CocoaPods and ObjectiveRecord. ObjectiveRecord's github page
When I try to save my object, I get the following error:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Cannot create an NSPersistentStoreCoordinator with a nil model'
*** First throw call stack:
(
0 CoreFoundation 0x01aae5e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x018318b6 objc_exception_throw + 44
2 CoreData 0x00023b0e -[NSPersistentStoreCoordinator initWithManagedObjectModel:] + 398
3 ObjectiveRecordTest 0x00003691 -[CoreDataManager persistentStoreCoordinatorWithStoreType:storeURL:] + 193
4 ObjectiveRecordTest 0x000030f9 -[CoreDataManager persistentStoreCoordinator] + 169
5 ObjectiveRecordTest 0x00002dba -[CoreDataManager managedObjectContext] + 106
6 ObjectiveRecordTest 0x00003f26 +[NSManagedObjectContext(ActiveRecord) defaultContext] + 86
7 ObjectiveRecordTest 0x0000477a +[NSManagedObject(ActiveRecord) create] + 58
8 ObjectiveRecordTest 0x00002112 -[ViewController savePressed:] + 82
9 libobjc.A.dylib 0x01843874 -[NSObject performSelector:withObject:withObject:] + 77
10 UIKit 0x005a10c2 -[UIApplication sendAction:to:from:forEvent:] + 108
11 UIKit 0x005a104e -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
12 UIKit 0x006990c1 -[UIControl sendAction:to:forEvent:] + 66
13 UIKit 0x00699484 -[UIControl _sendActionsForEvents:withEvent:] + 577
14 UIKit 0x00698733 -[UIControl touchesEnded:withEvent:] + 641
15 UIKit 0x005de51d -[UIWindow _sendTouchesForEvent:] + 852
16 UIKit 0x005df184 -[UIWindow sendEvent:] + 1232
17 UIKit 0x005b2e86 -[UIApplication sendEvent:] + 242
18 UIKit 0x0059d18f _UIApplicationHandleEventQueue + 11421
19 CoreFoundation 0x01a3783f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
20 CoreFoundation 0x01a371cb __CFRunLoopDoSources0 + 235
21 CoreFoundation 0x01a5429e __CFRunLoopRun + 910
22 CoreFoundation 0x01a53ac3 CFRunLoopRunSpecific + 467
23 CoreFoundation 0x01a538db CFRunLoopRunInMode + 123
24 GraphicsServices 0x02e9e9e2 GSEventRunModal + 192
25 GraphicsServices 0x02e9e809 GSEventRun + 104
26 UIKit 0x0059fd3b UIApplicationMain + 1225
27 ObjectiveRecordTest 0x000028ad main + 141
28 libdyld.dylib 0x02b4070d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
This is what my Podfile looks like:
platform :ios
pod 'ObjectiveRecord'
I'm using the new xcworkspace file instead of the old xcode project file and I've imported the following two in the .pch file:
#import "ObjectiveRecord.h"
#import <CoreData/CoreData.h>
I've added Core Data in the project's settings page. Now when I'm using the provided code from the example of the github page:
Person *john = [Person create];
john.name = #"John";
[john save];
I get the error above. Have I forgotten something? I've been searching for some time now but I can't figure it out.
I'm using Xcode 5.0.2 and iOS 7.
Update:
It turns out that, in the general project settings, in the frameworks and libraries section, there is a red "libPods.a" entry. That means that it's missing, right? Could this be the issue?
From the doc:
Custom CoreData model or .sqlite database
If you've added the Core Data manually, you can change the custom model and database name on CoreDataManager
[CoreDataManager sharedManager].modelName = #"MyModelName";
[CoreDataManager sharedManager].databaseName = #"custom_database_name";
https://github.com/mneorr/ObjectiveRecord/blob/master/README.md
Reading docs will always help.
Ok, I fixed the error by renaming my Model.xcdatamodeld into appname.xcdatamodeld. I'm not sure why it fixed it but, I always named my models "Model" before, without any problems, but now it works. I hope this helps other people having this problem. I as well found out that the red colored "libPods.a" entry doesn't mean that it's missing. So even if it's red, everything is fine.
I am trying to display a view that contains details of the user's account. Being fairly new to iOS development, the following code is what should work (based the docs and searches). Yet, the application crashes and I get a an error stating unrecognized selector:
2012-03-13 16:32:25.616 UrbanAgendaApp[4993:207] Displaying profile view
2012-03-13 16:32:25.635 UrbanAgendaApp[4993:207] -[UAFirstViewController presentViewController:animated:completion:]: unrecognized selector sent to instance 0x4b45240
2012-03-13 16:32:25.674 UrbanAgendaApp[4993:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UAFirstViewController presentViewController:animated:completion:]: unrecognized selector sent to instance 0x4b45240'
*** Call stack at first throw:
(
0 CoreFoundation 0x00fbabe9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x0110f5c2 objc_exception_throw + 47
2 CoreFoundation 0x00fbc6fb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x00f2c366 ___forwarding___ + 966
4 CoreFoundation 0x00f2bf22 _CF_forwarding_prep_0 + 50
5 UrbanAgendaApp 0x00002308 -[UAFirstViewController showProfileView] + 168
6 UrbanAgendaApp 0x00002254 -[UAFirstViewController myUaBtnTouch:] + 52
7 UIKit 0x00014a6e -[UIApplication sendAction:to:from:forEvent:] + 119
8 UIKit 0x000a31b5 -[UIControl sendAction:to:forEvent:] + 67
9 UIKit 0x000a5647 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
10 UIKit 0x000a41f4 -[UIControl touchesEnded:withEvent:] + 458
11 UIKit 0x000390d1 -[UIWindow _sendTouchesForEvent:] + 567
12 UIKit 0x0001a37a -[UIApplication sendEvent:] + 447
13 UIKit 0x0001f732 _UIApplicationHandleEvent + 7576
14 GraphicsServices 0x00cbea36 PurpleEventCallback + 1550
15 CoreFoundation 0x00f9c064 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
16 CoreFoundation 0x00efc6f7 __CFRunLoopDoSource1 + 215
17 CoreFoundation 0x00ef9983 __CFRunLoopRun + 979
18 CoreFoundation 0x00ef9240 CFRunLoopRunSpecific + 208
19 CoreFoundation 0x00ef9161 CFRunLoopRunInMode + 97
20 GraphicsServices 0x00cbd268 GSEventRunModal + 217
21 GraphicsServices 0x00cbd32d GSEventRun + 115
22 UIKit 0x0002342e UIApplicationMain + 1160
23 UrbanAgendaApp 0x00001c2a main + 170
24 UrbanAgendaApp 0x00001b75 start + 53
25 ??? 0x00000001 0x0 + 1
)
terminate called after throwing an instance of 'NSException'
The method where this occurs is in a method in FirstViewController, which gets called as a result of a touch up event inside a button:
-(void)showProfileView {
NSLog( #"%#", #"Displaying profile view" ); // ***
UAProfileView *profileView = [[UAProfileView alloc] init];
[self presentViewController:profileView animated:TRUE completion:0];
}
This UAProfielView is a subclass of UIViewController and was was created along with an appropriate .xib file.
So the question is, how do I display this new view in my iPhone application? Using a storyboard is not an option because I have to support iOS 4.0.
The documentation for presentViewController:animated:completion: states that it is only supported on iOS 5.0 and up. You mentioned support for iOS 4.0.
Try presentModalViewController:animated: instead. Alternatively, use a nagivationController and do pushViewController:animated:
#Mike, make sure you connected the nib to the file's owner.
Presumably, the base class of UAFirstViewController is also UIViewController? Are you getting any warnings when you build?
I would personally use completion:nil, but I don't think that will make a difference.
So, if you are getting no warnings, then turn zombies on and see if you are dealing with a dead object. Instructions are here
How to enable NSZombie in Xcode?
Run the program and see if you get a zombie warning in the console. If that's the case, then the memory management is wrong.
If all of that is ok, post the code where you call showProfileView.