Skip to content

Commit

Permalink
feat: update to ooni/[email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
bassosimone committed Feb 16, 2023
1 parent b71de5a commit 5ccdc9e
Show file tree
Hide file tree
Showing 18 changed files with 23 additions and 252 deletions.
4 changes: 2 additions & 2 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use_frameworks!
inhibit_all_warnings!

target 'ooniprobe' do
pod "oonimkall", :podspec => "https://github.com/ooni/probe-cli/releases/download/v3.16.7/oonimkall.podspec"
pod "oonimkall", :podspec => "https://github.com/ooni/probe-cli/releases/download/v3.17.0-beta.1/oonimkall.podspec"
pod 'Toast', '~> 4.0.0'
pod 'MBProgressHUD'
pod 'DZNEmptyDataSet'
Expand All @@ -19,7 +19,7 @@ target 'ooniprobe' do
end

target 'OONIProbeUnitTests' do
pod "oonimkall", :podspec => "https://github.com/ooni/probe-cli/releases/download/v3.16.7/oonimkall.podspec"
pod "oonimkall", :podspec => "https://github.com/ooni/probe-cli/releases/download/v3.17.0-beta.1/oonimkall.podspec"
pod 'SharkORM', :git => 'https://github.com/sharksync/sharkorm', :tag => 'v2.3.67'
pod 'OCMapper', '2.0'
end
10 changes: 5 additions & 5 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ PODS:
- MBProgressHUD (1.2.0)
- MKDropdownMenu (1.4)
- OCMapper (2.0)
- oonimkall (2022.12.08-093516)
- oonimkall (2023.02.16-061929)
- RHMarkdownLabel (0.0.1):
- TTTAttributedLabel
- XNGMarkdownParser
Expand All @@ -30,7 +30,7 @@ DEPENDENCIES:
- MBProgressHUD
- MKDropdownMenu
- OCMapper (= 2.0)
- oonimkall (from `https://github.com/ooni/probe-cli/releases/download/v3.16.7/oonimkall.podspec`)
- oonimkall (from `https://github.com/ooni/probe-cli/releases/download/v3.17.0-beta.1/oonimkall.podspec`)
- RHMarkdownLabel
- Sentry (from `https://github.com/getsentry/sentry-cocoa.git`, tag `6.1.4`)
- SharkORM (from `https://github.com/sharksync/sharkorm`, tag `v2.3.67`)
Expand All @@ -53,7 +53,7 @@ SPEC REPOS:

EXTERNAL SOURCES:
oonimkall:
:podspec: https://github.com/ooni/probe-cli/releases/download/v3.16.7/oonimkall.podspec
:podspec: https://github.com/ooni/probe-cli/releases/download/v3.17.0-beta.1/oonimkall.podspec
Sentry:
:git: https://github.com/getsentry/sentry-cocoa.git
:tag: 6.1.4
Expand All @@ -78,14 +78,14 @@ SPEC CHECKSUMS:
MBProgressHUD: 3ee5efcc380f6a79a7cc9b363dd669c5e1ae7406
MKDropdownMenu: 269df4a41d21a1db684ce8bc709befe419fc5bae
OCMapper: 9b4d542543794c42adc01f1493d894f53e193cb0
oonimkall: e8fc753f58a2fc6ddf0d96c7833638ac688feeb7
oonimkall: a3647b51b9a41ce2626e8f1789ec33c9f2cfe933
RHMarkdownLabel: 81d6772768e621be57302b7fd5212ad4f78fb0bd
Sentry: 9d055e2de30a77685e86b219acf02e59b82091fc
SharkORM: 252e4411923110ac1b524a993ee2b3fa13eed7c4
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
TTTAttributedLabel: 8cffe8e127e4e82ff3af1e5386d4cd0ad000b656
XNGMarkdownParser: aed98c14f0c0eb20064184ddf9bac26c482722b2

PODFILE CHECKSUM: 522efea553d0ccb9bd0df809fa3ecee99e5dc0c0
PODFILE CHECKSUM: 8d090f92bbeceeddfb618975bb3ad870846b8080

COCOAPODS: 1.11.3
12 changes: 0 additions & 12 deletions ooniprobe.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,6 @@
EDC5A07225EFEA4400F86720 /* OONICheckInResults.m in Sources */ = {isa = PBXBuildFile; fileRef = EDC5A07125EFEA4400F86720 /* OONICheckInResults.m */; };
EDC5A07B25EFEBAD00F86720 /* OONICheckInConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = EDC5A07A25EFEBAD00F86720 /* OONICheckInConfig.m */; };
EDC5A0C525F00C4B00F86720 /* OONIURLInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = EDC5A0C425F00C4B00F86720 /* OONIURLInfo.m */; };
EDC5A0CE25F00C9C00F86720 /* OONIURLListConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = EDC5A0CD25F00C9C00F86720 /* OONIURLListConfig.m */; };
EDC5A0D425F00CB600F86720 /* OONIURLListResult.m in Sources */ = {isa = PBXBuildFile; fileRef = EDC5A0D325F00CB600F86720 /* OONIURLListResult.m */; };
EDCB9D911CB3F9ED00BBA3BC /* DefaultPreferences.plist in Resources */ = {isa = PBXBuildFile; fileRef = EDCB9D901CB3F9ED00BBA3BC /* DefaultPreferences.plist */; };
EDCD73D22180F014003B56D9 /* Header3ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EDCD73D12180F014003B56D9 /* Header3ViewController.m */; };
EDD771FD268116B300184C06 /* RunningTest.m in Sources */ = {isa = PBXBuildFile; fileRef = EDD771FC268116B300184C06 /* RunningTest.m */; };
Expand Down Expand Up @@ -472,10 +470,6 @@
EDC5A07A25EFEBAD00F86720 /* OONICheckInConfig.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = OONICheckInConfig.m; path = Engine/OONICheckInConfig.m; sourceTree = "<group>"; };
EDC5A0C325F00C4B00F86720 /* OONIURLInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OONIURLInfo.h; path = Engine/OONIURLInfo.h; sourceTree = "<group>"; };
EDC5A0C425F00C4B00F86720 /* OONIURLInfo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = OONIURLInfo.m; path = Engine/OONIURLInfo.m; sourceTree = "<group>"; };
EDC5A0CC25F00C9C00F86720 /* OONIURLListConfig.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OONIURLListConfig.h; path = Engine/OONIURLListConfig.h; sourceTree = "<group>"; };
EDC5A0CD25F00C9C00F86720 /* OONIURLListConfig.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = OONIURLListConfig.m; path = Engine/OONIURLListConfig.m; sourceTree = "<group>"; };
EDC5A0D225F00CB600F86720 /* OONIURLListResult.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OONIURLListResult.h; path = Engine/OONIURLListResult.h; sourceTree = "<group>"; };
EDC5A0D325F00CB600F86720 /* OONIURLListResult.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = OONIURLListResult.m; path = Engine/OONIURLListResult.m; sourceTree = "<group>"; };
EDCB9D901CB3F9ED00BBA3BC /* DefaultPreferences.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = DefaultPreferences.plist; sourceTree = "<group>"; };
EDCD73D02180F014003B56D9 /* Header3ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Header3ViewController.h; sourceTree = "<group>"; };
EDCD73D12180F014003B56D9 /* Header3ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Header3ViewController.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1142,10 +1136,6 @@
ED9CCF02252B356D004F8420 /* PESession.m */,
EDC5A0C325F00C4B00F86720 /* OONIURLInfo.h */,
EDC5A0C425F00C4B00F86720 /* OONIURLInfo.m */,
EDC5A0CC25F00C9C00F86720 /* OONIURLListConfig.h */,
EDC5A0CD25F00C9C00F86720 /* OONIURLListConfig.m */,
EDC5A0D225F00CB600F86720 /* OONIURLListResult.h */,
EDC5A0D325F00CB600F86720 /* OONIURLListResult.m */,
);
name = Engine;
sourceTree = "<group>";
Expand Down Expand Up @@ -1573,7 +1563,6 @@
EDB252AA20FA4D4F00B4EDE4 /* Tampering.m in Sources */,
ED0D35BE1DD72825005C863F /* RunButton.m in Sources */,
ED49509D1F951F1E00344E42 /* MessageUtility.m in Sources */,
EDC5A0D425F00CB600F86720 /* OONIURLListResult.m in Sources */,
ED62AB9D1ED5B70500778249 /* Reachability.m in Sources */,
ED2E067821D487D600E9B9EE /* InstantMessagingSuite.m in Sources */,
ED9CCEEE252B3190004F8420 /* OONIGeolocateResults.m in Sources */,
Expand Down Expand Up @@ -1605,7 +1594,6 @@
ED2E067B21D487DD00E9B9EE /* MiddleBoxesSuite.m in Sources */,
EDE47C41241FC6BC0013A1CB /* NetworkSession.m in Sources */,
EDF4ED26248A9A64001A5406 /* Advanced.m in Sources */,
EDC5A0CE25F00C9C00F86720 /* OONIURLListConfig.m in Sources */,
EDA17AFB208A30E100D46D0F /* MiddleBoxesDetailsViewController.m in Sources */,
ED1CC7FF20158D630041089A /* ConfigureButton.m in Sources */,
ED3932C41E3114740064CD11 /* AboutViewController.m in Sources */,
Expand Down
2 changes: 1 addition & 1 deletion ooniprobe/Engine/OONICheckInConfig.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ - (id) initWithSoftwareName:(NSString*)softwareName
self.softwareVersion = softwareVersion;
self.webConnectivity = [[OonimkallCheckInConfigWebConnectivity alloc] init];
for (NSString* category in categories) {
[self.webConnectivity add:category];
[self.webConnectivity addCategory:category];
}
}
return self;
Expand Down
8 changes: 0 additions & 8 deletions ooniprobe/Engine/OONISession.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
#import "OONISubmitResults.h"
#import "OONICheckInResults.h"
#import "OONICheckInConfig.h"
#import "OONIURLListConfig.h"
#import "OONIURLListResult.h"

