После открытия приложения на iPhone я его сразу закрываю. И приложение вылетает. Если я подожду 2-3 секунды, после закрытия не произойдет sh.
В редакторе Unity ошибки нет. В Xcode cra sh проблема связана с загрузкой UnityFramework ( output ).
#include <UnityFramework/UnityFramework.h>
UnityFramework* UnityFrameworkLoad()
{
NSString* bundlePath = nil;
bundlePath = [[NSBundle mainBundle] bundlePath];
bundlePath = [bundlePath stringByAppendingString: @"/Frameworks/UnityFramework.framework"];
NSBundle* bundle = [NSBundle bundleWithPath: bundlePath];
if ([bundle isLoaded] == false) [bundle load];
UnityFramework* ufw = [bundle.principalClass getInstance];
if (![ufw appController])
{
// unity is not initialized
[ufw setExecuteHeader: &_mh_execute_header];
}
return ufw;
}
int main(int argc, char* argv[])
{
@autoreleasepool
{
id ufw = UnityFrameworkLoad();
[ufw runUIApplicationMainWithArgc: argc argv: argv];
return 0;
}
}
Это ошибка на консоли Xcode:
2020-04-24 05:46:50.219480+0300 GAC[1680:232803] WF: _WebFilterIsActive returning: NO
2020-04-24 05:46:50.331662+0300 GAC[1680:232969] - <Google>[I-ACS012056] Transaction failed. Transaction failed
-> applicationDidEnterBackground()
2020-04-24 05:46:51.280178+0300 GAC[1680:232803] Uncaught exception: NSRangeException: *** -[__NSArrayM objectAtIndexedSubscript:]: index 0 beyond bounds for empty array
(
0 CoreFoundation 0x000000018f73c178 9624AAFD-5437-3772-A507-0F357875808D + 1253752
1 libobjc.A.dylib 0x000000018f450c1c objc_exception_throw + 60
2 CoreFoundation 0x000000018f7953a8 9624AAFD-5437-3772-A507-0F357875808D + 1618856
3 CoreFoundation 0x000000018f620460 9624AAFD-5437-3772-A507-0F357875808D + 91232
4 GameCenterUI 0x00000001b12a9734 495730EA-F4EC-3161-A9FF-DCFDA9045D49 + 780084
5 UnityFramework 0x0000000102814bd4 -[UnityAppController application:supportedInterfaceOrientationsForWindow:] + 100
6 UIKitCore 0x0000000193889d34 66C0BDEB-71CF-3148-AF27-A5B055FAD9A5 + 10947892
7 UIKitCore 0x000000019323536c 66C0BDEB-71CF-3148-AF27-A5B055FAD9A5 + 4309868
8 UIKitCore 0x0000000193226414 66C0BDEB-71CF-3148-AF27-A5B055FAD9A5 + 4248596
9 UIKitCore 0x00000001938c72c4 66C0BDEB-71CF-3148-AF27-A5B055FAD9A5 + 11199172
10 CoreFoundation 0x000000018f6941e0 9624AAFD-5437-3772-A507-0F357875808D + 565728
11 CoreFoundation 0x000000018f694230 9624AAFD-5437-3772-A507-0F357875808D + 565808
12 CoreFoundation 0x000000018f693520 9624AAFD-5437-3772-A507-0F357875808D + 562464
13 CoreFoundation 0x000000018f6931d4 9624AAFD-5437-3772-A507-0F357875808D + 561620
14 CoreFoundation 0x000000018f60c678 9624AAFD-5437-3772-A507-0F357875808D + 9848
15 CoreFoundation 0x000000018f692b14 _CFXNotificationPost + 1260
16 Foundation 0x000000018f9f9f2c 2B7BD2F3-10A8-3CBA-9DE3-5E1F48D9213E + 28460
17 UIKitCore 0x000000019387b04c 66C0BDEB-71CF-3148-AF27-A5B055FAD9A5 + 10887244
18 UIKitCore 0x0000000192ff713c 66C0BDEB-71CF-3148-AF27-A5B055FAD9A5 + 1958204
19 UIKitCore 0x0000000192ff74a0 66C0BDEB-71CF-3148-AF27-A5B055FAD9A5 + 1959072
20 UIKitCore 0x0000000192ff6d28 66C0BDEB-71CF-3148-AF27-A5B055FAD9A5 + 1957160
21 UIKitCore 0x0000000192e5ca7c 66C0BDEB-71CF-3148-AF27-A5B055FAD9A5 + 277116
22 UIKitCore 0x0000000193ad1b24 66C0BDEB-71CF-3148-AF27-A5B055FAD9A5 + 13339428
23 UIKitCore 0x0000000193882524 66C0BDEB-71CF-3148-AF27-A5B055FAD9A5 + 10917156
24 UIKitCore 0x0000000193406c68 66C0BDEB-71CF-3148-AF27-A5B055FAD9A5 + 6216808
25 FrontBoardServices 0x000000019499ce44 039FCB83-A7EC-3872-94E8-DD490434EAEB + 52804
26 FrontBoardServices 0x00000001949c44d8 039FCB83-A7EC-3872-94E8-DD490434EAEB + 214232
27 FrontBoardServices 0x00000001949a7aac 039FCB83-A7EC-3872-94E8-DD490434EAEB + 96940
28 FrontBoardServices 0x00000001949c4340 039FCB83-A7EC-3872-94E8-DD490434EAEB + 213824
29 libdispatch.dylib 0x000000018f3dc33c 783B1B75-5A87-3A6E-B723-5CAA2663C75F + 13116
30 libdispatch.dylib 0x000000018f3df0d4 783B1B75-5A87-3A6E-B723-5CAA2663C75F + 24788
31 FrontBoardServices 0x00000001949e92b4 039FCB83-A7EC-3872-94E8-DD490434EAEB + 365236
32 FrontBoardServices 0x00000001949e8f60 039FCB83-A7EC-3872-94E8-DD490434EAEB + 364384
33 FrontBoardServices 0x00000001949e94cc 039FCB83-A7EC-3872-94E8-DD490434EAEB + 365772
34 CoreFoundation 0x000000018f6b7860 9624AAFD-5437-3772-A507-0F357875808D + 710752
35 CoreFoundation 0x000000018f6b77b4 9624AAFD-5437-3772-A507-0F357875808D + 710580
36 CoreFoundation 0x000000018f6b6f04 9624AAFD-5437-3772-A507-0F357875808D + 708356
37 CoreFoundation 0x000000018f6b1ca4 9624AAFD-5437-3772-A507-0F357875808D + 687268
38 CoreFoundation 0x000000018f6b1660 CFRunLoopRunSpecific + 480
39 GraphicsServices 0x0000000199ac2604 GSEventRunModal + 164
40 UIKitCore 0x000000019388615c UIApplicationMain + 1944
41 UnityFramework 0x0000000102819dac -[UnityFramework runUIApplicationMainWithArgc:argv:] + 108
42 GAC 0x0000000100063e1c main + 68
43 libdyld.dylib 0x000000018f52d1ec 95B366E7-F5BD-3308-9416-24B35999029B + 4588
)
(lldb)
Итак, массив ufw пуст в начале.
Я уже пытался :
- Обновление версии Unity
- Обновление IAP, GPGS, Google AdMob SDK
- Создание пустой сцены в том же проекте (проблем нет)
Как решить проблему? Большое спасибо.