0 votes

Hi, I'm trying to use Activity View to allow sharing to social media in our game. It works great on iPhones, but crashes instantly on iPads. The error in Xcode is:

"Terminating app due to uncaught exception 'NSGenericException', reason: 'UIPopoverPresentationController (<_UIAlertControllerActionSheetRegularPresentationController: 0x7fc7a874bd90>) should have a non-nil sourceView or barButtonItem set before the presentation occurs.'"

It would appear that while iPhones are allowed to create a UIActivityViewController by itself, iPads are required to do it within the context of a UIPopoverController. I don't write Objective C, but it looks like this StackOverflow post sums up the issue nicely.


We're a bit under the gun to get this out the door. Is this something you can look into? Your plugin works so nicely on iPhones, I'd hate to have to start over from scratch with a new plugin.


asked Aug 19, 2016 by DarrenEline (120 points)
edited Aug 21, 2016 by IndieYP

1 Answer

0 votes
Hello, please send method which you call, thanks for feedback.
answered Aug 19, 2016 by IndieYP (1,730 points)
Hi, thanks for getting back to me. I'm calling ActivityView.Share(string messageText, string subjectTitle, UIActivityType[] excludedActivities = null)
Which version of Unity and my plugin you use? I Itested it on iOS 9.3.4 and Unity 5.3.6 and i can't find this error(current Version of plugin 1.32). I my other users not send me this bug.
We're using Unity 4.7 because our game was released about 2 years ago. We just ported to mobile this summer, and are now adding in social media. We are using version 1.32 of ActivityView.
Sorry, but I'm not support Unity 4 from February, if you want can do chargeback by Unity support.
Thanks for the reply. Your page on the Unity Asset Store says requires Unity 4.5.4 or higher. You might want to change that.

Would you be open to sending me the Objective C source code?
Sorry, but i not share source of paid projects
Welcome to IndieYP Q&A, where you can ask questions and receive answers from other members of the community.
27 questions
23 answers
1,851 users