Apologize for my poor english.
When I learn how to use evernote sdk from SampleApp.
I run SampleApp lot times for test, and SampleApp push a alert view then crash after I click login button in authorize page at every turn.
I was confused, is there anything I did wrong?
I don't change any code of SampleApp, except CONSUMER_KEY and CONSUMER_SECRET.
But simetimes SampleApp works fine. I can authorize and list notes.
Anyone help. thanks.
I print crash error info as follow:
Error Domain=NSURLErrorDomain Code=-999 "The operation couldn’t be completed. (NSURLErrorDomain error -999.)" UserInfo=0x6d17250 {NSErrorFailingURLKey=https://sandbox.evernote.com/Login.action?targetUrl=%2FOAuth.action%3Foauth_token%3Dfengyuxx-............., NSErrorFailingURLStringKey=https://sandbox.evernote.com/Login.action?targetUrl=%2FOAuth.action%3Foauth_token%3Dfengyuxx-.............}
3 replies to this topic
#1
Posted 30 June 2012 - 10:08 AM
#2
Posted 01 July 2012 - 11:48 AM
Maybe it's because isAuthenticated needs fixing, I think?
I pointed this out in a thread a day or so ago.
I think EvernoteSession::authenticationToken should be rewritten as:
- (NSString *)authenticationToken
{
if (self.credentials)
return [self.credentials authenticationToken];
return nil;
}
I pointed this out in a thread a day or so ago.
I think EvernoteSession::authenticationToken should be rewritten as:
- (NSString *)authenticationToken
{
if (self.credentials)
return [self.credentials authenticationToken];
return nil;
}
#3
Posted 02 July 2012 - 08:16 AM
Maybe it's because isAuthenticated needs fixing, I think?
I pointed this out in a thread a day or so ago.
I think EvernoteSession::authenticationToken should be rewritten as:
- (NSString *)authenticationToken
{
if (self.credentials)
return [self.credentials authenticationToken];
return nil;
}
Thanks for you response.
But I don't think it is.
I try to change the code as you said, but the problem still appear.
Finally, I find the problem:
In ENOAuthViewController.viewDidLoad
this line:
self.webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
shuld be:
self.webView = [[[UIWebView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)] autorelease];
Then it works fine now.
PS:
Some lines above in the same method
"UIBarButtonItem *cancelItem" did not release too.
#4
Posted 02 July 2012 - 05:04 PM
The addition of the autorelease is very interesting.
I am building the library as a static lib then including it into an ARC app, with the -fno-objc-arc on the lib and other associated files such as GCOAuth.m and NSData+Base64.m.
Maybe I am protected from the crashes because my main app is using ARC?
Too busy frantically trying to get app finished to investigate now but will be interested to see what the Evernote people say.
I am building the library as a static lib then including it into an ARC app, with the -fno-objc-arc on the lib and other associated files such as GCOAuth.m and NSData+Base64.m.
Maybe I am protected from the crashes because my main app is using ARC?
Too busy frantically trying to get app finished to investigate now but will be interested to see what the Evernote people say.
Also tagged with one or more of these keywords: ios
iOS
Evernote Products →
Evernote →
Open In... Not working - Evernote not appearingStarted by dgold105, Today, 05:51 AM |
|
|
||
iOS
Evernote Products →
Evernote →
Evernote to Penultimate?Started by janet4, Yesterday, 09:45 PM |
|
|
||
iOS
Evernote Products →
Evernote →
EN on the iPhone 4 constantly crashesStarted by jsharp29, Yesterday, 08:25 PM |
|
|
||
iOS
Evernote Products →
Evernote →
Apps opinion? FastEver versus QuickEverStarted by fjpoblam, Yesterday, 06:08 PM |
|
|
||
iOS
Evernote Products →
Evernote →
Favorites tab instead of Premium tab on iPhone (and iPad?)Started by icoco, Yesterday, 05:30 PM |
|
|
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












