gpt4 book ai didi

ios 8 + LiveSDK 身份验证使我的应用程序崩溃

转载 作者:行者123 更新时间:2023-11-29 02:24:09 25 4
gpt4 key购买 nike

我在商店中有一个应用程序使用 LiveSDK API 将用户登录到 OneDrive。最后一个版本是在 iOS8 出来之前推送的,但是在 iOS8 上没有问题

现在我想推送一个更新(与 OneDrive 功能无关)并且我使用的是 xcode 6.1.1 但在测试应用程序时我注意到每次用户通过 OneDrive 身份验证时应用程序都会在从 segue 返回时立即崩溃或主视图的另一侧 View 。

我能够将问题隔离到添加到 viewDidLoad 中的这一行:

self.liveClient = [[LiveConnectClient alloc] initWithClientId:APP_CLIENT_ID
delegate:self
userState:@"initialize"];

我确实遵循了可在此处找到的有关如何登录的基本说明:

http://msdn.microsoft.com/en-us/library/dn631822.aspx#sign_the_user_in

重现问题的步骤(在您的设备和模拟器上)如下:

a) 应用启动b) 单击将触发 flipsideviewcontroller 的云服务登录按钮c) 使用 MS 提供的代码登录 OneDrived) 回到主 Controller e) 崩溃!

轨迹如下:

#########################################################
*** First throw call stack:
(
0 CoreFoundation 0x028dd1e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x026598e5 objc_exception_throw + 44
2 CoreFoundation 0x0297a243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x028cd50b ___forwarding___ + 1019
4 CoreFoundation 0x028cd0ee _CF_forwarding_prep_0 + 14
5 CloudFella 0x0015c867 -[LiveConnectClientCore dealloc] + 48
6 libobjc.A.dylib 0x0266a692 _ZN11objc_object17sidetable_releaseEb + 268
7 libobjc.A.dylib 0x0266baeb -[NSObject release] + 25
8 CloudFella 0x00158af1 -[LiveConnectClient dealloc] + 44
9 libobjc.A.dylib 0x0266a692 _ZN11objc_object17sidetable_releaseEb + 268
10 libobjc.A.dylib 0x02669e81 objc_release + 49
11 libobjc.A.dylib 0x02669e3e objc_storeStrong + 39
12 CloudFella 0x00157b9d -[CFFlipsideViewController .cxx_destruct] + 249
13 libobjc.A.dylib 0x026582d4 _ZL27object_cxxDestructFromClassP11objc_objectP10objc_class + 128
14 libobjc.A.dylib 0x0265824f object_cxxDestruct + 20
15 libobjc.A.dylib 0x0266327a objc_destructInstance + 48
16 libobjc.A.dylib 0x026632ab object_dispose + 20
17 UIKit 0x01433d1a -[UIViewController dealloc] + 1854
18 UIKit 0x01430915 -[UIViewController release] + 89
19 libobjc.A.dylib 0x02669e97 objc_release + 71
20 libobjc.A.dylib 0x02656bf0 objc_setProperty_nonatomic + 48
21 UIKit 0x01a6167d -[_UIViewControllerOneToOneTransitionContext _setFromViewController:] + 47
22 UIKit 0x01a61490 -[_UIViewControllerOneToOneTransitionContext dealloc] + 43
23 libobjc.A.dylib 0x0266a692 _ZN11objc_object17sidetable_releaseEb + 268
24 libobjc.A.dylib 0x0266baeb -[NSObject release] + 25
25 UIKit 0x01a60834 -[_UIViewControllerTransitionContext completeTransition:] + 135
26 UIKit 0x01a7a5b1 -[UIViewControllerBuiltinTransitionViewAnimator transitionViewDidComplete:fromView:toView:removeFromView:] + 50
27 UIKit 0x01416137 -[UITransitionView notifyDidCompleteTransition:] + 345
28 UIKit 0x01415e61 -[UITransitionView _didCompleteTransition:] + 1333
29 UIKit 0x014181b7 -[UITransitionView _transitionDidStop:finished:] + 107
30 UIKit 0x013666dc -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 267
31 UIKit 0x013669c8 -[UIViewAnimationState animationDidStop:finished:] + 80
32 QuartzCore 0x00fd6bb4 _ZN2CA5Layer23run_animation_callbacksEPv + 304
33 libdispatch.dylib 0x0326b4d0 _dispatch_client_callout + 14
34 libdispatch.dylib 0x03259726 _dispatch_main_queue_callback_4CF + 340
35 CoreFoundation 0x0294243e __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 14
36 CoreFoundation 0x028835cb __CFRunLoopRun + 1963
37 CoreFoundation 0x028829d3 CFRunLoopRunSpecific + 467
38 CoreFoundation 0x028827eb CFRunLoopRunInMode + 123
39 GraphicsServices 0x0301f5ee GSEventRunModal + 192
40 GraphicsServices 0x0301f42b GSEventRun + 104
41 UIKit 0x01316f9b UIApplicationMain + 1225
42 CloudFella 0x000eeea6 main + 94
43 libdyld.dylib 0x034af6d9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
#

如果我登录我的应用程序中可用的其他云服务(Google drive、dropbox、evernote),我完全没有遇到任何问题。

旧的 LiveSDK API(包含在商店当前良好版本中的那个)和添加到应用程序以解决此处描述的一些验证问题的最新版本(2 个月前)都会出现问题:https://github.com/liveservices/LiveSDK-for-iOS/issues/43

我怀疑从 Xcode 5 到 xcode 6 的构建参数发生了一些变化,导致了这个问题,但是我不确定问题出在哪里以及如何解决。

作为测试,我强制只为 32 位架构构建应用程序,但它也崩溃了:这是预期的,因为 LiveSDK API 与 64 位架构兼容,但当然想尝试...。

非常感谢任何帮助。

谢谢,域名

最佳答案

事实证明这可能确实是 liveSDK 的一个错误。

打开以下问题:

https://github.com/liveservices/LiveSDK-for-iOS/issues/53

另一个遇到同样问题的 API 用户 ( https://github.com/sylverb ) 给了我一个很好的解决方法,直到错误被修复:

“由于 LiveConnectClientCore.m 的发布方法中的“[authRefreshRequest cancel];”而崩溃。我通过在refreshSessionWithDelegate方法(也在LiveConnectClientCore.m中)的这一行添加“self”进行了临时修复:

 self.authRefreshRequest = [[[LiveAuthRefreshRequest alloc] initWithClientId:_clientId
scope:_scopes
refreshToken:refreshToken
delegate:delegate
userState:userState
clientStub:self]
autorelease];

"

关闭帖子已解决,因为提供了解决方法,并且我添加了一个指向为任何其他想要跟进此问题的用户打开的开放错误的链接。

关于ios 8 + LiveSDK 身份验证使我的应用程序崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27752827/

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