Making Box iOS SDK WebAPI and Google Analytics iOS SDK 2.0beta3 work together

2

Independently they work great.
Tried on device with iOS 5.1 and on iOS simulator 6.0. I get the following error when I try to use them together:


    2012-12-07 14:28:53.229 FotoInBox[1962:1cd03] Hit URL: http://www.google-analytics.com/collect
    2012-12-07 14:28:53.231 FotoInBox[1962:1cd03]     Method: POST
    2012-12-07 14:28:53.232 FotoInBox[1962:1cd03]     Header User-Agent: GoogleAnalytics/2.0b3 (iPad Simulator; U; CPU iPhone OS 6.0 like Mac OS X; en-us)
    2012-12-07 14:28:53.234 FotoInBox[1962:1cd03]     Header Content-Length: 184
    2012-12-07 14:28:53.235 FotoInBox[1962:1cd03]     Header Content-Type: application/x-www-form-urlencoded; charset=UTF-8
    2012-12-07 14:28:53.236 FotoInBox[1962:1cd03]     Body: ul=en&an=FotoInBox&_v=mi1b3&cid=b741b97680ae48fd332390dd54affa9e&sc=start&t=appview&sd=24-bit&sr=768x1024&cd=Main+screen&tid=UA-36820088-1&v=1&av=537&qt=11234484&z=10891977320669573255
    2012-12-07 14:28:53.566 FotoInBox[1962:1cd03] GoogleAnalytics 2.0b3 -[GAIDispatcher dispatchComplete:withStartTime:withRetryNumber:withResponse:withData:withError:] (GAIDispatcher.m:392) DEBUG: Hit /GAIHit/p3 dispatched (329ms): HTTP status 200
    2012-12-07 14:28:58.830 FotoInBox[1962:1cd03] CRASH: Object's persistent store is not reachable from this NSManagedObjectContext's coordinator
    2012-12-07 14:28:58.832 FotoInBox[1962:1cd03] Stack Trace: (
        0   CoreFoundation                      0x03b7a02e __exceptionPreprocess + 206
        1   libobjc.A.dylib                     0x02735e7e objc_exception_throw + 44
        2   CoreData                            0x00b884d2 _PFRetainedObjectIDCore + 658
        3   CoreData                            0x00b88230 -[NSManagedObjectContext(_NSInternalAdditions) _retainedObjectWithID:] + 32
        4   CoreData                            0x00b6c293 -[NSManagedObjectContext objectWithID:] + 275
        5   CoreData                            0x00b6ac86 -[NSManagedObjectContext _mergeChangesFromDidSaveDictionary:usingObjectIDs:] + 2662
        6   CoreData                            0x00b6a1de -[NSManagedObjectContext mergeChangesFromContextDidSaveNotification:] + 174
        7   FotoInBox                           0x000d99fc __50-[BoxCoreDataStore mergedUpdatesIntoQueryContext:]_block_invoke_0 + 67
        8   libdispatch.dylib                   0x04293014 _dispatch_client_callout + 14
        9   libdispatch.dylib                   0x04282d5f _dispatch_barrier_sync_f_invoke + 58
        10  libdispatch.dylib                   0x04282aa3 dispatch_barrier_sync_f + 108
        11  libdispatch.dylib                   0x04282e5e dispatch_sync + 45
        12  FotoInBox                           0x000dc2d2 -[BoxCoreDataStore dispatchBlock:onQueue:] + 47
        13  FotoInBox                           0x000dc255 -[BoxCoreDataStore dispatchBlockOnQueryQueue:] + 64
        14  FotoInBox                           0x000d99b1 -[BoxCoreDataStore mergedUpdatesIntoQueryContext:] + 138
        15  Foundation                          0x011a9dc9 __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_0 + 40
        16  CoreFoundation                      0x03bd40c5 ___CFXNotificationPost_block_invoke_0 + 85
        17  CoreFoundation                      0x03b2eefa _CFXNotificationPost + 2122
        18  Foundation                          0x010de482 -[NSNotificationCenter postNotificationName:object:userInfo:] + 98
        19  CoreData                            0x00b69150 -[NSManagedObjectContext(_NSInternalAdditions) _didSaveChanges] + 3008
        20  CoreData                            0x00b56639 -[NSManagedObjectContext save:] + 1353
        21  FotoInBox                           0x0053d479 -[GAIDataStore save:] + 137
        22  FotoInBox                           0x0054eee9 -[GAIDispatcher dispatchComplete:withStartTime:withRetryNumber:withResponse:withData:withError:] + 2441
        23  FotoInBox                           0x0054fc88 __46-[GAIDispatcher initiateDispatch:retryNumber:]_block_invoke_0 + 152
        24  FotoInBox                           0x00546f66 __47-[GAIURLConnection connectionDidFinishLoading:]_block_invoke_0 + 150
        25  libdispatch.dylib                   0x0428153f _dispatch_call_block_and_release + 15
        26  libdispatch.dylib                   0x04293014 _dispatch_client_callout + 14
        27  libdispatch.dylib                   0x042837d5 _dispatch_main_queue_callback_4CF + 296
        28  CoreFoundation                      0x03b20af5 __CFRunLoopRun + 1925
        29  CoreFoundation                      0x03b1ff44 CFRunLoopRunSpecific + 276
        30  CoreFoundation                      0x03b1fe1b CFRunLoopRunInMode + 123
        31  GraphicsServices                    0x033fb7e3 GSEventRunModal + 88
        32  GraphicsServices                    0x033fb668 GSEventRun + 104
        33  UIKit                               0x0198265c UIApplicationMain + 1211
        34  FotoInBox                           0x000021b9 main + 169
        35  FotoInBox                           0x000020c5 start + 53
    )
    2012-12-07 14:28:58.854 FotoInBox[1962:1cd03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Object's persistent store is not reachable from this NSManagedObjectContext's coordinator'
    *** First throw call stack:
    (0x3b7a012 0x2735e7e 0xb884d2 0xb88230 0xb6c293 0xb6ac86 0xb6a1de 0xd99fc 0x4293014 0x4282d5f 0x4282aa3 0x4282e5e 0xdc2d2 0xdc255 0xd99b1 0x11a9dc9 0x3bd40c5 0x3b2eefa 0x10de482 0xb69150 0xb56639 0x53d479 0x54eee9 0x54fc88 0x546f66 0x428153f 0x4293014 0x42837d5 0x3b20af5 0x3b1ff44 0x3b1fe1b 0x33fb7e3 0x33fb668 0x198265c 0x21b9 0x20c5)
    libc++abi.dylib: terminate called throwing an exception

ios
google-analytics
box-api
asked on Stack Overflow Dec 7, 2012 by dtrsan • edited Dec 7, 2012 by nevan king

1 Answer

1

The latest version of the framework has a fix for this and you shouldn't see any further issues: https://cloud.box.com/s/4atlh8kda0fialhrr7e8

answered on Stack Overflow Dec 12, 2012 by seanrose

User contributions licensed under CC BY-SA 3.0