/**
* OONISession contains shared state for running experiments and/or other
Expand All @@ -17,9 +15,6 @@
/** geolocate returns the probe geolocation. */
- (OONIGeolocateResults*) geolocate:(OONIContext*) ctx error:(NSError **)error;

/** maybeUpdateResources updates resources if needed. */
- (void) maybeUpdateResources:(OONIContext*) ctx error:(NSError **)error;

/** newContext creates a new OONIContext instance. */
- (OONIContext*) newContext;

Expand All @@ -39,7 +34,4 @@
*/
- (OONICheckInResults*) checkIn:(OONIContext*) ctx config:(OONICheckInConfig*) config error:(NSError **)error;

/** fetchURLList fetches the list of URLs to test */
- (OONIURLListResult*) fetchURLList:(OONIContext*) ctx config:(OONIURLListConfig*) config error:(NSError **)error;

@end
18 changes: 0 additions & 18 deletions ooniprobe/Engine/OONIURLListConfig.h

This file was deleted.

15 changes: 0 additions & 15 deletions ooniprobe/Engine/OONIURLListConfig.m

This file was deleted.

12 changes: 0 additions & 12 deletions ooniprobe/Engine/OONIURLListResult.h

This file was deleted.

16 changes: 0 additions & 16 deletions ooniprobe/Engine/OONIURLListResult.m

