From 11b4aa2ac53f48361a312b5bbf851ab8c08b75a9 Mon Sep 17 00:00:00 2001 From: Chris Karr Date: Sun, 18 Jun 2017 16:12:06 -0500 Subject: [PATCH 01/13] Updating MixPanel dependency --- PassiveDataKit/Third-Party/mixpanel-iphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PassiveDataKit/Third-Party/mixpanel-iphone b/PassiveDataKit/Third-Party/mixpanel-iphone index c47c797..811a63d 160000 --- a/PassiveDataKit/Third-Party/mixpanel-iphone +++ b/PassiveDataKit/Third-Party/mixpanel-iphone @@ -1 +1 @@ -Subproject commit c47c7976bad80c22430e613b1df67235e5cf43bc +Subproject commit 811a63d245d23405529452af8eb38bcfed584fd7 From b95b02ed21002f247c59c07bd7493c61240d01ba Mon Sep 17 00:00:00 2001 From: Chris Karr Date: Sun, 18 Jun 2017 16:25:09 -0500 Subject: [PATCH 02/13] Updating Mixpanel import --- PassiveDataKit.xcodeproj/project.pbxproj | 734 +++-------------------- PassiveDataKit/PDKDataPointsManager.m | 2 +- 2 files changed, 91 insertions(+), 645 deletions(-) diff --git a/PassiveDataKit.xcodeproj/project.pbxproj b/PassiveDataKit.xcodeproj/project.pbxproj index a47e907..e157bcd 100644 --- a/PassiveDataKit.xcodeproj/project.pbxproj +++ b/PassiveDataKit.xcodeproj/project.pbxproj @@ -22,169 +22,13 @@ 3842F73C1CDA2021007F843D /* PassiveDataKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3842F7311CDA2021007F843D /* PassiveDataKit.framework */; }; 3842F7411CDA2021007F843D /* PassiveDataKitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3842F7401CDA2021007F843D /* PassiveDataKitTests.m */; }; 3842F7571CDA20FE007F843D /* PassiveDataKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 3842F7551CDA20FE007F843D /* PassiveDataKit.m */; }; - 387F99B31D1B8A8D007FA29A /* _MPTweakBindObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99131D1B8A8D007FA29A /* _MPTweakBindObserver.h */; }; - 387F99B41D1B8A8D007FA29A /* _MPTweakBindObserver.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99141D1B8A8D007FA29A /* _MPTweakBindObserver.m */; }; - 387F99B51D1B8A8D007FA29A /* AutomaticEventsConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99151D1B8A8D007FA29A /* AutomaticEventsConstants.h */; }; - 387F99B61D1B8A8D007FA29A /* MPArrowLeft.png in Resources */ = {isa = PBXBuildFile; fileRef = 387F99171D1B8A8D007FA29A /* MPArrowLeft.png */; }; - 387F99B71D1B8A8D007FA29A /* MPArrowLeft@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 387F99181D1B8A8D007FA29A /* MPArrowLeft@2x.png */; }; - 387F99B81D1B8A8D007FA29A /* MPArrowRight.png in Resources */ = {isa = PBXBuildFile; fileRef = 387F99191D1B8A8D007FA29A /* MPArrowRight.png */; }; - 387F99B91D1B8A8D007FA29A /* MPArrowRight@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 387F991A1D1B8A8D007FA29A /* MPArrowRight@2x.png */; }; - 387F99BA1D1B8A8D007FA29A /* MPCheckmark.png in Resources */ = {isa = PBXBuildFile; fileRef = 387F991B1D1B8A8D007FA29A /* MPCheckmark.png */; }; - 387F99BB1D1B8A8D007FA29A /* MPCheckmark@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 387F991C1D1B8A8D007FA29A /* MPCheckmark@2x.png */; }; - 387F99BC1D1B8A8D007FA29A /* MPCloseButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 387F991D1D1B8A8D007FA29A /* MPCloseButton.png */; }; - 387F99BD1D1B8A8D007FA29A /* MPCloseButton@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 387F991E1D1B8A8D007FA29A /* MPCloseButton@2x.png */; }; - 387F99BE1D1B8A8D007FA29A /* MPCloseButton@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 387F991F1D1B8A8D007FA29A /* MPCloseButton@3x.png */; }; - 387F99BF1D1B8A8D007FA29A /* MPDismissKeyboard.png in Resources */ = {isa = PBXBuildFile; fileRef = 387F99201D1B8A8D007FA29A /* MPDismissKeyboard.png */; }; - 387F99C01D1B8A8D007FA29A /* MPDismissKeyboard@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 387F99211D1B8A8D007FA29A /* MPDismissKeyboard@2x.png */; }; - 387F99C11D1B8A8D007FA29A /* MPLogo.png in Resources */ = {isa = PBXBuildFile; fileRef = 387F99221D1B8A8D007FA29A /* MPLogo.png */; }; - 387F99C21D1B8A8D007FA29A /* MPLogo@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 387F99231D1B8A8D007FA29A /* MPLogo@2x.png */; }; - 387F99C31D1B8A8D007FA29A /* Mixpanel+AutomaticEvents.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99241D1B8A8D007FA29A /* Mixpanel+AutomaticEvents.h */; }; - 387F99C41D1B8A8D007FA29A /* Mixpanel+AutomaticEvents.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99251D1B8A8D007FA29A /* Mixpanel+AutomaticEvents.m */; }; - 387F99C51D1B8A8D007FA29A /* Mixpanel+HostWatchOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99261D1B8A8D007FA29A /* Mixpanel+HostWatchOS.h */; }; - 387F99C61D1B8A8D007FA29A /* Mixpanel+HostWatchOS.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99271D1B8A8D007FA29A /* Mixpanel+HostWatchOS.m */; }; - 387F99C71D1B8A8D007FA29A /* Mixpanel.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99281D1B8A8D007FA29A /* Mixpanel.h */; }; - 387F99C81D1B8A8D007FA29A /* Mixpanel.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99291D1B8A8D007FA29A /* Mixpanel.m */; }; - 387F99C91D1B8A8D007FA29A /* MixpanelExceptionHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F992A1D1B8A8D007FA29A /* MixpanelExceptionHandler.h */; }; - 387F99CA1D1B8A8D007FA29A /* MixpanelExceptionHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F992B1D1B8A8D007FA29A /* MixpanelExceptionHandler.m */; }; - 387F99CB1D1B8A8D007FA29A /* MixpanelWatchOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F992C1D1B8A8D007FA29A /* MixpanelWatchOS.h */; }; - 387F99CC1D1B8A8D007FA29A /* MixpanelWatchOS.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F992D1D1B8A8D007FA29A /* MixpanelWatchOS.m */; }; - 387F99CD1D1B8A8D007FA29A /* MPAbstractABTestDesignerMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F992F1D1B8A8D007FA29A /* MPAbstractABTestDesignerMessage.h */; }; - 387F99CE1D1B8A8D007FA29A /* MPAbstractABTestDesignerMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99301D1B8A8D007FA29A /* MPAbstractABTestDesignerMessage.m */; }; - 387F99CF1D1B8A8D007FA29A /* MPABTestDesignerChangeRequestMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99311D1B8A8D007FA29A /* MPABTestDesignerChangeRequestMessage.h */; }; - 387F99D01D1B8A8D007FA29A /* MPABTestDesignerChangeRequestMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99321D1B8A8D007FA29A /* MPABTestDesignerChangeRequestMessage.m */; }; - 387F99D11D1B8A8D007FA29A /* MPABTestDesignerChangeResponseMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99331D1B8A8D007FA29A /* MPABTestDesignerChangeResponseMessage.h */; }; - 387F99D21D1B8A8D007FA29A /* MPABTestDesignerChangeResponseMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99341D1B8A8D007FA29A /* MPABTestDesignerChangeResponseMessage.m */; }; - 387F99D31D1B8A8D007FA29A /* MPABTestDesignerClearRequestMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99351D1B8A8D007FA29A /* MPABTestDesignerClearRequestMessage.h */; }; - 387F99D41D1B8A8D007FA29A /* MPABTestDesignerClearRequestMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99361D1B8A8D007FA29A /* MPABTestDesignerClearRequestMessage.m */; }; - 387F99D51D1B8A8D007FA29A /* MPABTestDesignerClearResponseMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99371D1B8A8D007FA29A /* MPABTestDesignerClearResponseMessage.h */; }; - 387F99D61D1B8A8D007FA29A /* MPABTestDesignerClearResponseMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99381D1B8A8D007FA29A /* MPABTestDesignerClearResponseMessage.m */; }; - 387F99D71D1B8A8D007FA29A /* MPABTestDesignerConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99391D1B8A8D007FA29A /* MPABTestDesignerConnection.h */; }; - 387F99D81D1B8A8D007FA29A /* MPABTestDesignerConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F993A1D1B8A8D007FA29A /* MPABTestDesignerConnection.m */; }; - 387F99D91D1B8A8D007FA29A /* MPABTestDesignerDeviceInfoRequestMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F993B1D1B8A8D007FA29A /* MPABTestDesignerDeviceInfoRequestMessage.h */; }; - 387F99DA1D1B8A8D007FA29A /* MPABTestDesignerDeviceInfoRequestMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F993C1D1B8A8D007FA29A /* MPABTestDesignerDeviceInfoRequestMessage.m */; }; - 387F99DB1D1B8A8D007FA29A /* MPABTestDesignerDeviceInfoResponseMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F993D1D1B8A8D007FA29A /* MPABTestDesignerDeviceInfoResponseMessage.h */; }; - 387F99DC1D1B8A8D007FA29A /* MPABTestDesignerDeviceInfoResponseMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F993E1D1B8A8D007FA29A /* MPABTestDesignerDeviceInfoResponseMessage.m */; }; - 387F99DD1D1B8A8D007FA29A /* MPABTestDesignerDisconnectMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F993F1D1B8A8D007FA29A /* MPABTestDesignerDisconnectMessage.h */; }; - 387F99DE1D1B8A8D007FA29A /* MPABTestDesignerDisconnectMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99401D1B8A8D007FA29A /* MPABTestDesignerDisconnectMessage.m */; }; - 387F99DF1D1B8A8D007FA29A /* MPABTestDesignerMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99411D1B8A8D007FA29A /* MPABTestDesignerMessage.h */; }; - 387F99E01D1B8A8D007FA29A /* MPABTestDesignerSnapshotRequestMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99421D1B8A8D007FA29A /* MPABTestDesignerSnapshotRequestMessage.h */; }; - 387F99E11D1B8A8D007FA29A /* MPABTestDesignerSnapshotRequestMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99431D1B8A8D007FA29A /* MPABTestDesignerSnapshotRequestMessage.m */; }; - 387F99E21D1B8A8D007FA29A /* MPABTestDesignerSnapshotResponseMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99441D1B8A8D007FA29A /* MPABTestDesignerSnapshotResponseMessage.h */; }; - 387F99E31D1B8A8D007FA29A /* MPABTestDesignerSnapshotResponseMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99451D1B8A8D007FA29A /* MPABTestDesignerSnapshotResponseMessage.m */; }; - 387F99E41D1B8A8D007FA29A /* MPABTestDesignerTweakRequestMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99461D1B8A8D007FA29A /* MPABTestDesignerTweakRequestMessage.h */; }; - 387F99E51D1B8A8D007FA29A /* MPABTestDesignerTweakRequestMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99471D1B8A8D007FA29A /* MPABTestDesignerTweakRequestMessage.m */; }; - 387F99E61D1B8A8D007FA29A /* MPABTestDesignerTweakResponseMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99481D1B8A8D007FA29A /* MPABTestDesignerTweakResponseMessage.h */; }; - 387F99E71D1B8A8D007FA29A /* MPABTestDesignerTweakResponseMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99491D1B8A8D007FA29A /* MPABTestDesignerTweakResponseMessage.m */; }; - 387F99E81D1B8A8D007FA29A /* MPApplicationStateSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F994A1D1B8A8D007FA29A /* MPApplicationStateSerializer.h */; }; - 387F99E91D1B8A8D007FA29A /* MPApplicationStateSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F994B1D1B8A8D007FA29A /* MPApplicationStateSerializer.m */; }; - 387F99EA1D1B8A8D007FA29A /* MPBOOLToNSNumberValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F994C1D1B8A8D007FA29A /* MPBOOLToNSNumberValueTransformer.m */; }; - 387F99EB1D1B8A8D007FA29A /* MPCATransform3DToNSDictionaryValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F994D1D1B8A8D007FA29A /* MPCATransform3DToNSDictionaryValueTransformer.m */; }; - 387F99EC1D1B8A8D007FA29A /* MPCGAffineTransformToNSDictionaryValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F994E1D1B8A8D007FA29A /* MPCGAffineTransformToNSDictionaryValueTransformer.m */; }; - 387F99ED1D1B8A8D007FA29A /* MPCGColorRefToNSStringValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F994F1D1B8A8D007FA29A /* MPCGColorRefToNSStringValueTransformer.m */; }; - 387F99EE1D1B8A8D007FA29A /* MPCGPointToNSDictionaryValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99501D1B8A8D007FA29A /* MPCGPointToNSDictionaryValueTransformer.m */; }; - 387F99EF1D1B8A8D007FA29A /* MPCGRectToNSDictionaryValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99511D1B8A8D007FA29A /* MPCGRectToNSDictionaryValueTransformer.m */; }; - 387F99F01D1B8A8D007FA29A /* MPCGSizeToNSDictionaryValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99521D1B8A8D007FA29A /* MPCGSizeToNSDictionaryValueTransformer.m */; }; - 387F99F11D1B8A8D007FA29A /* MPClassDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99531D1B8A8D007FA29A /* MPClassDescription.h */; }; - 387F99F21D1B8A8D007FA29A /* MPClassDescription.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99541D1B8A8D007FA29A /* MPClassDescription.m */; }; - 387F99F31D1B8A8D007FA29A /* MPDesignerEventBindingMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99551D1B8A8D007FA29A /* MPDesignerEventBindingMessage.h */; }; - 387F99F41D1B8A8D007FA29A /* MPDesignerEventBindingRequestMesssage.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99561D1B8A8D007FA29A /* MPDesignerEventBindingRequestMesssage.m */; }; - 387F99F51D1B8A8D007FA29A /* MPDesignerEventBindingResponseMesssage.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99571D1B8A8D007FA29A /* MPDesignerEventBindingResponseMesssage.m */; }; - 387F99F61D1B8A8D007FA29A /* MPDesignerSessionCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99581D1B8A8D007FA29A /* MPDesignerSessionCollection.h */; }; - 387F99F71D1B8A8D007FA29A /* MPDesignerTrackMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99591D1B8A8D007FA29A /* MPDesignerTrackMessage.m */; }; - 387F99F81D1B8A8D007FA29A /* MPEnumDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F995A1D1B8A8D007FA29A /* MPEnumDescription.h */; }; - 387F99F91D1B8A8D007FA29A /* MPEnumDescription.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F995B1D1B8A8D007FA29A /* MPEnumDescription.m */; }; - 387F99FA1D1B8A8D007FA29A /* MPEventBinding.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F995C1D1B8A8D007FA29A /* MPEventBinding.h */; }; - 387F99FB1D1B8A8D007FA29A /* MPEventBinding.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F995D1D1B8A8D007FA29A /* MPEventBinding.m */; }; - 387F99FC1D1B8A8D007FA29A /* MPFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F995E1D1B8A8D007FA29A /* MPFoundation.h */; }; - 387F99FD1D1B8A8D007FA29A /* MPLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F995F1D1B8A8D007FA29A /* MPLogger.h */; }; - 387F99FE1D1B8A8D007FA29A /* MPNotification.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99601D1B8A8D007FA29A /* MPNotification.h */; }; - 387F99FF1D1B8A8D007FA29A /* MPNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99611D1B8A8D007FA29A /* MPNotification.m */; }; - 387F9A001D1B8A8D007FA29A /* MPNotificationViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99621D1B8A8D007FA29A /* MPNotificationViewController.h */; }; - 387F9A011D1B8A8D007FA29A /* MPNotificationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99631D1B8A8D007FA29A /* MPNotificationViewController.m */; }; - 387F9A021D1B8A8D007FA29A /* MPNotification~ipad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 387F99641D1B8A8D007FA29A /* MPNotification~ipad.storyboard */; }; - 387F9A031D1B8A8D007FA29A /* MPNotification~iphonelandscape.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 387F99651D1B8A8D007FA29A /* MPNotification~iphonelandscape.storyboard */; }; - 387F9A041D1B8A8D007FA29A /* MPNotification~iphoneportrait.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 387F99661D1B8A8D007FA29A /* MPNotification~iphoneportrait.storyboard */; }; - 387F9A051D1B8A8D007FA29A /* MPNSAttributedStringToNSDictionaryValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99671D1B8A8D007FA29A /* MPNSAttributedStringToNSDictionaryValueTransformer.m */; }; - 387F9A061D1B8A8D007FA29A /* MPNSNumberToCGFloatValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99681D1B8A8D007FA29A /* MPNSNumberToCGFloatValueTransformer.m */; }; - 387F9A071D1B8A8D007FA29A /* MPObjectIdentifierProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99691D1B8A8D007FA29A /* MPObjectIdentifierProvider.h */; }; - 387F9A081D1B8A8D007FA29A /* MPObjectIdentityProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F996A1D1B8A8D007FA29A /* MPObjectIdentityProvider.h */; }; - 387F9A091D1B8A8D007FA29A /* MPObjectIdentityProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F996B1D1B8A8D007FA29A /* MPObjectIdentityProvider.m */; }; - 387F9A0A1D1B8A8D007FA29A /* MPObjectSelector.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F996C1D1B8A8D007FA29A /* MPObjectSelector.h */; }; - 387F9A0B1D1B8A8D007FA29A /* MPObjectSelector.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F996D1D1B8A8D007FA29A /* MPObjectSelector.m */; }; - 387F9A0C1D1B8A8D007FA29A /* MPObjectSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F996E1D1B8A8D007FA29A /* MPObjectSerializer.h */; }; - 387F9A0D1D1B8A8D007FA29A /* MPObjectSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F996F1D1B8A8D007FA29A /* MPObjectSerializer.m */; }; - 387F9A0E1D1B8A8D007FA29A /* MPObjectSerializerConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99701D1B8A8D007FA29A /* MPObjectSerializerConfig.h */; }; - 387F9A0F1D1B8A8D007FA29A /* MPObjectSerializerConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99711D1B8A8D007FA29A /* MPObjectSerializerConfig.m */; }; - 387F9A101D1B8A8D007FA29A /* MPObjectSerializerContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99721D1B8A8D007FA29A /* MPObjectSerializerContext.h */; }; - 387F9A111D1B8A8D007FA29A /* MPObjectSerializerContext.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99731D1B8A8D007FA29A /* MPObjectSerializerContext.m */; }; - 387F9A121D1B8A8D007FA29A /* MPPassThroughValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99741D1B8A8D007FA29A /* MPPassThroughValueTransformer.m */; }; - 387F9A131D1B8A8D007FA29A /* MPPropertyDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99751D1B8A8D007FA29A /* MPPropertyDescription.h */; }; - 387F9A141D1B8A8D007FA29A /* MPPropertyDescription.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99761D1B8A8D007FA29A /* MPPropertyDescription.m */; }; - 387F9A151D1B8A8D007FA29A /* MPResources.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99771D1B8A8D007FA29A /* MPResources.h */; }; - 387F9A161D1B8A8D007FA29A /* MPResources.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99781D1B8A8D007FA29A /* MPResources.m */; }; - 387F9A171D1B8A8D007FA29A /* MPSequenceGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99791D1B8A8D007FA29A /* MPSequenceGenerator.h */; }; - 387F9A181D1B8A8D007FA29A /* MPSequenceGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F997A1D1B8A8D007FA29A /* MPSequenceGenerator.m */; }; - 387F9A191D1B8A8D007FA29A /* MPSurvey.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F997B1D1B8A8D007FA29A /* MPSurvey.h */; }; - 387F9A1A1D1B8A8D007FA29A /* MPSurvey.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F997C1D1B8A8D007FA29A /* MPSurvey.m */; }; - 387F9A1B1D1B8A8D007FA29A /* MPSurvey.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 387F997D1D1B8A8D007FA29A /* MPSurvey.storyboard */; }; - 387F9A1C1D1B8A8D007FA29A /* MPSurveyNavigationController.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F997E1D1B8A8D007FA29A /* MPSurveyNavigationController.h */; }; - 387F9A1D1D1B8A8D007FA29A /* MPSurveyNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F997F1D1B8A8D007FA29A /* MPSurveyNavigationController.m */; }; - 387F9A1E1D1B8A8D007FA29A /* MPSurveyQuestion.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99801D1B8A8D007FA29A /* MPSurveyQuestion.h */; }; - 387F9A1F1D1B8A8D007FA29A /* MPSurveyQuestion.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99811D1B8A8D007FA29A /* MPSurveyQuestion.m */; }; - 387F9A201D1B8A8D007FA29A /* MPSurveyQuestionViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99821D1B8A8D007FA29A /* MPSurveyQuestionViewController.h */; }; - 387F9A211D1B8A8D007FA29A /* MPSurveyQuestionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99831D1B8A8D007FA29A /* MPSurveyQuestionViewController.m */; }; - 387F9A221D1B8A8D007FA29A /* MPSwizzle.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99841D1B8A8D007FA29A /* MPSwizzle.h */; }; - 387F9A231D1B8A8D007FA29A /* MPSwizzle.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99851D1B8A8D007FA29A /* MPSwizzle.m */; }; - 387F9A241D1B8A8D007FA29A /* MPSwizzler.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99861D1B8A8D007FA29A /* MPSwizzler.h */; }; - 387F9A251D1B8A8D007FA29A /* MPSwizzler.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99871D1B8A8D007FA29A /* MPSwizzler.m */; }; - 387F9A261D1B8A8D007FA29A /* MPTweak.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99881D1B8A8D007FA29A /* MPTweak.h */; }; - 387F9A271D1B8A8D007FA29A /* MPTweak.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99891D1B8A8D007FA29A /* MPTweak.m */; }; - 387F9A281D1B8A8D007FA29A /* MPTweakInline.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F998A1D1B8A8D007FA29A /* MPTweakInline.h */; }; - 387F9A291D1B8A8D007FA29A /* MPTweakInline.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F998B1D1B8A8D007FA29A /* MPTweakInline.m */; }; - 387F9A2A1D1B8A8D007FA29A /* MPTweakInlineInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F998C1D1B8A8D007FA29A /* MPTweakInlineInternal.h */; }; - 387F9A2B1D1B8A8D007FA29A /* MPTweakStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F998D1D1B8A8D007FA29A /* MPTweakStore.h */; }; - 387F9A2C1D1B8A8D007FA29A /* MPTweakStore.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F998E1D1B8A8D007FA29A /* MPTweakStore.m */; }; - 387F9A2D1D1B8A8D007FA29A /* MPTypeDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F998F1D1B8A8D007FA29A /* MPTypeDescription.h */; }; - 387F9A2E1D1B8A8D007FA29A /* MPTypeDescription.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99901D1B8A8D007FA29A /* MPTypeDescription.m */; }; - 387F9A2F1D1B8A8D007FA29A /* MPUIColorToNSStringValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99911D1B8A8D007FA29A /* MPUIColorToNSStringValueTransformer.m */; }; - 387F9A301D1B8A8D007FA29A /* MPUIControlBinding.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99921D1B8A8D007FA29A /* MPUIControlBinding.h */; }; - 387F9A311D1B8A8D007FA29A /* MPUIControlBinding.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99931D1B8A8D007FA29A /* MPUIControlBinding.m */; }; - 387F9A321D1B8A8D007FA29A /* MPUIEdgeInsetsToNSDictionaryValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99941D1B8A8D007FA29A /* MPUIEdgeInsetsToNSDictionaryValueTransformer.m */; }; - 387F9A331D1B8A8D007FA29A /* MPUIFontToNSDictionaryValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99951D1B8A8D007FA29A /* MPUIFontToNSDictionaryValueTransformer.m */; }; - 387F9A341D1B8A8D007FA29A /* MPUIImageToNSDictionaryValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99961D1B8A8D007FA29A /* MPUIImageToNSDictionaryValueTransformer.m */; }; - 387F9A351D1B8A8D007FA29A /* MPUITableViewBinding.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99971D1B8A8D007FA29A /* MPUITableViewBinding.h */; }; - 387F9A361D1B8A8D007FA29A /* MPUITableViewBinding.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99981D1B8A8D007FA29A /* MPUITableViewBinding.m */; }; - 387F9A371D1B8A8D007FA29A /* MPValueTransformers.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99991D1B8A8D007FA29A /* MPValueTransformers.h */; }; - 387F9A381D1B8A8D007FA29A /* MPVariant.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F999A1D1B8A8D007FA29A /* MPVariant.h */; }; - 387F9A391D1B8A8D007FA29A /* MPVariant.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F999B1D1B8A8D007FA29A /* MPVariant.m */; }; - 387F9A3A1D1B8A8D007FA29A /* MPWebSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F999C1D1B8A8D007FA29A /* MPWebSocket.h */; }; - 387F9A3B1D1B8A8D007FA29A /* MPWebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F999D1D1B8A8D007FA29A /* MPWebSocket.m */; }; - 387F9A3C1D1B8A8D007FA29A /* NSData+MPBase64.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F999E1D1B8A8D007FA29A /* NSData+MPBase64.h */; }; - 387F9A3D1D1B8A8D007FA29A /* NSData+MPBase64.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F999F1D1B8A8D007FA29A /* NSData+MPBase64.m */; }; - 387F9A3E1D1B8A8D007FA29A /* NSInvocation+MPHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99A01D1B8A8D007FA29A /* NSInvocation+MPHelpers.h */; }; - 387F9A3F1D1B8A8D007FA29A /* NSInvocation+MPHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99A11D1B8A8D007FA29A /* NSInvocation+MPHelpers.m */; }; - 387F9A401D1B8A8D007FA29A /* NSNotificationCenter+AutomaticEvents.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99A21D1B8A8D007FA29A /* NSNotificationCenter+AutomaticEvents.h */; }; - 387F9A411D1B8A8D007FA29A /* NSNotificationCenter+AutomaticEvents.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99A31D1B8A8D007FA29A /* NSNotificationCenter+AutomaticEvents.m */; }; - 387F9A421D1B8A8D007FA29A /* snapshot_config.json in Resources */ = {isa = PBXBuildFile; fileRef = 387F99A41D1B8A8D007FA29A /* snapshot_config.json */; }; - 387F9A431D1B8A8D007FA29A /* test_variant.json in Resources */ = {isa = PBXBuildFile; fileRef = 387F99A51D1B8A8D007FA29A /* test_variant.json */; }; - 387F9A441D1B8A8D007FA29A /* UIApplication+AutomaticEvents.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99A61D1B8A8D007FA29A /* UIApplication+AutomaticEvents.h */; }; - 387F9A451D1B8A8D007FA29A /* UIApplication+AutomaticEvents.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99A71D1B8A8D007FA29A /* UIApplication+AutomaticEvents.m */; }; - 387F9A461D1B8A8D007FA29A /* UIColor+MPColor.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99A81D1B8A8D007FA29A /* UIColor+MPColor.h */; }; - 387F9A471D1B8A8D007FA29A /* UIColor+MPColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99A91D1B8A8D007FA29A /* UIColor+MPColor.m */; }; - 387F9A481D1B8A8D007FA29A /* UIImage+MPAverageColor.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99AA1D1B8A8D007FA29A /* UIImage+MPAverageColor.h */; }; - 387F9A491D1B8A8D007FA29A /* UIImage+MPAverageColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99AB1D1B8A8D007FA29A /* UIImage+MPAverageColor.m */; }; - 387F9A4A1D1B8A8D007FA29A /* UIImage+MPImageEffects.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99AC1D1B8A8D007FA29A /* UIImage+MPImageEffects.h */; }; - 387F9A4B1D1B8A8D007FA29A /* UIImage+MPImageEffects.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99AD1D1B8A8D007FA29A /* UIImage+MPImageEffects.m */; }; - 387F9A4C1D1B8A8D007FA29A /* UIView+MPHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99AE1D1B8A8D007FA29A /* UIView+MPHelpers.h */; }; - 387F9A4D1D1B8A8D007FA29A /* UIView+MPHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99AF1D1B8A8D007FA29A /* UIView+MPHelpers.m */; }; - 387F9A4E1D1B8A8D007FA29A /* UIViewController+AutomaticEvents.h in Headers */ = {isa = PBXBuildFile; fileRef = 387F99B01D1B8A8D007FA29A /* UIViewController+AutomaticEvents.h */; }; - 387F9A4F1D1B8A8D007FA29A /* UIViewController+AutomaticEvents.m in Sources */ = {isa = PBXBuildFile; fileRef = 387F99B11D1B8A8D007FA29A /* UIViewController+AutomaticEvents.m */; }; 387F9A511D1B8ACD007FA29A /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 387F9A501D1B8ACD007FA29A /* SystemConfiguration.framework */; }; 387F9A531D1B8AD7007FA29A /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 387F9A521D1B8AD7007FA29A /* CoreTelephony.framework */; }; 387F9A551D1B8ADE007FA29A /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 387F9A541D1B8ADE007FA29A /* Accelerate.framework */; }; 387F9A571D1B8AF3007FA29A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 387F9A561D1B8AF3007FA29A /* CoreGraphics.framework */; }; 387F9A591D1B8AF9007FA29A /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 387F9A581D1B8AF9007FA29A /* QuartzCore.framework */; }; 387F9A5C1D1B8E32007FA29A /* libicucore.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 387F9A5B1D1B8E32007FA29A /* libicucore.tbd */; }; + 389DE4BC1EF726BB009C8B27 /* Mixpanel.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 389DE4B31EF726B2009C8B27 /* Mixpanel.framework */; }; 38A6523C1CDA2D9B00AE8B3B /* PDKLocationGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 38A6523A1CDA2D9B00AE8B3B /* PDKLocationGenerator.h */; }; 38A6523D1CDA2D9B00AE8B3B /* PDKLocationGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 38A6523B1CDA2D9B00AE8B3B /* PDKLocationGenerator.m */; }; 38A652431CDA30DB00AE8B3B /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 38A652421CDA30DB00AE8B3B /* CoreLocation.framework */; }; @@ -240,6 +84,41 @@ remoteGlobalIDString = 3842F7301CDA2021007F843D; remoteInfo = PassiveDataKit; }; + 389DE4B21EF726B2009C8B27 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 389DE4AA1EF726B2009C8B27 /* Mixpanel.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 7C170C2A1A4A02F500D9E0F2; + remoteInfo = Mixpanel; + }; + 389DE4B41EF726B2009C8B27 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 389DE4AA1EF726B2009C8B27 /* Mixpanel.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 511FC39D1C2B74BD00DC4796; + remoteInfo = Mixpanel_watchOS; + }; + 389DE4B61EF726B2009C8B27 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 389DE4AA1EF726B2009C8B27 /* Mixpanel.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 513B0BB61C73CA35008EEE6E; + remoteInfo = MixpanelAppExtension; + }; + 389DE4B81EF726B2009C8B27 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 389DE4AA1EF726B2009C8B27 /* Mixpanel.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = E1C2BEB61CFD6A010052172F; + remoteInfo = Mixpanel_tvOS; + }; + 389DE4BA1EF726B2009C8B27 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 389DE4AA1EF726B2009C8B27 /* Mixpanel.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = E1F160B01E677D2200391AE3; + remoteInfo = Mixpanel_macOS; + }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ @@ -261,171 +140,13 @@ 3842F7401CDA2021007F843D /* PassiveDataKitTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PassiveDataKitTests.m; sourceTree = ""; }; 3842F7421CDA2021007F843D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 3842F7551CDA20FE007F843D /* PassiveDataKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PassiveDataKit.m; sourceTree = ""; }; - 387F99131D1B8A8D007FA29A /* _MPTweakBindObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _MPTweakBindObserver.h; sourceTree = ""; }; - 387F99141D1B8A8D007FA29A /* _MPTweakBindObserver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _MPTweakBindObserver.m; sourceTree = ""; }; - 387F99151D1B8A8D007FA29A /* AutomaticEventsConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AutomaticEventsConstants.h; sourceTree = ""; }; - 387F99171D1B8A8D007FA29A /* MPArrowLeft.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = MPArrowLeft.png; sourceTree = ""; }; - 387F99181D1B8A8D007FA29A /* MPArrowLeft@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPArrowLeft@2x.png"; sourceTree = ""; }; - 387F99191D1B8A8D007FA29A /* MPArrowRight.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = MPArrowRight.png; sourceTree = ""; }; - 387F991A1D1B8A8D007FA29A /* MPArrowRight@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPArrowRight@2x.png"; sourceTree = ""; }; - 387F991B1D1B8A8D007FA29A /* MPCheckmark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = MPCheckmark.png; sourceTree = ""; }; - 387F991C1D1B8A8D007FA29A /* MPCheckmark@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPCheckmark@2x.png"; sourceTree = ""; }; - 387F991D1D1B8A8D007FA29A /* MPCloseButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = MPCloseButton.png; sourceTree = ""; }; - 387F991E1D1B8A8D007FA29A /* MPCloseButton@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPCloseButton@2x.png"; sourceTree = ""; }; - 387F991F1D1B8A8D007FA29A /* MPCloseButton@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPCloseButton@3x.png"; sourceTree = ""; }; - 387F99201D1B8A8D007FA29A /* MPDismissKeyboard.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = MPDismissKeyboard.png; sourceTree = ""; }; - 387F99211D1B8A8D007FA29A /* MPDismissKeyboard@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPDismissKeyboard@2x.png"; sourceTree = ""; }; - 387F99221D1B8A8D007FA29A /* MPLogo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = MPLogo.png; sourceTree = ""; }; - 387F99231D1B8A8D007FA29A /* MPLogo@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPLogo@2x.png"; sourceTree = ""; }; - 387F99241D1B8A8D007FA29A /* Mixpanel+AutomaticEvents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Mixpanel+AutomaticEvents.h"; sourceTree = ""; }; - 387F99251D1B8A8D007FA29A /* Mixpanel+AutomaticEvents.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Mixpanel+AutomaticEvents.m"; sourceTree = ""; }; - 387F99261D1B8A8D007FA29A /* Mixpanel+HostWatchOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Mixpanel+HostWatchOS.h"; sourceTree = ""; }; - 387F99271D1B8A8D007FA29A /* Mixpanel+HostWatchOS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Mixpanel+HostWatchOS.m"; sourceTree = ""; }; - 387F99281D1B8A8D007FA29A /* Mixpanel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Mixpanel.h; sourceTree = ""; }; - 387F99291D1B8A8D007FA29A /* Mixpanel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Mixpanel.m; sourceTree = ""; }; - 387F992A1D1B8A8D007FA29A /* MixpanelExceptionHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MixpanelExceptionHandler.h; sourceTree = ""; }; - 387F992B1D1B8A8D007FA29A /* MixpanelExceptionHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MixpanelExceptionHandler.m; sourceTree = ""; }; - 387F992C1D1B8A8D007FA29A /* MixpanelWatchOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MixpanelWatchOS.h; sourceTree = ""; }; - 387F992D1D1B8A8D007FA29A /* MixpanelWatchOS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MixpanelWatchOS.m; sourceTree = ""; }; - 387F992E1D1B8A8D007FA29A /* module.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = ""; }; - 387F992F1D1B8A8D007FA29A /* MPAbstractABTestDesignerMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAbstractABTestDesignerMessage.h; sourceTree = ""; }; - 387F99301D1B8A8D007FA29A /* MPAbstractABTestDesignerMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAbstractABTestDesignerMessage.m; sourceTree = ""; }; - 387F99311D1B8A8D007FA29A /* MPABTestDesignerChangeRequestMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPABTestDesignerChangeRequestMessage.h; sourceTree = ""; }; - 387F99321D1B8A8D007FA29A /* MPABTestDesignerChangeRequestMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPABTestDesignerChangeRequestMessage.m; sourceTree = ""; }; - 387F99331D1B8A8D007FA29A /* MPABTestDesignerChangeResponseMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPABTestDesignerChangeResponseMessage.h; sourceTree = ""; }; - 387F99341D1B8A8D007FA29A /* MPABTestDesignerChangeResponseMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPABTestDesignerChangeResponseMessage.m; sourceTree = ""; }; - 387F99351D1B8A8D007FA29A /* MPABTestDesignerClearRequestMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPABTestDesignerClearRequestMessage.h; sourceTree = ""; }; - 387F99361D1B8A8D007FA29A /* MPABTestDesignerClearRequestMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPABTestDesignerClearRequestMessage.m; sourceTree = ""; }; - 387F99371D1B8A8D007FA29A /* MPABTestDesignerClearResponseMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPABTestDesignerClearResponseMessage.h; sourceTree = ""; }; - 387F99381D1B8A8D007FA29A /* MPABTestDesignerClearResponseMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPABTestDesignerClearResponseMessage.m; sourceTree = ""; }; - 387F99391D1B8A8D007FA29A /* MPABTestDesignerConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPABTestDesignerConnection.h; sourceTree = ""; }; - 387F993A1D1B8A8D007FA29A /* MPABTestDesignerConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPABTestDesignerConnection.m; sourceTree = ""; }; - 387F993B1D1B8A8D007FA29A /* MPABTestDesignerDeviceInfoRequestMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPABTestDesignerDeviceInfoRequestMessage.h; sourceTree = ""; }; - 387F993C1D1B8A8D007FA29A /* MPABTestDesignerDeviceInfoRequestMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPABTestDesignerDeviceInfoRequestMessage.m; sourceTree = ""; }; - 387F993D1D1B8A8D007FA29A /* MPABTestDesignerDeviceInfoResponseMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPABTestDesignerDeviceInfoResponseMessage.h; sourceTree = ""; }; - 387F993E1D1B8A8D007FA29A /* MPABTestDesignerDeviceInfoResponseMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPABTestDesignerDeviceInfoResponseMessage.m; sourceTree = ""; }; - 387F993F1D1B8A8D007FA29A /* MPABTestDesignerDisconnectMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPABTestDesignerDisconnectMessage.h; sourceTree = ""; }; - 387F99401D1B8A8D007FA29A /* MPABTestDesignerDisconnectMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPABTestDesignerDisconnectMessage.m; sourceTree = ""; }; - 387F99411D1B8A8D007FA29A /* MPABTestDesignerMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPABTestDesignerMessage.h; sourceTree = ""; }; - 387F99421D1B8A8D007FA29A /* MPABTestDesignerSnapshotRequestMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPABTestDesignerSnapshotRequestMessage.h; sourceTree = ""; }; - 387F99431D1B8A8D007FA29A /* MPABTestDesignerSnapshotRequestMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPABTestDesignerSnapshotRequestMessage.m; sourceTree = ""; }; - 387F99441D1B8A8D007FA29A /* MPABTestDesignerSnapshotResponseMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPABTestDesignerSnapshotResponseMessage.h; sourceTree = ""; }; - 387F99451D1B8A8D007FA29A /* MPABTestDesignerSnapshotResponseMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPABTestDesignerSnapshotResponseMessage.m; sourceTree = ""; }; - 387F99461D1B8A8D007FA29A /* MPABTestDesignerTweakRequestMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPABTestDesignerTweakRequestMessage.h; sourceTree = ""; }; - 387F99471D1B8A8D007FA29A /* MPABTestDesignerTweakRequestMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPABTestDesignerTweakRequestMessage.m; sourceTree = ""; }; - 387F99481D1B8A8D007FA29A /* MPABTestDesignerTweakResponseMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPABTestDesignerTweakResponseMessage.h; sourceTree = ""; }; - 387F99491D1B8A8D007FA29A /* MPABTestDesignerTweakResponseMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPABTestDesignerTweakResponseMessage.m; sourceTree = ""; }; - 387F994A1D1B8A8D007FA29A /* MPApplicationStateSerializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPApplicationStateSerializer.h; sourceTree = ""; }; - 387F994B1D1B8A8D007FA29A /* MPApplicationStateSerializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPApplicationStateSerializer.m; sourceTree = ""; }; - 387F994C1D1B8A8D007FA29A /* MPBOOLToNSNumberValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPBOOLToNSNumberValueTransformer.m; sourceTree = ""; }; - 387F994D1D1B8A8D007FA29A /* MPCATransform3DToNSDictionaryValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPCATransform3DToNSDictionaryValueTransformer.m; sourceTree = ""; }; - 387F994E1D1B8A8D007FA29A /* MPCGAffineTransformToNSDictionaryValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPCGAffineTransformToNSDictionaryValueTransformer.m; sourceTree = ""; }; - 387F994F1D1B8A8D007FA29A /* MPCGColorRefToNSStringValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPCGColorRefToNSStringValueTransformer.m; sourceTree = ""; }; - 387F99501D1B8A8D007FA29A /* MPCGPointToNSDictionaryValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPCGPointToNSDictionaryValueTransformer.m; sourceTree = ""; }; - 387F99511D1B8A8D007FA29A /* MPCGRectToNSDictionaryValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPCGRectToNSDictionaryValueTransformer.m; sourceTree = ""; }; - 387F99521D1B8A8D007FA29A /* MPCGSizeToNSDictionaryValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPCGSizeToNSDictionaryValueTransformer.m; sourceTree = ""; }; - 387F99531D1B8A8D007FA29A /* MPClassDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPClassDescription.h; sourceTree = ""; }; - 387F99541D1B8A8D007FA29A /* MPClassDescription.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPClassDescription.m; sourceTree = ""; }; - 387F99551D1B8A8D007FA29A /* MPDesignerEventBindingMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPDesignerEventBindingMessage.h; sourceTree = ""; }; - 387F99561D1B8A8D007FA29A /* MPDesignerEventBindingRequestMesssage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPDesignerEventBindingRequestMesssage.m; sourceTree = ""; }; - 387F99571D1B8A8D007FA29A /* MPDesignerEventBindingResponseMesssage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPDesignerEventBindingResponseMesssage.m; sourceTree = ""; }; - 387F99581D1B8A8D007FA29A /* MPDesignerSessionCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPDesignerSessionCollection.h; sourceTree = ""; }; - 387F99591D1B8A8D007FA29A /* MPDesignerTrackMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPDesignerTrackMessage.m; sourceTree = ""; }; - 387F995A1D1B8A8D007FA29A /* MPEnumDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPEnumDescription.h; sourceTree = ""; }; - 387F995B1D1B8A8D007FA29A /* MPEnumDescription.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPEnumDescription.m; sourceTree = ""; }; - 387F995C1D1B8A8D007FA29A /* MPEventBinding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPEventBinding.h; sourceTree = ""; }; - 387F995D1D1B8A8D007FA29A /* MPEventBinding.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPEventBinding.m; sourceTree = ""; }; - 387F995E1D1B8A8D007FA29A /* MPFoundation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPFoundation.h; sourceTree = ""; }; - 387F995F1D1B8A8D007FA29A /* MPLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPLogger.h; sourceTree = ""; }; - 387F99601D1B8A8D007FA29A /* MPNotification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNotification.h; sourceTree = ""; }; - 387F99611D1B8A8D007FA29A /* MPNotification.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNotification.m; sourceTree = ""; }; - 387F99621D1B8A8D007FA29A /* MPNotificationViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNotificationViewController.h; sourceTree = ""; }; - 387F99631D1B8A8D007FA29A /* MPNotificationViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNotificationViewController.m; sourceTree = ""; }; - 387F99641D1B8A8D007FA29A /* MPNotification~ipad.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = "MPNotification~ipad.storyboard"; sourceTree = ""; }; - 387F99651D1B8A8D007FA29A /* MPNotification~iphonelandscape.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = "MPNotification~iphonelandscape.storyboard"; sourceTree = ""; }; - 387F99661D1B8A8D007FA29A /* MPNotification~iphoneportrait.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = "MPNotification~iphoneportrait.storyboard"; sourceTree = ""; }; - 387F99671D1B8A8D007FA29A /* MPNSAttributedStringToNSDictionaryValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNSAttributedStringToNSDictionaryValueTransformer.m; sourceTree = ""; }; - 387F99681D1B8A8D007FA29A /* MPNSNumberToCGFloatValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNSNumberToCGFloatValueTransformer.m; sourceTree = ""; }; - 387F99691D1B8A8D007FA29A /* MPObjectIdentifierProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPObjectIdentifierProvider.h; sourceTree = ""; }; - 387F996A1D1B8A8D007FA29A /* MPObjectIdentityProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPObjectIdentityProvider.h; sourceTree = ""; }; - 387F996B1D1B8A8D007FA29A /* MPObjectIdentityProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPObjectIdentityProvider.m; sourceTree = ""; }; - 387F996C1D1B8A8D007FA29A /* MPObjectSelector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPObjectSelector.h; sourceTree = ""; }; - 387F996D1D1B8A8D007FA29A /* MPObjectSelector.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPObjectSelector.m; sourceTree = ""; }; - 387F996E1D1B8A8D007FA29A /* MPObjectSerializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPObjectSerializer.h; sourceTree = ""; }; - 387F996F1D1B8A8D007FA29A /* MPObjectSerializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPObjectSerializer.m; sourceTree = ""; }; - 387F99701D1B8A8D007FA29A /* MPObjectSerializerConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPObjectSerializerConfig.h; sourceTree = ""; }; - 387F99711D1B8A8D007FA29A /* MPObjectSerializerConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPObjectSerializerConfig.m; sourceTree = ""; }; - 387F99721D1B8A8D007FA29A /* MPObjectSerializerContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPObjectSerializerContext.h; sourceTree = ""; }; - 387F99731D1B8A8D007FA29A /* MPObjectSerializerContext.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPObjectSerializerContext.m; sourceTree = ""; }; - 387F99741D1B8A8D007FA29A /* MPPassThroughValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPPassThroughValueTransformer.m; sourceTree = ""; }; - 387F99751D1B8A8D007FA29A /* MPPropertyDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPPropertyDescription.h; sourceTree = ""; }; - 387F99761D1B8A8D007FA29A /* MPPropertyDescription.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPPropertyDescription.m; sourceTree = ""; }; - 387F99771D1B8A8D007FA29A /* MPResources.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPResources.h; sourceTree = ""; }; - 387F99781D1B8A8D007FA29A /* MPResources.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPResources.m; sourceTree = ""; }; - 387F99791D1B8A8D007FA29A /* MPSequenceGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPSequenceGenerator.h; sourceTree = ""; }; - 387F997A1D1B8A8D007FA29A /* MPSequenceGenerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPSequenceGenerator.m; sourceTree = ""; }; - 387F997B1D1B8A8D007FA29A /* MPSurvey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPSurvey.h; sourceTree = ""; }; - 387F997C1D1B8A8D007FA29A /* MPSurvey.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPSurvey.m; sourceTree = ""; }; - 387F997D1D1B8A8D007FA29A /* MPSurvey.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = MPSurvey.storyboard; sourceTree = ""; }; - 387F997E1D1B8A8D007FA29A /* MPSurveyNavigationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPSurveyNavigationController.h; sourceTree = ""; }; - 387F997F1D1B8A8D007FA29A /* MPSurveyNavigationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPSurveyNavigationController.m; sourceTree = ""; }; - 387F99801D1B8A8D007FA29A /* MPSurveyQuestion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPSurveyQuestion.h; sourceTree = ""; }; - 387F99811D1B8A8D007FA29A /* MPSurveyQuestion.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPSurveyQuestion.m; sourceTree = ""; }; - 387F99821D1B8A8D007FA29A /* MPSurveyQuestionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPSurveyQuestionViewController.h; sourceTree = ""; }; - 387F99831D1B8A8D007FA29A /* MPSurveyQuestionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPSurveyQuestionViewController.m; sourceTree = ""; }; - 387F99841D1B8A8D007FA29A /* MPSwizzle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPSwizzle.h; sourceTree = ""; }; - 387F99851D1B8A8D007FA29A /* MPSwizzle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPSwizzle.m; sourceTree = ""; }; - 387F99861D1B8A8D007FA29A /* MPSwizzler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPSwizzler.h; sourceTree = ""; }; - 387F99871D1B8A8D007FA29A /* MPSwizzler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPSwizzler.m; sourceTree = ""; }; - 387F99881D1B8A8D007FA29A /* MPTweak.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPTweak.h; sourceTree = ""; }; - 387F99891D1B8A8D007FA29A /* MPTweak.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPTweak.m; sourceTree = ""; }; - 387F998A1D1B8A8D007FA29A /* MPTweakInline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPTweakInline.h; sourceTree = ""; }; - 387F998B1D1B8A8D007FA29A /* MPTweakInline.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPTweakInline.m; sourceTree = ""; }; - 387F998C1D1B8A8D007FA29A /* MPTweakInlineInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPTweakInlineInternal.h; sourceTree = ""; }; - 387F998D1D1B8A8D007FA29A /* MPTweakStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPTweakStore.h; sourceTree = ""; }; - 387F998E1D1B8A8D007FA29A /* MPTweakStore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPTweakStore.m; sourceTree = ""; }; - 387F998F1D1B8A8D007FA29A /* MPTypeDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPTypeDescription.h; sourceTree = ""; }; - 387F99901D1B8A8D007FA29A /* MPTypeDescription.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPTypeDescription.m; sourceTree = ""; }; - 387F99911D1B8A8D007FA29A /* MPUIColorToNSStringValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPUIColorToNSStringValueTransformer.m; sourceTree = ""; }; - 387F99921D1B8A8D007FA29A /* MPUIControlBinding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPUIControlBinding.h; sourceTree = ""; }; - 387F99931D1B8A8D007FA29A /* MPUIControlBinding.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPUIControlBinding.m; sourceTree = ""; }; - 387F99941D1B8A8D007FA29A /* MPUIEdgeInsetsToNSDictionaryValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPUIEdgeInsetsToNSDictionaryValueTransformer.m; sourceTree = ""; }; - 387F99951D1B8A8D007FA29A /* MPUIFontToNSDictionaryValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPUIFontToNSDictionaryValueTransformer.m; sourceTree = ""; }; - 387F99961D1B8A8D007FA29A /* MPUIImageToNSDictionaryValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPUIImageToNSDictionaryValueTransformer.m; sourceTree = ""; }; - 387F99971D1B8A8D007FA29A /* MPUITableViewBinding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPUITableViewBinding.h; sourceTree = ""; }; - 387F99981D1B8A8D007FA29A /* MPUITableViewBinding.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPUITableViewBinding.m; sourceTree = ""; }; - 387F99991D1B8A8D007FA29A /* MPValueTransformers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPValueTransformers.h; sourceTree = ""; }; - 387F999A1D1B8A8D007FA29A /* MPVariant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVariant.h; sourceTree = ""; }; - 387F999B1D1B8A8D007FA29A /* MPVariant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVariant.m; sourceTree = ""; }; - 387F999C1D1B8A8D007FA29A /* MPWebSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPWebSocket.h; sourceTree = ""; }; - 387F999D1D1B8A8D007FA29A /* MPWebSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPWebSocket.m; sourceTree = ""; }; - 387F999E1D1B8A8D007FA29A /* NSData+MPBase64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+MPBase64.h"; sourceTree = ""; }; - 387F999F1D1B8A8D007FA29A /* NSData+MPBase64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+MPBase64.m"; sourceTree = ""; }; - 387F99A01D1B8A8D007FA29A /* NSInvocation+MPHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSInvocation+MPHelpers.h"; sourceTree = ""; }; - 387F99A11D1B8A8D007FA29A /* NSInvocation+MPHelpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSInvocation+MPHelpers.m"; sourceTree = ""; }; - 387F99A21D1B8A8D007FA29A /* NSNotificationCenter+AutomaticEvents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSNotificationCenter+AutomaticEvents.h"; sourceTree = ""; }; - 387F99A31D1B8A8D007FA29A /* NSNotificationCenter+AutomaticEvents.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSNotificationCenter+AutomaticEvents.m"; sourceTree = ""; }; - 387F99A41D1B8A8D007FA29A /* snapshot_config.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = snapshot_config.json; sourceTree = ""; }; - 387F99A51D1B8A8D007FA29A /* test_variant.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = test_variant.json; sourceTree = ""; }; - 387F99A61D1B8A8D007FA29A /* UIApplication+AutomaticEvents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIApplication+AutomaticEvents.h"; sourceTree = ""; }; - 387F99A71D1B8A8D007FA29A /* UIApplication+AutomaticEvents.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIApplication+AutomaticEvents.m"; sourceTree = ""; }; - 387F99A81D1B8A8D007FA29A /* UIColor+MPColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIColor+MPColor.h"; sourceTree = ""; }; - 387F99A91D1B8A8D007FA29A /* UIColor+MPColor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIColor+MPColor.m"; sourceTree = ""; }; - 387F99AA1D1B8A8D007FA29A /* UIImage+MPAverageColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+MPAverageColor.h"; sourceTree = ""; }; - 387F99AB1D1B8A8D007FA29A /* UIImage+MPAverageColor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+MPAverageColor.m"; sourceTree = ""; }; - 387F99AC1D1B8A8D007FA29A /* UIImage+MPImageEffects.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+MPImageEffects.h"; sourceTree = ""; }; - 387F99AD1D1B8A8D007FA29A /* UIImage+MPImageEffects.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+MPImageEffects.m"; sourceTree = ""; }; - 387F99AE1D1B8A8D007FA29A /* UIView+MPHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+MPHelpers.h"; sourceTree = ""; }; - 387F99AF1D1B8A8D007FA29A /* UIView+MPHelpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+MPHelpers.m"; sourceTree = ""; }; - 387F99B01D1B8A8D007FA29A /* UIViewController+AutomaticEvents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+AutomaticEvents.h"; sourceTree = ""; }; - 387F99B11D1B8A8D007FA29A /* UIViewController+AutomaticEvents.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+AutomaticEvents.m"; sourceTree = ""; }; - 387F99B21D1B8A8D007FA29A /* watchos.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; path = watchos.modulemap; sourceTree = ""; }; 387F9A501D1B8ACD007FA29A /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; 387F9A521D1B8AD7007FA29A /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; }; 387F9A541D1B8ADE007FA29A /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; 387F9A561D1B8AF3007FA29A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 387F9A581D1B8AF9007FA29A /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 387F9A5B1D1B8E32007FA29A /* libicucore.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libicucore.tbd; path = usr/lib/libicucore.tbd; sourceTree = SDKROOT; }; + 389DE4AA1EF726B2009C8B27 /* Mixpanel.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Mixpanel.xcodeproj; path = "mixpanel-iphone/Mixpanel.xcodeproj"; sourceTree = ""; }; 38A6523A1CDA2D9B00AE8B3B /* PDKLocationGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PDKLocationGenerator.h; sourceTree = ""; }; 38A6523B1CDA2D9B00AE8B3B /* PDKLocationGenerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PDKLocationGenerator.m; sourceTree = ""; }; 38A652421CDA30DB00AE8B3B /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; @@ -478,6 +199,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 389DE4BC1EF726BB009C8B27 /* Mixpanel.framework in Frameworks */, 383ECC631D1F7E9F004E0B2B /* MapKit.framework in Frameworks */, 387F9A5C1D1B8E32007FA29A /* libicucore.tbd in Frameworks */, 387F9A591D1B8AF9007FA29A /* QuartzCore.framework in Frameworks */, @@ -555,179 +277,16 @@ path = PassiveDataKitTests; sourceTree = ""; }; - 387F99121D1B8A8D007FA29A /* Mixpanel */ = { + 389DE4AB1EF726B2009C8B27 /* Products */ = { isa = PBXGroup; children = ( - 387F99131D1B8A8D007FA29A /* _MPTweakBindObserver.h */, - 387F99141D1B8A8D007FA29A /* _MPTweakBindObserver.m */, - 387F99151D1B8A8D007FA29A /* AutomaticEventsConstants.h */, - 387F99161D1B8A8D007FA29A /* Images */, - 387F99241D1B8A8D007FA29A /* Mixpanel+AutomaticEvents.h */, - 387F99251D1B8A8D007FA29A /* Mixpanel+AutomaticEvents.m */, - 387F99261D1B8A8D007FA29A /* Mixpanel+HostWatchOS.h */, - 387F99271D1B8A8D007FA29A /* Mixpanel+HostWatchOS.m */, - 387F99281D1B8A8D007FA29A /* Mixpanel.h */, - 387F99291D1B8A8D007FA29A /* Mixpanel.m */, - 387F992A1D1B8A8D007FA29A /* MixpanelExceptionHandler.h */, - 387F992B1D1B8A8D007FA29A /* MixpanelExceptionHandler.m */, - 387F992C1D1B8A8D007FA29A /* MixpanelWatchOS.h */, - 387F992D1D1B8A8D007FA29A /* MixpanelWatchOS.m */, - 387F992E1D1B8A8D007FA29A /* module.modulemap */, - 387F992F1D1B8A8D007FA29A /* MPAbstractABTestDesignerMessage.h */, - 387F99301D1B8A8D007FA29A /* MPAbstractABTestDesignerMessage.m */, - 387F99311D1B8A8D007FA29A /* MPABTestDesignerChangeRequestMessage.h */, - 387F99321D1B8A8D007FA29A /* MPABTestDesignerChangeRequestMessage.m */, - 387F99331D1B8A8D007FA29A /* MPABTestDesignerChangeResponseMessage.h */, - 387F99341D1B8A8D007FA29A /* MPABTestDesignerChangeResponseMessage.m */, - 387F99351D1B8A8D007FA29A /* MPABTestDesignerClearRequestMessage.h */, - 387F99361D1B8A8D007FA29A /* MPABTestDesignerClearRequestMessage.m */, - 387F99371D1B8A8D007FA29A /* MPABTestDesignerClearResponseMessage.h */, - 387F99381D1B8A8D007FA29A /* MPABTestDesignerClearResponseMessage.m */, - 387F99391D1B8A8D007FA29A /* MPABTestDesignerConnection.h */, - 387F993A1D1B8A8D007FA29A /* MPABTestDesignerConnection.m */, - 387F993B1D1B8A8D007FA29A /* MPABTestDesignerDeviceInfoRequestMessage.h */, - 387F993C1D1B8A8D007FA29A /* MPABTestDesignerDeviceInfoRequestMessage.m */, - 387F993D1D1B8A8D007FA29A /* MPABTestDesignerDeviceInfoResponseMessage.h */, - 387F993E1D1B8A8D007FA29A /* MPABTestDesignerDeviceInfoResponseMessage.m */, - 387F993F1D1B8A8D007FA29A /* MPABTestDesignerDisconnectMessage.h */, - 387F99401D1B8A8D007FA29A /* MPABTestDesignerDisconnectMessage.m */, - 387F99411D1B8A8D007FA29A /* MPABTestDesignerMessage.h */, - 387F99421D1B8A8D007FA29A /* MPABTestDesignerSnapshotRequestMessage.h */, - 387F99431D1B8A8D007FA29A /* MPABTestDesignerSnapshotRequestMessage.m */, - 387F99441D1B8A8D007FA29A /* MPABTestDesignerSnapshotResponseMessage.h */, - 387F99451D1B8A8D007FA29A /* MPABTestDesignerSnapshotResponseMessage.m */, - 387F99461D1B8A8D007FA29A /* MPABTestDesignerTweakRequestMessage.h */, - 387F99471D1B8A8D007FA29A /* MPABTestDesignerTweakRequestMessage.m */, - 387F99481D1B8A8D007FA29A /* MPABTestDesignerTweakResponseMessage.h */, - 387F99491D1B8A8D007FA29A /* MPABTestDesignerTweakResponseMessage.m */, - 387F994A1D1B8A8D007FA29A /* MPApplicationStateSerializer.h */, - 387F994B1D1B8A8D007FA29A /* MPApplicationStateSerializer.m */, - 387F994C1D1B8A8D007FA29A /* MPBOOLToNSNumberValueTransformer.m */, - 387F994D1D1B8A8D007FA29A /* MPCATransform3DToNSDictionaryValueTransformer.m */, - 387F994E1D1B8A8D007FA29A /* MPCGAffineTransformToNSDictionaryValueTransformer.m */, - 387F994F1D1B8A8D007FA29A /* MPCGColorRefToNSStringValueTransformer.m */, - 387F99501D1B8A8D007FA29A /* MPCGPointToNSDictionaryValueTransformer.m */, - 387F99511D1B8A8D007FA29A /* MPCGRectToNSDictionaryValueTransformer.m */, - 387F99521D1B8A8D007FA29A /* MPCGSizeToNSDictionaryValueTransformer.m */, - 387F99531D1B8A8D007FA29A /* MPClassDescription.h */, - 387F99541D1B8A8D007FA29A /* MPClassDescription.m */, - 387F99551D1B8A8D007FA29A /* MPDesignerEventBindingMessage.h */, - 387F99561D1B8A8D007FA29A /* MPDesignerEventBindingRequestMesssage.m */, - 387F99571D1B8A8D007FA29A /* MPDesignerEventBindingResponseMesssage.m */, - 387F99581D1B8A8D007FA29A /* MPDesignerSessionCollection.h */, - 387F99591D1B8A8D007FA29A /* MPDesignerTrackMessage.m */, - 387F995A1D1B8A8D007FA29A /* MPEnumDescription.h */, - 387F995B1D1B8A8D007FA29A /* MPEnumDescription.m */, - 387F995C1D1B8A8D007FA29A /* MPEventBinding.h */, - 387F995D1D1B8A8D007FA29A /* MPEventBinding.m */, - 387F995E1D1B8A8D007FA29A /* MPFoundation.h */, - 387F995F1D1B8A8D007FA29A /* MPLogger.h */, - 387F99601D1B8A8D007FA29A /* MPNotification.h */, - 387F99611D1B8A8D007FA29A /* MPNotification.m */, - 387F99621D1B8A8D007FA29A /* MPNotificationViewController.h */, - 387F99631D1B8A8D007FA29A /* MPNotificationViewController.m */, - 387F99641D1B8A8D007FA29A /* MPNotification~ipad.storyboard */, - 387F99651D1B8A8D007FA29A /* MPNotification~iphonelandscape.storyboard */, - 387F99661D1B8A8D007FA29A /* MPNotification~iphoneportrait.storyboard */, - 387F99671D1B8A8D007FA29A /* MPNSAttributedStringToNSDictionaryValueTransformer.m */, - 387F99681D1B8A8D007FA29A /* MPNSNumberToCGFloatValueTransformer.m */, - 387F99691D1B8A8D007FA29A /* MPObjectIdentifierProvider.h */, - 387F996A1D1B8A8D007FA29A /* MPObjectIdentityProvider.h */, - 387F996B1D1B8A8D007FA29A /* MPObjectIdentityProvider.m */, - 387F996C1D1B8A8D007FA29A /* MPObjectSelector.h */, - 387F996D1D1B8A8D007FA29A /* MPObjectSelector.m */, - 387F996E1D1B8A8D007FA29A /* MPObjectSerializer.h */, - 387F996F1D1B8A8D007FA29A /* MPObjectSerializer.m */, - 387F99701D1B8A8D007FA29A /* MPObjectSerializerConfig.h */, - 387F99711D1B8A8D007FA29A /* MPObjectSerializerConfig.m */, - 387F99721D1B8A8D007FA29A /* MPObjectSerializerContext.h */, - 387F99731D1B8A8D007FA29A /* MPObjectSerializerContext.m */, - 387F99741D1B8A8D007FA29A /* MPPassThroughValueTransformer.m */, - 387F99751D1B8A8D007FA29A /* MPPropertyDescription.h */, - 387F99761D1B8A8D007FA29A /* MPPropertyDescription.m */, - 387F99771D1B8A8D007FA29A /* MPResources.h */, - 387F99781D1B8A8D007FA29A /* MPResources.m */, - 387F99791D1B8A8D007FA29A /* MPSequenceGenerator.h */, - 387F997A1D1B8A8D007FA29A /* MPSequenceGenerator.m */, - 387F997B1D1B8A8D007FA29A /* MPSurvey.h */, - 387F997C1D1B8A8D007FA29A /* MPSurvey.m */, - 387F997D1D1B8A8D007FA29A /* MPSurvey.storyboard */, - 387F997E1D1B8A8D007FA29A /* MPSurveyNavigationController.h */, - 387F997F1D1B8A8D007FA29A /* MPSurveyNavigationController.m */, - 387F99801D1B8A8D007FA29A /* MPSurveyQuestion.h */, - 387F99811D1B8A8D007FA29A /* MPSurveyQuestion.m */, - 387F99821D1B8A8D007FA29A /* MPSurveyQuestionViewController.h */, - 387F99831D1B8A8D007FA29A /* MPSurveyQuestionViewController.m */, - 387F99841D1B8A8D007FA29A /* MPSwizzle.h */, - 387F99851D1B8A8D007FA29A /* MPSwizzle.m */, - 387F99861D1B8A8D007FA29A /* MPSwizzler.h */, - 387F99871D1B8A8D007FA29A /* MPSwizzler.m */, - 387F99881D1B8A8D007FA29A /* MPTweak.h */, - 387F99891D1B8A8D007FA29A /* MPTweak.m */, - 387F998A1D1B8A8D007FA29A /* MPTweakInline.h */, - 387F998B1D1B8A8D007FA29A /* MPTweakInline.m */, - 387F998C1D1B8A8D007FA29A /* MPTweakInlineInternal.h */, - 387F998D1D1B8A8D007FA29A /* MPTweakStore.h */, - 387F998E1D1B8A8D007FA29A /* MPTweakStore.m */, - 387F998F1D1B8A8D007FA29A /* MPTypeDescription.h */, - 387F99901D1B8A8D007FA29A /* MPTypeDescription.m */, - 387F99911D1B8A8D007FA29A /* MPUIColorToNSStringValueTransformer.m */, - 387F99921D1B8A8D007FA29A /* MPUIControlBinding.h */, - 387F99931D1B8A8D007FA29A /* MPUIControlBinding.m */, - 387F99941D1B8A8D007FA29A /* MPUIEdgeInsetsToNSDictionaryValueTransformer.m */, - 387F99951D1B8A8D007FA29A /* MPUIFontToNSDictionaryValueTransformer.m */, - 387F99961D1B8A8D007FA29A /* MPUIImageToNSDictionaryValueTransformer.m */, - 387F99971D1B8A8D007FA29A /* MPUITableViewBinding.h */, - 387F99981D1B8A8D007FA29A /* MPUITableViewBinding.m */, - 387F99991D1B8A8D007FA29A /* MPValueTransformers.h */, - 387F999A1D1B8A8D007FA29A /* MPVariant.h */, - 387F999B1D1B8A8D007FA29A /* MPVariant.m */, - 387F999C1D1B8A8D007FA29A /* MPWebSocket.h */, - 387F999D1D1B8A8D007FA29A /* MPWebSocket.m */, - 387F999E1D1B8A8D007FA29A /* NSData+MPBase64.h */, - 387F999F1D1B8A8D007FA29A /* NSData+MPBase64.m */, - 387F99A01D1B8A8D007FA29A /* NSInvocation+MPHelpers.h */, - 387F99A11D1B8A8D007FA29A /* NSInvocation+MPHelpers.m */, - 387F99A21D1B8A8D007FA29A /* NSNotificationCenter+AutomaticEvents.h */, - 387F99A31D1B8A8D007FA29A /* NSNotificationCenter+AutomaticEvents.m */, - 387F99A41D1B8A8D007FA29A /* snapshot_config.json */, - 387F99A51D1B8A8D007FA29A /* test_variant.json */, - 387F99A61D1B8A8D007FA29A /* UIApplication+AutomaticEvents.h */, - 387F99A71D1B8A8D007FA29A /* UIApplication+AutomaticEvents.m */, - 387F99A81D1B8A8D007FA29A /* UIColor+MPColor.h */, - 387F99A91D1B8A8D007FA29A /* UIColor+MPColor.m */, - 387F99AA1D1B8A8D007FA29A /* UIImage+MPAverageColor.h */, - 387F99AB1D1B8A8D007FA29A /* UIImage+MPAverageColor.m */, - 387F99AC1D1B8A8D007FA29A /* UIImage+MPImageEffects.h */, - 387F99AD1D1B8A8D007FA29A /* UIImage+MPImageEffects.m */, - 387F99AE1D1B8A8D007FA29A /* UIView+MPHelpers.h */, - 387F99AF1D1B8A8D007FA29A /* UIView+MPHelpers.m */, - 387F99B01D1B8A8D007FA29A /* UIViewController+AutomaticEvents.h */, - 387F99B11D1B8A8D007FA29A /* UIViewController+AutomaticEvents.m */, - 387F99B21D1B8A8D007FA29A /* watchos.modulemap */, + 389DE4B31EF726B2009C8B27 /* Mixpanel.framework */, + 389DE4B51EF726B2009C8B27 /* Mixpanel.framework */, + 389DE4B71EF726B2009C8B27 /* MixpanelAppExtension.framework */, + 389DE4B91EF726B2009C8B27 /* Mixpanel.framework */, + 389DE4BB1EF726B2009C8B27 /* Mixpanel.framework */, ); - name = Mixpanel; - path = "mixpanel-iphone/Mixpanel"; - sourceTree = ""; - }; - 387F99161D1B8A8D007FA29A /* Images */ = { - isa = PBXGroup; - children = ( - 387F99171D1B8A8D007FA29A /* MPArrowLeft.png */, - 387F99181D1B8A8D007FA29A /* MPArrowLeft@2x.png */, - 387F99191D1B8A8D007FA29A /* MPArrowRight.png */, - 387F991A1D1B8A8D007FA29A /* MPArrowRight@2x.png */, - 387F991B1D1B8A8D007FA29A /* MPCheckmark.png */, - 387F991C1D1B8A8D007FA29A /* MPCheckmark@2x.png */, - 387F991D1D1B8A8D007FA29A /* MPCloseButton.png */, - 387F991E1D1B8A8D007FA29A /* MPCloseButton@2x.png */, - 387F991F1D1B8A8D007FA29A /* MPCloseButton@3x.png */, - 387F99201D1B8A8D007FA29A /* MPDismissKeyboard.png */, - 387F99211D1B8A8D007FA29A /* MPDismissKeyboard@2x.png */, - 387F99221D1B8A8D007FA29A /* MPLogo.png */, - 387F99231D1B8A8D007FA29A /* MPLogo@2x.png */, - ); - path = Images; + name = Products; sourceTree = ""; }; 38A652441CDA30E800AE8B3B /* Frameworks */ = { @@ -766,7 +325,7 @@ 38C666B41D038A8E00E6A6C8 /* Third Party */ = { isa = PBXGroup; children = ( - 387F99121D1B8A8D007FA29A /* Mixpanel */, + 389DE4AA1EF726B2009C8B27 /* Mixpanel.xcodeproj */, 38C666B51D038A8E00E6A6C8 /* AFNetworking */, ); name = "Third Party"; @@ -841,98 +400,33 @@ buildActionMask = 2147483647; files = ( 38C666B01D037FCF00E6A6C8 /* PDKDataPointsManager.h in Headers */, - 387F99D31D1B8A8D007FA29A /* MPABTestDesignerClearRequestMessage.h in Headers */, - 387F99E01D1B8A8D007FA29A /* MPABTestDesignerSnapshotRequestMessage.h in Headers */, - 387F99E81D1B8A8D007FA29A /* MPApplicationStateSerializer.h in Headers */, 38C666D91D038A8E00E6A6C8 /* PDKAFHTTPSessionManager.h in Headers */, - 387F99E21D1B8A8D007FA29A /* MPABTestDesignerSnapshotResponseMessage.h in Headers */, 38C666E41D038A8E00E6A6C8 /* PDKAFURLRequestSerialization.h in Headers */, 38C666E01D038A8E00E6A6C8 /* PDKAFNetworkReachabilityManager.h in Headers */, - 387F9A2A1D1B8A8D007FA29A /* MPTweakInlineInternal.h in Headers */, - 387F99DF1D1B8A8D007FA29A /* MPABTestDesignerMessage.h in Headers */, - 387F9A241D1B8A8D007FA29A /* MPSwizzler.h in Headers */, 38C666E21D038A8E00E6A6C8 /* PDKAFSecurityPolicy.h in Headers */, - 387F99E41D1B8A8D007FA29A /* MPABTestDesignerTweakRequestMessage.h in Headers */, - 387F99F31D1B8A8D007FA29A /* MPDesignerEventBindingMessage.h in Headers */, - 387F99C31D1B8A8D007FA29A /* Mixpanel+AutomaticEvents.h in Headers */, - 387F9A3A1D1B8A8D007FA29A /* MPWebSocket.h in Headers */, - 387F9A071D1B8A8D007FA29A /* MPObjectIdentifierProvider.h in Headers */, - 387F99CB1D1B8A8D007FA29A /* MixpanelWatchOS.h in Headers */, - 387F9A201D1B8A8D007FA29A /* MPSurveyQuestionViewController.h in Headers */, 38C666EA1D038A8E00E6A6C8 /* UIActivityIndicatorView+PDKAFNetworking.h in Headers */, 38C666F11D038A8E00E6A6C8 /* UIKit+PDKAFNetworking.h in Headers */, - 387F99FA1D1B8A8D007FA29A /* MPEventBinding.h in Headers */, - 387F9A4E1D1B8A8D007FA29A /* UIViewController+AutomaticEvents.h in Headers */, - 387F9A301D1B8A8D007FA29A /* MPUIControlBinding.h in Headers */, - 387F9A261D1B8A8D007FA29A /* MPTweak.h in Headers */, - 387F9A131D1B8A8D007FA29A /* MPPropertyDescription.h in Headers */, - 387F9A101D1B8A8D007FA29A /* MPObjectSerializerContext.h in Headers */, 38C666E81D038A8E00E6A6C8 /* PDKAFURLSessionManager.h in Headers */, - 387F9A0E1D1B8A8D007FA29A /* MPObjectSerializerConfig.h in Headers */, - 387F9A381D1B8A8D007FA29A /* MPVariant.h in Headers */, - 387F99C91D1B8A8D007FA29A /* MixpanelExceptionHandler.h in Headers */, - 387F9A281D1B8A8D007FA29A /* MPTweakInline.h in Headers */, - 387F99CF1D1B8A8D007FA29A /* MPABTestDesignerChangeRequestMessage.h in Headers */, - 387F99D51D1B8A8D007FA29A /* MPABTestDesignerClearResponseMessage.h in Headers */, - 387F9A191D1B8A8D007FA29A /* MPSurvey.h in Headers */, - 387F9A441D1B8A8D007FA29A /* UIApplication+AutomaticEvents.h in Headers */, 38C666F61D038A8E00E6A6C8 /* UIWebView+PDKAFNetworking.h in Headers */, 38DC949F1D2711C600552259 /* PDKGooglePlacesGenerator.h in Headers */, - 387F99C71D1B8A8D007FA29A /* Mixpanel.h in Headers */, 38C666DD1D038A8E00E6A6C8 /* PDKAFNetworkActivityIndicatorManager.h in Headers */, - 387F99FC1D1B8A8D007FA29A /* MPFoundation.h in Headers */, - 387F99FD1D1B8A8D007FA29A /* MPLogger.h in Headers */, 38C666EE1D038A8E00E6A6C8 /* UIImage+PDKAFNetworking.h in Headers */, - 387F99CD1D1B8A8D007FA29A /* MPAbstractABTestDesignerMessage.h in Headers */, - 387F9A351D1B8A8D007FA29A /* MPUITableViewBinding.h in Headers */, 383ECC531D1F4F41004E0B2B /* PDKDataReportViewController.h in Headers */, - 387F99C51D1B8A8D007FA29A /* Mixpanel+HostWatchOS.h in Headers */, - 387F99B31D1B8A8D007FA29A /* _MPTweakBindObserver.h in Headers */, 38DC94881D23470C00552259 /* PDKLocationGeneratorViewController.h in Headers */, 38C666DF1D038A8E00E6A6C8 /* PDKAFNetworking.h in Headers */, - 387F9A0C1D1B8A8D007FA29A /* MPObjectSerializer.h in Headers */, - 387F99DB1D1B8A8D007FA29A /* MPABTestDesignerDeviceInfoResponseMessage.h in Headers */, 38DC94A71D281A7300552259 /* PDKEventsGeneratorViewController.h in Headers */, - 387F9A371D1B8A8D007FA29A /* MPValueTransformers.h in Headers */, 38C666EF1D038A8E00E6A6C8 /* UIImageView+PDKAFNetworking.h in Headers */, - 387F9A221D1B8A8D007FA29A /* MPSwizzle.h in Headers */, 38C666DB1D038A8E00E6A6C8 /* PDKAFImageDownloader.h in Headers */, 38C666EC1D038A8E00E6A6C8 /* UIButton+PDKAFNetworking.h in Headers */, - 387F9A001D1B8A8D007FA29A /* MPNotificationViewController.h in Headers */, 38C666F21D038A8E00E6A6C8 /* UIProgressView+PDKAFNetworking.h in Headers */, - 387F9A1E1D1B8A8D007FA29A /* MPSurveyQuestion.h in Headers */, - 387F9A2B1D1B8A8D007FA29A /* MPTweakStore.h in Headers */, - 387F9A461D1B8A8D007FA29A /* UIColor+MPColor.h in Headers */, - 387F99FE1D1B8A8D007FA29A /* MPNotification.h in Headers */, 38C666E61D038A8E00E6A6C8 /* PDKAFURLResponseSerialization.h in Headers */, - 387F9A171D1B8A8D007FA29A /* MPSequenceGenerator.h in Headers */, 38C666F41D038A8E00E6A6C8 /* UIRefreshControl+PDKAFNetworking.h in Headers */, - 387F9A481D1B8A8D007FA29A /* UIImage+MPAverageColor.h in Headers */, - 387F99F81D1B8A8D007FA29A /* MPEnumDescription.h in Headers */, - 387F99F61D1B8A8D007FA29A /* MPDesignerSessionCollection.h in Headers */, - 387F9A081D1B8A8D007FA29A /* MPObjectIdentityProvider.h in Headers */, - 387F9A4A1D1B8A8D007FA29A /* UIImage+MPImageEffects.h in Headers */, 383ECC6E1D1F9915004E0B2B /* PDKLocationAnnotation.h in Headers */, 38C666D71D038A8E00E6A6C8 /* PDKAFAutoPurgingImageCache.h in Headers */, 3842F7351CDA2021007F843D /* PassiveDataKit.h in Headers */, - 387F99DD1D1B8A8D007FA29A /* MPABTestDesignerDisconnectMessage.h in Headers */, - 387F99D11D1B8A8D007FA29A /* MPABTestDesignerChangeResponseMessage.h in Headers */, - 387F9A3C1D1B8A8D007FA29A /* NSData+MPBase64.h in Headers */, - 387F99B51D1B8A8D007FA29A /* AutomaticEventsConstants.h in Headers */, - 387F9A0A1D1B8A8D007FA29A /* MPObjectSelector.h in Headers */, 38A6523C1CDA2D9B00AE8B3B /* PDKLocationGenerator.h in Headers */, - 387F9A4C1D1B8A8D007FA29A /* UIView+MPHelpers.h in Headers */, - 387F99D91D1B8A8D007FA29A /* MPABTestDesignerDeviceInfoRequestMessage.h in Headers */, - 387F99F11D1B8A8D007FA29A /* MPClassDescription.h in Headers */, 383ECC6A1D1F82F5004E0B2B /* PDKMixpanelEventGenerator.h in Headers */, - 387F99D71D1B8A8D007FA29A /* MPABTestDesignerConnection.h in Headers */, 383ECC661D1F816D004E0B2B /* PDKEventsGenerator.h in Headers */, - 387F9A2D1D1B8A8D007FA29A /* MPTypeDescription.h in Headers */, - 387F99E61D1B8A8D007FA29A /* MPABTestDesignerTweakResponseMessage.h in Headers */, - 387F9A401D1B8A8D007FA29A /* NSNotificationCenter+AutomaticEvents.h in Headers */, - 387F9A1C1D1B8A8D007FA29A /* MPSurveyNavigationController.h in Headers */, - 387F9A3E1D1B8A8D007FA29A /* NSInvocation+MPHelpers.h in Headers */, - 387F9A151D1B8A8D007FA29A /* MPResources.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1002,6 +496,12 @@ mainGroup = 3842F7271CDA2021007F843D; productRefGroup = 3842F7321CDA2021007F843D /* Products */; projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 389DE4AB1EF726B2009C8B27 /* Products */; + ProjectRef = 389DE4AA1EF726B2009C8B27 /* Mixpanel.xcodeproj */; + }, + ); projectRoot = ""; targets = ( 3842F7301CDA2021007F843D /* PassiveDataKit */, @@ -1010,32 +510,51 @@ }; /* End PBXProject section */ +/* Begin PBXReferenceProxy section */ + 389DE4B31EF726B2009C8B27 /* Mixpanel.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = Mixpanel.framework; + remoteRef = 389DE4B21EF726B2009C8B27 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 389DE4B51EF726B2009C8B27 /* Mixpanel.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = Mixpanel.framework; + remoteRef = 389DE4B41EF726B2009C8B27 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 389DE4B71EF726B2009C8B27 /* MixpanelAppExtension.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = MixpanelAppExtension.framework; + remoteRef = 389DE4B61EF726B2009C8B27 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 389DE4B91EF726B2009C8B27 /* Mixpanel.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = Mixpanel.framework; + remoteRef = 389DE4B81EF726B2009C8B27 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 389DE4BB1EF726B2009C8B27 /* Mixpanel.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = Mixpanel.framework; + remoteRef = 389DE4BA1EF726B2009C8B27 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + /* Begin PBXResourcesBuildPhase section */ 3842F72F1CDA2021007F843D /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 387F99BD1D1B8A8D007FA29A /* MPCloseButton@2x.png in Resources */, - 387F99BE1D1B8A8D007FA29A /* MPCloseButton@3x.png in Resources */, - 387F99B71D1B8A8D007FA29A /* MPArrowLeft@2x.png in Resources */, - 387F99C21D1B8A8D007FA29A /* MPLogo@2x.png in Resources */, 383ECC611D1F742E004E0B2B /* Assets.xcassets in Resources */, - 387F99C11D1B8A8D007FA29A /* MPLogo.png in Resources */, - 387F99BA1D1B8A8D007FA29A /* MPCheckmark.png in Resources */, - 387F99B81D1B8A8D007FA29A /* MPArrowRight.png in Resources */, - 387F9A421D1B8A8D007FA29A /* snapshot_config.json in Resources */, - 387F99BC1D1B8A8D007FA29A /* MPCloseButton.png in Resources */, - 387F99BF1D1B8A8D007FA29A /* MPDismissKeyboard.png in Resources */, - 387F9A041D1B8A8D007FA29A /* MPNotification~iphoneportrait.storyboard in Resources */, - 387F99C01D1B8A8D007FA29A /* MPDismissKeyboard@2x.png in Resources */, - 387F99BB1D1B8A8D007FA29A /* MPCheckmark@2x.png in Resources */, - 387F99B91D1B8A8D007FA29A /* MPArrowRight@2x.png in Resources */, - 387F9A431D1B8A8D007FA29A /* test_variant.json in Resources */, 383ECC561D1F5178004E0B2B /* PassiveDataKit.strings in Resources */, - 387F99B61D1B8A8D007FA29A /* MPArrowLeft.png in Resources */, - 387F9A031D1B8A8D007FA29A /* MPNotification~iphonelandscape.storyboard in Resources */, - 387F9A021D1B8A8D007FA29A /* MPNotification~ipad.storyboard in Resources */, - 387F9A1B1D1B8A8D007FA29A /* MPSurvey.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1055,102 +574,29 @@ files = ( 383ECC671D1F816D004E0B2B /* PDKEventsGenerator.m in Sources */, 38C666F31D038A8E00E6A6C8 /* UIProgressView+PDKAFNetworking.m in Sources */, - 387F9A061D1B8A8D007FA29A /* MPNSNumberToCGFloatValueTransformer.m in Sources */, - 387F99EC1D1B8A8D007FA29A /* MPCGAffineTransformToNSDictionaryValueTransformer.m in Sources */, - 387F9A3D1D1B8A8D007FA29A /* NSData+MPBase64.m in Sources */, 383ECC6F1D1F9915004E0B2B /* PDKLocationAnnotation.m in Sources */, - 387F9A331D1B8A8D007FA29A /* MPUIFontToNSDictionaryValueTransformer.m in Sources */, - 387F9A3F1D1B8A8D007FA29A /* NSInvocation+MPHelpers.m in Sources */, - 387F9A491D1B8A8D007FA29A /* UIImage+MPAverageColor.m in Sources */, - 387F99D21D1B8A8D007FA29A /* MPABTestDesignerChangeResponseMessage.m in Sources */, - 387F99D61D1B8A8D007FA29A /* MPABTestDesignerClearResponseMessage.m in Sources */, - 387F9A0B1D1B8A8D007FA29A /* MPObjectSelector.m in Sources */, - 387F99CE1D1B8A8D007FA29A /* MPAbstractABTestDesignerMessage.m in Sources */, - 387F9A4F1D1B8A8D007FA29A /* UIViewController+AutomaticEvents.m in Sources */, 38C666B11D037FCF00E6A6C8 /* PDKDataPointsManager.m in Sources */, 38C666F71D038A8E00E6A6C8 /* UIWebView+PDKAFNetworking.m in Sources */, - 387F9A361D1B8A8D007FA29A /* MPUITableViewBinding.m in Sources */, - 387F9A111D1B8A8D007FA29A /* MPObjectSerializerContext.m in Sources */, - 387F99C81D1B8A8D007FA29A /* Mixpanel.m in Sources */, - 387F99DC1D1B8A8D007FA29A /* MPABTestDesignerDeviceInfoResponseMessage.m in Sources */, 38C666F01D038A8E00E6A6C8 /* UIImageView+PDKAFNetworking.m in Sources */, - 387F99E31D1B8A8D007FA29A /* MPABTestDesignerSnapshotResponseMessage.m in Sources */, 38C666E31D038A8E00E6A6C8 /* PDKAFSecurityPolicy.m in Sources */, 38C666ED1D038A8E00E6A6C8 /* UIButton+PDKAFNetworking.m in Sources */, 38A6523D1CDA2D9B00AE8B3B /* PDKLocationGenerator.m in Sources */, - 387F99F91D1B8A8D007FA29A /* MPEnumDescription.m in Sources */, - 387F99E71D1B8A8D007FA29A /* MPABTestDesignerTweakResponseMessage.m in Sources */, - 387F99EE1D1B8A8D007FA29A /* MPCGPointToNSDictionaryValueTransformer.m in Sources */, - 387F9A4D1D1B8A8D007FA29A /* UIView+MPHelpers.m in Sources */, - 387F99FB1D1B8A8D007FA29A /* MPEventBinding.m in Sources */, - 387F99F41D1B8A8D007FA29A /* MPDesignerEventBindingRequestMesssage.m in Sources */, - 387F9A251D1B8A8D007FA29A /* MPSwizzler.m in Sources */, - 387F9A391D1B8A8D007FA29A /* MPVariant.m in Sources */, - 387F9A321D1B8A8D007FA29A /* MPUIEdgeInsetsToNSDictionaryValueTransformer.m in Sources */, - 387F9A231D1B8A8D007FA29A /* MPSwizzle.m in Sources */, - 387F99ED1D1B8A8D007FA29A /* MPCGColorRefToNSStringValueTransformer.m in Sources */, - 387F9A341D1B8A8D007FA29A /* MPUIImageToNSDictionaryValueTransformer.m in Sources */, - 387F99D41D1B8A8D007FA29A /* MPABTestDesignerClearRequestMessage.m in Sources */, - 387F9A311D1B8A8D007FA29A /* MPUIControlBinding.m in Sources */, - 387F9A291D1B8A8D007FA29A /* MPTweakInline.m in Sources */, 38C666DA1D038A8E00E6A6C8 /* PDKAFHTTPSessionManager.m in Sources */, - 387F99EB1D1B8A8D007FA29A /* MPCATransform3DToNSDictionaryValueTransformer.m in Sources */, - 387F9A211D1B8A8D007FA29A /* MPSurveyQuestionViewController.m in Sources */, - 387F9A2F1D1B8A8D007FA29A /* MPUIColorToNSStringValueTransformer.m in Sources */, - 387F99F01D1B8A8D007FA29A /* MPCGSizeToNSDictionaryValueTransformer.m in Sources */, - 387F99B41D1B8A8D007FA29A /* _MPTweakBindObserver.m in Sources */, 38DC94891D23470C00552259 /* PDKLocationGeneratorViewController.m in Sources */, - 387F9A0F1D1B8A8D007FA29A /* MPObjectSerializerConfig.m in Sources */, 38C666F51D038A8E00E6A6C8 /* UIRefreshControl+PDKAFNetworking.m in Sources */, 38C666E71D038A8E00E6A6C8 /* PDKAFURLResponseSerialization.m in Sources */, - 387F9A2C1D1B8A8D007FA29A /* MPTweakStore.m in Sources */, - 387F99E91D1B8A8D007FA29A /* MPApplicationStateSerializer.m in Sources */, - 387F9A161D1B8A8D007FA29A /* MPResources.m in Sources */, - 387F9A451D1B8A8D007FA29A /* UIApplication+AutomaticEvents.m in Sources */, - 387F99DA1D1B8A8D007FA29A /* MPABTestDesignerDeviceInfoRequestMessage.m in Sources */, - 387F9A091D1B8A8D007FA29A /* MPObjectIdentityProvider.m in Sources */, 3842F7571CDA20FE007F843D /* PassiveDataKit.m in Sources */, - 387F99EF1D1B8A8D007FA29A /* MPCGRectToNSDictionaryValueTransformer.m in Sources */, - 387F9A271D1B8A8D007FA29A /* MPTweak.m in Sources */, 38C666D81D038A8E00E6A6C8 /* PDKAFAutoPurgingImageCache.m in Sources */, - 387F9A121D1B8A8D007FA29A /* MPPassThroughValueTransformer.m in Sources */, - 387F9A0D1D1B8A8D007FA29A /* MPObjectSerializer.m in Sources */, 38C666DE1D038A8E00E6A6C8 /* PDKAFNetworkActivityIndicatorManager.m in Sources */, - 387F9A2E1D1B8A8D007FA29A /* MPTypeDescription.m in Sources */, - 387F99DE1D1B8A8D007FA29A /* MPABTestDesignerDisconnectMessage.m in Sources */, - 387F9A051D1B8A8D007FA29A /* MPNSAttributedStringToNSDictionaryValueTransformer.m in Sources */, 38DC94A01D2711C600552259 /* PDKGooglePlacesGenerator.m in Sources */, - 387F9A011D1B8A8D007FA29A /* MPNotificationViewController.m in Sources */, - 387F99C41D1B8A8D007FA29A /* Mixpanel+AutomaticEvents.m in Sources */, 383ECC6B1D1F82F5004E0B2B /* PDKMixpanelEventGenerator.m in Sources */, - 387F9A411D1B8A8D007FA29A /* NSNotificationCenter+AutomaticEvents.m in Sources */, - 387F9A181D1B8A8D007FA29A /* MPSequenceGenerator.m in Sources */, - 387F9A471D1B8A8D007FA29A /* UIColor+MPColor.m in Sources */, - 387F9A1F1D1B8A8D007FA29A /* MPSurveyQuestion.m in Sources */, - 387F99CA1D1B8A8D007FA29A /* MixpanelExceptionHandler.m in Sources */, - 387F99D01D1B8A8D007FA29A /* MPABTestDesignerChangeRequestMessage.m in Sources */, - 387F9A4B1D1B8A8D007FA29A /* UIImage+MPImageEffects.m in Sources */, 38C666E51D038A8E00E6A6C8 /* PDKAFURLRequestSerialization.m in Sources */, 38C666E91D038A8E00E6A6C8 /* PDKAFURLSessionManager.m in Sources */, - 387F99F51D1B8A8D007FA29A /* MPDesignerEventBindingResponseMesssage.m in Sources */, - 387F99D81D1B8A8D007FA29A /* MPABTestDesignerConnection.m in Sources */, 383ECC541D1F4F41004E0B2B /* PDKDataReportViewController.m in Sources */, - 387F99CC1D1B8A8D007FA29A /* MixpanelWatchOS.m in Sources */, - 387F99F71D1B8A8D007FA29A /* MPDesignerTrackMessage.m in Sources */, - 387F9A1A1D1B8A8D007FA29A /* MPSurvey.m in Sources */, 38DC94A81D281A7300552259 /* PDKEventsGeneratorViewController.m in Sources */, - 387F99C61D1B8A8D007FA29A /* Mixpanel+HostWatchOS.m in Sources */, - 387F99E51D1B8A8D007FA29A /* MPABTestDesignerTweakRequestMessage.m in Sources */, - 387F9A141D1B8A8D007FA29A /* MPPropertyDescription.m in Sources */, 38C666E11D038A8E00E6A6C8 /* PDKAFNetworkReachabilityManager.m in Sources */, 38C666DC1D038A8E00E6A6C8 /* PDKAFImageDownloader.m in Sources */, - 387F99FF1D1B8A8D007FA29A /* MPNotification.m in Sources */, - 387F99F21D1B8A8D007FA29A /* MPClassDescription.m in Sources */, - 387F9A1D1D1B8A8D007FA29A /* MPSurveyNavigationController.m in Sources */, - 387F99E11D1B8A8D007FA29A /* MPABTestDesignerSnapshotRequestMessage.m in Sources */, 38C666EB1D038A8E00E6A6C8 /* UIActivityIndicatorView+PDKAFNetworking.m in Sources */, - 387F9A3B1D1B8A8D007FA29A /* MPWebSocket.m in Sources */, - 387F99EA1D1B8A8D007FA29A /* MPBOOLToNSNumberValueTransformer.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/PassiveDataKit/PDKDataPointsManager.m b/PassiveDataKit/PDKDataPointsManager.m index 71edf1c..657afbb 100644 --- a/PassiveDataKit/PDKDataPointsManager.m +++ b/PassiveDataKit/PDKDataPointsManager.m @@ -8,7 +8,7 @@ #import -#import "Mixpanel.h" +@import Mixpanel; #import "PassiveDataKit.h" #import "PDKAFHTTPSessionManager.h" From 3fb161d17618b185498addd8a250db71e88914d2 Mon Sep 17 00:00:00 2001 From: Chris Karr Date: Sun, 18 Jun 2017 16:33:08 -0500 Subject: [PATCH 03/13] Updating .travis.yml for Mixpanel updates --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c60d53b..fec9b18 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ before_install: script: - xcodebuild test -list -project 'PassiveDataKit.xcodeproj' - set -o pipefail && travis_retry xcodebuild test -scheme 'PassiveDataKit' -project 'PassiveDataKit.xcodeproj' -destination 'platform=iOS Simulator,name=iPhone 6s,OS=10.2' - - xcodebuild -project 'PassiveDataKit.xcodeproj' | tee xcodebuild.log + - xcodebuild -project 'PassiveDataKit.xcodeproj' -scheme 'PassiveDataKit' | tee xcodebuild.log - oclint-xcodebuild - oclint-json-compilation-database -e Mixpanel From 301b82f5b1569a9936110c1d1ccfbec3406eeb94 Mon Sep 17 00:00:00 2001 From: Chris Karr Date: Mon, 19 Jun 2017 00:04:27 -0500 Subject: [PATCH 04/13] Revamping PDK to better match Android architecture --- PassiveDataKit.xcodeproj/project.pbxproj | 68 +++- PassiveDataKit/PDKBaseGenerator.h | 15 + PassiveDataKit/PDKBaseGenerator.m | 32 ++ PassiveDataKit/PDKDataPointsManager.h | 20 -- PassiveDataKit/PDKDataPointsManager.m | 305 ---------------- PassiveDataKit/PDKDataReportViewController.m | 4 +- PassiveDataKit/PDKEventsGenerator.h | 10 +- PassiveDataKit/PDKEventsGenerator.m | 39 +- PassiveDataKit/PDKGooglePlacesGenerator.h | 3 +- PassiveDataKit/PDKGooglePlacesGenerator.m | 7 +- PassiveDataKit/PDKHttpTransmitter.h | 19 + PassiveDataKit/PDKHttpTransmitter.m | 340 ++++++++++++++++++ PassiveDataKit/PDKLocationGenerator.h | 4 +- PassiveDataKit/PDKLocationGenerator.m | 8 +- PassiveDataKit/PDKMixpanelEventGenerator.m | 10 +- PassiveDataKit/PassiveDataKit-Shared.h | 12 + PassiveDataKit/PassiveDataKit.h | 49 +-- PassiveDataKit/PassiveDataKit.m | 182 +++------- PassiveDataKit/PassiveDataKit.modulemap | 3 + .../Third-Party/NSString+RAInflections.h | 17 + .../Third-Party/NSString+RAInflections.m | 62 ++++ 21 files changed, 686 insertions(+), 523 deletions(-) create mode 100644 PassiveDataKit/PDKBaseGenerator.h create mode 100644 PassiveDataKit/PDKBaseGenerator.m delete mode 100644 PassiveDataKit/PDKDataPointsManager.h delete mode 100644 PassiveDataKit/PDKDataPointsManager.m create mode 100644 PassiveDataKit/PDKHttpTransmitter.h create mode 100644 PassiveDataKit/PDKHttpTransmitter.m create mode 100644 PassiveDataKit/PassiveDataKit-Shared.h create mode 100644 PassiveDataKit/PassiveDataKit.modulemap create mode 100644 PassiveDataKit/Third-Party/NSString+RAInflections.h create mode 100644 PassiveDataKit/Third-Party/NSString+RAInflections.m diff --git a/PassiveDataKit.xcodeproj/project.pbxproj b/PassiveDataKit.xcodeproj/project.pbxproj index e157bcd..68e0ed4 100644 --- a/PassiveDataKit.xcodeproj/project.pbxproj +++ b/PassiveDataKit.xcodeproj/project.pbxproj @@ -28,12 +28,17 @@ 387F9A571D1B8AF3007FA29A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 387F9A561D1B8AF3007FA29A /* CoreGraphics.framework */; }; 387F9A591D1B8AF9007FA29A /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 387F9A581D1B8AF9007FA29A /* QuartzCore.framework */; }; 387F9A5C1D1B8E32007FA29A /* libicucore.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 387F9A5B1D1B8E32007FA29A /* libicucore.tbd */; }; + 388D5E401EF76CD500C9A2A2 /* PassiveDataKit-Shared.h in Headers */ = {isa = PBXBuildFile; fileRef = 388D5E3F1EF76C5000C9A2A2 /* PassiveDataKit-Shared.h */; settings = {ATTRIBUTES = (Public, ); }; }; 389DE4BC1EF726BB009C8B27 /* Mixpanel.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 389DE4B31EF726B2009C8B27 /* Mixpanel.framework */; }; + 389DE4D21EF7492C009C8B27 /* PDKHttpTransmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = 389DE4D01EF7492C009C8B27 /* PDKHttpTransmitter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 389DE4D31EF7492C009C8B27 /* PDKHttpTransmitter.m in Sources */ = {isa = PBXBuildFile; fileRef = 389DE4D11EF7492C009C8B27 /* PDKHttpTransmitter.m */; }; + 389DE4D61EF74DDA009C8B27 /* NSString+RAInflections.h in Headers */ = {isa = PBXBuildFile; fileRef = 389DE4D41EF74DDA009C8B27 /* NSString+RAInflections.h */; }; + 389DE4D71EF74DDA009C8B27 /* NSString+RAInflections.m in Sources */ = {isa = PBXBuildFile; fileRef = 389DE4D51EF74DDA009C8B27 /* NSString+RAInflections.m */; }; + 389DE4DE1EF75ADB009C8B27 /* PDKBaseGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 389DE4DC1EF75ADB009C8B27 /* PDKBaseGenerator.h */; }; + 389DE4DF1EF75ADB009C8B27 /* PDKBaseGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 389DE4DD1EF75ADB009C8B27 /* PDKBaseGenerator.m */; }; 38A6523C1CDA2D9B00AE8B3B /* PDKLocationGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 38A6523A1CDA2D9B00AE8B3B /* PDKLocationGenerator.h */; }; 38A6523D1CDA2D9B00AE8B3B /* PDKLocationGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 38A6523B1CDA2D9B00AE8B3B /* PDKLocationGenerator.m */; }; 38A652431CDA30DB00AE8B3B /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 38A652421CDA30DB00AE8B3B /* CoreLocation.framework */; }; - 38C666B01D037FCF00E6A6C8 /* PDKDataPointsManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 38C666AE1D037FCF00E6A6C8 /* PDKDataPointsManager.h */; }; - 38C666B11D037FCF00E6A6C8 /* PDKDataPointsManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 38C666AF1D037FCF00E6A6C8 /* PDKDataPointsManager.m */; }; 38C666B31D0380CD00E6A6C8 /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 38C666B21D0380CD00E6A6C8 /* libsqlite3.tbd */; }; 38C666D71D038A8E00E6A6C8 /* PDKAFAutoPurgingImageCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 38C666B61D038A8E00E6A6C8 /* PDKAFAutoPurgingImageCache.h */; }; 38C666D81D038A8E00E6A6C8 /* PDKAFAutoPurgingImageCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 38C666B71D038A8E00E6A6C8 /* PDKAFAutoPurgingImageCache.m */; }; @@ -146,12 +151,18 @@ 387F9A561D1B8AF3007FA29A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 387F9A581D1B8AF9007FA29A /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 387F9A5B1D1B8E32007FA29A /* libicucore.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libicucore.tbd; path = usr/lib/libicucore.tbd; sourceTree = SDKROOT; }; + 388D5E3F1EF76C5000C9A2A2 /* PassiveDataKit-Shared.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PassiveDataKit-Shared.h"; sourceTree = ""; }; 389DE4AA1EF726B2009C8B27 /* Mixpanel.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Mixpanel.xcodeproj; path = "mixpanel-iphone/Mixpanel.xcodeproj"; sourceTree = ""; }; + 389DE4D01EF7492C009C8B27 /* PDKHttpTransmitter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PDKHttpTransmitter.h; sourceTree = ""; }; + 389DE4D11EF7492C009C8B27 /* PDKHttpTransmitter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PDKHttpTransmitter.m; sourceTree = ""; }; + 389DE4D41EF74DDA009C8B27 /* NSString+RAInflections.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+RAInflections.h"; sourceTree = ""; }; + 389DE4D51EF74DDA009C8B27 /* NSString+RAInflections.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+RAInflections.m"; sourceTree = ""; }; + 389DE4DC1EF75ADB009C8B27 /* PDKBaseGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PDKBaseGenerator.h; sourceTree = ""; }; + 389DE4DD1EF75ADB009C8B27 /* PDKBaseGenerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PDKBaseGenerator.m; sourceTree = ""; }; + 389DE4E01EF76597009C8B27 /* PassiveDataKit.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = PassiveDataKit.modulemap; sourceTree = ""; }; 38A6523A1CDA2D9B00AE8B3B /* PDKLocationGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PDKLocationGenerator.h; sourceTree = ""; }; 38A6523B1CDA2D9B00AE8B3B /* PDKLocationGenerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PDKLocationGenerator.m; sourceTree = ""; }; 38A652421CDA30DB00AE8B3B /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; - 38C666AE1D037FCF00E6A6C8 /* PDKDataPointsManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PDKDataPointsManager.h; sourceTree = ""; }; - 38C666AF1D037FCF00E6A6C8 /* PDKDataPointsManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PDKDataPointsManager.m; sourceTree = ""; }; 38C666B21D0380CD00E6A6C8 /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; }; 38C666B61D038A8E00E6A6C8 /* PDKAFAutoPurgingImageCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PDKAFAutoPurgingImageCache.h; sourceTree = ""; }; 38C666B71D038A8E00E6A6C8 /* PDKAFAutoPurgingImageCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PDKAFAutoPurgingImageCache.m; sourceTree = ""; }; @@ -256,12 +267,13 @@ 3842F7331CDA2021007F843D /* PassiveDataKit */ = { isa = PBXGroup; children = ( + 389DE4E01EF76597009C8B27 /* PassiveDataKit.modulemap */, + 388D5E3F1EF76C5000C9A2A2 /* PassiveDataKit-Shared.h */, 38C666B41D038A8E00E6A6C8 /* Third Party */, 38C666AD1D037FA700E6A6C8 /* Generators */, + 389DE4CA1EF748EB009C8B27 /* Transmitters */, 3842F7341CDA2021007F843D /* PassiveDataKit.h */, 3842F7551CDA20FE007F843D /* PassiveDataKit.m */, - 38C666AE1D037FCF00E6A6C8 /* PDKDataPointsManager.h */, - 38C666AF1D037FCF00E6A6C8 /* PDKDataPointsManager.m */, 383ECC511D1F4F41004E0B2B /* PDKDataReportViewController.h */, 383ECC521D1F4F41004E0B2B /* PDKDataReportViewController.m */, ); @@ -289,6 +301,15 @@ name = Products; sourceTree = ""; }; + 389DE4CA1EF748EB009C8B27 /* Transmitters */ = { + isa = PBXGroup; + children = ( + 389DE4D01EF7492C009C8B27 /* PDKHttpTransmitter.h */, + 389DE4D11EF7492C009C8B27 /* PDKHttpTransmitter.m */, + ); + name = Transmitters; + sourceTree = ""; + }; 38A652441CDA30E800AE8B3B /* Frameworks */ = { isa = PBXGroup; children = ( @@ -308,16 +329,16 @@ 38C666AD1D037FA700E6A6C8 /* Generators */ = { isa = PBXGroup; children = ( + 38DC94851D2346EC00552259 /* View Controllers */, 38DC949C1D2711B900552259 /* Services */, - 38DC94851D2346EC00552259 /* ViewControllers */, 38A6523A1CDA2D9B00AE8B3B /* PDKLocationGenerator.h */, 38A6523B1CDA2D9B00AE8B3B /* PDKLocationGenerator.m */, 383ECC641D1F816D004E0B2B /* PDKEventsGenerator.h */, 383ECC651D1F816D004E0B2B /* PDKEventsGenerator.m */, 383ECC681D1F82F5004E0B2B /* PDKMixpanelEventGenerator.h */, 383ECC691D1F82F5004E0B2B /* PDKMixpanelEventGenerator.m */, - 383ECC6C1D1F9915004E0B2B /* PDKLocationAnnotation.h */, - 383ECC6D1D1F9915004E0B2B /* PDKLocationAnnotation.m */, + 389DE4DC1EF75ADB009C8B27 /* PDKBaseGenerator.h */, + 389DE4DD1EF75ADB009C8B27 /* PDKBaseGenerator.m */, ); name = Generators; sourceTree = ""; @@ -327,6 +348,8 @@ children = ( 389DE4AA1EF726B2009C8B27 /* Mixpanel.xcodeproj */, 38C666B51D038A8E00E6A6C8 /* AFNetworking */, + 389DE4D41EF74DDA009C8B27 /* NSString+RAInflections.h */, + 389DE4D51EF74DDA009C8B27 /* NSString+RAInflections.m */, ); name = "Third Party"; path = "Third-Party"; @@ -372,15 +395,17 @@ path = AFNetworking; sourceTree = ""; }; - 38DC94851D2346EC00552259 /* ViewControllers */ = { + 38DC94851D2346EC00552259 /* View Controllers */ = { isa = PBXGroup; children = ( 38DC94861D23470C00552259 /* PDKLocationGeneratorViewController.h */, 38DC94871D23470C00552259 /* PDKLocationGeneratorViewController.m */, 38DC94A51D281A7300552259 /* PDKEventsGeneratorViewController.h */, 38DC94A61D281A7300552259 /* PDKEventsGeneratorViewController.m */, + 383ECC6C1D1F9915004E0B2B /* PDKLocationAnnotation.h */, + 383ECC6D1D1F9915004E0B2B /* PDKLocationAnnotation.m */, ); - name = ViewControllers; + name = "View Controllers"; sourceTree = ""; }; 38DC949C1D2711B900552259 /* Services */ = { @@ -399,16 +424,23 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 38C666B01D037FCF00E6A6C8 /* PDKDataPointsManager.h in Headers */, + 388D5E401EF76CD500C9A2A2 /* PassiveDataKit-Shared.h in Headers */, + 3842F7351CDA2021007F843D /* PassiveDataKit.h in Headers */, + 389DE4D21EF7492C009C8B27 /* PDKHttpTransmitter.h in Headers */, 38C666D91D038A8E00E6A6C8 /* PDKAFHTTPSessionManager.h in Headers */, + 38A6523C1CDA2D9B00AE8B3B /* PDKLocationGenerator.h in Headers */, + 383ECC6A1D1F82F5004E0B2B /* PDKMixpanelEventGenerator.h in Headers */, + 383ECC661D1F816D004E0B2B /* PDKEventsGenerator.h in Headers */, + 38DC949F1D2711C600552259 /* PDKGooglePlacesGenerator.h in Headers */, 38C666E41D038A8E00E6A6C8 /* PDKAFURLRequestSerialization.h in Headers */, 38C666E01D038A8E00E6A6C8 /* PDKAFNetworkReachabilityManager.h in Headers */, 38C666E21D038A8E00E6A6C8 /* PDKAFSecurityPolicy.h in Headers */, 38C666EA1D038A8E00E6A6C8 /* UIActivityIndicatorView+PDKAFNetworking.h in Headers */, + 389DE4D61EF74DDA009C8B27 /* NSString+RAInflections.h in Headers */, 38C666F11D038A8E00E6A6C8 /* UIKit+PDKAFNetworking.h in Headers */, + 389DE4DE1EF75ADB009C8B27 /* PDKBaseGenerator.h in Headers */, 38C666E81D038A8E00E6A6C8 /* PDKAFURLSessionManager.h in Headers */, 38C666F61D038A8E00E6A6C8 /* UIWebView+PDKAFNetworking.h in Headers */, - 38DC949F1D2711C600552259 /* PDKGooglePlacesGenerator.h in Headers */, 38C666DD1D038A8E00E6A6C8 /* PDKAFNetworkActivityIndicatorManager.h in Headers */, 38C666EE1D038A8E00E6A6C8 /* UIImage+PDKAFNetworking.h in Headers */, 383ECC531D1F4F41004E0B2B /* PDKDataReportViewController.h in Headers */, @@ -423,10 +455,6 @@ 38C666F41D038A8E00E6A6C8 /* UIRefreshControl+PDKAFNetworking.h in Headers */, 383ECC6E1D1F9915004E0B2B /* PDKLocationAnnotation.h in Headers */, 38C666D71D038A8E00E6A6C8 /* PDKAFAutoPurgingImageCache.h in Headers */, - 3842F7351CDA2021007F843D /* PassiveDataKit.h in Headers */, - 38A6523C1CDA2D9B00AE8B3B /* PDKLocationGenerator.h in Headers */, - 383ECC6A1D1F82F5004E0B2B /* PDKMixpanelEventGenerator.h in Headers */, - 383ECC661D1F816D004E0B2B /* PDKEventsGenerator.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -575,7 +603,6 @@ 383ECC671D1F816D004E0B2B /* PDKEventsGenerator.m in Sources */, 38C666F31D038A8E00E6A6C8 /* UIProgressView+PDKAFNetworking.m in Sources */, 383ECC6F1D1F9915004E0B2B /* PDKLocationAnnotation.m in Sources */, - 38C666B11D037FCF00E6A6C8 /* PDKDataPointsManager.m in Sources */, 38C666F71D038A8E00E6A6C8 /* UIWebView+PDKAFNetworking.m in Sources */, 38C666F01D038A8E00E6A6C8 /* UIImageView+PDKAFNetworking.m in Sources */, 38C666E31D038A8E00E6A6C8 /* PDKAFSecurityPolicy.m in Sources */, @@ -589,6 +616,7 @@ 38C666D81D038A8E00E6A6C8 /* PDKAFAutoPurgingImageCache.m in Sources */, 38C666DE1D038A8E00E6A6C8 /* PDKAFNetworkActivityIndicatorManager.m in Sources */, 38DC94A01D2711C600552259 /* PDKGooglePlacesGenerator.m in Sources */, + 389DE4D31EF7492C009C8B27 /* PDKHttpTransmitter.m in Sources */, 383ECC6B1D1F82F5004E0B2B /* PDKMixpanelEventGenerator.m in Sources */, 38C666E51D038A8E00E6A6C8 /* PDKAFURLRequestSerialization.m in Sources */, 38C666E91D038A8E00E6A6C8 /* PDKAFURLSessionManager.m in Sources */, @@ -597,6 +625,8 @@ 38C666E11D038A8E00E6A6C8 /* PDKAFNetworkReachabilityManager.m in Sources */, 38C666DC1D038A8E00E6A6C8 /* PDKAFImageDownloader.m in Sources */, 38C666EB1D038A8E00E6A6C8 /* UIActivityIndicatorView+PDKAFNetworking.m in Sources */, + 389DE4DF1EF75ADB009C8B27 /* PDKBaseGenerator.m in Sources */, + 389DE4D71EF74DDA009C8B27 /* NSString+RAInflections.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -726,6 +756,7 @@ INFOPLIST_FILE = PassiveDataKit/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = PassiveDataKit/PassiveDataKit.modulemap; PRODUCT_BUNDLE_IDENTIFIER = "com.audacious-software.PassiveDataKit"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -745,6 +776,7 @@ INFOPLIST_FILE = PassiveDataKit/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = PassiveDataKit/PassiveDataKit.modulemap; PRODUCT_BUNDLE_IDENTIFIER = "com.audacious-software.PassiveDataKit"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; diff --git a/PassiveDataKit/PDKBaseGenerator.h b/PassiveDataKit/PDKBaseGenerator.h new file mode 100644 index 0000000..37f9e6f --- /dev/null +++ b/PassiveDataKit/PDKBaseGenerator.h @@ -0,0 +1,15 @@ +// +// PDKBaseGenerator.h +// PassiveDataKit +// +// Created by Chris Karr on 6/18/17. +// Copyright © 2017 Audacious Software. All rights reserved. +// + +@import Foundation; + +#import "PassiveDataKit.h" + +@interface PDKBaseGenerator : NSObject + +@end diff --git a/PassiveDataKit/PDKBaseGenerator.m b/PassiveDataKit/PDKBaseGenerator.m new file mode 100644 index 0000000..49d2b79 --- /dev/null +++ b/PassiveDataKit/PDKBaseGenerator.m @@ -0,0 +1,32 @@ +// +// PDKBaseGenerator.m +// PassiveDataKit +// +// Created by Chris Karr on 6/18/17. +// Copyright © 2017 Audacious Software. All rights reserved. +// + +#import "PDKBaseGenerator.h" + +#define GENERATOR_ID @"pdk-base-generator" + +@implementation PDKBaseGenerator + +- (NSString *) fullGeneratorName { + return [NSString stringWithFormat:@"%@: %@", [self generatorId], [[PassiveDataKit sharedInstance] userAgent]]; +} + +- (NSString *) generatorId { + return GENERATOR_ID; +} + +- (void) updateOptions:(NSDictionary *) options { + +} + +- (UIView *) visualizationForSize:(CGSize) size { + return nil; +} + + +@end diff --git a/PassiveDataKit/PDKDataPointsManager.h b/PassiveDataKit/PDKDataPointsManager.h deleted file mode 100644 index 651301d..0000000 --- a/PassiveDataKit/PDKDataPointsManager.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// PDKEventManager.h -// PassiveDataKit -// -// Created by Chris Karr on 6/4/16. -// Copyright © 2016 Audacious Software. All rights reserved. -// - -@import Foundation; - -@interface PDKDataPointsManager : NSObject - -+ (PDKDataPointsManager *) sharedInstance; - -- (BOOL) logDataPoint:(NSString *) generator generatorId:(NSString *) generatorId source:(NSString *) source properties:(NSDictionary *) properties; -- (BOOL) logEvent:(NSString *) eventName properties:(NSDictionary *) properties; - -- (void) uploadDataPoints:(NSURL *) url window:(NSTimeInterval) uploadWindow complete:(void (^)(BOOL success, int uploaded)) completed; - -@end diff --git a/PassiveDataKit/PDKDataPointsManager.m b/PassiveDataKit/PDKDataPointsManager.m deleted file mode 100644 index 657afbb..0000000 --- a/PassiveDataKit/PDKDataPointsManager.m +++ /dev/null @@ -1,305 +0,0 @@ -// -// PDKEventManager.m -// PassiveDataKit -// -// Created by Chris Karr on 6/4/16. -// Copyright © 2016 Audacious Software. All rights reserved. -// - -#import - -@import Mixpanel; - -#import "PassiveDataKit.h" -#import "PDKAFHTTPSessionManager.h" -#import "PDKDataPointsManager.h" -#import "PDKMixpanelEventGenerator.h" -#import "PDKEventsGenerator.h" - -@interface PDKDataPointsManager () - -@property sqlite3 * database; - -@end - -@implementation PDKDataPointsManager - -static PDKDataPointsManager * sharedObject = nil; - -+ (PDKDataPointsManager *) sharedInstance -{ - static dispatch_once_t _singletonPredicate; - - dispatch_once(&_singletonPredicate, ^{ - sharedObject = [[super allocWithZone:nil] init]; - - }); - - return sharedObject; -} - -+ (id) allocWithZone:(NSZone *) zone //!OCLINT -{ - return [self sharedInstance]; -} - -- (id) init -{ - if (self = [super init]) - { - self.database = [self openDatabase]; - } - - return self; -} - -- (BOOL) logEvent:(NSString *) eventName properties:(NSDictionary *) properties { - NSMutableDictionary * payload = [NSMutableDictionary dictionary]; - - if (properties != nil) { - [payload addEntriesFromDictionary:properties]; - } - - payload[@"event"] = eventName; - - if ([[PassiveDataKit sharedInstance] mixpanelEnabled]) { - Mixpanel * mixpanel = [Mixpanel sharedInstanceWithToken:[[NSUserDefaults standardUserDefaults] stringForKey:PDKMixpanelToken]]; - - [mixpanel identify:[[PassiveDataKit sharedInstance] identifierForUser]]; - - NSMutableDictionary * info = [NSMutableDictionary dictionaryWithDictionary:[[NSBundle mainBundle] infoDictionary]]; - - if (info[@"CFBundleName"] == nil) { - info[@"CFBundleName"] = @"Passive Data Kit"; - } - - if (info[@"CFBundleShortVersionString"] == nil) { - info[@"CFBundleShortVersionString"] = @"1.0"; - } - - payload[@"$browser"] = info[@"CFBundleName"]; - payload[@"$browser_version"] = info[@"CFBundleShortVersionString"]; - - if (mixpanel != nil) { - [mixpanel track:eventName properties:payload]; - } - - [PDKMixpanelEventGenerator logForReview:payload]; - } - - [PDKEventsGenerator logForReview:payload]; - - return [self logDataPoint:nil generatorId:nil source:nil properties:payload]; -} - -- (BOOL) logDataPoint:(NSString *) generator generatorId:(NSString *) generatorId source:(NSString *) source properties:(NSDictionary *) properties { - if (source == nil) { - source = [[PassiveDataKit sharedInstance] identifierForUser]; //!OCLINT - } - - if (generator == nil) { - generator = [[PassiveDataKit sharedInstance] generator]; //!OCLINT - } - - if (generatorId == nil) { - generatorId = [[PassiveDataKit sharedInstance] generatorId]; //!OCLINT - } - - NSDate * now = [NSDate date]; - - if (properties == nil) { - properties = @{}; //!OCLINT - } - - sqlite3_stmt * stmt; - - NSString * insert = @"INSERT INTO data (source, generator, generatorId, timestamp, properties) VALUES (?, ?, ?, ?, ?);"; - - if(sqlite3_prepare_v2(self.database, [insert UTF8String], -1, &stmt, NULL) == SQLITE_OK) { - sqlite3_bind_text(stmt, 1, [source UTF8String], -1, SQLITE_TRANSIENT); - sqlite3_bind_text(stmt, 2, [generator UTF8String], -1, SQLITE_TRANSIENT); - sqlite3_bind_text(stmt, 3, [generatorId UTF8String], -1, SQLITE_TRANSIENT); - sqlite3_bind_double(stmt, 4, now.timeIntervalSince1970); - - NSError * err = nil; - NSData * jsonData = [NSJSONSerialization dataWithJSONObject:properties options:0 error:&err]; - NSString * jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; - - sqlite3_bind_text(stmt, 5, [jsonString UTF8String], -1, SQLITE_TRANSIENT); - - if (SQLITE_DONE != sqlite3_step(stmt)) { - NSLog(@"Error while inserting data. '%s'", sqlite3_errmsg(self.database)); - - return NO; - } - - sqlite3_finalize(stmt); - } - - return YES; -} - -- (void) uploadDataPoints:(NSURL *) url window:(NSTimeInterval) uploadWindow complete:(void (^)(BOOL success, int uploaded)) completed { //!OCLINT - if (uploadWindow == 0) { - uploadWindow = 5; //!OCLINT - } - - NSTimeInterval now = [NSDate date].timeIntervalSince1970; - - sqlite3_stmt * statement = NULL; - - NSString * querySQL = @"SELECT D.id, D.source, D.generator, D.generatorId, D.timestamp, D.properties FROM data D WHERE (D.timestamp < ?) LIMIT 16"; - - const char * query_stmt = [querySQL UTF8String]; - - if (sqlite3_prepare_v2(self.database, query_stmt, -1, &statement, NULL) == SQLITE_OK) - { - sqlite3_bind_double(statement, 1, now); - - NSMutableArray * payload = [NSMutableArray array]; - NSMutableArray * uploaded = [NSMutableArray array]; - - while (sqlite3_step(statement) == SQLITE_ROW) - { - NSInteger pointId = sqlite3_column_int(statement, 0); - - NSString * source = [[NSString alloc] initWithUTF8String:(const char *) sqlite3_column_text(statement, 1)]; - NSString * generator = [[NSString alloc] initWithUTF8String:(const char *) sqlite3_column_text(statement, 2)]; - NSString * generatorId = [[NSString alloc] initWithUTF8String:(const char *) sqlite3_column_text(statement, 3)]; - NSTimeInterval timestamp = sqlite3_column_double(statement, 4); - NSString * jsonString = [[NSString alloc] initWithUTF8String:(const char *) sqlite3_column_text(statement, 5)]; - - NSError * error = nil; - - NSMutableDictionary * dataPoint = [NSJSONSerialization JSONObjectWithData:[jsonString dataUsingEncoding:NSUTF8StringEncoding] - options:(NSJSONReadingMutableContainers | NSJSONReadingMutableLeaves) - error:&error]; - if (error == nil) { - NSMutableDictionary * metadata = [NSMutableDictionary dictionary]; - metadata[@"source"] = source; - metadata[@"generator-id"] = generatorId; - metadata[@"generator"] = generator; - metadata[@"timestamp"] = [NSNumber numberWithDouble:timestamp]; - - [uploaded addObject:[NSNumber numberWithInteger:pointId]]; - - dataPoint[@"passive-data-metadata"] = metadata; - - [payload addObject:dataPoint]; - } - else { - completed(NO, 0); - - return; - } - } - - sqlite3_finalize(statement); - - NSMutableURLRequest *req = [[PDKAFJSONRequestSerializer serializer] requestWithMethod:@"CREATE" - URLString:[url description] - parameters:payload - error:nil]; - [req setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; - [req setValue:@"application/json" forHTTPHeaderField:@"Accept"]; - - PDKAFURLSessionManager * manager = [[PDKAFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]]; - - [[manager dataTaskWithRequest:req - uploadProgress:nil - downloadProgress:nil - completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) { - if ([responseObject containsObject:@"Data bundle added successfully, and ready for processing."] == NO) { - NSLog(@"Invalid response: %@", responseObject); - - completed(NO, 0); - } - else if (error == nil) { - for (NSNumber * identifier in uploaded) { - sqlite3_stmt * deleteStatement = NULL; - - NSString * deleteSQL = @"DELETE FROM data WHERE (id = ?)"; - - const char * delete_stmt = [deleteSQL UTF8String]; - - if (sqlite3_prepare_v2(self.database, delete_stmt, -1, &deleteStatement, NULL) == SQLITE_OK) - { - sqlite3_bind_int(deleteStatement, 1, [identifier intValue]); - - while (sqlite3_step(deleteStatement) == SQLITE_ROW) { //!OCLINT - - } - - sqlite3_finalize(deleteStatement); - } else { - NSLog(@"Error while deleting data. '%s'", sqlite3_errmsg(self.database)); - - completed(NO, 0); - - return; - } - } - - completed(YES, (int) uploaded.count); - - NSTimeInterval interval = [NSDate date].timeIntervalSince1970 - now; - - if (uploadWindow > 0 && interval > uploadWindow && uploaded.count > 0) { - [self uploadDataPoints:url window:(uploadWindow - interval) complete:completed]; - } - } else { - completed(NO, 0); - } - - }] resume]; - } - else { - completed(NO, 0); - } -} - -- (NSString *) databasePath -{ - NSArray * paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); - - NSString * cachePath = paths[0]; - - NSString * dbPath = [cachePath stringByAppendingPathComponent:@"data.sqlite3"]; - - return dbPath; -} - -- (sqlite3 *) openDatabase { - NSString * dbPath = [self databasePath]; - - if ([[NSFileManager defaultManager] fileExistsAtPath:dbPath] == NO) - { - sqlite3 * database = NULL; - - const char * path = [dbPath UTF8String]; - - if (sqlite3_open(path, &database) == SQLITE_OK) { - char * error; - - const char * createStatement = "CREATE TABLE IF NOT EXISTS data (id INTEGER PRIMARY KEY AUTOINCREMENT, source TEXT, generator TEXT, generatorId TEXT, timestamp REAL, properties TEXT)"; - - if (sqlite3_exec(database, createStatement, NULL, NULL, &error) != SQLITE_OK) { //!OCLINT - - } - - sqlite3_close(database); - } - } - - const char * dbpath = [dbPath UTF8String]; - - sqlite3 * database = NULL; - - if (sqlite3_open(dbpath, &database) == SQLITE_OK) { - return database; - } - - return NULL; -} - -@end diff --git a/PassiveDataKit/PDKDataReportViewController.m b/PassiveDataKit/PDKDataReportViewController.m index 6bee219..ee09854 100644 --- a/PassiveDataKit/PDKDataReportViewController.m +++ b/PassiveDataKit/PDKDataReportViewController.m @@ -70,9 +70,11 @@ - (void) loadVisualization:(NSString *) generator { } else { Class generatorClass = NSClassFromString(generator); + id generator = [generatorClass sharedInstance]; + if (generatorClass != nil) { if ([generatorClass respondsToSelector:@selector(visualizationForSize:)]) { - visualization = [generatorClass visualizationForSize:self.detailsView.bounds.size]; + visualization = [generator visualizationForSize:self.detailsView.bounds.size]; } } diff --git a/PassiveDataKit/PDKEventsGenerator.h b/PassiveDataKit/PDKEventsGenerator.h index 9a00683..88d7240 100644 --- a/PassiveDataKit/PDKEventsGenerator.h +++ b/PassiveDataKit/PDKEventsGenerator.h @@ -8,11 +8,17 @@ @import UIKit; -@interface PDKEventsGenerator : NSObject +#import "PassiveDataKit.h" + +#import "PDKBaseGenerator.h" + +@interface PDKEventsGenerator : PDKBaseGenerator extern NSString *const PDKEventsGeneratorEnabled; extern NSString *const PDKEventsGeneratorCanDisable; -+ (void) logForReview:(NSDictionary *) payload; ++ (PDKEventsGenerator *) sharedInstance; + +- (void) logEvent:(NSString *) eventName properties:(NSDictionary *) properties; @end diff --git a/PassiveDataKit/PDKEventsGenerator.m b/PassiveDataKit/PDKEventsGenerator.m index 9ab7c78..70f767f 100644 --- a/PassiveDataKit/PDKEventsGenerator.m +++ b/PassiveDataKit/PDKEventsGenerator.m @@ -8,9 +8,13 @@ @import UIKit; +#import "PassiveDataKit.h" + #import "PDKEventsGenerator.h" #import "PDKEventsGeneratorViewController.h" +#define GENERATOR_ID @"pdk-app-event" + NSString * const PDKEventsGeneratorEnabled = @"PDKEventsGeneratorEnabled"; //!OCLINT NSString * const PDKEventsGeneratorCanDisable = @"PDKEventsGeneratorCanDisable"; //!OCLINT @@ -18,8 +22,7 @@ @implementation PDKEventsGenerator static PDKEventsGenerator * sharedObject = nil; -+ (PDKEventsGenerator *) sharedInstance -{ ++ (PDKEventsGenerator *) sharedInstance { static dispatch_once_t _singletonPredicate; dispatch_once(&_singletonPredicate, ^{ @@ -30,18 +33,15 @@ + (PDKEventsGenerator *) sharedInstance return sharedObject; } -+ (id) allocWithZone:(NSZone *) zone //!OCLINT -{ ++ (id) allocWithZone:(NSZone *) zone { //!OCLINT return [self sharedInstance]; } -+ (UIView *) visualizationForSize:(CGSize) size { - PDKEventsGenerator * generator = [PDKEventsGenerator sharedInstance]; - +- (UIView *) visualizationForSize:(CGSize) size { UITableView * tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, size.width, size.height)]; - tableView.dataSource = generator; - tableView.delegate = generator; + tableView.dataSource = self; + tableView.delegate = self; return tableView; } @@ -75,7 +75,15 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger return reviewPoints.count; } -+ (void) logForReview:(NSDictionary *) payload { +- (void) logEvent:(NSString *) eventName properties:(NSDictionary *) properties { + NSMutableDictionary * event = [NSMutableDictionary dictionaryWithDictionary:properties]; + + NSDate * recorded = [NSDate date]; + + event[@"event_name"] = eventName; + event[@"event_details"] = properties; + event[@"observed"] = [NSNumber numberWithDouble:(1000 * recorded.timeIntervalSince1970)]; + NSUserDefaults * defaults = [NSUserDefaults standardUserDefaults]; NSString * key = @"PDKEventGeneratorReviewPoints"; @@ -92,10 +100,7 @@ + (void) logForReview:(NSDictionary *) payload { } } - NSMutableDictionary * reviewPoint = [NSMutableDictionary dictionaryWithDictionary:payload]; - [reviewPoint setValue:[NSDate date] forKey:@"recorded"]; - - [newPoints addObject:reviewPoint]; + [newPoints addObject:event]; [newPoints sortUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) { return [obj2[@"recorded"] compare:obj1[@"recorded"]]; @@ -107,11 +112,17 @@ + (void) logForReview:(NSDictionary *) payload { [defaults setValue:newPoints forKey:key]; [defaults synchronize]; + + [[PassiveDataKit sharedInstance] receivedData:event forGenerator:PDKEvents]; } + (UIViewController *) detailsController { return [[PDKEventsGeneratorViewController alloc] init]; } +- (NSString *) generatorId { + return GENERATOR_ID; +} + @end diff --git a/PassiveDataKit/PDKGooglePlacesGenerator.h b/PassiveDataKit/PDKGooglePlacesGenerator.h index 9e1bd22..177dc05 100644 --- a/PassiveDataKit/PDKGooglePlacesGenerator.h +++ b/PassiveDataKit/PDKGooglePlacesGenerator.h @@ -9,8 +9,9 @@ #import #import "PassiveDataKit.h" +#import "PDKBaseGenerator.h" -@interface PDKGooglePlacesGenerator : NSObject +@interface PDKGooglePlacesGenerator : PDKBaseGenerator + (PDKGooglePlacesGenerator *) sharedInstance; diff --git a/PassiveDataKit/PDKGooglePlacesGenerator.m b/PassiveDataKit/PDKGooglePlacesGenerator.m index 8d5289f..7afec28 100644 --- a/PassiveDataKit/PDKGooglePlacesGenerator.m +++ b/PassiveDataKit/PDKGooglePlacesGenerator.m @@ -12,6 +12,7 @@ #import "PDKAFHTTPSessionManager.h" #import "PDKGooglePlacesGenerator.h" +#import "PDKLocationGenerator.h" @interface PDKGooglePlacesGenerator () @@ -94,7 +95,9 @@ - (void) addListener:(id)listener options:(NSDictionary *) opti [self transmitPlacesForFreetextQuery:self.lastOptions[PDKGooglePlacesFreetextQuery]]; } else { if (self.listeners.count == 1) { - [[PassiveDataKit sharedInstance] registerListener:self forGenerator:PDKLocation options:options]; + [[PassiveDataKit sharedInstance] registerListener:self forGenerator:PDKLocation]; + + [[PDKLocationGenerator sharedInstance] updateOptions:options]; } } } @@ -304,7 +307,7 @@ - (void) receivedData:(NSDictionary *) data forGenerator:(PDKDataGenerator) data [self transmitPlacesForLocation:[data valueForKey:PDKLocationInstance]]; } -+ (UIView *) visualizationForSize:(CGSize) size { +- (UIView *) visualizationForSize:(CGSize) size { UIView * view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, size.width, size.height)]; view.backgroundColor = [UIColor redColor]; diff --git a/PassiveDataKit/PDKHttpTransmitter.h b/PassiveDataKit/PDKHttpTransmitter.h new file mode 100644 index 0000000..f698745 --- /dev/null +++ b/PassiveDataKit/PDKHttpTransmitter.h @@ -0,0 +1,19 @@ +// +// PDKHttpTransmitter.h +// PassiveDataKit +// +// Created by Chris Karr on 6/18/17. +// Copyright © 2017 Audacious Software. All rights reserved. +// + +#import "PassiveDataKit.h" + +#define PDK_SOURCE_KEY @"source" +#define PDK_TRANSMITTER_ID_KEY @"transmitter-id" +#define PDK_TRANSMITTER_UPLOAD_URL_KEY @"upload-url" +#define PDK_TRANSMITTER_REQUIRE_CHARGING_KEY @"require-charging" +#define PDK_TRANSMITTER_REQUIRE_WIFI_KEY @"require-wifi" + +@interface PDKHttpTransmitter : NSObject + +@end diff --git a/PassiveDataKit/PDKHttpTransmitter.m b/PassiveDataKit/PDKHttpTransmitter.m new file mode 100644 index 0000000..19050e6 --- /dev/null +++ b/PassiveDataKit/PDKHttpTransmitter.m @@ -0,0 +1,340 @@ +// +// PDKHttpTransmitter.m +// PassiveDataKit +// +// Created by Chris Karr on 6/18/17. +// Copyright © 2017 Audacious Software. All rights reserved. +// + +#import +#import + +#import "NSString+RAInflections.h" + +#import "PDKAFURLSessionManager.h" + +#import "PDKHttpTransmitter.h" + +#define PDK_METADATA_KEY @"passive-data-metadata" +#define PDK_GENERATOR_ID_KEY @"generator-id" +#define PDK_GENERATOR_KEY @"generator" +#define PDK_TIMESTAMP_KEY @"timestamp" + +#define PDK_DEFAULT_TRANSMITTER_ID @"http-transmitter" + +typedef enum { + ConnectionTypeUnknown, + ConnectionTypeNone, + ConnectionType3G, + ConnectionTypeWiFi +} ConnectionType; + +@interface PDKHttpTransmitter () + +@property NSString * source; +@property NSString * transmitterId; +@property NSURL * uploadUrl; +@property BOOL requireCharging; +@property BOOL requireWiFi; + +@property sqlite3 * database; + +@end + +@implementation PDKHttpTransmitter + ++ (ConnectionType) connectionType +{ + SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(NULL, "8.8.8.8"); + SCNetworkReachabilityFlags flags; + BOOL success = SCNetworkReachabilityGetFlags(reachability, &flags); + CFRelease(reachability); + if (!success) { + return ConnectionTypeUnknown; + } + BOOL isReachable = ((flags & kSCNetworkReachabilityFlagsReachable) != 0); + BOOL needsConnection = ((flags & kSCNetworkReachabilityFlagsConnectionRequired) != 0); + BOOL isNetworkReachable = (isReachable && !needsConnection); + + if (!isNetworkReachable) { + return ConnectionTypeNone; + } else if ((flags & kSCNetworkReachabilityFlagsIsWWAN) != 0) { + return ConnectionType3G; + } else { + return ConnectionTypeWiFi; + } +} + +- (id) initWithOptions:(NSDictionary *) options { + if (self = [super init]) { + self.source = options[PDK_SOURCE_KEY]; + + self.transmitterId = options[PDK_TRANSMITTER_ID_KEY]; + + if (self.transmitterId == nil) { + self.transmitterId = PDK_DEFAULT_TRANSMITTER_ID; + } + + if (options[PDK_TRANSMITTER_UPLOAD_URL_KEY] != nil) { + self.uploadUrl = [NSURL URLWithString:options[PDK_TRANSMITTER_UPLOAD_URL_KEY]]; + } else { + self.uploadUrl = nil; + } + + if (options[PDK_TRANSMITTER_REQUIRE_CHARGING_KEY] != nil) { + self.requireCharging = [options[PDK_TRANSMITTER_REQUIRE_CHARGING_KEY] boolValue]; + } else { + self.requireCharging = NO; + } + + if (options[PDK_TRANSMITTER_REQUIRE_WIFI_KEY] != nil) { + self.requireWiFi = [options[PDK_TRANSMITTER_REQUIRE_WIFI_KEY] boolValue]; + } else { + self.requireWiFi = NO; + } + + self.database = [self openDatabase]; + + [[PassiveDataKit sharedInstance] registerListener:self forGenerator:PDKAnyGenerator]; + } + + return self; +} + +- (NSString *) databasePath +{ + NSArray * paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); + + NSString * cachePath = paths[0]; + + NSString * filename = [NSString stringWithFormat:@"%@-http-transmitter.sqlite3", [self.transmitterId slugalize], nil]; + + NSString * dbPath = [cachePath stringByAppendingPathComponent:filename]; + + return dbPath; +} + +- (sqlite3 *) openDatabase { + NSString * dbPath = [self databasePath]; + + if ([[NSFileManager defaultManager] fileExistsAtPath:dbPath] == NO) + { + sqlite3 * database = NULL; + + const char * path = [dbPath UTF8String]; + + if (sqlite3_open(path, &database) == SQLITE_OK) { + char * error; + + const char * createStatement = "CREATE TABLE IF NOT EXISTS data (id INTEGER PRIMARY KEY AUTOINCREMENT, timestamp REAL, properties TEXT)"; + + if (sqlite3_exec(database, createStatement, NULL, NULL, &error) != SQLITE_OK) { //!OCLINT + + } + + sqlite3_close(database); + } + } + + const char * dbpath = [dbPath UTF8String]; + + sqlite3 * database = NULL; + + if (sqlite3_open(dbpath, &database) == SQLITE_OK) { + return database; + } + + return NULL; +} + +- (void) transmit:(BOOL) force completionHandler:(void (^)(UIBackgroundFetchResult result)) completionHandler { + if (force == NO && self.requireCharging) { + [UIDevice currentDevice].batteryMonitoringEnabled = YES; + + UIDeviceBatteryState batteryState = [UIDevice currentDevice].batteryState; + + [UIDevice currentDevice].batteryMonitoringEnabled = NO; + + if (batteryState == UIDeviceBatteryStateUnplugged || batteryState == UIDeviceBatteryStateUnknown) { + if (completionHandler != nil) { + completionHandler(UIBackgroundFetchResultNoData); + } + + return; + } + } + + if (force == NO && self.requireWiFi) { + if ([PDKHttpTransmitter connectionType] != ConnectionTypeWiFi) { + if (completionHandler != nil) { + completionHandler(UIBackgroundFetchResultNoData); + } + + return; + } + } + + [self transmitReadings:0 completionHandler:completionHandler]; +} + +- (void) transmitReadings:(NSUInteger) uploadWindow completionHandler:(void (^)(UIBackgroundFetchResult result)) completionHandler { + if (uploadWindow == 0) { + uploadWindow = 8; //!OCLINT + } + + NSTimeInterval now = [NSDate date].timeIntervalSince1970; + + sqlite3_stmt * statement = NULL; + + NSString * querySQL = @"SELECT D.id, D.properties FROM data D WHERE (D.timestamp < ?) LIMIT 16"; + + const char * query_stmt = [querySQL UTF8String]; + + if (sqlite3_prepare_v2(self.database, query_stmt, -1, &statement, NULL) == SQLITE_OK) + { + sqlite3_bind_double(statement, 1, now); + + NSMutableArray * payload = [NSMutableArray array]; + NSMutableArray * uploaded = [NSMutableArray array]; + + while (sqlite3_step(statement) == SQLITE_ROW) + { + NSInteger pointId = sqlite3_column_int(statement, 0); + NSString * jsonString = [[NSString alloc] initWithUTF8String:(const char *) sqlite3_column_text(statement, 1)]; + + NSError * error = nil; + + NSMutableDictionary * dataPoint = [NSJSONSerialization JSONObjectWithData:[jsonString dataUsingEncoding:NSUTF8StringEncoding] + options:(NSJSONReadingMutableContainers | NSJSONReadingMutableLeaves) + error:&error]; + if (error == nil) { + [uploaded addObject:[NSNumber numberWithInteger:pointId]]; + [payload addObject:dataPoint]; + } + else { + NSLog(@"Error fetching from PDKHttpTranmitter database: %@", error); + + if (completionHandler != nil) { + completionHandler(UIBackgroundFetchResultFailed); + } + + return; + } + } + + sqlite3_finalize(statement); + + NSMutableURLRequest *req = [[PDKAFJSONRequestSerializer serializer] requestWithMethod:@"CREATE" + URLString:[self.uploadUrl description] + parameters:payload + error:nil]; + [req setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; + [req setValue:@"application/json" forHTTPHeaderField:@"Accept"]; + + NSLog(@"UPLOADING PAYLOAD: %@", payload); + + PDKAFURLSessionManager * manager = [[PDKAFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]]; + + [[manager dataTaskWithRequest:req + uploadProgress:nil + downloadProgress:nil + completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) { + if ([responseObject containsObject:@"Data bundle added successfully, and ready for processing."] == NO) { + NSLog(@"Invalid response: %@", responseObject); + } + else if (error == nil) { + for (NSNumber * identifier in uploaded) { + sqlite3_stmt * deleteStatement = NULL; + + NSString * deleteSQL = @"DELETE FROM data WHERE (id = ?)"; + + const char * delete_stmt = [deleteSQL UTF8String]; + + if (sqlite3_prepare_v2(self.database, delete_stmt, -1, &deleteStatement, NULL) == SQLITE_OK) + { + sqlite3_bind_int(deleteStatement, 1, [identifier intValue]); + + while (sqlite3_step(deleteStatement) == SQLITE_ROW) { //!OCLINT + + } + + sqlite3_finalize(deleteStatement); + } else { + if (completionHandler != nil) { + completionHandler(UIBackgroundFetchResultFailed); + } + + NSLog(@"Error while deleting data. '%s'", sqlite3_errmsg(self.database)); + + return; + } + } + + NSTimeInterval interval = [NSDate date].timeIntervalSince1970 - now; + + if (uploadWindow > 0 && interval > uploadWindow && uploaded.count > 0) { + [self transmitReadings:(uploadWindow - interval) completionHandler:completionHandler]; + } else { + if (completionHandler != nil) { + completionHandler(UIBackgroundFetchResultNewData); + } + + } + } + + }] resume]; + } +} + +- (NSUInteger) pendingSize { + return -1; +} + +- (NSUInteger) transmittedSize { + return -1; +} + +- (void) receivedData:(NSDictionary *) data forGenerator:(PDKDataGenerator) dataGenerator { + NSMutableDictionary * toStore = [NSMutableDictionary dictionaryWithDictionary:data]; + + if (toStore[PDK_METADATA_KEY] == nil) { + NSMutableDictionary * metadata = [NSMutableDictionary dictionary]; + + id generator = [[PassiveDataKit sharedInstance] generatorInstance:dataGenerator]; + + metadata[PDK_GENERATOR_ID_KEY] = [generator generatorId]; + metadata[PDK_GENERATOR_KEY] = [generator fullGeneratorName]; + + if (self.source != nil) { + metadata[PDK_SOURCE_KEY] = self.source; + } else { + metadata[PDK_SOURCE_KEY] = [[PassiveDataKit sharedInstance] identifierForUser]; + } + + metadata[PDK_TIMESTAMP_KEY] = [NSNumber numberWithDouble:[NSDate date].timeIntervalSince1970]; + + toStore[PDK_METADATA_KEY] = metadata; + } + + sqlite3_stmt * stmt; + + NSString * insert = @"INSERT INTO data (timestamp, properties) VALUES (?, ?);"; + + if(sqlite3_prepare_v2(self.database, [insert UTF8String], -1, &stmt, NULL) == SQLITE_OK) { + sqlite3_bind_double(stmt, 1, [toStore[PDK_METADATA_KEY][PDK_TIMESTAMP_KEY] doubleValue]); + + NSError * err = nil; + NSData * jsonData = [NSJSONSerialization dataWithJSONObject:toStore options:0 error:&err]; + NSString * jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; + + sqlite3_bind_text(stmt, 2, [jsonString UTF8String], -1, SQLITE_TRANSIENT); + + if (SQLITE_DONE != sqlite3_step(stmt)) { + NSLog(@"Error while inserting data. '%s'", sqlite3_errmsg(self.database)); + } + + sqlite3_finalize(stmt); + } +} + +@end diff --git a/PassiveDataKit/PDKLocationGenerator.h b/PassiveDataKit/PDKLocationGenerator.h index d41a472..f97c2fb 100644 --- a/PassiveDataKit/PDKLocationGenerator.h +++ b/PassiveDataKit/PDKLocationGenerator.h @@ -11,6 +11,8 @@ #import "PassiveDataKit.h" +#import "PDKBaseGenerator.h" + extern NSString *const PDKLocationAccuracyMode; extern NSString *const PDKLocationAccuracyModeBest; extern NSString *const PDKLocationAccuracyModeRandomized; @@ -21,7 +23,7 @@ extern NSString *const PDKLocationAccuracyModeUserProvidedLatitude; extern NSString *const PDKLocationAccuracyModeUserProvidedLongitude; -@interface PDKLocationGenerator : NSObject +@interface PDKLocationGenerator : PDKBaseGenerator + (PDKLocationGenerator *) sharedInstance; diff --git a/PassiveDataKit/PDKLocationGenerator.m b/PassiveDataKit/PDKLocationGenerator.m index 6556e19..e2da633 100644 --- a/PassiveDataKit/PDKLocationGenerator.m +++ b/PassiveDataKit/PDKLocationGenerator.m @@ -14,6 +14,8 @@ #import "PDKLocationAnnotation.h" #import "PDKLocationGeneratorViewController.h" +#define GENERATOR_ID @"pdk-location" + @interface PDKLocationGenerator () @property NSMutableArray * listeners; @@ -309,7 +311,7 @@ + (UIViewController *) detailsController { return [[PDKLocationGeneratorViewController alloc] init]; } -+ (UIView *) visualizationForSize:(CGSize) size { +- (UIView *) visualizationForSize:(CGSize) size { MKMapView * mapView = [[MKMapView alloc] initWithFrame:CGRectMake(0, 0, size.width, size.height)]; mapView.showsUserLocation = NO; @@ -363,4 +365,8 @@ + (UIView *) visualizationForSize:(CGSize) size { return mapView; } +- (NSString *) generatorId { + return GENERATOR_ID; +} + @end diff --git a/PassiveDataKit/PDKMixpanelEventGenerator.m b/PassiveDataKit/PDKMixpanelEventGenerator.m index d999d69..edab3f2 100644 --- a/PassiveDataKit/PDKMixpanelEventGenerator.m +++ b/PassiveDataKit/PDKMixpanelEventGenerator.m @@ -29,13 +29,11 @@ + (id) allocWithZone:(NSZone *) zone //!OCLINT return [self sharedInstance]; } -+ (UIView *) visualizationForSize:(CGSize) size { - PDKMixpanelEventGenerator * generator = [PDKMixpanelEventGenerator sharedInstance]; - +- (UIView *) visualizationForSize:(CGSize) size { UITableView * tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, size.width, size.height)]; - tableView.dataSource = generator; - tableView.delegate = generator; + tableView.dataSource = self; + tableView.delegate = self; return tableView; } @@ -103,4 +101,4 @@ + (void) logForReview:(NSDictionary *) payload { [defaults synchronize]; } -@end \ No newline at end of file +@end diff --git a/PassiveDataKit/PassiveDataKit-Shared.h b/PassiveDataKit/PassiveDataKit-Shared.h new file mode 100644 index 0000000..ab0ae03 --- /dev/null +++ b/PassiveDataKit/PassiveDataKit-Shared.h @@ -0,0 +1,12 @@ +#import + +//! Project version number for IntelliCare-Shared. +FOUNDATION_EXPORT double PassiveDataKit_SharedVersionNumber; + +//! Project version string for IntelliCare-Shared. +FOUNDATION_EXPORT const unsigned char PassiveDataKit_SharedVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + +#import "PassiveDataKit.h" +#import "PDKHttpTransmitter.h" diff --git a/PassiveDataKit/PassiveDataKit.h b/PassiveDataKit/PassiveDataKit.h index 9f7e34f..0eda5c7 100644 --- a/PassiveDataKit/PassiveDataKit.h +++ b/PassiveDataKit/PassiveDataKit.h @@ -20,7 +20,6 @@ extern NSString *const PDKLocationAlwaysOn; extern NSString *const PDKLocationRequestedAccuracy; extern NSString *const PDKLocationRequestedDistance; extern NSString *const PDKLocationInstance; -extern NSString *const PDKMixpanelToken; extern NSString *const PDKGooglePlacesSpecificLocation; extern NSString *const PDKGooglePlacesFreetextQuery; @@ -31,8 +30,10 @@ extern NSString *const PDKGooglePlacesInstance; extern NSString *const PDKGooglePlacesIncludeFullDetails; typedef NS_ENUM(NSInteger, PDKDataGenerator) { + PDKAnyGenerator, PDKLocation, - PDKGooglePlaces + PDKGooglePlaces, + PDKEvents }; @protocol PDKDataListener @@ -43,43 +44,51 @@ typedef NS_ENUM(NSInteger, PDKDataGenerator) { @protocol PDKGenerator -- (void) removeListener:(id)listener; -- (void) addListener:(id)listener options:(NSDictionary *) options; - (void) updateOptions:(NSDictionary *) options; +- (NSString *) generatorId; +- (NSString *) fullGeneratorName; +- (UIView *) visualizationForSize:(CGSize) size; + +@end + +@protocol PDKTransmitter -+ (UIView *) visualizationForSize:(CGSize) size; +- (id) initWithOptions:(NSDictionary *) options; +- (NSUInteger) pendingSize; +- (NSUInteger) transmittedSize; +- (void) transmit:(BOOL) force completionHandler:(void (^)(UIBackgroundFetchResult result)) completionHandler; @end + @interface PassiveDataKit : NSObject + (PassiveDataKit *) sharedInstance; -- (BOOL) registerListener:(id) listener forGenerator:(PDKDataGenerator) dataGenerator options:(NSDictionary *) options; +- (BOOL) registerListener:(id) listener forGenerator:(PDKDataGenerator) dataGenerator; - (BOOL) unregisterListener:(id) listener forGenerator:(PDKDataGenerator) dataGenerator; + - (NSArray *) activeListeners; -- (BOOL) logDataPoint:(NSString *) generator generatorId:(NSString *) generatorId source:(NSString *) source properties:(NSDictionary *) properties; -- (void) uploadDataPoints:(NSURL *) url window:(NSTimeInterval) uploadWindow complete:(void (^)(BOOL success, int uploaded)) completed; -- (BOOL) logEvent:(NSString *) eventName properties:(NSDictionary *) properties; -- (void) setMandatoryEventLogging:(BOOL) isMandatory; + +- (void) transmit:(BOOL) force; +- (void) transmitWithCompletionHandler:(void (^)(UIBackgroundFetchResult result)) completionHandler; + +- (void) logEvent:(NSString *) eventName properties:(NSDictionary *) properties; + +- (void) receivedData:(NSDictionary *) data forGenerator:(PDKDataGenerator) dataGenerator; - (NSString *) identifierForUser; - (BOOL) setIdentifierForUser:(NSString *) newIdentifier; - (void) resetIdentifierForUser; -- (NSString *) generator; -- (BOOL) setGenerator:(NSString *) newGenerator; -- (void) resetGenerator; +- (NSString *) userAgent; -- (NSString *) generatorId; -- (BOOL) setGeneratorId:(NSString *) newIdentifier; -- (void) resetGeneratorId; - -- (BOOL) mixpanelEnabled; -- (void) enableMixpanel:(NSString *) token; -- (void) disableMixpanel; +- (id) generatorInstance:(PDKDataGenerator) generator; - (UIViewController *) dataReportController; ++ (NSString *) keyForGenerator:(PDKDataGenerator) generator; + +- (void) addTransmitter:(id) transmitter; @end diff --git a/PassiveDataKit/PassiveDataKit.m b/PassiveDataKit/PassiveDataKit.m index 74b634a..f703221 100644 --- a/PassiveDataKit/PassiveDataKit.m +++ b/PassiveDataKit/PassiveDataKit.m @@ -8,8 +8,6 @@ #import "PassiveDataKit.h" -#import "PDKDataPointsManager.h" - #import "PDKEventsGenerator.h" #import "PDKLocationGenerator.h" #import "PDKGooglePlacesGenerator.h" @@ -19,6 +17,7 @@ @interface PassiveDataKit () @property NSMutableDictionary * listeners; +@property NSMutableArray * transmitters; @end @@ -54,7 +53,6 @@ + (PassiveDataKit *) sharedInstance dispatch_once(&_singletonPredicate, ^{ sharedObject = [[super allocWithZone:nil] init]; - }); return sharedObject; @@ -70,12 +68,19 @@ - (id) init if (self = [super init]) { self.listeners = [NSMutableDictionary dictionary]; + self.transmitters = [NSMutableArray array]; } return self; } -- (BOOL) registerListener:(id) listener forGenerator:(PDKDataGenerator) dataGenerator options:(NSDictionary *) options { +- (void) addTransmitter:(id) transmitter { + if ([self.transmitters containsObject:transmitter] == NO) { + [self.transmitters addObject:transmitter]; + } +} + +- (BOOL) registerListener:(id) listener forGenerator:(PDKDataGenerator) dataGenerator { NSString * key = [PassiveDataKit keyForGenerator:dataGenerator]; NSMutableArray * dataListeners = [self.listeners valueForKey:key]; @@ -88,31 +93,11 @@ - (BOOL) registerListener:(id) listener forGenerator:(PDKDataGe if ([dataListeners containsObject:listener] == NO) { [dataListeners addObject:listener]; - - [self incrementGenerator:dataGenerator withListener:listener options:options]; - } else { - [self updateGenerator:dataGenerator withOptions:options]; } return YES; } -- (NSArray *) activeListeners { - NSMutableArray * listeners = [NSMutableArray arrayWithArray:[self.listeners allKeys]]; - - NSUserDefaults * defaults = [NSUserDefaults standardUserDefaults]; - - if ([defaults valueForKey:PDKLastEventLogged] != nil) { - [listeners addObject:PDKEventGenerator]; - - if ([self mixpanelEnabled]) { - [listeners addObject:PDKMixpanelEventGenerator]; - } - } - - return listeners; -} - - (BOOL) unregisterListener:(id) listener forGenerator:(PDKDataGenerator) dataGenerator { NSString * key = [PassiveDataKit keyForGenerator:dataGenerator]; @@ -120,48 +105,30 @@ - (BOOL) unregisterListener:(id) listener forGenerator:(PDKData if (dataListeners != nil) { [dataListeners removeObject:listener]; - - [self decrementGenerator:dataGenerator withListener:listener]; } return YES; } -- (void) decrementGenerator:(PDKDataGenerator) generator withListener:(id) listener { - switch(generator) { //!OCLINT - case PDKLocation: - [[PDKLocationGenerator sharedInstance] removeListener:listener]; - break; - case PDKGooglePlaces: - [[PDKGooglePlacesGenerator sharedInstance] removeListener:listener]; - break; - } -} - -- (void) incrementGenerator:(PDKDataGenerator) generator withListener:(id) listener options:(NSDictionary *) options { - switch(generator) { //!OCLINT - case PDKLocation: - [[PDKLocationGenerator sharedInstance] addListener:listener options:options]; - break; - case PDKGooglePlaces: - [[PDKGooglePlacesGenerator sharedInstance] addListener:listener options:options]; - break; - } +- (NSArray *) activeListeners { + NSMutableArray * listeners = [NSMutableArray arrayWithArray:[self.listeners allKeys]]; + + return listeners; } -- (void) updateGenerator:(PDKDataGenerator) generator withOptions:(NSDictionary *) options { - switch(generator) { //!OCLINT - case PDKLocation: - [[PDKLocationGenerator sharedInstance] updateOptions:options]; +- (void) receivedData:(NSDictionary *) data forGenerator:(PDKDataGenerator) dataGenerator { + NSString * key = [PassiveDataKit keyForGenerator:dataGenerator]; + NSString * anyKey = [PassiveDataKit keyForGenerator:PDKAnyGenerator]; + + NSMutableArray * dataListeners = [NSMutableArray arrayWithArray:[self.listeners valueForKey:key]]; + + [dataListeners addObjectsFromArray:[self.listeners valueForKey:anyKey]]; - break; - case PDKGooglePlaces: - [[PDKGooglePlacesGenerator sharedInstance] updateOptions:options]; - break; + for (id listener in dataListeners) { + [listener receivedData:data forGenerator:dataGenerator]; } } - + (NSString *) keyForGenerator:(PDKDataGenerator) generator { switch(generator) { //!OCLINT @@ -169,34 +136,44 @@ + (NSString *) keyForGenerator:(PDKDataGenerator) generator return @"PDKLocationGenerator"; case PDKGooglePlaces: return @"PDKGooglePlacesGenerator"; + case PDKEvents: + return @"PDKEventsGenerator"; + case PDKAnyGenerator: + return @"PDKAnyGenerator"; } return @"PDKUnknownGenerator"; } -- (void) setMandatoryEventLogging:(BOOL) isMandatory { - NSUserDefaults * defaults = [NSUserDefaults standardUserDefaults]; - [defaults setBool:(isMandatory == NO) forKey:PDKEventsGeneratorCanDisable]; +- (id) generatorInstance:(PDKDataGenerator) generator { + switch(generator) { //!OCLINT + case PDKLocation: + return [PDKLocationGenerator sharedInstance]; + case PDKGooglePlaces: + return [PDKGooglePlacesGenerator sharedInstance]; + case PDKEvents: + return [PDKEventsGenerator sharedInstance]; + case PDKAnyGenerator: + break; + } - [defaults synchronize]; + return nil; } - -- (BOOL) logDataPoint:(NSString *) generator generatorId:(NSString *) generatorId source:(NSString *) source properties:(NSDictionary *) properties { - return [[PDKDataPointsManager sharedInstance] logDataPoint:generator generatorId:generatorId source:source properties:properties]; +- (void) logEvent:(NSString *) eventName properties:(NSDictionary *) properties { + [[PDKEventsGenerator sharedInstance] logEvent:eventName properties:properties]; } -- (BOOL) logEvent:(NSString *) eventName properties:(NSDictionary *) properties { - NSUserDefaults * defaults= [NSUserDefaults standardUserDefaults]; - - [defaults setValue:[NSDate date] forKey:PDKLastEventLogged]; - [defaults synchronize]; - - return [[PDKDataPointsManager sharedInstance] logEvent:eventName properties:properties]; +- (void) transmit:(BOOL) force { + for (id transmitter in self.transmitters) { + [transmitter transmit:force completionHandler:nil]; + } } -- (void) uploadDataPoints:(NSURL *) url window:(NSTimeInterval) uploadWindow complete:(void (^)(BOOL success, int uploaded)) completed { - [[PDKDataPointsManager sharedInstance] uploadDataPoints:url window:uploadWindow complete:completed]; +- (void) transmitWithCompletionHandler:(void (^)(UIBackgroundFetchResult result)) completionHandler { + for (id transmitter in self.transmitters) { + [transmitter transmit:NO completionHandler:completionHandler]; + } } - (NSString *) identifierForUser { @@ -223,7 +200,7 @@ - (void) resetIdentifierForUser { [[NSUserDefaults standardUserDefaults] removeObjectForKey:PDKUserIdentifier]; } -- (NSString *) generator { +- (NSString *) userAgent { NSString * generator = [[NSUserDefaults standardUserDefaults] stringForKey:PDKGenerator]; if (generator != nil) { @@ -240,66 +217,7 @@ - (NSString *) generator { info[@"CFBundleShortVersionString"] = @"1.0"; } - NSOperatingSystemVersion osVer = [NSProcessInfo processInfo].operatingSystemVersion; - - NSString * version = [NSString stringWithFormat:@"%d.%d.%d", (int) osVer.majorVersion, (int) osVer.minorVersion, (int) osVer.patchVersion]; - - return [NSString stringWithFormat:@"%@ %@ (iOS %@)", info[@"CFBundleName"], info[@"CFBundleShortVersionString"], version, nil]; -} - -- (BOOL) setGenerator:(NSString *) newGenerator { - if (newGenerator != nil) { - [[NSUserDefaults standardUserDefaults] setValue:newGenerator forKey:PDKGenerator]; - - return YES; - } - - return NO; -} - -- (void) resetGenerator { - [[NSUserDefaults standardUserDefaults] removeObjectForKey:PDKGenerator]; -} - -- (NSString *) generatorId { - NSString * identifier = [[NSUserDefaults standardUserDefaults] stringForKey:PDKGeneratorIdentifier]; - - if (identifier != nil) { - return identifier; - } - - if ([[NSBundle mainBundle] bundleIdentifier] != nil) { - return [[NSBundle mainBundle] bundleIdentifier]; - } - - return @"passive-data-kit"; -} - -- (BOOL) setGeneratorId:(NSString *) newIdentifier -{ - if (newIdentifier != nil) { - [[NSUserDefaults standardUserDefaults] setValue:newIdentifier forKey:PDKGeneratorIdentifier]; - - return YES; - } - - return NO; -} - -- (void) resetGeneratorId { - [[NSUserDefaults standardUserDefaults] removeObjectForKey:PDKGeneratorIdentifier]; -} - -- (BOOL) mixpanelEnabled { - return [[NSUserDefaults standardUserDefaults] stringForKey:PDKMixpanelToken] != nil; -} - -- (void) enableMixpanel:(NSString *) token { - [[NSUserDefaults standardUserDefaults] setValue:token forKey:PDKMixpanelToken]; -} - -- (void) disableMixpanel { - [[NSUserDefaults standardUserDefaults] removeObjectForKey:PDKMixpanelToken]; + return [NSString stringWithFormat:@"%@/%@", info[@"CFBundleName"], info[@"CFBundleShortVersionString"], nil]; } - (UIViewController *) dataReportController { diff --git a/PassiveDataKit/PassiveDataKit.modulemap b/PassiveDataKit/PassiveDataKit.modulemap new file mode 100644 index 0000000..518d947 --- /dev/null +++ b/PassiveDataKit/PassiveDataKit.modulemap @@ -0,0 +1,3 @@ +framework module PassiveDataKit { + umbrella header "PassiveDataKit-Shared.h" +} diff --git a/PassiveDataKit/Third-Party/NSString+RAInflections.h b/PassiveDataKit/Third-Party/NSString+RAInflections.h new file mode 100644 index 0000000..c1286b0 --- /dev/null +++ b/PassiveDataKit/Third-Party/NSString+RAInflections.h @@ -0,0 +1,17 @@ +// +// NSString+RAInflections.h +// PassiveDataKit +// +// Created by Chris Karr on 6/18/17. +// Copyright © 2017 Audacious Software. All rights reserved. +// + +#import + +// Original version: https://gist.github.com/RobertAudi/5926772 + +@interface NSString (RAInflections) + +- (NSString *)slugalize; + +@end diff --git a/PassiveDataKit/Third-Party/NSString+RAInflections.m b/PassiveDataKit/Third-Party/NSString+RAInflections.m new file mode 100644 index 0000000..4f6307c --- /dev/null +++ b/PassiveDataKit/Third-Party/NSString+RAInflections.m @@ -0,0 +1,62 @@ +// +// NSString+RAInflections.m +// PassiveDataKit +// +// Created by Chris Karr on 6/18/17. +// Copyright © 2017 Audacious Software. All rights reserved. +// + +#import "NSString+RAInflections.h" + +// Original version: https://gist.github.com/RobertAudi/5926772 + +@implementation NSString (RAInflections) + +/** + * Port of the slugalized helper created by @henrik + * https://github.com/RobertAudi/slugalizer + */ +- (NSString *)slugalize +{ + NSString *separator = @"-"; + NSMutableString *slugalizedString = [NSMutableString string]; + NSRange replaceRange = NSMakeRange(0, self.length); + + // Remove all non ASCII characters + NSError *nonASCIICharsRegexError = nil; + NSRegularExpression *nonASCIICharsRegex = [NSRegularExpression regularExpressionWithPattern:@"[^\\x00-\\x7F]+" + options:0 + error:&nonASCIICharsRegexError]; + slugalizedString = [[nonASCIICharsRegex stringByReplacingMatchesInString:self + options:0 + range:replaceRange + withTemplate:@""] mutableCopy]; + + // Turn non-slug characters into separators + NSError *nonSlugCharactersError = nil; + NSRegularExpression *nonSlugCharactersRegex = [NSRegularExpression regularExpressionWithPattern:@"[^a-z0-9\\-_\\+]+" + options:NSRegularExpressionCaseInsensitive + error:&nonSlugCharactersError]; + slugalizedString = [[nonSlugCharactersRegex stringByReplacingMatchesInString:slugalizedString + options:0 + range:replaceRange + withTemplate:separator] mutableCopy]; + + // No more than one of the separator in a row + NSError *repeatingSeparatorsError = nil; + NSRegularExpression *repeatingSeparatorsRegex = [NSRegularExpression regularExpressionWithPattern:[NSString stringWithFormat:@"%@{2,}", separator] + options:0 + error:&repeatingSeparatorsError]; + + slugalizedString = [[repeatingSeparatorsRegex stringByReplacingMatchesInString:slugalizedString + options:0 + range:replaceRange + withTemplate:separator] mutableCopy]; + + // Remove leading/trailing separator + slugalizedString = [[slugalizedString stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:separator]] mutableCopy]; + + return [slugalizedString lowercaseString]; +} + +@end From 32aac5be742cd5bd03edc3457f220e7fd3c6e116 Mon Sep 17 00:00:00 2001 From: Chris Karr Date: Mon, 19 Jun 2017 00:16:35 -0500 Subject: [PATCH 05/13] OCLint code cleanup & rule relaxation --- .travis.yml | 3 ++- PassiveDataKit/PDKEventsGenerator.m | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index fec9b18..49214fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,4 +22,5 @@ script: -disable-rule=PreferEarlyExit -disable-rule=LongMethod -disable-rule=LongVariableName - + -disable-rule=HighCyclomaticComplexity + -disable-rule=HighNPathComplexity diff --git a/PassiveDataKit/PDKEventsGenerator.m b/PassiveDataKit/PDKEventsGenerator.m index 70f767f..badf92f 100644 --- a/PassiveDataKit/PDKEventsGenerator.m +++ b/PassiveDataKit/PDKEventsGenerator.m @@ -82,7 +82,7 @@ - (void) logEvent:(NSString *) eventName properties:(NSDictionary *) properties event[@"event_name"] = eventName; event[@"event_details"] = properties; - event[@"observed"] = [NSNumber numberWithDouble:(1000 * recorded.timeIntervalSince1970)]; + event[@"observed"] = @(1000 * recorded.timeIntervalSince1970); NSUserDefaults * defaults = [NSUserDefaults standardUserDefaults]; From f51bc4b870e937b376c8b73771819c2b3f80e31d Mon Sep 17 00:00:00 2001 From: Chris Karr Date: Mon, 19 Jun 2017 00:22:56 -0500 Subject: [PATCH 06/13] Retiring obsolete tests --- PassiveDataKitTests/PassiveDataKitTests.m | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/PassiveDataKitTests/PassiveDataKitTests.m b/PassiveDataKitTests/PassiveDataKitTests.m index c7effe2..99ae330 100644 --- a/PassiveDataKitTests/PassiveDataKitTests.m +++ b/PassiveDataKitTests/PassiveDataKitTests.m @@ -10,7 +10,6 @@ #import -#import "PDKDataPointsManager.h" #import "PassiveDataKit.h"; @interface PassiveDataKitTests : XCTestCase @@ -34,7 +33,8 @@ - (void)testTest { } - (void)testUpload { - PDKDataPointsManager * pdk = [PDKDataPointsManager sharedInstance]; +/* + PDKDataPointsManager * pdk = [PDKDataPointsManager sharedInstance]; BOOL result = [pdk logDataPoint:@"PDK Tester" generatorId:@"pdk-tester" source:@"tester" properties:@{ @"foo": @"bar" }]; @@ -57,10 +57,12 @@ - (void)testUpload { }]; [self waitForExpectationsWithTimeout:30 handler:nil]; + */ } - (void)testIdentifier { - PassiveDataKit * pdk = [PassiveDataKit sharedInstance]; +/* + PassiveDataKit * pdk = [PassiveDataKit sharedInstance]; NSString * identifier = [pdk identifierForUser]; @@ -82,9 +84,11 @@ - (void)testIdentifier { XCTAssertNotNil(identifier); XCTAssertEqualObjects(identifier, originalIdentifier); + */ } - (void)testGenerator { + /* PassiveDataKit * pdk = [PassiveDataKit sharedInstance]; NSString * generator = [pdk generator]; @@ -107,9 +111,11 @@ - (void)testGenerator { XCTAssertNotNil(generator); XCTAssertEqualObjects(generator, originalGenerator); + */ } - (void)testGeneratorId { + /* PassiveDataKit * pdk = [PassiveDataKit sharedInstance]; NSString * generatorId = [pdk generatorId]; @@ -132,6 +138,7 @@ - (void)testGeneratorId { XCTAssertNotNil(generatorId); XCTAssertEqualObjects(generatorId, originalGeneratorId); + */ } From 83565542f3985c5028c4ebd4f25b57cf61156384 Mon Sep 17 00:00:00 2001 From: Chris Karr Date: Mon, 19 Jun 2017 16:30:01 -0500 Subject: [PATCH 07/13] Framework cleanup --- .../xcshareddata/xcschemes/PassiveDataKit.xcscheme | 2 +- .../xcshareddata/xcschemes/PassiveDataKitTests.xcscheme | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PassiveDataKit.xcodeproj/xcshareddata/xcschemes/PassiveDataKit.xcscheme b/PassiveDataKit.xcodeproj/xcshareddata/xcschemes/PassiveDataKit.xcscheme index c2f5213..fcc206d 100644 --- a/PassiveDataKit.xcodeproj/xcshareddata/xcschemes/PassiveDataKit.xcscheme +++ b/PassiveDataKit.xcodeproj/xcshareddata/xcschemes/PassiveDataKit.xcscheme @@ -1,6 +1,6 @@ Date: Mon, 19 Jun 2017 17:32:38 -0500 Subject: [PATCH 08/13] Build fixes --- PassiveDataKit.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PassiveDataKit.xcodeproj/project.pbxproj b/PassiveDataKit.xcodeproj/project.pbxproj index 68e0ed4..1a5d0ba 100644 --- a/PassiveDataKit.xcodeproj/project.pbxproj +++ b/PassiveDataKit.xcodeproj/project.pbxproj @@ -691,7 +691,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; + ONLY_ACTIVE_ARCH = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; From 3139a75996c37479cf7e49a80aa4680094793adf Mon Sep 17 00:00:00 2001 From: Chris Karr Date: Mon, 19 Jun 2017 17:54:46 -0500 Subject: [PATCH 09/13] Embedding Mixpanel framework --- PassiveDataKit.xcodeproj/project.pbxproj | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/PassiveDataKit.xcodeproj/project.pbxproj b/PassiveDataKit.xcodeproj/project.pbxproj index 1a5d0ba..7fb6000 100644 --- a/PassiveDataKit.xcodeproj/project.pbxproj +++ b/PassiveDataKit.xcodeproj/project.pbxproj @@ -22,6 +22,7 @@ 3842F73C1CDA2021007F843D /* PassiveDataKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3842F7311CDA2021007F843D /* PassiveDataKit.framework */; }; 3842F7411CDA2021007F843D /* PassiveDataKitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3842F7401CDA2021007F843D /* PassiveDataKitTests.m */; }; 3842F7571CDA20FE007F843D /* PassiveDataKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 3842F7551CDA20FE007F843D /* PassiveDataKit.m */; }; + 384A2A131EF88D14009510B1 /* Mixpanel.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 389DE4B31EF726B2009C8B27 /* Mixpanel.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 387F9A511D1B8ACD007FA29A /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 387F9A501D1B8ACD007FA29A /* SystemConfiguration.framework */; }; 387F9A531D1B8AD7007FA29A /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 387F9A521D1B8AD7007FA29A /* CoreTelephony.framework */; }; 387F9A551D1B8ADE007FA29A /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 387F9A541D1B8ADE007FA29A /* Accelerate.framework */; }; @@ -126,6 +127,19 @@ }; /* End PBXContainerItemProxy section */ +/* Begin PBXCopyFilesBuildPhase section */ + 384A2A121EF88D03009510B1 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 384A2A131EF88D14009510B1 /* Mixpanel.framework in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ 383ECC511D1F4F41004E0B2B /* PDKDataReportViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PDKDataReportViewController.h; sourceTree = ""; }; 383ECC521D1F4F41004E0B2B /* PDKDataReportViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PDKDataReportViewController.m; sourceTree = ""; }; @@ -469,6 +483,7 @@ 3842F72D1CDA2021007F843D /* Frameworks */, 3842F72E1CDA2021007F843D /* Headers */, 3842F72F1CDA2021007F843D /* Resources */, + 384A2A121EF88D03009510B1 /* CopyFiles */, ); buildRules = ( ); From 147d9c89378d3acc44e98a92708ef7c70794d692 Mon Sep 17 00:00:00 2001 From: Chris Karr Date: Mon, 19 Jun 2017 18:09:26 -0500 Subject: [PATCH 10/13] Fixing test suite --- PassiveDataKit.xcodeproj/project.pbxproj | 28 +++++++++++------------- PassiveDataKit/Info.plist | 2 -- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/PassiveDataKit.xcodeproj/project.pbxproj b/PassiveDataKit.xcodeproj/project.pbxproj index 7fb6000..704096c 100644 --- a/PassiveDataKit.xcodeproj/project.pbxproj +++ b/PassiveDataKit.xcodeproj/project.pbxproj @@ -22,7 +22,6 @@ 3842F73C1CDA2021007F843D /* PassiveDataKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3842F7311CDA2021007F843D /* PassiveDataKit.framework */; }; 3842F7411CDA2021007F843D /* PassiveDataKitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3842F7401CDA2021007F843D /* PassiveDataKitTests.m */; }; 3842F7571CDA20FE007F843D /* PassiveDataKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 3842F7551CDA20FE007F843D /* PassiveDataKit.m */; }; - 384A2A131EF88D14009510B1 /* Mixpanel.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 389DE4B31EF726B2009C8B27 /* Mixpanel.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 387F9A511D1B8ACD007FA29A /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 387F9A501D1B8ACD007FA29A /* SystemConfiguration.framework */; }; 387F9A531D1B8AD7007FA29A /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 387F9A521D1B8AD7007FA29A /* CoreTelephony.framework */; }; 387F9A551D1B8ADE007FA29A /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 387F9A541D1B8ADE007FA29A /* Accelerate.framework */; }; @@ -90,6 +89,13 @@ remoteGlobalIDString = 3842F7301CDA2021007F843D; remoteInfo = PassiveDataKit; }; + 384A2A1A1EF890EF009510B1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 389DE4AA1EF726B2009C8B27 /* Mixpanel.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 7C170C291A4A02F500D9E0F2; + remoteInfo = Mixpanel; + }; 389DE4B21EF726B2009C8B27 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 389DE4AA1EF726B2009C8B27 /* Mixpanel.xcodeproj */; @@ -127,19 +133,6 @@ }; /* End PBXContainerItemProxy section */ -/* Begin PBXCopyFilesBuildPhase section */ - 384A2A121EF88D03009510B1 /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 384A2A131EF88D14009510B1 /* Mixpanel.framework in CopyFiles */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - /* Begin PBXFileReference section */ 383ECC511D1F4F41004E0B2B /* PDKDataReportViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PDKDataReportViewController.h; sourceTree = ""; }; 383ECC521D1F4F41004E0B2B /* PDKDataReportViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PDKDataReportViewController.m; sourceTree = ""; }; @@ -483,11 +476,11 @@ 3842F72D1CDA2021007F843D /* Frameworks */, 3842F72E1CDA2021007F843D /* Headers */, 3842F72F1CDA2021007F843D /* Resources */, - 384A2A121EF88D03009510B1 /* CopyFiles */, ); buildRules = ( ); dependencies = ( + 384A2A1B1EF890EF009510B1 /* PBXTargetDependency */, ); name = PassiveDataKit; productName = PassiveDataKit; @@ -661,6 +654,11 @@ target = 3842F7301CDA2021007F843D /* PassiveDataKit */; targetProxy = 3842F73D1CDA2021007F843D /* PBXContainerItemProxy */; }; + 384A2A1B1EF890EF009510B1 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Mixpanel; + targetProxy = 384A2A1A1EF890EF009510B1 /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ diff --git a/PassiveDataKit/Info.plist b/PassiveDataKit/Info.plist index d3de8ee..f1a673a 100644 --- a/PassiveDataKit/Info.plist +++ b/PassiveDataKit/Info.plist @@ -18,8 +18,6 @@ 1.0 CFBundleSignature ???? - CFBundleVersion - $(CURRENT_PROJECT_VERSION) NSPrincipalClass From af7dc3068d171a27b6c2f48054e0aabab8373a13 Mon Sep 17 00:00:00 2001 From: Chris Karr Date: Wed, 21 Jun 2017 12:48:06 -0500 Subject: [PATCH 11/13] Adapting PDKHttpTransmitter to be more easily subclassed. * Cleaning up Clang warnings. --- PassiveDataKit.xcodeproj/project.pbxproj | 12 +- PassiveDataKit/PDKDataReportViewController.m | 11 +- PassiveDataKit/PDKHttpTransmitter.h | 12 ++ PassiveDataKit/PDKHttpTransmitter.m | 171 ++++++++++--------- PassiveDataKit/PassiveDataKit-Shared.h | 2 + 5 files changed, 119 insertions(+), 89 deletions(-) diff --git a/PassiveDataKit.xcodeproj/project.pbxproj b/PassiveDataKit.xcodeproj/project.pbxproj index 704096c..925c8e9 100644 --- a/PassiveDataKit.xcodeproj/project.pbxproj +++ b/PassiveDataKit.xcodeproj/project.pbxproj @@ -32,7 +32,7 @@ 389DE4BC1EF726BB009C8B27 /* Mixpanel.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 389DE4B31EF726B2009C8B27 /* Mixpanel.framework */; }; 389DE4D21EF7492C009C8B27 /* PDKHttpTransmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = 389DE4D01EF7492C009C8B27 /* PDKHttpTransmitter.h */; settings = {ATTRIBUTES = (Public, ); }; }; 389DE4D31EF7492C009C8B27 /* PDKHttpTransmitter.m in Sources */ = {isa = PBXBuildFile; fileRef = 389DE4D11EF7492C009C8B27 /* PDKHttpTransmitter.m */; }; - 389DE4D61EF74DDA009C8B27 /* NSString+RAInflections.h in Headers */ = {isa = PBXBuildFile; fileRef = 389DE4D41EF74DDA009C8B27 /* NSString+RAInflections.h */; }; + 389DE4D61EF74DDA009C8B27 /* NSString+RAInflections.h in Headers */ = {isa = PBXBuildFile; fileRef = 389DE4D41EF74DDA009C8B27 /* NSString+RAInflections.h */; settings = {ATTRIBUTES = (Public, ); }; }; 389DE4D71EF74DDA009C8B27 /* NSString+RAInflections.m in Sources */ = {isa = PBXBuildFile; fileRef = 389DE4D51EF74DDA009C8B27 /* NSString+RAInflections.m */; }; 389DE4DE1EF75ADB009C8B27 /* PDKBaseGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 389DE4DC1EF75ADB009C8B27 /* PDKBaseGenerator.h */; }; 389DE4DF1EF75ADB009C8B27 /* PDKBaseGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 389DE4DD1EF75ADB009C8B27 /* PDKBaseGenerator.m */; }; @@ -53,9 +53,9 @@ 38C666E11D038A8E00E6A6C8 /* PDKAFNetworkReachabilityManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 38C666C01D038A8E00E6A6C8 /* PDKAFNetworkReachabilityManager.m */; }; 38C666E21D038A8E00E6A6C8 /* PDKAFSecurityPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 38C666C11D038A8E00E6A6C8 /* PDKAFSecurityPolicy.h */; }; 38C666E31D038A8E00E6A6C8 /* PDKAFSecurityPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 38C666C21D038A8E00E6A6C8 /* PDKAFSecurityPolicy.m */; }; - 38C666E41D038A8E00E6A6C8 /* PDKAFURLRequestSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 38C666C31D038A8E00E6A6C8 /* PDKAFURLRequestSerialization.h */; }; + 38C666E41D038A8E00E6A6C8 /* PDKAFURLRequestSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 38C666C31D038A8E00E6A6C8 /* PDKAFURLRequestSerialization.h */; settings = {ATTRIBUTES = (Public, ); }; }; 38C666E51D038A8E00E6A6C8 /* PDKAFURLRequestSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 38C666C41D038A8E00E6A6C8 /* PDKAFURLRequestSerialization.m */; }; - 38C666E61D038A8E00E6A6C8 /* PDKAFURLResponseSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 38C666C51D038A8E00E6A6C8 /* PDKAFURLResponseSerialization.h */; }; + 38C666E61D038A8E00E6A6C8 /* PDKAFURLResponseSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 38C666C51D038A8E00E6A6C8 /* PDKAFURLResponseSerialization.h */; settings = {ATTRIBUTES = (Public, ); }; }; 38C666E71D038A8E00E6A6C8 /* PDKAFURLResponseSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 38C666C61D038A8E00E6A6C8 /* PDKAFURLResponseSerialization.m */; }; 38C666E81D038A8E00E6A6C8 /* PDKAFURLSessionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 38C666C71D038A8E00E6A6C8 /* PDKAFURLSessionManager.h */; }; 38C666E91D038A8E00E6A6C8 /* PDKAFURLSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 38C666C81D038A8E00E6A6C8 /* PDKAFURLSessionManager.m */; }; @@ -434,16 +434,17 @@ 388D5E401EF76CD500C9A2A2 /* PassiveDataKit-Shared.h in Headers */, 3842F7351CDA2021007F843D /* PassiveDataKit.h in Headers */, 389DE4D21EF7492C009C8B27 /* PDKHttpTransmitter.h in Headers */, + 389DE4D61EF74DDA009C8B27 /* NSString+RAInflections.h in Headers */, + 38C666E61D038A8E00E6A6C8 /* PDKAFURLResponseSerialization.h in Headers */, + 38C666E41D038A8E00E6A6C8 /* PDKAFURLRequestSerialization.h in Headers */, 38C666D91D038A8E00E6A6C8 /* PDKAFHTTPSessionManager.h in Headers */, 38A6523C1CDA2D9B00AE8B3B /* PDKLocationGenerator.h in Headers */, 383ECC6A1D1F82F5004E0B2B /* PDKMixpanelEventGenerator.h in Headers */, 383ECC661D1F816D004E0B2B /* PDKEventsGenerator.h in Headers */, 38DC949F1D2711C600552259 /* PDKGooglePlacesGenerator.h in Headers */, - 38C666E41D038A8E00E6A6C8 /* PDKAFURLRequestSerialization.h in Headers */, 38C666E01D038A8E00E6A6C8 /* PDKAFNetworkReachabilityManager.h in Headers */, 38C666E21D038A8E00E6A6C8 /* PDKAFSecurityPolicy.h in Headers */, 38C666EA1D038A8E00E6A6C8 /* UIActivityIndicatorView+PDKAFNetworking.h in Headers */, - 389DE4D61EF74DDA009C8B27 /* NSString+RAInflections.h in Headers */, 38C666F11D038A8E00E6A6C8 /* UIKit+PDKAFNetworking.h in Headers */, 389DE4DE1EF75ADB009C8B27 /* PDKBaseGenerator.h in Headers */, 38C666E81D038A8E00E6A6C8 /* PDKAFURLSessionManager.h in Headers */, @@ -458,7 +459,6 @@ 38C666DB1D038A8E00E6A6C8 /* PDKAFImageDownloader.h in Headers */, 38C666EC1D038A8E00E6A6C8 /* UIButton+PDKAFNetworking.h in Headers */, 38C666F21D038A8E00E6A6C8 /* UIProgressView+PDKAFNetworking.h in Headers */, - 38C666E61D038A8E00E6A6C8 /* PDKAFURLResponseSerialization.h in Headers */, 38C666F41D038A8E00E6A6C8 /* UIRefreshControl+PDKAFNetworking.h in Headers */, 383ECC6E1D1F9915004E0B2B /* PDKLocationAnnotation.h in Headers */, 38C666D71D038A8E00E6A6C8 /* PDKAFAutoPurgingImageCache.h in Headers */, diff --git a/PassiveDataKit/PDKDataReportViewController.m b/PassiveDataKit/PDKDataReportViewController.m index ee09854..64ec914 100644 --- a/PassiveDataKit/PDKDataReportViewController.m +++ b/PassiveDataKit/PDKDataReportViewController.m @@ -70,7 +70,7 @@ - (void) loadVisualization:(NSString *) generator { } else { Class generatorClass = NSClassFromString(generator); - id generator = [generatorClass sharedInstance]; + id generator = [generatorClass sharedInstance]; if (generatorClass != nil) { if ([generatorClass respondsToSelector:@selector(visualizationForSize:)]) { @@ -196,8 +196,13 @@ - (UIViewController *) detailsControllerForGenerator:(NSString *) key { Class generatorClass = NSClassFromString(key); if (generatorClass != nil) { - if ([generatorClass respondsToSelector:@selector(detailsController)]) { - controller = [generatorClass performSelector:@selector(detailsController)]; + SEL details = NSSelectorFromString(@"detailsController"); + + if ([generatorClass respondsToSelector:details]) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Warc-performSelector-leaks" + controller = [generatorClass performSelector:details]; +#pragma clang diagnostic pop } } return controller; diff --git a/PassiveDataKit/PDKHttpTransmitter.h b/PassiveDataKit/PDKHttpTransmitter.h index f698745..def7077 100644 --- a/PassiveDataKit/PDKHttpTransmitter.h +++ b/PassiveDataKit/PDKHttpTransmitter.h @@ -7,6 +7,7 @@ // #import "PassiveDataKit.h" +#import "NSString+RAInflections.h" #define PDK_SOURCE_KEY @"source" #define PDK_TRANSMITTER_ID_KEY @"transmitter-id" @@ -14,6 +15,17 @@ #define PDK_TRANSMITTER_REQUIRE_CHARGING_KEY @"require-charging" #define PDK_TRANSMITTER_REQUIRE_WIFI_KEY @"require-wifi" +#define PDK_METADATA_KEY @"passive-data-metadata" +#define PDK_GENERATOR_ID_KEY @"generator-id" +#define PDK_GENERATOR_KEY @"generator" +#define PDK_TIMESTAMP_KEY @"timestamp" + +#define PDK_DEFAULT_TRANSMITTER_ID @"http-transmitter" + @interface PDKHttpTransmitter : NSObject +@property NSString * source; +@property NSString * transmitterId; +@property NSURL * uploadUrl; + @end diff --git a/PassiveDataKit/PDKHttpTransmitter.m b/PassiveDataKit/PDKHttpTransmitter.m index 19050e6..2998f93 100644 --- a/PassiveDataKit/PDKHttpTransmitter.m +++ b/PassiveDataKit/PDKHttpTransmitter.m @@ -9,19 +9,10 @@ #import #import -#import "NSString+RAInflections.h" - #import "PDKAFURLSessionManager.h" #import "PDKHttpTransmitter.h" -#define PDK_METADATA_KEY @"passive-data-metadata" -#define PDK_GENERATOR_ID_KEY @"generator-id" -#define PDK_GENERATOR_KEY @"generator" -#define PDK_TIMESTAMP_KEY @"timestamp" - -#define PDK_DEFAULT_TRANSMITTER_ID @"http-transmitter" - typedef enum { ConnectionTypeUnknown, ConnectionTypeNone, @@ -31,9 +22,6 @@ @interface PDKHttpTransmitter () -@property NSString * source; -@property NSString * transmitterId; -@property NSURL * uploadUrl; @property BOOL requireCharging; @property BOOL requireWiFi; @@ -177,6 +165,21 @@ - (void) transmit:(BOOL) force completionHandler:(void (^)(UIBackgroundFetchResu [self transmitReadings:0 completionHandler:completionHandler]; } +- (NSURLRequest *) uploadRequestForPayload:(NSArray *) payload { + NSMutableURLRequest * request = [[PDKAFJSONRequestSerializer serializer] requestWithMethod:@"CREATE" + URLString:[self.uploadUrl description] + parameters:payload + error:nil]; + [request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; + [request setValue:@"application/json" forHTTPHeaderField:@"Accept"]; + + return request; +} + +- (NSUInteger) payloadSize { + return 16; +} + - (void) transmitReadings:(NSUInteger) uploadWindow completionHandler:(void (^)(UIBackgroundFetchResult result)) completionHandler { if (uploadWindow == 0) { uploadWindow = 8; //!OCLINT @@ -186,7 +189,7 @@ - (void) transmitReadings:(NSUInteger) uploadWindow completionHandler:(void (^)( sqlite3_stmt * statement = NULL; - NSString * querySQL = @"SELECT D.id, D.properties FROM data D WHERE (D.timestamp < ?) LIMIT 16"; + NSString * querySQL = [NSString stringWithFormat:@"SELECT D.id, D.properties FROM data D WHERE (D.timestamp < ?) LIMIT %d", (int) [self payloadSize]]; const char * query_stmt = [querySQL UTF8String]; @@ -224,65 +227,62 @@ - (void) transmitReadings:(NSUInteger) uploadWindow completionHandler:(void (^)( sqlite3_finalize(statement); - NSMutableURLRequest *req = [[PDKAFJSONRequestSerializer serializer] requestWithMethod:@"CREATE" - URLString:[self.uploadUrl description] - parameters:payload - error:nil]; - [req setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; - [req setValue:@"application/json" forHTTPHeaderField:@"Accept"]; - - NSLog(@"UPLOADING PAYLOAD: %@", payload); - - PDKAFURLSessionManager * manager = [[PDKAFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]]; + NSURLRequest * request = [self uploadRequestForPayload:payload]; - [[manager dataTaskWithRequest:req - uploadProgress:nil - downloadProgress:nil - completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) { - if ([responseObject containsObject:@"Data bundle added successfully, and ready for processing."] == NO) { - NSLog(@"Invalid response: %@", responseObject); - } - else if (error == nil) { - for (NSNumber * identifier in uploaded) { - sqlite3_stmt * deleteStatement = NULL; - - NSString * deleteSQL = @"DELETE FROM data WHERE (id = ?)"; - - const char * delete_stmt = [deleteSQL UTF8String]; - - if (sqlite3_prepare_v2(self.database, delete_stmt, -1, &deleteStatement, NULL) == SQLITE_OK) - { - sqlite3_bind_int(deleteStatement, 1, [identifier intValue]); + if (request != nil) { + NSLog(@"UPLOADING PAYLOAD: %@", payload); + + PDKAFURLSessionManager * manager = [[PDKAFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]]; + + [[manager dataTaskWithRequest:request + uploadProgress:nil + downloadProgress:nil + completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) { + if ([responseObject containsObject:@"Data bundle added successfully, and ready for processing."] == NO) { + NSLog(@"Invalid response: %@", responseObject); + } + else if (error == nil) { + for (NSNumber * identifier in uploaded) { + sqlite3_stmt * deleteStatement = NULL; - while (sqlite3_step(deleteStatement) == SQLITE_ROW) { //!OCLINT + NSString * deleteSQL = @"DELETE FROM data WHERE (id = ?)"; + + const char * delete_stmt = [deleteSQL UTF8String]; + + if (sqlite3_prepare_v2(self.database, delete_stmt, -1, &deleteStatement, NULL) == SQLITE_OK) + { + sqlite3_bind_int(deleteStatement, 1, [identifier intValue]); + + while (sqlite3_step(deleteStatement) == SQLITE_ROW) { //!OCLINT + + } + sqlite3_finalize(deleteStatement); + } else { + if (completionHandler != nil) { + completionHandler(UIBackgroundFetchResultFailed); + } + + NSLog(@"Error while deleting data. '%s'", sqlite3_errmsg(self.database)); + + return; } - - sqlite3_finalize(deleteStatement); + } + + NSTimeInterval interval = [NSDate date].timeIntervalSince1970 - now; + + if (uploadWindow > 0 && interval > uploadWindow && uploaded.count > 0) { + [self transmitReadings:(uploadWindow - interval) completionHandler:completionHandler]; } else { if (completionHandler != nil) { - completionHandler(UIBackgroundFetchResultFailed); + completionHandler(UIBackgroundFetchResultNewData); } - - NSLog(@"Error while deleting data. '%s'", sqlite3_errmsg(self.database)); - - return; + } } - NSTimeInterval interval = [NSDate date].timeIntervalSince1970 - now; - - if (uploadWindow > 0 && interval > uploadWindow && uploaded.count > 0) { - [self transmitReadings:(uploadWindow - interval) completionHandler:completionHandler]; - } else { - if (completionHandler != nil) { - completionHandler(UIBackgroundFetchResultNewData); - } - - } - } - - }] resume]; + }] resume]; + } } } @@ -294,9 +294,9 @@ - (NSUInteger) transmittedSize { return -1; } -- (void) receivedData:(NSDictionary *) data forGenerator:(PDKDataGenerator) dataGenerator { - NSMutableDictionary * toStore = [NSMutableDictionary dictionaryWithDictionary:data]; - +- (NSDictionary *) processIncomingDataPoint:(NSDictionary *) dataPoint forGenerator:(PDKDataGenerator) dataGenerator { + NSMutableDictionary * toStore = [NSMutableDictionary dictionaryWithDictionary:dataPoint]; + if (toStore[PDK_METADATA_KEY] == nil) { NSMutableDictionary * metadata = [NSMutableDictionary dictionary]; @@ -310,30 +310,41 @@ - (void) receivedData:(NSDictionary *) data forGenerator:(PDKDataGenerator) data } else { metadata[PDK_SOURCE_KEY] = [[PassiveDataKit sharedInstance] identifierForUser]; } - + metadata[PDK_TIMESTAMP_KEY] = [NSNumber numberWithDouble:[NSDate date].timeIntervalSince1970]; toStore[PDK_METADATA_KEY] = metadata; } + + return toStore; +} + + +- (void) receivedData:(NSDictionary *) dataPoint forGenerator:(PDKDataGenerator) dataGenerator { + NSDictionary * toStore = [self processIncomingDataPoint:dataPoint forGenerator:dataGenerator]; - sqlite3_stmt * stmt; - - NSString * insert = @"INSERT INTO data (timestamp, properties) VALUES (?, ?);"; - - if(sqlite3_prepare_v2(self.database, [insert UTF8String], -1, &stmt, NULL) == SQLITE_OK) { - sqlite3_bind_double(stmt, 1, [toStore[PDK_METADATA_KEY][PDK_TIMESTAMP_KEY] doubleValue]); + if (toStore != nil) { + NSLog(@"STORING: %@", toStore); - NSError * err = nil; - NSData * jsonData = [NSJSONSerialization dataWithJSONObject:toStore options:0 error:&err]; - NSString * jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; + sqlite3_stmt * stmt; - sqlite3_bind_text(stmt, 2, [jsonString UTF8String], -1, SQLITE_TRANSIENT); + NSString * insert = @"INSERT INTO data (timestamp, properties) VALUES (?, ?);"; - if (SQLITE_DONE != sqlite3_step(stmt)) { - NSLog(@"Error while inserting data. '%s'", sqlite3_errmsg(self.database)); + if(sqlite3_prepare_v2(self.database, [insert UTF8String], -1, &stmt, NULL) == SQLITE_OK) { + sqlite3_bind_double(stmt, 1, [toStore[PDK_METADATA_KEY][PDK_TIMESTAMP_KEY] doubleValue]); + + NSError * err = nil; + NSData * jsonData = [NSJSONSerialization dataWithJSONObject:toStore options:0 error:&err]; + NSString * jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; + + sqlite3_bind_text(stmt, 2, [jsonString UTF8String], -1, SQLITE_TRANSIENT); + + if (SQLITE_DONE != sqlite3_step(stmt)) { + NSLog(@"Error while inserting data. '%s'", sqlite3_errmsg(self.database)); + } + + sqlite3_finalize(stmt); } - - sqlite3_finalize(stmt); } } diff --git a/PassiveDataKit/PassiveDataKit-Shared.h b/PassiveDataKit/PassiveDataKit-Shared.h index ab0ae03..71c213a 100644 --- a/PassiveDataKit/PassiveDataKit-Shared.h +++ b/PassiveDataKit/PassiveDataKit-Shared.h @@ -10,3 +10,5 @@ FOUNDATION_EXPORT const unsigned char PassiveDataKit_SharedVersionString[]; #import "PassiveDataKit.h" #import "PDKHttpTransmitter.h" + +#import "PDKAFURLRequestSerialization.h" From 71afee7335e4bdac9f56e6863496db0593c203b0 Mon Sep 17 00:00:00 2001 From: Chris Karr Date: Wed, 21 Jun 2017 13:19:46 -0500 Subject: [PATCH 12/13] Code cleanup and PDKHttpTransmitter refinements --- PassiveDataKit/PDKHttpTransmitter.m | 41 ++++++++++++++------------ PassiveDataKit/PDKLocationGenerator.m | 1 - PassiveDataKit/PassiveDataKit-Shared.h | 1 + 3 files changed, 23 insertions(+), 20 deletions(-) diff --git a/PassiveDataKit/PDKHttpTransmitter.m b/PassiveDataKit/PDKHttpTransmitter.m index 2998f93..c7cc60d 100644 --- a/PassiveDataKit/PDKHttpTransmitter.m +++ b/PassiveDataKit/PDKHttpTransmitter.m @@ -162,7 +162,7 @@ - (void) transmit:(BOOL) force completionHandler:(void (^)(UIBackgroundFetchResu } } - [self transmitReadings:0 completionHandler:completionHandler]; + [self transmitReadingsWithStart:[NSDate date].timeIntervalSince1970 completionHandler:completionHandler]; } - (NSURLRequest *) uploadRequestForPayload:(NSArray *) payload { @@ -180,13 +180,11 @@ - (NSUInteger) payloadSize { return 16; } -- (void) transmitReadings:(NSUInteger) uploadWindow completionHandler:(void (^)(UIBackgroundFetchResult result)) completionHandler { - if (uploadWindow == 0) { - uploadWindow = 8; //!OCLINT +- (void) transmitReadingsWithStart:(NSTimeInterval) start completionHandler:(void (^)(UIBackgroundFetchResult result)) completionHandler { + if (start < 1) { + start = [NSDate date].timeIntervalSince1970; //!OCLINT } - NSTimeInterval now = [NSDate date].timeIntervalSince1970; - sqlite3_stmt * statement = NULL; NSString * querySQL = [NSString stringWithFormat:@"SELECT D.id, D.properties FROM data D WHERE (D.timestamp < ?) LIMIT %d", (int) [self payloadSize]]; @@ -195,7 +193,7 @@ - (void) transmitReadings:(NSUInteger) uploadWindow completionHandler:(void (^)( if (sqlite3_prepare_v2(self.database, query_stmt, -1, &statement, NULL) == SQLITE_OK) { - sqlite3_bind_double(statement, 1, now); + sqlite3_bind_double(statement, 1, start); NSMutableArray * payload = [NSMutableArray array]; NSMutableArray * uploaded = [NSMutableArray array]; @@ -230,18 +228,13 @@ - (void) transmitReadings:(NSUInteger) uploadWindow completionHandler:(void (^)( NSURLRequest * request = [self uploadRequestForPayload:payload]; if (request != nil) { - NSLog(@"UPLOADING PAYLOAD: %@", payload); - PDKAFURLSessionManager * manager = [[PDKAFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]]; [[manager dataTaskWithRequest:request uploadProgress:nil downloadProgress:nil completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) { - if ([responseObject containsObject:@"Data bundle added successfully, and ready for processing."] == NO) { - NSLog(@"Invalid response: %@", responseObject); - } - else if (error == nil) { + if (error == nil) { for (NSNumber * identifier in uploaded) { sqlite3_stmt * deleteStatement = NULL; @@ -269,19 +262,31 @@ - (void) transmitReadings:(NSUInteger) uploadWindow completionHandler:(void (^)( } } - NSTimeInterval interval = [NSDate date].timeIntervalSince1970 - now; + NSTimeInterval interval = [NSDate date].timeIntervalSince1970 - start; - if (uploadWindow > 0 && interval > uploadWindow && uploaded.count > 0) { - [self transmitReadings:(uploadWindow - interval) completionHandler:completionHandler]; + if (interval < 5 && uploaded.count > 0) { + [self transmitReadingsWithStart:start completionHandler:completionHandler]; } else { if (completionHandler != nil) { completionHandler(UIBackgroundFetchResultNewData); } - + } + } else { + NSLog(@"Error: %@", error); + if (completionHandler != nil) { + completionHandler(UIBackgroundFetchResultFailed); } } }] resume]; + } else { + if (completionHandler != nil) { + completionHandler(UIBackgroundFetchResultNoData); + } + } + } else { + if (completionHandler != nil) { + completionHandler(UIBackgroundFetchResultFailed); } } } @@ -324,8 +329,6 @@ - (void) receivedData:(NSDictionary *) dataPoint forGenerator:(PDKDataGenerator) NSDictionary * toStore = [self processIncomingDataPoint:dataPoint forGenerator:dataGenerator]; if (toStore != nil) { - NSLog(@"STORING: %@", toStore); - sqlite3_stmt * stmt; NSString * insert = @"INSERT INTO data (timestamp, properties) VALUES (?, ?);"; diff --git a/PassiveDataKit/PDKLocationGenerator.m b/PassiveDataKit/PDKLocationGenerator.m index e2da633..6d21e1a 100644 --- a/PassiveDataKit/PDKLocationGenerator.m +++ b/PassiveDataKit/PDKLocationGenerator.m @@ -109,7 +109,6 @@ - (void) updateOptions:(NSDictionary *) options { } NSLog(@"TODO: Update options and refresh generator!"); - } diff --git a/PassiveDataKit/PassiveDataKit-Shared.h b/PassiveDataKit/PassiveDataKit-Shared.h index 71c213a..543c3dc 100644 --- a/PassiveDataKit/PassiveDataKit-Shared.h +++ b/PassiveDataKit/PassiveDataKit-Shared.h @@ -12,3 +12,4 @@ FOUNDATION_EXPORT const unsigned char PassiveDataKit_SharedVersionString[]; #import "PDKHttpTransmitter.h" #import "PDKAFURLRequestSerialization.h" +#import "PDKAFURLResponseSerialization.h" From 1dbc286b7fc7be7672267f3952d42914d4409961 Mon Sep 17 00:00:00 2001 From: Chris Karr Date: Wed, 21 Jun 2017 17:44:21 -0500 Subject: [PATCH 13/13] Adding versioning to Info.plist --- PassiveDataKit/Info.plist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PassiveDataKit/Info.plist b/PassiveDataKit/Info.plist index f1a673a..5888122 100644 --- a/PassiveDataKit/Info.plist +++ b/PassiveDataKit/Info.plist @@ -18,6 +18,8 @@ 1.0 CFBundleSignature ???? + CFBundleVersion + 1 NSPrincipalClass