2016-12-11 14 views
1

Unity3DプロジェクトからFacebookにログインしようとしています。私はiPhone 6を使ってそれをテストしています。ゲームではすべてがうまくいきますが、ログインがフェイスブックに行われた後、ゲームは再びフォアグラウンドに来ることはできず、終了します。 XCodeは以下のコードを画面に表示します。私は時間を過ごしたが、問題を発見できなかった助けてくださいUnity Facebookプラグインがログイン後にアプリケーションを終了する(iOS)

// Hack to work around iOS SDK 4.3 linker problem 
// we need at least one __TEXT, __const section entry in main application .o files 
// to get this section emitted at right time and so avoid LC_ENCRYPTION_INFO size miscalculation 
static const int constsection = 0; 

void UnityInitTrampoline(); 

// WARNING: this MUST be c decl (NSString ctor will be called after +load, so we cant really change its value) 
const char* AppControllerClassName = "UnityAppController"; 

int main(int argc, char* argv[]) 
{ 
    @autoreleasepool 
    { 
     UnityInitTrampoline(); 
     UnityInitRuntime(argc, argv); 

     RegisterMonoModules(); 
     NSLog(@"-> registered mono modules %p\n", &constsection); 
     RegisterFeatures(); 

     // iOS terminates open sockets when an application enters background mode. 
     // The next write to any of such socket causes SIGPIPE signal being raised, 
     // even if the request has been done from scripting side. This disables the 
     // signal and allows Mono to throw a proper C# exception. 
     std::signal(SIGPIPE, SIG_IGN); 

     UIApplicationMain(argc, argv, nil, [NSString stringWithUTF8String:AppControllerClassName]); 
    } 

    return 0; 

これは出力され

。:

:...一部UIApplicationMain(argcのマークが付けられ、それは信号SIGABRTスレッド1」と言っています私が最初に見ている必要があります解決策を見つけた長い検索の後
Using Facebook Unity SDK v7.9.0 with FBiOSSDK/4.17.0 
Facebook.Unity.CompiledFacebookLoader:Start() 

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51) 

FB is now not logged in! 
FBScript:SetInit() 
Facebook.Unity.CallbackManager:TryCallCallback(Object, IResult) 
Facebook.Unity.CallbackManager:CallCallback(Object, IResult) 
Facebook.Unity.CallbackManager:OnFacebookResponse(IInternalResult) 

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51) 

FB trying to log in! 
FBScript:FBlogin() 
FBScript:SetInit() 
Facebook.Unity.CallbackManager:TryCallCallback(Object, IResult) 
Facebook.Unity.CallbackManager:CallCallback(Object, IResult) 
Facebook.Unity.CallbackManager:OnFacebookResponse(IInternalResult) 

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51) 

2016-12-10 23:44:34.464780 squares[2556:662682] Uncaught exception: NSInvalidArgumentException: *** -[__NSArrayM insertObject:atIndex:]: object cannot be nil 
(
    0 CoreFoundation      0x00000001819a61d8 <redacted> + 148 
    1 libobjc.A.dylib      0x00000001803e055c objc_exception_throw + 56 
    2 CoreFoundation      0x0000000181885ad4 CFStringConvertNSStringEncodingToEncoding + 0 
    3 squares        0x00000001000f6e58 -[UnityAppController application:openURL:sourceApplication:annotation:] + 308 
    4 UIKit        0x0000000187a9141c <redacted> + 872 
    5 UIKit        0x0000000187a90e30 <redacted> + 656 
    6 SafariServices      0x000000018fcb28a0 <redacted> + 172 
    7 SafariServices      0x000000018fcaa7c0 <redacted> + 76 
    8 CoreFoundation      0x00000001819ac160 <redacted> + 144 
    9 CoreFoundation      0x000000018189fc3c <redacted> + 284 
    10 FrontBoardServices     0x000000018354d8bc <redacted> + 36 
    11 FrontBoardServices     0x000000018354d728 <redacted> + 176 
    12 FrontBoardServices     0x000000018354dad0 <redacted> + 56 
    13 CoreFoundation      0x0000000181954278 <redacted> + 24 
    14 CoreFoundation      0x0000000181953bc0 <redacted> + 524 
    15 CoreFoundation      0x00000001819517c0 <redacted> + 804 
    16 CoreFoundation      0x0000000181880048 CFRunLoopRunSpecific + 444 
    17 GraphicsServices     0x0000000183306198 GSEventRunModal + 180 
    18 UIKit        0x000000018786c2fc <redacted> + 684 
    19 UIKit        0x0000000187867034 UIApplicationMain + 208 
    20 squares        0x00000001000e300c main + 156 
    21 libdyld.dylib      0x00000001808645b8 <redacted> + 4 
) 
2016-12-10 23:44:34.465114 squares[2556:662682] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil' 
*** First throw call stack: 
(0x1819a61c0 0x1803e055c 0x181885ad4 0x1000f6e58 0x187a9141c 0x187a90e30 0x18fcb28a0 0x18fcaa7c0 0x1819ac160 0x18189fc3c 0x18354d8bc 0x18354d728 0x18354dad0 0x181954278 0x181953bc0 0x1819517c0 0x181880048 0x183306198 0x18786c2fc 0x187867034 0x1000e300c 0x1808645b8) 
libc++abi.dylib: terminating with uncaught exception of type NSException 
(lldb) 

答えて

関連する問題