Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert FIRCoreDiagnostics to canonical nanopb, and move to OSS. #3204

Merged
merged 33 commits into from
Jun 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
1e17441
Convert FIRCoreDiagnostics to canonical nanopb, and move to OSS.
mikehaney24 Jun 17, 2019
9adaaff
Remove custom build steps for CoreDiagnostics
mikehaney24 Jun 17, 2019
ff5fcbc
Update versions, tags, and port the relevant unit tests for FIRCD
mikehaney24 Jun 19, 2019
120eb36
Version and platform fixes
mikehaney24 Jun 20, 2019
643f8ca
Fix podspec expected tags
mikehaney24 Jun 20, 2019
4106333
A hack to solve a chicken-and-egg problem with pod lib linting.
mikehaney24 Jun 20, 2019
95573be
Heartbeat implementation
maksymmalyhin Jun 20, 2019
8c5e98c
FIRDiagnosticsDateFileStorageTests
maksymmalyhin Jun 20, 2019
64bbb49
Fix tests for non-iOS platforms
mikehaney24 Jun 20, 2019
044b96f
Heartbeat tests
maksymmalyhin Jun 20, 2019
6c5aded
Fix initialization.
maksymmalyhin Jun 20, 2019
67090df
Cleanup Installation ID.
maksymmalyhin Jun 20, 2019
712ae83
Fix testProtoPopulation.
maksymmalyhin Jun 20, 2019
d803c7b
Merge branch 'mph-master6' into mm/cd-heartbeat-7
maksymmalyhin Jun 20, 2019
52a5349
Merge conflict fix
maksymmalyhin Jun 20, 2019
d7b4722
Typo fix.
maksymmalyhin Jun 20, 2019
928e7df
Remove FIRCore dep from FIRCD unit tests and move symbols to interop
mikehaney24 Jun 20, 2019
aaf48a8
Run ./scripts/style.sh
maksymmalyhin Jun 20, 2019
b6aec9a
Typo
maksymmalyhin Jun 20, 2019
bbd2722
Merge branch 'mph-master6' into mm/cd-heartbeat-7
maksymmalyhin Jun 20, 2019
106eea7
#ifdef comment
maksymmalyhin Jun 20, 2019
cc27324
File license header.
maksymmalyhin Jun 20, 2019
8b1b6f9
Import FIRDiagnosticsDateFileStorage.h using relative path.
maksymmalyhin Jun 20, 2019
c0902e9
FIRDiagnostics -> FIRCoreDiagnostics
maksymmalyhin Jun 20, 2019
1f60777
Docs syntax
maksymmalyhin Jun 20, 2019
9a8897e
Docs
maksymmalyhin Jun 20, 2019
7a5d6ee
Docs typo
maksymmalyhin Jun 20, 2019
e03f204
Add shared variables to the interop lib
mikehaney24 Jun 20, 2019
c0178e4
Fix comment
mikehaney24 Jun 20, 2019
9205321
Style
mikehaney24 Jun 20, 2019
4a0365c
Removed lib version passing.
mikehaney24 Jun 20, 2019
3a407e2
Merge remote-tracking branch 'origin/mm/cd-heartbeat-7' into mph-master6
mikehaney24 Jun 21, 2019
0764f49
Merge branch 'mph-master5' into mph-master4
mikehaney24 Jun 21, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Example/Core/Tests/FIRAppTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#import "FIRTestComponents.h"

#import <FirebaseCoreDiagnosticsInterop/FIRCoreDiagnosticsData.h>
#import <FirebaseCoreDiagnosticsInterop/FIRCoreDiagnosticsInterop.h>

#import <FirebaseCore/FIRAnalyticsConfiguration.h>
#import <FirebaseCore/FIRAppInternal.h>
Expand Down
22 changes: 22 additions & 0 deletions Example/CoreDiagnostics/AppHost/FIRCoreExternSymbols.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright 2019 Google
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#import <Foundation/Foundation.h>

// This file is only used to help compile FirebaseCoreDiagnostics for testing. */

/** For testing use only. This symbol should be provided by */
Class FIRCoreDiagnosticsImplementation;
3 changes: 3 additions & 0 deletions Example/CoreDiagnostics/AppHost/main.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import Foundation;
int main() {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/*
* Copyright 2019 Google
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#import <XCTest/XCTest.h>
#import "FIRCDLibrary/FIRCoreDiagnosticsDateFileStorage.h"

@interface FIRCoreDiagnosticsDateFileStorageTests : XCTestCase
@property(nonatomic) NSURL *fileURL;
@property(nonatomic) FIRCoreDiagnosticsDateFileStorage *storage;
@end

@implementation FIRCoreDiagnosticsDateFileStorageTests

- (void)setUp {
NSString *documentsPath = [NSSearchPathForDirectoriesInDomains(
NSApplicationSupportDirectory, NSUserDomainMask, YES) firstObject];
XCTAssertNotNil(documentsPath);
NSURL *documentsURL = [NSURL fileURLWithPath:documentsPath];
self.fileURL = [documentsURL URLByAppendingPathComponent:@"FIRDiagnosticsDateFileStorageTests"
isDirectory:NO];

NSError *error;
if (![documentsURL checkResourceIsReachableAndReturnError:&error]) {
XCTAssert([[NSFileManager defaultManager] createDirectoryAtURL:documentsURL
withIntermediateDirectories:YES
attributes:nil
error:&error],
@"Error: %@", error);
}

self.storage = [[FIRCoreDiagnosticsDateFileStorage alloc] initWithFileURL:self.fileURL];
}

- (void)tearDown {
[[NSFileManager defaultManager] removeItemAtURL:self.fileURL error:nil];
self.fileURL = nil;
self.storage = nil;
}

- (void)testDateStorage {
NSDate *dateToSave = [NSDate date];

XCTAssertNil([self.storage date]);

NSError *error;
XCTAssertTrue([self.storage setDate:dateToSave error:&error]);

XCTAssertEqualObjects([self.storage date], dateToSave);

XCTAssertTrue([self.storage setDate:nil error:&error]);
XCTAssertNil([self.storage date]);
}

- (void)testDateIsStoredToFileSystem {
NSDate *date = [NSDate date];

NSError *error;
XCTAssert([self.storage setDate:date error:&error], @"Error: %@", error);

FIRCoreDiagnosticsDateFileStorage *anotherStorage =
[[FIRCoreDiagnosticsDateFileStorage alloc] initWithFileURL:self.fileURL];

XCTAssertEqualObjects([anotherStorage date], date);
}

@end
Loading