Commit Graph
29 Commits
Author SHA1 Message Date
Maksym Malyhin 57123ae0d5 Update clang-format to 11 (#6905)
* Update clang-format to 11

* Upgrade clang format

* Install clang-format@11

* Update readme

* brew update
2020-11-05 12:58:48 -05:00
bff6b664d1 Merge release-6.34.0 branch after patch (#6701)
* Update versions for Release 6.34.0

* 6.34.0 updates for SwiftPM (#6614)

* M81 FIS cherry pick of #6570 (#6616)

* FIS: Additional FIRInstallationsItem validation (#6570)

* FIS API tests for no FID in response

* FIRInstallationsIDControllerTests: test names

* FIRInstallationsIDControllerTests: corrupted storage tests

* FIRInstallationsItem validation

* Fix FIRInstallationsItem.IIDDefaultToken copy

* Improve error description.

* FIRInstallationsItem validation error

* FIRInstallationsItem validation tests

* ./scripts/style.sh

* FIRInstallationsIDController: validate stored installation

* FIRInstallationsAPIService installation validation

* Changelog

* Update versions

* patch version

* release manifest

* FIS: don't log anything on success validation (#6635)

* Update changelogs (#6649)

* GoogleDataTransport: deprecated API conditions (#6697)

* GoogleDataTransport: deprecated API conditions

* Version bump

* use `TARGET_OS_IOS`

* changelog

* changelog

* style

* Fix merge

Co-authored-by: Ryan Wilson <wilsonryan@google.com>
Co-authored-by: Paul Beusterien <paulbeusterien@google.com>
Co-authored-by: Morgan Chen <morganchen12@gmail.com>
2020-10-08 15:11:00 -04:00
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 ca44b646b8 GDT: remove pre Xcode 10 availability checks (#6486)
* GDT: remove pre Xcode 11 availability checks

* Revert Xcode 10 required availability checks

* Changelog
2020-09-17 15:31:44 -04:00
Maksym Malyhin a59febae5a GDT: storage size limit (#6365)
* GDTCORFlatFileStorageTest: test storage size limit

* Size limit slow implementation.

* GDTCORFlatFileStorage: prefetch file size

* GDTCORDirectorySizeCalculator introduced

* GDTCORDirectorySizeCalculator integration with GDTCORFlatFileStorage

* Storage size calculation tests

* Cleanup

* Cleanup

* API docs

* Fix type

* Tests

* Tests - don't hardcode event size

* Changelog

* Fix tests on slower CI.

* API docs

* Tests comments

* GDTCORFlatFileStorageTest failure debug

* GDTCORFlatFileStorageTest debug: make sure all generated events stored.

* GDTCORFlatFileStorageTest debug

* GDTCORFlatFileStorageTest debug: dynamically generate events

* Cleanup

* Renaming GDTCORDirectorySizeCalculator->GDTCORDirectorySizeTracker

* Size tracker lazy initialization

* Remove old code

* Size tracker methods renaming

* Cleanup

* Additional tests
2020-09-11 10:42:30 -04:00
Tejas Deshpande ab6fc616b4 Fix clang-tidy (#6270) 2020-08-13 11:18:40 -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 a00703a543 Completely reimplement storage in GDT (#5877)
* Revert "Revert GDTCORStorage changes for now (#5778)"

This reverts commit 93eb6d8c48.

* Store events and implement unit tests (#5790)

Resolves many TODOs in the flat file storage system
Bug fixes found by unit tests are also included.

* Get rid of event iterators and add separate folders for batching (#5829)

* Store events and implement unit tests (#5790)

Resolves many TODOs in the flat file storage system
Bug fixes found by unit tests are also included.

* Change to explicit nil comparison

* Address test comments

- Makes all APIs async
- Add thread-safety test
- Comments on where files are stored
- Broke up the library data get/set API into two blocks

* Implement events and batch expirations (#5842)

The upload coordinator will signal an expiration check whenever the app foregrounds.

* Remove prioritizers, upload packages, data futures, and backwards compatibility (#5874)

* Remove prioritizers, upload packages, data futures, and backwards compatibility

* Update a comment and console logging

* Reset the storage for every unit test, move event generation out of core init

* Return a nil request if data is nil.

* Fix prioritizer reference in watchOS test app

* Remove unnecessary check for termination

* Give more leeway for eventID generation

Change the transport API to a GDTCORTarget
Don't continue a long test after a failure

* Return nil if an eventID couldn't be created

Fix some swift in the watchOS test app

* Fix all rawValue GDTCORTarget usage

* Update CHANGELOGs

* Remove initializer annotations (#5878)

* Remove initializer designation from GDTCOREvent

Change the target property to the target type

* Add a couple more types

* Make implicit retain explicit

Nothing I do seems to get this warning to trigger locally...

* Address loss of precision issue

* Re-enable a disabled test

Don't delete while enumerating

* Additional test tweaks and hasEvents is now on the queue and async

* Adjust GDTCCT to the new API

* Always attempt to create a path, get rid of implicit self refs

* Change all waiting for be DISPATCH_TIME_FOREVER for debugging purposes

I suspect the travis machines are just overwhelmed, since the test errors don't make any sense.

* Try using a different separator

* Enable debug logging

* Enable verbose pod lib lint output

* Handle cases where the mappingID contains path components

* Revert "Enable debug logging"

This reverts commit b3e4a6ecc5.

* Revert "Enable verbose pod lib lint output"

This reverts commit a5b54460f9.

* Revert "Change all waiting for be DISPATCH_TIME_FOREVER for debugging purposes"

This reverts commit 55e4fff5dc.

* Attempt to create a folder before writing

* Temporarily enable verbose pod lib lint, again

* Temporarily add debug logging back in

* Don't double store events

Also print out errors if there are any

* Remove debug logging

* Put debug logs back in for Crashlytics test

* Update mock APIs to match and use a real target

* remove debug logging

* Apply nullability specifiers to Crashlytics mock class
2020-06-23 16:04:18 -07:00
Visu de94d1d7a2 Make the deviceModel to be a static variable to avoid overwrites. (#5847) 2020-06-18 10:07:18 -07:00
VisuandPaul Beusterien 4a6f6135be Update the device model identified by GDTCCTLibrary to be more detailed and in parity with Clearcut. (#5836)
Update the device model identified by GDTCCT library to be more detailed and in parity with Clearcut.

Current GDT implementation returns "iPhone". With this change, the device model identified would be iPhoneA,B (Eg. iPhone 8,1).

Co-authored-by: Paul Beusterien <paulbeusterien@google.com>
2020-06-17 09:42:18 -07:00
Doudou Nan 68fb6624f4 Expand watchOS support for GoogleDataTransport (#5443)
* Add watchOS support for GoogleDataTransport with specifying notification center and WKExtensionDelegate for watchOS application, handling background tasks and network reachability flags on watchOS.

* Add independent watchOS test app for GoogleDataTransport and GoogleDataTransportCCTSupport.

* Add companion watchOS test app and notification service extension for GoogleDataTransportCCTSupport.
2020-04-24 15:19:43 -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 4e900ca551 Address GDT test issues (#5186)
* Address GDT test issues

1. Fixes the event  generator such that derived event fileURL will now be non-nil
2. Removes reachability check for integration tests since being locally connected via LAN but not connected to the internet would cause the test disabling check to pass. Instead, we attempt an actual NSURLRequest to a WAN target and set the value based on the success of that request.

* Create GDT's directory on first usage
2020-03-24 17:35:33 -07:00
Michael Haney 27847eea38 Refactor event fileURLs to be derived (#5137)
* Refactor event fileURLs to be derived

Apparently, since iOS 8, it's possible for the app's bundle to change directories as often as every launch. This is a mechanism that's hopefully slightly more robust against that, as data is supposed to carry over, the UUID component of the app's absolute directory might just change.

* Convert a couple of tests, actually use a non-absolute URL in GDTCOREvent

* Make sure to use the event fileURL property as the source of truth.

Add some additional logs and improve the integration test

* Fix KVC not working for the removed property
2020-03-18 08:09:18 -07:00
Michael Haney 4ee3288747 Fix deprecation warnings by consolidating coding calls (#5131)
* Fix deprecation warnings by consolidating coding calls

Fixes #5086

* Fix all NSSecureCoding references

* Fix changed API usage
2020-03-17 19:06:05 -07:00
Michael Haney 1cca0bcd8c Make GDTCORReachability a public API for support libraries (#4969) 2020-02-25 11:39:27 -08:00
Doudou Nan 4149226e7b Wrap SCNetworkReachabilityFlags and fix Catalyst warning (#4965)
* wrap apis and fix catalyst warning

* styled

* add watchos

* letters change
2020-02-25 11:14:41 -08:00
Doudou Nan 88028e20ad Fix radioacesstechnology api deprecated for ios 12.0 or newer (#4960)
* update radio access technology for ios 13

* set version check to 12.0

* styled

* change empty check of dict
2020-02-24 11:42:37 -08:00
Michael Haney 65dafbb199 Fix an import to be non-public (#4959) 2020-02-24 10:09:08 -08:00
Doudou Nan 65def8187d Generate network_connection_info and add tests (#4944)
* Populate network_connection_info and add test

* Wrap build-in api in GDTCORPlatform and other changes

* Set GDT_VERBOSE_LOGGING back to 0

* Add several check points for nil value

* tiny change import of nanopbhelper.m

* comments and typos
2020-02-21 15:48:50 -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
Chen Liang e4456c011b Enables Firebase Messaging push notification function on watch only and independent watch app (#4016) 2019-12-23 16:45:19 -08:00
Michael Haney 842439bea9 Fix a public import of a private header (#4378) 2019-11-21 14:55:12 -08:00
Michael Haney efbf9bdf1d Send diagnostic data to the FLL backend instead of the CCT backend (#4196)
* Send diagnostic data to the FLL backend instead of the CCT backend

* Handle FLL redirects and set the User-Agent

The podspec now surfaces the SDK version.

* Add unit tests for handling redirects
2019-11-15 01:30:19 -08:00
Ryan Wilson 4c4ba12b60 Fix main thread crashing issue, reenable tests. (#3974)
* Fix main thread crashing issue, reenable tests.

* Added log, extra check for event generation to prevent early exit.

* Temporarily run cron tests for travis.

* Revert travis.yml update

* Change property to atomic based on review comments.
2019-10-02 15:10:28 -04: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