实施Google Analytics for ios后应用程序崩溃

时间:2015-05-25 11:15:46

标签: ios flash google-analytics air air-native-extension

我正在尝试实施适用于iOS的Google Analytics。我使用Adobe AIR并准备了准确的原生扩展。我关注了Google Analytics SDK for iOS v3 - 入门指南。我包括了适当的库和添加的行:

[GAI sharedInstance].trackUncaughtExceptions = YES;
[GAI sharedInstance].dispatchInterval = 20;
[[[GAI sharedInstance] logger] setLogLevel:kGAILogLevelVerbose];
[[GAI sharedInstance] trackerWithTrackingId:@" ... "];    

tracker = [[GAI sharedInstance] defaultTracker];

但是,当我构建项目时,应用程序似乎暂停了一会然后崩溃。

这是我得到的:

 kernel[0] <Notice>: xpcproxy[4393] Container: /private/var/mobile/Containers/Data/Application/469F984E-A997-4FA2-91FF-830D0D812BF4 (sandbox)
 locationd[56] <Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0
 My App[4393] <Warning>: fiksu interceptor->hooked)
 My App[4393] <Warning>:   [System Properties]  Application Delegate Init!!!! 
 SpringBoard[49] <Warning>: Forcing crash report of <FBApplicationProcess: 0x1279200c0; My App; pid: 4393> (reason: 1, description: my.package.MyApp failed to launch in time)
 ReportCrash[4394] <Error>: task_set_exception_ports(B07, 400, D03, 0, 0) failed with error (4: (os/kern) invalid argument)
 SpringBoard[49] <Warning>: Finished crash reporting.
 com.apple.xpc.launchd[1] (UIKitApplication:my.package.MyApp[0xf94c][4393]) <Notice>: Service exited due to signal: Killed: 9
 ReportCrash[4394] <Error>: Not saving crash log because we have reached the limit for logs to store on disk.  Sync or otherwise clear logs from /var/mobile/Library/Logs/CrashReporter to save new logs.
 ReportCrash[4394] <Error>: Could not save crash report to disk!
 ReportCrash[4394] <Error>: Incident Identifier: AD2E084B-2F16-4A3B-8F36-75454162E3CD
 ReportCrash[4394] <Error>: CrashReporter Key:   7438234ff505f3d0b33fdfde859716bfe1d8dcf5
 ReportCrash[4394] <Error>: Hardware Model:      iPhone6,2
 ReportCrash[4394] <Error>: Process:             My App [4393]
 ReportCrash[4394] <Error>: Path:                /private/var/mobile/Containers/Bundle/Application/A897B2AE-1C88-449D-85D8-302E16E69915/My App.app/My App
 ReportCrash[4394] <Error>: Identifier:          My App
 ReportCrash[4394] <Error>: Version:             ???
 ReportCrash[4394] <Error>: Code Type:           ARM-64 (Native)
 ReportCrash[4394] <Error>: Parent Process:      launchd [1]
 ReportCrash[4394] <Error>: Date/Time:           2015-05-25 12:52:18.566 +0200
 ReportCrash[4394] <Error>: Launch Time:         2015-05-25 12:51:58.025 +0200
 ReportCrash[4394] <Error>: OS Version:          iOS 8.1.1 (12B435)
 ReportCrash[4394] <Error>: Report Version:      105
 ReportCrash[4394] <Error>: Exception Type:  00000020
 ReportCrash[4394] <Error>: Exception Codes: 0x000000008badf00d
 ReportCrash[4394] <Error>: Highlighted Thread:  0
 ReportCrash[4394] <Error>: Application Specific Information:
 ReportCrash[4394] <Error>: my.package.MyApp failed to launch in time
 ReportCrash[4394] <Error>: Elapsed total CPU time (seconds): 14.590 (user 14.590, system 0.000), 36% CPU 
 ReportCrash[4394] <Error>: Elapsed application CPU time (seconds): 0.098, 0% CPU
 ReportCrash[4394] <Error>: Thread 0 name:  Dispatch queue: com.apple.main-thread
 ReportCrash[4394] <Error>: Thread 0:
 ReportCrash[4394] <Error>: 0   libsystem_kernel.dylib          0x000000019745ceb8 0x19745c000 + 3768
 ReportCrash[4394] <Error>: 1   libsystem_platform.dylib        0x00000001975099e0 0x197508000 + 6624
 ReportCrash[4394] <Error>: 2   libdispatch.dylib               0x000000019733e3e0 0x197334000 + 41952
 ReportCrash[4394] <Error>: 3   SystemConfiguration             0x000000018ad2fa74 0x18ad0c000 + 146036
 ReportCrash[4394] <Error>: 4   SystemConfiguration             0x000000018ad2e224 0x18ad0c000 + 139812
 ReportCrash[4394] <Error>: 5   SystemConfiguration             0x000000018ad2e124 0x18ad0c000 + 139556
 ReportCrash[4394] <Error>: 6   My App                          0x0000000101386e38 0x100044000 + 20196920
 ReportCrash[4394] <Error>: 7   My App                          0x000000010138e3f4 0x100044000 + 20227060
 ReportCrash[4394] <Error>: 8   My App                          0x0000000101391134 0x100044000 + 20238644
 ReportCrash[4394] <Error>: 9   My App                          0x000000010137c534 0x100044000 + 20153652
 ReportCrash[4394] <Error>: 10  My App                          0x000000010137ccc4 0x100044000 + 20155588
 ReportCrash[4394] <Error>: 11  My App                          0x000000010137c690 0x100044000 + 20154000
 ReportCrash[4394] <Error>: 12  My App                          0x000000010137c810 0x100044000 + 20154384
 ReportCrash[4394] <Error>: 13  My App                          0x0000000101371d28 0x100044000 + 20110632
 ReportCrash[4394] <Error>: 14  My App                          0x0000000101372d7c 0x100044000 + 20114812
 ReportCrash[4394] <Error>: 15  My App                          0x0000000101372d34 0x100044000 + 20114740
 ReportCrash[4394] <Error>: 16  My App                          0x0000000101372b90 0x100044000 + 20114320
 ReportCrash[4394] <Error>: 17  libdispatch.dylib               0x0000000197335368 0x197334000 + 4968
 ReportCrash[4394] <Error>: 18  libdispatch.dylib               0x0000000197336240 0x197334000 + 8768
 ReportCrash[4394] <Error>: 19  My App                          0x0000000101372b5c 0x100044000 + 20114268
 ReportCrash[4394] <Error>: 20  My App                          0x00000001013730d0 0x100044000 + 20115664
 ReportCrash[4394] <Error>: 21  libobjc.A.dylib                 0x0000000196cf1db4 0x196ce8000 + 40372
 ReportCrash[4394] <Error>: 22  libobjc.A.dylib                 0x0000000196cf2d18 0x196ce8000 + 44312
 ReportCrash[4394] <Error>: 23  dyld                            0x0000000120029e40 0x120028000 + 7744
 ReportCrash[4394] <Error>: 24  dyld                            0x00000001200355f4 0x120028000 + 54772
 ReportCrash[4394] <Error>: 25  dyld                            0x000000012003545c 0x120028000 + 54364
 ReportCrash[4394] <Error>: 26  dyld                            0x0000000120035724 0x120028000 + 55076
 ReportCrash[4394] <Error>: 27  dyld                            0x000000012002a150 0x120028000 + 8528
 ReportCrash[4394] <Error>: 28  dyld                            0x000000012002d87c 0x120028000 + 22652
 ReportCrash[4394] <Error>: 29  dyld                            0x0000000120029040 0x120028000 + 4160
 ReportCrash[4394] <Error>: Thread 1 name:  Dispatch queue: com.apple.libdispatch-manager
 ReportCrash[4394] <Error>: Thread 1:
 ReportCrash[4394] <Error>: 0   libsystem_kernel.dylib          0x000000019745cc94 0x19745c000 + 3220
 ReportCrash[4394] <Error>: 1   libdispatch.dylib               0x000000019734497c 0x197334000 + 67964
 ReportCrash[4394] <Error>: 2   libdispatch.dylib               0x00000001973373b0 0x197334000 + 13232
 ReportCrash[4394] <Error>: Thread 2 name:  Dispatch queue: com.apple.SCNetworkReachability.cellular_block
 ReportCrash[4394] <Error>: Thread 2:
 ReportCrash[4394] <Error>: 0   libsystem_kernel.dylib          0x00000001974770c0 0x19745c000 + 110784
 ReportCrash[4394] <Error>: 1   libsystem_pthread.dylib         0x0000000197511548 0x197510000 + 5448
 ReportCrash[4394] <Error>: 2   libobjc.A.dylib                 0x0000000196cf2c44 0x196ce8000 + 44100
 ReportCrash[4394] <Error>: 3   dyld                            0x0000000120029e40 0x120028000 + 7744
 ReportCrash[4394] <Error>: 4   dyld                            0x00000001200355f4 0x120028000 + 54772
 ReportCrash[4394] <Error>: 5   dyld                            0x000000012003545c 0x120028000 + 54364
 ReportCrash[4394] <Error>: 6   dyld                            0x0000000120035724 0x120028000 + 55076
 ReportCrash[4394] <Error>: 7   dyld                            0x000000012002cd34 0x120028000 + 19764
 ReportCrash[4394] <Error>: 8   dyld                            0x0000000120031fcc 0x120028000 + 40908
 ReportCrash[4394] <Error>: 9   libdyld.dylib                   0x000000019735db94 0x19735c000 + 7060
 ReportCrash[4394] <Error>: 10  SystemConfiguration             0x000000018ad3a7ec 0x18ad0c000 + 190444
 ReportCrash[4394] <Error>: 11  SystemConfiguration             0x000000018ad3a6e4 0x18ad0c000 + 190180
 ReportCrash[4394] <Error>: 12  SystemConfiguration             0x000000018ad30dc4 0x18ad0c000 + 150980
 ReportCrash[4394] <Error>: 13  libdispatch.dylib               0x0000000197335368 0x197334000 + 4968
 ReportCrash[4394] <Error>: 14  libdispatch.dylib               0x000000019733e6e4 0x197334000 + 42724
 ReportCrash[4394] <Error>: 15  SystemConfiguration             0x000000018ad2fa74 0x18ad0c000 + 146036
 ReportCrash[4394] <Error>: 16  SystemConfiguration             0x000000018ad2e224 0x18ad0c000 + 139812
 ReportCrash[4394] <Error>: 17  SystemConfiguration             0x000000018ad2ecb0 0x18ad0c000 + 142512
 ReportCrash[4394] <Error>: 18  My App                          0x00000001014612c8 0x100044000 + 21091016
 ReportCrash[4394] <Error>: 19  My App                          0x0000000101460e00 0x100044000 + 21089792
 ReportCrash[4394] <Error>: 20  libdispatch.dylib               0x0000000197335368 0x197334000 + 4968
 ReportCrash[4394] <Error>: 21  libdispatch.dylib               0x0000000197336240 0x197334000 + 8768
 ReportCrash[4394] <Error>: 22  My App                          0x0000000101460dcc 0x100044000 + 21089740
 ReportCrash[4394] <Error>: 23  My App                          0x000000010144e368 0x100044000 + 21013352
 ReportCrash[4394] <Error>: 24  libdispatch.dylib               0x00000001973353a8 0x197334000 + 5032
 ReportCrash[4394] <Error>: 25  libdispatch.dylib               0x0000000197335368 0x197334000 + 4968
 ReportCrash[4394] <Error>: 26  libdispatch.dylib               0x0000000197341408 0x197334000 + 54280
 ReportCrash[4394] <Error>: 27  libdispatch.dylib               0x0000000197342758 0x197334000 + 59224
 ReportCrash[4394] <Error>: 28  libsystem_pthread.dylib         0x00000001975112e0 0x197510000 + 4832
 ReportCrash[4394] <Error>: 29  libsystem_pthread.dylib         0x0000000197510fa4 0x197510000 + 4004
 ReportCrash[4394] <Error>: Thread 3 name:  GAIThread
 ReportCrash[4394] <Error>: Thread 3:
 ReportCrash[4394] <Error>: 0   libsystem_kernel.dylib          0x000000019745ce7c 0x19745c000 + 3708
 ReportCrash[4394] <Error>: 1   libsystem_kernel.dylib          0x000000019745ccf4 0x19745c000 + 3316
 ReportCrash[4394] <Error>: 2   CoreFoundation                  0x0000000186599ecc 0x1864bc000 + 909004
 ReportCrash[4394] <Error>: 3   CoreFoundation                  0x0000000186597e20 0x1864bc000 + 900640
 ReportCrash[4394] <Error>: 4   CoreFoundation                  0x00000001864c50a0 0x1864bc000 + 37024
 ReportCrash[4394] <Error>: 5   Foundation                      0x00000001873cd800 0x1873c0000 + 55296
 ReportCrash[4394] <Error>: 6   Foundation                      0x0000000187427ef4 0x1873c0000 + 425716
 ReportCrash[4394] <Error>: 7   My App                          0x000000010137cebc 0x100044000 + 20156092
 ReportCrash[4394] <Error>: 8   Foundation                      0x00000001874b5c08 0x1873c0000 + 1006600
 ReportCrash[4394] <Error>: 9   libsystem_pthread.dylib         0x0000000197513e7c 0x197510000 + 15996
 ReportCrash[4394] <Error>: 10  libsystem_pthread.dylib         0x0000000197513dd8 0x197510000 + 15832
 ReportCrash[4394] <Error>: 11  libsystem_pthread.dylib         0x0000000197510fac 0x197510000 + 4012
 ReportCrash[4394] <Error>: No thread state (register information) available
 ReportCrash[4394] <Error>: Binary Images:
 ReportCrash[4394] <Error>: 0x100044000 - 0x101b5bfff My App arm64  <a406816a1c7734699aa61cda39e077e8> /var/mobile/Containers/Bundle/Application/A897B2AE-1C88-449D-85D8-302E16E69915/My App.app/My App
 ReportCrash[4394] <Error>: 0x120028000 - 0x12004ffff dyld arm64  <36eff49275c23d2d815e48af33eea471> /usr/lib/dyld
 ReportCrash[4394] <Error>: 0x184dbc000 - 0x184f4ffff AVFoundation arm64  <c9cd60a62cfb3e77be72db6cd3062a09> /System/Library/Frameworks/AVFoundation.framework/AVFoundation
 ReportCrash[4394] <Error>: 0x184f50000 - 0x184fb4fff libAVFAudio.dylib arm64  <017d90360b443ae788ef31cfd73d17f6> /System/Library/Frameworks/AVFoundation.framework/libAVFAudio.dylib
 ReportCrash[4394] <Error>: 0x184ff8000 - 0x184ff8fff Accelerate arm64  <e9ba7838f51634a7b59ed392be50e86f> /System/Library/Frameworks/Accelerate.framework/Accelerate
 ReportCrash[4394] <Error>: 0x185010000 - 0x18522ffff vImage arm64  <da44067fc79931c7aef1b7e88bf82a83> /System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/vImage
 ReportCrash[4394] <Error>: 0x185230000 - 0x1852d7fff libBLAS.dylib arm64  <e5276e7784ef34a4baca480264978ea0> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libBLAS.dylib
 ReportCrash[4394] <Error>: 0x1852d8000 - 0x185652fff libLAPACK.dylib arm64  <165b05f9f75736d5ae8f5f39293bd6e7> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libLAPACK.dylib
 ReportCrash[4394] <Error>: 0x185654000 - 0x185669fff libLinearAlgebra.dylib arm64  <5574ec3bd4e537e1b662d38a63aec58b> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libLinearAlgebra.dylib
 ReportCrash[4394] <Error>: 0x18566c000 - 0x1856d4fff libvDSP.dylib arm64  <004f5668574139bc906c5fa4fdced3b1> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libvDSP.dylib
 ReportCrash[4394] <Error>: 0x1856d8000 - 0x1856fbfff libvMisc.dylib arm64  <5790e7ace143367ea6f2428852be384e> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libvMisc.dylib
 ReportCrash[4394] <Error>: 0x1856fc000 - 0x1856fcfff vecLib arm64  <211d7711a6e93fe8ae6d6b42585cad2d> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/vecLib

还有一些......

我不知道该怎么做。

1 个答案:

答案 0 :(得分:0)

看起来初始化代码执行得太早了。我把它作为ApplicationDelegate的init函数而不是didFinishLaunchingWithOptions。 我将代码移动到扩展上下文初始化函数,现在它可以工作了!