diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index a022e153a..ab40eded3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,25 +1,65 @@ +## 1.4.4 - 2021-11-19 + +Make enabled property public. + +## 1.4.3 - 2021-11-02 + +Add `shouldSendDeviceID` config option. + +## 1.4.2 - 2021-09-17 + +Fix Info.plist warning for Swift Package Manager + +## 1.4.1 - 2021-09-17 + +Fix warning with Swift Package Manager + +## 1.4.0 - 2021-05-27 + +Fix support for Swift Package Manager + +## 1.3.0 - 2021-05-11 + +In the `identify` call the `distinct_id` field can no longer be `nil`. + +## 1.2.3 - 2021-02-24 + +Renamed functions which were causing conflicts with Segment iOS library + +## 1.2.2 - 2020-02-22 + +Swift Package Manager + ## 1.2.1 - 2020-12-18 + Also remove the `enableAdvertisingCapturing` and `adSupportBlock` config options ## 1.2.0 - 2020-12-18 + Completely remove reference to the AdSupport framework ## 1.1.0 - 2020-10-03 + Shift responsibility of IDFA collection to clients ([#5](https://github.com/PostHog/posthog-ios/pull/5)) by removing any references to Apple's AdSupport framework from the library. In case you need to use the $device_advertisingId field, [see here](https://posthog.com/docs/integrations/ios-integration) for how to enable it. ## 1.0.5 - 2020-08-25 + Add Swift Package Manager support ## 1.0.4 - 2020-05-25 + Fix selector typo with ad capturing, which resulted in a crash when moving your app to the foreground. ## 1.0.3 - 2020-05-20 -Support passing in custom library version and name. This is used in the React Native client. + +Support passing in custom library version and name. This is used in the React Native client. ## 1.0.2 - 2020-05-18 -Fix issues with launching the library and screen tracking. + +Fix issues with launching the library and screen tracking. ## 1.0.0 - 2020-04-22 + First Release. diff --git a/Makefile b/Makefile index 7fd54382e..57c894c3c 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ XC_ARGS := -workspace PostHog.xcworkspace GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES IOS_XCARGS := $(XC_ARGS) -destination "platform=iOS Simulator,name=iPhone 11" -sdk iphonesimulator TVOS_XCARGS := $(XC_ARGS) -destination "platform=tvOS Simulator,name=Apple TV" XC_BUILD_ARGS := -scheme PostHog ONLY_ACTIVE_ARCH=NO -XC_TEST_ARGS := GCC_GENERATE_TEST_COVERAGE_FILES=YES SWIFT_VERSION=4.0 RUN_E2E_TESTS=$(RUN_E2E_TESTS) WEBHOOK_AUTH_USERNAME=$(WEBHOOK_AUTH_USERNAME) +XC_TEST_ARGS := GCC_GENERATE_TEST_COVERAGE_FILES=YES SWIFT_VERSION=4.2 RUN_E2E_TESTS=$(RUN_E2E_TESTS) WEBHOOK_AUTH_USERNAME=$(WEBHOOK_AUTH_USERNAME) bootstrap: .buildscript/bootstrap.sh diff --git a/Package.swift b/Package.swift index 1fe777525..209b02c88 100644 --- a/Package.swift +++ b/Package.swift @@ -1,22 +1,35 @@ -// swift-tools-version:5.2 +// swift-tools-version:5.3 import PackageDescription let package = Package( name: "PostHog", + platforms: [ + .iOS(.v13), .tvOS(.v13) + ], products: [ - .library(name: "PostHog", targets: ["PostHog"]), + // Products define the executables and libraries a package produces, and make them visible to other packages. + .library( + name: "PostHog", + targets: ["PostHog"]), ], targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. .target( name: "PostHog", dependencies: [], - path: "PostHog" - ), -// .testTarget( -// name: "PostHogTests", -// dependencies: ["PostHog"], -// path: "PostHogTests" -// ), + path: "PostHog/", + exclude: ["Info.plist"], + sources: ["Classes", + "Internal", + "Vendor"], + publicHeadersPath: "Classes", + cSettings: [ + .headerSearchPath("Vendor"), + .headerSearchPath("Internal"), + .headerSearchPath("Classes"), + ] + ) ] ) diff --git a/Podfile b/Podfile index d347effbe..041988816 100644 --- a/Podfile +++ b/Podfile @@ -1,6 +1,6 @@ def shared_testing_pods pod 'Quick', '~> 1.2.0' - pod 'Nimble', '~> 7.3.4' + pod 'Nimble', '~> 9.2.0' pod 'Nocilla', '~> 0.11.0' pod 'Alamofire', '~> 4.5' pod 'Alamofire-Synchronous', '~> 4.0' diff --git a/Podfile.lock b/Podfile.lock index 78fcf1f07..02cfbe3fd 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -2,14 +2,14 @@ PODS: - Alamofire (4.6.0) - Alamofire-Synchronous (4.0.0): - Alamofire (~> 4.0) - - Nimble (7.3.4) + - Nimble (9.2.0) - Nocilla (0.11.0) - Quick (1.2.0) DEPENDENCIES: - Alamofire (~> 4.5) - Alamofire-Synchronous (~> 4.0) - - Nimble (~> 7.3.4) + - Nimble (~> 9.2.0) - Nocilla (~> 0.11.0) - Quick (~> 1.2.0) @@ -24,10 +24,10 @@ SPEC REPOS: SPEC CHECKSUMS: Alamofire: f41a599bd63041760b26d393ec1069d9d7b917f4 Alamofire-Synchronous: eedf1e6e961c3795a63c74990b3f7d9fbfac7e50 - Nimble: 051e3d8912d40138fa5591c78594f95fb172af37 + Nimble: 4f4a345c80b503b3ea13606a4f98405974ee4d0b Nocilla: 7af7a386071150cc8aa5da4da97d060f049dd61c Quick: 58d203b1c5e27fff7229c4c1ae445ad7069a7a08 -PODFILE CHECKSUM: d830b1d570a19251d3a87ad6ee23f22be3c42db7 +PODFILE CHECKSUM: c797bf85ec73ef7d45907ff10078448b6943c16f -COCOAPODS: 1.9.1 +COCOAPODS: 1.10.1 diff --git a/PostHog.podspec b/PostHog.podspec index b24b12a07..c6119d4b3 100644 --- a/PostHog.podspec +++ b/PostHog.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "PostHog" - s.version = "1.2.1" + s.version = "1.4.4" s.summary = "The hassle-free way to add posthog to your iOS app." s.description = <<-DESC @@ -14,7 +14,7 @@ Pod::Spec.new do |s| s.source = { :git => "https://github.com/PostHog/posthog-ios.git", :tag => s.version.to_s } s.social_media_url = 'https://twitter.com/PostHogHQ' - s.ios.deployment_target = '7.0' + s.ios.deployment_target = '9.0' s.tvos.deployment_target = '9.0' s.ios.frameworks = 'CoreTelephony' @@ -22,6 +22,7 @@ Pod::Spec.new do |s| s.source_files = [ 'PostHog/Classes/**/*', + 'PostHog/Internal/**/*', 'PostHog/Vendor/**/*' ] end diff --git a/PostHog.xcodeproj/project.pbxproj b/PostHog.xcodeproj/project.pbxproj index 3391439ef..0787f1536 100644 --- a/PostHog.xcodeproj/project.pbxproj +++ b/PostHog.xcodeproj/project.pbxproj @@ -26,11 +26,49 @@ 9D8CE59E23EE014E00197D0C /* TestUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = EADEB8E41DECD335005322DA /* TestUtils.swift */; }; 9D8CE5A023EE014E00197D0C /* PostHog.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EADEB85B1DECD080005322DA /* PostHog.framework */; }; A31958EF2385AC3A00A47EFA /* SerializationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = A31958EE2385AC3A00A47EFA /* SerializationTests.m */; }; - A352176023AD5825005B07F6 /* PHGMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = A352175F23AD5825005B07F6 /* PHGMacros.h */; settings = {ATTRIBUTES = (Private, ); }; }; + BF8C806E9390DA2FC00D1812 /* PHGPayloadManager.h in Headers */ = {isa = PBXBuildFile; fileRef = BF8C8E6F09398C169F35E675 /* PHGPayloadManager.h */; settings = {ATTRIBUTES = (Private, ); }; }; + BF8C814E5A3BA7A84540D733 /* PHGContext.h in Headers */ = {isa = PBXBuildFile; fileRef = BF8C8BD43F67239FA1902206 /* PHGContext.h */; settings = {ATTRIBUTES = (Public, ); }; }; + BF8C817D68B4E9B441E21D64 /* UIViewController+PHGScreen.h in Headers */ = {isa = PBXBuildFile; fileRef = BF8C8AC249BECDAF13435FD2 /* UIViewController+PHGScreen.h */; settings = {ATTRIBUTES = (Private, ); }; }; + BF8C8181F96E1C8CB86D783D /* PHGPostHogUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = BF8C8C0E43DD950DB9CA7725 /* PHGPostHogUtils.h */; settings = {ATTRIBUTES = (Private, ); }; }; BF8C826724E6F30D02E53EA6 /* ObjC.h in Headers */ = {isa = PBXBuildFile; fileRef = BF8C88E533159E768C65C355 /* ObjC.h */; settings = {ATTRIBUTES = (Private, ); }; }; + BF8C8331F9BAC4B30CAAC061 /* PHGIdentifyPayload.m in Sources */ = {isa = PBXBuildFile; fileRef = BF8C811B41CBE38598366297 /* PHGIdentifyPayload.m */; }; + BF8C8334DB2564A7CFA7A87A /* PHGPayloadManager.m in Sources */ = {isa = PBXBuildFile; fileRef = BF8C8CD474E1A05E0D0F8C88 /* PHGPayloadManager.m */; }; + BF8C8374E0D8F97469715282 /* PHGPayload.m in Sources */ = {isa = PBXBuildFile; fileRef = BF8C80633A9C834A27298FDE /* PHGPayload.m */; }; + BF8C838C46F024993F46C108 /* PHGAliasPayload.h in Headers */ = {isa = PBXBuildFile; fileRef = BF8C8558DAB439462566DA94 /* PHGAliasPayload.h */; settings = {ATTRIBUTES = (Public, ); }; }; + BF8C84098D3C47C6F7B7FF9A /* PHGHTTPClient.h in Headers */ = {isa = PBXBuildFile; fileRef = BF8C8A9AD350CD86D85DF182 /* PHGHTTPClient.h */; settings = {ATTRIBUTES = (Public, ); }; }; + BF8C845A65AB5AD06E1EE26B /* PHGStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = BF8C83BC7E9D748CA963E2C1 /* PHGStorage.h */; settings = {ATTRIBUTES = (Public, ); }; }; + BF8C84CDF20A0959FC24E076 /* PHGPostHogUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = BF8C8CD3AE863FA75ADF0189 /* PHGPostHogUtils.m */; }; + BF8C84DEF5634524F1F9110A /* PHGUserDefaultsStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = BF8C8E50F0C96453793BC955 /* PHGUserDefaultsStorage.h */; settings = {ATTRIBUTES = (Private, ); }; }; + BF8C850E6C20F8E009469D1E /* PHGPostHogIntegration.h in Headers */ = {isa = PBXBuildFile; fileRef = BF8C811FC65903D9C4661465 /* PHGPostHogIntegration.h */; settings = {ATTRIBUTES = (Public, ); }; }; + BF8C856B25377945554598DF /* UIViewController+PHGScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = BF8C8D864F905E2A4AF297E8 /* UIViewController+PHGScreen.m */; }; + BF8C86649922EFA5F66C5BE7 /* PHGIdentifyPayload.h in Headers */ = {isa = PBXBuildFile; fileRef = BF8C8FC3DCC9BEBB4474F373 /* PHGIdentifyPayload.h */; settings = {ATTRIBUTES = (Public, ); }; }; + BF8C86ED787477703D8BCD6C /* PHGScreenPayload.m in Sources */ = {isa = PBXBuildFile; fileRef = BF8C83FDEE5C86782CB11D8B /* PHGScreenPayload.m */; }; + BF8C8735F5CF80C193F5AEDF /* PHGAliasPayload.m in Sources */ = {isa = PBXBuildFile; fileRef = BF8C8BC32FD2DF9975AB3A35 /* PHGAliasPayload.m */; }; + BF8C8791A47E4BF8586F0B43 /* PHGCapturePayload.h in Headers */ = {isa = PBXBuildFile; fileRef = BF8C8EE82249B851E06328EB /* PHGCapturePayload.h */; settings = {ATTRIBUTES = (Public, ); }; }; + BF8C87A812BB60E58DB7B1E4 /* PHGScreenPayload.h in Headers */ = {isa = PBXBuildFile; fileRef = BF8C82BFA5872F7E8CBFA682 /* PHGScreenPayload.h */; settings = {ATTRIBUTES = (Public, ); }; }; + BF8C87E4B70CA478721EB11D /* PHGCapturePayload.m in Sources */ = {isa = PBXBuildFile; fileRef = BF8C8D451AA492DA225B7DC7 /* PHGCapturePayload.m */; }; + BF8C87E7C76982625BA92F48 /* PHGAES256Crypto.h in Headers */ = {isa = PBXBuildFile; fileRef = BF8C81224E7FCD6D6BDF4614 /* PHGAES256Crypto.h */; settings = {ATTRIBUTES = (Private, ); }; }; + BF8C8862C12DE007F3494399 /* PHGContext.m in Sources */ = {isa = PBXBuildFile; fileRef = BF8C8F6DD6E7763114B6FCD1 /* PHGContext.m */; }; + BF8C88B5A93AE29953A01E65 /* PHGMiddleware.m in Sources */ = {isa = PBXBuildFile; fileRef = BF8C8AAA842A95EC8B4ED380 /* PHGMiddleware.m */; }; + BF8C890FADEC88022E7A3588 /* NSData+PHGGZIP.h in Headers */ = {isa = PBXBuildFile; fileRef = BF8C8F47D9775221FE48AA4D /* NSData+PHGGZIP.h */; settings = {ATTRIBUTES = (Private, ); }; }; + BF8C8A634BCECED539A18D57 /* PHGPostHogIntegration.m in Sources */ = {isa = PBXBuildFile; fileRef = BF8C8AF3C1D249548CF69443 /* PHGPostHogIntegration.m */; }; + BF8C8AD1FBFBB6941DE29D3B /* PHGFileStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = BF8C86671862A5FFA20C721C /* PHGFileStorage.h */; settings = {ATTRIBUTES = (Private, ); }; }; + BF8C8AEC72DA925C8B65B1A8 /* PHGMiddleware.h in Headers */ = {isa = PBXBuildFile; fileRef = BF8C81A4093856C696EF943D /* PHGMiddleware.h */; settings = {ATTRIBUTES = (Public, ); }; }; + BF8C8AF845410CCF3744EEA1 /* PHGAES256Crypto.m in Sources */ = {isa = PBXBuildFile; fileRef = BF8C861A6C2B0C33AC1E7D34 /* PHGAES256Crypto.m */; }; BF8C8C32C210AC2B093F1042 /* CHANGELOG.md in Sources */ = {isa = PBXBuildFile; fileRef = BF8C89860ED4391E417B39E9 /* CHANGELOG.md */; }; BF8C8C9C0FD46725EA63890A /* ObjC.m in Sources */ = {isa = PBXBuildFile; fileRef = BF8C8388F05135177F79C286 /* ObjC.m */; }; + BF8C8CAB52120583B9BB4934 /* PHGPayload.h in Headers */ = {isa = PBXBuildFile; fileRef = BF8C8E2E6C04BE91346F441D /* PHGPayload.h */; settings = {ATTRIBUTES = (Public, ); }; }; + BF8C8D75F1E684EA93578DF5 /* NSData+PHGGZIP.m in Sources */ = {isa = PBXBuildFile; fileRef = BF8C802EB41E4E93050D28BA /* NSData+PHGGZIP.m */; }; + BF8C8D8EE891F5599F3D78D7 /* PHGCrypto.h in Headers */ = {isa = PBXBuildFile; fileRef = BF8C89BCDF12D1B64E9475F1 /* PHGCrypto.h */; settings = {ATTRIBUTES = (Public, ); }; }; + BF8C8D9B4A6389088569438F /* PHGHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = BF8C8BFC78C6AE9EB9732E26 /* PHGHTTPClient.m */; }; + BF8C8DC55C0552CCAFE7BEBF /* PHGMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = BF8C8EC5CFC52D2FDC180500 /* PHGMacros.h */; settings = {ATTRIBUTES = (Private, ); }; }; + BF8C8DCC18E3AA39CCB330BC /* PHGStoreKitCapturer.h in Headers */ = {isa = PBXBuildFile; fileRef = BF8C8CBED16F21362625BE46 /* PHGStoreKitCapturer.h */; settings = {ATTRIBUTES = (Private, ); }; }; + BF8C8E28834B124F2E9835A5 /* PHGUserDefaultsStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = BF8C8CFB8B293A63E897C5A8 /* PHGUserDefaultsStorage.m */; }; + BF8C8E57BD722DB6AEFF6835 /* PHGFileStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = BF8C8EB90563BC3956BA25E4 /* PHGFileStorage.m */; }; + BF8C8EF6349359A33E8C6DFD /* PHGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = BF8C8EF9E0ABC31A6E3C0868 /* PHGUtils.m */; }; BF8C8F2782C85B046B01C044 /* PHGIntegration.h in Headers */ = {isa = PBXBuildFile; fileRef = BF8C8DC90BD0C5D0AF19498F /* PHGIntegration.h */; settings = {ATTRIBUTES = (Public, ); }; }; + BF8C8FC2CB4FAE70F5879308 /* PHGStoreKitCapturer.m in Sources */ = {isa = PBXBuildFile; fileRef = BF8C8233411FABE41CC0964B /* PHGStoreKitCapturer.m */; }; + BF8C8FCEC80B47BF2236236E /* PHGUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = BF8C81ED70A463EA7799B9B6 /* PHGUtils.h */; settings = {ATTRIBUTES = (Private, ); }; }; E4ACAD51DB827114D8626C74 /* Pods_PostHogTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5238C0454BF56A36A536C5C1 /* Pods_PostHogTests.framework */; }; EA88A5981DED7608009FB66A /* PHGSerializableValue.h in Headers */ = {isa = PBXBuildFile; fileRef = EA88A5971DED7608009FB66A /* PHGSerializableValue.h */; settings = {ATTRIBUTES = (Public, ); }; }; EA8F09741E24C5C600B8B93F /* MiddlewareTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA8F09731E24C5C600B8B93F /* MiddlewareTests.swift */; }; @@ -40,44 +78,6 @@ EAA542801EB4382100945DA7 /* StoreKitCapturerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAA5427F1EB4382100945DA7 /* StoreKitCapturerTests.swift */; }; EADEB8601DECD080005322DA /* PostHog.h in Headers */ = {isa = PBXBuildFile; fileRef = EADEB85E1DECD080005322DA /* PostHog.h */; settings = {ATTRIBUTES = (Public, ); }; }; EADEB86F1DECD0EF005322DA /* PostHog.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EADEB85B1DECD080005322DA /* PostHog.framework */; }; - EADEB8AE1DECD12B005322DA /* PHGAES256Crypto.h in Headers */ = {isa = PBXBuildFile; fileRef = EADEB8781DECD12B005322DA /* PHGAES256Crypto.h */; settings = {ATTRIBUTES = (Private, ); }; }; - EADEB8AF1DECD12B005322DA /* PHGAES256Crypto.m in Sources */ = {isa = PBXBuildFile; fileRef = EADEB8791DECD12B005322DA /* PHGAES256Crypto.m */; }; - EADEB8B01DECD12B005322DA /* PHGCrypto.h in Headers */ = {isa = PBXBuildFile; fileRef = EADEB87A1DECD12B005322DA /* PHGCrypto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EADEB8B11DECD12B005322DA /* PHGAliasPayload.h in Headers */ = {isa = PBXBuildFile; fileRef = EADEB87C1DECD12B005322DA /* PHGAliasPayload.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EADEB8B21DECD12B005322DA /* PHGAliasPayload.m in Sources */ = {isa = PBXBuildFile; fileRef = EADEB87D1DECD12B005322DA /* PHGAliasPayload.m */; }; - EADEB8B51DECD12B005322DA /* PHGIdentifyPayload.h in Headers */ = {isa = PBXBuildFile; fileRef = EADEB8801DECD12B005322DA /* PHGIdentifyPayload.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EADEB8B61DECD12B005322DA /* PHGIdentifyPayload.m in Sources */ = {isa = PBXBuildFile; fileRef = EADEB8811DECD12B005322DA /* PHGIdentifyPayload.m */; }; - EADEB8B91DECD12B005322DA /* PHGPayloadManager.h in Headers */ = {isa = PBXBuildFile; fileRef = EADEB8841DECD12B005322DA /* PHGPayloadManager.h */; settings = {ATTRIBUTES = (Private, ); }; }; - EADEB8BA1DECD12B005322DA /* PHGPayloadManager.m in Sources */ = {isa = PBXBuildFile; fileRef = EADEB8851DECD12B005322DA /* PHGPayloadManager.m */; }; - EADEB8BB1DECD12B005322DA /* PHGPayload.h in Headers */ = {isa = PBXBuildFile; fileRef = EADEB8861DECD12B005322DA /* PHGPayload.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EADEB8BC1DECD12B005322DA /* PHGPayload.m in Sources */ = {isa = PBXBuildFile; fileRef = EADEB8871DECD12B005322DA /* PHGPayload.m */; }; - EADEB8BD1DECD12B005322DA /* PHGScreenPayload.h in Headers */ = {isa = PBXBuildFile; fileRef = EADEB8881DECD12B005322DA /* PHGScreenPayload.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EADEB8BE1DECD12B005322DA /* PHGScreenPayload.m in Sources */ = {isa = PBXBuildFile; fileRef = EADEB8891DECD12B005322DA /* PHGScreenPayload.m */; }; - EADEB8BF1DECD12B005322DA /* PHGCapturePayload.h in Headers */ = {isa = PBXBuildFile; fileRef = EADEB88A1DECD12B005322DA /* PHGCapturePayload.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EADEB8C01DECD12B005322DA /* PHGCapturePayload.m in Sources */ = {isa = PBXBuildFile; fileRef = EADEB88B1DECD12B005322DA /* PHGCapturePayload.m */; }; - EADEB8C11DECD12B005322DA /* NSData+PHGGZIP.h in Headers */ = {isa = PBXBuildFile; fileRef = EADEB88D1DECD12B005322DA /* NSData+PHGGZIP.h */; settings = {ATTRIBUTES = (Private, ); }; }; - EADEB8C21DECD12B005322DA /* NSData+PHGGZIP.m in Sources */ = {isa = PBXBuildFile; fileRef = EADEB88E1DECD12B005322DA /* NSData+PHGGZIP.m */; }; - EADEB8C31DECD12B005322DA /* PHGPostHogUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = EADEB88F1DECD12B005322DA /* PHGPostHogUtils.h */; settings = {ATTRIBUTES = (Private, ); }; }; - EADEB8C41DECD12B005322DA /* PHGPostHogUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = EADEB8901DECD12B005322DA /* PHGPostHogUtils.m */; }; - EADEB8C51DECD12B005322DA /* PHGFileStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = EADEB8911DECD12B005322DA /* PHGFileStorage.h */; settings = {ATTRIBUTES = (Private, ); }; }; - EADEB8C61DECD12B005322DA /* PHGFileStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = EADEB8921DECD12B005322DA /* PHGFileStorage.m */; }; - EADEB8C71DECD12B005322DA /* PHGHTTPClient.h in Headers */ = {isa = PBXBuildFile; fileRef = EADEB8931DECD12B005322DA /* PHGHTTPClient.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EADEB8C81DECD12B005322DA /* PHGHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = EADEB8941DECD12B005322DA /* PHGHTTPClient.m */; }; - EADEB8CB1DECD12B005322DA /* PHGPostHogIntegration.h in Headers */ = {isa = PBXBuildFile; fileRef = EADEB8971DECD12B005322DA /* PHGPostHogIntegration.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EADEB8CC1DECD12B005322DA /* PHGPostHogIntegration.m in Sources */ = {isa = PBXBuildFile; fileRef = EADEB8981DECD12B005322DA /* PHGPostHogIntegration.m */; }; - EADEB8CF1DECD12B005322DA /* PHGStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = EADEB89B1DECD12B005322DA /* PHGStorage.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EADEB8D01DECD12B005322DA /* PHGStoreKitCapturer.h in Headers */ = {isa = PBXBuildFile; fileRef = EADEB89C1DECD12B005322DA /* PHGStoreKitCapturer.h */; settings = {ATTRIBUTES = (Private, ); }; }; - EADEB8D11DECD12B005322DA /* PHGStoreKitCapturer.m in Sources */ = {isa = PBXBuildFile; fileRef = EADEB89D1DECD12B005322DA /* PHGStoreKitCapturer.m */; }; - EADEB8D21DECD12B005322DA /* PHGUserDefaultsStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = EADEB89E1DECD12B005322DA /* PHGUserDefaultsStorage.h */; settings = {ATTRIBUTES = (Private, ); }; }; - EADEB8D31DECD12B005322DA /* PHGUserDefaultsStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = EADEB89F1DECD12B005322DA /* PHGUserDefaultsStorage.m */; }; - EADEB8D41DECD12B005322DA /* PHGUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = EADEB8A01DECD12B005322DA /* PHGUtils.h */; settings = {ATTRIBUTES = (Private, ); }; }; - EADEB8D51DECD12B005322DA /* PHGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = EADEB8A11DECD12B005322DA /* PHGUtils.m */; }; - EADEB8D61DECD12B005322DA /* UIViewController+PHGScreen.h in Headers */ = {isa = PBXBuildFile; fileRef = EADEB8A21DECD12B005322DA /* UIViewController+PHGScreen.h */; settings = {ATTRIBUTES = (Private, ); }; }; - EADEB8D71DECD12B005322DA /* UIViewController+PHGScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = EADEB8A31DECD12B005322DA /* UIViewController+PHGScreen.m */; }; - EADEB8D81DECD12B005322DA /* PHGContext.h in Headers */ = {isa = PBXBuildFile; fileRef = EADEB8A51DECD12B005322DA /* PHGContext.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EADEB8D91DECD12B005322DA /* PHGContext.m in Sources */ = {isa = PBXBuildFile; fileRef = EADEB8A61DECD12B005322DA /* PHGContext.m */; }; - EADEB8DA1DECD12B005322DA /* PHGMiddleware.h in Headers */ = {isa = PBXBuildFile; fileRef = EADEB8A71DECD12B005322DA /* PHGMiddleware.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EADEB8DB1DECD12B005322DA /* PHGMiddleware.m in Sources */ = {isa = PBXBuildFile; fileRef = EADEB8A81DECD12B005322DA /* PHGMiddleware.m */; }; EADEB8DC1DECD12B005322DA /* PHGPostHog.h in Headers */ = {isa = PBXBuildFile; fileRef = EADEB8A91DECD12B005322DA /* PHGPostHog.h */; settings = {ATTRIBUTES = (Public, ); }; }; EADEB8DD1DECD12B005322DA /* PHGPostHog.m in Sources */ = {isa = PBXBuildFile; fileRef = EADEB8AA1DECD12B005322DA /* PHGPostHog.m */; }; EADEB8DE1DECD12B005322DA /* PHGPostHogConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = EADEB8AB1DECD12B005322DA /* PHGPostHogConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -119,12 +119,50 @@ 6EEC1C702017EA370089C478 /* EndToEndTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EndToEndTests.swift; sourceTree = ""; }; 9D8CE5A723EE014E00197D0C /* PostHogTestsTVOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PostHogTestsTVOS.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; A31958EE2385AC3A00A47EFA /* SerializationTests.m */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = SerializationTests.m; sourceTree = ""; tabWidth = 4; }; - A352175F23AD5825005B07F6 /* PHGMacros.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PHGMacros.h; sourceTree = ""; }; B0D1E9E4405FD8386DCCD150 /* Pods-PostHogTestsTVOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PostHogTestsTVOS.release.xcconfig"; path = "Target Support Files/Pods-PostHogTestsTVOS/Pods-PostHogTestsTVOS.release.xcconfig"; sourceTree = ""; }; + BF8C802EB41E4E93050D28BA /* NSData+PHGGZIP.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSData+PHGGZIP.m"; path = "Internal/NSData+PHGGZIP.m"; sourceTree = ""; }; + BF8C80633A9C834A27298FDE /* PHGPayload.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PHGPayload.m; sourceTree = ""; }; + BF8C811B41CBE38598366297 /* PHGIdentifyPayload.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PHGIdentifyPayload.m; sourceTree = ""; }; + BF8C811FC65903D9C4661465 /* PHGPostHogIntegration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PHGPostHogIntegration.h; path = Internal/PHGPostHogIntegration.h; sourceTree = ""; }; + BF8C81224E7FCD6D6BDF4614 /* PHGAES256Crypto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PHGAES256Crypto.h; path = Internal/PHGAES256Crypto.h; sourceTree = ""; }; + BF8C81A4093856C696EF943D /* PHGMiddleware.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGMiddleware.h; sourceTree = ""; }; + BF8C81ED70A463EA7799B9B6 /* PHGUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PHGUtils.h; path = Internal/PHGUtils.h; sourceTree = ""; }; + BF8C8233411FABE41CC0964B /* PHGStoreKitCapturer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PHGStoreKitCapturer.m; path = Internal/PHGStoreKitCapturer.m; sourceTree = ""; }; + BF8C82BFA5872F7E8CBFA682 /* PHGScreenPayload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGScreenPayload.h; sourceTree = ""; }; BF8C8388F05135177F79C286 /* ObjC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ObjC.m; sourceTree = ""; }; + BF8C83BC7E9D748CA963E2C1 /* PHGStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PHGStorage.h; path = Internal/PHGStorage.h; sourceTree = ""; }; + BF8C83FDEE5C86782CB11D8B /* PHGScreenPayload.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PHGScreenPayload.m; sourceTree = ""; }; + BF8C8558DAB439462566DA94 /* PHGAliasPayload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGAliasPayload.h; sourceTree = ""; }; + BF8C861A6C2B0C33AC1E7D34 /* PHGAES256Crypto.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PHGAES256Crypto.m; path = Internal/PHGAES256Crypto.m; sourceTree = ""; }; + BF8C86671862A5FFA20C721C /* PHGFileStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PHGFileStorage.h; path = Internal/PHGFileStorage.h; sourceTree = ""; }; BF8C88E533159E768C65C355 /* ObjC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjC.h; sourceTree = ""; }; BF8C89860ED4391E417B39E9 /* CHANGELOG.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = ""; }; + BF8C89BCDF12D1B64E9475F1 /* PHGCrypto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGCrypto.h; sourceTree = ""; }; + BF8C8A9AD350CD86D85DF182 /* PHGHTTPClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PHGHTTPClient.h; path = Internal/PHGHTTPClient.h; sourceTree = ""; }; + BF8C8AAA842A95EC8B4ED380 /* PHGMiddleware.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PHGMiddleware.m; sourceTree = ""; }; + BF8C8AC249BECDAF13435FD2 /* UIViewController+PHGScreen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIViewController+PHGScreen.h"; path = "Internal/UIViewController+PHGScreen.h"; sourceTree = ""; }; + BF8C8AF3C1D249548CF69443 /* PHGPostHogIntegration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PHGPostHogIntegration.m; path = Internal/PHGPostHogIntegration.m; sourceTree = ""; }; + BF8C8BC32FD2DF9975AB3A35 /* PHGAliasPayload.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PHGAliasPayload.m; sourceTree = ""; }; + BF8C8BD43F67239FA1902206 /* PHGContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGContext.h; sourceTree = ""; }; + BF8C8BFC78C6AE9EB9732E26 /* PHGHTTPClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PHGHTTPClient.m; path = Internal/PHGHTTPClient.m; sourceTree = ""; }; + BF8C8C0E43DD950DB9CA7725 /* PHGPostHogUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PHGPostHogUtils.h; path = Internal/PHGPostHogUtils.h; sourceTree = ""; }; + BF8C8CBED16F21362625BE46 /* PHGStoreKitCapturer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PHGStoreKitCapturer.h; path = Internal/PHGStoreKitCapturer.h; sourceTree = ""; }; + BF8C8CD3AE863FA75ADF0189 /* PHGPostHogUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PHGPostHogUtils.m; path = Internal/PHGPostHogUtils.m; sourceTree = ""; }; + BF8C8CD474E1A05E0D0F8C88 /* PHGPayloadManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PHGPayloadManager.m; sourceTree = ""; }; + BF8C8CFB8B293A63E897C5A8 /* PHGUserDefaultsStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PHGUserDefaultsStorage.m; path = Internal/PHGUserDefaultsStorage.m; sourceTree = ""; }; + BF8C8D451AA492DA225B7DC7 /* PHGCapturePayload.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PHGCapturePayload.m; sourceTree = ""; }; + BF8C8D864F905E2A4AF297E8 /* UIViewController+PHGScreen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+PHGScreen.m"; path = "Internal/UIViewController+PHGScreen.m"; sourceTree = ""; }; BF8C8DC90BD0C5D0AF19498F /* PHGIntegration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGIntegration.h; sourceTree = ""; }; + BF8C8E2E6C04BE91346F441D /* PHGPayload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGPayload.h; sourceTree = ""; }; + BF8C8E50F0C96453793BC955 /* PHGUserDefaultsStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PHGUserDefaultsStorage.h; path = Internal/PHGUserDefaultsStorage.h; sourceTree = ""; }; + BF8C8E6F09398C169F35E675 /* PHGPayloadManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGPayloadManager.h; sourceTree = ""; }; + BF8C8EB90563BC3956BA25E4 /* PHGFileStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PHGFileStorage.m; path = Internal/PHGFileStorage.m; sourceTree = ""; }; + BF8C8EC5CFC52D2FDC180500 /* PHGMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PHGMacros.h; path = Internal/PHGMacros.h; sourceTree = ""; }; + BF8C8EE82249B851E06328EB /* PHGCapturePayload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGCapturePayload.h; sourceTree = ""; }; + BF8C8EF9E0ABC31A6E3C0868 /* PHGUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PHGUtils.m; path = Internal/PHGUtils.m; sourceTree = ""; }; + BF8C8F47D9775221FE48AA4D /* NSData+PHGGZIP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSData+PHGGZIP.h"; path = "Internal/NSData+PHGGZIP.h"; sourceTree = ""; }; + BF8C8F6DD6E7763114B6FCD1 /* PHGContext.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PHGContext.m; sourceTree = ""; }; + BF8C8FC3DCC9BEBB4474F373 /* PHGIdentifyPayload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGIdentifyPayload.h; sourceTree = ""; }; EA88A5971DED7608009FB66A /* PHGSerializableValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGSerializableValue.h; sourceTree = ""; }; EA8F09731E24C5C600B8B93F /* MiddlewareTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MiddlewareTests.swift; sourceTree = ""; }; EAA542761EB4035400945DA7 /* CapturingTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CapturingTests.swift; sourceTree = ""; }; @@ -135,44 +173,6 @@ EADEB85E1DECD080005322DA /* PostHog.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PostHog.h; sourceTree = ""; }; EADEB85F1DECD080005322DA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; EADEB86A1DECD0EF005322DA /* PostHogTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PostHogTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - EADEB8781DECD12B005322DA /* PHGAES256Crypto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGAES256Crypto.h; sourceTree = ""; }; - EADEB8791DECD12B005322DA /* PHGAES256Crypto.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PHGAES256Crypto.m; sourceTree = ""; }; - EADEB87A1DECD12B005322DA /* PHGCrypto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGCrypto.h; sourceTree = ""; }; - EADEB87C1DECD12B005322DA /* PHGAliasPayload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGAliasPayload.h; sourceTree = ""; }; - EADEB87D1DECD12B005322DA /* PHGAliasPayload.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PHGAliasPayload.m; sourceTree = ""; }; - EADEB8801DECD12B005322DA /* PHGIdentifyPayload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGIdentifyPayload.h; sourceTree = ""; }; - EADEB8811DECD12B005322DA /* PHGIdentifyPayload.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PHGIdentifyPayload.m; sourceTree = ""; }; - EADEB8841DECD12B005322DA /* PHGPayloadManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGPayloadManager.h; sourceTree = ""; }; - EADEB8851DECD12B005322DA /* PHGPayloadManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PHGPayloadManager.m; sourceTree = ""; }; - EADEB8861DECD12B005322DA /* PHGPayload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGPayload.h; sourceTree = ""; }; - EADEB8871DECD12B005322DA /* PHGPayload.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PHGPayload.m; sourceTree = ""; }; - EADEB8881DECD12B005322DA /* PHGScreenPayload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGScreenPayload.h; sourceTree = ""; }; - EADEB8891DECD12B005322DA /* PHGScreenPayload.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PHGScreenPayload.m; sourceTree = ""; }; - EADEB88A1DECD12B005322DA /* PHGCapturePayload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGCapturePayload.h; sourceTree = ""; }; - EADEB88B1DECD12B005322DA /* PHGCapturePayload.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PHGCapturePayload.m; sourceTree = ""; }; - EADEB88D1DECD12B005322DA /* NSData+PHGGZIP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+PHGGZIP.h"; sourceTree = ""; }; - EADEB88E1DECD12B005322DA /* NSData+PHGGZIP.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+PHGGZIP.m"; sourceTree = ""; }; - EADEB88F1DECD12B005322DA /* PHGPostHogUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGPostHogUtils.h; sourceTree = ""; }; - EADEB8901DECD12B005322DA /* PHGPostHogUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PHGPostHogUtils.m; sourceTree = ""; }; - EADEB8911DECD12B005322DA /* PHGFileStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGFileStorage.h; sourceTree = ""; }; - EADEB8921DECD12B005322DA /* PHGFileStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PHGFileStorage.m; sourceTree = ""; }; - EADEB8931DECD12B005322DA /* PHGHTTPClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGHTTPClient.h; sourceTree = ""; }; - EADEB8941DECD12B005322DA /* PHGHTTPClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PHGHTTPClient.m; sourceTree = ""; }; - EADEB8971DECD12B005322DA /* PHGPostHogIntegration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGPostHogIntegration.h; sourceTree = ""; }; - EADEB8981DECD12B005322DA /* PHGPostHogIntegration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PHGPostHogIntegration.m; sourceTree = ""; }; - EADEB89B1DECD12B005322DA /* PHGStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGStorage.h; sourceTree = ""; }; - EADEB89C1DECD12B005322DA /* PHGStoreKitCapturer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGStoreKitCapturer.h; sourceTree = ""; }; - EADEB89D1DECD12B005322DA /* PHGStoreKitCapturer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PHGStoreKitCapturer.m; sourceTree = ""; }; - EADEB89E1DECD12B005322DA /* PHGUserDefaultsStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGUserDefaultsStorage.h; sourceTree = ""; }; - EADEB89F1DECD12B005322DA /* PHGUserDefaultsStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PHGUserDefaultsStorage.m; sourceTree = ""; }; - EADEB8A01DECD12B005322DA /* PHGUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGUtils.h; sourceTree = ""; }; - EADEB8A11DECD12B005322DA /* PHGUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PHGUtils.m; sourceTree = ""; }; - EADEB8A21DECD12B005322DA /* UIViewController+PHGScreen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+PHGScreen.h"; sourceTree = ""; }; - EADEB8A31DECD12B005322DA /* UIViewController+PHGScreen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+PHGScreen.m"; sourceTree = ""; }; - EADEB8A51DECD12B005322DA /* PHGContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGContext.h; sourceTree = ""; }; - EADEB8A61DECD12B005322DA /* PHGContext.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PHGContext.m; sourceTree = ""; }; - EADEB8A71DECD12B005322DA /* PHGMiddleware.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGMiddleware.h; sourceTree = ""; }; - EADEB8A81DECD12B005322DA /* PHGMiddleware.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PHGMiddleware.m; sourceTree = ""; }; EADEB8A91DECD12B005322DA /* PHGPostHog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGPostHog.h; sourceTree = ""; }; EADEB8AA1DECD12B005322DA /* PHGPostHog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PHGPostHog.m; sourceTree = ""; }; EADEB8AB1DECD12B005322DA /* PHGPostHogConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PHGPostHogConfiguration.h; sourceTree = ""; }; @@ -288,6 +288,28 @@ EADEB8751DECD12B005322DA /* Classes */, EADEB85E1DECD080005322DA /* PostHog.h */, EADEB85F1DECD080005322DA /* Info.plist */, + BF8C81224E7FCD6D6BDF4614 /* PHGAES256Crypto.h */, + BF8C861A6C2B0C33AC1E7D34 /* PHGAES256Crypto.m */, + BF8C8EB90563BC3956BA25E4 /* PHGFileStorage.m */, + BF8C8D864F905E2A4AF297E8 /* UIViewController+PHGScreen.m */, + BF8C811FC65903D9C4661465 /* PHGPostHogIntegration.h */, + BF8C8EF9E0ABC31A6E3C0868 /* PHGUtils.m */, + BF8C8EC5CFC52D2FDC180500 /* PHGMacros.h */, + BF8C8A9AD350CD86D85DF182 /* PHGHTTPClient.h */, + BF8C8AC249BECDAF13435FD2 /* UIViewController+PHGScreen.h */, + BF8C86671862A5FFA20C721C /* PHGFileStorage.h */, + BF8C8CD3AE863FA75ADF0189 /* PHGPostHogUtils.m */, + BF8C83BC7E9D748CA963E2C1 /* PHGStorage.h */, + BF8C8F47D9775221FE48AA4D /* NSData+PHGGZIP.h */, + BF8C8C0E43DD950DB9CA7725 /* PHGPostHogUtils.h */, + BF8C8CFB8B293A63E897C5A8 /* PHGUserDefaultsStorage.m */, + BF8C8233411FABE41CC0964B /* PHGStoreKitCapturer.m */, + BF8C81ED70A463EA7799B9B6 /* PHGUtils.h */, + BF8C8CBED16F21362625BE46 /* PHGStoreKitCapturer.h */, + BF8C802EB41E4E93050D28BA /* NSData+PHGGZIP.m */, + BF8C8BFC78C6AE9EB9732E26 /* PHGHTTPClient.m */, + BF8C8AF3C1D249548CF69443 /* PHGPostHogIntegration.m */, + BF8C8E50F0C96453793BC955 /* PHGUserDefaultsStorage.h */, ); path = PostHog; sourceTree = ""; @@ -321,87 +343,33 @@ isa = PBXGroup; children = ( EAA5427A1EB42B8C00945DA7 /* Vendor */, - EADEB8771DECD12B005322DA /* Crypto */, - EADEB87B1DECD12B005322DA /* Payloads */, - EADEB88C1DECD12B005322DA /* Internal */, - EADEB8A41DECD12B005322DA /* Middlewares */, EA88A5971DED7608009FB66A /* PHGSerializableValue.h */, EADEB8A91DECD12B005322DA /* PHGPostHog.h */, EADEB8AA1DECD12B005322DA /* PHGPostHog.m */, EADEB8AB1DECD12B005322DA /* PHGPostHogConfiguration.h */, EADEB8AC1DECD12B005322DA /* PHGPostHogConfiguration.m */, BF8C8DC90BD0C5D0AF19498F /* PHGIntegration.h */, + BF8C8BC32FD2DF9975AB3A35 /* PHGAliasPayload.m */, + BF8C8E6F09398C169F35E675 /* PHGPayloadManager.h */, + BF8C8FC3DCC9BEBB4474F373 /* PHGIdentifyPayload.h */, + BF8C80633A9C834A27298FDE /* PHGPayload.m */, + BF8C83FDEE5C86782CB11D8B /* PHGScreenPayload.m */, + BF8C8E2E6C04BE91346F441D /* PHGPayload.h */, + BF8C8CD474E1A05E0D0F8C88 /* PHGPayloadManager.m */, + BF8C8D451AA492DA225B7DC7 /* PHGCapturePayload.m */, + BF8C82BFA5872F7E8CBFA682 /* PHGScreenPayload.h */, + BF8C8558DAB439462566DA94 /* PHGAliasPayload.h */, + BF8C811B41CBE38598366297 /* PHGIdentifyPayload.m */, + BF8C8EE82249B851E06328EB /* PHGCapturePayload.h */, + BF8C8F6DD6E7763114B6FCD1 /* PHGContext.m */, + BF8C8AAA842A95EC8B4ED380 /* PHGMiddleware.m */, + BF8C8BD43F67239FA1902206 /* PHGContext.h */, + BF8C81A4093856C696EF943D /* PHGMiddleware.h */, + BF8C89BCDF12D1B64E9475F1 /* PHGCrypto.h */, ); path = Classes; sourceTree = ""; }; - EADEB8771DECD12B005322DA /* Crypto */ = { - isa = PBXGroup; - children = ( - EADEB8781DECD12B005322DA /* PHGAES256Crypto.h */, - EADEB8791DECD12B005322DA /* PHGAES256Crypto.m */, - EADEB87A1DECD12B005322DA /* PHGCrypto.h */, - ); - path = Crypto; - sourceTree = ""; - }; - EADEB87B1DECD12B005322DA /* Payloads */ = { - isa = PBXGroup; - children = ( - EADEB87C1DECD12B005322DA /* PHGAliasPayload.h */, - EADEB87D1DECD12B005322DA /* PHGAliasPayload.m */, - EADEB8801DECD12B005322DA /* PHGIdentifyPayload.h */, - EADEB8811DECD12B005322DA /* PHGIdentifyPayload.m */, - EADEB8841DECD12B005322DA /* PHGPayloadManager.h */, - EADEB8851DECD12B005322DA /* PHGPayloadManager.m */, - EADEB8861DECD12B005322DA /* PHGPayload.h */, - EADEB8871DECD12B005322DA /* PHGPayload.m */, - EADEB8881DECD12B005322DA /* PHGScreenPayload.h */, - EADEB8891DECD12B005322DA /* PHGScreenPayload.m */, - EADEB88A1DECD12B005322DA /* PHGCapturePayload.h */, - EADEB88B1DECD12B005322DA /* PHGCapturePayload.m */, - ); - path = Payloads; - sourceTree = ""; - }; - EADEB88C1DECD12B005322DA /* Internal */ = { - isa = PBXGroup; - children = ( - EADEB88D1DECD12B005322DA /* NSData+PHGGZIP.h */, - EADEB88E1DECD12B005322DA /* NSData+PHGGZIP.m */, - EADEB88F1DECD12B005322DA /* PHGPostHogUtils.h */, - EADEB8901DECD12B005322DA /* PHGPostHogUtils.m */, - EADEB8911DECD12B005322DA /* PHGFileStorage.h */, - EADEB8921DECD12B005322DA /* PHGFileStorage.m */, - EADEB8931DECD12B005322DA /* PHGHTTPClient.h */, - EADEB8941DECD12B005322DA /* PHGHTTPClient.m */, - EADEB8971DECD12B005322DA /* PHGPostHogIntegration.h */, - EADEB8981DECD12B005322DA /* PHGPostHogIntegration.m */, - EADEB89B1DECD12B005322DA /* PHGStorage.h */, - EADEB89C1DECD12B005322DA /* PHGStoreKitCapturer.h */, - EADEB89D1DECD12B005322DA /* PHGStoreKitCapturer.m */, - EADEB89E1DECD12B005322DA /* PHGUserDefaultsStorage.h */, - EADEB89F1DECD12B005322DA /* PHGUserDefaultsStorage.m */, - EADEB8A01DECD12B005322DA /* PHGUtils.h */, - EADEB8A11DECD12B005322DA /* PHGUtils.m */, - A352175F23AD5825005B07F6 /* PHGMacros.h */, - EADEB8A21DECD12B005322DA /* UIViewController+PHGScreen.h */, - EADEB8A31DECD12B005322DA /* UIViewController+PHGScreen.m */, - ); - path = Internal; - sourceTree = ""; - }; - EADEB8A41DECD12B005322DA /* Middlewares */ = { - isa = PBXGroup; - children = ( - EADEB8A51DECD12B005322DA /* PHGContext.h */, - EADEB8A61DECD12B005322DA /* PHGContext.m */, - EADEB8A71DECD12B005322DA /* PHGMiddleware.h */, - EADEB8A81DECD12B005322DA /* PHGMiddleware.m */, - ); - path = Middlewares; - sourceTree = ""; - }; EADEB8E11DECD335005322DA /* Utils */ = { isa = PBXGroup; children = ( @@ -430,33 +398,33 @@ buildActionMask = 2147483647; files = ( EADEB8DC1DECD12B005322DA /* PHGPostHog.h in Headers */, - EADEB8CB1DECD12B005322DA /* PHGPostHogIntegration.h in Headers */, - EADEB8B51DECD12B005322DA /* PHGIdentifyPayload.h in Headers */, - EADEB8BB1DECD12B005322DA /* PHGPayload.h in Headers */, - EADEB8B11DECD12B005322DA /* PHGAliasPayload.h in Headers */, - EADEB8BD1DECD12B005322DA /* PHGScreenPayload.h in Headers */, EA88A5981DED7608009FB66A /* PHGSerializableValue.h in Headers */, - EADEB8D81DECD12B005322DA /* PHGContext.h in Headers */, - EADEB8DA1DECD12B005322DA /* PHGMiddleware.h in Headers */, - EADEB8BF1DECD12B005322DA /* PHGCapturePayload.h in Headers */, - EADEB8C71DECD12B005322DA /* PHGHTTPClient.h in Headers */, - EADEB8B01DECD12B005322DA /* PHGCrypto.h in Headers */, EADEB8DE1DECD12B005322DA /* PHGPostHogConfiguration.h in Headers */, BF8C8F2782C85B046B01C044 /* PHGIntegration.h in Headers */, - EADEB8D61DECD12B005322DA /* UIViewController+PHGScreen.h in Headers */, - EADEB8CF1DECD12B005322DA /* PHGStorage.h in Headers */, - A352176023AD5825005B07F6 /* PHGMacros.h in Headers */, - EADEB8D21DECD12B005322DA /* PHGUserDefaultsStorage.h in Headers */, - EADEB8D01DECD12B005322DA /* PHGStoreKitCapturer.h in Headers */, - EADEB8D41DECD12B005322DA /* PHGUtils.h in Headers */, EADEB8601DECD080005322DA /* PostHog.h in Headers */, - EADEB8C31DECD12B005322DA /* PHGPostHogUtils.h in Headers */, - EADEB8B91DECD12B005322DA /* PHGPayloadManager.h in Headers */, - EADEB8AE1DECD12B005322DA /* PHGAES256Crypto.h in Headers */, - EADEB8C51DECD12B005322DA /* PHGFileStorage.h in Headers */, EAA5427D1EB42B8C00945DA7 /* PHGReachability.h in Headers */, BF8C826724E6F30D02E53EA6 /* ObjC.h in Headers */, - EADEB8C11DECD12B005322DA /* NSData+PHGGZIP.h in Headers */, + BF8C87E7C76982625BA92F48 /* PHGAES256Crypto.h in Headers */, + BF8C850E6C20F8E009469D1E /* PHGPostHogIntegration.h in Headers */, + BF8C8DC55C0552CCAFE7BEBF /* PHGMacros.h in Headers */, + BF8C84098D3C47C6F7B7FF9A /* PHGHTTPClient.h in Headers */, + BF8C817D68B4E9B441E21D64 /* UIViewController+PHGScreen.h in Headers */, + BF8C8AD1FBFBB6941DE29D3B /* PHGFileStorage.h in Headers */, + BF8C845A65AB5AD06E1EE26B /* PHGStorage.h in Headers */, + BF8C890FADEC88022E7A3588 /* NSData+PHGGZIP.h in Headers */, + BF8C8181F96E1C8CB86D783D /* PHGPostHogUtils.h in Headers */, + BF8C8FCEC80B47BF2236236E /* PHGUtils.h in Headers */, + BF8C8DCC18E3AA39CCB330BC /* PHGStoreKitCapturer.h in Headers */, + BF8C84DEF5634524F1F9110A /* PHGUserDefaultsStorage.h in Headers */, + BF8C806E9390DA2FC00D1812 /* PHGPayloadManager.h in Headers */, + BF8C86649922EFA5F66C5BE7 /* PHGIdentifyPayload.h in Headers */, + BF8C8CAB52120583B9BB4934 /* PHGPayload.h in Headers */, + BF8C87A812BB60E58DB7B1E4 /* PHGScreenPayload.h in Headers */, + BF8C838C46F024993F46C108 /* PHGAliasPayload.h in Headers */, + BF8C8791A47E4BF8586F0B43 /* PHGCapturePayload.h in Headers */, + BF8C814E5A3BA7A84540D733 /* PHGContext.h in Headers */, + BF8C8AEC72DA925C8B65B1A8 /* PHGMiddleware.h in Headers */, + BF8C8D8EE891F5599F3D78D7 /* PHGCrypto.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -716,28 +684,28 @@ buildActionMask = 2147483647; files = ( EADEB8DD1DECD12B005322DA /* PHGPostHog.m in Sources */, - EADEB8BE1DECD12B005322DA /* PHGScreenPayload.m in Sources */, - EADEB8B61DECD12B005322DA /* PHGIdentifyPayload.m in Sources */, - EADEB8C01DECD12B005322DA /* PHGCapturePayload.m in Sources */, - EADEB8AF1DECD12B005322DA /* PHGAES256Crypto.m in Sources */, - EADEB8C81DECD12B005322DA /* PHGHTTPClient.m in Sources */, - EADEB8CC1DECD12B005322DA /* PHGPostHogIntegration.m in Sources */, - EADEB8B21DECD12B005322DA /* PHGAliasPayload.m in Sources */, - EADEB8BA1DECD12B005322DA /* PHGPayloadManager.m in Sources */, - EADEB8C41DECD12B005322DA /* PHGPostHogUtils.m in Sources */, - EADEB8C61DECD12B005322DA /* PHGFileStorage.m in Sources */, - EADEB8D31DECD12B005322DA /* PHGUserDefaultsStorage.m in Sources */, - EADEB8BC1DECD12B005322DA /* PHGPayload.m in Sources */, - EADEB8C21DECD12B005322DA /* NSData+PHGGZIP.m in Sources */, - EADEB8D91DECD12B005322DA /* PHGContext.m in Sources */, - EADEB8DB1DECD12B005322DA /* PHGMiddleware.m in Sources */, EADEB8DF1DECD12B005322DA /* PHGPostHogConfiguration.m in Sources */, - EADEB8D51DECD12B005322DA /* PHGUtils.m in Sources */, EAA5427E1EB42B8C00945DA7 /* PHGReachability.m in Sources */, - EADEB8D71DECD12B005322DA /* UIViewController+PHGScreen.m in Sources */, - EADEB8D11DECD12B005322DA /* PHGStoreKitCapturer.m in Sources */, BF8C8C9C0FD46725EA63890A /* ObjC.m in Sources */, BF8C8C32C210AC2B093F1042 /* CHANGELOG.md in Sources */, + BF8C8AF845410CCF3744EEA1 /* PHGAES256Crypto.m in Sources */, + BF8C8E57BD722DB6AEFF6835 /* PHGFileStorage.m in Sources */, + BF8C856B25377945554598DF /* UIViewController+PHGScreen.m in Sources */, + BF8C8EF6349359A33E8C6DFD /* PHGUtils.m in Sources */, + BF8C84CDF20A0959FC24E076 /* PHGPostHogUtils.m in Sources */, + BF8C8E28834B124F2E9835A5 /* PHGUserDefaultsStorage.m in Sources */, + BF8C8FC2CB4FAE70F5879308 /* PHGStoreKitCapturer.m in Sources */, + BF8C8D75F1E684EA93578DF5 /* NSData+PHGGZIP.m in Sources */, + BF8C8D9B4A6389088569438F /* PHGHTTPClient.m in Sources */, + BF8C8A634BCECED539A18D57 /* PHGPostHogIntegration.m in Sources */, + BF8C8735F5CF80C193F5AEDF /* PHGAliasPayload.m in Sources */, + BF8C8374E0D8F97469715282 /* PHGPayload.m in Sources */, + BF8C86ED787477703D8BCD6C /* PHGScreenPayload.m in Sources */, + BF8C8334DB2564A7CFA7A87A /* PHGPayloadManager.m in Sources */, + BF8C87E4B70CA478721EB11D /* PHGCapturePayload.m in Sources */, + BF8C8331F9BAC4B30CAAC061 /* PHGIdentifyPayload.m in Sources */, + BF8C8862C12DE007F3494399 /* PHGContext.m in Sources */, + BF8C88B5A93AE29953A01E65 /* PHGMiddleware.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -952,6 +920,7 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvos appletvsimulator"; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2,3"; TVOS_DEPLOYMENT_TARGET = 9.0; }; @@ -977,6 +946,7 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvos appletvsimulator"; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2,3"; TVOS_DEPLOYMENT_TARGET = 9.0; }; diff --git a/PostHog/Classes/Payloads/PHGAliasPayload.h b/PostHog/Classes/PHGAliasPayload.h similarity index 100% rename from PostHog/Classes/Payloads/PHGAliasPayload.h rename to PostHog/Classes/PHGAliasPayload.h diff --git a/PostHog/Classes/Payloads/PHGAliasPayload.m b/PostHog/Classes/PHGAliasPayload.m similarity index 100% rename from PostHog/Classes/Payloads/PHGAliasPayload.m rename to PostHog/Classes/PHGAliasPayload.m diff --git a/PostHog/Classes/Payloads/PHGCapturePayload.h b/PostHog/Classes/PHGCapturePayload.h similarity index 100% rename from PostHog/Classes/Payloads/PHGCapturePayload.h rename to PostHog/Classes/PHGCapturePayload.h diff --git a/PostHog/Classes/Payloads/PHGCapturePayload.m b/PostHog/Classes/PHGCapturePayload.m similarity index 100% rename from PostHog/Classes/Payloads/PHGCapturePayload.m rename to PostHog/Classes/PHGCapturePayload.m diff --git a/PostHog/Classes/Middlewares/PHGContext.h b/PostHog/Classes/PHGContext.h similarity index 100% rename from PostHog/Classes/Middlewares/PHGContext.h rename to PostHog/Classes/PHGContext.h diff --git a/PostHog/Classes/Middlewares/PHGContext.m b/PostHog/Classes/PHGContext.m similarity index 100% rename from PostHog/Classes/Middlewares/PHGContext.m rename to PostHog/Classes/PHGContext.m diff --git a/PostHog/Classes/Crypto/PHGCrypto.h b/PostHog/Classes/PHGCrypto.h similarity index 100% rename from PostHog/Classes/Crypto/PHGCrypto.h rename to PostHog/Classes/PHGCrypto.h diff --git a/PostHog/Classes/Payloads/PHGIdentifyPayload.h b/PostHog/Classes/PHGIdentifyPayload.h similarity index 100% rename from PostHog/Classes/Payloads/PHGIdentifyPayload.h rename to PostHog/Classes/PHGIdentifyPayload.h diff --git a/PostHog/Classes/Payloads/PHGIdentifyPayload.m b/PostHog/Classes/PHGIdentifyPayload.m similarity index 100% rename from PostHog/Classes/Payloads/PHGIdentifyPayload.m rename to PostHog/Classes/PHGIdentifyPayload.m diff --git a/PostHog/Classes/Middlewares/PHGMiddleware.h b/PostHog/Classes/PHGMiddleware.h similarity index 100% rename from PostHog/Classes/Middlewares/PHGMiddleware.h rename to PostHog/Classes/PHGMiddleware.h diff --git a/PostHog/Classes/Middlewares/PHGMiddleware.m b/PostHog/Classes/PHGMiddleware.m similarity index 100% rename from PostHog/Classes/Middlewares/PHGMiddleware.m rename to PostHog/Classes/PHGMiddleware.m diff --git a/PostHog/Classes/Payloads/PHGPayload.h b/PostHog/Classes/PHGPayload.h similarity index 100% rename from PostHog/Classes/Payloads/PHGPayload.h rename to PostHog/Classes/PHGPayload.h diff --git a/PostHog/Classes/Payloads/PHGPayload.m b/PostHog/Classes/PHGPayload.m similarity index 100% rename from PostHog/Classes/Payloads/PHGPayload.m rename to PostHog/Classes/PHGPayload.m diff --git a/PostHog/Classes/Payloads/PHGPayloadManager.h b/PostHog/Classes/PHGPayloadManager.h similarity index 100% rename from PostHog/Classes/Payloads/PHGPayloadManager.h rename to PostHog/Classes/PHGPayloadManager.h diff --git a/PostHog/Classes/Payloads/PHGPayloadManager.m b/PostHog/Classes/PHGPayloadManager.m similarity index 98% rename from PostHog/Classes/Payloads/PHGPayloadManager.m rename to PostHog/Classes/PHGPayloadManager.m index e7f910736..eb9f39b9b 100644 --- a/PostHog/Classes/Payloads/PHGPayloadManager.m +++ b/PostHog/Classes/PHGPayloadManager.m @@ -100,7 +100,7 @@ - (NSString *)description - (void)identify:(NSString *)distinctId properties:(NSDictionary *)properties options:(NSDictionary *)options { - NSCAssert2(distinctId.length > 0 || properties.count > 0, @"either distinctId (%@) or properties (%@) must be provided.", distinctId, properties); + NSCAssert1(distinctId.length > 0, @"distinctId (%@) must not be empty.", distinctId); NSString *anonymousId = [options objectForKey:@"$anon_distinct_id"]; if (anonymousId) { @@ -217,7 +217,7 @@ - (NSString *)loadOrGenerateAnonymousID:(BOOL)reset // We've chosen to generate a UUID rather than use the UDID (deprecated in iOS 5), // identifierForVendor (iOS6 and later, can't be changed on logout), // or MAC address (blocked in iOS 7). - anonymousId = GenerateUUIDString(); + anonymousId = createUUIDString(); PHGLog(@"New anonymousId: %@", anonymousId); #if TARGET_OS_TV [self.userDefaultsStorage setString:anonymousId forKey:PHGAnonymousIdKey]; diff --git a/PostHog/Classes/PHGPostHog.h b/PostHog/Classes/PHGPostHog.h index 651125c53..dc9d12b5a 100644 --- a/PostHog/Classes/PHGPostHog.h +++ b/PostHog/Classes/PHGPostHog.h @@ -1,7 +1,7 @@ #import -#import "PHGCrypto.h" #import "PHGPostHogConfiguration.h" #import "PHGSerializableValue.h" +#import "PHGCrypto.h" NS_ASSUME_NONNULL_BEGIN @@ -13,6 +13,11 @@ NS_ASSUME_NONNULL_BEGIN @interface PHGPostHog : NSObject +/** + * Whether or not the posthog client is currently enabled. + */ +@property (nonatomic, assign, readonly) BOOL enabled; + /** * Used by the posthog client to configure various options. */ @@ -63,9 +68,9 @@ NS_ASSUME_NONNULL_BEGIN When you learn more about who your user is, you can record that information with identify. */ -- (void)identify:(NSString *_Nullable)distinctId properties:(SERIALIZABLE_DICT _Nullable)properties options:(SERIALIZABLE_DICT _Nullable)options; -- (void)identify:(NSString *_Nullable)distinctId properties:(SERIALIZABLE_DICT _Nullable)properties; -- (void)identify:(NSString *_Nullable)distinctId; +- (void)identify:(NSString *)distinctId properties:(SERIALIZABLE_DICT _Nullable)properties options:(SERIALIZABLE_DICT _Nullable)options; +- (void)identify:(NSString *)distinctId properties:(SERIALIZABLE_DICT _Nullable)properties; +- (void)identify:(NSString *)distinctId; /*! diff --git a/PostHog/Classes/PHGPostHog.m b/PostHog/Classes/PHGPostHog.m index 2123b116b..3dc5137de 100644 --- a/PostHog/Classes/PHGPostHog.m +++ b/PostHog/Classes/PHGPostHog.m @@ -4,14 +4,10 @@ #import "PHGPostHog.h" #import "UIViewController+PHGScreen.h" #import "PHGStoreKitCapturer.h" -#import "PHGHTTPClient.h" #import "PHGStorage.h" -#import "PHGFileStorage.h" -#import "PHGUserDefaultsStorage.h" #import "PHGMiddleware.h" -#import "PHGContext.h" #import "PHGPayloadManager.h" -#import "Internal/PHGUtils.h" +#import "PHGUtils.h" #import "PHGPayload.h" #import "PHGIdentifyPayload.h" #import "PHGCapturePayload.h" @@ -383,7 +379,7 @@ + (NSString *)version { // this has to match the actual version, NOT what's in info.plist // because Apple only accepts X.X.X as versions in the review process. - return @"1.0.5"; + return @"1.3.0"; } #pragma mark - Helpers diff --git a/PostHog/Classes/PHGPostHogConfiguration.h b/PostHog/Classes/PHGPostHogConfiguration.h index b8d5d688a..49089d577 100644 --- a/PostHog/Classes/PHGPostHogConfiguration.h +++ b/PostHog/Classes/PHGPostHogConfiguration.h @@ -3,8 +3,8 @@ @protocol PHGApplicationProtocol @property (nullable, nonatomic, assign) id delegate; -- (UIBackgroundTaskIdentifier)phg_beginBackgroundTaskWithName:(nullable NSString *)taskName expirationHandler:(void (^__nullable)(void))handler; -- (void)phg_endBackgroundTask:(UIBackgroundTaskIdentifier)identifier; +- (NSUInteger)phg_beginBackgroundTaskWithName:(nullable NSString *)taskName expirationHandler:(void (^__nullable)(void))handler; +- (void)phg_endBackgroundTask:(NSUInteger)identifier; @end @@ -116,6 +116,13 @@ typedef NSMutableURLRequest *_Nonnull (^PHGRequestFactory)(NSURL *_Nonnull); */ @property (nonatomic, assign) BOOL captureDeepLinks; +/** + * Whether the posthog client should include the `$device_id` property when sending events. When enabled, `UIDevice`'s `identifierForVendor` property is used. + * Changing the value of this property after initializing the client will have no effect. + * The default value is `YES`. + */ +@property (nonatomic, assign) BOOL shouldSendDeviceID; + /** * Dictionary indicating the options the app was launched with. */ diff --git a/PostHog/Classes/PHGPostHogConfiguration.m b/PostHog/Classes/PHGPostHogConfiguration.m index 26f61b5fe..c85108399 100644 --- a/PostHog/Classes/PHGPostHogConfiguration.m +++ b/PostHog/Classes/PHGPostHogConfiguration.m @@ -1,5 +1,4 @@ #import "PHGPostHogConfiguration.h" -#import "PHGCrypto.h" #import "PHGPostHog.h" @@ -52,6 +51,7 @@ - (instancetype)init if (self = [super init]) { self.shouldUseLocationServices = NO; self.shouldUseBluetooth = NO; + self.shouldSendDeviceID = YES; self.flushAt = 20; self.flushInterval = 30; self.maxQueueSize = 1000; diff --git a/PostHog/Classes/Payloads/PHGScreenPayload.h b/PostHog/Classes/PHGScreenPayload.h similarity index 100% rename from PostHog/Classes/Payloads/PHGScreenPayload.h rename to PostHog/Classes/PHGScreenPayload.h diff --git a/PostHog/Classes/Payloads/PHGScreenPayload.m b/PostHog/Classes/PHGScreenPayload.m similarity index 100% rename from PostHog/Classes/Payloads/PHGScreenPayload.m rename to PostHog/Classes/PHGScreenPayload.m diff --git a/PostHog/Info.plist b/PostHog/Info.plist index 152cf0482..94a0bfbf0 100644 --- a/PostHog/Info.plist +++ b/PostHog/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0.5 + 1.4.4 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/PostHog/Classes/Internal/NSData+PHGGZIP.h b/PostHog/Internal/NSData+PHGGZIP.h similarity index 100% rename from PostHog/Classes/Internal/NSData+PHGGZIP.h rename to PostHog/Internal/NSData+PHGGZIP.h diff --git a/PostHog/Classes/Internal/NSData+PHGGZIP.m b/PostHog/Internal/NSData+PHGGZIP.m similarity index 100% rename from PostHog/Classes/Internal/NSData+PHGGZIP.m rename to PostHog/Internal/NSData+PHGGZIP.m diff --git a/PostHog/Classes/Crypto/PHGAES256Crypto.h b/PostHog/Internal/PHGAES256Crypto.h similarity index 100% rename from PostHog/Classes/Crypto/PHGAES256Crypto.h rename to PostHog/Internal/PHGAES256Crypto.h diff --git a/PostHog/Classes/Crypto/PHGAES256Crypto.m b/PostHog/Internal/PHGAES256Crypto.m similarity index 100% rename from PostHog/Classes/Crypto/PHGAES256Crypto.m rename to PostHog/Internal/PHGAES256Crypto.m diff --git a/PostHog/Classes/Internal/PHGFileStorage.h b/PostHog/Internal/PHGFileStorage.h similarity index 100% rename from PostHog/Classes/Internal/PHGFileStorage.h rename to PostHog/Internal/PHGFileStorage.h diff --git a/PostHog/Classes/Internal/PHGFileStorage.m b/PostHog/Internal/PHGFileStorage.m similarity index 100% rename from PostHog/Classes/Internal/PHGFileStorage.m rename to PostHog/Internal/PHGFileStorage.m diff --git a/PostHog/Classes/Internal/PHGHTTPClient.h b/PostHog/Internal/PHGHTTPClient.h similarity index 100% rename from PostHog/Classes/Internal/PHGHTTPClient.h rename to PostHog/Internal/PHGHTTPClient.h diff --git a/PostHog/Classes/Internal/PHGHTTPClient.m b/PostHog/Internal/PHGHTTPClient.m similarity index 100% rename from PostHog/Classes/Internal/PHGHTTPClient.m rename to PostHog/Internal/PHGHTTPClient.m diff --git a/PostHog/Classes/Internal/PHGMacros.h b/PostHog/Internal/PHGMacros.h similarity index 100% rename from PostHog/Classes/Internal/PHGMacros.h rename to PostHog/Internal/PHGMacros.h diff --git a/PostHog/Classes/Internal/PHGPostHogIntegration.h b/PostHog/Internal/PHGPostHogIntegration.h similarity index 100% rename from PostHog/Classes/Internal/PHGPostHogIntegration.h rename to PostHog/Internal/PHGPostHogIntegration.h diff --git a/PostHog/Classes/Internal/PHGPostHogIntegration.m b/PostHog/Internal/PHGPostHogIntegration.m similarity index 97% rename from PostHog/Classes/Internal/PHGPostHogIntegration.m rename to PostHog/Internal/PHGPostHogIntegration.m index fca0a45a8..059dd489a 100644 --- a/PostHog/Classes/Internal/PHGPostHogIntegration.m +++ b/PostHog/Internal/PHGPostHogIntegration.m @@ -136,7 +136,7 @@ - (NSDictionary *)staticContext dict[@"$device_manufacturer"] = @"Apple"; dict[@"$device_type"] = @"ios"; dict[@"$device_model"] = GetDeviceModel(); - dict[@"$device_id"] = [[device identifierForVendor] UUIDString]; + dict[@"$device_id"] = self.configuration.shouldSendDeviceID ? [[device identifierForVendor] UUIDString] : nil; dict[@"$device_name"] = [device model]; dict[@"$os_name"] = device.systemName; @@ -391,8 +391,8 @@ - (void)enqueueAction:(NSMutableDictionary *)payload { // attach these parts of the payload outside since they are all synchronous // and the timestamp will be more accurate. - payload[@"timestamp"] = iso8601FormattedString([NSDate date]); - payload[@"message_id"] = GenerateUUIDString(); + payload[@"timestamp"] = createISO8601FormattedString([NSDate date]); + payload[@"message_id"] = createUUIDString(); [self dispatchBackground:^{ // attach distinctId and anonymousId inside the dispatch_async in case @@ -415,7 +415,7 @@ - (void)queuePayload:(NSDictionary *)payload { @try { // Trim the queue to maxQueueSize - 1 before we add a new element. - trimQueue(self.queue, self.posthog.configuration.maxQueueSize - 1); + trimQueueItems(self.queue, self.posthog.configuration.maxQueueSize - 1); [self.queue addObject:payload]; [self persistQueue]; [self flushQueueByLength]; @@ -488,7 +488,7 @@ - (void)notifyForName:(NSString *)name userInfo:(id)userInfo - (void)sendData:(NSArray *)batch { NSMutableDictionary *payload = [[NSMutableDictionary alloc] init]; - [payload setObject:iso8601FormattedString([NSDate date]) forKey:@"sent_at"]; + [payload setObject:createISO8601FormattedString([NSDate date]) forKey:@"sent_at"]; [payload setObject:batch forKey:@"batch"]; [payload setObject:self.configuration.apiKey forKey:@"api_key"]; diff --git a/PostHog/Classes/Internal/PHGPostHogUtils.h b/PostHog/Internal/PHGPostHogUtils.h similarity index 87% rename from PostHog/Classes/Internal/PHGPostHogUtils.h rename to PostHog/Internal/PHGPostHogUtils.h index e45b59444..b87cdf34f 100644 --- a/PostHog/Classes/Internal/PHGPostHogUtils.h +++ b/PostHog/Internal/PHGPostHogUtils.h @@ -1,17 +1,17 @@ #import -#import +#import "PHGSerializableValue.h" NS_ASSUME_NONNULL_BEGIN -NSString *GenerateUUIDString(void); +NSString *createUUIDString(void); // Validation Utils BOOL serializableDictionaryTypes(NSDictionary *dict); // Date Utils -NSString *iso8601FormattedString(NSDate *date); +NSString *createISO8601FormattedString(NSDate *date); -void trimQueue(NSMutableArray *array, NSUInteger size); +void trimQueueItems(NSMutableArray *array, NSUInteger size); // Async Utils dispatch_queue_t phg_dispatch_queue_create_specific(const char *label, diff --git a/PostHog/Classes/Internal/PHGPostHogUtils.m b/PostHog/Internal/PHGPostHogUtils.m similarity index 97% rename from PostHog/Classes/Internal/PHGPostHogUtils.m rename to PostHog/Internal/PHGPostHogUtils.m index fa3b7953d..7781839b7 100644 --- a/PostHog/Classes/Internal/PHGPostHogUtils.m +++ b/PostHog/Internal/PHGPostHogUtils.m @@ -2,7 +2,7 @@ static BOOL kPostHogLoggerShowLogs = NO; -NSString *GenerateUUIDString() +NSString *createUUIDString() { CFUUIDRef theUUID = CFUUIDCreate(NULL); NSString *UUIDString = (__bridge_transfer NSString *)CFUUIDCreateString(NULL, theUUID); @@ -11,7 +11,7 @@ } // Date Utils -NSString *iso8601FormattedString(NSDate *date) +NSString *createISO8601FormattedString(NSDate *date) { static NSDateFormatter *dateFormatter; static dispatch_once_t onceToken; @@ -25,7 +25,7 @@ } /** trim the queue so that it contains only upto `max` number of elements. */ -void trimQueue(NSMutableArray *queue, NSUInteger max) +void trimQueueItems(NSMutableArray *queue, NSUInteger max) { if (queue.count < max) { return; @@ -141,7 +141,7 @@ static id PHGCoerceJSONObject(id obj) } if ([obj isKindOfClass:[NSDate class]]) - return iso8601FormattedString(obj); + return createISO8601FormattedString(obj); if ([obj isKindOfClass:[NSURL class]]) return [obj absoluteString]; diff --git a/PostHog/Classes/Internal/PHGStorage.h b/PostHog/Internal/PHGStorage.h similarity index 100% rename from PostHog/Classes/Internal/PHGStorage.h rename to PostHog/Internal/PHGStorage.h diff --git a/PostHog/Classes/Internal/PHGStoreKitCapturer.h b/PostHog/Internal/PHGStoreKitCapturer.h similarity index 100% rename from PostHog/Classes/Internal/PHGStoreKitCapturer.h rename to PostHog/Internal/PHGStoreKitCapturer.h diff --git a/PostHog/Classes/Internal/PHGStoreKitCapturer.m b/PostHog/Internal/PHGStoreKitCapturer.m similarity index 100% rename from PostHog/Classes/Internal/PHGStoreKitCapturer.m rename to PostHog/Internal/PHGStoreKitCapturer.m diff --git a/PostHog/Classes/Internal/PHGUserDefaultsStorage.h b/PostHog/Internal/PHGUserDefaultsStorage.h similarity index 100% rename from PostHog/Classes/Internal/PHGUserDefaultsStorage.h rename to PostHog/Internal/PHGUserDefaultsStorage.h diff --git a/PostHog/Classes/Internal/PHGUserDefaultsStorage.m b/PostHog/Internal/PHGUserDefaultsStorage.m similarity index 100% rename from PostHog/Classes/Internal/PHGUserDefaultsStorage.m rename to PostHog/Internal/PHGUserDefaultsStorage.m diff --git a/PostHog/Classes/Internal/PHGUtils.h b/PostHog/Internal/PHGUtils.h similarity index 100% rename from PostHog/Classes/Internal/PHGUtils.h rename to PostHog/Internal/PHGUtils.h diff --git a/PostHog/Classes/Internal/PHGUtils.m b/PostHog/Internal/PHGUtils.m similarity index 100% rename from PostHog/Classes/Internal/PHGUtils.m rename to PostHog/Internal/PHGUtils.m diff --git a/PostHog/Classes/Internal/UIViewController+PHGScreen.h b/PostHog/Internal/UIViewController+PHGScreen.h similarity index 75% rename from PostHog/Classes/Internal/UIViewController+PHGScreen.h rename to PostHog/Internal/UIViewController+PHGScreen.h index 11e4465f0..519b65123 100644 --- a/PostHog/Classes/Internal/UIViewController+PHGScreen.h +++ b/PostHog/Internal/UIViewController+PHGScreen.h @@ -1,5 +1,8 @@ -#import +#include +#if !TARGET_OS_OSX +#import +#endif @interface UIViewController (PHGScreen) diff --git a/PostHog/Classes/Internal/UIViewController+PHGScreen.m b/PostHog/Internal/UIViewController+PHGScreen.m similarity index 100% rename from PostHog/Classes/Internal/UIViewController+PHGScreen.m rename to PostHog/Internal/UIViewController+PHGScreen.m diff --git a/PostHogTests/HTTPClientTest.swift b/PostHogTests/HTTPClientTest.swift index 99c567331..a7844933e 100644 --- a/PostHogTests/HTTPClientTest.swift +++ b/PostHogTests/HTTPClientTest.swift @@ -7,7 +7,7 @@ class HTTPClientTest: QuickSpec { override func spec() { var client: PHGHTTPClient! - var host = URL(string: "https://app.posthog.test")! + let host = URL(string: "https://app.posthog.test")! beforeEach { LSNocilla.sharedInstance().start() diff --git a/PostHogTests/PostHogTests-Bridging-Header.h b/PostHogTests/PostHogTests-Bridging-Header.h index d8c44b12b..1f12f676a 100644 --- a/PostHogTests/PostHogTests-Bridging-Header.h +++ b/PostHogTests/PostHogTests-Bridging-Header.h @@ -6,10 +6,10 @@ #import "PHGAES256Crypto.h" #import "PHGFileStorage.h" #import "PHGUserDefaultsStorage.h" -#import +#import "NSData+PHGGZIP.h" #import "PHGStoreKitCapturer.h" -#import -#import +#import "UIViewController+PHGScreen.h" +#import "PHGPostHogUtils.h" #import "PHGPayloadManager.h" #import "PHGUtils.h" diff --git a/PostHogTests/PostHogTests.swift b/PostHogTests/PostHogTests.swift index 6cfc652fc..5956d04ce 100644 --- a/PostHogTests/PostHogTests.swift +++ b/PostHogTests/PostHogTests.swift @@ -83,9 +83,9 @@ class PostHogTests: QuickSpec { it("fires Application Opened for UIApplicationDidFinishLaunching") { testMiddleware.swallowEvent = true - NotificationCenter.default.post(name: .UIApplicationDidFinishLaunching, object: testApplication, userInfo: [ - UIApplicationLaunchOptionsKey.sourceApplication: "testApp", - UIApplicationLaunchOptionsKey.url: "test://test", + NotificationCenter.default.post(name: UIApplication.didFinishLaunchingNotification, object: testApplication, userInfo: [ + UIApplication.LaunchOptionsKey.sourceApplication: "testApp", + UIApplication.LaunchOptionsKey.url: "test://test", ]) let event = testMiddleware.lastContext?.payload as? PHGCapturePayload expect(event?.event) == "Application Opened" @@ -96,7 +96,7 @@ class PostHogTests: QuickSpec { it("fires Application Opened during UIApplicationWillEnterForeground") { testMiddleware.swallowEvent = true - NotificationCenter.default.post(name: .UIApplicationWillEnterForeground, object: testApplication) + NotificationCenter.default.post(name: UIApplication.willEnterForegroundNotification, object: testApplication) let event = testMiddleware.lastContext?.payload as? PHGCapturePayload expect(event?.event) == "Application Opened" expect(event?.properties?["from_background"] as? Bool) == true @@ -104,14 +104,14 @@ class PostHogTests: QuickSpec { it("fires Application Backgrounded during UIApplicationDidEnterBackground") { testMiddleware.swallowEvent = true - NotificationCenter.default.post(name: .UIApplicationDidEnterBackground, object: testApplication) + NotificationCenter.default.post(name: UIApplication.didEnterBackgroundNotification, object: testApplication) let event = testMiddleware.lastContext?.payload as? PHGCapturePayload expect(event?.event) == "Application Backgrounded" } - it("flushes when UIApplicationDidEnterBackgroundNotification is fired") { + it("flushes when UIApplicationDidEnterBackground is fired") { posthog.capture("test") - NotificationCenter.default.post(name: .UIApplicationDidEnterBackground, object: testApplication) + NotificationCenter.default.post(name: UIApplication.didEnterBackgroundNotification, object: testApplication) expect(testApplication.backgroundTasks.count).toEventually(equal(1)) expect(testApplication.backgroundTasks[0].isEnded).toEventually(beFalse()) } @@ -128,7 +128,7 @@ class PostHogTests: QuickSpec { expect(integration).notTo(beNil()) posthog.flush() - waitUntil(timeout: 60) {done in + waitUntil(timeout: DispatchTimeInterval.seconds(60)) {done in let queue = DispatchQueue(label: "test") queue.async { diff --git a/PostHogTests/PostHogUtilTests.swift b/PostHogTests/PostHogUtilTests.swift index 16170d3d3..8ea146a89 100644 --- a/PostHogTests/PostHogUtilTests.swift +++ b/PostHogTests/PostHogUtilTests.swift @@ -7,7 +7,7 @@ class PostHogUtilTests: QuickSpec { it("format NSDate objects to RFC 3339 complaint string") { let date = Date(timeIntervalSince1970: 0) - let formattedString = iso8601FormattedString(date) + let formattedString = createISO8601FormattedString(date) expect(formattedString) == "1970-01-01T00:00:00.000Z" var components = DateComponents() @@ -21,17 +21,17 @@ class PostHogUtilTests: QuickSpec { let calendar = NSCalendar(calendarIdentifier: .gregorian)! calendar.timeZone = TimeZone(secondsFromGMT: -4 * 60 * 60)! let date2 = calendar.date(from: components)! - let formattedString2 = iso8601FormattedString(date2) + let formattedString2 = createISO8601FormattedString(date2) expect(formattedString2) == "1992-08-06T11:32:04.335Z" } - describe("trimQueue", { + describe("trimQueueItems", { it("does nothing when count < max") { let queue = NSMutableArray(array: []) for i in 1...4 { queue.add(i) } - trimQueue(queue, 5) + trimQueueItems(queue, 5) expect(queue) == [1, 2, 3, 4] } @@ -40,7 +40,7 @@ class PostHogUtilTests: QuickSpec { for i in 1...10 { queue.add(i) } - trimQueue(queue, 5) + trimQueueItems(queue, 5) expect(queue) == [6, 7, 8, 9, 10] } @@ -49,7 +49,7 @@ class PostHogUtilTests: QuickSpec { for i in 1...5 { queue.add(i) } - trimQueue(queue, 5) + trimQueueItems(queue, 5) expect(queue) == [1, 2, 3, 4, 5] } }) diff --git a/PostHogTests/Utils/NSData+PHGGUNZIPP.m b/PostHogTests/Utils/NSData+PHGGUNZIPP.m index 6bcc86065..2ff67be01 100644 --- a/PostHogTests/Utils/NSData+PHGGUNZIPP.m +++ b/PostHogTests/Utils/NSData+PHGGUNZIPP.m @@ -2,7 +2,7 @@ #import #import -#import +#import "NSData+PHGGZIP.h" #import "NSData+PHGGUNZIPP.h" diff --git a/PostHogTests/Utils/TestUtils.swift b/PostHogTests/Utils/TestUtils.swift index 8b965e617..7b28e0b71 100644 --- a/PostHogTests/Utils/TestUtils.swift +++ b/PostHogTests/Utils/TestUtils.swift @@ -68,7 +68,7 @@ class JsonGzippedBody : LSMatcher, LSMatcheable { } func matchesJson(_ json: AnyObject) -> Bool { - let actualValue : () -> NSObject! = { + let actualValue : () -> NSObject = { return json as! NSObject } let failureMessage = FailureMessage() @@ -141,6 +141,7 @@ class TestApplication: NSObject, PHGApplicationProtocol { // MARK: - PHGApplicationProtocol var delegate: UIApplicationDelegate? = nil + func phg_beginBackgroundTask(withName taskName: String?, expirationHandler handler: (() -> Void)? = nil) -> UInt { let backgroundTask = BackgroundTask(identifier: (backgroundTasks.map({ $0.identifier }).max() ?? 0) + 1) backgroundTasks.append(backgroundTask) diff --git a/README.md b/README.md index fa28897ae..d3712d1be 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +[![Version](https://img.shields.io/cocoapods/v/PostHog.svg?style=flat)](https://cocoapods.org//pods/PostHog) +[![License](https://img.shields.io/cocoapods/l/PostHog.svg?style=flat)](http://cocoapods.org/pods/PostHog) +[![SwiftPM Compatible](https://img.shields.io/badge/SwiftPM-Compatible-F05138.svg)](https://swift.org/package-manager/) + # PostHog iOS Please see the main [PostHog docs](https://posthog.com/docs). diff --git a/RELEASING.md b/RELEASING.md index d95ee6e8d..9c4522d47 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -1,19 +1,21 @@ -Releasing -========= +# Releasing - 1. Update the version in `PHGPostHog.m`, `PostHog.podspec` and `PostHog/Info.plist` to the next release version. - 2. Update the `CHANGELOG.md` for the impending release. - 3. `git commit -am "Prepare for release X.Y.Z."` (where X.Y.Z is the new version). - 4. `git tag -a X.Y.Z -m "Version X.Y.Z"` (where X.Y.Z is the new version). - 5. `git push && git push --tags`. - 6. `pod trunk push PostHog.podspec`. - 7. Next we'll create a dynamic framework for manual installation leveraging Carthage. - * `cd Examples/CarthageExample`. - * Update `Cartfile` first line to the correct tag `X.Y.Z` that just got pushed to Github. - * `make clean` to be safe then `make build`. - * Zip `Carthage/Builds/iOS/PostHog.framework` and `Carthage/Builds/iOS/PostHog.dSYM` into `Archive.zip`. - 8. Next, we'll create a Carthage build by running `make archive`. - 9. Create a new Github release at https://github.com/PostHog/posthog-ios/releases - * Add latest version information from `CHANGELOG.md` - * Upload `Archive.zip` from step 7 and `PostHog.zip` from step 8 into binaries section to make available for users to download. - 10. `git push`. +1. Update the version in `PostHog.podspec` and `PostHog/Info.plist` to the next release version. +2. Update the `CHANGELOG.md` for the impending release. +3. `git commit -am "Prepare for release X.Y.Z."` (where X.Y.Z is the new version). +4. `git tag -a X.Y.Z -m "Version X.Y.Z"` (where X.Y.Z is the new version). +5. `git push && git push --tags`. +6. `pod trunk push PostHog.podspec`. + +## On Apple Silicon + +Run this first: + +``` +sudo arch -x86_64 gem install ffi +arch -x86_64 pod install +``` + +Then, [configure XCode CLI tools](https://stackoverflow.com/questions/29108172/how-do-i-fix-the-xcrun-unable-to-find-simctl-error). + +Finally, prepend `arch -x86_64` to the pod command in the steps above.