question

jianghuafan avatar image
jianghuafan asked

GameCircle Initialized Issue Unity / iOS

I just used GameCircle plugin for unity, trying out Unity GameCircle compilation to iOS I followed tutorial on https://developer.amazon.com/sdk/gamecircle/documentation/unity-gamecircle-setup.html#Section3 (using Unity 4.5.2 and Xcode 5.1.1) when we try application crashes, there are exception log: 2014-11-12 10:23:55.621 starcoliseum[562:60b] W GameCircle has not been initialized yet. 2014-11-12 10:23:56.739 starcoliseum[562:60b] Uncaught exception: NSInvalidArgumentException: *** setObjectForKey: object cannot be nil (key: GAME_ID) ( 0 CoreFoundation 0x2e383f9b + 154 1 libobjc.A.dylib 0x38f26ccf objc_exception_throw + 38 2 CoreFoundation 0x2e2bf8f3 + 818 3 starcoliseum 0x00b06b3b -[AGMetricsManager genericAttributes] + 230 4 starcoliseum 0x00b06847 -[AGMetricsManager recordEvent:] + 154 5 starcoliseum 0x00b18d67 -[AGGameDataMap reportEventWithName:] + 98 6 starcoliseum 0x00b18911 -[AGGameDataMap merge:] + 720 7 starcoliseum 0x00b234f9 -[AGDiskSynchronizer loadFromDisk] + 152 8 starcoliseum 0x00b24393 -[AGSynchronizationManager syncFromDiskToMemory] + 142 9 starcoliseum 0x00afaf7b -[AGWhispersync syncMemoryFromDisk] + 46 10 libdispatch.dylib 0x3940e81f + 22 11 libdispatch.dylib 0x3941660f + 46 12 starcoliseum 0x00afaeed +[AGWhispersync sharedInstance] + 48 13 starcoliseum 0x00aff681 +[GameCircle beginWithFeatures:completionHandler:] + 200 14 starcoliseum 0x00b7038b _AmazonGameCircleInit + 606 15 starcoliseum 0x000d66c4 m_wrapper_managed_to_native_AGSClient__AmazonGameCircleInit_strin 15 starcoliseum 0x000d66c4 m_wrapper_managed_to_native_AGSClient__AmazonGameCircleInit_string_int_bool_bool_bool + 172 16 starcoliseum 0x000990a0 m_AmazonGameCircleExampleInitialization_InitializeGameCircle + 96 17 starcoliseum 0x00098af0 m_AmazonGameCircleExampleInitialization_DisplayInitGameCircleMenu + 108 18 starcoliseum 0x00098a48 m_AmazonGameCircleExampleInitialization_DrawMenu + 76 19 starcoliseum 0x00097130 m_AmazonGameCircleExample_OnGUI + 316 20 starcoliseum 0x0096ca80 m_wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 204 21 starcoliseum 0x011ef79c mono_jit_runtime_invoke + 2156 22 starcoliseum 0x012918ac mono_runtime_invoke + 136 23 starcoliseum 0x00ce8f04 _Z23scripting_method_invokeP15ScriptingMethodP10MonoObjectR18ScriptingArgumentsPP13MonoException + 76 24 starcoliseum 0x00d935dc _ZN25ScriptingInvocationNoArgs6InvokeEPP13MonoException + 60 25 starcoliseum 0x00d86b28 _ZN13MonoBehaviour5DoGUIENS_13GUILayoutTypeEi + 356 26 starcoliseum 0x00d1cb60 _ZL18MonoBehaviourDoGUIPvN13MonoBehaviour13GUILayoutTypeEi + 20 27 starcoliseum 0x00d1c720 _ZN10GUIManager10DoGUIEventER10InputEventb + 1208 28 starcoliseum 0x00d1cb0c _ZN10GUIManager16SendQueuedEventsEv + 180 29 starcoliseum 0x00d59904 _Z10PlayerLoopbbP10IHookEvent + 1100 30 starcoliseum 0x00b86490 UnityPlayerLoop + 36 31 starcoliseum 0x00aaeb9c -[UnityAppController(Rendering) repaint] + 436 32 starcoliseum 0x00aae98c -[UnityAppController(Rendering) repaintDisplayLink] + 196 33 libglInterpose.dylib 0x02e77a57 -[DYDisplayLinkInterposer forwardDisplayLinkCallback:] + 270 34 QuartzCore 0x3086cdf3 + 98 35 QuartzCore 0x3086cb9d + 344 36 IOMobileFramebuffer 0x3360675d + 104 37 IOKit 0x2f06f451 IODispatchCalloutFromCFMessage + 248 38 CoreFoundation 0x2e343ea9 + 136 39 CoreFoundation 0x2e34ea67 + 34 40 CoreFoundation 0x2e34ea03 + 346 41 CoreFoundation 0x2e34d1d7 + 1398 42 CoreFoundation 0x2e2b7ebf CFRunLoopRunSpecific + 522 43 CoreFoundation 0x2e2b7ca3 CFRunLoopRunInMode + 106 44 GraphicsServices 0x331de663 GSEventRunModal + 138 45 UIKit 0x30c0414d UIApplicationMain + 1136 46 starcoliseum 0x0009369c main + 288 47 starcoliseum 0x00093578 start + 40 ) 2014-11-12 10:23:56.747 starcoliseum[562:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** setObjectForKey: object cannot be nil (key: GAME_ID)' *** First throw call stack: (0x2e383f83 0x38f26ccf 0x2e2bf8f3 0xb06b3b 0xb06847 0xb18d67 0xb18911 0xb234f9 0xb24393 0xafaf7b 0x3940e81f 0x3941660f 0xafaeed 0xaff681 0xb7038b 0xd66c4 0x990a0 0x98af0 0x98a48 0x97130 0x96ca80 0x11ef79c 0x12918ac 0xce8f04 0xd935dc 0xd86b28 0xd1cb60 0xd1c720 0xd1cb0c 0xd59904 0xb86490 0xaaeb9c 0xaae98c 0x2e77a57 0x3086cdf3 0x3086cb9d 0x3360675d 0x2f06f451 0x2e343ea9 0x2e34ea67 0x2e34ea03 0x2e34d1d7 0x2e2b7ebf 0x2e2b7ca3 0x331de663 0x30c0414d 0x9369c 0x93578) libc++abi.dylib: terminating with uncaught exception of type NSException it's look like this error https://forums.developer.amazon.com/forums/thread.jspa?threadID=2081 I have tried solution what you said in the forums, but exception still exist. what should i do?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jianghuafan avatar image
jianghuafan answered
Occur at the time of click button Initialize Amazon GameCircle
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

DougM@Amazon avatar image
DougM@Amazon answered
Hello jianghuafan, You will need to make sure that the Xcode project that is produce with Unity has the appropriate APIKey in the project's Info.plist file. You may also want to reference our "Setting up your GameCircle Features in iOS" document for more details. https://developer.amazon.com/public/apis/engage/gamecircle/docs/setting-up-ios
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.