{"action":"created","issue":{"url":"https://api.github.com/repos/robbiehanson/XMPPFramework/issues/577","labels_url":"https://api.github.com/repos/robbiehanson/XMPPFramework/issues/577/labels{/name}","comments_url":"https://api.github.com/repos/robbiehanson/XMPPFramework/issues/577/comments","events_url":"https://api.github.com/repos/robbiehanson/XMPPFramework/issues/577/events","html_url":"https://github.com/robbiehanson/XMPPFramework/issues/577","id":102352231,"number":577,"title":"Google Analytics and XMPP Framework are conflicting","user":{"login":"kapoorutd","id":6163203,"avatar_url":"https://avatars.githubusercontent.com/u/6163203?v=3","gravatar_id":"","url":"https://api.github.com/users/kapoorutd","html_url":"https://github.com/kapoorutd","followers_url":"https://api.github.com/users/kapoorutd/followers","following_url":"https://api.github.com/users/kapoorutd/following{/other_user}","gists_url":"https://api.github.com/users/kapoorutd/gists{/gist_id}","starred_url":"https://api.github.com/users/kapoorutd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kapoorutd/subscriptions","organizations_url":"https://api.github.com/users/kapoorutd/orgs","repos_url":"https://api.github.com/users/kapoorutd/repos","events_url":"https://api.github.com/users/kapoorutd/events{/privacy}","received_events_url":"https://api.github.com/users/kapoorutd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-21T10:53:35Z","updated_at":"2015-08-21T11:07:43Z","closed_at":null,"body":"Please read caution from google:\r\nhttps://developers.google.com/analytics/devguides/collection/ios/v3/sdk-download\r\n\r\nSame is done by us:\r\nhttps://github.com/robbiehanson/XMPPFramework/blob/master/Extensions/CoreDataStorage/XMPPCoreDataStorage.m\r\n\r\n// This code will cause a problem because it gets triggered on ANY NSManagedObjectContextDidSaveNotification.\r\n// (both your managed object contact and the one used by Google Analytics)\r\n[[NSNotificationCenter defaultCenter] addObserver:self \r\n                                      selector:@selector(managedObjectContextDidSave:) \r\n                                      name:NSManagedObjectContextDidSaveNotification \r\n                                      object:nil];\r\n\r\n// This code is safe and will only be trigger from the notification generated by your Managed Object Context.\r\n[[NSNotificationCenter defaultCenter] addObserver:self \r\n                                      selector:@selector(managedObjectContextDidSave:) \r\n                                      name:NSManagedObjectContextDidSaveNotification \r\n                                      object:myManagedObjectContext];\r\n\r\n\r\nI tried making this change but that created dispatch queue issue.\r\n\r\n(GAIBatchingDispatcher.m:632): Sending hit(s) POST: https://ssl.google-analytics.com/batch\r\n2015-08-21 16:05:53.510 Matchstix[579:37308] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invoked on incorrect queue'\r\n*** First throw call stack:\r\n(0x183abc2d8 0x1952e80e4 0x183abc198 0x184970ed4 0x1002a7b9c 0x1002a8240 0x1002ed324 0x1002e9d1c 0x1002e9c44 0x1002d1cdc 0x1002d17d4 0x100a08f94 0x100a09ea0 0x1002d1738 0x100234cc8 0x1002342b8 0x1000fba94 0x10016a470 0x100317a14 0x1000c6f9c 0x100a08fd4 0x100a08f94 0x100a0dc28 0x183a737f8 0x183a718a0 0x18399d2d4 0x18d1b36fc 0x188562fac 0x1002f97d0 0x195966a08)\r\nlibc++abi.dylib: terminating with uncaught exception of type NSException\r\n"},"comment":{"url":"https://api.github.com/repos/robbiehanson/XMPPFramework/issues/comments/133373856","html_url":"https://github.com/robbiehanson/XMPPFramework/issues/577#issuecomment-133373856","issue_url":"https://api.github.com/repos/robbiehanson/XMPPFramework/issues/577","id":133373856,"user":{"login":"kapoorutd","id":6163203,"avatar_url":"https://avatars.githubusercontent.com/u/6163203?v=3","gravatar_id":"","url":"https://api.github.com/users/kapoorutd","html_url":"https://github.com/kapoorutd","followers_url":"https://api.github.com/users/kapoorutd/followers","following_url":"https://api.github.com/users/kapoorutd/following{/other_user}","gists_url":"https://api.github.com/users/kapoorutd/gists{/gist_id}","starred_url":"https://api.github.com/users/kapoorutd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kapoorutd/subscriptions","organizations_url":"https://api.github.com/users/kapoorutd/orgs","repos_url":"https://api.github.com/users/kapoorutd/repos","events_url":"https://api.github.com/users/kapoorutd/events{/privacy}","received_events_url":"https://api.github.com/users/kapoorutd/received_events","type":"User","site_admin":false},"created_at":"2015-08-21T11:07:43Z","updated_at":"2015-08-21T11:07:43Z","body":"\tNSAssert(dispatch_get_specific(storageQueueTag), @\"Invoked on incorrect queue\"); Line 653 is causing this exception.. Sorry but not IOS developer hence unable to find it."}}