1

I have an activityViewController sharing a link to my app, and it runs perfectly fine on iOS 7, although on iOS 8 it freezes my app upon hitting the dismiss button.

Here is how i run my activityViewController

activityViewController = [[UIActivityViewController alloc] initWithActivityItems:[NSArray arrayWithObjects:@"Check out Punch Slip on the AppStore! You can record your hours, see how much you made, and even email your log. \n https://itunes.apple.com/us/app/punch-slip/id531560298?ls=1&mt=8", nil] applicationActivities:nil];
[self presentViewController:activityViewController animated:YES completion:nil];

My Log shows this error

enter image description here

Is there something that changes in the activity view controller in IOS 8?

EDIT:

A view that can be added to my viewController is added like this:

CGRect screenBound = [[UIScreen mainScreen] bounds];
CGSize screenSize = screenBound.size;
CGFloat screenHeight = screenSize.height;

pickerSubView = [[UIView alloc] init];
//Find screensize and take y-464
yHeight = (screenHeight / 20) * 11;
NSLog(@"%d", yHeight);
pickerSubView.frame = CGRectMake(0, yHeight, 320, 464);

pickerSubView.backgroundColor=[UIColor whiteColor];
[pickerSubView  addSubview:categoryPickerView];
[pickerSubView addSubview:pickerToolbar];
[self.view addSubview:pickerSubView];

[pickerSubView setFrame:CGRectMake(0.0f, 800.0f, 320.0f, 480.0f)]; //notice this is OFF screen!
[UIView beginAnimations:@"animateTableView" context:nil];
[UIView setAnimationDuration:0.5];
[pickerSubView setFrame:CGRectMake(0, yHeight, 320, 464)]; //notice this is ON screen!
[UIView commitAnimations];

Then Removed Like this:

[pickerSubView setFrame:CGRectMake(0, yHeight, 320, 464)]; //notice this is OFF screen!
[UIView beginAnimations:@"animateTableView" context:nil];
[UIView setAnimationDuration:0.5];
[pickerSubView setFrame:CGRectMake(0.0f, 800.0f, 320.0f, 480.0f)]; //notice this is ON screen!
[UIView commitAnimations];
[pickerSubView removeFromSuperview];

Edit:

I now believe it may just be a problem on apples side due to the first set of lines. I think it is a problem with the cancel button of the activityviewcontroller

enter image description here

inVINCEable
  • 2,167
  • 3
  • 25
  • 49
  • The log indicates this is not caused by the `UIActivityViewController` but by conflicting constraints on one of your views. – strwils Jul 02 '14 at 17:24
  • The two constraints listed are keyboard layout alignments, but there is no keyboard in that view – inVINCEable Jul 02 '14 at 17:26
  • Are there any views in this view controller that you created programmatically? – strwils Jul 02 '14 at 17:53
  • Yeah, there is a SubView Added that can be then removed before using this, ill add it the the question – inVINCEable Jul 02 '14 at 17:57
  • it worked in ios7 but crashes with ios8 for me too – Gerry Sep 02 '14 at 20:58
  • This log shows that Your UIViews some Constraints not satisfy.. this log and Crash has no relation.. UIActivityController crash because in iOS 8 to open the UIActivity controller in iPad we have to use UIPopover Controller.. Check it out this link:: http://stackoverflow.com/questions/25644054/uiactivityviewcontroller-crashing-on-ios8-ipads/27189994#27189994 – Hardik Thakkar Dec 20 '14 at 12:22

2 Answers2

1

The issue no longer exists using Xcode 6 beta 2

inVINCEable
  • 2,167
  • 3
  • 25
  • 49
0

Try calling setTranslatesAutoresizingMaskIntoConstraints:NO on pickerSubView. Since you created it programmatically, it's superview might be generating constraints that you are not aware of which result in conflicting constraints.

strwils
  • 687
  • 4
  • 12