Bug 2641 - MonoTouch.Accounts: ACAccountStore RequestAccess Does not work anymore in 5.1.1 Beta
Summary: MonoTouch.Accounts: ACAccountStore RequestAccess Does not work anymore in 5.1...
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 5.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Rolf Bjarne Kvinge [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2011-12-26 16:30 UTC by Andreas Klapperich
Modified: 2012-01-03 11:47 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
use method TweetDirect accountStore.RequestAccess crashes with 5.1.1. (9.13 KB, application/octet-stream)
2011-12-26 16:32 UTC, Andreas Klapperich
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Andreas Klapperich 2011-12-26 16:30:01 UTC
public static void TweetDirect (UITextView display, UIView view, string accountDisplayName)
		{
			ACAccountStore accountStore = new ACAccountStore ();
			ACAccountType accountType = accountStore.FindAccountType ("com.apple.twitter");
			Console.WriteLine (MonoTouch.Constants.Version);
			
			accountStore.RequestAccess (accountType, (granted, error) => {

The RequestAccess works with 5.0.4 but with the beta 5.1.1 the function crashes.

I have added a modified SampleCode.cs from the Twitter sample for iOS5.

see the method 		

public static void TweetDirect (UITextView display, UIView view, string accountDisplayName)
Comment 1 Andreas Klapperich 2011-12-26 16:32:24 UTC
Created attachment 1097 [details]
use method  TweetDirect accountStore.RequestAccess crashes with 5.1.1.
Comment 2 Rolf Bjarne Kvinge [MSFT] 2012-01-02 18:39:27 UTC
Which twitter sample are you referring to?
Comment 3 Andreas Klapperich 2012-01-03 02:35:09 UTC
I have added a new function with the name "TweetDirect" in the attached sample.
The attached sample is based on the xamarain Twitter Sample.

In the "TweetDirect" function I use functions from "MonoTouch.Accounts".

ACAccountStore accountStore = new ACAccountStore ();
ACAccountType accountType = accountStore.FindAccountType("com.apple.twitter");
accountStore.RequestAccess (accountType, (granted, error)........

The call of "accountStore.RequestAccess" crashes with 5.1.1.
Comment 4 Rolf Bjarne Kvinge [MSFT] 2012-01-03 11:01:46 UTC
I can reproduce a crash with the original sample by just clicking on the "Get Json Stream" button, it looks like the same thing.
Comment 5 Rolf Bjarne Kvinge [MSFT] 2012-01-03 11:45:55 UTC
This has now been fixed (fa7aabcc4), it will be in the next beta (5.1.2).
Comment 6 Andreas Klapperich 2012-01-03 11:47:58 UTC
thanks