gpt4 book ai didi

ios5 - MGTwitterEngine 在 iOS5 中崩溃

转载 作者:行者123 更新时间:2023-12-04 16:35:56 27 4
gpt4 key购买 nike

虽然 MGTwitterEngine 在以前版本的 iOS 上运行良好,但当我尝试发布 twit 时,它失败了 EXC_BAD_ACCESS:

[twitter sendUpdate:textToShare];

Objective-C 代码执行器的最后一个列表是:
[theRequest prepare];

在 SA_OAuthTwitterEngine.m 内。这是调用堆栈:
#1  0x00045a63 in -[OAMutableURLRequest URLEncodedString:] at /Users/ben/Dropbox/Dev/External Projects/Twitter-OAuth-iPhone/OAuthConsumeriPhoneLib/OAuthConsumerSrc/OAMutableURLRequest.m:287
#2 0x000445fa in -[OAMutableURLRequest prepare] at /Users/ben/Dropbox/Dev/External Projects/Twitter-OAuth-iPhone/OAuthConsumeriPhoneLib/OAuthConsumerSrc/OAMutableURLRequest.m:131
#3 0x00041778 in -[SA_OAuthTwitterEngine _sendRequestWithMethod:path:queryParameters:body:requestType:responseType:] at /Developer/WorkShop/XDictionary/trunk/Dictionary/Twitter+OAuth/SAOAuthTwitterEngine/SA_OAuthTwitterEngine.m:325
#4 0x000356b1 in -[MGTwitterEngine sendUpdate:inReplyTo:] at /Developer/WorkShop/XDictionary/trunk/Dictionary/Twitter+OAuth/MGTwitterEngine/MGTwitterEngine.m:1037
#5 0x0003546c in -[MGTwitterEngine sendUpdate:] ()
#6 0x00023ae7 in -[SocialNetworking twitterShare] ()
#7 0x00023c2b in -[SocialNetworking OAuthTwitterController:authenticatedWithUsername:] ()
#8 0x0003d0d5 in -[SA_OAuthTwitterController gotPin:] ()
#9 0x0003eabb in -[SA_OAuthTwitterController webViewDidFinishLoad:] ()
#10 0x0051736a in -[UIWebView webView:didFinishLoadForFrame:] ()
#11 0x00518956 in -[UIWebViewWebViewDelegate webView:didFinishLoadForFrame:] ()
#12 0x01ced51d in __invoking___ ()
#13 0x01ced437 in -[NSInvocation invoke] ()
#14 0x01d1849a in -[NSInvocation invokeWithTarget:] ()
#15 0x04f09aff in -[_WebSafeForwarder forwardInvocation:] ()
#16 0x01cee0c9 in ___forwarding___ ()
#17 0x01cedce2 in __forwarding_prep_0___ ()
#18 0x01ced51d in __invoking___ ()
#19 0x01ced437 in -[NSInvocation invoke] ()
#20 0x05aa9ae3 in SendMessage(NSInvocation*) ()
#21 0x05aaa115 in HandleDelegateSource(void*) ()
#22 0x01d5b97f in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ ()
#23 0x01cbeb73 in __CFRunLoopDoSources0 ()
#24 0x01cbe454 in __CFRunLoopRun ()
#25 0x01cbddb4 in CFRunLoopRunSpecific ()
#26 0x01cbdccb in CFRunLoopRunInMode ()
#27 0x02ee1879 in GSEventRunModal ()
#28 0x02ee193e in GSEventRun ()
#29 0x00360a9b in UIApplicationMain ()
#30 0x00001d3a in main ()

有任何想法吗?解决方法?
你知道另一个适用于 iOS 5 的 Twitter 框架吗?我唯一需要做的就是发帖(当然可以先登录)。

最佳答案

- (SA_OAuthTwitterEngine *) initOAuthWithDelegate: (NSObject *) delegate {
if (self = (id) [super initWithDelegate: delegate]) {
self.requestTokenURL = [NSURL URLWithString: @"https://twitter.com/oauth/request_token"];
self.accessTokenURL = [NSURL URLWithString: @"https://twitter.com/oauth/access_token"];
self.authorizeURL = [NSURL URLWithString: @"https://twitter.com/oauth/authorize"];
}
return self;
}

如上所述修改 SA_OAuthTwitterEngine.m 函数。
您基本上必须将 oAuth url 更新为 https。 iOS5 中的某些内容阻止它从 http 重定向到 https

关于ios5 - MGTwitterEngine 在 iOS5 中崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8576877/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com