Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 06-23-2011, 04:04 AM   #1 (permalink)
Registered Member
 
Join Date: Jun 2011
Posts: 1
sleepyhead is on a distinguished road
Default App crashes after authentication Twitter using Sharekit

In our App we are using ShareKit to publish something on Facebook and Twitter.
Facebook works perfectly, only there are some problems with Twitter.

The first time you want to send something using Twitter, you need to authenticate the app.
This process also works fine only when it's done it should return to the screen to post on Twitter.
But at this point the app crashes because it can't find the UIViewController anymore...
See the following error:

Code:
    2011-06-22 17:18:29.355 asdf[189:707] *** Assertion failure in -[SHK showViewController:], /Users/nvt/Documents/asdf/Classes/Core/SHK.m:117
    2011-06-22 17:18:29.460 asdf[189:707] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'ShareKit: Could not find a root view controller.  You can assign one manually by calling [[SHK currentHelper] setRootViewController:YOURROOTVIEWCONTROLLER].'
But I do set the UIViewController:

Code:
    - (IBAction) shareAll:(id)sender
    {
    	[SHK setRootViewController:self];
    	
    	SHKItem *item = [SHKItem text:@"Deel app test"];
    	
    	[SHK setFavorites:[NSArray arrayWithObjects:@"SHKTwitter", @"SHKFacebook",nil] forType:SHKShareTypeURL];
    	[SHK setFavorites:[NSArray arrayWithObjects:@"SHKTwitter", @"SHKFacebook",nil] forType:SHKShareTypeText];	
    	
    	SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item];
    	actionSheet.title = @"Deel";
    	
    	[actionSheet showInView:self.view];
    }
It seems that somehow Sharekit loses the handle on the UIViewController.
I tried fixing it by adding:

Code:
    [SHK setRootViewController:self];
To the ViewDidLoad and ViewWillAppear methods, but this didn't work.
Anyone who encountered the same problem, or have an idea to fix this?
Although the app crashes the authentication works, because the next time you want to post something on Twitter it does work.
So it only crashes once during the first authentication...
sleepyhead is offline   Reply With Quote
Reply

Bookmarks

Tags
sharekit, twitter, uiviewcontroller

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 331
8 members and 323 guests
chemistry, Dnnake, iOS.Lover, lendo, leostc, Leslie80, pbart, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,664
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Leslie80
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:28 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0