Commit Graph
12 Commits
Author SHA1 Message Date
Maksym Malyhin bde8e07844 GDT: move some headers from public to internal (#6643)
* Move extra public headers to Internal and fix imports

* Cleanup

* Use relative paths in internal headers

* Fix imports in internal headers

* ./scripts/style.sh

* Fix GDTTestApp

* Fix test app

* Use real uploader for watchOS test app

* comma
2020-10-05 14:00:49 -04:00
Maksym Malyhin babd8e63bd GDT: Move GDTCORAssert.h to internal headers (#6638)
* Move GDTCORAssert.h to internal headers

* Fix import
2020-10-01 20:56:26 -04:00
Maksym Malyhin 57101b28a9 GDTTransformer: fix background tasks handling (#6457)
* GDTCORTransformer: background task tests

* GDTCORTransformer: background tasks handling fix

* Copyright

* Changelog

* Comments

* rand() -> arc4random()

* GDTCORTransformer tests for default initializer

* Fix default initializer

* ./scripts/style.sh

* Pass weak application reference to the blocks
2020-09-15 11:02:48 -04:00
Paul Beusterien 85e3354346 GDT - new public header structure (#6177) 2020-07-31 08:12:23 -07:00
Paul Beusterien 5a5914da7e GDT Repo-relative imports and SPM (#5909) 2020-06-24 17:50:15 -07:00
Michael Haney 78ee63dab3 Handle events that fail to write or are missing and add logging levels (#5357)
* Change removeItemAtURL to removeItemAtPath

It seems to work better, for reasons that aren't clear. It may have something to do with forming URLs being more strict.

* Add logging levels, fix failed write events

* Update comment
2020-04-14 12:30:29 -07:00
Michael Haney 6c14c21bc9 Merge storage refactor back to master (#5322)
* Make mph-gdtsqlite run travis (#3861)

* Implement a SQLite helper (#4075)

* Add support for in-memory and other types of stores (#4158)

* Add support for in-memory and other types of stores

* Temporarily add -x to know what's causing check.sh to fail

* Remove -x

* DO NOT MERGE TO MASTER: Remove commit math from check.sh temporarily

* Initial implementation of GDTCORDatabase (#4180)

* Initial implementation of GDTCORDatabase

* Style

* Check result of running a statement

* Simplify init

Also support >1 :memory: db

* Write test docs and fix one tsan issue (#4211)

* wip moving storage to sqlite

* Revert "wip moving storage to sqlite"

This reverts commit ee1895f1bd.

* Address tsan issue and document tests

* Address implicit self retains

Don't know why these aren't surfaced locally, I have the warning on.

* Implement bulk sql execution (#4528)

* Change custom prioritization dictionary to bytes (#4534)

* Change custom prioritization dictionary to bytes

* Fix a missed change for customBytes

* Refactor GDT's storage to be an interface (#5022)

* Refactor GDT's storage to be an interface

- Events are now removed by eventID
  - Events now generate an ID when they are alloc/inited
  - Copying events also copies their eventID
  - Event hashing takes into account the eventID
  - A static method in GDTCOREvent creates  event IDs as the concat of <session counter><event counter during session>
  - Session counters are incremented and stored in user defaults at app start
- Storage instances register themselves with GDTCORRegistrar like prioritizers and uploaders
- Storage fakes are refactored to be registered with GDTCORRegistrar
- Added some missing docs and fixed some typos

* Remove an unintended change from assert macro

* Use a variable

* Additional docs and test fixes

* Move saving the counter value to a file

* Update docs

* Rename GDTCORStorage to GDTCORFlatFileStorage (#5079)

* Rename GDTCORStorage to GDTCORFlatFileStorage

* Fix the NSCoding keys

* Fixes to get building and unit tests passing

* Address lack of thread safety affecting lifecycle tests

* Style

* Transition customPrioritizationDict to customBytes

Adds a category  on GDTCOREvent to make checking network connection info easier.

* Remove all sqlite and database stufff or the purposes of merging back to maste (#5330)

* Update .travis.yml
2020-04-09 13:14:15 -07:00
Michael Haney aeb4def61d Libraries should save state if a completion block is requested (#5147)
* Libraries should save state if a completion block is requested

Currently, the onComplete block of sendXEvent:onComplete: is invoked when the event bytes are written to disk. However, if the app crashes before a lifecycle event occurs (trigger GDTCORStorage to serialize to disk), that event if effectively lost because the metadata has all been lost. This change triggers the saving of state of GDTCORStorage and prioritizers (if they implement it) if an onComplete block has been given.

* Remove flaky check

* Update GDTCORStorage.m
2020-03-18 15:00:37 -07:00
Michael Haney f138a75a33 Add a storage completion handler to the event transport pipeline (#4794) 2020-02-03 08:15:31 -08:00
Michael Haney 0dea8a64c3 Add extensive debug logging (#4704)
* Add extensive debug logging

This is to help adopters understand what the state of the library is

* Fix variable type
2020-01-20 14:50:44 -08:00
Ryan Wilson 03ecafd06d Refactor GDT Backgrounding (#3896)
* Fix missing `runningInBackground` flags.

* Attempt at fixing background issues with GDT.

* Add missing deprecated implementation.

* Transfer extra call to background call.

* Style

* Further review comments.

* Fix testing.

* Refactored FLLIntegrationTest.

This does a few things - split the tests into a specific multithreaded
test and a recursive run without crashing.

It also adds a notification for the upload to post how many events were
uploaded. This should be a bit more reliable and helps the overall
validation during the "run without crashing" test.

* Removed extra log.

* Fix flag for Catalyst.

* Disable currently non-functional test.

* Further review comments.

* Migrate CCT tests to match FLL.

* Revert accidental partial change.

* Clarify comment for starting the background tasks.

* Review feedback, changelog additions and bug numbers.
2019-10-02 10:40:45 -04:00
Michael Haney 18e2721c1d Rename GDT core libraries to GDTCOR (#3808) 2019-09-09 15:21:29 -07:00