This file was deleted.

9 changes: 0 additions & 9 deletions ooniprobe/Engine/PESession.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ - (OONIGeolocateResults*) geolocate:(OONIContext*) ctx error:(NSError **)error{
return (r != nil) ? ([[OONIGeolocateResults alloc] initWithResults:r]) : nil;
}

- (void) maybeUpdateResources:(OONIContext*) ctx error:(NSError **)error{
[self.session maybeUpdateResources:ctx.ctx error:error];
}

- (OONIContext*) newContext{
return [self newContextWithTimeout:-1];
}
Expand All @@ -39,9 +35,4 @@ - (OONICheckInResults*) checkIn:(OONIContext*) ctx config:(OONICheckInConfig*) c
return (r != nil) ? ([[OONICheckInResults alloc] initWithResults:r]) : nil;
}

- (OONIURLListResult*) fetchURLList:(OONIContext*) ctx config:(OONIURLListConfig*) config error:(NSError **)error {
OonimkallURLListResult *r = [self.session fetchURLList:ctx.ctx config:[config toOonimkallURLListConfig] error:(NSError * _Nullable __autoreleasing * _Nullable)error];
return (r != nil) ? ([[OONIURLListResult alloc] initWithResults:r]) : nil;
}

@end
1 change: 0 additions & 1 deletion ooniprobe/Model/Database/Measurement.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,4 @@
-(void)setReRun;
-(void)deleteObject;
-(void)getExplorerUrl:(void (^)(NSDictionary*))successcb onError:(void (^)(NSError*))errorcb;
-(void)checkPublished:(void (^)(BOOL))successcb onError:(void (^)(NSError*))errorcb;
@end
11 changes: 0 additions & 11 deletions ooniprobe/Model/Database/Measurement.m
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,6 @@ -(NSString*)getLocalizedStartTime{

-(void)save{
[self commit];
/*
NSLog(@"---- START LOGGING MEASUREMENT OBJECT----");
NSLog(@"%@", self);
NSLog(@"---- END LOGGING MEASUREMENT OBJECT----");
*/
}

-(void)setReRun{
Expand All @@ -126,10 +121,4 @@ -(void)getExplorerUrl:(void (^)(NSDictionary*))successcb onError:(void (^)(NSErr
onError:errorcb];
}

-(void)checkPublished:(void (^)(BOOL))successcb onError:(void (^)(NSError*))errorcb{
[OONIApi checkReportId:self.report_id
onSuccess:successcb
onError:errorcb];
}

@end
3 changes: 2 additions & 1 deletion ooniprobe/Test/Test/WebConnectivity.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ -(void) runTest {
if (self.inputs == nil || [self.inputs count] == 0){
[super testStarted];
//Download urls and then alloc class
[OONIApi downloadUrls:^(NSArray *urls) {
// TODO(aanorbel): please double check how I adapted this code
[OONIApi checkIn:^(NSArray *urls) {
[self setUrls:urls];
[self setDefaultMaxRuntime];
self.isPreparing = false;
Expand Down
19 changes: 7 additions & 12 deletions ooniprobe/Utility/OONIApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,15 @@

@interface OONIApi : NSObject

+ (void)downloadUrls:(void (^)(NSArray*))successcb onError:(void (^)(NSError*))errorcb;
+ (void)checkIn:(void (^)(NSArray*))successcb onError:(void (^)(NSError*))errorcb;
+(void)checkIn:(void (^)(NSArray*))successcb onError:(void (^)(NSError*))errorcb;

+(void)getExplorerUrl:(NSString*)report_id withUrl:(NSString*)measurement_url
onSuccess:(void (^)(NSDictionary*))successcb onError:(void (^)(NSError*))errorcb;
+ (void)getExplorerUrl:(NSString*)baseURl
report_id:(NSString*)report_id
withUrl:(NSString*)measurement_url
onSuccess:(void (^)(NSDictionary*))successcb
onError:(void (^)(NSError*))errorcb;
+ (void)checkReportId:(NSString*)baseUrl
reportId:(NSString*)report_id
onSuccess:(void (^)(BOOL))successcb

+(void)getExplorerUrl:(NSString*)baseURl
report_id:(NSString*)report_id
withUrl:(NSString*)measurement_url
onSuccess:(void (^)(NSDictionary*))successcb
onError:(void (^)(NSError*))errorcb;
+(void)checkReportId:(NSString*)report_id
onSuccess:(void (^)(BOOL))successcb onError:(void (^)(NSError*))errorcb;

@end
Loading

0 comments on commit 5ccdc9e

Please sign in to comment.