diff --git a/Sources/EQNNotificationContent/Base.lproj/MainInterface.storyboard b/Sources/EQNNotificationContent/Base.lproj/MainInterface.storyboard new file mode 100644 index 0000000..6e3e79d --- /dev/null +++ b/Sources/EQNNotificationContent/Base.lproj/MainInterface.storyboard @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sources/EQNNotificationContent/Info.plist b/Sources/EQNNotificationContent/Info.plist new file mode 100644 index 0000000..b70ef07 --- /dev/null +++ b/Sources/EQNNotificationContent/Info.plist @@ -0,0 +1,47 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + EQNNotificationContent + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + XPC! + CFBundleShortVersionString + 2.0 + CFBundleVersion + 1.9 + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + NSExtension + + NSExtensionAttributes + + UNNotificationExtensionCategory + notifica_con_mappa + UNNotificationExtensionDefaultContentHidden + + UNNotificationExtensionInitialContentSizeRatio + 1.5 + UNNotificationExtensionUserInteractionEnabled + + + NSExtensionMainStoryboard + MainInterface + NSExtensionPointIdentifier + com.apple.usernotifications.content-extension + + + diff --git a/Sources/EQNNotificationContent/NotificationViewController.h b/Sources/EQNNotificationContent/NotificationViewController.h new file mode 100644 index 0000000..fc440e7 --- /dev/null +++ b/Sources/EQNNotificationContent/NotificationViewController.h @@ -0,0 +1,18 @@ +// +// NotificationViewController.h +// EQNNotificationContent +// +// Created by Luca Beretta on 03/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import +#import + +@interface NotificationViewController : UIViewController +@property (weak, nonatomic) IBOutlet UILabel *titolo; +@property (weak, nonatomic) IBOutlet UILabel *descrizione; +@property (weak, nonatomic) IBOutlet UILabel *onda; +@property (weak, nonatomic) IBOutlet MKMapView *mappa; + +@end diff --git a/Sources/EQNNotificationContent/NotificationViewController.m b/Sources/EQNNotificationContent/NotificationViewController.m new file mode 100644 index 0000000..e22d3f2 --- /dev/null +++ b/Sources/EQNNotificationContent/NotificationViewController.m @@ -0,0 +1,83 @@ +// +// NotificationViewController.m +// EQNNotificationContent +// +// Created by Luca Beretta on 03/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import "NotificationViewController.h" +#import +#import +#import +#import "PastquakesAnnotation.h" +#import "ReteSismicaAnnotation.h" + +@interface NotificationViewController () +@property (nonatomic, strong) NSDictionary *info; +@property (nonatomic, strong) NSURLSession *session; + +@end + +@implementation NotificationViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any required interface initialization here. + +} + +-(void)didReceiveNotification:(UNNotification *)notification { + + self.titolo.text = notification.request.content.title; + self.descrizione.text = notification.request.content.body; + NSDictionary *dict = notification.request.content.userInfo; + CLLocation *coordinate = [[CLLocation alloc] initWithLatitude:[dict[@"latitude"] doubleValue] longitude:[dict[@"longitude"] doubleValue]]; + MKCoordinateSpan span = MKCoordinateSpanMake(10.5, 10.5); + MKCoordinateRegion region = MKCoordinateRegionMake(coordinate.coordinate, span); + self.mappa.delegate = self; + [self.mappa setCenterCoordinate:coordinate.coordinate animated:NO]; + [self.mappa setRegion:region animated:YES]; + self.mappa.scrollEnabled = NO; + + if ([dict[@"type"] isEqualToString:@"eqn"]) { + + PastquakesAnnotation *annotation = [[PastquakesAnnotation alloc] initWithTitle:notification.request.content.body location:coordinate.coordinate intensita:[dict[@"intensity"] intValue]]; + [self.mappa addAnnotation:annotation]; + + } + else if ([dict[@"type"] isEqualToString:@"manual"]){ + + ReteSismicaAnnotation *annotation = [[ReteSismicaAnnotation alloc] initWithTitle:notification.request.content.body location:coordinate.coordinate magnitudo:[dict[@"magnitudo"] intValue]]; + [self.mappa addAnnotation:annotation]; + + } + + self.onda.text = [NSString stringWithFormat:@"%@ %@ %@", NSLocalizedString(@"Onda sismica in", @""), dict[@"wave_speed"], NSLocalizedString(@"secondi", @"")]; +} +-(MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id)annotation{ + + if ([annotation isKindOfClass:[PastquakesAnnotation class]]) { + PastquakesAnnotation *anLocation = (PastquakesAnnotation *)annotation; + MKAnnotationView *annotationView = [mapView dequeueReusableAnnotationViewWithIdentifier:IDENTIFIER_ANNOTATION_PASTQUAKES]; + if (annotationView == nil) + annotationView = anLocation.annotationView; + else + annotationView.annotation = anLocation; + + return annotationView; + } + else if ([annotation isKindOfClass:[ReteSismicaAnnotation class]]) { + ReteSismicaAnnotation *anLocation = (ReteSismicaAnnotation *)annotation; + MKAnnotationView *annotationView = [mapView dequeueReusableAnnotationViewWithIdentifier:IDENTIFIER_ANNOTATION_RETESMARTPHONE]; + if (annotationView == nil) + annotationView = anLocation.annotationView; + else + annotationView.annotation = anLocation; + + return annotationView; + } + return nil; + +} +@end diff --git a/Sources/EQNNotificationContent/es.lproj/MainInterface.strings b/Sources/EQNNotificationContent/es.lproj/MainInterface.strings new file mode 100644 index 0000000..fc45eb5 --- /dev/null +++ b/Sources/EQNNotificationContent/es.lproj/MainInterface.strings @@ -0,0 +1,9 @@ + +/* Class = "UILabel"; text = "Label"; ObjectID = "bT3-3m-qLh"; */ +"bT3-3m-qLh.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "f3d-th-bgU"; */ +"f3d-th-bgU.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "pCT-Wh-lut"; */ +"pCT-Wh-lut.text" = "Label"; diff --git a/Sources/EQNNotificationContent/it.lproj/MainInterface.strings b/Sources/EQNNotificationContent/it.lproj/MainInterface.strings new file mode 100644 index 0000000..fc45eb5 --- /dev/null +++ b/Sources/EQNNotificationContent/it.lproj/MainInterface.strings @@ -0,0 +1,9 @@ + +/* Class = "UILabel"; text = "Label"; ObjectID = "bT3-3m-qLh"; */ +"bT3-3m-qLh.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "f3d-th-bgU"; */ +"f3d-th-bgU.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "pCT-Wh-lut"; */ +"pCT-Wh-lut.text" = "Label"; diff --git a/Sources/EQNNotificationService/Info.plist b/Sources/EQNNotificationService/Info.plist new file mode 100644 index 0000000..10f3c29 --- /dev/null +++ b/Sources/EQNNotificationService/Info.plist @@ -0,0 +1,36 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + EQNNotificationService + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + XPC! + CFBundleShortVersionString + 2.0 + CFBundleVersion + 1.9 + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + NSExtension + + NSExtensionPointIdentifier + com.apple.usernotifications.service + NSExtensionPrincipalClass + NotificationService + + + diff --git a/Sources/EQNNotificationService/NotificationService.h b/Sources/EQNNotificationService/NotificationService.h new file mode 100644 index 0000000..3984cfe --- /dev/null +++ b/Sources/EQNNotificationService/NotificationService.h @@ -0,0 +1,13 @@ +// +// NotificationService.h +// EQNNotificationService +// +// Created by Luca Beretta on 19/12/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import + +@interface NotificationService : UNNotificationServiceExtension + +@end diff --git a/Sources/EQNNotificationService/NotificationService.m b/Sources/EQNNotificationService/NotificationService.m new file mode 100644 index 0000000..116edf5 --- /dev/null +++ b/Sources/EQNNotificationService/NotificationService.m @@ -0,0 +1,320 @@ +// +// NotificationService.m +// EQNNotificationService +// +// Created by Luca Beretta on 19/12/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "NotificationService.h" +#import "EQNAllertaSismica.h" +@interface NotificationService () + +@property (nonatomic, strong) void (^contentHandler)(UNNotificationContent *contentToDeliver); +@property (nonatomic, strong) UNMutableNotificationContent *bestAttemptContent; +@property (nonatomic, strong) NSURLSession *session; +@end + +@implementation NotificationService + +/* +- (void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler { + self.contentHandler = contentHandler; + self.bestAttemptContent = [request.content mutableCopy]; + + // Modify the notification content here... + self.bestAttemptContent.title = [NSString stringWithFormat:@"%@ [modified]", self.bestAttemptContent.title]; + self.contentHandler(self.bestAttemptContent); +} +*/ +- (void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void (^)(UNNotificationContent *_Nonnull))contentHandler +{ + self.contentHandler = contentHandler; + self.bestAttemptContent = [request.content mutableCopy]; + + // Modify the notification content here... + + + // Configure the notification's payload. + UNMutableNotificationContent* content = [[UNMutableNotificationContent alloc] init]; + content.title = [NSString localizedUserNotificationStringForKey:request.content.title arguments:nil]; + content.body = [NSString localizedUserNotificationStringForKey:request.content.body + arguments:nil]; + content.sound = [UNNotificationSound defaultSound]; + + self.bestAttemptContent.title = content.title; + self.bestAttemptContent.body = content.body; + + /* + // Deliver the notification in five seconds. + UNTimeIntervalNotificationTrigger* trigger = [UNTimeIntervalNotificationTrigger + triggerWithTimeInterval:5 repeats:NO]; + UNNotificationRequest* request = [UNNotificationRequest requestWithIdentifier:@"FiveSecond" + content:content trigger:trigger]; + + // Schedule the notification. + UNUserNotificationCenter* center = [UNUserNotificationCenter currentNotificationCenter]; + [center addNotificationRequest:request]; + */ + + // check for media attachment, example here uses custom payload keys mediaUrl and mediaType + NSDictionary *userInfo = request.content.userInfo; + NSString *messaggioModificato = @"non modificato"; + + if (userInfo == nil) + { + + [self contentComplete]; + return; + } + + + if ([userInfo objectForKey:@"type"]) + { + + NSString *stringURL = @"http://www.earthquakenetwork.it/icons/"; + + if ([[userInfo objectForKey:@"type"] isEqualToString:@"eqn"]) { + + self.bestAttemptContent.sound = [UNNotificationSound soundNamed:[EQNAllertaSismica center].tonoAllarme]; + + + NSString *intensity = [userInfo objectForKey:@"intensity"]; + switch ([intensity intValue]) { + case 0: + stringURL = [stringURL stringByAppendingString:@"star_white1.png"]; + break; + case 1: + stringURL = [stringURL stringByAppendingString:@"star_lightblue1.png"]; + break; + case 2: + stringURL = [stringURL stringByAppendingString:@"star_blue1.png"]; + break; + default: + break; + } + + } + else if ([[userInfo objectForKey:@"type"] isEqualToString:@"manual"]) { + + + NSString *intensity = [userInfo objectForKey:@"magnitude"]; + switch ([intensity intValue]) { + case 0: + stringURL = [stringURL stringByAppendingString:@"star_green1.png"]; + break; + case 1: + stringURL = [stringURL stringByAppendingString:@"star_yellow1.png"]; + break; + case 2: + stringURL = [stringURL stringByAppendingString:@"star_red1.png"]; + break; + default: + break; + + } + } + else if ([[userInfo objectForKey:@"type"] isEqualToString:@"official"]) { + + NSString *provaider = [userInfo objectForKey:@"provider"]; + double intensity = [[userInfo objectForKey:@"magnitude"] doubleValue]; + + NSString *colore = @"green"; + + if (intensity < 3.5) + colore = @"_green"; + else if (intensity < 4.5) + colore = @"_yellow"; + else if (intensity < 5.5) + colore = @"_red"; + else + colore = @"_purple"; + + if ([provaider isEqualToString:@"USGS"]) + stringURL = [stringURL stringByAppendingString:[NSString stringWithFormat:@"star%@2.png", colore]]; + if ([provaider isEqualToString:@"SGC"]) + stringURL = [stringURL stringByAppendingString:[NSString stringWithFormat:@"star3%@2.png", colore]]; + if ([provaider isEqualToString:@"CSN"]) + stringURL = [stringURL stringByAppendingString:[NSString stringWithFormat:@"star3f%@2.png", colore]]; + if ([provaider isEqualToString:@"SSN"]) + stringURL = [stringURL stringByAppendingString:[NSString stringWithFormat:@"star4%@2.png", colore]]; + if ([provaider isEqualToString:@"INPRES"]) + stringURL = [stringURL stringByAppendingString:[NSString stringWithFormat:@"star4r%@2.png", colore]]; + if ([provaider isEqualToString:@"FUNVISIS"]) + stringURL = [stringURL stringByAppendingString:[NSString stringWithFormat:@"star6%@2.png", colore]]; + if ([provaider isEqualToString:@"Ineter"]) + stringURL = [stringURL stringByAppendingString:[NSString stringWithFormat:@"triangle%@2.png", colore]]; + if ([provaider isEqualToString:@"RSN"]) + stringURL = [stringURL stringByAppendingString:[NSString stringWithFormat:@"triangle2%@2.png", colore]]; + if ([provaider isEqualToString:@"PHIVOLCS"]) + stringURL = [stringURL stringByAppendingString:[NSString stringWithFormat:@"triround_inner%@2.png", colore]]; + if ([provaider isEqualToString:@"IGEPN"]) + stringURL = [stringURL stringByAppendingString:[NSString stringWithFormat:@"triround%@2.png", colore]]; + if ([provaider isEqualToString:@"INGV"]) + stringURL = [stringURL stringByAppendingString:[NSString stringWithFormat:@"circle%@2.png", colore]]; + if ([provaider isEqualToString:@"EMSC"]) + stringURL = [stringURL stringByAppendingString:[NSString stringWithFormat:@"dyamond%@2.png", colore]]; + if ([provaider isEqualToString:@"IGP"]) + stringURL = [stringURL stringByAppendingString:[NSString stringWithFormat:@"dyamond_round%@2.png", colore]]; + if ([provaider isEqualToString:@"JMA"]) + stringURL = [stringURL stringByAppendingString:[NSString stringWithFormat:@"esa%@2.png", colore]]; + if ([provaider isEqualToString:@"GEONET"]) + stringURL = [stringURL stringByAppendingString:[NSString stringWithFormat:@"oct%@2.png", colore]]; + if ([provaider isEqualToString:@"CSI"]) + stringURL = [stringURL stringByAppendingString:[NSString stringWithFormat:@"penta%@2.png", colore]]; + if ([provaider isEqualToString:@"IGN"]) + stringURL = [stringURL stringByAppendingString:[NSString stringWithFormat:@"square%@2.png", colore]]; + } + else if ([[userInfo objectForKey:@"type"] isEqualToString:@"tsunami"]){ + + NSString *color = [userInfo objectForKey:@"color"]; + + if ([color isEqualToString:@"gr"]) + stringURL = [stringURL stringByAppendingString:@"tsunami_green.png"]; + if ([color isEqualToString:@"ye"]) + stringURL = [stringURL stringByAppendingString:@"tsunami_yellow.png"]; + if ([color isEqualToString:@"or"]) + stringURL = [stringURL stringByAppendingString:@"tsunami_orange.png"]; + if ([color isEqualToString:@"bl"]) + stringURL = [stringURL stringByAppendingString:@"tsunami_blue.png"]; + if ([color isEqualToString:@"re"]) + stringURL = [stringURL stringByAppendingString:@"tsunami_red.png"]; + + messaggioModificato = [self setMessage:[userInfo objectForKey:@"message"]]; + + } + + [self loadAttachmentForUrlString:stringURL + completionHandler: ^(UNNotificationAttachment *attachment) { + self.bestAttemptContent.attachments = [NSArray arrayWithObjects:attachment, nil]; + + if (![messaggioModificato isEqualToString:@"non modificato"]) + self.bestAttemptContent.body = [NSString stringWithFormat:@"%@", messaggioModificato]; + + }]; + + } +} + +-(NSString *)setMessage:(NSString *)message{ + + BOOL warning = false; + BOOL watch = false; + BOOL threat = false; + BOOL threatFinal = false; + BOOL cancellation = false; + BOOL information = false; + BOOL supplement = false; + + NSString * _message; + + if ([message.lowercaseString containsString:@"warning"]) + warning = YES; + if ([message.lowercaseString containsString:@"watch"]) + watch = YES; + if ([message.lowercaseString containsString:@"threat"]) + threat = YES; + if ([message.lowercaseString containsString:@"final"]) + threatFinal = YES; + if ([message.lowercaseString containsString:@"cancellation"]) + cancellation = YES; + if ([message.lowercaseString containsString:@"information"]) + information = YES; + if ([message.lowercaseString containsString:@"supplement"]) + supplement = YES; + + + if (warning){ + if (supplement) + _message = NSLocalizedString(@"Supplemento di allerta", @""); + else if(cancellation) + _message = NSLocalizedString(@"Allerta cancellata", @""); + else + _message = NSLocalizedString(@"Allerta Tsunami", @""); + } + else if (watch){ + if (supplement) + _message = NSLocalizedString(@"Supplemento di valutazione", @""); + else if(cancellation) + _message = NSLocalizedString(@"Valutazione cancellata", @""); + else + _message = NSLocalizedString(@"Valutazione Tsunami", @""); + } + + else if (threat){ + if (threatFinal) + _message = NSLocalizedString(@"Pericolo cessato", @""); + else + _message = NSLocalizedString(@"Pericolo tsunami", @""); + } + else if (information){ + _message = NSLocalizedString(@"Messaggio informativo", @""); + } + else if (supplement){ + _message = NSLocalizedString(@"Messaggio supplementare", @""); + } + return _message; + +} + +- (void)serviceExtensionTimeWillExpire { + // Called just before the extension will be terminated by the system. + // Use this as an opportunity to deliver your "best attempt" at modified content, otherwise the original push payload will be used. + + [self contentComplete]; + + self.contentHandler(self.bestAttemptContent); +} + +- (void)loadAttachmentForUrlString:(NSString *)urlString + completionHandler:(void (^)(UNNotificationAttachment *))completionHandler +{ + __block UNNotificationAttachment *attachment = nil; + __block NSURL *attachmentURL = [NSURL URLWithString:urlString]; + + NSString *fileExt = [@"." stringByAppendingString:[urlString pathExtension]]; + + self.session = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]]; + + NSURLSessionDownloadTask *task = [self.session downloadTaskWithURL:attachmentURL + completionHandler: ^(NSURL *temporaryFileLocation, NSURLResponse *response, NSError *error) { + if (error != nil) + { + NSLog(@"%@", error.localizedDescription); + + self.bestAttemptContent.body = [NSString stringWithFormat:@"%@ [error], %@", self.bestAttemptContent.body,error.localizedDescription]; + + } + else + { + NSFileManager *fileManager = [NSFileManager defaultManager]; + NSURL *localURL = [NSURL fileURLWithPath:[temporaryFileLocation.path + stringByAppendingString:fileExt]]; + [fileManager moveItemAtURL:temporaryFileLocation + toURL:localURL + error:&error]; + + NSError *attachmentError = nil; + attachment = [UNNotificationAttachment attachmentWithIdentifier:[attachmentURL lastPathComponent] + URL:localURL + options:nil + error:&attachmentError]; + if (attachmentError) + { + NSLog(@"%@", attachmentError.localizedDescription); + + self.bestAttemptContent.body = [NSString stringWithFormat:@"%@ [attachmentError], %@", self.bestAttemptContent.body,error.localizedDescription]; + } + } + completionHandler(attachment); + }]; + + [task resume]; +} + +- (void)contentComplete +{ + [self.session invalidateAndCancel]; + self.contentHandler(self.bestAttemptContent); +} +@end diff --git a/Sources/Earthquake Network.xcodeproj/project.pbxproj b/Sources/Earthquake Network.xcodeproj/project.pbxproj new file mode 100644 index 0000000..1634bce --- /dev/null +++ b/Sources/Earthquake Network.xcodeproj/project.pbxproj @@ -0,0 +1,1408 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 48; + objects = { + +/* Begin PBXBuildFile section */ + 4AF6047375F3EA53A42B2380 /* libPods-Earthquake Network.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 51164624757711E06B0778D4 /* libPods-Earthquake Network.a */; }; + 8C10B0B92281FE7F00125C9F /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8C10B0BD2281FE7F00125C9F /* Localizable.strings */; }; + 8C10B0BA2281FE7F00125C9F /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8C10B0BD2281FE7F00125C9F /* Localizable.strings */; }; + 8C10B0BB2281FE7F00125C9F /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8C10B0BD2281FE7F00125C9F /* Localizable.strings */; }; + 8C13E84B220B2E7E0009CFE4 /* MenuSelezioneEntiViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C13E84A220B2E7E0009CFE4 /* MenuSelezioneEntiViewController.m */; }; + 8C13E84F220B89360009CFE4 /* ElencoFiltroEntiTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C13E84E220B89360009CFE4 /* ElencoFiltroEntiTableViewController.m */; }; + 8C14112E21ED2FA300A59729 /* AreaInteresseTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C14112D21ED2FA300A59729 /* AreaInteresseTableViewController.m */; }; + 8C14113121ED3E5B00A59729 /* AllertaSismiTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C14113021ED3E5B00A59729 /* AllertaSismiTableViewController.m */; }; + 8C14113721EE502800A59729 /* EQNAllertaSismica.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C14113621EE502800A59729 /* EQNAllertaSismica.m */; }; + 8C149FA321E54E85002C44FD /* NotificheSismiTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C149FA221E54E85002C44FD /* NotificheSismiTableViewController.m */; }; + 8C29EAFB2258A4DD00FD90A9 /* DettagliAbbonamentoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C29EAFA2258A4DD00FD90A9 /* DettagliAbbonamentoViewController.swift */; }; + 8C2B251121938BFD00E0E25E /* SegnalazioniUtenteDettagliMappa.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C2B251021938BFD00E0E25E /* SegnalazioniUtenteDettagliMappa.m */; }; + 8C2B25142193927E00E0E25E /* ReteSismiDettagliMappa.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C2B25132193927E00E0E25E /* ReteSismiDettagliMappa.m */; }; + 8C465D9A21F653AB00F04673 /* Assets.xcassets in Frameworks */ = {isa = PBXBuildFile; fileRef = 8CBD3DD12149B9AD0070C963 /* Assets.xcassets */; }; + 8C465D9B21F653CA00F04673 /* Assets.xcassets in Frameworks */ = {isa = PBXBuildFile; fileRef = 8CBD3DD12149B9AD0070C963 /* Assets.xcassets */; }; + 8C465D9C21F7BBE700F04673 /* PastquakesAnnotation.m in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C602249218EDBE200C799C2 /* PastquakesAnnotation.m */; }; + 8C465D9D21F7BBE700F04673 /* PastquakesAnnotation.h in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C602248218EDBE200C799C2 /* PastquakesAnnotation.h */; }; + 8C465D9E21F7BD8700F04673 /* PastquakesAnnotation.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C602249218EDBE200C799C2 /* PastquakesAnnotation.m */; }; + 8C465D9F21F7BE0600F04673 /* Assets.xcassets in Sources */ = {isa = PBXBuildFile; fileRef = 8CBD3DD12149B9AD0070C963 /* Assets.xcassets */; }; + 8C483C9721FA662900259FD2 /* alert_star_trek.wav in Frameworks */ = {isa = PBXBuildFile; fileRef = 8CF12CC721DE43A400613AC5 /* alert_star_trek.wav */; }; + 8C483C9A21FA664000259FD2 /* EQNAllertaSismica.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C14113621EE502800A59729 /* EQNAllertaSismica.m */; }; + 8C483C9B21FA665C00259FD2 /* EQNAllertaSismica.h in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C14113521EE502800A59729 /* EQNAllertaSismica.h */; }; + 8C483C9C21FA665C00259FD2 /* EQNAllertaSismica.m in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C14113621EE502800A59729 /* EQNAllertaSismica.m */; }; + 8C483C9D21FA68B300259FD2 /* alert_star_trek.wav in Sources */ = {isa = PBXBuildFile; fileRef = 8CF12CC721DE43A400613AC5 /* alert_star_trek.wav */; }; + 8C483CA521FBC06D00259FD2 /* alerta_japanese.m4r in Resources */ = {isa = PBXBuildFile; fileRef = 8C483CA421FBC06D00259FD2 /* alerta_japanese.m4r */; }; + 8C483CA621FBC06D00259FD2 /* alerta_japanese.m4r in Resources */ = {isa = PBXBuildFile; fileRef = 8C483CA421FBC06D00259FD2 /* alerta_japanese.m4r */; }; + 8C483CA721FBC06D00259FD2 /* alerta_japanese.m4r in Resources */ = {isa = PBXBuildFile; fileRef = 8C483CA421FBC06D00259FD2 /* alerta_japanese.m4r */; }; + 8C483CA921FBC1E900259FD2 /* alerta_mexico.m4r in Resources */ = {isa = PBXBuildFile; fileRef = 8C483CA821FBC1E800259FD2 /* alerta_mexico.m4r */; }; + 8C483CAA21FBC1E900259FD2 /* alerta_mexico.m4r in Resources */ = {isa = PBXBuildFile; fileRef = 8C483CA821FBC1E800259FD2 /* alerta_mexico.m4r */; }; + 8C483CAB21FBC1E900259FD2 /* alerta_mexico.m4r in Resources */ = {isa = PBXBuildFile; fileRef = 8C483CA821FBC1E800259FD2 /* alerta_mexico.m4r */; }; + 8C483CAE21FDA53B00259FD2 /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C483CAD21FDA53B00259FD2 /* StoreKit.framework */; }; + 8C483CB821FDACD300259FD2 /* IAPHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C483CB721FDACD300259FD2 /* IAPHelper.swift */; }; + 8C483CB921FDACD300259FD2 /* IAPHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C483CB721FDACD300259FD2 /* IAPHelper.swift */; }; + 8C483CBA21FDACD300259FD2 /* IAPHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C483CB721FDACD300259FD2 /* IAPHelper.swift */; }; + 8C483CBC21FDACE500259FD2 /* VersioneProProducts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C483CBB21FDACE500259FD2 /* VersioneProProducts.swift */; }; + 8C483CBD21FDACE500259FD2 /* VersioneProProducts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C483CBB21FDACE500259FD2 /* VersioneProProducts.swift */; }; + 8C483CBE21FDACE500259FD2 /* VersioneProProducts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C483CBB21FDACE500259FD2 /* VersioneProProducts.swift */; }; + 8C483CC021FDACEE00259FD2 /* DetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C483CBF21FDACEE00259FD2 /* DetailViewController.swift */; }; + 8C483CC121FDACEE00259FD2 /* DetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C483CBF21FDACEE00259FD2 /* DetailViewController.swift */; }; + 8C483CC221FDACEE00259FD2 /* DetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C483CBF21FDACEE00259FD2 /* DetailViewController.swift */; }; + 8C483CC421FDACF400259FD2 /* ProductCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C483CC321FDACF400259FD2 /* ProductCell.swift */; }; + 8C483CC521FDACF400259FD2 /* ProductCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C483CC321FDACF400259FD2 /* ProductCell.swift */; }; + 8C483CC621FDACF400259FD2 /* ProductCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C483CC321FDACF400259FD2 /* ProductCell.swift */; }; + 8C483CCD21FDB52500259FD2 /* MasterViewController1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C483CCC21FDB52500259FD2 /* MasterViewController1.swift */; }; + 8C483CCE21FDB52500259FD2 /* MasterViewController1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C483CCC21FDB52500259FD2 /* MasterViewController1.swift */; }; + 8C483CCF21FDB52500259FD2 /* MasterViewController1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C483CCC21FDB52500259FD2 /* MasterViewController1.swift */; }; + 8C4B0B7E21CACE3F00AED489 /* NotificationService.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C4B0B7D21CACE3F00AED489 /* NotificationService.m */; }; + 8C4B0B8221CACE3F00AED489 /* EQNNotificationService.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 8C4B0B7A21CACE3F00AED489 /* EQNNotificationService.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 8C4DD4F9228237E000AE77ED /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8C4DD4FB228237E000AE77ED /* InfoPlist.strings */; }; + 8C4E343F215012FA008B0D2A /* EQNManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C4E343E215012FA008B0D2A /* EQNManager.m */; }; + 8C4E34422152B5E8008B0D2A /* EQNRilevamento.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C4E34412152B5E8008B0D2A /* EQNRilevamento.m */; }; + 8C4E34452152B707008B0D2A /* EQMAccelerometroManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C4E34442152B707008B0D2A /* EQMAccelerometroManager.m */; }; + 8C4E344B2152EE5B008B0D2A /* EQNGeneratoreURLServer.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C4E344A2152EE5B008B0D2A /* EQNGeneratoreURLServer.m */; }; + 8C593E8A217BA2470008B260 /* EQNSegnalazione.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C593E89217BA2470008B260 /* EQNSegnalazione.m */; }; + 8C5C0A6E21E51F3C000B5EFD /* ManuTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C5C0A6D21E51F3C000B5EFD /* ManuTableViewController.m */; }; + 8C5EA22D21763103002DC156 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C5EA22C21763102002DC156 /* MapKit.framework */; }; + 8C5EA23121764816002DC156 /* PrioritaViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C5EA23021764816002DC156 /* PrioritaViewController.m */; }; + 8C5EA2342176820B002DC156 /* VersionePROViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C5EA2332176820B002DC156 /* VersionePROViewController.m */; }; + 8C5EA23A2177B3ED002DC156 /* MasterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C5EA2392177B3ED002DC156 /* MasterViewController.m */; }; + 8C5EA23D2177B51C002DC156 /* SegnalazioniViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C5EA23C2177B51C002DC156 /* SegnalazioniViewController.m */; }; + 8C602246218D9DB200C799C2 /* PastquakesDettagliMappa.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C602245218D9DB200C799C2 /* PastquakesDettagliMappa.m */; }; + 8C60224A218EDBE200C799C2 /* PastquakesAnnotation.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C602249218EDBE200C799C2 /* PastquakesAnnotation.m */; }; + 8C6CBAE521597E79005C426A /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 8C6CBAE421597E79005C426A /* GoogleService-Info.plist */; }; + 8C7A3B66225A5EA40045B266 /* NSDictionary+BVJSONString.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C7A3B64225A5EA30045B266 /* NSDictionary+BVJSONString.m */; }; + 8C7CD64821F7D0F800835812 /* ReteSismicaAnnotation.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CD08637218B3BEE0000CB5E /* ReteSismicaAnnotation.m */; }; + 8C7CD64921F7D11700835812 /* ReteSismicaAnnotation.m in Frameworks */ = {isa = PBXBuildFile; fileRef = 8CD08637218B3BEE0000CB5E /* ReteSismicaAnnotation.m */; }; + 8C7CD64A21F7D11700835812 /* ReteSismicaAnnotation.h in Frameworks */ = {isa = PBXBuildFile; fileRef = 8CD08636218B3BEE0000CB5E /* ReteSismicaAnnotation.h */; }; + 8C7E945A21E548A600B0B770 /* DettadliMenuTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C7E945921E548A600B0B770 /* DettadliMenuTableViewController.m */; }; + 8C8EBBA721540039002784BA /* EQNUser.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C8EBBA621540039002784BA /* EQNUser.m */; }; + 8C9B755C2233A25100F8FDEE /* MenuFiltroEntiViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9B755B2233A25100F8FDEE /* MenuFiltroEntiViewController.m */; }; + 8C9B755F2233BFDE00F8FDEE /* FiltroEnti.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9B755E2233BFDE00F8FDEE /* FiltroEnti.m */; }; + 8CA46BA12194532E00C63C16 /* SismaAnnotation.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CA46BA02194532E00C63C16 /* SismaAnnotation.m */; }; + 8CABD7212194B7C700C3E09C /* ImpostazioniViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CABD7202194B7C700C3E09C /* ImpostazioniViewController.m */; }; + 8CADAA9421B2627D0044E256 /* LogViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CADAA9321B2627D0044E256 /* LogViewController.m */; }; + 8CAFD7C521825E4A00F8BD29 /* EQNSisma.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CAFD7C421825E4A00F8BD29 /* EQNSisma.m */; }; + 8CAFD7C82182648600F8BD29 /* EQNRetiSismiViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CAFD7C72182648600F8BD29 /* EQNRetiSismiViewController.m */; }; + 8CBD3DC72149B9AD0070C963 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CBD3DC62149B9AD0070C963 /* AppDelegate.m */; }; + 8CBD3DCA2149B9AD0070C963 /* ReteSmartphone.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CBD3DC92149B9AD0070C963 /* ReteSmartphone.m */; }; + 8CBD3DCD2149B9AD0070C963 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8CBD3DCB2149B9AD0070C963 /* Main.storyboard */; }; + 8CBD3DD02149B9AD0070C963 /* Earthquake_Network.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 8CBD3DCE2149B9AD0070C963 /* Earthquake_Network.xcdatamodeld */; }; + 8CBD3DD22149B9AD0070C963 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8CBD3DD12149B9AD0070C963 /* Assets.xcassets */; }; + 8CBD3DD52149B9AD0070C963 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8CBD3DD32149B9AD0070C963 /* LaunchScreen.storyboard */; }; + 8CBD3DD82149B9AD0070C963 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CBD3DD72149B9AD0070C963 /* main.m */; }; + 8CC1B15A217CB09100F22178 /* DettagliMappaViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CC1B159217CB09100F22178 /* DettagliMappaViewController.m */; }; + 8CC2B44F214AC7F8002ED1B2 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8CC2B44E214AC7F8002ED1B2 /* CoreMotion.framework */; }; + 8CCE164421E67F1300173CD9 /* EQNImpostazioniNotifiche.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CCE164321E67F1300173CD9 /* EQNImpostazioniNotifiche.m */; }; + 8CCE164821E69AEC00173CD9 /* TempoRealeTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CCE164721E69AEC00173CD9 /* TempoRealeTableViewController.m */; }; + 8CCE164B21E7BAB200173CD9 /* EQNNotificheTempoReale.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CCE164A21E7BAB200173CD9 /* EQNNotificheTempoReale.m */; }; + 8CCE164E21E7BACE00173CD9 /* EQNNotificheSegnalazioniUtente.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CCE164D21E7BACE00173CD9 /* EQNNotificheSegnalazioniUtente.m */; }; + 8CCE165121E7BAEC00173CD9 /* EQNNotificeReteSismiche.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CCE165021E7BAEC00173CD9 /* EQNNotificeReteSismiche.m */; }; + 8CCE165521EA378800173CD9 /* SegnalazioniUtentiTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CCE165421EA378800173CD9 /* SegnalazioniUtentiTableViewController.m */; }; + 8CCE165821EB1E0000173CD9 /* RetiSismicheTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CCE165721EB1E0000173CD9 /* RetiSismicheTableViewController.m */; }; + 8CCE165B21EB7AD800173CD9 /* ListaEntiTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CCE165A21EB7AD800173CD9 /* ListaEntiTableViewController.m */; }; + 8CCE165E21EB9F2400173CD9 /* NotificheTsunamiTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CCE165D21EB9F2400173CD9 /* NotificheTsunamiTableViewController.m */; }; + 8CCE166121EBA37500173CD9 /* EQNNotificheTsunami.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CCE166021EBA37500173CD9 /* EQNNotificheTsunami.m */; }; + 8CCE166421EBEFBD00173CD9 /* MessaggioInformativoTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CCE166321EBEFBD00173CD9 /* MessaggioInformativoTableViewController.m */; }; + 8CD0862E218A41930000CB5E /* CellDettagliMappaTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CD0862D218A41930000CB5E /* CellDettagliMappaTableViewCell.m */; }; + 8CD08631218ADFCA0000CB5E /* Cell_Reti_sismicheTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CD08630218ADFCA0000CB5E /* Cell_Reti_sismicheTableViewCell.m */; }; + 8CD08635218AF6030000CB5E /* Cell_Meteo_TableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CD08634218AF6030000CB5E /* Cell_Meteo_TableViewCell.m */; }; + 8CD08638218B3BEE0000CB5E /* ReteSismicaAnnotation.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CD08637218B3BEE0000CB5E /* ReteSismicaAnnotation.m */; }; + 8CEAE3D42211482E00AF948F /* InformazioniViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CEAE3D32211482E00AF948F /* InformazioniViewController.m */; }; + 8CEAE3DA22114D1800AF948F /* info.txt in Resources */ = {isa = PBXBuildFile; fileRef = 8CEAE3D522114D1600AF948F /* info.txt */; }; + 8CEAE3DB22114D1800AF948F /* privacy.txt in Resources */ = {isa = PBXBuildFile; fileRef = 8CEAE3D622114D1600AF948F /* privacy.txt */; }; + 8CEAE3DC22114D1800AF948F /* author.txt in Resources */ = {isa = PBXBuildFile; fileRef = 8CEAE3D722114D1700AF948F /* author.txt */; }; + 8CEAE3DD22114D1800AF948F /* faq.txt in Resources */ = {isa = PBXBuildFile; fileRef = 8CEAE3D822114D1700AF948F /* faq.txt */; }; + 8CEAE3DE22114D1800AF948F /* disclaimer.txt in Resources */ = {isa = PBXBuildFile; fileRef = 8CEAE3D922114D1700AF948F /* disclaimer.txt */; }; + 8CEAE3E0221214F700AF948F /* AcquistiProViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CEAE3DF221214F700AF948F /* AcquistiProViewController.swift */; }; + 8CEAE4D92163E23E001A42B9 /* SWRevealViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CEAE4D82163E23D001A42B9 /* SWRevealViewController.m */; }; + 8CECF64B2214A22300E01A6D /* AbbonamentiViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CECF64A2214A22300E01A6D /* AbbonamentiViewController.swift */; }; + 8CF05B51218C41FB0055012B /* PickerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CF05B4B218C41F90055012B /* PickerViewController.m */; }; + 8CF05B52218C41FB0055012B /* TBDInputViewControllerData.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8CF05B4E218C41FA0055012B /* TBDInputViewControllerData.xib */; }; + 8CF05B53218C41FB0055012B /* PickerViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8CF05B4F218C41FA0055012B /* PickerViewController.xib */; }; + 8CF05B54218C41FB0055012B /* TBDInputViewControllerData.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CF05B50218C41FB0055012B /* TBDInputViewControllerData.m */; }; + 8CF05B57218C93BA0055012B /* EQNUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CF05B56218C93BA0055012B /* EQNUtility.m */; }; + 8CF12CCA21DE43A500613AC5 /* alert_star_trek.wav in Resources */ = {isa = PBXBuildFile; fileRef = 8CF12CC721DE43A400613AC5 /* alert_star_trek.wav */; }; + 8CF12CD321DE49B600613AC5 /* UserNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8CF12CD221DE49B600613AC5 /* UserNotifications.framework */; }; + 8CF12CD521DE49B600613AC5 /* UserNotificationsUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8CF12CD421DE49B600613AC5 /* UserNotificationsUI.framework */; }; + 8CF12CD921DE49B600613AC5 /* NotificationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CF12CD821DE49B600613AC5 /* NotificationViewController.m */; }; + 8CF12CDC21DE49B600613AC5 /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8CF12CDA21DE49B600613AC5 /* MainInterface.storyboard */; }; + 8CF12CE021DE49B600613AC5 /* EQNNotificationContent.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 8CF12CD121DE49B600613AC5 /* EQNNotificationContent.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 8CF4F4D2216D2C780057110B /* EQNReteSmartphone.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CF4F4D1216D2C780057110B /* EQNReteSmartphone.m */; }; + 8CF4F4D5216D336B0057110B /* EQNDatoGrafico.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CF4F4D4216D336B0057110B /* EQNDatoGrafico.m */; }; + 8CF4F4D8216D3A110057110B /* EQNAreaCheck.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CF4F4D7216D3A110057110B /* EQNAreaCheck.m */; }; + 8CF4F4DB216D44930057110B /* EQNPastquakes.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CF4F4DA216D44930057110B /* EQNPastquakes.m */; }; + 8CF4F4DE2175352E0057110B /* WaitViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CF4F4DD2175352E0057110B /* WaitViewController.m */; }; + 8CF6604F214C0E58009F4314 /* EQNCalibrazione.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CF6604E214C0E58009F4314 /* EQNCalibrazione.m */; }; + 8CF66053214C12DC009F4314 /* EQNMath.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CF66052214C12DC009F4314 /* EQNMath.m */; }; + 8CF66058214C566B009F4314 /* ServerRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CF66055214C566A009F4314 /* ServerRequest.m */; }; + 8CF66059214C566B009F4314 /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CF66056214C566A009F4314 /* Reachability.m */; }; + 8CFA63202197F9C10099EB0E /* TsunamiViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CFA631F2197F9C10099EB0E /* TsunamiViewController.m */; }; + 8CFA6323219A2C610099EB0E /* Tsunami.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CFA6322219A2C610099EB0E /* Tsunami.m */; }; + 8CFA6326219A41590099EB0E /* DettagliTsunamiViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CFA6325219A41590099EB0E /* DettagliTsunamiViewController.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 8C4B0B8021CACE3F00AED489 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 8CBD3DBA2149B9AD0070C963 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 8C4B0B7921CACE3F00AED489; + remoteInfo = EQNNotificationService; + }; + 8CF12CDE21DE49B600613AC5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 8CBD3DBA2149B9AD0070C963 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 8CF12CD021DE49B600613AC5; + remoteInfo = EQNNotificationContent; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 8CADAAA521B98C550044E256 /* Embed App Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + 8CF12CE021DE49B600613AC5 /* EQNNotificationContent.appex in Embed App Extensions */, + 8C4B0B8221CACE3F00AED489 /* EQNNotificationService.appex in Embed App Extensions */, + ); + name = "Embed App Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 40CD2E5581CF2FA3D52F392D /* Pods-Earthquake Network.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Earthquake Network.release.xcconfig"; path = "Pods/Target Support Files/Pods-Earthquake Network/Pods-Earthquake Network.release.xcconfig"; sourceTree = ""; }; + 51164624757711E06B0778D4 /* libPods-Earthquake Network.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Earthquake Network.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 8C10B0AF2281FBE800125C9F /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Main.strings; sourceTree = ""; }; + 8C10B0B02281FBE800125C9F /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/LaunchScreen.strings; sourceTree = ""; }; + 8C10B0B12281FBE800125C9F /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/MainInterface.strings; sourceTree = ""; }; + 8C10B0B22281FD6900125C9F /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Main.strings; sourceTree = ""; }; + 8C10B0B32281FD6A00125C9F /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/LaunchScreen.strings; sourceTree = ""; }; + 8C10B0B42281FD6B00125C9F /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/MainInterface.strings; sourceTree = ""; }; + 8C10B0BC2281FE7F00125C9F /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Localizable.strings; sourceTree = ""; }; + 8C10B0BE2281FE9E00125C9F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + 8C10B0BF2281FEA000125C9F /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = ""; }; + 8C10B0C42282360900125C9F /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 8C13E849220B2E7E0009CFE4 /* MenuSelezioneEntiViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MenuSelezioneEntiViewController.h; sourceTree = ""; }; + 8C13E84A220B2E7E0009CFE4 /* MenuSelezioneEntiViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MenuSelezioneEntiViewController.m; sourceTree = ""; }; + 8C13E84D220B89360009CFE4 /* ElencoFiltroEntiTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ElencoFiltroEntiTableViewController.h; sourceTree = ""; }; + 8C13E84E220B89360009CFE4 /* ElencoFiltroEntiTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ElencoFiltroEntiTableViewController.m; sourceTree = ""; }; + 8C14112C21ED2FA300A59729 /* AreaInteresseTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AreaInteresseTableViewController.h; sourceTree = ""; }; + 8C14112D21ED2FA300A59729 /* AreaInteresseTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AreaInteresseTableViewController.m; sourceTree = ""; }; + 8C14112F21ED3E5B00A59729 /* AllertaSismiTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AllertaSismiTableViewController.h; sourceTree = ""; }; + 8C14113021ED3E5B00A59729 /* AllertaSismiTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AllertaSismiTableViewController.m; sourceTree = ""; }; + 8C14113521EE502800A59729 /* EQNAllertaSismica.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNAllertaSismica.h; sourceTree = ""; }; + 8C14113621EE502800A59729 /* EQNAllertaSismica.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNAllertaSismica.m; sourceTree = ""; }; + 8C149FA121E54E85002C44FD /* NotificheSismiTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NotificheSismiTableViewController.h; sourceTree = ""; }; + 8C149FA221E54E85002C44FD /* NotificheSismiTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NotificheSismiTableViewController.m; sourceTree = ""; }; + 8C29EAFA2258A4DD00FD90A9 /* DettagliAbbonamentoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DettagliAbbonamentoViewController.swift; sourceTree = ""; }; + 8C2B250F21938BFD00E0E25E /* SegnalazioniUtenteDettagliMappa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SegnalazioniUtenteDettagliMappa.h; sourceTree = ""; }; + 8C2B251021938BFD00E0E25E /* SegnalazioniUtenteDettagliMappa.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SegnalazioniUtenteDettagliMappa.m; sourceTree = ""; }; + 8C2B25122193927E00E0E25E /* ReteSismiDettagliMappa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ReteSismiDettagliMappa.h; sourceTree = ""; }; + 8C2B25132193927E00E0E25E /* ReteSismiDettagliMappa.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ReteSismiDettagliMappa.m; sourceTree = ""; }; + 8C465D9721F6539700F04673 /* Earthquake Network.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = "Earthquake Network.xcodeproj"; sourceTree = ""; }; + 8C483CA421FBC06D00259FD2 /* alerta_japanese.m4r */ = {isa = PBXFileReference; lastKnownFileType = file; path = alerta_japanese.m4r; sourceTree = ""; }; + 8C483CA821FBC1E800259FD2 /* alerta_mexico.m4r */ = {isa = PBXFileReference; lastKnownFileType = file; path = alerta_mexico.m4r; sourceTree = ""; }; + 8C483CAD21FDA53B00259FD2 /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; }; + 8C483CB021FDA8C700259FD2 /* Earthquake Network-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Earthquake Network-Bridging-Header.h"; sourceTree = ""; }; + 8C483CB521FDACD100259FD2 /* EQNNotificationService-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "EQNNotificationService-Bridging-Header.h"; sourceTree = ""; }; + 8C483CB621FDACD100259FD2 /* EQNNotificationContent-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "EQNNotificationContent-Bridging-Header.h"; sourceTree = ""; }; + 8C483CB721FDACD300259FD2 /* IAPHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IAPHelper.swift; sourceTree = ""; }; + 8C483CBB21FDACE500259FD2 /* VersioneProProducts.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VersioneProProducts.swift; sourceTree = ""; }; + 8C483CBF21FDACEE00259FD2 /* DetailViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DetailViewController.swift; sourceTree = ""; }; + 8C483CC321FDACF400259FD2 /* ProductCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProductCell.swift; sourceTree = ""; }; + 8C483CCC21FDB52500259FD2 /* MasterViewController1.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MasterViewController1.swift; sourceTree = ""; }; + 8C4B0B7A21CACE3F00AED489 /* EQNNotificationService.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = EQNNotificationService.appex; sourceTree = BUILT_PRODUCTS_DIR; }; + 8C4B0B7C21CACE3F00AED489 /* NotificationService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NotificationService.h; sourceTree = ""; }; + 8C4B0B7D21CACE3F00AED489 /* NotificationService.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NotificationService.m; sourceTree = ""; }; + 8C4B0B7F21CACE3F00AED489 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 8C4DD4FA228237E000AE77ED /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 8C4DD4FC228237E200AE77ED /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/InfoPlist.strings; sourceTree = ""; }; + 8C4DD4FD228237E400AE77ED /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; + 8C4E343D215012FA008B0D2A /* EQNManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNManager.h; sourceTree = ""; }; + 8C4E343E215012FA008B0D2A /* EQNManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNManager.m; sourceTree = ""; }; + 8C4E34402152B5E8008B0D2A /* EQNRilevamento.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNRilevamento.h; sourceTree = ""; }; + 8C4E34412152B5E8008B0D2A /* EQNRilevamento.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNRilevamento.m; sourceTree = ""; }; + 8C4E34432152B707008B0D2A /* EQMAccelerometroManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQMAccelerometroManager.h; sourceTree = ""; }; + 8C4E34442152B707008B0D2A /* EQMAccelerometroManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQMAccelerometroManager.m; sourceTree = ""; }; + 8C4E34492152EE5B008B0D2A /* EQNGeneratoreURLServer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNGeneratoreURLServer.h; sourceTree = ""; }; + 8C4E344A2152EE5B008B0D2A /* EQNGeneratoreURLServer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNGeneratoreURLServer.m; sourceTree = ""; }; + 8C593E88217BA2470008B260 /* EQNSegnalazione.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNSegnalazione.h; sourceTree = ""; }; + 8C593E89217BA2470008B260 /* EQNSegnalazione.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNSegnalazione.m; sourceTree = ""; }; + 8C5C0A6C21E51F3C000B5EFD /* ManuTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ManuTableViewController.h; sourceTree = ""; }; + 8C5C0A6D21E51F3C000B5EFD /* ManuTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ManuTableViewController.m; sourceTree = ""; }; + 8C5EA22C21763102002DC156 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; + 8C5EA22F21764816002DC156 /* PrioritaViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PrioritaViewController.h; sourceTree = ""; }; + 8C5EA23021764816002DC156 /* PrioritaViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PrioritaViewController.m; sourceTree = ""; }; + 8C5EA2322176820B002DC156 /* VersionePROViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VersionePROViewController.h; sourceTree = ""; }; + 8C5EA2332176820B002DC156 /* VersionePROViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VersionePROViewController.m; sourceTree = ""; }; + 8C5EA2382177B3ED002DC156 /* MasterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MasterViewController.h; sourceTree = ""; }; + 8C5EA2392177B3ED002DC156 /* MasterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MasterViewController.m; sourceTree = ""; }; + 8C5EA23B2177B51C002DC156 /* SegnalazioniViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SegnalazioniViewController.h; sourceTree = ""; }; + 8C5EA23C2177B51C002DC156 /* SegnalazioniViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SegnalazioniViewController.m; sourceTree = ""; }; + 8C602244218D9DB200C799C2 /* PastquakesDettagliMappa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PastquakesDettagliMappa.h; sourceTree = ""; }; + 8C602245218D9DB200C799C2 /* PastquakesDettagliMappa.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PastquakesDettagliMappa.m; sourceTree = ""; }; + 8C602248218EDBE200C799C2 /* PastquakesAnnotation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PastquakesAnnotation.h; sourceTree = ""; }; + 8C602249218EDBE200C799C2 /* PastquakesAnnotation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PastquakesAnnotation.m; sourceTree = ""; }; + 8C6CBAE421597E79005C426A /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; + 8C7A3B64225A5EA30045B266 /* NSDictionary+BVJSONString.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+BVJSONString.m"; sourceTree = ""; }; + 8C7A3B65225A5EA40045B266 /* NSDictionary+BVJSONString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+BVJSONString.h"; sourceTree = ""; }; + 8C7E945821E548A600B0B770 /* DettadliMenuTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DettadliMenuTableViewController.h; sourceTree = ""; }; + 8C7E945921E548A600B0B770 /* DettadliMenuTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DettadliMenuTableViewController.m; sourceTree = ""; }; + 8C8EBBA521540039002784BA /* EQNUser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNUser.h; sourceTree = ""; }; + 8C8EBBA621540039002784BA /* EQNUser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNUser.m; sourceTree = ""; }; + 8C9B755A2233A25100F8FDEE /* MenuFiltroEntiViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MenuFiltroEntiViewController.h; sourceTree = ""; }; + 8C9B755B2233A25100F8FDEE /* MenuFiltroEntiViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MenuFiltroEntiViewController.m; sourceTree = ""; }; + 8C9B755D2233BFDE00F8FDEE /* FiltroEnti.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FiltroEnti.h; sourceTree = ""; }; + 8C9B755E2233BFDE00F8FDEE /* FiltroEnti.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FiltroEnti.m; sourceTree = ""; }; + 8CA46B9F2194532E00C63C16 /* SismaAnnotation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SismaAnnotation.h; sourceTree = ""; }; + 8CA46BA02194532E00C63C16 /* SismaAnnotation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SismaAnnotation.m; sourceTree = ""; }; + 8CABD71F2194B7C700C3E09C /* ImpostazioniViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ImpostazioniViewController.h; sourceTree = ""; }; + 8CABD7202194B7C700C3E09C /* ImpostazioniViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ImpostazioniViewController.m; sourceTree = ""; }; + 8CADAA9221B2627D0044E256 /* LogViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LogViewController.h; sourceTree = ""; }; + 8CADAA9321B2627D0044E256 /* LogViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LogViewController.m; sourceTree = ""; }; + 8CAFD7C321825E4A00F8BD29 /* EQNSisma.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNSisma.h; sourceTree = ""; }; + 8CAFD7C421825E4A00F8BD29 /* EQNSisma.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNSisma.m; sourceTree = ""; }; + 8CAFD7C62182648600F8BD29 /* EQNRetiSismiViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNRetiSismiViewController.h; sourceTree = ""; }; + 8CAFD7C72182648600F8BD29 /* EQNRetiSismiViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNRetiSismiViewController.m; sourceTree = ""; }; + 8CBD3DC22149B9AD0070C963 /* Earthquake Network.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Earthquake Network.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 8CBD3DC52149B9AD0070C963 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 8CBD3DC62149B9AD0070C963 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 8CBD3DC82149B9AD0070C963 /* ReteSmartphone.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ReteSmartphone.h; sourceTree = ""; }; + 8CBD3DC92149B9AD0070C963 /* ReteSmartphone.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ReteSmartphone.m; sourceTree = ""; }; + 8CBD3DCC2149B9AD0070C963 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 8CBD3DCF2149B9AD0070C963 /* Earthquake_Network.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Earthquake_Network.xcdatamodel; sourceTree = ""; }; + 8CBD3DD12149B9AD0070C963 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 8CBD3DD42149B9AD0070C963 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 8CBD3DD72149B9AD0070C963 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 8CBD3DDE2149BA300070C963 /* Earthquake Network.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "Earthquake Network.entitlements"; sourceTree = ""; }; + 8CC1B158217CB09100F22178 /* DettagliMappaViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DettagliMappaViewController.h; sourceTree = ""; }; + 8CC1B159217CB09100F22178 /* DettagliMappaViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DettagliMappaViewController.m; sourceTree = ""; }; + 8CC2B44E214AC7F8002ED1B2 /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; }; + 8CCE164221E67F1300173CD9 /* EQNImpostazioniNotifiche.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNImpostazioniNotifiche.h; sourceTree = ""; }; + 8CCE164321E67F1300173CD9 /* EQNImpostazioniNotifiche.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNImpostazioniNotifiche.m; sourceTree = ""; }; + 8CCE164621E69AEC00173CD9 /* TempoRealeTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TempoRealeTableViewController.h; sourceTree = ""; }; + 8CCE164721E69AEC00173CD9 /* TempoRealeTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TempoRealeTableViewController.m; sourceTree = ""; }; + 8CCE164921E7BAB200173CD9 /* EQNNotificheTempoReale.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNNotificheTempoReale.h; sourceTree = ""; }; + 8CCE164A21E7BAB200173CD9 /* EQNNotificheTempoReale.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNNotificheTempoReale.m; sourceTree = ""; }; + 8CCE164C21E7BACE00173CD9 /* EQNNotificheSegnalazioniUtente.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNNotificheSegnalazioniUtente.h; sourceTree = ""; }; + 8CCE164D21E7BACE00173CD9 /* EQNNotificheSegnalazioniUtente.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNNotificheSegnalazioniUtente.m; sourceTree = ""; }; + 8CCE164F21E7BAEC00173CD9 /* EQNNotificeReteSismiche.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNNotificeReteSismiche.h; sourceTree = ""; }; + 8CCE165021E7BAEC00173CD9 /* EQNNotificeReteSismiche.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNNotificeReteSismiche.m; sourceTree = ""; }; + 8CCE165321EA378800173CD9 /* SegnalazioniUtentiTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SegnalazioniUtentiTableViewController.h; sourceTree = ""; }; + 8CCE165421EA378800173CD9 /* SegnalazioniUtentiTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SegnalazioniUtentiTableViewController.m; sourceTree = ""; }; + 8CCE165621EB1E0000173CD9 /* RetiSismicheTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RetiSismicheTableViewController.h; sourceTree = ""; }; + 8CCE165721EB1E0000173CD9 /* RetiSismicheTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RetiSismicheTableViewController.m; sourceTree = ""; }; + 8CCE165921EB7AD800173CD9 /* ListaEntiTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ListaEntiTableViewController.h; sourceTree = ""; }; + 8CCE165A21EB7AD800173CD9 /* ListaEntiTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ListaEntiTableViewController.m; sourceTree = ""; }; + 8CCE165C21EB9F2400173CD9 /* NotificheTsunamiTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NotificheTsunamiTableViewController.h; sourceTree = ""; }; + 8CCE165D21EB9F2400173CD9 /* NotificheTsunamiTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NotificheTsunamiTableViewController.m; sourceTree = ""; }; + 8CCE165F21EBA37500173CD9 /* EQNNotificheTsunami.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNNotificheTsunami.h; sourceTree = ""; }; + 8CCE166021EBA37500173CD9 /* EQNNotificheTsunami.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNNotificheTsunami.m; sourceTree = ""; }; + 8CCE166221EBEFBD00173CD9 /* MessaggioInformativoTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessaggioInformativoTableViewController.h; sourceTree = ""; }; + 8CCE166321EBEFBD00173CD9 /* MessaggioInformativoTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MessaggioInformativoTableViewController.m; sourceTree = ""; }; + 8CD0862C218A41930000CB5E /* CellDettagliMappaTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CellDettagliMappaTableViewCell.h; sourceTree = ""; }; + 8CD0862D218A41930000CB5E /* CellDettagliMappaTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CellDettagliMappaTableViewCell.m; sourceTree = ""; }; + 8CD0862F218ADFCA0000CB5E /* Cell_Reti_sismicheTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Cell_Reti_sismicheTableViewCell.h; sourceTree = ""; }; + 8CD08630218ADFCA0000CB5E /* Cell_Reti_sismicheTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Cell_Reti_sismicheTableViewCell.m; sourceTree = ""; }; + 8CD08633218AF6030000CB5E /* Cell_Meteo_TableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Cell_Meteo_TableViewCell.h; sourceTree = ""; }; + 8CD08634218AF6030000CB5E /* Cell_Meteo_TableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Cell_Meteo_TableViewCell.m; sourceTree = ""; }; + 8CD08636218B3BEE0000CB5E /* ReteSismicaAnnotation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ReteSismicaAnnotation.h; sourceTree = ""; }; + 8CD08637218B3BEE0000CB5E /* ReteSismicaAnnotation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ReteSismicaAnnotation.m; sourceTree = ""; }; + 8CEAE3D22211482E00AF948F /* InformazioniViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InformazioniViewController.h; sourceTree = ""; }; + 8CEAE3D32211482E00AF948F /* InformazioniViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InformazioniViewController.m; sourceTree = ""; }; + 8CEAE3D522114D1600AF948F /* info.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = info.txt; sourceTree = ""; }; + 8CEAE3D622114D1600AF948F /* privacy.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = privacy.txt; sourceTree = ""; }; + 8CEAE3D722114D1700AF948F /* author.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = author.txt; sourceTree = ""; }; + 8CEAE3D822114D1700AF948F /* faq.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = faq.txt; sourceTree = ""; }; + 8CEAE3D922114D1700AF948F /* disclaimer.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = disclaimer.txt; sourceTree = ""; }; + 8CEAE3DF221214F700AF948F /* AcquistiProViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AcquistiProViewController.swift; sourceTree = ""; }; + 8CEAE4D72163E23D001A42B9 /* SWRevealViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SWRevealViewController.h; sourceTree = ""; }; + 8CEAE4D82163E23D001A42B9 /* SWRevealViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SWRevealViewController.m; sourceTree = ""; }; + 8CECF64A2214A22300E01A6D /* AbbonamentiViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AbbonamentiViewController.swift; sourceTree = ""; }; + 8CF05B4B218C41F90055012B /* PickerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PickerViewController.m; sourceTree = ""; }; + 8CF05B4C218C41F90055012B /* TBDInputViewControllerData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TBDInputViewControllerData.h; sourceTree = ""; }; + 8CF05B4D218C41FA0055012B /* PickerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PickerViewController.h; sourceTree = ""; }; + 8CF05B4E218C41FA0055012B /* TBDInputViewControllerData.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TBDInputViewControllerData.xib; sourceTree = ""; }; + 8CF05B4F218C41FA0055012B /* PickerViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PickerViewController.xib; sourceTree = ""; }; + 8CF05B50218C41FB0055012B /* TBDInputViewControllerData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TBDInputViewControllerData.m; sourceTree = ""; }; + 8CF05B55218C93BA0055012B /* EQNUtility.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNUtility.h; sourceTree = ""; }; + 8CF05B56218C93BA0055012B /* EQNUtility.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNUtility.m; sourceTree = ""; }; + 8CF12CC721DE43A400613AC5 /* alert_star_trek.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = alert_star_trek.wav; sourceTree = ""; }; + 8CF12CD121DE49B600613AC5 /* EQNNotificationContent.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = EQNNotificationContent.appex; sourceTree = BUILT_PRODUCTS_DIR; }; + 8CF12CD221DE49B600613AC5 /* UserNotifications.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UserNotifications.framework; path = System/Library/Frameworks/UserNotifications.framework; sourceTree = SDKROOT; }; + 8CF12CD421DE49B600613AC5 /* UserNotificationsUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UserNotificationsUI.framework; path = System/Library/Frameworks/UserNotificationsUI.framework; sourceTree = SDKROOT; }; + 8CF12CD721DE49B600613AC5 /* NotificationViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NotificationViewController.h; sourceTree = ""; }; + 8CF12CD821DE49B600613AC5 /* NotificationViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NotificationViewController.m; sourceTree = ""; }; + 8CF12CDB21DE49B600613AC5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainInterface.storyboard; sourceTree = ""; }; + 8CF12CDD21DE49B600613AC5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 8CF4F4D0216D2C780057110B /* EQNReteSmartphone.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNReteSmartphone.h; sourceTree = ""; }; + 8CF4F4D1216D2C780057110B /* EQNReteSmartphone.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNReteSmartphone.m; sourceTree = ""; }; + 8CF4F4D3216D336B0057110B /* EQNDatoGrafico.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNDatoGrafico.h; sourceTree = ""; }; + 8CF4F4D4216D336B0057110B /* EQNDatoGrafico.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNDatoGrafico.m; sourceTree = ""; }; + 8CF4F4D6216D3A110057110B /* EQNAreaCheck.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNAreaCheck.h; sourceTree = ""; }; + 8CF4F4D7216D3A110057110B /* EQNAreaCheck.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNAreaCheck.m; sourceTree = ""; }; + 8CF4F4D9216D44930057110B /* EQNPastquakes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNPastquakes.h; sourceTree = ""; }; + 8CF4F4DA216D44930057110B /* EQNPastquakes.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNPastquakes.m; sourceTree = ""; }; + 8CF4F4DC2175352E0057110B /* WaitViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WaitViewController.h; sourceTree = ""; }; + 8CF4F4DD2175352E0057110B /* WaitViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WaitViewController.m; sourceTree = ""; }; + 8CF6604D214C0E58009F4314 /* EQNCalibrazione.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNCalibrazione.h; sourceTree = ""; }; + 8CF6604E214C0E58009F4314 /* EQNCalibrazione.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNCalibrazione.m; sourceTree = ""; }; + 8CF66050214C0F7F009F4314 /* Costanti.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Costanti.h; sourceTree = ""; }; + 8CF66051214C12DC009F4314 /* EQNMath.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNMath.h; sourceTree = ""; }; + 8CF66052214C12DC009F4314 /* EQNMath.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNMath.m; sourceTree = ""; }; + 8CF66054214C566A009F4314 /* Reachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Reachability.h; sourceTree = ""; }; + 8CF66055214C566A009F4314 /* ServerRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ServerRequest.m; sourceTree = ""; }; + 8CF66056214C566A009F4314 /* Reachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Reachability.m; sourceTree = ""; }; + 8CF66057214C566B009F4314 /* ServerRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ServerRequest.h; sourceTree = ""; }; + 8CFA631E2197F9C10099EB0E /* TsunamiViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TsunamiViewController.h; sourceTree = ""; }; + 8CFA631F2197F9C10099EB0E /* TsunamiViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TsunamiViewController.m; sourceTree = ""; }; + 8CFA6321219A2C610099EB0E /* Tsunami.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Tsunami.h; sourceTree = ""; }; + 8CFA6322219A2C610099EB0E /* Tsunami.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tsunami.m; sourceTree = ""; }; + 8CFA6324219A41590099EB0E /* DettagliTsunamiViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DettagliTsunamiViewController.h; sourceTree = ""; }; + 8CFA6325219A41590099EB0E /* DettagliTsunamiViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DettagliTsunamiViewController.m; sourceTree = ""; }; + C4FB0D7EEA34F8222369E1BB /* Pods-Earthquake Network.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Earthquake Network.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Earthquake Network/Pods-Earthquake Network.debug.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8C4B0B7721CACE3F00AED489 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8C483C9B21FA665C00259FD2 /* EQNAllertaSismica.h in Frameworks */, + 8C483C9C21FA665C00259FD2 /* EQNAllertaSismica.m in Frameworks */, + 8C483C9721FA662900259FD2 /* alert_star_trek.wav in Frameworks */, + 8C465D9B21F653CA00F04673 /* Assets.xcassets in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8CBD3DBF2149B9AD0070C963 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8C5EA22D21763103002DC156 /* MapKit.framework in Frameworks */, + 8CC2B44F214AC7F8002ED1B2 /* CoreMotion.framework in Frameworks */, + 4AF6047375F3EA53A42B2380 /* libPods-Earthquake Network.a in Frameworks */, + 8C483CAE21FDA53B00259FD2 /* StoreKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8CF12CCE21DE49B600613AC5 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8C7CD64921F7D11700835812 /* ReteSismicaAnnotation.m in Frameworks */, + 8C7CD64A21F7D11700835812 /* ReteSismicaAnnotation.h in Frameworks */, + 8C465D9C21F7BBE700F04673 /* PastquakesAnnotation.m in Frameworks */, + 8C465D9D21F7BBE700F04673 /* PastquakesAnnotation.h in Frameworks */, + 8C465D9A21F653AB00F04673 /* Assets.xcassets in Frameworks */, + 8CF12CD521DE49B600613AC5 /* UserNotificationsUI.framework in Frameworks */, + 8CF12CD321DE49B600613AC5 /* UserNotifications.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 8C465D9821F6539700F04673 /* Products */ = { + isa = PBXGroup; + children = ( + ); + name = Products; + sourceTree = ""; + }; + 8C483CAF21FDA7DA00259FD2 /* Acquisti in App */ = { + isa = PBXGroup; + children = ( + 8CEAE3D722114D1700AF948F /* author.txt */, + 8CEAE3D922114D1700AF948F /* disclaimer.txt */, + 8CEAE3D822114D1700AF948F /* faq.txt */, + 8CEAE3D522114D1600AF948F /* info.txt */, + 8CEAE3D622114D1600AF948F /* privacy.txt */, + 8C483CB721FDACD300259FD2 /* IAPHelper.swift */, + 8C483CBB21FDACE500259FD2 /* VersioneProProducts.swift */, + 8C483CBF21FDACEE00259FD2 /* DetailViewController.swift */, + 8C483CC321FDACF400259FD2 /* ProductCell.swift */, + 8C483CCC21FDB52500259FD2 /* MasterViewController1.swift */, + 8C483CB021FDA8C700259FD2 /* Earthquake Network-Bridging-Header.h */, + 8C483CB521FDACD100259FD2 /* EQNNotificationService-Bridging-Header.h */, + 8C483CB621FDACD100259FD2 /* EQNNotificationContent-Bridging-Header.h */, + 8CEAE3DF221214F700AF948F /* AcquistiProViewController.swift */, + 8CECF64A2214A22300E01A6D /* AbbonamentiViewController.swift */, + 8C29EAFA2258A4DD00FD90A9 /* DettagliAbbonamentoViewController.swift */, + ); + path = "Acquisti in App"; + sourceTree = ""; + }; + 8C4B0B7B21CACE3F00AED489 /* EQNNotificationService */ = { + isa = PBXGroup; + children = ( + 8C4B0B7C21CACE3F00AED489 /* NotificationService.h */, + 8C4B0B7D21CACE3F00AED489 /* NotificationService.m */, + 8C4B0B7F21CACE3F00AED489 /* Info.plist */, + ); + path = EQNNotificationService; + sourceTree = ""; + }; + 8C5EA22E217645C8002DC156 /* ViewController */ = { + isa = PBXGroup; + children = ( + 8CCE164521E69A9300173CD9 /* impostazioniNotifiche */, + 8C602247218D9DBF00C799C2 /* Dettagli mappa */, + 8CF05B4A218C41E60055012B /* inputView */, + 8CD08632218AF5C80000CB5E /* cellTableView */, + 8CEAE4D72163E23D001A42B9 /* SWRevealViewController.h */, + 8CEAE4D82163E23D001A42B9 /* SWRevealViewController.m */, + 8CBD3DC82149B9AD0070C963 /* ReteSmartphone.h */, + 8CBD3DC92149B9AD0070C963 /* ReteSmartphone.m */, + 8CF4F4DC2175352E0057110B /* WaitViewController.h */, + 8CF4F4DD2175352E0057110B /* WaitViewController.m */, + 8C5EA22F21764816002DC156 /* PrioritaViewController.h */, + 8C5EA23021764816002DC156 /* PrioritaViewController.m */, + 8C5EA2322176820B002DC156 /* VersionePROViewController.h */, + 8C5EA2332176820B002DC156 /* VersionePROViewController.m */, + 8C5EA2382177B3ED002DC156 /* MasterViewController.h */, + 8C5EA2392177B3ED002DC156 /* MasterViewController.m */, + 8C5EA23B2177B51C002DC156 /* SegnalazioniViewController.h */, + 8C5EA23C2177B51C002DC156 /* SegnalazioniViewController.m */, + 8CAFD7C62182648600F8BD29 /* EQNRetiSismiViewController.h */, + 8CAFD7C72182648600F8BD29 /* EQNRetiSismiViewController.m */, + 8CABD71F2194B7C700C3E09C /* ImpostazioniViewController.h */, + 8CABD7202194B7C700C3E09C /* ImpostazioniViewController.m */, + 8CFA631E2197F9C10099EB0E /* TsunamiViewController.h */, + 8CFA631F2197F9C10099EB0E /* TsunamiViewController.m */, + 8CFA6324219A41590099EB0E /* DettagliTsunamiViewController.h */, + 8CFA6325219A41590099EB0E /* DettagliTsunamiViewController.m */, + 8CADAA9221B2627D0044E256 /* LogViewController.h */, + 8CADAA9321B2627D0044E256 /* LogViewController.m */, + 8C13E849220B2E7E0009CFE4 /* MenuSelezioneEntiViewController.h */, + 8C13E84A220B2E7E0009CFE4 /* MenuSelezioneEntiViewController.m */, + 8C13E84D220B89360009CFE4 /* ElencoFiltroEntiTableViewController.h */, + 8C13E84E220B89360009CFE4 /* ElencoFiltroEntiTableViewController.m */, + 8CEAE3D22211482E00AF948F /* InformazioniViewController.h */, + 8CEAE3D32211482E00AF948F /* InformazioniViewController.m */, + 8C9B755A2233A25100F8FDEE /* MenuFiltroEntiViewController.h */, + 8C9B755B2233A25100F8FDEE /* MenuFiltroEntiViewController.m */, + ); + path = ViewController; + sourceTree = ""; + }; + 8C602247218D9DBF00C799C2 /* Dettagli mappa */ = { + isa = PBXGroup; + children = ( + 8CC1B158217CB09100F22178 /* DettagliMappaViewController.h */, + 8CC1B159217CB09100F22178 /* DettagliMappaViewController.m */, + 8C602244218D9DB200C799C2 /* PastquakesDettagliMappa.h */, + 8C602245218D9DB200C799C2 /* PastquakesDettagliMappa.m */, + 8C2B250F21938BFD00E0E25E /* SegnalazioniUtenteDettagliMappa.h */, + 8C2B251021938BFD00E0E25E /* SegnalazioniUtenteDettagliMappa.m */, + 8C2B25122193927E00E0E25E /* ReteSismiDettagliMappa.h */, + 8C2B25132193927E00E0E25E /* ReteSismiDettagliMappa.m */, + ); + path = "Dettagli mappa"; + sourceTree = ""; + }; + 8C60224B218EDBF700C799C2 /* annotation */ = { + isa = PBXGroup; + children = ( + 8CD08636218B3BEE0000CB5E /* ReteSismicaAnnotation.h */, + 8CD08637218B3BEE0000CB5E /* ReteSismicaAnnotation.m */, + 8C602248218EDBE200C799C2 /* PastquakesAnnotation.h */, + 8C602249218EDBE200C799C2 /* PastquakesAnnotation.m */, + 8CA46B9F2194532E00C63C16 /* SismaAnnotation.h */, + 8CA46BA02194532E00C63C16 /* SismaAnnotation.m */, + ); + path = annotation; + sourceTree = ""; + }; + 8CBD3DB92149B9AD0070C963 = { + isa = PBXGroup; + children = ( + 8C4DD4FB228237E000AE77ED /* InfoPlist.strings */, + 8CBD3DC42149B9AD0070C963 /* Earthquake Network */, + 8C4B0B7B21CACE3F00AED489 /* EQNNotificationService */, + 8CF12CD621DE49B600613AC5 /* EQNNotificationContent */, + 8CBD3DC32149B9AD0070C963 /* Products */, + 8CC2B44D214AC7F8002ED1B2 /* Frameworks */, + A7982CE92BD5D51B8E2AA92F /* Pods */, + ); + sourceTree = ""; + }; + 8CBD3DC32149B9AD0070C963 /* Products */ = { + isa = PBXGroup; + children = ( + 8CBD3DC22149B9AD0070C963 /* Earthquake Network.app */, + 8C4B0B7A21CACE3F00AED489 /* EQNNotificationService.appex */, + 8CF12CD121DE49B600613AC5 /* EQNNotificationContent.appex */, + ); + name = Products; + sourceTree = ""; + }; + 8CBD3DC42149B9AD0070C963 /* Earthquake Network */ = { + isa = PBXGroup; + children = ( + 8C483CAF21FDA7DA00259FD2 /* Acquisti in App */, + 8C483CA421FBC06D00259FD2 /* alerta_japanese.m4r */, + 8CF12CC721DE43A400613AC5 /* alert_star_trek.wav */, + 8C483CA821FBC1E800259FD2 /* alerta_mexico.m4r */, + 8C5EA22E217645C8002DC156 /* ViewController */, + 8CF66054214C566A009F4314 /* Reachability.h */, + 8CF66056214C566A009F4314 /* Reachability.m */, + 8CF66057214C566B009F4314 /* ServerRequest.h */, + 8CF66055214C566A009F4314 /* ServerRequest.m */, + 8C7A3B65225A5EA40045B266 /* NSDictionary+BVJSONString.h */, + 8C7A3B64225A5EA30045B266 /* NSDictionary+BVJSONString.m */, + 8CF66050214C0F7F009F4314 /* Costanti.h */, + 8CF66049214C09E0009F4314 /* model */, + 8CBD3DDE2149BA300070C963 /* Earthquake Network.entitlements */, + 8CBD3DC52149B9AD0070C963 /* AppDelegate.h */, + 8CBD3DC62149B9AD0070C963 /* AppDelegate.m */, + 8C10B0C42282360900125C9F /* Info.plist */, + 8CBD3DCB2149B9AD0070C963 /* Main.storyboard */, + 8CBD3DD12149B9AD0070C963 /* Assets.xcassets */, + 8CBD3DD32149B9AD0070C963 /* LaunchScreen.storyboard */, + 8C6CBAE421597E79005C426A /* GoogleService-Info.plist */, + 8CBD3DD72149B9AD0070C963 /* main.m */, + 8CBD3DCE2149B9AD0070C963 /* Earthquake_Network.xcdatamodeld */, + 8C10B0BD2281FE7F00125C9F /* Localizable.strings */, + ); + path = "Earthquake Network"; + sourceTree = ""; + }; + 8CC2B44D214AC7F8002ED1B2 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 8C483CAD21FDA53B00259FD2 /* StoreKit.framework */, + 8C465D9721F6539700F04673 /* Earthquake Network.xcodeproj */, + 8C5EA22C21763102002DC156 /* MapKit.framework */, + 8CC2B44E214AC7F8002ED1B2 /* CoreMotion.framework */, + 51164624757711E06B0778D4 /* libPods-Earthquake Network.a */, + 8CF12CD221DE49B600613AC5 /* UserNotifications.framework */, + 8CF12CD421DE49B600613AC5 /* UserNotificationsUI.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 8CCE164521E69A9300173CD9 /* impostazioniNotifiche */ = { + isa = PBXGroup; + children = ( + 8C5C0A6C21E51F3C000B5EFD /* ManuTableViewController.h */, + 8C5C0A6D21E51F3C000B5EFD /* ManuTableViewController.m */, + 8C7E945821E548A600B0B770 /* DettadliMenuTableViewController.h */, + 8C7E945921E548A600B0B770 /* DettadliMenuTableViewController.m */, + 8C149FA121E54E85002C44FD /* NotificheSismiTableViewController.h */, + 8C149FA221E54E85002C44FD /* NotificheSismiTableViewController.m */, + 8CCE164621E69AEC00173CD9 /* TempoRealeTableViewController.h */, + 8CCE164721E69AEC00173CD9 /* TempoRealeTableViewController.m */, + 8CCE165321EA378800173CD9 /* SegnalazioniUtentiTableViewController.h */, + 8CCE165421EA378800173CD9 /* SegnalazioniUtentiTableViewController.m */, + 8CCE165621EB1E0000173CD9 /* RetiSismicheTableViewController.h */, + 8CCE165721EB1E0000173CD9 /* RetiSismicheTableViewController.m */, + 8CCE165921EB7AD800173CD9 /* ListaEntiTableViewController.h */, + 8CCE165A21EB7AD800173CD9 /* ListaEntiTableViewController.m */, + 8CCE165C21EB9F2400173CD9 /* NotificheTsunamiTableViewController.h */, + 8CCE165D21EB9F2400173CD9 /* NotificheTsunamiTableViewController.m */, + 8CCE166221EBEFBD00173CD9 /* MessaggioInformativoTableViewController.h */, + 8CCE166321EBEFBD00173CD9 /* MessaggioInformativoTableViewController.m */, + 8C14112C21ED2FA300A59729 /* AreaInteresseTableViewController.h */, + 8C14112D21ED2FA300A59729 /* AreaInteresseTableViewController.m */, + 8C14112F21ED3E5B00A59729 /* AllertaSismiTableViewController.h */, + 8C14113021ED3E5B00A59729 /* AllertaSismiTableViewController.m */, + ); + path = impostazioniNotifiche; + sourceTree = ""; + }; + 8CCE165221EA370200173CD9 /* impostazioni notifiche */ = { + isa = PBXGroup; + children = ( + 8CCE164221E67F1300173CD9 /* EQNImpostazioniNotifiche.h */, + 8CCE164321E67F1300173CD9 /* EQNImpostazioniNotifiche.m */, + 8CCE164921E7BAB200173CD9 /* EQNNotificheTempoReale.h */, + 8CCE164A21E7BAB200173CD9 /* EQNNotificheTempoReale.m */, + 8CCE164C21E7BACE00173CD9 /* EQNNotificheSegnalazioniUtente.h */, + 8CCE164D21E7BACE00173CD9 /* EQNNotificheSegnalazioniUtente.m */, + 8CCE164F21E7BAEC00173CD9 /* EQNNotificeReteSismiche.h */, + 8CCE165021E7BAEC00173CD9 /* EQNNotificeReteSismiche.m */, + 8CCE165F21EBA37500173CD9 /* EQNNotificheTsunami.h */, + 8CCE166021EBA37500173CD9 /* EQNNotificheTsunami.m */, + 8C14113521EE502800A59729 /* EQNAllertaSismica.h */, + 8C14113621EE502800A59729 /* EQNAllertaSismica.m */, + ); + path = "impostazioni notifiche"; + sourceTree = ""; + }; + 8CD08632218AF5C80000CB5E /* cellTableView */ = { + isa = PBXGroup; + children = ( + 8CD0862F218ADFCA0000CB5E /* Cell_Reti_sismicheTableViewCell.h */, + 8CD08630218ADFCA0000CB5E /* Cell_Reti_sismicheTableViewCell.m */, + 8CD0862C218A41930000CB5E /* CellDettagliMappaTableViewCell.h */, + 8CD0862D218A41930000CB5E /* CellDettagliMappaTableViewCell.m */, + 8CD08633218AF6030000CB5E /* Cell_Meteo_TableViewCell.h */, + 8CD08634218AF6030000CB5E /* Cell_Meteo_TableViewCell.m */, + ); + path = cellTableView; + sourceTree = ""; + }; + 8CF05B4A218C41E60055012B /* inputView */ = { + isa = PBXGroup; + children = ( + 8CF05B4D218C41FA0055012B /* PickerViewController.h */, + 8CF05B4B218C41F90055012B /* PickerViewController.m */, + 8CF05B4F218C41FA0055012B /* PickerViewController.xib */, + 8CF05B4C218C41F90055012B /* TBDInputViewControllerData.h */, + 8CF05B50218C41FB0055012B /* TBDInputViewControllerData.m */, + 8CF05B4E218C41FA0055012B /* TBDInputViewControllerData.xib */, + ); + path = inputView; + sourceTree = ""; + }; + 8CF12CD621DE49B600613AC5 /* EQNNotificationContent */ = { + isa = PBXGroup; + children = ( + 8CF12CD721DE49B600613AC5 /* NotificationViewController.h */, + 8CF12CD821DE49B600613AC5 /* NotificationViewController.m */, + 8CF12CDA21DE49B600613AC5 /* MainInterface.storyboard */, + 8CF12CDD21DE49B600613AC5 /* Info.plist */, + ); + path = EQNNotificationContent; + sourceTree = ""; + }; + 8CF66049214C09E0009F4314 /* model */ = { + isa = PBXGroup; + children = ( + 8CCE165221EA370200173CD9 /* impostazioni notifiche */, + 8C60224B218EDBF700C799C2 /* annotation */, + 8C8EBBA521540039002784BA /* EQNUser.h */, + 8C8EBBA621540039002784BA /* EQNUser.m */, + 8C4E343D215012FA008B0D2A /* EQNManager.h */, + 8C4E343E215012FA008B0D2A /* EQNManager.m */, + 8CF66051214C12DC009F4314 /* EQNMath.h */, + 8CF66052214C12DC009F4314 /* EQNMath.m */, + 8C4E34432152B707008B0D2A /* EQMAccelerometroManager.h */, + 8C4E34442152B707008B0D2A /* EQMAccelerometroManager.m */, + 8CF6604D214C0E58009F4314 /* EQNCalibrazione.h */, + 8CF6604E214C0E58009F4314 /* EQNCalibrazione.m */, + 8C4E34402152B5E8008B0D2A /* EQNRilevamento.h */, + 8C4E34412152B5E8008B0D2A /* EQNRilevamento.m */, + 8C4E34492152EE5B008B0D2A /* EQNGeneratoreURLServer.h */, + 8C4E344A2152EE5B008B0D2A /* EQNGeneratoreURLServer.m */, + 8CF4F4D0216D2C780057110B /* EQNReteSmartphone.h */, + 8CF4F4D1216D2C780057110B /* EQNReteSmartphone.m */, + 8CF4F4D3216D336B0057110B /* EQNDatoGrafico.h */, + 8CF4F4D4216D336B0057110B /* EQNDatoGrafico.m */, + 8CF4F4D6216D3A110057110B /* EQNAreaCheck.h */, + 8CF4F4D7216D3A110057110B /* EQNAreaCheck.m */, + 8CF4F4D9216D44930057110B /* EQNPastquakes.h */, + 8CF4F4DA216D44930057110B /* EQNPastquakes.m */, + 8C593E88217BA2470008B260 /* EQNSegnalazione.h */, + 8C593E89217BA2470008B260 /* EQNSegnalazione.m */, + 8CAFD7C321825E4A00F8BD29 /* EQNSisma.h */, + 8CAFD7C421825E4A00F8BD29 /* EQNSisma.m */, + 8CF05B55218C93BA0055012B /* EQNUtility.h */, + 8CF05B56218C93BA0055012B /* EQNUtility.m */, + 8CFA6321219A2C610099EB0E /* Tsunami.h */, + 8CFA6322219A2C610099EB0E /* Tsunami.m */, + 8C9B755D2233BFDE00F8FDEE /* FiltroEnti.h */, + 8C9B755E2233BFDE00F8FDEE /* FiltroEnti.m */, + ); + path = model; + sourceTree = ""; + }; + A7982CE92BD5D51B8E2AA92F /* Pods */ = { + isa = PBXGroup; + children = ( + C4FB0D7EEA34F8222369E1BB /* Pods-Earthquake Network.debug.xcconfig */, + 40CD2E5581CF2FA3D52F392D /* Pods-Earthquake Network.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8C4B0B7921CACE3F00AED489 /* EQNNotificationService */ = { + isa = PBXNativeTarget; + buildConfigurationList = 8C4B0B8321CACE3F00AED489 /* Build configuration list for PBXNativeTarget "EQNNotificationService" */; + buildPhases = ( + 8C4B0B7621CACE3F00AED489 /* Sources */, + 8C4B0B7721CACE3F00AED489 /* Frameworks */, + 8C4B0B7821CACE3F00AED489 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = EQNNotificationService; + productName = EQNNotificationService; + productReference = 8C4B0B7A21CACE3F00AED489 /* EQNNotificationService.appex */; + productType = "com.apple.product-type.app-extension"; + }; + 8CBD3DC12149B9AD0070C963 /* Earthquake Network */ = { + isa = PBXNativeTarget; + buildConfigurationList = 8CBD3DDB2149B9AD0070C963 /* Build configuration list for PBXNativeTarget "Earthquake Network" */; + buildPhases = ( + 566F2B7433267D7429970520 /* [CP] Check Pods Manifest.lock */, + 8CBD3DBE2149B9AD0070C963 /* Sources */, + 8CBD3DBF2149B9AD0070C963 /* Frameworks */, + 8CBD3DC02149B9AD0070C963 /* Resources */, + 7E813A93FDCDA54E246F0BC7 /* [CP] Copy Pods Resources */, + 8CADAAA521B98C550044E256 /* Embed App Extensions */, + ); + buildRules = ( + ); + dependencies = ( + 8C4B0B8121CACE3F00AED489 /* PBXTargetDependency */, + 8CF12CDF21DE49B600613AC5 /* PBXTargetDependency */, + ); + name = "Earthquake Network"; + productName = "Earthquake Network"; + productReference = 8CBD3DC22149B9AD0070C963 /* Earthquake Network.app */; + productType = "com.apple.product-type.application"; + }; + 8CF12CD021DE49B600613AC5 /* EQNNotificationContent */ = { + isa = PBXNativeTarget; + buildConfigurationList = 8CF12CE121DE49B600613AC5 /* Build configuration list for PBXNativeTarget "EQNNotificationContent" */; + buildPhases = ( + 8CF12CCD21DE49B600613AC5 /* Sources */, + 8CF12CCE21DE49B600613AC5 /* Frameworks */, + 8CF12CCF21DE49B600613AC5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = EQNNotificationContent; + productName = EQNNotificationContent; + productReference = 8CF12CD121DE49B600613AC5 /* EQNNotificationContent.appex */; + productType = "com.apple.product-type.app-extension"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 8CBD3DBA2149B9AD0070C963 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1010; + ORGANIZATIONNAME = "Luca Beretta"; + TargetAttributes = { + 8C4B0B7921CACE3F00AED489 = { + CreatedOnToolsVersion = 9.2; + LastSwiftMigration = 1010; + ProvisioningStyle = Automatic; + }; + 8CBD3DC12149B9AD0070C963 = { + CreatedOnToolsVersion = 9.2; + LastSwiftMigration = 1010; + ProvisioningStyle = Automatic; + SystemCapabilities = { + com.apple.BackgroundModes = { + enabled = 1; + }; + com.apple.InAppPurchase = { + enabled = 1; + }; + com.apple.Push = { + enabled = 1; + }; + }; + }; + 8CF12CD021DE49B600613AC5 = { + CreatedOnToolsVersion = 9.2; + LastSwiftMigration = 1010; + ProvisioningStyle = Automatic; + }; + }; + }; + buildConfigurationList = 8CBD3DBD2149B9AD0070C963 /* Build configuration list for PBXProject "Earthquake Network" */; + compatibilityVersion = "Xcode 8.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + it, + es, + ); + mainGroup = 8CBD3DB92149B9AD0070C963; + productRefGroup = 8CBD3DC32149B9AD0070C963 /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 8C465D9821F6539700F04673 /* Products */; + ProjectRef = 8C465D9721F6539700F04673 /* Earthquake Network.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 8CBD3DC12149B9AD0070C963 /* Earthquake Network */, + 8C4B0B7921CACE3F00AED489 /* EQNNotificationService */, + 8CF12CD021DE49B600613AC5 /* EQNNotificationContent */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8C4B0B7821CACE3F00AED489 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8C483CA621FBC06D00259FD2 /* alerta_japanese.m4r in Resources */, + 8C10B0BA2281FE7F00125C9F /* Localizable.strings in Resources */, + 8C483CAA21FBC1E900259FD2 /* alerta_mexico.m4r in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8CBD3DC02149B9AD0070C963 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8CEAE3DD22114D1800AF948F /* faq.txt in Resources */, + 8C4DD4F9228237E000AE77ED /* InfoPlist.strings in Resources */, + 8CEAE3DE22114D1800AF948F /* disclaimer.txt in Resources */, + 8CF05B52218C41FB0055012B /* TBDInputViewControllerData.xib in Resources */, + 8CEAE3DB22114D1800AF948F /* privacy.txt in Resources */, + 8CF12CCA21DE43A500613AC5 /* alert_star_trek.wav in Resources */, + 8C483CA921FBC1E900259FD2 /* alerta_mexico.m4r in Resources */, + 8CBD3DD52149B9AD0070C963 /* LaunchScreen.storyboard in Resources */, + 8CEAE3DA22114D1800AF948F /* info.txt in Resources */, + 8C483CA521FBC06D00259FD2 /* alerta_japanese.m4r in Resources */, + 8CEAE3DC22114D1800AF948F /* author.txt in Resources */, + 8C10B0B92281FE7F00125C9F /* Localizable.strings in Resources */, + 8C6CBAE521597E79005C426A /* GoogleService-Info.plist in Resources */, + 8CBD3DD22149B9AD0070C963 /* Assets.xcassets in Resources */, + 8CF05B53218C41FB0055012B /* PickerViewController.xib in Resources */, + 8CBD3DCD2149B9AD0070C963 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8CF12CCF21DE49B600613AC5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8CF12CDC21DE49B600613AC5 /* MainInterface.storyboard in Resources */, + 8C10B0BB2281FE7F00125C9F /* Localizable.strings in Resources */, + 8C483CA721FBC06D00259FD2 /* alerta_japanese.m4r in Resources */, + 8C483CAB21FBC1E900259FD2 /* alerta_mexico.m4r in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 566F2B7433267D7429970520 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Earthquake Network-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 7E813A93FDCDA54E246F0BC7 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-Earthquake Network/Pods-Earthquake Network-resources.sh", + "${PODS_ROOT}/GoogleMaps/Maps/Frameworks/GoogleMaps.framework/Resources/GoogleMaps.bundle", + "${PODS_ROOT}/GooglePlaces/Frameworks/GooglePlaces.framework/Resources/GooglePlaces.bundle", + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleMaps.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GooglePlaces.bundle", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Earthquake Network/Pods-Earthquake Network-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8C4B0B7621CACE3F00AED489 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8C483CCE21FDB52500259FD2 /* MasterViewController1.swift in Sources */, + 8C483CB921FDACD300259FD2 /* IAPHelper.swift in Sources */, + 8C483C9D21FA68B300259FD2 /* alert_star_trek.wav in Sources */, + 8C483C9A21FA664000259FD2 /* EQNAllertaSismica.m in Sources */, + 8C483CC121FDACEE00259FD2 /* DetailViewController.swift in Sources */, + 8C483CBD21FDACE500259FD2 /* VersioneProProducts.swift in Sources */, + 8C483CC521FDACF400259FD2 /* ProductCell.swift in Sources */, + 8C4B0B7E21CACE3F00AED489 /* NotificationService.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8CBD3DBE2149B9AD0070C963 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8CF05B54218C41FB0055012B /* TBDInputViewControllerData.m in Sources */, + 8CCE166121EBA37500173CD9 /* EQNNotificheTsunami.m in Sources */, + 8C483CCD21FDB52500259FD2 /* MasterViewController1.swift in Sources */, + 8C5EA23121764816002DC156 /* PrioritaViewController.m in Sources */, + 8CCE165121E7BAEC00173CD9 /* EQNNotificeReteSismiche.m in Sources */, + 8C13E84B220B2E7E0009CFE4 /* MenuSelezioneEntiViewController.m in Sources */, + 8CF4F4DB216D44930057110B /* EQNPastquakes.m in Sources */, + 8CCE165821EB1E0000173CD9 /* RetiSismicheTableViewController.m in Sources */, + 8CCE165521EA378800173CD9 /* SegnalazioniUtentiTableViewController.m in Sources */, + 8C483CC021FDACEE00259FD2 /* DetailViewController.swift in Sources */, + 8CFA6323219A2C610099EB0E /* Tsunami.m in Sources */, + 8CCE164E21E7BACE00173CD9 /* EQNNotificheSegnalazioniUtente.m in Sources */, + 8C4E343F215012FA008B0D2A /* EQNManager.m in Sources */, + 8CCE165E21EB9F2400173CD9 /* NotificheTsunamiTableViewController.m in Sources */, + 8C7E945A21E548A600B0B770 /* DettadliMenuTableViewController.m in Sources */, + 8CABD7212194B7C700C3E09C /* ImpostazioniViewController.m in Sources */, + 8CFA63202197F9C10099EB0E /* TsunamiViewController.m in Sources */, + 8CCE164421E67F1300173CD9 /* EQNImpostazioniNotifiche.m in Sources */, + 8C14113721EE502800A59729 /* EQNAllertaSismica.m in Sources */, + 8CECF64B2214A22300E01A6D /* AbbonamentiViewController.swift in Sources */, + 8C483CC421FDACF400259FD2 /* ProductCell.swift in Sources */, + 8CEAE3D42211482E00AF948F /* InformazioniViewController.m in Sources */, + 8C483CBC21FDACE500259FD2 /* VersioneProProducts.swift in Sources */, + 8C483CB821FDACD300259FD2 /* IAPHelper.swift in Sources */, + 8C4E344B2152EE5B008B0D2A /* EQNGeneratoreURLServer.m in Sources */, + 8CCE164821E69AEC00173CD9 /* TempoRealeTableViewController.m in Sources */, + 8CF4F4D5216D336B0057110B /* EQNDatoGrafico.m in Sources */, + 8CF66058214C566B009F4314 /* ServerRequest.m in Sources */, + 8CD08638218B3BEE0000CB5E /* ReteSismicaAnnotation.m in Sources */, + 8CD0862E218A41930000CB5E /* CellDettagliMappaTableViewCell.m in Sources */, + 8CBD3DD02149B9AD0070C963 /* Earthquake_Network.xcdatamodeld in Sources */, + 8C9B755F2233BFDE00F8FDEE /* FiltroEnti.m in Sources */, + 8CF66059214C566B009F4314 /* Reachability.m in Sources */, + 8C593E8A217BA2470008B260 /* EQNSegnalazione.m in Sources */, + 8C14112E21ED2FA300A59729 /* AreaInteresseTableViewController.m in Sources */, + 8C29EAFB2258A4DD00FD90A9 /* DettagliAbbonamentoViewController.swift in Sources */, + 8CBD3DCA2149B9AD0070C963 /* ReteSmartphone.m in Sources */, + 8C13E84F220B89360009CFE4 /* ElencoFiltroEntiTableViewController.m in Sources */, + 8CFA6326219A41590099EB0E /* DettagliTsunamiViewController.m in Sources */, + 8CAFD7C521825E4A00F8BD29 /* EQNSisma.m in Sources */, + 8CF6604F214C0E58009F4314 /* EQNCalibrazione.m in Sources */, + 8C2B25142193927E00E0E25E /* ReteSismiDettagliMappa.m in Sources */, + 8CF05B51218C41FB0055012B /* PickerViewController.m in Sources */, + 8CF4F4DE2175352E0057110B /* WaitViewController.m in Sources */, + 8CD08635218AF6030000CB5E /* Cell_Meteo_TableViewCell.m in Sources */, + 8C149FA321E54E85002C44FD /* NotificheSismiTableViewController.m in Sources */, + 8CD08631218ADFCA0000CB5E /* Cell_Reti_sismicheTableViewCell.m in Sources */, + 8C2B251121938BFD00E0E25E /* SegnalazioniUtenteDettagliMappa.m in Sources */, + 8C5EA23A2177B3ED002DC156 /* MasterViewController.m in Sources */, + 8C14113121ED3E5B00A59729 /* AllertaSismiTableViewController.m in Sources */, + 8CCE164B21E7BAB200173CD9 /* EQNNotificheTempoReale.m in Sources */, + 8CEAE4D92163E23E001A42B9 /* SWRevealViewController.m in Sources */, + 8CF4F4D2216D2C780057110B /* EQNReteSmartphone.m in Sources */, + 8CBD3DD82149B9AD0070C963 /* main.m in Sources */, + 8CF05B57218C93BA0055012B /* EQNUtility.m in Sources */, + 8C4E34422152B5E8008B0D2A /* EQNRilevamento.m in Sources */, + 8C7A3B66225A5EA40045B266 /* NSDictionary+BVJSONString.m in Sources */, + 8CF66053214C12DC009F4314 /* EQNMath.m in Sources */, + 8C60224A218EDBE200C799C2 /* PastquakesAnnotation.m in Sources */, + 8C5EA2342176820B002DC156 /* VersionePROViewController.m in Sources */, + 8CC1B15A217CB09100F22178 /* DettagliMappaViewController.m in Sources */, + 8C5EA23D2177B51C002DC156 /* SegnalazioniViewController.m in Sources */, + 8CF4F4D8216D3A110057110B /* EQNAreaCheck.m in Sources */, + 8C4E34452152B707008B0D2A /* EQMAccelerometroManager.m in Sources */, + 8C9B755C2233A25100F8FDEE /* MenuFiltroEntiViewController.m in Sources */, + 8CBD3DC72149B9AD0070C963 /* AppDelegate.m in Sources */, + 8CCE165B21EB7AD800173CD9 /* ListaEntiTableViewController.m in Sources */, + 8CA46BA12194532E00C63C16 /* SismaAnnotation.m in Sources */, + 8C602246218D9DB200C799C2 /* PastquakesDettagliMappa.m in Sources */, + 8CAFD7C82182648600F8BD29 /* EQNRetiSismiViewController.m in Sources */, + 8CEAE3E0221214F700AF948F /* AcquistiProViewController.swift in Sources */, + 8C8EBBA721540039002784BA /* EQNUser.m in Sources */, + 8CADAA9421B2627D0044E256 /* LogViewController.m in Sources */, + 8CCE166421EBEFBD00173CD9 /* MessaggioInformativoTableViewController.m in Sources */, + 8C5C0A6E21E51F3C000B5EFD /* ManuTableViewController.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8CF12CCD21DE49B600613AC5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8C7CD64821F7D0F800835812 /* ReteSismicaAnnotation.m in Sources */, + 8C465D9F21F7BE0600F04673 /* Assets.xcassets in Sources */, + 8C465D9E21F7BD8700F04673 /* PastquakesAnnotation.m in Sources */, + 8C483CBA21FDACD300259FD2 /* IAPHelper.swift in Sources */, + 8C483CBE21FDACE500259FD2 /* VersioneProProducts.swift in Sources */, + 8C483CCF21FDB52500259FD2 /* MasterViewController1.swift in Sources */, + 8C483CC621FDACF400259FD2 /* ProductCell.swift in Sources */, + 8CF12CD921DE49B600613AC5 /* NotificationViewController.m in Sources */, + 8C483CC221FDACEE00259FD2 /* DetailViewController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 8C4B0B8121CACE3F00AED489 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 8C4B0B7921CACE3F00AED489 /* EQNNotificationService */; + targetProxy = 8C4B0B8021CACE3F00AED489 /* PBXContainerItemProxy */; + }; + 8CF12CDF21DE49B600613AC5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 8CF12CD021DE49B600613AC5 /* EQNNotificationContent */; + targetProxy = 8CF12CDE21DE49B600613AC5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 8C10B0BD2281FE7F00125C9F /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 8C10B0BC2281FE7F00125C9F /* it */, + 8C10B0BE2281FE9E00125C9F /* en */, + 8C10B0BF2281FEA000125C9F /* es */, + ); + name = Localizable.strings; + sourceTree = ""; + }; + 8C4DD4FB228237E000AE77ED /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 8C4DD4FA228237E000AE77ED /* en */, + 8C4DD4FC228237E200AE77ED /* it */, + 8C4DD4FD228237E400AE77ED /* es */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 8CBD3DCB2149B9AD0070C963 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 8CBD3DCC2149B9AD0070C963 /* Base */, + 8C10B0AF2281FBE800125C9F /* it */, + 8C10B0B22281FD6900125C9F /* es */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 8CBD3DD32149B9AD0070C963 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 8CBD3DD42149B9AD0070C963 /* Base */, + 8C10B0B02281FBE800125C9F /* it */, + 8C10B0B32281FD6A00125C9F /* es */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; + 8CF12CDA21DE49B600613AC5 /* MainInterface.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 8CF12CDB21DE49B600613AC5 /* Base */, + 8C10B0B12281FBE800125C9F /* it */, + 8C10B0B42281FD6B00125C9F /* es */, + ); + name = MainInterface.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 8C4B0B8421CACE3F00AED489 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = WJA4MR4CPC; + INFOPLIST_FILE = EQNNotificationService/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 11.2; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.finazzi.distquake.EQNNotificationService; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_OBJC_BRIDGING_HEADER = "Earthquake Network/Acquisti in App/EQNNotificationService-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Debug; + }; + 8C4B0B8521CACE3F00AED489 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = WJA4MR4CPC; + INFOPLIST_FILE = EQNNotificationService/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 11.2; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.finazzi.distquake.EQNNotificationService; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_OBJC_BRIDGING_HEADER = "Earthquake Network/Acquisti in App/EQNNotificationService-Bridging-Header.h"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Release; + }; + 8CBD3DD92149B9AD0070C963 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.2; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 8CBD3DDA2149B9AD0070C963 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.2; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 8CBD3DDC2149B9AD0070C963 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = C4FB0D7EEA34F8222369E1BB /* Pods-Earthquake Network.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = "Earthquake Network/Earthquake Network.entitlements"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = WJA4MR4CPC; + INFOPLIST_FILE = "Earthquake Network/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.finazzi.distquake; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OBJC_BRIDGING_HEADER = "Earthquake Network/Acquisti in App/Earthquake Network-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Debug; + }; + 8CBD3DDD2149B9AD0070C963 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 40CD2E5581CF2FA3D52F392D /* Pods-Earthquake Network.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = "Earthquake Network/Earthquake Network.entitlements"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = WJA4MR4CPC; + INFOPLIST_FILE = "Earthquake Network/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.finazzi.distquake; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OBJC_BRIDGING_HEADER = "Earthquake Network/Acquisti in App/Earthquake Network-Bridging-Header.h"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Release; + }; + 8CF12CE221DE49B600613AC5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = WJA4MR4CPC; + INFOPLIST_FILE = EQNNotificationContent/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 11.2; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.finazzi.distquake.EQNNotificationContent; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_OBJC_BRIDGING_HEADER = "Earthquake Network/Acquisti in App/EQNNotificationContent-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Debug; + }; + 8CF12CE321DE49B600613AC5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = WJA4MR4CPC; + INFOPLIST_FILE = EQNNotificationContent/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 11.2; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.finazzi.distquake.EQNNotificationContent; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_OBJC_BRIDGING_HEADER = "Earthquake Network/Acquisti in App/EQNNotificationContent-Bridging-Header.h"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 8C4B0B8321CACE3F00AED489 /* Build configuration list for PBXNativeTarget "EQNNotificationService" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8C4B0B8421CACE3F00AED489 /* Debug */, + 8C4B0B8521CACE3F00AED489 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 8CBD3DBD2149B9AD0070C963 /* Build configuration list for PBXProject "Earthquake Network" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8CBD3DD92149B9AD0070C963 /* Debug */, + 8CBD3DDA2149B9AD0070C963 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 8CBD3DDB2149B9AD0070C963 /* Build configuration list for PBXNativeTarget "Earthquake Network" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8CBD3DDC2149B9AD0070C963 /* Debug */, + 8CBD3DDD2149B9AD0070C963 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 8CF12CE121DE49B600613AC5 /* Build configuration list for PBXNativeTarget "EQNNotificationContent" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8CF12CE221DE49B600613AC5 /* Debug */, + 8CF12CE321DE49B600613AC5 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCVersionGroup section */ + 8CBD3DCE2149B9AD0070C963 /* Earthquake_Network.xcdatamodeld */ = { + isa = XCVersionGroup; + children = ( + 8CBD3DCF2149B9AD0070C963 /* Earthquake_Network.xcdatamodel */, + ); + currentVersion = 8CBD3DCF2149B9AD0070C963 /* Earthquake_Network.xcdatamodel */; + path = Earthquake_Network.xcdatamodeld; + sourceTree = ""; + versionGroupType = wrapper.xcdatamodel; + }; +/* End XCVersionGroup section */ + }; + rootObject = 8CBD3DBA2149B9AD0070C963 /* Project object */; +} diff --git a/Sources/Earthquake Network.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Sources/Earthquake Network.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..cd91c11 --- /dev/null +++ b/Sources/Earthquake Network.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Sources/Earthquake Network.xcodeproj/project.xcworkspace/xcuserdata/lucaberetta.xcuserdatad/UserInterfaceState.xcuserstate b/Sources/Earthquake Network.xcodeproj/project.xcworkspace/xcuserdata/lucaberetta.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..aedc477 Binary files /dev/null and b/Sources/Earthquake Network.xcodeproj/project.xcworkspace/xcuserdata/lucaberetta.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Sources/Earthquake Network.xcodeproj/xcuserdata/lucaberetta.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Sources/Earthquake Network.xcodeproj/xcuserdata/lucaberetta.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..fe2b454 --- /dev/null +++ b/Sources/Earthquake Network.xcodeproj/xcuserdata/lucaberetta.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,5 @@ + + + diff --git a/Sources/Earthquake Network.xcodeproj/xcuserdata/lucaberetta.xcuserdatad/xcschemes/Earthquake Network.xcscheme b/Sources/Earthquake Network.xcodeproj/xcuserdata/lucaberetta.xcuserdatad/xcschemes/Earthquake Network.xcscheme new file mode 100644 index 0000000..4e322a9 --- /dev/null +++ b/Sources/Earthquake Network.xcodeproj/xcuserdata/lucaberetta.xcuserdatad/xcschemes/Earthquake Network.xcscheme @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sources/Earthquake Network.xcodeproj/xcuserdata/lucaberetta.xcuserdatad/xcschemes/xcschememanagement.plist b/Sources/Earthquake Network.xcodeproj/xcuserdata/lucaberetta.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..258ff1b --- /dev/null +++ b/Sources/Earthquake Network.xcodeproj/xcuserdata/lucaberetta.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,47 @@ + + + + + SchemeUserState + + EQNNotificationContent.xcscheme + + orderHint + 6 + + EQNNotificationContent.xcscheme_^#shared#^_ + + orderHint + 6 + + EQNNotificationService.xcscheme + + orderHint + 5 + + EQNNotificationService.xcscheme_^#shared#^_ + + orderHint + 5 + + Earthquake Network.xcscheme + + orderHint + 0 + + NotificationService.xcscheme + + orderHint + 5 + + + SuppressBuildableAutocreation + + 8CBD3DC12149B9AD0070C963 + + primary + + + + + diff --git a/Sources/Earthquake Network.xcworkspace/contents.xcworkspacedata b/Sources/Earthquake Network.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..e32c9a5 --- /dev/null +++ b/Sources/Earthquake Network.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Sources/Earthquake Network.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Sources/Earthquake Network.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Sources/Earthquake Network.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Sources/Earthquake Network.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Sources/Earthquake Network.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/Sources/Earthquake Network.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,5 @@ + + + + + diff --git a/Sources/Earthquake Network.xcworkspace/xcuserdata/lucaberetta.xcuserdatad/UserInterfaceState.xcuserstate b/Sources/Earthquake Network.xcworkspace/xcuserdata/lucaberetta.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..a915eac Binary files /dev/null and b/Sources/Earthquake Network.xcworkspace/xcuserdata/lucaberetta.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Sources/Earthquake Network.xcworkspace/xcuserdata/lucaberetta.xcuserdatad/WorkspaceSettings.xcsettings b/Sources/Earthquake Network.xcworkspace/xcuserdata/lucaberetta.xcuserdatad/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f25782d --- /dev/null +++ b/Sources/Earthquake Network.xcworkspace/xcuserdata/lucaberetta.xcuserdatad/WorkspaceSettings.xcsettings @@ -0,0 +1,18 @@ + + + + + BuildLocationStyle + UseAppPreferences + CustomBuildLocationType + RelativeToDerivedData + DerivedDataLocationStyle + Default + EnabledFullIndexStoreVisibility + + IssueFilterStyle + ShowActiveSchemeOnly + LiveSourceIssuesEnabled + + + diff --git a/Sources/Earthquake Network.xcworkspace/xcuserdata/lucaberetta.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Sources/Earthquake Network.xcworkspace/xcuserdata/lucaberetta.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..92c17ec --- /dev/null +++ b/Sources/Earthquake Network.xcworkspace/xcuserdata/lucaberetta.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sources/Earthquake Network/Acquisti in App/AbbonamentiViewController.swift b/Sources/Earthquake Network/Acquisti in App/AbbonamentiViewController.swift new file mode 100644 index 0000000..f3fdd27 --- /dev/null +++ b/Sources/Earthquake Network/Acquisti in App/AbbonamentiViewController.swift @@ -0,0 +1,339 @@ +// +// AbbonamentiViewController.swift +// Earthquake Network +// +// Created by Luca Beretta on 13/02/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +import UIKit +import StoreKit + +class AbbonamentiViewController: UIViewController, UITableViewDataSource, UITableViewDelegate { + + @IBOutlet weak var actionView: UIActivityIndicatorView! + @IBOutlet weak var tableView: UITableView! + + @IBOutlet weak var tiolo: UILabel! + @IBOutlet weak var dettaglioAcquisto: UITextView! + + @IBOutlet weak var immagine: UIImageView! + @IBOutlet weak var descrizione: UILabel! + // var products: [SKProduct] = [] + var productsMensile: [SKProduct] = [] + var productsAnnuale: [SKProduct] = [] + var anProdotto: SKProduct! + var isAcquisto = false + override func viewDidLoad() { + super.viewDidLoad() + + let restoreButton = UIBarButtonItem(title: "Restore", + style: .plain, + target: self, + action: #selector(MasterViewController1.restoreTapped(_:))) + navigationItem.rightBarButtonItem = restoreButton + + NotificationCenter.default.addObserver(self, selector: #selector(handlePurchaseNotification(_:)), + name: .IAPHelperPurchaseNotification, + object: nil) + + NotificationCenter.default.addObserver(self, selector: #selector(fail(_:)), + name: .IAPHelperPurchaseNotificationFail, + object: nil) + // Do any additional setup after loading the view. + } + override func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) + + reload() + } + + func aggirnaView(){ + + if self.isAcquisto { + + self.immagine.isHidden = false + self.tableView.isHidden = true + self.tiolo.textColor = UIColor.black + self.dettaglioAcquisto.isHidden = false + + if let prodotto = anProdotto{ + + if VersioneProProducts.store.isProductPurchased(prodotto.productIdentifier) { + + + descrizione.isHidden = true + switch prodotto.productIdentifier{ + + case "com.finazzi.distquake.Abbonamento10k.annualeAutomatico", "com.finazzi.distquake.Abbonamento10k.annualeAutomaticoScontato": + + immagine.image = UIImage.init(named: "top_10k") + self.descrizione.text = NSLocalizedString("Sei abbonato: priorità 10000 persone, rinnovo annuale ", comment: "") + + + break + case "com.finazzi.distquake.Abbonamento10k.mensileAutomatico" : + + immagine.image = UIImage.init(named: "top_10k") + self.tiolo.text = NSLocalizedString("Sei abbonato: priorità 10000 persone, rinnovo mensile ", comment: "") + + break + + case "com.finazzi.distquake.Abbonamento100k.annualeAutomatico", + "com.finazzi.distquake.Abbonamento100k.annualeAutomaticoscontato": + + immagine.image = UIImage.init(named: "top_100k") + self.tiolo.text = NSLocalizedString("Sei abbonato: priorità 100000 persone, rinnovo annuale ", comment: "") + + + break + case "com.finazzi.distquake.Abbonamento100k.mensileAutomatico" : + + immagine.image = UIImage.init(named: "top_100k") + self.tiolo.text = NSLocalizedString("Sei abbonato: priorità 100000 persone, rinnovo mensile ", comment: "") + + + break + + default: + + break + + } + + self.dettaglioAcquisto.text = NSLocalizedString("• L'abbonamento si rinnova automaticamente a meno che il rinnovo automatico non venga disattivato almeno 24 ore prima della fine del periodo corrente\n\n• L'abbonamento verrà addebitato per il rinnovo entro 24 ore prima della fine del periodo corrente e identificato il costo del rinnovo\n\n• Le sottoscrizioni possono essere gestite dall'utente e il rinnovo automatico può essere disattivato accedendo alle Impostazioni account dell'utente dopo l'acquisto.\n\n", comment: "") + + } + + } else { + + self.immagine.isHidden = true + self.tableView.isHidden = false + self.tiolo.textColor = UIColor.red + self.tiolo.text = NSLocalizedString("Nessuna sottoscrizione attiva. Nella lista delle persone da allertare ", comment: "") + self.descrizione.isHidden = false + self.dettaglioAcquisto.isHidden = true + + } + } + + } + + @objc func reload() { + productsMensile = [] + productsAnnuale = [] + + tableView.reloadData() + VersioneProProducts.store.requestProducts{ [weak self] success, products in + guard let self = self else { return } + if success { + for prodoct in products!{ + + if VersioneProProducts.store.isProductPurchased(prodoct.productIdentifier) { + + self.isAcquisto = true + self.anProdotto = prodoct + self.aggirnaView() + + }else{ + if self.checkDiscount() { + + if prodoct.productIdentifier == "com.finazzi.distquake.Abbonamento10k.mensileAutomatico" || + prodoct.productIdentifier == "com.finazzi.distquake.Abbonamento100k.mensileAutomatico" { + self.productsMensile.append(prodoct) + + } else if prodoct.productIdentifier == "com.finazzi.distquake.Abbonamento10k.annualeAutomaticoScontato" || + prodoct.productIdentifier == "com.finazzi.distquake.Abbonamento100k.annualeAutomaticoscontato" + + { + + self.productsAnnuale.append(prodoct) + + } + }else{ + + if prodoct.productIdentifier == "com.finazzi.distquake.Abbonamento10k.mensileAutomatico" || + prodoct.productIdentifier == "com.finazzi.distquake.Abbonamento100k.mensileAutomatico"{ + self.productsMensile.append(prodoct) + + } + else if + prodoct.productIdentifier == "com.finazzi.distquake.Abbonamento10k.annualeAutomatico" || + prodoct.productIdentifier == "com.finazzi.distquake.Abbonamento100k.annualeAutomatico" + { + + self.productsAnnuale.append(prodoct) + + } + + } + + } + } + + self.actionView.stopAnimating() + self.tableView.reloadData() + } + + } + } + + @objc func restoreTapped(_ sender: AnyObject) { + + self.actionView.startAnimating() + + VersioneProProducts.store.restorePurchases() + } + + @objc func fail(_ notification: Notification){ + + self.actionView.stopAnimating() + + } + + @objc func handlePurchaseNotification(_ notification: Notification) { + + /*guard + let productID = notification.object as? String, + let index = products.index(where: { product -> Bool in + product.productIdentifier == productID + + }) + else { return }*/ + + reload() + + // tableView.reloadRows(at: [IndexPath(row: index, section: 0)], with: .fade) + self.tableView.reloadData() + + } + + func checkDiscount() -> Bool { + + var minute = 0; + let i = UserDefaults.standard.integer(forKey:CONTEGGIO_APERTURE_PER_SCONTO) + if let date = UserDefaults.standard.object(forKey:DATA_APERTURE_PER_SCONTO){ + + minute = EQNUtility.getDifferenceMinute(date as? Date) + } + if (i >= 15 && minute <= TEMPO_APERTURE_PER_SCONTO){ + return true + } + else{ + return false; + } + + } + + + + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + // Get the new view controller using segue.destination. + // Pass the selected object to the new view controller. + if segue.identifier == "dettagliAbbonamento"{ + + let prodotto = sender as! SKProduct + + let dettagli = segue.destination as! DettagliAbbonamentoViewController + dettagli.prodotto = prodotto + + } + } + + +} + +// MARK: - UITableViewDataSource + +extension AbbonamentiViewController { + + func numberOfSections(in tableView: UITableView) -> Int { + + return 2 + } + + + func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView?{ + + let headerView = tableView.dequeueReusableCell(withIdentifier: "sessione") + let titolo = headerView?.viewWithTag(1) as! UILabel + if section == 0 { + + titolo.text = NSLocalizedString("Abbonamenti mensili", comment: "") + } else { + + titolo.text = NSLocalizedString("Abbonamenti annuali", comment: "") + } + return headerView + } + func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat{ + + return 44 + } + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + + if section == 0{ + return productsMensile.count + } + + return productsAnnuale.count + + } + + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + + return 174 + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + + switch indexPath.section { + case 0: + let product = productsMensile[indexPath.row] + let cell = tableView.dequeueReusableCell(withIdentifier: "servizioPriorità", for: indexPath) as! ProductCell + + cell.product = product + cell.buyButtonHandler = { product in + VersioneProProducts.store.buyProduct(product) + } + + return cell + + default: + + let product = productsAnnuale[indexPath.row] + + let cell = tableView.dequeueReusableCell(withIdentifier: "servizioPriorità", for: indexPath) as! ProductCell + + cell.product = product + cell.buyButtonHandler = { product in + VersioneProProducts.store.buyProduct(product) + } + + return cell + } + + + } + + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + + var anProdotto : SKProduct! + + switch indexPath.section { + case 0: + anProdotto = self.productsMensile[indexPath.row] + default: + anProdotto = self.productsAnnuale[indexPath.row] + + } + performSegue(withIdentifier: "dettagliAbbonamento", sender: anProdotto) + } +} + + + diff --git a/Sources/Earthquake Network/Acquisti in App/AcquistiProViewController.swift b/Sources/Earthquake Network/Acquisti in App/AcquistiProViewController.swift new file mode 100644 index 0000000..4b21bcb --- /dev/null +++ b/Sources/Earthquake Network/Acquisti in App/AcquistiProViewController.swift @@ -0,0 +1,164 @@ +// +// AcquistiProViewController.swift +// Earthquake Network +// +// Created by Luca Beretta on 11/02/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +import UIKit + +class AcquistiProViewController: UIViewController { + + @IBOutlet weak var prezzolabel: UILabel! + @IBOutlet weak var descrizioneOfferta: UITextView! + @IBOutlet weak var titoloSconto: UILabel! + @IBOutlet weak var pulsanteAcquista: UIButton! + + var restorClicked = false + + var products: [SKProduct] = [] + var prodotto = SKProduct.init() + + override func viewDidLoad() { + super.viewDidLoad() + + + // Do any additional setup after loading the view. + let viewNavigationBar = UIView.init(frame:CGRect(x: -18, y: 5, width: 150, height:44)) + let imageLogo = UIImageView.init(frame:CGRect(x:-18,y: 5,width: 38,height: 38)) + + imageLogo.image = UIImage(named:"distquake_app_wave") + viewNavigationBar.addSubview(imageLogo) + + let textForNavi = UILabel.init(frame:CGRect(x: 25, y: 5, width: 160, height:38)) + textForNavi.text = NSLocalizedString("Rilevatore Terremoti", comment: "titolo navigation bar") + viewNavigationBar.addSubview(textForNavi) + // self.navigationItem.titleView = viewNavigationBar; + + let restoreButton = UIBarButtonItem(title: "Restore", + style: .plain, + target: self, + action: #selector(AcquistiProViewController.restoreTapped(_:))) + navigationItem.rightBarButtonItem = restoreButton + + NotificationCenter.default.addObserver(self, selector: #selector(handlePurchaseNotification(_:)), + name: .IAPHelperPurchaseNotification, + object: nil) + self.descrizioneOfferta.text = NSLocalizedString("Puoi convertire la tua app nella versione PRO senza doverla scariche dallo store. La versione PRO a notifiche e allerte tramite sintetizazione vocale, la visione in realtà aumentata, l'allerta sui movimenti rilevati dal proprio smartphone e non ha alcuna pubblicità. In più sostieni il progetto di ricerca il quale non sostiene finanziamenti esterni. Grazie per considerare l'acquisto! Alternativamente il passaggio alla versione PRO è GRATUITO sottoscrivendo uno degli abbonamenti annuali della lista di priorità.\n\nPrivacy: http://wp.earthquakenetwork.it/privacy/ \n\nTermini e condizioni: http://wp.earthquakenetwork.it/it/terms-conditions/", comment: "versione pro") + pulsanteAcquista.isEnabled = false + + VersioneProProducts.store.requestProducts{ [weak self] success, products in + guard let self = self else { return } + if success { + self.products = products! + for prodoct in self.products{ + + if self.checkDiscount() { + if prodoct.productIdentifier == "com.finazzi.distquake.ProPrezzoPieno"{ + self.prodotto = prodoct + + } + }else{ + + if prodoct.productIdentifier == "com.finazzi.distquake.VersioneProScontata"{ + self.prodotto = prodoct + + } + + } + + } + + + // self.prezzolabel.text = self.prodotto.price + AcquistiProViewController.priceFormatter.locale = self.prodotto.priceLocale + self.prezzolabel.text = AcquistiProViewController.priceFormatter.string(from: self.prodotto.price) + self.pulsanteAcquista.isEnabled = true + self.titoloSconto.text = NSLocalizedString("Stai acquistando la verisone pro, verrà rimossa la pubblicità", comment: "") + + if UserDefaults.standard.bool(forKey: "com.finazzi.distquake.ProPrezzoPieno") || + UserDefaults.standard.bool(forKey: "com.finazzi.distquake.VersioneProScontata") || + UserDefaults.standard.bool(forKey:"com.finazzi.distquake.Abbonamento10k.annualeAutomatico") || + + UserDefaults.standard.bool(forKey: "com.finazzi.distquake.Abbonamento10k.annualeAutomaticoScontato") || + UserDefaults.standard.bool(forKey: "com.finazzi.distquake.Abbonamento100k.annualeAutomatico") || + UserDefaults.standard.bool(forKey: "com.finazzi.distquake.Abbonamento100k.annualeAutomaticoscontato") { + + self.pulsanteAcquista.isEnabled = false + + self.prezzolabel.text = "" + } + } + } + } + + @objc func handlePurchaseNotification(_ notification: Notification) { + guard + let productID = notification.object as? String, + + let _ = products.index(where: { product -> Bool in + product.productIdentifier == productID + }) + else { return } + + if self.restorClicked { + self.restorClicked = false + let alert = UIAlertController(title: NSLocalizedString("Conferma", comment: "allerta acquisto o restor pro"), message: NSLocalizedString("Hai ripristinato il prodotto da te acquistato", comment: "allerta acquisto o restor pro"), preferredStyle: .alert) + alert.addAction(UIAlertAction(title: "OK", style: .default, handler: nil)) + self.present(alert, animated: true) + } + + } + + @objc func restoreTapped(_ sender: AnyObject) { + self.restorClicked = true + VersioneProProducts.store.restorePurchases() + } + + func checkDiscount() -> Bool { + + var minute = 0; + let i = UserDefaults.standard.integer(forKey:CONTEGGIO_APERTURE_PER_SCONTO) + if let date = UserDefaults.standard.object(forKey:DATA_APERTURE_PER_SCONTO){ + + minute = EQNUtility.getDifferenceMinute(date as? Date) + } + if (i >= 15 && minute <= TEMPO_APERTURE_PER_SCONTO){ + return true + } + else{ + return false; + } + + } + + static let priceFormatter: NumberFormatter = { + let formatter = NumberFormatter() + + formatter.formatterBehavior = .behavior10_4 + formatter.numberStyle = .currency + + return formatter + }() + + + // VersioneProProducts.store.buyProduct(product) + + @IBAction func acquistaProdotto(_ sender: Any) { + + VersioneProProducts.store.buyProduct(prodotto) + } + + + /* + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + // Get the new view controller using segue.destination. + // Pass the selected object to the new view controller. + } + */ + +} diff --git a/Sources/Earthquake Network/Acquisti in App/DetailViewController.swift b/Sources/Earthquake Network/Acquisti in App/DetailViewController.swift new file mode 100644 index 0000000..38e91ab --- /dev/null +++ b/Sources/Earthquake Network/Acquisti in App/DetailViewController.swift @@ -0,0 +1,50 @@ +/// Copyright (c) 2018 Razeware LLC +/// +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// Notwithstanding the foregoing, you may not use, copy, modify, merge, publish, +/// distribute, sublicense, create a derivative work, and/or sell copies of the +/// Software in any work that is designed, intended, or marketed for pedagogical or +/// instructional purposes related to programming, coding, application development, +/// or information technology. Permission for such use, copying, modification, +/// merger, publication, distribution, sublicensing, creation of derivative works, +/// or sale is expressly withheld. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. + +import UIKit + +class DetailViewController: UIViewController { + + @IBOutlet weak var imageView: UIImageView? + + var image: UIImage? { + didSet { + configureView() + } + } + + override func viewDidLoad() { + super.viewDidLoad() + + configureView() + } + + func configureView() { + imageView?.image = image + } +} diff --git a/Sources/Earthquake Network/Acquisti in App/DettagliAbbonamentoViewController.swift b/Sources/Earthquake Network/Acquisti in App/DettagliAbbonamentoViewController.swift new file mode 100644 index 0000000..7cad51f --- /dev/null +++ b/Sources/Earthquake Network/Acquisti in App/DettagliAbbonamentoViewController.swift @@ -0,0 +1,123 @@ +// +// DettagliAbbonamentoViewController.swift +// Earthquake Network +// +// Created by Luca Beretta on 06/04/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +import UIKit + +class DettagliAbbonamentoViewController: UIViewController { + + @IBOutlet weak var immagine: UIImageView! + @IBOutlet weak var titolo: UILabel! + @IBOutlet weak var labelPagamento: UILabel! + @IBOutlet weak var prezzo: UILabel! + @IBOutlet weak var dettagliAcquisto: UILabel! + @IBOutlet weak var linkTextView: UITextView! + @IBOutlet weak var actionView: UIActivityIndicatorView! + @IBOutlet weak var dettagli: UILabel! + public var prodotto: SKProduct! + + @IBAction func sottoscrivi(_ sender: Any) { + + self.actionView.startAnimating() + VersioneProProducts.store.buyProduct(prodotto) + + } + + var buyButtonHandler: ((_ product: SKProduct) -> Void)? + + static let priceFormatter: NumberFormatter = { + let formatter = NumberFormatter() + + formatter.formatterBehavior = .behavior10_4 + formatter.numberStyle = .currency + + return formatter + }() + + override func viewDidLoad() { + super.viewDidLoad() + + self.linkTextView.text = NSLocalizedString("Privacy: http://wp.earthquakenetwork.it/privacy/\n\nTermini e condizioni: http://wp.earthquakenetwork.it/it/terms-conditions/", comment: "") + + // Do any additional setup after loading the view. + var personeAllertate : NSString + + switch prodotto.productIdentifier{ + + case "com.finazzi.distquake.Abbonamento10k.mensileAutomatico": + immagine.image = UIImage.init(named: "top_10k") + titolo.text = NSLocalizedString("Abbonamento mensile, priorità 10000 persone ", comment: "") + labelPagamento.text = self.prodotto.localizedTitle + ",\n" + NSLocalizedString("pagerai al mese:", comment: "") + personeAllertate = NSLocalizedString(" 10000 persone allertate.", comment: "") as NSString + + + break + + case "com.finazzi.distquake.Abbonamento100k.mensileAutomatico" : + + immagine.image = UIImage.init(named: "top_100k") + titolo.text = NSLocalizedString("Abbonamento mensile, priorità 100000 persone ", comment: "") + labelPagamento.text = self.prodotto.localizedTitle + ",\n" + NSLocalizedString("pagerai al mese:", comment: "") + personeAllertate = NSLocalizedString(" 100000 persone allertate.", comment: "") as NSString + + break + + case "com.finazzi.distquake.Abbonamento100k.annualeAutomatico", "com.finazzi.distquake.Abbonamento100k.annualeAutomaticoscontato": + immagine.image = UIImage.init(named: "top_100k") + titolo.text = NSLocalizedString("Abbonamento annuale, priorità 100000 persone ", comment: "") + labelPagamento.text = self.prodotto.localizedTitle + ",\n" + NSLocalizedString("pagerai all'anno:", comment: "") + personeAllertate = NSLocalizedString(" 100000 persone allertate.", comment: "") as NSString + + break + case "com.finazzi.distquake.Abbonamento10k.annualeAutomatico", "com.finazzi.distquake.Abbonamento10k.annualeAutomaticoScontato": + + immagine.image = UIImage.init(named: "top_10k") + titolo.text = NSLocalizedString("Abbonamento annuale, priorità 10000 persone ", comment: "") + labelPagamento.text = self.prodotto.localizedTitle + ",\n" + NSLocalizedString("pagerai all'anno:", comment: "") + personeAllertate = NSLocalizedString(" 10000 persone allertate.", comment: "") as NSString + + break + + default: + personeAllertate = NSLocalizedString(" 10000 persone allertate.", comment: "") as NSString + + break + + } + + DettagliAbbonamentoViewController.priceFormatter.locale = prodotto.priceLocale + prezzo.text = ProductCell.priceFormatter.string(from: prodotto.price)! as String + + dettagli.text = NSLocalizedString("• Il pagamento verrà addebitato sull'account iTunes alla conferma dell'acquisto\n\n• L'abbonamento si rinnova automaticamente a meno che il rinnovo automatico non venga disattivato almeno 24 ore prima della fine del periodo corrente\n\n• L'abbonamento verrà addebitato per il rinnovo entro 24 ore prima della fine del periodo corrente e identificato il costo del rinnovo\n\n• Le sottoscrizioni possono essere gestite dall'utente e il rinnovo automatico può essere disattivato accedendo alle Impostazioni account dell'utente dopo l'acquisto.", comment: "") + + dettagliAcquisto.text = NSLocalizedString("Puoi entrare a fare parte delle liste di priorità prime", comment: "") + (personeAllertate as String) + + NotificationCenter.default.addObserver(self, selector: #selector(handlePurchaseNotification(_:)), + name: .IAPHelperPurchaseNotification, + object: nil) + } + + + /* + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + // Get the new view controller using segue.destination. + // Pass the selected object to the new view controller. + } + */ + + + @objc func handlePurchaseNotification(_ notification: Notification) { + + self.actionView.stopAnimating() + navigationController?.popViewController(animated: true) + + } + +} diff --git a/Sources/Earthquake Network/Acquisti in App/EQNNotificationContent-Bridging-Header.h b/Sources/Earthquake Network/Acquisti in App/EQNNotificationContent-Bridging-Header.h new file mode 100644 index 0000000..1b2cb5d --- /dev/null +++ b/Sources/Earthquake Network/Acquisti in App/EQNNotificationContent-Bridging-Header.h @@ -0,0 +1,4 @@ +// +// Use this file to import your target's public headers that you would like to expose to Swift. +// + diff --git a/Sources/Earthquake Network/Acquisti in App/EQNNotificationService-Bridging-Header.h b/Sources/Earthquake Network/Acquisti in App/EQNNotificationService-Bridging-Header.h new file mode 100644 index 0000000..1b2cb5d --- /dev/null +++ b/Sources/Earthquake Network/Acquisti in App/EQNNotificationService-Bridging-Header.h @@ -0,0 +1,4 @@ +// +// Use this file to import your target's public headers that you would like to expose to Swift. +// + diff --git a/Sources/Earthquake Network/Acquisti in App/Earthquake Network-Bridging-Header.h b/Sources/Earthquake Network/Acquisti in App/Earthquake Network-Bridging-Header.h new file mode 100644 index 0000000..194bd92 --- /dev/null +++ b/Sources/Earthquake Network/Acquisti in App/Earthquake Network-Bridging-Header.h @@ -0,0 +1,7 @@ +// +// Use this file to import your target's public headers that you would like to expose to Swift. +// + +#import "EQNUtility.h" +#import "costanti.h" + diff --git a/Sources/Earthquake Network/Acquisti in App/IAPHelper.swift b/Sources/Earthquake Network/Acquisti in App/IAPHelper.swift new file mode 100644 index 0000000..4768a05 --- /dev/null +++ b/Sources/Earthquake Network/Acquisti in App/IAPHelper.swift @@ -0,0 +1,192 @@ +/// Copyright (c) 2018 Razeware LLC +/// +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// Notwithstanding the foregoing, you may not use, copy, modify, merge, publish, +/// distribute, sublicense, create a derivative work, and/or sell copies of the +/// Software in any work that is designed, intended, or marketed for pedagogical or +/// instructional purposes related to programming, coding, application development, +/// or information technology. Permission for such use, copying, modification, +/// merger, publication, distribution, sublicensing, creation of derivative works, +/// or sale is expressly withheld. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. + +import StoreKit + +public typealias ProductIdentifier = String +public typealias ProductsRequestCompletionHandler = (_ success: Bool, _ products: [SKProduct]?) -> Void + +extension Notification.Name { + static let IAPHelperPurchaseNotification = Notification.Name("IAPHelperPurchaseNotification") + static let IAPHelperPurchaseNotificationFail = Notification.Name("IAPHelperPurchaseNotificationFail") + +} + +open class IAPHelper: NSObject { + + private let productIdentifiers: Set + private var purchasedProductIdentifiers: Set = [] + private var productsRequest: SKProductsRequest? + private var productsRequestCompletionHandler: ProductsRequestCompletionHandler? + + let receiptURL = Bundle.main.appStoreReceiptURL + + public init(productIds: Set) { + productIdentifiers = productIds + for productIdentifier in productIds { + let purchased = UserDefaults.standard.bool(forKey: productIdentifier) + if purchased { + purchasedProductIdentifiers.insert(productIdentifier) + print("Previously purchased: \(productIdentifier)") + } else { + print("Not purchased: \(productIdentifier)") + } + } + super.init() + + SKPaymentQueue.default().add(self) + } + +} + +// MARK: - StoreKit API + +extension IAPHelper { + + public func requestProducts(_ completionHandler: @escaping ProductsRequestCompletionHandler) { + productsRequest?.cancel() + productsRequestCompletionHandler = completionHandler + + productsRequest = SKProductsRequest(productIdentifiers: productIdentifiers) + productsRequest!.delegate = self + productsRequest!.start() + } + + public func buyProduct(_ product: SKProduct) { + + print("Buying \(product.productIdentifier)...") + let payment = SKPayment(product: product) + SKPaymentQueue.default().add(payment) + + } + + public func isProductPurchased(_ productIdentifier: ProductIdentifier) -> Bool { + return purchasedProductIdentifiers.contains(productIdentifier) + } + + public class func canMakePayments() -> Bool { + return SKPaymentQueue.canMakePayments() + } + + public func restorePurchases() { + SKPaymentQueue.default().restoreCompletedTransactions() + } +} + +// MARK: - SKProductsRequestDelegate + +extension IAPHelper: SKProductsRequestDelegate { + + public func productsRequest(_ request: SKProductsRequest, didReceive response: SKProductsResponse) { + + print("Loaded list of products...") + let products = response.products + productsRequestCompletionHandler?(true, products) + clearRequestAndHandler() + + for p in products { + print("Found product: \(p.productIdentifier) \(p.localizedTitle) \(p.price.floatValue)") + } + } + + public func request(_ request: SKRequest, didFailWithError error: Error) { + print("Failed to load list of products.") + print("Error: \(error.localizedDescription)") + productsRequestCompletionHandler?(false, nil) + clearRequestAndHandler() + } + + private func clearRequestAndHandler() { + productsRequest = nil + productsRequestCompletionHandler = nil + } +} + +// MARK: - SKPaymentTransactionObserver + +extension IAPHelper: SKPaymentTransactionObserver { + + public func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) { + for transaction in transactions { + switch (transaction.transactionState) { + case .purchased: + complete(transaction: transaction) + break + case .failed: + fail(transaction: transaction) + break + case .restored: + restore(transaction: transaction) + break + case .deferred: + break + case .purchasing: + break + } + } + } + + private func complete(transaction: SKPaymentTransaction) { + + print("complete...") + deliverPurchaseNotificationFor(identifier: transaction.payment.productIdentifier) + SKPaymentQueue.default().finishTransaction(transaction) + + } + + private func restore(transaction: SKPaymentTransaction) { + guard let productIdentifier = transaction.original?.payment.productIdentifier else { return } + + print("restore... \(productIdentifier)") + deliverPurchaseNotificationFor(identifier: productIdentifier) + SKPaymentQueue.default().finishTransaction(transaction) + } + + private func fail(transaction: SKPaymentTransaction) { + + print("fail...") + if let transactionError = transaction.error as NSError?, + let localizedDescription = transaction.error?.localizedDescription, + transactionError.code != SKError.paymentCancelled.rawValue { + print("Transaction Error: \(localizedDescription)") + + } + NotificationCenter.default.post(name: .IAPHelperPurchaseNotificationFail, object: nil) + SKPaymentQueue.default().finishTransaction(transaction) + } + + private func deliverPurchaseNotificationFor(identifier: String?) { + guard let identifier = identifier else { return } + + purchasedProductIdentifiers.insert(identifier) + UserDefaults.standard.set(true, forKey: identifier) + NotificationCenter.default.post(name: .IAPHelperPurchaseNotification, object: identifier) + } + +} + diff --git a/Sources/Earthquake Network/Acquisti in App/MasterViewController1.swift b/Sources/Earthquake Network/Acquisti in App/MasterViewController1.swift new file mode 100644 index 0000000..7d91cc2 --- /dev/null +++ b/Sources/Earthquake Network/Acquisti in App/MasterViewController1.swift @@ -0,0 +1,144 @@ +/// Copyright (c) 2018 Razeware LLC +/// +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// Notwithstanding the foregoing, you may not use, copy, modify, merge, publish, +/// distribute, sublicense, create a derivative work, and/or sell copies of the +/// Software in any work that is designed, intended, or marketed for pedagogical or +/// instructional purposes related to programming, coding, application development, +/// or information technology. Permission for such use, copying, modification, +/// merger, publication, distribution, sublicensing, creation of derivative works, +/// or sale is expressly withheld. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. + +import UIKit +import StoreKit + +class MasterViewController1: UITableViewController { + + let showDetailSegueIdentifier = "showDetail" + + var products: [SKProduct] = [] + + override func shouldPerformSegue(withIdentifier identifier: String, sender: Any?) -> Bool { + if identifier == showDetailSegueIdentifier { + guard let indexPath = tableView.indexPathForSelectedRow else { + return false + } + + let product = products[indexPath.row] + + return VersioneProProducts.store.isProductPurchased(product.productIdentifier) + } + + return true + } + + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + if segue.identifier == showDetailSegueIdentifier { + guard let indexPath = tableView.indexPathForSelectedRow else { return } + + let product = products[indexPath.row] + + if let name = resourceNameForProductIdentifier(product.productIdentifier), + let detailViewController = segue.destination as? DetailViewController { + let image = UIImage(named: name) + detailViewController.image = image + } + } + } + + override func viewDidLoad() { + super.viewDidLoad() + + title = "RazeFaces" + + refreshControl = UIRefreshControl() + refreshControl?.addTarget(self, action: #selector(MasterViewController1.reload), for: .valueChanged) + + let restoreButton = UIBarButtonItem(title: "Restore", + style: .plain, + target: self, + action: #selector(MasterViewController1.restoreTapped(_:))) + navigationItem.rightBarButtonItem = restoreButton + + NotificationCenter.default.addObserver(self, selector: #selector(MasterViewController1.handlePurchaseNotification(_:)), + name: .IAPHelperPurchaseNotification, + object: nil) + } + + override func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) + + reload() + } + + @objc func reload() { + products = [] + + tableView.reloadData() + + VersioneProProducts.store.requestProducts{ [weak self] success, products in + guard let self = self else { return } + if success { + self.products = products! + + self.tableView.reloadData() + } + + self.refreshControl?.endRefreshing() + } + } + + @objc func restoreTapped(_ sender: AnyObject) { + VersioneProProducts.store.restorePurchases() + } + + @objc func handlePurchaseNotification(_ notification: Notification) { + guard + let productID = notification.object as? String, + let index = products.index(where: { product -> Bool in + product.productIdentifier == productID + }) + else { return } + + tableView.reloadRows(at: [IndexPath(row: index, section: 0)], with: .fade) + } +} + +// MARK: - UITableViewDataSource + +extension MasterViewController1 { + + override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return products.count + } + + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! ProductCell + + let product = products[indexPath.row] + + cell.product = product + cell.buyButtonHandler = { product in + VersioneProProducts.store.buyProduct(product) + } + + return cell + } +} diff --git a/Sources/Earthquake Network/Acquisti in App/ProductCell.swift b/Sources/Earthquake Network/Acquisti in App/ProductCell.swift new file mode 100644 index 0000000..eb228e4 --- /dev/null +++ b/Sources/Earthquake Network/Acquisti in App/ProductCell.swift @@ -0,0 +1,139 @@ +/// Copyright (c) 2018 Razeware LLC +/// +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// Notwithstanding the foregoing, you may not use, copy, modify, merge, publish, +/// distribute, sublicense, create a derivative work, and/or sell copies of the +/// Software in any work that is designed, intended, or marketed for pedagogical or +/// instructional purposes related to programming, coding, application development, +/// or information technology. Permission for such use, copying, modification, +/// merger, publication, distribution, sublicensing, creation of derivative works, +/// or sale is expressly withheld. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. + +import UIKit +import StoreKit + +class ProductCell: UITableViewCell { + + + @IBOutlet weak var immagine: UIImageView! + @IBOutlet weak var descrizione: UILabel! + @IBOutlet weak var titolo: UILabel! + + @IBOutlet weak var sottoscrivibutton: UIButton! + @IBAction func sottoscrivi(_ sender: Any) { + + // buyButtonHandler?(product!) + + } + + + static let priceFormatter: NumberFormatter = { + let formatter = NumberFormatter() + + formatter.formatterBehavior = .behavior10_4 + formatter.numberStyle = .currency + + return formatter + }() + + var buyButtonHandler: ((_ product: SKProduct) -> Void)? + + var product: SKProduct? { + didSet { + guard let product = product else { return } + + // textLabel?.text = product.localizedTitle + + ProductCell.priceFormatter.locale = product.priceLocale + self.descrizione.text = product.localizedDescription + self.titolo?.text = product.localizedTitle + self.sottoscrivibutton.setTitle( NSLocalizedString("DETTAGLI", comment: "pulsante abbonamenti"), for: .normal) + + if product.productIdentifier == "com.finazzi.distquake.Abbonamento100k.mensileAutomatico" || + product.productIdentifier == "com.finazzi.distquake.Abbonamento100k.annualeAutomaticoscontato" || + product.productIdentifier == "com.finazzi.distquake.Abbonamento100k.annualeAutomatico"{ + + self.immagine.image = UIImage.init(named: "top_100k") + + } + else{ + + self.immagine.image = UIImage.init(named: "top_10k") + + } + + if #available(iOS 11.2, *), + let period = product.introductoryPrice?.subscriptionPeriod + { + _ = period.unit.description(capitalizeFirstLetter: true, numberOfUnits: period.numberOfUnits) + + } else { + // Fallback + } + + + + } + } + + override func prepareForReuse() { + super.prepareForReuse() + + textLabel?.text = "" + detailTextLabel?.text = "" + accessoryView = nil + } + + func newBuyButton() -> UIButton { + let button = UIButton(type: .system) + button.setTitleColor(tintColor, for: .normal) + button.setTitle("Buy", for: .normal) + button.addTarget(self, action: #selector(ProductCell.buyButtonTapped(_:)), for: .touchUpInside) + button.sizeToFit() + + return button + } + + @objc func buyButtonTapped(_ sender: AnyObject) { + buyButtonHandler?(product!) + } +} + +@available(iOSApplicationExtension 11.2, *) +extension SKProduct.PeriodUnit { + func description(capitalizeFirstLetter: Bool = false, numberOfUnits: Int? = nil) -> String { + let period:String = { + switch self { + case .day: return "day" + case .week: return "week" + case .month: return "month" + case .year: return "year" + } + }() + + var numUnits = "" + var plural = "" + if let numberOfUnits = numberOfUnits { + numUnits = "\(numberOfUnits) " // Add space for formatting + plural = numberOfUnits > 1 ? "s" : "" + } + return "\(numUnits)\(capitalizeFirstLetter ? period.capitalized : period)\(plural)" + } +} diff --git a/Sources/Earthquake Network/Acquisti in App/Termogea 02-13/DistributionSummary.plist b/Sources/Earthquake Network/Acquisti in App/Termogea 02-13/DistributionSummary.plist new file mode 100644 index 0000000..8de960e --- /dev/null +++ b/Sources/Earthquake Network/Acquisti in App/Termogea 02-13/DistributionSummary.plist @@ -0,0 +1,34 @@ + + + + + Termogea.ipa + + + architectures + + armv7 + arm64 + + certificate + + SHA1 + + dateExpires + + type + Unknown + + name + Telegea.app + team + + id + 4E74YD2Y2V + name + DEK Italia S.R.L + + + + + diff --git a/Sources/Earthquake Network/Acquisti in App/Termogea 02-13/ExportOptions.plist b/Sources/Earthquake Network/Acquisti in App/Termogea 02-13/ExportOptions.plist new file mode 100644 index 0000000..bc77442 --- /dev/null +++ b/Sources/Earthquake Network/Acquisti in App/Termogea 02-13/ExportOptions.plist @@ -0,0 +1,20 @@ + + + + + compileBitcode + + destination + export + method + ad-hoc + signingStyle + automatic + stripSwiftSymbols + + teamID + 4E74YD2Y2V + thinning + <none> + + diff --git a/Sources/Earthquake Network/Acquisti in App/Termogea 02-13/Packaging.log b/Sources/Earthquake Network/Acquisti in App/Termogea 02-13/Packaging.log new file mode 100644 index 0000000..ff85b04 --- /dev/null +++ b/Sources/Earthquake Network/Acquisti in App/Termogea 02-13/Packaging.log @@ -0,0 +1,3553 @@ +2019-02-12 23:21:28 +0000 Initial pipeline context: '> + Chain (12, self inclusive): + '> + '> + '> + '> + '> + '> + '> + '> + '> + + + + +2019-02-12 23:21:28 +0000 Processing step: IDEDistributionCreateDestRootStep +2019-02-12 23:21:28 +0000 Processing step: IDEDistributionCopyItemStep +2019-02-12 23:21:28 +0000 Running /usr/bin/ditto '-V' '/Users/lucaberetta/Library/Developer/Xcode/Archives/2019-02-13/Termogea 13-02-2019, 00.17.xcarchive/Products/Applications/Telegea.app' '/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app' +2019-02-12 23:21:28 +0000 >>> Copying /Users/lucaberetta/Library/Developer/Xcode/Archives/2019-02-13/Termogea 13-02-2019, 00.17.xcarchive/Products/Applications/Telegea.app +2019-02-12 23:21:28 +0000 copying file ./_CodeSignature/CodeResources ... +2019-02-12 23:21:28 +0000 15845 bytes for ./_CodeSignature/CodeResources +2019-02-12 23:21:28 +0000 copying file ./open-24.ttf ... +2019-02-12 23:21:28 +0000 26988 bytes for ./open-24.ttf +2019-02-12 23:21:28 +0000 copying file ./en.lproj/Localizable.strings ... +2019-02-12 23:21:28 +0000 1200 bytes for ./en.lproj/Localizable.strings +2019-02-12 23:21:28 +0000 copying file ./Telegea ... +2019-02-12 23:21:28 +0000 2886192 bytes for ./Telegea +2019-02-12 23:21:28 +0000 copying file ./ActionTableViewController.nib ... +2019-02-12 23:21:28 +0000 1514 bytes for ./ActionTableViewController.nib +2019-02-12 23:21:28 +0000 copying file ./it.lproj/LaunchScreen.strings ... +2019-02-12 23:21:28 +0000 1 bytes for ./it.lproj/LaunchScreen.strings +2019-02-12 23:21:28 +0000 copying file ./it.lproj/Main.strings ... +2019-02-12 23:21:28 +0000 1028 bytes for ./it.lproj/Main.strings +2019-02-12 23:21:28 +0000 copying file ./it.lproj/Localizable.strings ... +2019-02-12 23:21:28 +0000 768 bytes for ./it.lproj/Localizable.strings +2019-02-12 23:21:28 +0000 copying file ./AppIcon60x60@2x.png ... +2019-02-12 23:21:28 +0000 5324 bytes for ./AppIcon60x60@2x.png +2019-02-12 23:21:28 +0000 copying file ./AppIcon29x29@2x.png ... +2019-02-12 23:21:28 +0000 2413 bytes for ./AppIcon29x29@2x.png +2019-02-12 23:21:28 +0000 copying file ./AppIcon40x40@3x.png ... +2019-02-12 23:21:28 +0000 5324 bytes for ./AppIcon40x40@3x.png +2019-02-12 23:21:28 +0000 copying file ./AppIcon40x40@2x.png ... +2019-02-12 23:21:28 +0000 3707 bytes for ./AppIcon40x40@2x.png +2019-02-12 23:21:28 +0000 copying file ./AppIcon29x29@3x.png ... +2019-02-12 23:21:28 +0000 3593 bytes for ./AppIcon29x29@3x.png +copying file ./AppIcon60x60@3x.png ... +2019-02-12 23:21:28 +0000 5979 bytes for ./AppIcon60x60@3x.png +2019-02-12 23:21:28 +0000 copying file ./Base.lproj/Main.storyboardc/nH3-va-oWn-view-Kjf-R9-c4O.nib ... +2019-02-12 23:21:28 +0000 15012 bytes for ./Base.lproj/Main.storyboardc/nH3-va-oWn-view-Kjf-R9-c4O.nib +2019-02-12 23:21:28 +0000 copying file ./Base.lproj/Main.storyboardc/ab0-Np-nDb-view-1DQ-TN-WO8.nib ... +2019-02-12 23:21:28 +0000 2291 bytes for ./Base.lproj/Main.storyboardc/ab0-Np-nDb-view-1DQ-TN-WO8.nib +2019-02-12 23:21:28 +0000 copying file ./Base.lproj/Main.storyboardc/LoadingZoneViewController.nib ... +2019-02-12 23:21:28 +0000 1267 bytes for ./Base.lproj/Main.storyboardc/LoadingZoneViewController.nib +2019-02-12 23:21:28 +0000 copying file ./Base.lproj/Main.storyboardc/RootViewController.nib ... +2019-02-12 23:21:28 +0000 949 bytes for ./Base.lproj/Main.storyboardc/RootViewController.nib +copying file ./Base.lproj/Main.storyboardc/weQ-Ch-B8p-view-Uu0-nz-514.nib ... +2019-02-12 23:21:28 +0000 10125 bytes for ./Base.lproj/Main.storyboardc/weQ-Ch-B8p-view-Uu0-nz-514.nib +copying file ./Base.lproj/Main.storyboardc/PageViewController.nib ... +2019-02-12 23:21:28 +0000 954 bytes for ./Base.lproj/Main.storyboardc/PageViewController.nib +2019-02-12 23:21:28 +0000 copying file ./Base.lproj/Main.storyboardc/nav.nib ... +2019-02-12 23:21:28 +0000 2524 bytes for ./Base.lproj/Main.storyboardc/nav.nib +copying file ./Base.lproj/Main.storyboardc/ListTableViewController.nib ... +2019-02-12 23:21:28 +0000 1458 bytes for ./Base.lproj/Main.storyboardc/ListTableViewController.nib +copying file ./Base.lproj/Main.storyboardc/LoginViewController.nib ... +2019-02-12 23:21:28 +0000 998 bytes for ./Base.lproj/Main.storyboardc/LoginViewController.nib +2019-02-12 23:21:28 +0000 copying file ./Base.lproj/Main.storyboardc/PageContentViewController.nib ... +2019-02-12 23:21:28 +0000 1150 bytes for ./Base.lproj/Main.storyboardc/PageContentViewController.nib +2019-02-12 23:21:28 +0000 copying file ./Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib ... +2019-02-12 23:21:28 +0000 7105 bytes for ./Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib +copying file ./Base.lproj/Main.storyboardc/ManagerViewController.nib ... +2019-02-12 23:21:28 +0000 1604 bytes for ./Base.lproj/Main.storyboardc/ManagerViewController.nib +2019-02-12 23:21:28 +0000 copying file ./Base.lproj/Main.storyboardc/xyI-FE-Jw4-view-46u-ev-qKG.nib ... +2019-02-12 23:21:28 +0000 1894 bytes for ./Base.lproj/Main.storyboardc/xyI-FE-Jw4-view-46u-ev-qKG.nib +2019-02-12 23:21:28 +0000 copying file ./Base.lproj/Main.storyboardc/TAc-QK-t0h-view-DQA-FY-yPG.nib ... +2019-02-12 23:21:28 +0000 8525 bytes for ./Base.lproj/Main.storyboardc/TAc-QK-t0h-view-DQA-FY-yPG.nib +copying file ./Base.lproj/Main.storyboardc/Info.plist ... +2019-02-12 23:21:28 +0000 565 bytes for ./Base.lproj/Main.storyboardc/Info.plist +2019-02-12 23:21:28 +0000 copying file ./Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib ... +2019-02-12 23:21:28 +0000 1804 bytes for ./Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib +copying file ./Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib ... +2019-02-12 23:21:28 +0000 832 bytes for ./Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib +copying file ./Base.lproj/LaunchScreen.storyboardc/Info.plist ... +2019-02-12 23:21:28 +0000 258 bytes for ./Base.lproj/LaunchScreen.storyboardc/Info.plist +2019-02-12 23:21:28 +0000 copying file ./Assets.car ... +2019-02-12 23:21:28 +0000 1944712 bytes for ./Assets.car +2019-02-12 23:21:28 +0000 copying file ./AppIcon40x40@2x~ipad.png ... +2019-02-12 23:21:28 +0000 3707 bytes for ./AppIcon40x40@2x~ipad.png +copying file ./AppIcon76x76@2x~ipad.png ... +2019-02-12 23:21:28 +0000 5996 bytes for ./AppIcon76x76@2x~ipad.png +2019-02-12 23:21:28 +0000 copying file ./AppIcon83.5x83.5@2x~ipad.png ... +2019-02-12 23:21:28 +0000 8541 bytes for ./AppIcon83.5x83.5@2x~ipad.png +copying file ./AppIcon29x29@2x~ipad.png ... +2019-02-12 23:21:28 +0000 2413 bytes for ./AppIcon29x29@2x~ipad.png +2019-02-12 23:21:28 +0000 copying file ./ActionTableViewCell.nib ... +2019-02-12 23:21:28 +0000 2836 bytes for ./ActionTableViewCell.nib +2019-02-12 23:21:28 +0000 copying file ./AppIcon40x40~ipad.png ... +2019-02-12 23:21:28 +0000 2574 bytes for ./AppIcon40x40~ipad.png +copying file ./AppIcon20x20~ipad.png ... +2019-02-12 23:21:28 +0000 1386 bytes for ./AppIcon20x20~ipad.png +2019-02-12 23:21:28 +0000 copying file ./embedded.mobileprovision ... +2019-02-12 23:21:28 +0000 7607 bytes for ./embedded.mobileprovision +copying file ./AppIcon20x20@2x~ipad.png ... +2019-02-12 23:21:28 +0000 2574 bytes for ./AppIcon20x20@2x~ipad.png +2019-02-12 23:21:28 +0000 copying file ./Info.plist ... +2019-02-12 23:21:28 +0000 1339 bytes for ./Info.plist +2019-02-12 23:21:28 +0000 copying file ./PkgInfo ... +2019-02-12 23:21:28 +0000 8 bytes for ./PkgInfo +2019-02-12 23:21:28 +0000 copying file ./AppIcon76x76~ipad.png ... +2019-02-12 23:21:28 +0000 5379 bytes for ./AppIcon76x76~ipad.png +2019-02-12 23:21:28 +0000 /usr/bin/ditto exited with 0 +2019-02-12 23:21:28 +0000 Processing step: IDEDistributionEmbedProfileStep +2019-02-12 23:21:28 +0000 Processing step: IDEDistributionAppThinningPlistStep +2019-02-12 23:21:28 +0000 Skipping step: IDEDistributionAppThinningPlistStep because it said so +2019-02-12 23:21:28 +0000 Processing step: IDEDistributionCompileBitcodeStep +2019-02-12 23:21:28 +0000 Running /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool '/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root' '--json' '/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool-json-filepath-JqodKx' '--compile-bitcode' '--output' '/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/IDEIPAProcessor.AppThinning.Raz' '--toolchain' '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr' '--platforms' '/Applications/Xcode.app/Contents/Developer/Platforms' '--app-store-tools-build-version' '10B61' +2019-02-12 23:21:28 +0000 ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18] +2019-02-12 23:21:28 +0000 /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:3155: warning: shadowing outer local variable - c +2019-02-12 23:21:28 +0000 /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:3161: warning: shadowing outer local variable - c +/Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:3164: warning: shadowing outer local variable - c +2019-02-12 23:21:28 +0000 /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:3154: warning: assigned but unused variable - prod +2019-02-12 23:21:28 +0000 /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:3428: warning: mismatched indentations at 'end' with 'def' at 3355 +2019-02-12 23:21:28 +0000 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/gems/2.3.0/gems/libxml-ruby-2.9.0/lib/libxml/schema/type.rb:8: warning: method redefined; discarding old annotation +2019-02-12 23:21:28 +0000 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/gems/2.3.0/gems/libxml-ruby-2.9.0/lib/libxml/schema/element.rb:18: warning: method redefined; discarding old annotation +2019-02-12 23:21:28 +0000 OS X 10.14.2 18C54 +2019-02-12 23:21:28 +0000 ENV: {"PATH"=>"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec:/Applications/Xcode.app/Contents/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Tools:/usr/bin:/bin:/usr/sbin:/sbin", "MallocNanoZone"=>"0", "TMPDIR"=>"/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/", "LOGNAME"=>"lucaberetta", "COMMAND_MODE"=>"unix2003", "HOME"=>"/Users/lucaberetta", "XPC_FLAGS"=>"0x0", "Apple_PubSub_Socket_Render"=>"/private/tmp/com.apple.launchd.q5QQu9H2zW/Render", "USER"=>"lucaberetta", "SSH_AUTH_SOCK"=>"/private/tmp/com.apple.launchd.SQFT0f0fTU/Listeners", "XPC_SERVICE_NAME"=>"com.apple.xpc.launchd.oneshot.0x10000014.Xcode", "CA_ASSERT_MAIN_THREAD_TRANSACTIONS"=>"1", "SHELL"=>"/bin/bash", "__CF_USER_TEXT_ENCODING"=>"0x1F5:0x0:0x4", "CA_DEBUG_TRANSACTIONS"=>"1"} +ARGV: ["/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root", "--json", "/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool-json-filepath-JqodKx", "--compile-bitcode", "--output", "/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/IDEIPAProcessor.AppThinning.Raz", "--toolchain", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr", "--platforms", "/Applications/Xcode.app/Contents/Developer/Platforms", "--app-store-tools-build-version", "10B61"] +2019-02-12 23:21:28 +0000 --- +IPA contents: +2019-02-12 23:21:28 +0000 /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/ActionTableViewCell.nib +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/ActionTableViewController.nib +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon20x20@2x~ipad.png +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon20x20~ipad.png +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon29x29@2x.png +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon29x29@2x~ipad.png +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon29x29@3x.png +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon40x40@2x.png +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon40x40@2x~ipad.png +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon40x40@3x.png +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon40x40~ipad.png +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon60x60@2x.png +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon60x60@3x.png +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon76x76@2x~ipad.png +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon76x76~ipad.png +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon83.5x83.5@2x~ipad.png +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Assets.car +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/LaunchScreen.storyboardc +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/LaunchScreen.storyboardc/Info.plist +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/Info.plist +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/ListTableViewController.nib +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/LoadingZoneViewController.nib +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/LoginViewController.nib +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/ManagerViewController.nib +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base. +2019-02-12 23:21:28 +0000 lproj/Main.storyboardc/PageContentViewController.nib +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/PageViewController.nib +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/RootViewController.nib +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/TAc-QK-t0h-view-DQA-FY-yPG.nib +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/ab0-Np-nDb-view-1DQ-TN-WO8.nib +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/nH3-va-oWn-view-Kjf-R9-c4O.nib +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/nav.nib +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/weQ-Ch-B8p-view-Uu0-nz-514.nib +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/xyI-FE-Jw4-view-46u-ev-qKG.nib +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Info.plist +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/PkgInfo +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Telegea +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/_CodeSignature +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/_CodeSignature/CodeResources +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/embedded.mobileprovision +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/en.lproj +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/en.lproj/Localizable.strings +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/it.lproj +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/it.lproj/LaunchScreen.strings +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/it.lproj/Localizable.strings +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/it.lproj/Main.strings +/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/open-24.ttf +--- +2019-02-12 23:21:28 +0000 warning: Configuration issue: platform AppleTVSimulator.platform doesn't have any non-simulator SDKs; ignoring it +2019-02-12 23:21:28 +0000 warning: Configuration issue: platform WatchSimulator.platform doesn't have any non-simulator SDKs; ignoring it +2019-02-12 23:21:28 +0000 warning: Configuration issue: platform iPhoneSimulator.platform doesn't have any non-simulator SDKs; ignoring it +2019-02-12 23:21:28 +0000 Scanning IPA... +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/ActionTableViewCell.nib +2019-02-12 23:21:28 +0000 Command exited with pid 25837 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/ActionTableViewCell.nib + Stdout: + data + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/ActionTableViewController.nib +2019-02-12 23:21:28 +0000 Command exited with pid 25838 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/ActionTableViewController.nib + Stdout: + data + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon20x20@2x\~ipad.png +2019-02-12 23:21:28 +0000 Command exited with pid 25839 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon20x20@2x\~ipad.png + Stdout: + PNG image data (CgBI), 40 x 40, 8-bit/color RGBA, non-interlaced + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon20x20\~ipad.png +2019-02-12 23:21:28 +0000 Command exited with pid 25840 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon20x20\~ipad.png + Stdout: + PNG image data (CgBI), 20 x 20, 8-bit/color RGBA, non-interlaced + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon29x29@2x.png +2019-02-12 23:21:28 +0000 Command exited with pid 25841 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon29x29@2x.png + Stdout: + PNG image data (CgBI), 58 x 58, 8-bit/color RGBA, non-interlaced + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon29x29@2x\~ipad.png +2019-02-12 23:21:28 +0000 Command exited with pid 25842 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon29x29@2x\~ipad.png + Stdout: + PNG image data (CgBI), 58 x 58, 8-bit/color RGBA, non-interlaced + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon29x29@3x.png +2019-02-12 23:21:28 +0000 Command exited with pid 25843 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon29x29@3x.png + Stdout: + PNG image data (CgBI), 87 x 87, 8-bit/color RGBA, non-interlaced + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon40x40@2x.png +2019-02-12 23:21:28 +0000 Command exited with pid 25844 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon40x40@2x.png + Stdout: + PNG image data (CgBI), 80 x 80, 8-bit/color RGBA, non-interlaced + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon40x40@2x\~ipad.png +2019-02-12 23:21:28 +0000 Command exited with pid 25845 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon40x40@2x\~ipad.png + Stdout: + PNG image data (CgBI), 80 x 80, 8-bit/color RGBA, non-interlaced + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon40x40@3x.png +2019-02-12 23:21:28 +0000 Command exited with pid 25846 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon40x40@3x.png + Stdout: + PNG image data (CgBI), 120 x 120, 8-bit/color RGBA, non-interlaced + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon40x40\~ipad.png +2019-02-12 23:21:28 +0000 Command exited with pid 25847 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon40x40\~ipad.png + Stdout: + PNG image data (CgBI), 40 x 40, 8-bit/color RGBA, non-interlaced + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon60x60@2x.png +2019-02-12 23:21:28 +0000 Command exited with pid 25848 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon60x60@2x.png + Stdout: + PNG image data (CgBI), 120 x 120, 8-bit/color RGBA, non-interlaced + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon60x60@3x.png +2019-02-12 23:21:28 +0000 Command exited with pid 25849 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon60x60@3x.png + Stdout: + PNG image data (CgBI), 180 x 180, 8-bit/color RGBA, non-interlaced + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon76x76@2x\~ipad.png +2019-02-12 23:21:28 +0000 Command exited with pid 25850 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon76x76@2x\~ipad.png + Stdout: + PNG image data (CgBI), 152 x 152, 8-bit/color RGBA, non-interlaced + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon76x76\~ipad.png +2019-02-12 23:21:28 +0000 Command exited with pid 25851 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon76x76\~ipad.png + Stdout: + PNG image data (CgBI), 76 x 76, 8-bit/color RGBA, non-interlaced + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon83.5x83.5@2x\~ipad.png +2019-02-12 23:21:28 +0000 Command exited with pid 25852 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/AppIcon83.5x83.5@2x\~ipad.png + Stdout: + PNG image data (CgBI), 167 x 167, 8-bit/color RGBA, non-interlaced + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Assets.car +2019-02-12 23:21:28 +0000 Command exited with pid 25853 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Assets.car + Stdout: + Mac OS X bill of materials (BOM) file + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib +2019-02-12 23:21:28 +0000 Command exited with pid 25855 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib + Stdout: + data + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/LaunchScreen.storyboardc/Info.plist +2019-02-12 23:21:28 +0000 Command exited with pid 25856 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/LaunchScreen.storyboardc/Info.plist + Stdout: + Apple binary property list + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib +2019-02-12 23:21:28 +0000 Command exited with pid 25857 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib + Stdout: + data + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib +2019-02-12 23:21:28 +0000 Command exited with pid 25859 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib + Stdout: + data + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/Info.plist +2019-02-12 23:21:28 +0000 Command exited with pid 25860 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/Info.plist + Stdout: + Apple binary property list + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/ListTableViewController.nib +2019-02-12 23:21:28 +0000 Command exited with pid 25861 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/ListTableViewController.nib + Stdout: + data + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/LoadingZoneViewController.nib +2019-02-12 23:21:28 +0000 Command exited with pid 25862 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/LoadingZoneViewController.nib + Stdout: + data + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/LoginViewController.nib +2019-02-12 23:21:28 +0000 Command exited with pid 25863 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/LoginViewController.nib + Stdout: + data + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/ManagerViewController.nib +2019-02-12 23:21:28 +0000 Command exited with pid 25864 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/ManagerViewController.nib + Stdout: + data + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/PageContentViewController.nib +2019-02-12 23:21:28 +0000 Command exited with pid 25865 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/PageContentViewController.nib + Stdout: + data + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/PageViewController.nib +2019-02-12 23:21:28 +0000 Command exited with pid 25866 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/PageViewController.nib + Stdout: + data + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/RootViewController.nib +2019-02-12 23:21:28 +0000 Command exited with pid 25867 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/RootViewController.nib + Stdout: + data + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/TAc-QK-t0h-view-DQA-FY-yPG.nib +2019-02-12 23:21:28 +0000 Command exited with pid 25868 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/TAc-QK-t0h-view-DQA-FY-yPG.nib + Stdout: + data + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/ab0-Np-nDb-view-1DQ-TN-WO8.nib +2019-02-12 23:21:28 +0000 Command exited with pid 25869 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/ab0-Np-nDb-view-1DQ-TN-WO8.nib + Stdout: + data + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/nH3-va-oWn-view-Kjf-R9-c4O.nib +2019-02-12 23:21:28 +0000 Command exited with pid 25870 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/nH3-va-oWn-view-Kjf-R9-c4O.nib + Stdout: + data + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/nav.nib +2019-02-12 23:21:28 +0000 Command exited with pid 25871 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/nav.nib + Stdout: + data + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/weQ-Ch-B8p-view-Uu0-nz-514.nib +2019-02-12 23:21:28 +0000 Command exited with pid 25872 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/weQ-Ch-B8p-view-Uu0-nz-514.nib + Stdout: + data + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/xyI-FE-Jw4-view-46u-ev-qKG.nib +2019-02-12 23:21:28 +0000 Command exited with pid 25873 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Base.lproj/Main.storyboardc/xyI-FE-Jw4-view-46u-ev-qKG.nib + Stdout: + data + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Info.plist +2019-02-12 23:21:28 +0000 Command exited with pid 25874 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Info.plist + Stdout: + Apple binary property list + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/PkgInfo +2019-02-12 23:21:28 +0000 Command exited with pid 25875 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/PkgInfo + Stdout: + ASCII text, with no line terminators + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Telegea +2019-02-12 23:21:28 +0000 Command exited with pid 25876 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Telegea + Stdout: + Mach-O universal binary with 2 architectures: [arm_v7:Mach-O executable arm_v7] [arm64] + /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Telegea (for architecture armv7): Mach-O executable arm_v7 + /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Telegea (for architecture arm64): Mach-O 64-bit executable arm64 + + Stderr: + +2019-02-12 23:21:28 +0000 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo -info /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Telegea +2019-02-12 23:21:28 +0000 Command exited with pid 25877 exit 0: + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo -info /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Telegea + Stdout: + Architectures in the fat file: /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Telegea are: armv7 arm64 + + Stderr: + +2019-02-12 23:21:28 +0000 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -h -v -m -arch all /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Telegea +2019-02-12 23:21:28 +0000 Command exited with pid 25878 exit 0: + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -h -v -m -arch all /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Telegea + Stdout: + Mach header + magic cputype cpusubtype caps filetype ncmds sizeofcmds flags + MH_MAGIC ARM V7 0x00 EXECUTE 26 3112 NOUNDEFS DYLDLINK TWOLEVEL PIE + Mach header + magic cputype cpusubtype caps filetype ncmds sizeofcmds flags + MH_MAGIC_64 ARM64 ALL 0x00 EXECUTE 26 3624 NOUNDEFS DYLDLINK TWOLEVEL PIE + + Stderr: + +2019-02-12 23:21:28 +0000 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l -v -m -arch armv7 /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Telegea +2019-02-12 23:21:28 +0000 Command exited with pid 25880 exit 0: + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l -v -m -arch armv7 /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Telegea + Stdout: + /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Telegea: + Mach header + magic cputype cpusubtype caps filetype ncmds sizeofcmds flags + MH_MAGIC ARM V7 0x00 EXECUTE 26 3112 NOUNDEFS DYLDLINK TWOLEVEL PIE + Load command 0 + cmd LC_SEGMENT + cmdsize 56 + segname __PAGEZERO + vmaddr 0x00000000 + vmsize 0x00004000 + fileoff 0 + filesize 0 + maxprot --- + initprot --- + nsects 0 + flags (none) + Load command 1 + cmd LC_SEGMENT + cmdsize 736 + segname __TEXT + vmaddr 0x00004000 + vmsize 0x00028000 + fileoff 0 + filesize 163840 + maxprot r-x + initprot r-x + nsects 10 + flags (none) + Section + sectname __text + segname __TEXT + addr 0x0000ba84 + size 0x00017b00 + offset 31364 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes PURE_INSTRUCTIONS SOME_INSTRUCTIONS + reserved1 0 + reserved2 0 + Section + sectname __picsymbolstub4 + segname __TEXT + addr 0x00023584 + size 0x00000480 + offset 128388 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_SYMBOL_STUBS + attributes PURE_INSTRUCTIONS SOME_INSTRUCTIONS + reserved1 0 (index into indirect symbol table) + reserved2 16 (size of stubs) + Section + sectname __stub_helper + segname __TEXT + addr 0x00023a04 + size 0x00000384 + offset 129540 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes PURE_INSTRUCTIONS SOME_INSTRUCTIONS + reserved1 0 + reserved2 0 + Section + sectname __objc_methname + segname __TEXT + addr 0x00023d88 + size 0x00004a8c + offset 130440 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_CSTRING_LITERALS + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __cstring + segname __TEXT + addr 0x00028814 + size 0x000019d5 + offset 149524 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_CSTRING_LITERALS + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __objc_classname + segname __TEXT + addr 0x0002a1e9 + size 0x00000344 + offset 156137 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_CSTRING_LITERALS + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __objc_methtype + segname __TEXT + addr 0x0002a52d + size 0x00001a53 + offset 156973 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_CSTRING_LITERALS + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __gcc_except_tab + segname __TEXT + addr 0x0002bf80 + size 0x00000020 + offset 163712 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __const + segname __TEXT + addr 0x0002bfa0 + size +2019-02-12 23:21:28 +0000 0x00000008 + offset 163744 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __ustring + segname __TEXT + addr 0x0002bfa8 + size 0x00000056 + offset 163752 + align 2^1 (2) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Load command 2 + cmd LC_SEGMENT + cmdsize 1144 + segname __DATA + vmaddr 0x0002c000 + vmsize 0x00008000 + fileoff 163840 + filesize 32768 + maxprot rw- + initprot rw- + nsects 16 + flags (none) + Section + sectname __nl_symbol_ptr + segname __DATA + addr 0x0002c000 + size 0x00000068 + offset 163840 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_NON_LAZY_SYMBOL_POINTERS + attributes (none) + reserved1 72 (index into indirect symbol table) + reserved2 0 + Section + sectname __la_symbol_ptr + segname __DATA + addr 0x0002c068 + size 0x00000120 + offset 163944 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_LAZY_SYMBOL_POINTERS + attributes (none) + reserved1 98 (index into indirect symbol table) + reserved2 0 + Section + sectname __const + segname __DATA + addr 0x0002c188 + size 0x00000750 + offset 164232 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __cfstring + segname __DATA + addr 0x0002c8d8 + size 0x000008c0 + offset 166104 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __objc_classlist + segname __DATA + addr 0x0002d198 + size 0x00000060 + offset 168344 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes NO_DEAD_STRIP + reserved1 0 + reserved2 0 + Section + sectname __objc_catlist + segname __DATA + addr 0x0002d1f8 + size 0x00000000 + offset 168440 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_REGULAR + attributes NO_DEAD_STRIP + reserved1 0 + reserved2 0 + Section + sectname __objc_protolist + segname __DATA + addr 0x0002d1f8 + size 0x00000040 + offset 168440 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __objc_imageinfo + segname __DATA + addr 0x0002d238 + size 0x00000008 + offset 168504 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __objc_const + segname __DATA + addr 0x0002d240 + size 0x00003e04 + offset 168512 + align 2^3 (8) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __objc_selrefs + segname __DATA + addr 0x00031044 + size 0x00000800 + offset 184388 + align 2^2 (4) + reloff 0 +2019-02-12 23:21:28 +0000 + nreloc 0 + type S_LITERAL_POINTERS + attributes NO_DEAD_STRIP + reserved1 0 + reserved2 0 + Section + sectname __objc_classrefs + segname __DATA + addr 0x00031844 + size 0x000000f0 + offset 186436 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes NO_DEAD_STRIP + reserved1 0 + reserved2 0 + Section + sectname __objc_superrefs + segname __DATA + addr 0x00031934 + size 0x00000054 + offset 186676 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes NO_DEAD_STRIP + reserved1 0 + reserved2 0 + Section + sectname __objc_ivar + segname __DATA + addr 0x00031988 + size 0x000001f0 + offset 186760 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __objc_data + segname __DATA + addr 0x00031b78 + size 0x000003c0 + offset 187256 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __data + segname __DATA + addr 0x00031f38 + size 0x00000344 + offset 188216 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __bss + segname __DATA + addr 0x0003227c + size 0x00000008 + offset 0 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_ZEROFILL + attributes (none) + reserved1 0 + reserved2 0 + Load command 3 + cmd LC_SEGMENT + cmdsize 124 + segname __LLVM + vmaddr 0x00034000 + vmsize 0x0011c000 + fileoff 196608 + filesize 1163264 + maxprot rw- + initprot rw- + nsects 1 + flags NORELOC + Section + sectname __bundle + segname __LLVM + addr 0x00034000 + size 0x0011b84a + offset 196608 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Load command 4 + cmd LC_SEGMENT + cmdsize 56 + segname __LINKEDIT + vmaddr 0x00150000 + vmsize 0x00010000 + fileoff 1359872 + filesize 51296 + maxprot r-- + initprot r-- + nsects 0 + flags (none) + Load command 5 + cmd LC_DYLD_INFO_ONLY + cmdsize 48 + rebase_off 1359872 + rebase_size 1372 + bind_off 1361244 + bind_size 3184 + weak_bind_off 0 + weak_bind_size 0 + lazy_bind_off 1364428 + lazy_bind_size 2116 + export_off 1366544 + export_size 28 + Load command 6 + cmd LC_SYMTAB + cmdsize 24 + symoff 1367772 + nsyms 162 + stroff 1370396 + strsize 4036 + Load command 7 + cmd LC_DYSYMTAB + cmdsize 80 + ilocalsym 0 + nlocalsym 1 + iextdefsym 1 + nextdefsym 1 + iundefsym 2 + nundefsym 160 + tocoff 0 + ntoc 0 + modtaboff 0 + nmodtab 0 + extrefsymoff 0 + nextrefsyms 0 + indirectsymoff 1369716 + nindirectsyms 170 + extreloff 0 + nextrel 0 + locrelof +2019-02-12 23:21:28 +0000 f 0 + nlocrel 0 + Load command 8 + cmd LC_LOAD_DYLINKER + cmdsize 28 + name /usr/lib/dyld (offset 12) + Load command 9 + cmd LC_UUID + cmdsize 24 + uuid 8EE7DC18-45DB-305E-B0E3-58619FAE735C + Load command 10 + cmd LC_VERSION_MIN_IPHONEOS + cmdsize 16 + version 9.0 + sdk 12.1 + Load command 11 + cmd LC_SOURCE_VERSION + cmdsize 16 + version 0.0 + Load command 12 + cmd LC_MAIN + cmdsize 24 + entryoff 105241 + stacksize 0 + Load command 13 + cmd LC_ENCRYPTION_INFO + cmdsize 20 + cryptoff 16384 + cryptsize 147456 + cryptid 0 + Load command 14 + cmd LC_LOAD_DYLIB + cmdsize 80 + name /System/Library/Frameworks/Security.framework/Security (offset 24) + time stamp 2 Thu Jan 1 01:00:02 1970 + current version 58286.222.2 + compatibility version 1.0.0 + Load command 15 + cmd LC_LOAD_DYLIB + cmdsize 84 + name /System/Library/Frameworks/Foundation.framework/Foundation (offset 24) + time stamp 2 Thu Jan 1 01:00:02 1970 + current version 1560.10.0 + compatibility version 300.0.0 + Load command 16 + cmd LC_LOAD_DYLIB + cmdsize 52 + name /usr/lib/libobjc.A.dylib (offset 24) + time stamp 2 Thu Jan 1 01:00:02 1970 + current version 228.0.0 + compatibility version 1.0.0 + Load command 17 + cmd LC_LOAD_DYLIB + cmdsize 52 + name /usr/lib/libSystem.B.dylib (offset 24) + time stamp 2 Thu Jan 1 01:00:02 1970 + current version 1252.200.5 + compatibility version 1.0.0 + Load command 18 + cmd LC_LOAD_DYLIB + cmdsize 92 + name /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation (offset 24) + time stamp 2 Thu Jan 1 01:00:02 1970 + current version 1560.10.0 + compatibility version 150.0.0 + Load command 19 + cmd LC_LOAD_DYLIB + cmdsize 88 + name /System/Library/Frameworks/CoreGraphics.framework/CoreGraphics (offset 24) + time stamp 2 Thu Jan 1 01:00:02 1970 + current version 1245.9.2 + compatibility version 64.0.0 + Load command 20 + cmd LC_LOAD_DYLIB + cmdsize 104 + name /System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration (offset 24) + time stamp 2 Thu Jan 1 01:00:02 1970 + current version 963.200.27 + compatibility version 1.0.0 + Load command 21 + cmd LC_LOAD_DYLIB + cmdsize 76 + name /System/Library/Frameworks/UIKit.framework/UIKit (offset 24) + time stamp 2 Thu Jan 1 01:00:02 1970 + current version 61000.0.0 + compatibility version 1.0.0 + Load command 22 + cmd LC_RPATH + cmdsize 40 + path @executable_path/Frameworks (offset 12) + Load command 23 + cmd LC_FUNCTION_STARTS + cmdsize 16 + dataoff 1366572 + datasize 920 + Load command 24 + cmd LC_DATA_IN_CODE + cmdsize 16 + dataoff 1367492 + datasize 280 + Load command 25 + cmd LC_CODE_SIGNATURE + cmdsize 16 + dataoff 1374432 + datasize 36736 + + Stderr: + +2019-02-12 23:21:28 +0000 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l -v -m -arch arm64 /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Telegea +2019-02-12 23:21:28 +0000 Command exited with pid 25882 exit 0: + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l -v -m -arch arm64 /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Telegea + Stdout: + /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Telegea: + Mach header + magic cputype cpusubtype caps filetype ncmds sizeofcmds flags + MH_MAGIC_64 ARM64 ALL 0x00 EXECUTE 26 3624 NOUNDEFS DYLDLINK TWOLEVEL PIE + Load command 0 + cmd LC_SEGMENT_64 + cmdsize 72 + segname __PAGEZERO + vmaddr 0x0000000000000000 + vmsize 0x0000000100000000 + fileoff 0 + filesize 0 + maxprot --- + initprot --- + nsects 0 + flags (none) + Load command 1 + cmd LC_SEGMENT_64 + cmdsize 952 + segname __TEXT + vmaddr 0x0000000100000000 + vmsize 0x0000000000028000 + fileoff 0 + filesize 163840 + maxprot r-x + initprot r-x + nsects 11 + flags (none) + Section + sectname __text + segname __TEXT + addr 0x0000000100004728 + size 0x000000000001a568 + offset 18216 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes PURE_INSTRUCTIONS SOME_INSTRUCTIONS + reserved1 0 + reserved2 0 + Section + sectname __stubs + segname __TEXT + addr 0x000000010001ec90 + size 0x0000000000000324 + offset 126096 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_SYMBOL_STUBS + attributes PURE_INSTRUCTIONS SOME_INSTRUCTIONS + reserved1 0 (index into indirect symbol table) + reserved2 12 (size of stubs) + Section + sectname __stub_helper + segname __TEXT + addr 0x000000010001efb4 + size 0x000000000000033c + offset 126900 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes PURE_INSTRUCTIONS SOME_INSTRUCTIONS + reserved1 0 + reserved2 0 + Section + sectname __const + segname __TEXT + addr 0x000000010001f2f0 + size 0x00000000000001e8 + offset 127728 + align 2^4 (16) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __objc_methname + segname __TEXT + addr 0x000000010001f4d8 + size 0x0000000000004a9e + offset 128216 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_CSTRING_LITERALS + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __cstring + segname __TEXT + addr 0x0000000100023f76 + size 0x00000000000019dd + offset 147318 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_CSTRING_LITERALS + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __objc_classname + segname __TEXT + addr 0x0000000100025953 + size 0x0000000000000342 + offset 153939 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_CSTRING_LITERALS + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __objc_methtype + segname __TEXT + addr 0x0000000100025c95 + size 0x0000000000001b1a + offset 154773 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_CSTRING_LITERALS + attributes (none) + r +2019-02-12 23:21:28 +0000 eserved1 0 + reserved2 0 + Section + sectname __gcc_except_tab + segname __TEXT + addr 0x00000001000277b0 + size 0x00000000000000cc + offset 161712 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __ustring + segname __TEXT + addr 0x000000010002787c + size 0x0000000000000056 + offset 161916 + align 2^1 (2) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __unwind_info + segname __TEXT + addr 0x00000001000278d4 + size 0x0000000000000728 + offset 162004 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Load command 2 + cmd LC_SEGMENT_64 + cmdsize 1352 + segname __DATA + vmaddr 0x0000000100028000 + vmsize 0x000000000000c000 + fileoff 163840 + filesize 49152 + maxprot rw- + initprot rw- + nsects 16 + flags (none) + Section + sectname __got + segname __DATA + addr 0x0000000100028000 + size 0x00000000000000c8 + offset 163840 + align 2^3 (8) + reloff 0 + nreloc 0 + type S_NON_LAZY_SYMBOL_POINTERS + attributes (none) + reserved1 67 (index into indirect symbol table) + reserved2 0 + Section + sectname __la_symbol_ptr + segname __DATA + addr 0x00000001000280c8 + size 0x0000000000000218 + offset 164040 + align 2^3 (8) + reloff 0 + nreloc 0 + type S_LAZY_SYMBOL_POINTERS + attributes (none) + reserved1 92 (index into indirect symbol table) + reserved2 0 + Section + sectname __const + segname __DATA + addr 0x00000001000282e0 + size 0x0000000000000e60 + offset 164576 + align 2^3 (8) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __cfstring + segname __DATA + addr 0x0000000100029140 + size 0x0000000000001180 + offset 168256 + align 2^3 (8) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __objc_classlist + segname __DATA + addr 0x000000010002a2c0 + size 0x00000000000000c0 + offset 172736 + align 2^3 (8) + reloff 0 + nreloc 0 + type S_REGULAR + attributes NO_DEAD_STRIP + reserved1 0 + reserved2 0 + Section + sectname __objc_catlist + segname __DATA + addr 0x000000010002a380 + size 0x0000000000000000 + offset 172928 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_REGULAR + attributes NO_DEAD_STRIP + reserved1 0 + reserved2 0 + Section + sectname __objc_protolist + segname __DATA + addr 0x000000010002a380 + size 0x0000000000000080 + offset 172928 + align 2^3 (8) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __objc_imageinfo + segname __DATA + addr 0x000000010002a400 + size 0x0000000000000008 + offset 173056 + align 2^2 (4) + +2019-02-12 23:21:28 +0000 reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __objc_const + segname __DATA + addr 0x000000010002a408 + size 0x00000000000073d8 + offset 173064 + align 2^3 (8) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __objc_selrefs + segname __DATA + addr 0x00000001000317e0 + size 0x0000000000001008 + offset 202720 + align 2^3 (8) + reloff 0 + nreloc 0 + type S_LITERAL_POINTERS + attributes NO_DEAD_STRIP + reserved1 0 + reserved2 0 + Section + sectname __objc_classrefs + segname __DATA + addr 0x00000001000327e8 + size 0x00000000000001e0 + offset 206824 + align 2^3 (8) + reloff 0 + nreloc 0 + type S_REGULAR + attributes NO_DEAD_STRIP + reserved1 0 + reserved2 0 + Section + sectname __objc_superrefs + segname __DATA + addr 0x00000001000329c8 + size 0x00000000000000a8 + offset 207304 + align 2^3 (8) + reloff 0 + nreloc 0 + type S_REGULAR + attributes NO_DEAD_STRIP + reserved1 0 + reserved2 0 + Section + sectname __objc_ivar + segname __DATA + addr 0x0000000100032a70 + size 0x00000000000001f0 + offset 207472 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __objc_data + segname __DATA + addr 0x0000000100032c60 + size 0x0000000000000780 + offset 207968 + align 2^3 (8) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __data + segname __DATA + addr 0x00000001000333e0 + size 0x0000000000000608 + offset 209888 + align 2^3 (8) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __bss + segname __DATA + addr 0x00000001000339e8 + size 0x0000000000000010 + offset 0 + align 2^3 (8) + reloff 0 + nreloc 0 + type S_ZEROFILL + attributes (none) + reserved1 0 + reserved2 0 + Load command 3 + cmd LC_SEGMENT_64 + cmdsize 152 + segname __LLVM + vmaddr 0x0000000100034000 + vmsize 0x0000000000120000 + fileoff 212992 + filesize 1179648 + maxprot rw- + initprot rw- + nsects 1 + flags NORELOC + Section + sectname __bundle + segname __LLVM + addr 0x0000000100034000 + size 0x000000000011e839 + offset 212992 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Load command 4 + cmd LC_SEGMENT_64 + cmdsize 72 + segname __LINKEDIT + vmaddr 0x0000000100154000 + vmsize 0x0000000000010000 + fileoff 1392640 + filesize 51760 + maxprot r-- + initprot r-- + nsects 0 + flags (none) + Load command 5 + cmd LC_DYLD_INFO_ONLY + cmdsize 48 + rebase_off 1392640 + rebase_size 1376 + bind_off 1394016 + bind_size 3192 + weak_bi +2019-02-12 23:21:28 +0000 nd_off 0 + weak_bind_size 0 + lazy_bind_off 1397208 + lazy_bind_size 1984 + export_off 1399192 + export_size 32 + Load command 6 + cmd LC_SYMTAB + cmdsize 24 + symoff 1400168 + nsyms 157 + stroff 1403316 + strsize 3928 + Load command 7 + cmd LC_DYSYMTAB + cmdsize 80 + ilocalsym 0 + nlocalsym 1 + iextdefsym 1 + nextdefsym 1 + iundefsym 2 + nundefsym 155 + tocoff 0 + ntoc 0 + modtaboff 0 + nmodtab 0 + extrefsymoff 0 + nextrefsyms 0 + indirectsymoff 1402680 + nindirectsyms 159 + extreloff 0 + nextrel 0 + locreloff 0 + nlocrel 0 + Load command 8 + cmd LC_LOAD_DYLINKER + cmdsize 32 + name /usr/lib/dyld (offset 12) + Load command 9 + cmd LC_UUID + cmdsize 24 + uuid B9008DD1-4500-3E7C-A200-9A37DFBCA9F2 + Load command 10 + cmd LC_VERSION_MIN_IPHONEOS + cmdsize 16 + version 9.0 + sdk 12.1 + Load command 11 + cmd LC_SOURCE_VERSION + cmdsize 16 + version 0.0 + Load command 12 + cmd LC_MAIN + cmdsize 24 + entryoff 100300 + stacksize 0 + Load command 13 + cmd LC_ENCRYPTION_INFO_64 + cmdsize 24 + cryptoff 16384 + cryptsize 147456 + cryptid 0 + pad 0 + Load command 14 + cmd LC_LOAD_DYLIB + cmdsize 80 + name /System/Library/Frameworks/Security.framework/Security (offset 24) + time stamp 2 Thu Jan 1 01:00:02 1970 + current version 58286.222.2 + compatibility version 1.0.0 + Load command 15 + cmd LC_LOAD_DYLIB + cmdsize 88 + name /System/Library/Frameworks/Foundation.framework/Foundation (offset 24) + time stamp 2 Thu Jan 1 01:00:02 1970 + current version 1560.10.0 + compatibility version 300.0.0 + Load command 16 + cmd LC_LOAD_DYLIB + cmdsize 56 + name /usr/lib/libobjc.A.dylib (offset 24) + time stamp 2 Thu Jan 1 01:00:02 1970 + current version 228.0.0 + compatibility version 1.0.0 + Load command 17 + cmd LC_LOAD_DYLIB + cmdsize 56 + name /usr/lib/libSystem.B.dylib (offset 24) + time stamp 2 Thu Jan 1 01:00:02 1970 + current version 1252.200.5 + compatibility version 1.0.0 + Load command 18 + cmd LC_LOAD_DYLIB + cmdsize 96 + name /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation (offset 24) + time stamp 2 Thu Jan 1 01:00:02 1970 + current version 1560.10.0 + compatibility version 150.0.0 + Load command 19 + cmd LC_LOAD_DYLIB + cmdsize 88 + name /System/Library/Frameworks/CoreGraphics.framework/CoreGraphics (offset 24) + time stamp 2 Thu Jan 1 01:00:02 1970 + current version 1245.9.2 + compatibility version 64.0.0 + Load command 20 + cmd LC_LOAD_DYLIB + cmdsize 104 + name /System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration (offset 24) + time stamp 2 Thu Jan 1 01:00:02 1970 + current version 963.200.27 + compatibility version 1.0.0 + Load command 21 + cmd LC_LOAD_DYLIB + cmdsize 80 + name /System/Library/Frameworks/UIKit.framework/UIKit (offset 24) + time stamp 2 Thu Jan 1 01:00:02 1970 + current version 61000.0.0 + compatibility version 1.0.0 + Load command 22 +2019-02-12 23:21:28 +0000 + cmd LC_RPATH + cmdsize 40 + path @executable_path/Frameworks (offset 12) + Load command 23 + cmd LC_FUNCTION_STARTS + cmdsize 16 + dataoff 1399224 + datasize 928 + Load command 24 + cmd LC_DATA_IN_CODE + cmdsize 16 + dataoff 1400152 + datasize 16 + Load command 25 + cmd LC_CODE_SIGNATURE + cmdsize 16 + dataoff 1407248 + datasize 37152 + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/_CodeSignature/CodeResources +2019-02-12 23:21:28 +0000 Command exited with pid 25884 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/_CodeSignature/CodeResources + Stdout: + XML 1.0 document text, ASCII text + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/embedded.mobileprovision +2019-02-12 23:21:28 +0000 Command exited with pid 25885 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/embedded.mobileprovision + Stdout: + data + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/en.lproj/Localizable.strings +2019-02-12 23:21:28 +0000 Command exited with pid 25886 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/en.lproj/Localizable.strings + Stdout: + Apple binary property list + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/it.lproj/LaunchScreen.strings +2019-02-12 23:21:28 +0000 Command exited with pid 25887 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/it.lproj/LaunchScreen.strings + Stdout: + very short file (no magic) + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/it.lproj/Localizable.strings +2019-02-12 23:21:28 +0000 Command exited with pid 25888 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/it.lproj/Localizable.strings + Stdout: + Apple binary property list + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/it.lproj/Main.strings +2019-02-12 23:21:28 +0000 Command exited with pid 25889 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/it.lproj/Main.strings + Stdout: + ASCII text + + Stderr: + +2019-02-12 23:21:28 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/open-24.ttf +2019-02-12 23:21:28 +0000 Command exited with pid 25890 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/open-24.ttf + Stdout: + TrueType Font data, 11 tables, 1st "OS/2", 48 names, Macintosh, Open 24 Display st | this font is an original design of southype | free for personal use.Regula + + Stderr: + +2019-02-12 23:21:29 +0000 Complete LinkageGraph: + Telegea.app/Telegea armv7 -> + + Telegea.app/Telegea arm64 -> +2019-02-12 23:21:29 +0000 Validating IPA structure... +2019-02-12 23:21:29 +0000 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo -thin armv7 /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Telegea -output /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-in/armv7/Payload/Telegea.app/Telegea +2019-02-12 23:21:29 +0000 Compiling bitcode... +2019-02-12 23:21:29 +0000 Command exited with pid 25927 exit 0: + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo -thin armv7 /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Telegea -output /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-in/armv7/Payload/Telegea.app/Telegea + Stdout: + + Stderr: + +2019-02-12 23:21:29 +0000 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo -thin arm64 /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Telegea -output /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-in/arm64/Payload/Telegea.app/Telegea +2019-02-12 23:21:29 +0000 Command exited with pid 25928 exit 0: + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo -thin arm64 /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Telegea -output /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-in/arm64/Payload/Telegea.app/Telegea + Stdout: + + Stderr: + +2019-02-12 23:21:29 +0000 /Applications/Xcode.app/Contents/Developer/usr/bin/bitcode-build-tool -v -t /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin --sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -o /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/armv7/Payload/Telegea.app/Telegea --generate-dsym /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/armv7/Payload/Telegea.app/Telegea.dSYM --strip-swift-symbols /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-in/armv7/Payload/Telegea.app/Telegea +2019-02-12 23:21:29 +0000 Compiling bitcode for armv7... + Compiling armv7 bitcode in 'Telegea' +2019-02-12 23:21:31 +0000 Command exited with pid 25929 exit 0: + /Applications/Xcode.app/Contents/Developer/usr/bin/bitcode-build-tool -v -t /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin --sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -o /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/armv7/Payload/Telegea.app/Telegea --generate-dsym /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/armv7/Payload/Telegea.app/Telegea.dSYM --strip-swift-symbols /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-in/armv7/Payload/Telegea.app/Telegea + Stdout: + Debug: SDK path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk + Debug: PATH: ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin', '/Applications/Xcode.app/Contents/Developer/usr/bin'] + Debug: Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo + MachoInfo: cd / + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo" "-info" "/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-in/armv7/Payload/Telegea.app/Telegea" + -= Output =- + Non-fat file: /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-in/armv7/Payload/Telegea.app/Telegea is architecture: armv7 + Exited with 0 + + Debug: Command took 0 seconds + Debug: Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dwarfdump + GetUUID: cd / + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dwarfdump" "-u" "/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-in/armv7/Payload/Telegea.app/Telegea" + -= Output =- + UUID: 8EE7DC18-45DB-305E-B0E3-58619FAE735C (armv7) /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-in/armv7/Payload/Telegea.app/Telegea + Exited with 0 + + Debug: Command took 0 seconds + Debug: Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/segedit + ExtractXAR: cd / + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/segedit" "/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-in/armv7/Payload/Telegea.app/Telegea" "-extract" "__LLVM" "__bundle" "/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/Telegea31V2p4/Telegea.armv7.xar" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Debug: Bitcode bundle version: 1.0 + Debug: Setting platform to: iOS + Debug: Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld + Debug: Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempwNNF3V + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "thumbv7-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "apcs-gnu" "-mfloat-abi" "soft" "-Os" "-mllvm" "-arm-bitcode-compatibility" "-mllvm" "-fast-isel=0" "-x" "ir" "01" "-o" "01.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempwNNF3V + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "thumbv7-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "apcs-gnu" "-mfloat-abi" "soft" "-Os" "-mllvm" "-arm-bitcode-compatibility" "-mllvm" "-fast-isel=0" "-x" "ir" "02" "-o" "02.o" +2019-02-12 23:21:31 +0000 -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempwNNF3V + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "thumbv7-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "apcs-gnu" "-mfloat-abi" "soft" "-Os" "-mllvm" "-arm-bitcode-compatibility" "-mllvm" "-fast-isel=0" "-x" "ir" "03" "-o" "03.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempwNNF3V + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "thumbv7-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "apcs-gnu" "-mfloat-abi" "soft" "-Os" "-mllvm" "-arm-bitcode-compatibility" "-mllvm" "-fast-isel=0" "-x" "ir" "04" "-o" "04.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempwNNF3V + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "thumbv7-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "apcs-gnu" "-mfloat-abi" "soft" "-Os" "-mllvm" "-arm-bitcode-compatibility" "-mllvm" "-fast-isel=0" "-x" "ir" "05" "-o" "05.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempwNNF3V + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "thumbv7-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "apcs-gnu" "-mfloat-abi" "soft" "-Os" "-mllvm" "-arm-bitcode-compatibility" "-mllvm" "-fast-isel=0" "-x" "ir" "06" "-o" "06.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempwNNF3V + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "thumbv7-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "apcs-gnu" "-mfloat-abi" "soft" "-Os" "-mllvm" "-arm-bitcode-compatibility" "-mllvm" "-fast-isel=0" "-x" "ir" "07" "-o" "07.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempwNNF3V + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "thumbv7-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "apcs-gnu" "-mfloat-abi" "soft" "-Os" "-mllvm" "-arm-bitcode-compatibility" "-mllvm" "-fast-isel=0" "-x" "ir" "08" "-o" "08.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempwNNF3V + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "thumbv7-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "apcs-gnu" "-mfloat-abi" "soft" "-Os" "-mllvm" "-arm-bitcode-compatibility" "-mllvm" "-fast-isel=0" "-x" "ir" "09" "-o" "09.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempwNNF3V + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "thumbv7-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "apcs-gnu" "-mfloat-abi" "soft" "-Os" "-mllvm" "-arm-bitcode-compatibility" "-mllvm" "-fast-isel=0" "-x" "ir" "10" "-o" "10.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempwNNF3V + "/Applic +2019-02-12 23:21:31 +0000 ations/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "thumbv7-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "apcs-gnu" "-mfloat-abi" "soft" "-Os" "-mllvm" "-arm-bitcode-compatibility" "-mllvm" "-fast-isel=0" "-x" "ir" "11" "-o" "11.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempwNNF3V + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "thumbv7-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "apcs-gnu" "-mfloat-abi" "soft" "-Os" "-mllvm" "-arm-bitcode-compatibility" "-mllvm" "-fast-isel=0" "-x" "ir" "12" "-o" "12.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempwNNF3V + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "thumbv7-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "apcs-gnu" "-mfloat-abi" "soft" "-Os" "-mllvm" "-arm-bitcode-compatibility" "-mllvm" "-fast-isel=0" "-x" "ir" "13" "-o" "13.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempwNNF3V + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "thumbv7-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "apcs-gnu" "-mfloat-abi" "soft" "-Os" "-mllvm" "-arm-bitcode-compatibility" "-mllvm" "-fast-isel=0" "-x" "ir" "14" "-o" "14.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempwNNF3V + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "thumbv7-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "apcs-gnu" "-mfloat-abi" "soft" "-Os" "-mllvm" "-arm-bitcode-compatibility" "-mllvm" "-fast-isel=0" "-x" "ir" "15" "-o" "15.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempwNNF3V + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "thumbv7-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "apcs-gnu" "-mfloat-abi" "soft" "-Os" "-mllvm" "-arm-bitcode-compatibility" "-mllvm" "-fast-isel=0" "-x" "ir" "16" "-o" "16.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempwNNF3V + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "thumbv7-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "apcs-gnu" "-mfloat-abi" "soft" "-Os" "-mllvm" "-arm-bitcode-compatibility" "-mllvm" "-fast-isel=0" "-x" "ir" "17" "-o" "17.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempwNNF3V + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "thumbv7-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "apcs-gnu" "-mfloat-abi" "soft" "-Os" "-mllvm" "-arm-bitcode-compatibility" "-mllvm" "-fast-isel=0" "-x" "ir" "18" "-o" "18.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempwNNF3V + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "thumbv7-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "apcs- +2019-02-12 23:21:31 +0000 gnu" "-mfloat-abi" "soft" "-Os" "-mllvm" "-arm-bitcode-compatibility" "-mllvm" "-fast-isel=0" "-x" "ir" "19" "-o" "19.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempwNNF3V + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "thumbv7-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "apcs-gnu" "-mfloat-abi" "soft" "-Os" "-mllvm" "-arm-bitcode-compatibility" "-mllvm" "-fast-isel=0" "-x" "ir" "20" "-o" "20.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempwNNF3V + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "thumbv7-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "apcs-gnu" "-mfloat-abi" "soft" "-Os" "-mllvm" "-arm-bitcode-compatibility" "-mllvm" "-fast-isel=0" "-x" "ir" "21" "-o" "21.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Security.framework/Security.tbd + Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Foundation.framework/Foundation.tbd + Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/lib/libobjc.A.tbd + Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/lib/libSystem.B.tbd + Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation.tbd + Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics.tbd + Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration.tbd + Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/UIKit.framework/UIKit.tbd + Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/lib/libobjc.A.tbd + Ld: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempwNNF3V + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" "-arch" "armv7" "-execute" "-ios_version_min" "9.0.0" "-e" "_main" "-rpath" "@executable_path/Frameworks" "-executable_path" "/Users/lucaberetta/Library/Developer/Xcode/DerivedData/Telegea-bpsltimmskdeibexizjvihztmrby/Build/Intermediates.noindex/ArchiveIntermediates/Telegea/IntermediateBuildFilesPath/Telegea.build/Release-iphoneos/Telegea.build/Objects-normal/armv7/Telegea" "-dead_strip" "-syslibroot" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk" "-sdk_version" "12.1.0" "-filelist" "/private/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/Telegea31V2p4/Telegea.armv7.out.LinkFileList" "-ignore_auto_link" "-allow_dead_duplicates" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Security.framework/Security.tbd" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Foundation.framewor +2019-02-12 23:21:31 +0000 k/Foundation.tbd" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/lib/libobjc.A.tbd" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/lib/libSystem.B.tbd" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation.tbd" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics.tbd" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration.tbd" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/UIKit.framework/UIKit.tbd" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/lib/libobjc.A.tbd" "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/lib/darwin/libclang_rt.ios.a" "-o" "/private/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/Telegea31V2p4/Telegea.armv7.out" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + warning: Cannot genarte useful dsym from input macho file: /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-in/armv7/Payload/Telegea.app/Telegea + + GetUUID: cd / + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dwarfdump" "-u" "/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/armv7/Payload/Telegea.app/Telegea" + -= Output =- + UUID: 97E38482-C1CA-38C4-A1A3-AB6C9DB6820B (armv7) /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/armv7/Payload/Telegea.app/Telegea + Exited with 0 + + Debug: Command took 0 seconds + Debug: Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil + Dsymutil: cd / + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil" "/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/armv7/Payload/Telegea.app/Telegea" "-o" "/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/armv7/Payload/Telegea.app/Telegea.dSYM" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Debug: Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip + StripSymbols: cd / + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip" "/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/armv7/Payload/Telegea.app/Telegea" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + + Stderr: + +/Applications/Xcode.app/Contents/Developer/usr/bin/symbols -failIfMissingDsym -symbolsPackageDir /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/armv7/Payload/Telegea.app /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/armv7/Payload/Telegea.app/Telegea +2019-02-12 23:21:32 +0000 Command exited with pid 25963 exit 0: + /Applications/Xcode.app/Contents/Developer/usr/bin/symbols -failIfMissingDsym -symbolsPackageDir /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/armv7/Payload/Telegea.app /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/armv7/Payload/Telegea.app/Telegea + Stdout: + /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/armv7/Payload/Telegea.app/Telegea [armv7, 0.008092 seconds]: + + Stderr: + +2019-02-12 23:21:32 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/armv7/Payload/Telegea.app/Telegea.dSYM/Contents/Resources/DWARF/Telegea +2019-02-12 23:21:32 +0000 Command exited with pid 25964 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/armv7/Payload/Telegea.app/Telegea.dSYM/Contents/Resources/DWARF/Telegea + Stdout: + Mach-O dSYM companion file arm_v7 + + Stderr: + +2019-02-12 23:21:32 +0000 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo -info /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/armv7/Payload/Telegea.app/Telegea.dSYM/Contents/Resources/DWARF/Telegea +2019-02-12 23:21:32 +0000 Command exited with pid 25965 exit 0: + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo -info /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/armv7/Payload/Telegea.app/Telegea.dSYM/Contents/Resources/DWARF/Telegea + Stdout: + Non-fat file: /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/armv7/Payload/Telegea.app/Telegea.dSYM/Contents/Resources/DWARF/Telegea is architecture: armv7 + + Stderr: + +2019-02-12 23:21:32 +0000 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -h -v -m -arch all /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/armv7/Payload/Telegea.app/Telegea.dSYM/Contents/Resources/DWARF/Telegea +2019-02-12 23:21:32 +0000 Command exited with pid 25966 exit 0: + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -h -v -m -arch all /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/armv7/Payload/Telegea.app/Telegea.dSYM/Contents/Resources/DWARF/Telegea + Stdout: + Mach header + magic cputype cpusubtype caps filetype ncmds sizeofcmds flags + MH_MAGIC ARM V7 0x00 DSYM 7 2844 0x00000000 + + Stderr: + +2019-02-12 23:21:32 +0000 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l -v -m -arch armv7 /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/armv7/Payload/Telegea.app/Telegea.dSYM/Contents/Resources/DWARF/Telegea +2019-02-12 23:21:32 +0000 Command exited with pid 25968 exit 0: + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l -v -m -arch armv7 /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/armv7/Payload/Telegea.app/Telegea.dSYM/Contents/Resources/DWARF/Telegea + Stdout: + /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/armv7/Payload/Telegea.app/Telegea.dSYM/Contents/Resources/DWARF/Telegea: + Mach header + magic cputype cpusubtype caps filetype ncmds sizeofcmds flags + MH_MAGIC ARM V7 0x00 DSYM 7 2844 0x00000000 + Load command 0 + cmd LC_UUID + cmdsize 24 + uuid 97E38482-C1CA-38C4-A1A3-AB6C9DB6820B + Load command 1 + cmd LC_SYMTAB + cmdsize 24 + symoff 4096 + nsyms 996 + stroff 16048 + strsize 13551 + Load command 2 + cmd LC_SEGMENT + cmdsize 56 + segname __PAGEZERO + vmaddr 0x00000000 + vmsize 0x00004000 + fileoff 0 + filesize 0 + maxprot --- + initprot --- + nsects 0 + flags (none) + Load command 3 + cmd LC_SEGMENT + cmdsize 736 + segname __TEXT + vmaddr 0x00004000 + vmsize 0x00028000 + fileoff 0 + filesize 0 + maxprot r-x + initprot r-x + nsects 10 + flags (none) + Section + sectname __text + segname __TEXT + addr 0x0000ba84 + size 0x00017b00 + offset 0 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes PURE_INSTRUCTIONS SOME_INSTRUCTIONS + reserved1 0 + reserved2 0 + Section + sectname __picsymbolstub4 + segname __TEXT + addr 0x00023584 + size 0x00000480 + offset 0 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_SYMBOL_STUBS + attributes PURE_INSTRUCTIONS SOME_INSTRUCTIONS + reserved1 0 (index into indirect symbol table) + reserved2 16 (size of stubs) + Section + sectname __stub_helper + segname __TEXT + addr 0x00023a04 + size 0x00000384 + offset 0 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes PURE_INSTRUCTIONS SOME_INSTRUCTIONS + reserved1 0 + reserved2 0 + Section + sectname __objc_methname + segname __TEXT + addr 0x00023d88 + size 0x00004a8c + offset 0 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_CSTRING_LITERALS + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __cstring + segname __TEXT + addr 0x00028814 + size 0x000019d5 + offset 0 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_CSTRING_LITERALS + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __objc_classname + segname __TEXT + addr 0x0002a1e9 + size 0x00000344 + offset 0 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_CSTRING_LITERALS + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __objc_methtype + segname __TEXT + addr 0x0002a52d + size 0x00001a53 + offset 0 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_CSTRING_LITERALS + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __gcc_except_tab + segname __TEXT + addr 0x0002bf80 + +2019-02-12 23:21:32 +0000 size 0x00000020 + offset 0 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __const + segname __TEXT + addr 0x0002bfa0 + size 0x00000008 + offset 0 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __ustring + segname __TEXT + addr 0x0002bfa8 + size 0x00000056 + offset 0 + align 2^1 (2) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Load command 4 + cmd LC_SEGMENT + cmdsize 1144 + segname __DATA + vmaddr 0x0002c000 + vmsize 0x00008000 + fileoff 0 + filesize 0 + maxprot rw- + initprot rw- + nsects 16 + flags (none) + Section + sectname __nl_symbol_ptr + segname __DATA + addr 0x0002c000 + size 0x00000068 + offset 0 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_NON_LAZY_SYMBOL_POINTERS + attributes (none) + reserved1 72 (index into indirect symbol table) + reserved2 0 + Section + sectname __la_symbol_ptr + segname __DATA + addr 0x0002c068 + size 0x00000120 + offset 0 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_LAZY_SYMBOL_POINTERS + attributes (none) + reserved1 98 (index into indirect symbol table) + reserved2 0 + Section + sectname __const + segname __DATA + addr 0x0002c188 + size 0x00000750 + offset 0 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __cfstring + segname __DATA + addr 0x0002c8d8 + size 0x000008c0 + offset 0 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __objc_classlist + segname __DATA + addr 0x0002d198 + size 0x00000060 + offset 0 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes NO_DEAD_STRIP + reserved1 0 + reserved2 0 + Section + sectname __objc_catlist + segname __DATA + addr 0x0002d1f8 + size 0x00000000 + offset 0 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_REGULAR + attributes NO_DEAD_STRIP + reserved1 0 + reserved2 0 + Section + sectname __objc_protolist + segname __DATA + addr 0x0002d1f8 + size 0x00000040 + offset 0 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __objc_imageinfo + segname __DATA + addr 0x0002d238 + size 0x00000008 + offset 0 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __objc_const + segname __DATA + addr 0x0002d240 + size 0x00003e04 + offset 0 + align 2^3 (8) + reloff 0 + nreloc 0 + type S_REGULAR + at +2019-02-12 23:21:32 +0000 tributes (none) + reserved1 0 + reserved2 0 + Section + sectname __objc_selrefs + segname __DATA + addr 0x00031044 + size 0x00000800 + offset 0 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_LITERAL_POINTERS + attributes NO_DEAD_STRIP + reserved1 0 + reserved2 0 + Section + sectname __objc_classrefs + segname __DATA + addr 0x00031844 + size 0x000000f0 + offset 0 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes NO_DEAD_STRIP + reserved1 0 + reserved2 0 + Section + sectname __objc_superrefs + segname __DATA + addr 0x00031934 + size 0x00000054 + offset 0 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes NO_DEAD_STRIP + reserved1 0 + reserved2 0 + Section + sectname __objc_ivar + segname __DATA + addr 0x00031988 + size 0x000001f0 + offset 0 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __objc_data + segname __DATA + addr 0x00031b78 + size 0x000003c0 + offset 0 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __data + segname __DATA + addr 0x00031f38 + size 0x00000344 + offset 0 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __bss + segname __DATA + addr 0x0003227c + size 0x00000008 + offset 0 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_ZEROFILL + attributes (none) + reserved1 0 + reserved2 0 + Load command 5 + cmd LC_SEGMENT + cmdsize 56 + segname __LINKEDIT + vmaddr 0x00034000 + vmsize 0x00007000 + fileoff 4096 + filesize 25503 + maxprot r-- + initprot r-- + nsects 0 + flags (none) + Load command 6 + cmd LC_SEGMENT + cmdsize 804 + segname __DWARF + vmaddr 0x0003b000 + vmsize 0x00014000 + fileoff 32768 + filesize 80931 + maxprot rwx + initprot rw- + nsects 11 + flags (none) + Section + sectname __debug_line + segname __DWARF + addr 0x0003b000 + size 0x00007ad1 + offset 32768 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __debug_pubnames + segname __DWARF + addr 0x00042ad1 + size 0x00003375 + offset 64209 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __debug_aranges + segname __DWARF + addr 0x00045e46 + size 0x00000300 + offset 77382 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __debug_info + segname __DWARF + addr 0x00046146 + size 0x000028b8 + offset 78150 + align 2^0 (1) + +2019-02-12 23:21:32 +0000 reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __debug_ranges + segname __DWARF + addr 0x000489fe + size 0x00000098 + offset 88574 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __debug_abbrev + segname __DWARF + addr 0x00048a96 + size 0x00000062 + offset 88726 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __debug_str + segname __DWARF + addr 0x00048af8 + size 0x000021d7 + offset 88824 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __apple_names + segname __DWARF + addr 0x0004accf + size 0x00003edc + offset 97487 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __apple_namespac + segname __DWARF + addr 0x0004ebab + size 0x00000024 + offset 113579 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __apple_types + segname __DWARF + addr 0x0004ebcf + size 0x00000030 + offset 113615 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __apple_objc + segname __DWARF + addr 0x0004ebff + size 0x00000024 + offset 113663 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + + Stderr: + +2019-02-12 23:21:32 +0000 warning: Could not determine platform for armv7 in /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/armv7/Payload/Telegea.app/Telegea.dSYM/Contents/Resources/DWARF/Telegea +2019-02-12 23:21:32 +0000 /Applications/Xcode.app/Contents/Developer/usr/bin/bitcode-build-tool -v -t /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin --sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -o /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/arm64/Payload/Telegea.app/Telegea --generate-dsym /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/arm64/Payload/Telegea.app/Telegea.dSYM --strip-swift-symbols /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-in/arm64/Payload/Telegea.app/Telegea +2019-02-12 23:21:32 +0000 Compiling bitcode for arm64... + Compiling arm64 bitcode in 'Telegea' +2019-02-12 23:21:34 +0000 Command exited with pid 25970 exit 0: + /Applications/Xcode.app/Contents/Developer/usr/bin/bitcode-build-tool -v -t /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin --sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -o /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/arm64/Payload/Telegea.app/Telegea --generate-dsym /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/arm64/Payload/Telegea.app/Telegea.dSYM --strip-swift-symbols /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-in/arm64/Payload/Telegea.app/Telegea + Stdout: + Debug: SDK path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk + Debug: PATH: ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin', '/Applications/Xcode.app/Contents/Developer/usr/bin'] + Debug: Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo + MachoInfo: cd / + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo" "-info" "/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-in/arm64/Payload/Telegea.app/Telegea" + -= Output =- + Non-fat file: /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-in/arm64/Payload/Telegea.app/Telegea is architecture: arm64 + Exited with 0 + + Debug: Command took 0 seconds + Debug: Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dwarfdump + GetUUID: cd / + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dwarfdump" "-u" "/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-in/arm64/Payload/Telegea.app/Telegea" + -= Output =- + UUID: B9008DD1-4500-3E7C-A200-9A37DFBCA9F2 (arm64) /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-in/arm64/Payload/Telegea.app/Telegea + Exited with 0 + + Debug: Command took 0 seconds + Debug: Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/segedit + ExtractXAR: cd / + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/segedit" "/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-in/arm64/Payload/Telegea.app/Telegea" "-extract" "__LLVM" "__bundle" "/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/TelegeaI1iiSl/Telegea.arm64.xar" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Debug: Bitcode bundle version: 1.0 + Debug: Setting platform to: iOS + Debug: Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld + Debug: Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempMcpupR + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "arm64-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "darwinpcs" "-Os" "-x" "ir" "01" "-o" "01.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempMcpupR + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "arm64-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "darwinpcs" "-Os" "-x" "ir" "02" "-o" "02.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempMcpupR +2019-02-12 23:21:34 +0000 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "arm64-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "darwinpcs" "-Os" "-x" "ir" "03" "-o" "03.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempMcpupR + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "arm64-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "darwinpcs" "-Os" "-x" "ir" "04" "-o" "04.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempMcpupR + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "arm64-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "darwinpcs" "-Os" "-x" "ir" "05" "-o" "05.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempMcpupR + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "arm64-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "darwinpcs" "-Os" "-x" "ir" "06" "-o" "06.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempMcpupR + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "arm64-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "darwinpcs" "-Os" "-x" "ir" "07" "-o" "07.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempMcpupR + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "arm64-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "darwinpcs" "-Os" "-x" "ir" "08" "-o" "08.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempMcpupR + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "arm64-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "darwinpcs" "-Os" "-x" "ir" "09" "-o" "09.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempMcpupR + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "arm64-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "darwinpcs" "-Os" "-x" "ir" "10" "-o" "10.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempMcpupR + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "arm64-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "darwinpcs" "-Os" "-x" "ir" "11" "-o" "11.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempMcpupR + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "arm64-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "darwinpcs" "-Os" "-x" "ir" "12" "-o" "12.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempMcpupR + "/Applications/Xcode.app/Contents/Deve +2019-02-12 23:21:34 +0000 loper/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "arm64-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "darwinpcs" "-Os" "-x" "ir" "13" "-o" "13.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempMcpupR + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "arm64-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "darwinpcs" "-Os" "-x" "ir" "14" "-o" "14.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempMcpupR + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "arm64-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "darwinpcs" "-Os" "-x" "ir" "15" "-o" "15.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempMcpupR + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "arm64-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "darwinpcs" "-Os" "-x" "ir" "16" "-o" "16.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempMcpupR + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "arm64-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "darwinpcs" "-Os" "-x" "ir" "17" "-o" "17.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempMcpupR + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "arm64-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "darwinpcs" "-Os" "-x" "ir" "18" "-o" "18.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempMcpupR + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "arm64-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "darwinpcs" "-Os" "-x" "ir" "19" "-o" "19.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempMcpupR + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "arm64-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "darwinpcs" "-Os" "-x" "ir" "20" "-o" "20.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Clang: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempMcpupR + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "arm64-apple-ios9.0.0" "-emit-obj" "-disable-llvm-passes" "-target-abi" "darwinpcs" "-Os" "-x" "ir" "21" "-o" "21.o" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Security.framework/Security.tbd + Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Foundation.framework/Foundation.tbd + Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/lib/libobjc.A.tbd + De +2019-02-12 23:21:34 +0000 bug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/lib/libSystem.B.tbd + Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation.tbd + Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics.tbd + Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration.tbd + Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/UIKit.framework/UIKit.tbd + Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/lib/libobjc.A.tbd + Ld: cd /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/tempMcpupR + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" "-arch" "arm64" "-execute" "-ios_version_min" "9.0.0" "-e" "_main" "-rpath" "@executable_path/Frameworks" "-executable_path" "/Users/lucaberetta/Library/Developer/Xcode/DerivedData/Telegea-bpsltimmskdeibexizjvihztmrby/Build/Intermediates.noindex/ArchiveIntermediates/Telegea/IntermediateBuildFilesPath/Telegea.build/Release-iphoneos/Telegea.build/Objects-normal/arm64/Telegea" "-dead_strip" "-syslibroot" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk" "-sdk_version" "12.1.0" "-filelist" "/private/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/TelegeaI1iiSl/Telegea.arm64.out.LinkFileList" "-ignore_auto_link" "-allow_dead_duplicates" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Security.framework/Security.tbd" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Foundation.framework/Foundation.tbd" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/lib/libobjc.A.tbd" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/lib/libSystem.B.tbd" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation.tbd" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics.tbd" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration.tbd" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/UIKit.framework/UIKit.tbd" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/lib/libobjc.A.tbd" "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/lib/darwin/libclang_rt.ios.a" "-o" "/private/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/TelegeaI1iiSl/Telegea.arm64.out" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + warning: Cannot genarte useful dsym from input macho file: /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-in/arm64/Payload/Telegea.app/Telegea + + GetUUID: cd / + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dwarfdump" "-u" "/var/folders/1c/5qnq9bmd +2019-02-12 23:21:34 +0000 1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/arm64/Payload/Telegea.app/Telegea" + -= Output =- + UUID: 832E6F39-A32D-309F-9143-3F0F97C9E793 (arm64) /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/arm64/Payload/Telegea.app/Telegea + Exited with 0 + + Debug: Command took 0 seconds + Debug: Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil + Dsymutil: cd / + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil" "/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/arm64/Payload/Telegea.app/Telegea" "-o" "/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/arm64/Payload/Telegea.app/Telegea.dSYM" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + Debug: Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip + StripSymbols: cd / + "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip" "/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/arm64/Payload/Telegea.app/Telegea" + -= Output =- + Exited with 0 + + Debug: Command took 0 seconds + + Stderr: + +/Applications/Xcode.app/Contents/Developer/usr/bin/symbols -failIfMissingDsym -symbolsPackageDir /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/arm64/Payload/Telegea.app /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/arm64/Payload/Telegea.app/Telegea +2019-02-12 23:21:34 +0000 Command exited with pid 26005 exit 0: + /Applications/Xcode.app/Contents/Developer/usr/bin/symbols -failIfMissingDsym -symbolsPackageDir /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/arm64/Payload/Telegea.app /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/arm64/Payload/Telegea.app/Telegea + Stdout: + /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/arm64/Payload/Telegea.app/Telegea [arm64, 0.008857 seconds]: + + Stderr: + +2019-02-12 23:21:34 +0000 /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/arm64/Payload/Telegea.app/Telegea.dSYM/Contents/Resources/DWARF/Telegea +2019-02-12 23:21:34 +0000 Command exited with pid 26006 exit 0: + /usr/bin/file -b -- /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/arm64/Payload/Telegea.app/Telegea.dSYM/Contents/Resources/DWARF/Telegea + Stdout: + Mach-O 64-bit dSYM companion file arm64 + + Stderr: + +2019-02-12 23:21:34 +0000 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo -info /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/arm64/Payload/Telegea.app/Telegea.dSYM/Contents/Resources/DWARF/Telegea +2019-02-12 23:21:34 +0000 Command exited with pid 26007 exit 0: + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo -info /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/arm64/Payload/Telegea.app/Telegea.dSYM/Contents/Resources/DWARF/Telegea + Stdout: + Non-fat file: /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/arm64/Payload/Telegea.app/Telegea.dSYM/Contents/Resources/DWARF/Telegea is architecture: arm64 + + Stderr: + +2019-02-12 23:21:34 +0000 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -h -v -m -arch all /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/arm64/Payload/Telegea.app/Telegea.dSYM/Contents/Resources/DWARF/Telegea +2019-02-12 23:21:34 +0000 Command exited with pid 26008 exit 0: + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -h -v -m -arch all /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/arm64/Payload/Telegea.app/Telegea.dSYM/Contents/Resources/DWARF/Telegea + Stdout: + Mach header + magic cputype cpusubtype caps filetype ncmds sizeofcmds flags + MH_MAGIC_64 ARM64 ALL 0x00 DSYM 7 3448 0x00000000 + + Stderr: + +2019-02-12 23:21:34 +0000 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l -v -m -arch arm64 /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/arm64/Payload/Telegea.app/Telegea.dSYM/Contents/Resources/DWARF/Telegea +2019-02-12 23:21:34 +0000 Command exited with pid 26010 exit 0: + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l -v -m -arch arm64 /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/arm64/Payload/Telegea.app/Telegea.dSYM/Contents/Resources/DWARF/Telegea + Stdout: + /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/arm64/Payload/Telegea.app/Telegea.dSYM/Contents/Resources/DWARF/Telegea: + Mach header + magic cputype cpusubtype caps filetype ncmds sizeofcmds flags + MH_MAGIC_64 ARM64 ALL 0x00 DSYM 7 3448 0x00000000 + Load command 0 + cmd LC_UUID + cmdsize 24 + uuid 832E6F39-A32D-309F-9143-3F0F97C9E793 + Load command 1 + cmd LC_SYMTAB + cmdsize 24 + symoff 4096 + nsyms 981 + stroff 19792 + strsize 13170 + Load command 2 + cmd LC_SEGMENT_64 + cmdsize 72 + segname __PAGEZERO + vmaddr 0x0000000000000000 + vmsize 0x0000000100000000 + fileoff 0 + filesize 0 + maxprot --- + initprot --- + nsects 0 + flags (none) + Load command 3 + cmd LC_SEGMENT_64 + cmdsize 952 + segname __TEXT + vmaddr 0x0000000100000000 + vmsize 0x0000000000028000 + fileoff 0 + filesize 0 + maxprot r-x + initprot r-x + nsects 11 + flags (none) + Section + sectname __text + segname __TEXT + addr 0x0000000100004728 + size 0x000000000001a568 + offset 0 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes PURE_INSTRUCTIONS SOME_INSTRUCTIONS + reserved1 0 + reserved2 0 + Section + sectname __stubs + segname __TEXT + addr 0x000000010001ec90 + size 0x0000000000000324 + offset 0 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_SYMBOL_STUBS + attributes PURE_INSTRUCTIONS SOME_INSTRUCTIONS + reserved1 0 (index into indirect symbol table) + reserved2 12 (size of stubs) + Section + sectname __stub_helper + segname __TEXT + addr 0x000000010001efb4 + size 0x000000000000033c + offset 0 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes PURE_INSTRUCTIONS SOME_INSTRUCTIONS + reserved1 0 + reserved2 0 + Section + sectname __const + segname __TEXT + addr 0x000000010001f2f0 + size 0x00000000000001e8 + offset 0 + align 2^4 (16) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __objc_methname + segname __TEXT + addr 0x000000010001f4d8 + size 0x0000000000004a9e + offset 0 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_CSTRING_LITERALS + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __cstring + segname __TEXT + addr 0x0000000100023f76 + size 0x00000000000019dd + offset 0 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_CSTRING_LITERALS + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __objc_classname + segname __TEXT + addr 0x0000000100025953 + size 0x0000000000000342 + offset 0 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_CSTRING_LITERALS + attributes (none) + reserved1 0 + +2019-02-12 23:21:34 +0000 reserved2 0 + Section + sectname __objc_methtype + segname __TEXT + addr 0x0000000100025c95 + size 0x0000000000001b1a + offset 0 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_CSTRING_LITERALS + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __gcc_except_tab + segname __TEXT + addr 0x00000001000277b0 + size 0x00000000000000cc + offset 0 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __ustring + segname __TEXT + addr 0x000000010002787c + size 0x0000000000000056 + offset 0 + align 2^1 (2) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __unwind_info + segname __TEXT + addr 0x00000001000278d4 + size 0x0000000000000728 + offset 0 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Load command 4 + cmd LC_SEGMENT_64 + cmdsize 1352 + segname __DATA + vmaddr 0x0000000100028000 + vmsize 0x000000000000c000 + fileoff 0 + filesize 0 + maxprot rw- + initprot rw- + nsects 16 + flags (none) + Section + sectname __got + segname __DATA + addr 0x0000000100028000 + size 0x00000000000000c8 + offset 0 + align 2^3 (8) + reloff 0 + nreloc 0 + type S_NON_LAZY_SYMBOL_POINTERS + attributes (none) + reserved1 67 (index into indirect symbol table) + reserved2 0 + Section + sectname __la_symbol_ptr + segname __DATA + addr 0x00000001000280c8 + size 0x0000000000000218 + offset 0 + align 2^3 (8) + reloff 0 + nreloc 0 + type S_LAZY_SYMBOL_POINTERS + attributes (none) + reserved1 92 (index into indirect symbol table) + reserved2 0 + Section + sectname __const + segname __DATA + addr 0x00000001000282e0 + size 0x0000000000000e60 + offset 0 + align 2^3 (8) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __cfstring + segname __DATA + addr 0x0000000100029140 + size 0x0000000000001180 + offset 0 + align 2^3 (8) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __objc_classlist + segname __DATA + addr 0x000000010002a2c0 + size 0x00000000000000c0 + offset 0 + align 2^3 (8) + reloff 0 + nreloc 0 + type S_REGULAR + attributes NO_DEAD_STRIP + reserved1 0 + reserved2 0 + Section + sectname __objc_catlist + segname __DATA + addr 0x000000010002a380 + size 0x0000000000000000 + offset 0 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_REGULAR + attributes NO_DEAD_STRIP + reserved1 0 + reserved2 0 + Section + sectname __objc_protolist + segname __DATA + addr 0x000000010002a380 + size 0x0000000000000080 + offset 0 + align 2^3 (8) + reloff 0 + nreloc 0 + type S_REGULAR + +2019-02-12 23:21:34 +0000 attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __objc_imageinfo + segname __DATA + addr 0x000000010002a400 + size 0x0000000000000008 + offset 0 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __objc_const + segname __DATA + addr 0x000000010002a408 + size 0x00000000000073d8 + offset 0 + align 2^3 (8) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __objc_selrefs + segname __DATA + addr 0x00000001000317e0 + size 0x0000000000001008 + offset 0 + align 2^3 (8) + reloff 0 + nreloc 0 + type S_LITERAL_POINTERS + attributes NO_DEAD_STRIP + reserved1 0 + reserved2 0 + Section + sectname __objc_classrefs + segname __DATA + addr 0x00000001000327e8 + size 0x00000000000001e0 + offset 0 + align 2^3 (8) + reloff 0 + nreloc 0 + type S_REGULAR + attributes NO_DEAD_STRIP + reserved1 0 + reserved2 0 + Section + sectname __objc_superrefs + segname __DATA + addr 0x00000001000329c8 + size 0x00000000000000a8 + offset 0 + align 2^3 (8) + reloff 0 + nreloc 0 + type S_REGULAR + attributes NO_DEAD_STRIP + reserved1 0 + reserved2 0 + Section + sectname __objc_ivar + segname __DATA + addr 0x0000000100032a70 + size 0x00000000000001f0 + offset 0 + align 2^2 (4) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __objc_data + segname __DATA + addr 0x0000000100032c60 + size 0x0000000000000780 + offset 0 + align 2^3 (8) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __data + segname __DATA + addr 0x00000001000333e0 + size 0x0000000000000608 + offset 0 + align 2^3 (8) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __bss + segname __DATA + addr 0x00000001000339e8 + size 0x0000000000000010 + offset 0 + align 2^3 (8) + reloff 0 + nreloc 0 + type S_ZEROFILL + attributes (none) + reserved1 0 + reserved2 0 + Load command 5 + cmd LC_SEGMENT_64 + cmdsize 72 + segname __LINKEDIT + vmaddr 0x0000000100034000 + vmsize 0x0000000000008000 + fileoff 4096 + filesize 28866 + maxprot r-- + initprot r-- + nsects 0 + flags (none) + Load command 6 + cmd LC_SEGMENT_64 + cmdsize 952 + segname __DWARF + vmaddr 0x000000010003c000 + vmsize 0x0000000000013000 + fileoff 36864 + filesize 77040 + maxprot rwx + initprot rw- + nsects 11 + flags (none) + Section + sectname __debug_line + segname __DWARF + addr 0x000000010003c000 + size 0x0000000000005fea + offset 36864 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 +2019-02-12 23:21:34 +0000 Section + sectname __debug_pubnames + segname __DWARF + addr 0x0000000100041fea + size 0x0000000000003375 + offset 61418 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __debug_aranges + segname __DWARF + addr 0x000000010004535f + size 0x0000000000000410 + offset 74591 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __debug_info + segname __DWARF + addr 0x000000010004576f + size 0x000000000000342b + offset 75631 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __debug_ranges + segname __DWARF + addr 0x0000000100048b9a + size 0x0000000000000030 + offset 88986 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __debug_abbrev + segname __DWARF + addr 0x0000000100048bca + size 0x0000000000000053 + offset 89034 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __debug_str + segname __DWARF + addr 0x0000000100048c1d + size 0x00000000000021bb + offset 89117 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __apple_names + segname __DWARF + addr 0x000000010004add8 + size 0x0000000000003ea0 + offset 97752 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __apple_namespac + segname __DWARF + addr 0x000000010004ec78 + size 0x0000000000000024 + offset 113784 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __apple_types + segname __DWARF + addr 0x000000010004ec9c + size 0x0000000000000030 + offset 113820 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + Section + sectname __apple_objc + segname __DWARF + addr 0x000000010004eccc + size 0x0000000000000024 + offset 113868 + align 2^0 (1) + reloff 0 + nreloc 0 + type S_REGULAR + attributes (none) + reserved1 0 + reserved2 0 + + Stderr: + +2019-02-12 23:21:34 +0000 warning: Could not determine platform for arm64 in /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/arm64/Payload/Telegea.app/Telegea.dSYM/Contents/Resources/DWARF/Telegea +2019-02-12 23:21:34 +0000 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo -create -arch armv7 /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/armv7/Payload/Telegea.app/Telegea -arch arm64 /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/arm64/Payload/Telegea.app/Telegea -output /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/universal-MachOs/Payload/Telegea.app/Telegea +2019-02-12 23:21:34 +0000 Command exited with pid 26012 exit 0: + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo -create -arch armv7 /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/armv7/Payload/Telegea.app/Telegea -arch arm64 /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/arm64/Payload/Telegea.app/Telegea -output /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/universal-MachOs/Payload/Telegea.app/Telegea + Stdout: + + Stderr: + +2019-02-12 23:21:34 +0000 Creating universal IPA contents for all variants + Creating directory /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/IDEIPAProcessor.AppThinning.Raz/universal + Copying Telegea.app output payload directory +2019-02-12 23:21:34 +0000 /Library/Ruby/Gems/2.3.0/gems/CFPropertyList-2.3.6/lib/cfpropertylist/rbCFPropertyList.rb:394: warning: File.exists? is a deprecated name, use File.exist? instead +2019-02-12 23:21:34 +0000 Copying .dSYM files to /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/IDEIPAProcessor.AppThinning.Raz/universal/dSYMs + Copying .symbols files to /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/IDEIPAProcessor.AppThinning.Raz/universal/Symbols +2019-02-12 23:21:34 +0000 /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool exited with 0 +2019-02-12 23:21:34 +0000 ipatool JSON: { + alerts = ( + { + code = 3299; + description = "Configuration issue: platform AppleTVSimulator.platform doesn't have any non-simulator SDKs; ignoring it"; + info = { + }; + level = WARN; + }, + { + code = 3299; + description = "Configuration issue: platform WatchSimulator.platform doesn't have any non-simulator SDKs; ignoring it"; + info = { + }; + level = WARN; + }, + { + code = 3299; + description = "Configuration issue: platform iPhoneSimulator.platform doesn't have any non-simulator SDKs; ignoring it"; + info = { + }; + level = WARN; + }, + { + code = 1782; + description = "Could not determine platform for armv7 in /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/armv7/Payload/Telegea.app/Telegea.dSYM/Contents/Resources/DWARF/Telegea"; + info = { + }; + level = WARN; + }, + { + code = 1782; + description = "Could not determine platform for arm64 in /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/ipatool20190213-25825-6e3lf5/thinned-out/arm64/Payload/Telegea.app/Telegea.dSYM/Contents/Resources/DWARF/Telegea"; + info = { + }; + level = WARN; + } + ); + thinnableAssetCatalogs = ( + "/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Assets.car" + ); + universalIPA = { + path = "/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/IDEIPAProcessor.AppThinning.Raz/universal"; + }; +} +2019-02-12 23:21:34 +0000 Processing step: IDEDistributionCodeSlimmingStep +2019-02-12 23:21:34 +0000 Processing step: IDEDistributionCopyBCSymbolMapsStep +2019-02-12 23:21:34 +0000 Processing step: IDEDistributionSymbolsStep +2019-02-12 23:21:34 +0000 Skipping step: IDEDistributionSymbolsStep because it said so +2019-02-12 23:21:34 +0000 Processing step: IDEDistributionAppThinningStep +2019-02-12 23:21:34 +0000 Skipping step: IDEDistributionAppThinningStep because it said so +2019-02-12 23:21:34 +0000 Processing step: IDEDistributionArchThinningStep +2019-02-12 23:21:34 +0000 Running /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo '/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app/Telegea' '-verify_arch' 'arm64e' +2019-02-12 23:21:34 +0000 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo exited with 1 +2019-02-12 23:21:34 +0000 Skipping architecture thinning for item "Telegea" because arch "arm64e" wasn't found +2019-02-12 23:21:34 +0000 Processing step: IDEDistributionODRStep +2019-02-12 23:21:34 +0000 Processing step: IDEDistributionStripXattrsStep +2019-02-12 23:21:34 +0000 Running /usr/bin/xattr '-crs' '/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app' +2019-02-12 23:21:34 +0000 /usr/bin/xattr exited with 0 +2019-02-12 23:21:34 +0000 Processing step: IDEDistributionCodesignStep +2019-02-12 23:21:34 +0000 Entitlements for '>: { + "application-identifier" = "4E74YD2Y2V.com.dekitalia.termogea"; + "com.apple.developer.team-identifier" = 4E74YD2Y2V; + "get-task-allow" = 0; + "keychain-access-groups" = ( + "4E74YD2Y2V.com.dekitalia.termogea" + ); +} +2019-02-12 23:21:34 +0000 Writing entitlements for '> to: /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/entitlementstCo9pI +2019-02-12 23:21:34 +0000 Running /usr/bin/codesign '-vvv' '--force' '--sign' 'AF8A09DE2DA26E9B85755CE5DF3BB1172504C013' '--entitlements' '/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/entitlementstCo9pI' '--preserve-metadata=identifier,flags,runtime' '/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app' +2019-02-12 23:21:34 +0000 /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root/Payload/Telegea.app: signed app bundle with Mach-O universal (armv7 arm64) [com.dekitalia.termogea] +2019-02-12 23:21:34 +0000 /usr/bin/codesign exited with 0 +2019-02-12 23:21:34 +0000 Processing step: IDEDistributionZipODRItemStep +2019-02-12 23:21:34 +0000 Skipping step: IDEDistributionZipODRItemStep because it said so +2019-02-12 23:21:34 +0000 Processing step: IDEDistributionCreateIPAStep +2019-02-12 23:21:34 +0000 Running /usr/bin/ditto '-V' '-c' '-k' '--norsrc' '/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root' '/var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Packages/Termogea.ipa' +2019-02-12 23:21:34 +0000 >>> Copying /var/folders/1c/5qnq9bmd1bdf67gynx1h6px80000gn/T/XcodeDistPipeline.hE6/Root +2019-02-12 23:21:34 +0000 copying file ./Payload/Telegea.app/_CodeSignature/CodeResources ... +2019-02-12 23:21:34 +0000 15845 bytes for ./Payload/Telegea.app/_CodeSignature/CodeResources +2019-02-12 23:21:34 +0000 copying file ./Payload/Telegea.app/open-24.ttf ... +2019-02-12 23:21:34 +0000 26988 bytes for ./Payload/Telegea.app/open-24.ttf +2019-02-12 23:21:34 +0000 copying file ./Payload/Telegea.app/en.lproj/Localizable.strings ... +2019-02-12 23:21:34 +0000 1200 bytes for ./Payload/Telegea.app/en.lproj/Localizable.strings +copying file ./Payload/Telegea.app/Telegea ... +2019-02-12 23:21:34 +0000 511936 bytes for ./Payload/Telegea.app/Telegea +copying file ./Payload/Telegea.app/ActionTableViewController.nib ... +2019-02-12 23:21:34 +0000 1514 bytes for ./Payload/Telegea.app/ActionTableViewController.nib +2019-02-12 23:21:34 +0000 copying file ./Payload/Telegea.app/it.lproj/LaunchScreen.strings ... +2019-02-12 23:21:34 +0000 1 bytes for ./Payload/Telegea.app/it.lproj/LaunchScreen.strings +copying file ./Payload/Telegea.app/it.lproj/Main.strings ... +2019-02-12 23:21:34 +0000 1028 bytes for ./Payload/Telegea.app/it.lproj/Main.strings +2019-02-12 23:21:34 +0000 copying file ./Payload/Telegea.app/it.lproj/Localizable.strings ... +2019-02-12 23:21:34 +0000 768 bytes for ./Payload/Telegea.app/it.lproj/Localizable.strings +copying file ./Payload/Telegea.app/AppIcon60x60@2x.png ... +2019-02-12 23:21:34 +0000 5324 bytes for ./Payload/Telegea.app/AppIcon60x60@2x.png +2019-02-12 23:21:34 +0000 copying file ./Payload/Telegea.app/AppIcon29x29@2x.png ... +2019-02-12 23:21:34 +0000 2413 bytes for ./Payload/Telegea.app/AppIcon29x29@2x.png +copying file ./Payload/Telegea.app/AppIcon40x40@3x.png ... +2019-02-12 23:21:34 +0000 5324 bytes for ./Payload/Telegea.app/AppIcon40x40@3x.png +copying file ./Payload/Telegea.app/AppIcon40x40@2x.png ... +2019-02-12 23:21:34 +0000 3707 bytes for ./Payload/Telegea.app/AppIcon40x40@2x.png +copying file ./Payload/Telegea.app/AppIcon29x29@3x.png ... +2019-02-12 23:21:34 +0000 3593 bytes for ./Payload/Telegea.app/AppIcon29x29@3x.png +copying file ./Payload/Telegea.app/AppIcon60x60@3x.png ... +2019-02-12 23:21:34 +0000 5979 bytes for ./Payload/Telegea.app/AppIcon60x60@3x.png +2019-02-12 23:21:34 +0000 copying file ./Payload/Telegea.app/Base.lproj/Main.storyboardc/nH3-va-oWn-view-Kjf-R9-c4O.nib ... +2019-02-12 23:21:34 +0000 15012 bytes for ./Payload/Telegea.app/Base.lproj/Main.storyboardc/nH3-va-oWn-view-Kjf-R9-c4O.nib +copying file ./Payload/Telegea.app/Base.lproj/Main.storyboardc/ab0-Np-nDb-view-1DQ-TN-WO8.nib ... +2019-02-12 23:21:34 +0000 2291 bytes for ./Payload/Telegea.app/Base.lproj/Main.storyboardc/ab0-Np-nDb-view-1DQ-TN-WO8.nib +copying file ./Payload/Telegea.app/Base.lproj/Main.storyboardc/LoadingZoneViewController.nib ... +2019-02-12 23:21:34 +0000 1267 bytes for ./Payload/Telegea.app/Base.lproj/Main.storyboardc/LoadingZoneViewController.nib +2019-02-12 23:21:34 +0000 copying file ./Payload/Telegea.app/Base.lproj/Main.storyboardc/RootViewController.nib ... +2019-02-12 23:21:34 +0000 949 bytes for ./Payload/Telegea.app/Base.lproj/Main.storyboardc/RootViewController.nib +copying file ./Payload/Telegea.app/Base.lproj/Main.storyboardc/weQ-Ch-B8p-view-Uu0-nz-514.nib ... +2019-02-12 23:21:34 +0000 10125 bytes for ./Payload/Telegea.app/Base.lproj/Main.storyboardc/weQ-Ch-B8p-view-Uu0-nz-514.nib +copying file ./Payload/Telegea.app/Base.lproj/Main.storyboardc/PageViewController.nib ... +2019-02-12 23:21:34 +0000 954 bytes for ./Payload/Telegea.app/Base.lproj/Main.storyboardc/PageViewController.nib +2019-02-12 23:21:34 +0000 copying file ./Payload/Telegea.app/Base.lproj/Main.storyboardc/nav.nib ... +2019-02-12 23:21:34 +0000 2524 bytes for ./Payload/Telegea.app/Base.lproj/Main.storyboardc/nav.nib +copying file ./Payload/Telegea.app/Base.lproj/Main.storyboardc/ListTableViewController.nib ... +2019-02-12 23:21:34 +0000 1458 bytes for ./Payload/Telegea.app/Base.lproj/Main.storyboardc/ListTableViewController.nib +2019-02-12 23:21:34 +0000 copying file ./Payload/Telegea.app/Base.lproj/Main.storyboardc/LoginViewController.nib ... +998 bytes for ./Payload/Telegea.app/Base.lproj/Main.storyboardc/LoginViewController.nib +2019-02-12 23:21:34 +0000 copying file ./Payload/Telegea.app/Base.lproj/Main.storyboardc/PageContentViewController.nib ... +2019-02-12 23:21:34 +0000 1150 bytes for ./Payload/Telegea.app/Base.lproj/Main.storyboardc/PageContentViewController.nib +copying file ./Payload/Telegea.app/Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib ... +2019-02-12 23:21:34 +0000 7105 bytes for ./Payload/Telegea.app/Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib +copying file ./Payload/Telegea.app/Base.lproj/Main.storyboardc/ManagerViewController.nib ... +2019-02-12 23:21:34 +0000 1604 bytes for ./Payload/Telegea.app/Base.lproj/Main.storyboardc/ManagerViewController.nib +copying file ./Payload/Telegea.app/Base.lproj/Main.storyboardc/xyI-FE-Jw4-view-46u-ev-qKG.nib ... +2019-02-12 23:21:34 +0000 1894 bytes for ./Payload/Telegea.app/Base.lproj/Main.storyboardc/xyI-FE-Jw4-view-46u-ev-qKG.nib +2019-02-12 23:21:34 +0000 copying file ./Payload/Telegea.app/Base.lproj/Main.storyboardc/TAc-QK-t0h-view-DQA-FY-yPG.nib ... +2019-02-12 23:21:34 +0000 8525 bytes for ./Payload/Telegea.app/Base.lproj/Main.storyboardc/TAc-QK-t0h-view-DQA-FY-yPG.nib +copying file ./Payload/Telegea.app/Base.lproj/Main.storyboardc/Info.plist ... +2019-02-12 23:21:34 +0000 565 bytes for ./Payload/Telegea.app/Base.lproj/Main.storyboardc/Info.plist +2019-02-12 23:21:34 +0000 copying file ./Payload/Telegea.app/Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib ... +2019-02-12 23:21:34 +0000 1804 bytes for ./Payload/Telegea.app/Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib +2019-02-12 23:21:34 +0000 copying file ./Payload/Telegea.app/Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib ... +2019-02-12 23:21:34 +0000 832 bytes for ./Payload/Telegea.app/Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib +copying file ./Payload/Telegea.app/Base.lproj/LaunchScreen.storyboardc/Info.plist ... +2019-02-12 23:21:35 +0000 258 bytes for ./Payload/Telegea.app/Base.lproj/LaunchScreen.storyboardc/Info.plist +2019-02-12 23:21:35 +0000 copying file ./Payload/Telegea.app/Assets.car ... +2019-02-12 23:21:35 +0000 1944712 bytes for ./Payload/Telegea.app/Assets.car +copying file ./Payload/Telegea.app/AppIcon40x40@2x~ipad.png ... +2019-02-12 23:21:35 +0000 3707 bytes for ./Payload/Telegea.app/AppIcon40x40@2x~ipad.png +copying file ./Payload/Telegea.app/AppIcon76x76@2x~ipad.png ... +5996 bytes for ./Payload/Telegea.app/AppIcon76x76@2x~ipad.png +copying file ./Payload/Telegea.app/AppIcon83.5x83.5@2x~ipad.png ... +8541 bytes for ./Payload/Telegea.app/AppIcon83.5x83.5@2x~ipad.png +copying file ./Payload/Telegea.app/AppIcon29x29@2x~ipad.png ... +2019-02-12 23:21:35 +0000 2413 bytes for ./Payload/Telegea.app/AppIcon29x29@2x~ipad.png +copying file ./Payload/Telegea.app/ActionTableViewCell.nib ... +2019-02-12 23:21:35 +0000 2836 bytes for ./Payload/Telegea.app/ActionTableViewCell.nib +copying file ./Payload/Telegea.app/AppIcon40x40~ipad.png ... +2019-02-12 23:21:35 +0000 2574 bytes for ./Payload/Telegea.app/AppIcon40x40~ipad.png +copying file ./Payload/Telegea.app/AppIcon20x20~ipad.png ... +2019-02-12 23:21:35 +0000 1386 bytes for ./Payload/Telegea.app/AppIcon20x20~ipad.png +copying file ./Payload/Telegea.app/embedded.mobileprovision ... +2019-02-12 23:21:35 +0000 7619 bytes for ./Payload/Telegea.app/embedded.mobileprovision +copying file ./Payload/Telegea.app/AppIcon20x20@2x~ipad.png ... +2019-02-12 23:21:35 +0000 2574 bytes for ./Payload/Telegea.app/AppIcon20x20@2x~ipad.png +copying file ./Payload/Telegea.app/Info.plist ... +2019-02-12 23:21:35 +0000 3190 bytes for ./Payload/Telegea.app/Info.plist +2019-02-12 23:21:35 +0000 copying file ./Payload/Telegea.app/PkgInfo ... +8 bytes for ./Payload/Telegea.app/PkgInfo +2019-02-12 23:21:35 +0000 copying file ./Payload/Telegea.app/AppIcon76x76~ipad.png ... +2019-02-12 23:21:35 +0000 5379 bytes for ./Payload/Telegea.app/AppIcon76x76~ipad.png +2019-02-12 23:21:35 +0000 /usr/bin/ditto exited with 0 +2019-02-12 23:21:35 +0000 Processing step: IDEDistributionAppStoreInformationStep +2019-02-12 23:21:35 +0000 Skipping step: IDEDistributionAppStoreInformationStep because it said so +2019-02-12 23:21:35 +0000 Processing step: IDEDistributionCreateManifestStep diff --git a/Sources/Earthquake Network/Acquisti in App/Termogea 02-13/Termogea.ipa b/Sources/Earthquake Network/Acquisti in App/Termogea 02-13/Termogea.ipa new file mode 100644 index 0000000..ed8d566 Binary files /dev/null and b/Sources/Earthquake Network/Acquisti in App/Termogea 02-13/Termogea.ipa differ diff --git a/Sources/Earthquake Network/Acquisti in App/VersioneProProducts.swift b/Sources/Earthquake Network/Acquisti in App/VersioneProProducts.swift new file mode 100644 index 0000000..92cf5c7 --- /dev/null +++ b/Sources/Earthquake Network/Acquisti in App/VersioneProProducts.swift @@ -0,0 +1,53 @@ +/// Copyright (c) 2018 Razeware LLC +/// +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// Notwithstanding the foregoing, you may not use, copy, modify, merge, publish, +/// distribute, sublicense, create a derivative work, and/or sell copies of the +/// Software in any work that is designed, intended, or marketed for pedagogical or +/// instructional purposes related to programming, coding, application development, +/// or information technology. Permission for such use, copying, modification, +/// merger, publication, distribution, sublicensing, creation of derivative works, +/// or sale is expressly withheld. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. + +import Foundation + +public struct VersioneProProducts { + + public static let SwiftShopping1 = "com.finazzi.distquake.ProPrezzoPieno" + public static let SwiftShopping2 = "com.finazzi.distquake.VersioneProScontata" + + public static let SwiftShopping4 = "com.finazzi.distquake.Abbonamento10k.mensileAutomatico" + public static let SwiftShopping = "com.finazzi.distquake.Abbonamento10k.annualeAutomatico" + public static let SwiftShopping3 = "com.finazzi.distquake.Abbonamento10k.annualeAutomaticoScontato" + + public static let SwiftShopping7 = "com.finazzi.distquake.Abbonamento100k.mensileAutomatico" + public static let SwiftShopping5 = "com.finazzi.distquake.Abbonamento100k.annualeAutomatico" + public static let SwiftShopping6 = "com.finazzi.distquake.Abbonamento100k.annualeAutomaticoscontato" + + + // com.finazzi.distquake.AbbonamentoAnnuale.scontato + private static let productIdentifiers: Set = [VersioneProProducts.SwiftShopping, VersioneProProducts.SwiftShopping1, VersioneProProducts.SwiftShopping2, VersioneProProducts.SwiftShopping3, VersioneProProducts.SwiftShopping4, VersioneProProducts.SwiftShopping5, VersioneProProducts.SwiftShopping6, VersioneProProducts.SwiftShopping7] + + public static let store = IAPHelper(productIds: VersioneProProducts.productIdentifiers) +} + +func resourceNameForProductIdentifier(_ productIdentifier: String) -> String? { + return productIdentifier.components(separatedBy: ".").last +} diff --git a/Sources/Earthquake Network/Acquisti in App/author.txt b/Sources/Earthquake Network/Acquisti in App/author.txt new file mode 100644 index 0000000..04963f1 --- /dev/null +++ b/Sources/Earthquake Network/Acquisti in App/author.txt @@ -0,0 +1,5 @@ +Francesco Finazzi è ricercatore in Statistica all'Università degli Studi di Bergamo. +Ha conseguito il Dottorato di Ricerca in Statistica Applicata ed è laureato in Ingegneria Informatica. + +Per maggiori informazioni sugli sviluppi del progetto Earthquake Network si prega di visitare +la pagina di ricerca dell'autore (www.researchgate.net/profile/Francesco_Finazzi) e la pagina web del progetto (www.earthquakenetwork.it). diff --git a/Sources/Earthquake Network/Acquisti in App/disclaimer.txt b/Sources/Earthquake Network/Acquisti in App/disclaimer.txt new file mode 100644 index 0000000..0b48f7a --- /dev/null +++ b/Sources/Earthquake Network/Acquisti in App/disclaimer.txt @@ -0,0 +1 @@ +Il progetto di ricerca Earthquake Network è attualmente in fase sperimentale e l’autore non si assume alcuna responsabilità circa il mancato rilevamento di terremoti o falsi allarmi. Altresì, l’autore non garantisce la correttezza delle informazioni rilasciate dalle agenzie di monitoraggio sismico nazionali ed internazionali e non si assume alcuna responsabilità circa l’uso improprio di tali informazioni da parte dell'utilizzatore dell'applicazione Rilevatore Terremoto. diff --git a/Sources/Earthquake Network/Acquisti in App/faq.txt b/Sources/Earthquake Network/Acquisti in App/faq.txt new file mode 100644 index 0000000..40a3f8d --- /dev/null +++ b/Sources/Earthquake Network/Acquisti in App/faq.txt @@ -0,0 +1,77 @@ +P: Cos'è Rilevatore Terremoto? +R: Rilevatore Terremoto è la prima applicazione Android in grado di rilevare terremoti attraverso una rete globale di smartphone o tablet. + +P: Come funziona? +R: Quando lo smartphone rileva le onde di un terremoto, l'evento viene notificato ad un server assieme alla tua posizione geografica. Il server decide se si sta verificando un terremoto e nel caso allerta tutti gli utenti dell'app. + +P: Perché è utile? +R: Se l'epicentro del terremoto non è troppo vicino alla tua posizione, l'app può avvisarti prima che l'onda sismica ti raggiunga. + +P: Quali terremoti può rilevare l'app in modo automatico? +R: Tipicamente terremoti abbastanza forti che possono provocare danni a cose e persone. + +P: Il terremoto viene sicuramente rilevato? +R: Affinché il terremoto venga rilevato deve esserci una rete di smartphone con l'app installata nella zona del terremoto. + +P: Cosa succede se gli smartphone che compongono la rete di Earthquake Network rilevano un terremoto? +R: Riceverai un'allerta in tempo reale. L'allerta avrà come icona una stella di colore bianco, azzuro o blu e potrai visualizzare su mappa la posizione del terremoto. + +P: Che significato ha il colore bianco, azzurro e blu? +R: La stella è bianca se la rete smartphone non è stata in grado di stabilire l'intensità del terremoto, azzurra se il terremoto è debole e blu se forte. + +P: Lo smartphone deve essere in carica per poter ricevere l'allerta? +R: No, gli smartphone in carica sono usati per rilevare il terremoto ma l'allerta viene ricevuta da tutti in qualsiasi momento se Internet è attivo. + +P: Il GPS deve essere attivo? +R: No, è sufficiente abilitare la localizzazione in modalità basso consume. In nessun caso l'APP necessita del GPS attivo. + +P: So che la rete smartphone ha rilevato un terremoto ma io non ho ricevuto alcuna allerta, come mai? +R: Verifica di non aver installato sullo smartphone app per il risparmio batteria, o di non aver abilitato sullo smartphone delle impostazioni che impediscono alle app di ricevere notifiche in tempo reale. + +P: Ho uno smartphone Huawei, devo fare qualcosa di particolare? +R: Sì, devi aggiungere la app alla lista delle app protette e devi consentirgli di funzionare in background. Cerca in Google le istruzioni per il tuo modello di smartphone. + +P: Perché non viene fornita la magnitudo del terremoto rilevato in tempo reale? +R: Per il momento la rete smartphone non può stimarla. La distinzione tra terremoto lieve (stella azzurra) e forte (stella blu) è una funzione sperimentale. + +P: Come devo usare l'applicazione? +R: Lancia l'applicazione e usa il tuo smartphone come sempre. L'applicazione funziona come un sismometro solo se lo smartphone è in carica e se lo schermo è spento. + +P: Consuma batteria? +R: No. L'applicazione usa l'accelerometro solo quando lo smartphone è in carica. + +P: Posso notificare manualmente un terremoto? +R: Sì, muovendoti sulla pagina "Segnalazioni" e seguendo le istruzioni. Gli utenti ricevono in tempo reale anche le segnalazioni di terremoto manuali degli altri utenti. + +P: Come posso visualizzare le segnalazioni degli altri utenti? +R: Cliccando sulla mappa nella pagina "Segnalazioni". Le icone rappresentano le segnalazioni nelle ultime 24 ore. Stella verde: intensità lieve ; stella giallR: intensità forte; stella rossR: intensità molto forte; stella nerR: terremoto dichiarato come falso dagli altri utenti.

+ +P: La mia segnalazione non è comparsa sulla mappa, come mai? +R: Le segnalazioni compaiono e vengono notificate solo se abbastanza utenti segnalano il terremoto. Questo per evitare falsi allarmi. + +P: Cosa mostra la pagina "Lista sismi"? +R: Mostra i terremoti rilevati dalle diverse reti sismiche nazionali e mondiali. + +P: Cosa succede se una delle reti sismiche nazionali o internazionali rileva un terremoto? +R: Riceverai una notifica del terremoto. La notifica avrà un'icona con forme e colori diversi e la lettara "A" nel mezzo. La forma rappresenta la rete che ha rilevato il terremoto mentre il colore rappresenta la magnitudine. Verde: da M2.0 a M3.5; giallo: da M3.5 a M4.5; rosso: da M4.5 a M5.5; violR: oltre M5.5. + +P: Come posso limitare il numero delle notifiche? +R: Dalla pagina delle opzioni. Puoi scegliere la magnitudine minima, la distanza massima del terremoto e le reti sismiche da cui ricevere le notifiche. + +P: L'applicazione registra informazioni personali? +R: No. Solo la posizione geografica è rilevata in modo anonimo e viene cancellata dal server dopo 10 minuti se non si verificano terremoti. + +P: Perché dovrei tenere questa applicazione sul mio smartphone? +R: Affinchè i terremoti vengano rilevati in tempo reale è necessario che la app sia installata su un buon numero di smartphone. Grazie per la tua collaborazione! + +P: Perché questa applicazione ha la pubblicità? +R: Perché il progetto di ricerca di cui la app fa parte non è finanziato. Le entrate derivanti dalla pubblicità servono per mantenere attivo il progetto. + +P: Cos'è la sezione "Mappa rete" nella pagina principale?
+R: Consente di accedere alla mappa in tempo reale della rete di smartphone di Earthquake network. I pallini verdi sono gli smartphone in grado di rilevare terremoti. + +P: Cos'è la sezione "Stato sismometro" nella pagina principale? +R: E' la pagina dove puoi vedere se il tuo smartphone può funzionare come un sismometro. Per maggiori dettagli clicca i semafori rossi e verdi. + +P: Come posso essere parte di questo progetto o supportarlo? +R: Contatta l'autore all'indirizzo finazzif@gmail.com diff --git a/Sources/Earthquake Network/Acquisti in App/info.txt b/Sources/Earthquake Network/Acquisti in App/info.txt new file mode 100644 index 0000000..0471426 --- /dev/null +++ b/Sources/Earthquake Network/Acquisti in App/info.txt @@ -0,0 +1,22 @@ +Il progetto di ricerca Earthquake Network mira a sviluppare un sistema di allerta terremoti basato su reti di smartphone (e tablet). Gli smartphone sono in grado di rilevare terremoti grazie al sensore accelerometrico di cui dispongono e possono comunicare istantaneamente l’informazione attraverso Internet. + +Quando il terremoto è rilevato da più smartphone nella rete, gli utenti dell’applicazione sono allertati in tempo reale. Poiché le onde del terremoto si propagano con una certa velocità, è possibile allertare in anticipo la popolazione non ancora raggiunta dalle onde sismiche.

+ +Si fa presente che il progetto è attualmente in fase sperimentale. Il rilevamento è influenzato dal numero di smartphone attivi nell’aerea colpita dal terremoto così come dalla loro distribuzione spaziale e dalla sensibilità dei sensori degli smartphone. + +L’applicazione mostra altresì le informazioni sui terremoti rilevati dalle agenzie di monitoraggio sismico nazionali ed internazionali. Queste informazioni sono tipicamente pubblicate con ritardi che vanno da pochi minuti ad alcune ore, a secoda dell’agenzia. L’uso dei dati rilasciati dalla agenzie sottostà a specifiche regole e limitazioni; per maggiori informazioni si consultino le pagine web delle agenzie incluse nell’applicazione e qui sotto riportate. + +USGS (U.S. Geological Survey): www.usgs.gov +EMSC (European-Mediterranean Seismological Centre): www.emsc-csem.org +GeoNet (Earthquake Commission and GNS Science): www.geonet.org.nz +CSN (Centro Sismologico Nacional): www.sismologia.cl +INGV (Istituto Nazionale di Geofisica e Vulcanologia): www.ingv.it +IGN (Instituto Geográfico Nacional): www.ign.es +CSI (China Seismic Information): www.csi.ac.cn +JMA (Japanese Meteorological Agency): www.jma.go.jp +Ineter (Instituto Nicaragüense de Estudios Territoriales): www.ineter.gob.ni +SSN (Servicio Sismológico Nacional): www.ssn.unam.mx +SGC (Servicio Geológico Colombiano): www2.sgc.gov.co +RSN (Red Sismológica Nacional): www.rsn.ucr.ac.cr +Funvisis (Fundación Venezolana de Investigaciones Sismológicas): www.funvisis.gob.ve +INPRES (Instituto Nacional de Prevención Sísmica): www.inpres.gov.ar diff --git a/Sources/Earthquake Network/Acquisti in App/privacy.txt b/Sources/Earthquake Network/Acquisti in App/privacy.txt new file mode 100644 index 0000000..d29c915 --- /dev/null +++ b/Sources/Earthquake Network/Acquisti in App/privacy.txt @@ -0,0 +1,9 @@ +L'applicazione Rilevatore Terremoto necessita di raccogliere dati dal tuo dispositivo mobile al fine di implementare la rilevazione in tempo reale dei terremoti ed inviare l'allerta in tempo reale ai dispositivi. Quando si verifica un terremoto ed il terremoto è rilevato dal tuo dispositivo, lo stesso invia un messaggio al server del progetto di ricerca Earthquake Network. Il messaggio include la posizione del dispositivo e le informazioni necessarie per riconoscere il terremoto. Il messaggio non include informazioni personali. + +Le informazioni sono salvate in modo anonimo sul server e sono eventualmente analizzate per migliorare le rilevazioni di terremoto future ed al fine di pubblicare articoli di ricerca su riviste scientifiche. + +Inoltre, i messaggi delle chat di gruppo sono salvati sul server per un massimo di 2 giorni, mentre i messaggi privati tra utenti sono salvati in tabelle criptate. + +In caso si voglia rimuovere dal server del progetto Earthquake Network qualsiasi informazione sul proprio dispositivo, si prega di inviare una mail all'indirizzo finazzif@gmail.com con l'ID presente nel menù laterale della app Rilevatore Terremoto. + +Il responsabile del trattamento dei dati è Francesco Finazzi, fondatore del progetto Earthquake Network. \ No newline at end of file diff --git a/Sources/Earthquake Network/AppDelegate.h b/Sources/Earthquake Network/AppDelegate.h new file mode 100644 index 0000000..cb3d9d4 --- /dev/null +++ b/Sources/Earthquake Network/AppDelegate.h @@ -0,0 +1,24 @@ +// +// AppDelegate.h +// Earthquake Network +// +// Created by Luca Beretta on 12/09/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import +#import +#import "MasterViewController.h" +#import "ReteSmartphone.h" +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; +@property (strong, nonatomic) MasterViewController *masterViewController; +@property (strong, nonatomic) ReteSmartphone *reteSmartphone; +@property (readonly, strong) NSPersistentContainer *persistentContainer; + +- (void)saveContext; + + +@end + diff --git a/Sources/Earthquake Network/AppDelegate.m b/Sources/Earthquake Network/AppDelegate.m new file mode 100644 index 0000000..b377a74 --- /dev/null +++ b/Sources/Earthquake Network/AppDelegate.m @@ -0,0 +1,345 @@ +// +// AppDelegate.m +// Earthquake Network +// +// Created by Luca Beretta on 12/09/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "AppDelegate.h" +#import "EQNUser.h" +#import "Costanti.h" +#import "EQMAccelerometroManager.h" +#import "EQNManager.h" +#import "MasterViewController.h" +#import "EQNUtility.h" +#import "EQNAllertaSismica.h" +#import "EQNAllertaSismica.h" +#import "EQNNotificheSegnalazioniUtente.h" +#import "EQNNotificeReteSismiche.h" + +@import GoogleMaps; +@import Firebase; +@import UserNotifications; +@import GoogleMobileAds; + +@interface AppDelegate () + +@end + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. + [GMSServices provideAPIKey:GOOGLE_MAP_KEY]; + [GADMobileAds configureWithApplicationID:EQN_ADMOB_APP_IDA]; + [EQNUser defaultUser]; + [EQNManager defaultManager]; + [FIRApp configure]; + [FIRMessaging messaging].delegate = self; + if ([UNUserNotificationCenter class] != nil) { + // iOS 10 or later + // For iOS 10 display notification (sent via APNS) + [UNUserNotificationCenter currentNotificationCenter].delegate = self; + UNAuthorizationOptions authOptions = UNAuthorizationOptionAlert | + UNAuthorizationOptionSound | UNAuthorizationOptionBadge; + [[UNUserNotificationCenter currentNotificationCenter] + requestAuthorizationWithOptions:authOptions + completionHandler:^(BOOL granted, NSError * _Nullable error) { + // ... + + [self registraNotifica]; + }]; + } else { + // iOS 10 notifications aren't available; fall back to iOS 8-9 notifications. + /* UIUserNotificationType allNotificationTypes = + (UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge); + UIUserNotificationSettings *settings = + [UIUserNotificationSettings settingsForTypes:allNotificationTypes categories:nil]; + [application registerUserNotificationSettings:settings]; */ + [self registraNotifica]; + + + } + [application setMinimumBackgroundFetchInterval:UIApplicationBackgroundFetchIntervalMinimum]; + [application registerForRemoteNotifications]; + + // [[NSUserDefaults standardUserDefaults] setBool:NO forKey:EQN_ACQ_IN_APP]; + + NSURL *receiptURL = [[NSBundle mainBundle] appStoreReceiptURL]; + NSData *receipt = [NSData dataWithContentsOfURL:receiptURL]; + if (!receipt) { /* No local receipt -- handle the error. */ } + else{ + + NSLog(@"ricevuta presente"); + } + + /* ... Send the receipt data to your server ... */ + + return YES; +} + +-(void)registraNotifica{ + + UNNotificationCategory *category = [UNNotificationCategory categoryWithIdentifier:@"notifica_con_mappa" actions:@[] intentIdentifiers:@[] options:UNNotificationCategoryOptionNone]; + [[UNUserNotificationCenter currentNotificationCenter] setNotificationCategories:[NSSet setWithObject: category]]; +} + +- (void)applicationWillResignActive:(UIApplication *)application { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. +} + + +- (void)applicationDidEnterBackground:(UIApplication *)application { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + [[EQNManager defaultManager] avviaManager]; + [[EQMAccelerometroManager sharedInstance] startUpdatingLocationBackground]; + + NSUInteger i = [[NSUserDefaults standardUserDefaults] integerForKey:CONTEGGIO_APERTURE_PER_SCONTO]; + i++; + if (i == 15) + [[NSUserDefaults standardUserDefaults] setObject:[NSDate date] forKey:DATA_APERTURE_PER_SCONTO]; + + + [[NSUserDefaults standardUserDefaults] setInteger:i forKey:CONTEGGIO_APERTURE_PER_SCONTO]; +} + + +- (void)applicationWillEnterForeground:(UIApplication *)application { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. + [[EQNManager defaultManager] stopManager]; + [[EQMAccelerometroManager sharedInstance] stopUpdatingLocation]; + +} + + +- (void)applicationDidBecomeActive:(UIApplication *)application { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + +} + + +- (void)applicationWillTerminate:(UIApplication *)application { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + // Saves changes in the application's managed object context before the application terminates. + [self saveContext]; +} + +-(void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings{ + + +} + +/////// Gestione Notifiche + +- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { + // If you are receiving a notification message while your app is in the background, + // this callback will not be fired till the user taps on the notification launching the application. + // TODO: Handle data of notification + + // With swizzling disabled you must let Messaging know about the message, for Analytics + [[FIRMessaging messaging] appDidReceiveMessage:userInfo]; + + // Print message ID. + + NSLog(@"userInfo %@", userInfo); + + if (userInfo[@"type"]) { + NSLog(@"Message ID: %@", userInfo[@"type"]); + } + + // Print full message. + NSLog(@"%@", userInfo); +} + +- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo +fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { + // If you are receiving a notification message while your app is in the background, + // this callback will not be fired till the user taps on the notification launching the application. + // TODO: Handle data of notification + /* + NSString* jsonString = userInfo[@"gcm.notification.userInfo"]; + NSData* jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; + NSError *jsonError; + NSDictionary *JSON = [NSJSONSerialization JSONObjectWithData:jsonData + options:NSJSONReadingAllowFragments + error:&jsonError]; + + if ([JSON[@"type"] isEqualToString:@"eqn"]) { + NSDate *dataRicezione = [NSDate date]; + [[NSUserDefaults standardUserDefaults] setObject:dataRicezione forKey:NOTIFICHE_RETE_SMARTPHONE_DATA_NOTIFICA]; + [EQNUtility writeArrayWithCustomObjToUserDefaults:NOTIFICHE_RETE_SMARTPHONE_DIZIONARIO_NOTIFICA withDict:JSON]; + [[NSUserDefaults standardUserDefaults] synchronize]; + } + + [self.reteSmartphone fetchNewDataWithCompletionHandler:^(UIBackgroundFetchResult result) { + completionHandler(result); + }];*/ + + + completionHandler(UIBackgroundFetchResultNewData); +} + +////////////// APPLICAZIONE IN PRIMO PIANO ////////////////////// + +// Receive displayed notifications for iOS 10 devices. +// Handle incoming notification messages while app is in the foreground. +- (void)userNotificationCenter:(UNUserNotificationCenter *)center + willPresentNotification:(UNNotification *)notification + withCompletionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler { + NSDictionary *userInfo = notification.request.content.userInfo; + + NSIndexPath *indexPath; + if ([userInfo[@"type"] isEqualToString:@"eqn"]) { + NSDate *dataRicezione = [NSDate date]; + [[NSUserDefaults standardUserDefaults] setObject:dataRicezione forKey:NOTIFICHE_RETE_SMARTPHONE_DATA_NOTIFICA]; + + [EQNUtility writeArrayWithCustomObjToUserDefaults:NOTIFICHE_RETE_SMARTPHONE_DIZIONARIO_NOTIFICA withDict:userInfo]; + indexPath = [NSIndexPath indexPathForRow:0 inSection:0]; + + [[NSUserDefaults standardUserDefaults] synchronize]; + } + else if([userInfo[@"type"] isEqualToString:@"manual"]) + indexPath = [NSIndexPath indexPathForRow:1 inSection:0]; + else if([userInfo[@"type"] isEqualToString:@"official"]) + indexPath = [NSIndexPath indexPathForRow:2 inSection:0]; + else if([userInfo[@"type"] isEqualToString:@"tsunami"]) + indexPath = [NSIndexPath indexPathForRow:3 inSection:0]; + + // [self.masterViewController selezionaItem:indexPath]; + [self.masterViewController sincronizza]; + + + // Change this to your preferred presentation option + completionHandler(UNNotificationPresentationOptionAlert); +} + + +////////////// DOPO AVER CLICCATO SULLA NOTIFICA ////////////////////// +// Handle notification messages after display notification is tapped by the user. +- (void)userNotificationCenter:(UNUserNotificationCenter *)center +didReceiveNotificationResponse:(UNNotificationResponse *)response + withCompletionHandler:(void(^)(void))completionHandler { + + // response.notification.request.content.sound = [UNNotificationSound soundNamed:[EQNAllertaSismica center].tonoAllarme]; + NSDictionary *userInfo = response.notification.request.content.userInfo; + NSIndexPath *indexPath; + if ([userInfo[@"type"] isEqualToString:@"eqn"]) { + NSDate *dataRicezione = [NSDate date]; + [[NSUserDefaults standardUserDefaults] setObject:dataRicezione forKey:NOTIFICHE_RETE_SMARTPHONE_DATA_NOTIFICA]; + + [EQNUtility writeArrayWithCustomObjToUserDefaults:NOTIFICHE_RETE_SMARTPHONE_DIZIONARIO_NOTIFICA withDict:userInfo]; + indexPath = [NSIndexPath indexPathForRow:0 inSection:0]; + + [[NSUserDefaults standardUserDefaults] synchronize]; + } + else if([userInfo[@"type"] isEqualToString:@"manual"]) + indexPath = [NSIndexPath indexPathForRow:1 inSection:0]; + else if([userInfo[@"type"] isEqualToString:@"official"]) + indexPath = [NSIndexPath indexPathForRow:2 inSection:0]; + else if([userInfo[@"type"] isEqualToString:@"tsunami"]) + indexPath = [NSIndexPath indexPathForRow:3 inSection:0]; + [self.masterViewController sincronizza]; + [self.masterViewController selezionaItem:indexPath]; + + // Print full message. + completionHandler(); +} + +-(void)application:(UIApplication *)application performFetchWithCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler{ + + [self.masterViewController fetchNewDataWithCompletionHandler:^(UIBackgroundFetchResult result) { + completionHandler(result); + }]; +} + + +#pragma mark - Core Data stack + +@synthesize persistentContainer = _persistentContainer; + +- (NSPersistentContainer *)persistentContainer { + // The persistent container for the application. This implementation creates and returns a container, having loaded the store for the application to it. + @synchronized (self) { + if (_persistentContainer == nil) { + _persistentContainer = [[NSPersistentContainer alloc] initWithName:@"Earthquake_Network"]; + [_persistentContainer loadPersistentStoresWithCompletionHandler:^(NSPersistentStoreDescription *storeDescription, NSError *error) { + if (error != nil) { + // Replace this implementation with code to handle the error appropriately. + // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. + + /* + Typical reasons for an error here include: + * The parent directory does not exist, cannot be created, or disallows writing. + * The persistent store is not accessible, due to permissions or data protection when the device is locked. + * The device is out of space. + * The store could not be migrated to the current model version. + Check the error message to determine what the actual problem was. + */ + NSLog(@"Unresolved error %@, %@", error, error.userInfo); + abort(); + } + }]; + } + } + + return _persistentContainer; +} + +#pragma mark - Core Data Saving support + + + +- (void)saveContext { + NSManagedObjectContext *context = self.persistentContainer.viewContext; + NSError *error = nil; + if ([context hasChanges] && ![context save:&error]) { + // Replace this implementation with code to handle the error appropriately. + // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. + NSLog(@"Unresolved error %@, %@", error, error.userInfo); + abort(); + } +} + +- (void)messaging:(FIRMessaging *)messaging didReceiveRegistrationToken:(NSString *)fcmToken { + + // Notify about received token. + // NSDictionary *dataDict = [NSDictionary dictionaryWithObject:fcmToken forKey:@"token"]; + // [[NSNotificationCenter defaultCenter] postNotificationName:NOTIFICA_TOKEN object:nil userInfo:dataDict]; + + NSLog(@"fcmToken %@", fcmToken); + if (![[NSUserDefaults standardUserDefaults] objectForKey:TOKEN_USER]) { + + [EQNAllertaSismica center].isAbilitato = YES; + [EQNAllertaSismica center].raggioSismiLievi = @"300"; + [EQNAllertaSismica center].raggioSismiForti = @"600"; + [EQNAllertaSismica center].sismiDaNotificare = @"0"; + [EQNAllertaSismica center].isSimiSenzaIntensita = YES;; + [[EQNAllertaSismica center] saveUserInfo]; + + [EQNNotificheSegnalazioniUtente center].isAbilitato = YES; + [EQNNotificheSegnalazioniUtente center].distanzaPosizione = @"300"; + [[EQNNotificheSegnalazioniUtente center] saveUserInfo]; + + [EQNNotificeReteSismiche center].isAbilitato = YES; + [EQNNotificeReteSismiche center].distanzaPosizione = @"1000"; + [EQNNotificeReteSismiche center].distanzaVicini = @"100"; + [EQNNotificeReteSismiche center].isAbilitaVicini = NO; + [EQNNotificeReteSismiche center].energiaSisma = @"3.5"; + [EQNNotificeReteSismiche center].energiaTerremotiForti = @"7.5"; + [[EQNNotificeReteSismiche center] saveUserInfo]; + + } + + [[NSUserDefaults standardUserDefaults] setObject:fcmToken forKey:TOKEN_USER]; + [EQNUser defaultUser].tokenUser = fcmToken; + + // TODO: If necessary send token to application server. + // Note: This callback is fired at each app startup and whenever a new token is generated. +} + + + +@end diff --git a/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/20.png b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/20.png new file mode 100644 index 0000000..390e85b Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/20.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/20@2x-1.png b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/20@2x-1.png new file mode 100644 index 0000000..31e35ae Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/20@2x-1.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/20@2x-2.png b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/20@2x-2.png new file mode 100644 index 0000000..31e35ae Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/20@2x-2.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/20@2x.png b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/20@2x.png new file mode 100644 index 0000000..31e35ae Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/20@2x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/20@3x.png b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/20@3x.png new file mode 100644 index 0000000..ce0b25e Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/20@3x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/29.png b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/29.png new file mode 100644 index 0000000..76bcc60 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/29.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/29@2x-1.png b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/29@2x-1.png new file mode 100644 index 0000000..78e1a6b Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/29@2x-1.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/29@2x.png b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/29@2x.png new file mode 100644 index 0000000..78e1a6b Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/29@2x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/29@3x.png b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/29@3x.png new file mode 100644 index 0000000..224a20a Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/29@3x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/40@2x-1.png b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/40@2x-1.png new file mode 100644 index 0000000..a3de65e Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/40@2x-1.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/40@2x.png b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/40@2x.png new file mode 100644 index 0000000..a3de65e Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/40@2x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/40@3x-1.png b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/40@3x-1.png new file mode 100644 index 0000000..48927c2 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/40@3x-1.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/40@3x.png b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/40@3x.png new file mode 100644 index 0000000..48927c2 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/40@3x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/60@3x.png b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/60@3x.png new file mode 100644 index 0000000..076e292 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/60@3x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/76.png b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/76.png new file mode 100644 index 0000000..957c4d2 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/76.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/76@2x.png b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/76@2x.png new file mode 100644 index 0000000..ff4990f Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/76@2x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/83.5.png b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/83.5.png new file mode 100644 index 0000000..8caf372 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/83.5.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..8f2dfa4 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,116 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "40@3x-1.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "20.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "20@2x-1.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "29.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "29@2x-1.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "20@2x-2.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "40@2x-1.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "76.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "83.5.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "iOS_icon.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/iOS_icon.png b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/iOS_icon.png new file mode 100644 index 0000000..1b22e87 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/AppIcon.appiconset/iOS_icon.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/Contents.json b/Sources/Earthquake Network/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/back.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/back.imageset/Contents.json new file mode 100644 index 0000000..3bad3d0 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/back.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "back.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "back@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "back@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/back.imageset/back.png b/Sources/Earthquake Network/Assets.xcassets/back.imageset/back.png new file mode 100644 index 0000000..afff000 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/back.imageset/back.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/back.imageset/back@2x.png b/Sources/Earthquake Network/Assets.xcassets/back.imageset/back@2x.png new file mode 100644 index 0000000..b37d78e Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/back.imageset/back@2x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/back.imageset/back@3x.png b/Sources/Earthquake Network/Assets.xcassets/back.imageset/back@3x.png new file mode 100644 index 0000000..d83922c Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/back.imageset/back@3x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/clock.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/clock.imageset/Contents.json new file mode 100644 index 0000000..cea62d8 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/clock.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_history_grey600_24dp.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ic_history_grey600_24dp @2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_history_grey600_24dp @3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/clock.imageset/ic_history_grey600_24dp @2x.png b/Sources/Earthquake Network/Assets.xcassets/clock.imageset/ic_history_grey600_24dp @2x.png new file mode 100644 index 0000000..433f0dc Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/clock.imageset/ic_history_grey600_24dp @2x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/clock.imageset/ic_history_grey600_24dp @3x.png b/Sources/Earthquake Network/Assets.xcassets/clock.imageset/ic_history_grey600_24dp @3x.png new file mode 100644 index 0000000..153dd6b Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/clock.imageset/ic_history_grey600_24dp @3x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/clock.imageset/ic_history_grey600_24dp.png b/Sources/Earthquake Network/Assets.xcassets/clock.imageset/ic_history_grey600_24dp.png new file mode 100644 index 0000000..4693668 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/clock.imageset/ic_history_grey600_24dp.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/distquake_app_pro.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/distquake_app_pro.imageset/Contents.json new file mode 100644 index 0000000..74ccf5d --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/distquake_app_pro.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "distquake_app_pro.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "distquake_app_pro-1.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "distquake_app_pro-2.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/distquake_app_pro.imageset/distquake_app_pro-1.png b/Sources/Earthquake Network/Assets.xcassets/distquake_app_pro.imageset/distquake_app_pro-1.png new file mode 100644 index 0000000..860a57c Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/distquake_app_pro.imageset/distquake_app_pro-1.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/distquake_app_pro.imageset/distquake_app_pro-2.png b/Sources/Earthquake Network/Assets.xcassets/distquake_app_pro.imageset/distquake_app_pro-2.png new file mode 100644 index 0000000..393ba1c Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/distquake_app_pro.imageset/distquake_app_pro-2.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/distquake_app_pro.imageset/distquake_app_pro.png b/Sources/Earthquake Network/Assets.xcassets/distquake_app_pro.imageset/distquake_app_pro.png new file mode 100644 index 0000000..8363da2 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/distquake_app_pro.imageset/distquake_app_pro.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/distquake_app_wave.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/distquake_app_wave.imageset/Contents.json new file mode 100644 index 0000000..f2bc4de --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/distquake_app_wave.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "distquake_app_wave.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "distquake_app_wave-1.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "distquake_app_wave-2.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/distquake_app_wave.imageset/distquake_app_wave-1.png b/Sources/Earthquake Network/Assets.xcassets/distquake_app_wave.imageset/distquake_app_wave-1.png new file mode 100644 index 0000000..1856a55 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/distquake_app_wave.imageset/distquake_app_wave-1.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/distquake_app_wave.imageset/distquake_app_wave-2.png b/Sources/Earthquake Network/Assets.xcassets/distquake_app_wave.imageset/distquake_app_wave-2.png new file mode 100644 index 0000000..28e3415 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/distquake_app_wave.imageset/distquake_app_wave-2.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/distquake_app_wave.imageset/distquake_app_wave.png b/Sources/Earthquake Network/Assets.xcassets/distquake_app_wave.imageset/distquake_app_wave.png new file mode 100644 index 0000000..35bd2fa Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/distquake_app_wave.imageset/distquake_app_wave.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/distquake_app_wave_small.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/distquake_app_wave_small.imageset/Contents.json new file mode 100644 index 0000000..edfcb78 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/distquake_app_wave_small.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "distquake_app_wave_small.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "distquake_app_wave_small-2.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "distquake_app_wave_small-1.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/distquake_app_wave_small.imageset/distquake_app_wave_small-1.png b/Sources/Earthquake Network/Assets.xcassets/distquake_app_wave_small.imageset/distquake_app_wave_small-1.png new file mode 100644 index 0000000..017f427 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/distquake_app_wave_small.imageset/distquake_app_wave_small-1.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/distquake_app_wave_small.imageset/distquake_app_wave_small-2.png b/Sources/Earthquake Network/Assets.xcassets/distquake_app_wave_small.imageset/distquake_app_wave_small-2.png new file mode 100644 index 0000000..7d85532 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/distquake_app_wave_small.imageset/distquake_app_wave_small-2.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/distquake_app_wave_small.imageset/distquake_app_wave_small.png b/Sources/Earthquake Network/Assets.xcassets/distquake_app_wave_small.imageset/distquake_app_wave_small.png new file mode 100644 index 0000000..88819c2 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/distquake_app_wave_small.imageset/distquake_app_wave_small.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/dor.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/dor.imageset/Contents.json new file mode 100644 index 0000000..bfb771d --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/dor.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "dor.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "dor2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "dor3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/dor.imageset/dor.png b/Sources/Earthquake Network/Assets.xcassets/dor.imageset/dor.png new file mode 100644 index 0000000..8b0f361 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/dor.imageset/dor.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/dor.imageset/dor2x.png b/Sources/Earthquake Network/Assets.xcassets/dor.imageset/dor2x.png new file mode 100644 index 0000000..3b7ed87 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/dor.imageset/dor2x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/dor.imageset/dor3x.png b/Sources/Earthquake Network/Assets.xcassets/dor.imageset/dor3x.png new file mode 100644 index 0000000..6a51159 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/dor.imageset/dor3x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/dyamond_green.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/dyamond_green.imageset/Contents.json new file mode 100644 index 0000000..19372bd --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/dyamond_green.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "dyamond_green-1.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "dyamond_green-2.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "dyamond_green.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/dyamond_green.imageset/dyamond_green-1.png b/Sources/Earthquake Network/Assets.xcassets/dyamond_green.imageset/dyamond_green-1.png new file mode 100644 index 0000000..71b5973 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/dyamond_green.imageset/dyamond_green-1.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/dyamond_green.imageset/dyamond_green-2.png b/Sources/Earthquake Network/Assets.xcassets/dyamond_green.imageset/dyamond_green-2.png new file mode 100644 index 0000000..a320802 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/dyamond_green.imageset/dyamond_green-2.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/dyamond_green.imageset/dyamond_green.png b/Sources/Earthquake Network/Assets.xcassets/dyamond_green.imageset/dyamond_green.png new file mode 100644 index 0000000..5d02608 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/dyamond_green.imageset/dyamond_green.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/dyamond_red.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/dyamond_red.imageset/Contents.json new file mode 100644 index 0000000..f819bd0 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/dyamond_red.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "dyamond_red-1.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "dyamond_red-2.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "dyamond_red.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/dyamond_red.imageset/dyamond_red-1.png b/Sources/Earthquake Network/Assets.xcassets/dyamond_red.imageset/dyamond_red-1.png new file mode 100644 index 0000000..2f3c799 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/dyamond_red.imageset/dyamond_red-1.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/dyamond_red.imageset/dyamond_red-2.png b/Sources/Earthquake Network/Assets.xcassets/dyamond_red.imageset/dyamond_red-2.png new file mode 100644 index 0000000..873d17d Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/dyamond_red.imageset/dyamond_red-2.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/dyamond_red.imageset/dyamond_red.png b/Sources/Earthquake Network/Assets.xcassets/dyamond_red.imageset/dyamond_red.png new file mode 100644 index 0000000..a824143 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/dyamond_red.imageset/dyamond_red.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/dyamond_yellow.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/dyamond_yellow.imageset/Contents.json new file mode 100644 index 0000000..c6a6500 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/dyamond_yellow.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "dyamond_yellow-1.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "dyamond_yellow-2.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "dyamond_yellow.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/dyamond_yellow.imageset/dyamond_yellow-1.png b/Sources/Earthquake Network/Assets.xcassets/dyamond_yellow.imageset/dyamond_yellow-1.png new file mode 100644 index 0000000..c7472f5 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/dyamond_yellow.imageset/dyamond_yellow-1.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/dyamond_yellow.imageset/dyamond_yellow-2.png b/Sources/Earthquake Network/Assets.xcassets/dyamond_yellow.imageset/dyamond_yellow-2.png new file mode 100644 index 0000000..2a38953 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/dyamond_yellow.imageset/dyamond_yellow-2.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/dyamond_yellow.imageset/dyamond_yellow.png b/Sources/Earthquake Network/Assets.xcassets/dyamond_yellow.imageset/dyamond_yellow.png new file mode 100644 index 0000000..ea07a8e Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/dyamond_yellow.imageset/dyamond_yellow.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/heart.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/heart.imageset/Contents.json new file mode 100644 index 0000000..d3ce675 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/heart.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_heart_pulse_grey600_24dp.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ic_heart_pulse_grey600_24dp @2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_heart_pulse_grey600_24dp @3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/heart.imageset/ic_heart_pulse_grey600_24dp @2x.png b/Sources/Earthquake Network/Assets.xcassets/heart.imageset/ic_heart_pulse_grey600_24dp @2x.png new file mode 100644 index 0000000..4ca2452 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/heart.imageset/ic_heart_pulse_grey600_24dp @2x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/heart.imageset/ic_heart_pulse_grey600_24dp @3x.png b/Sources/Earthquake Network/Assets.xcassets/heart.imageset/ic_heart_pulse_grey600_24dp @3x.png new file mode 100644 index 0000000..8606091 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/heart.imageset/ic_heart_pulse_grey600_24dp @3x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/heart.imageset/ic_heart_pulse_grey600_24dp.png b/Sources/Earthquake Network/Assets.xcassets/heart.imageset/ic_heart_pulse_grey600_24dp.png new file mode 100644 index 0000000..247493a Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/heart.imageset/ic_heart_pulse_grey600_24dp.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_action_settings.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/ic_action_settings.imageset/Contents.json new file mode 100644 index 0000000..bdc30c5 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/ic_action_settings.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_action_settings.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ic_action_settings @2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_action_settings @3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_action_settings.imageset/ic_action_settings @2x.png b/Sources/Earthquake Network/Assets.xcassets/ic_action_settings.imageset/ic_action_settings @2x.png new file mode 100644 index 0000000..068ddc0 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_action_settings.imageset/ic_action_settings @2x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_action_settings.imageset/ic_action_settings @3x.png b/Sources/Earthquake Network/Assets.xcassets/ic_action_settings.imageset/ic_action_settings @3x.png new file mode 100644 index 0000000..d26d9dc Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_action_settings.imageset/ic_action_settings @3x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_action_settings.imageset/ic_action_settings.png b/Sources/Earthquake Network/Assets.xcassets/ic_action_settings.imageset/ic_action_settings.png new file mode 100644 index 0000000..e408740 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_action_settings.imageset/ic_action_settings.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_action_share.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/ic_action_share.imageset/Contents.json new file mode 100644 index 0000000..8ac27fb --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/ic_action_share.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_action_share.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ic_action_share copia.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_action_share copia2.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_action_share.imageset/ic_action_share copia.png b/Sources/Earthquake Network/Assets.xcassets/ic_action_share.imageset/ic_action_share copia.png new file mode 100644 index 0000000..407d951 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_action_share.imageset/ic_action_share copia.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_action_share.imageset/ic_action_share copia2.png b/Sources/Earthquake Network/Assets.xcassets/ic_action_share.imageset/ic_action_share copia2.png new file mode 100644 index 0000000..bd52c4a Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_action_share.imageset/ic_action_share copia2.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_action_share.imageset/ic_action_share.png b/Sources/Earthquake Network/Assets.xcassets/ic_action_share.imageset/ic_action_share.png new file mode 100644 index 0000000..7c9a4ca Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_action_share.imageset/ic_action_share.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_arrow_drop_down_48px-128.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/ic_arrow_drop_down_48px-128.imageset/Contents.json new file mode 100644 index 0000000..46ca5bf --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/ic_arrow_drop_down_48px-128.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_arrow_drop_down_48px-128.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_arrow_drop_down_48px-128.imageset/ic_arrow_drop_down_48px-128.png b/Sources/Earthquake Network/Assets.xcassets/ic_arrow_drop_down_48px-128.imageset/ic_arrow_drop_down_48px-128.png new file mode 100644 index 0000000..9e6544b Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_arrow_drop_down_48px-128.imageset/ic_arrow_drop_down_48px-128.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_compass_outline_grey.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/ic_compass_outline_grey.imageset/Contents.json new file mode 100644 index 0000000..27b91bd --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/ic_compass_outline_grey.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_compass_outline_grey.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ic_compass_outline_grey@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_compass_outline_grey@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_compass_outline_grey.imageset/ic_compass_outline_grey.png b/Sources/Earthquake Network/Assets.xcassets/ic_compass_outline_grey.imageset/ic_compass_outline_grey.png new file mode 100644 index 0000000..2e1f2af Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_compass_outline_grey.imageset/ic_compass_outline_grey.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_compass_outline_grey.imageset/ic_compass_outline_grey@2x.png b/Sources/Earthquake Network/Assets.xcassets/ic_compass_outline_grey.imageset/ic_compass_outline_grey@2x.png new file mode 100644 index 0000000..fcca304 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_compass_outline_grey.imageset/ic_compass_outline_grey@2x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_compass_outline_grey.imageset/ic_compass_outline_grey@3x.png b/Sources/Earthquake Network/Assets.xcassets/ic_compass_outline_grey.imageset/ic_compass_outline_grey@3x.png new file mode 100644 index 0000000..af575e9 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_compass_outline_grey.imageset/ic_compass_outline_grey@3x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_filter_grey600_24dp.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/ic_filter_grey600_24dp.imageset/Contents.json new file mode 100644 index 0000000..090e1de --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/ic_filter_grey600_24dp.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_filter_grey600_24dp.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ic_filter_grey600_24dp-1.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_filter_grey600_24dp-2.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_filter_grey600_24dp.imageset/ic_filter_grey600_24dp-1.png b/Sources/Earthquake Network/Assets.xcassets/ic_filter_grey600_24dp.imageset/ic_filter_grey600_24dp-1.png new file mode 100644 index 0000000..9ab93a6 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_filter_grey600_24dp.imageset/ic_filter_grey600_24dp-1.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_filter_grey600_24dp.imageset/ic_filter_grey600_24dp-2.png b/Sources/Earthquake Network/Assets.xcassets/ic_filter_grey600_24dp.imageset/ic_filter_grey600_24dp-2.png new file mode 100644 index 0000000..490cec3 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_filter_grey600_24dp.imageset/ic_filter_grey600_24dp-2.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_filter_grey600_24dp.imageset/ic_filter_grey600_24dp.png b/Sources/Earthquake Network/Assets.xcassets/ic_filter_grey600_24dp.imageset/ic_filter_grey600_24dp.png new file mode 100644 index 0000000..7fd57b4 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_filter_grey600_24dp.imageset/ic_filter_grey600_24dp.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_help_outline_black_24dp.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/ic_help_outline_black_24dp.imageset/Contents.json new file mode 100644 index 0000000..2cb613e --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/ic_help_outline_black_24dp.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_help_outline_black_24dp.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ic_help_outline_black_24dp@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_help_outline_black_24dp@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_help_outline_black_24dp.imageset/ic_help_outline_black_24dp.png b/Sources/Earthquake Network/Assets.xcassets/ic_help_outline_black_24dp.imageset/ic_help_outline_black_24dp.png new file mode 100644 index 0000000..c0b4f58 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_help_outline_black_24dp.imageset/ic_help_outline_black_24dp.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_help_outline_black_24dp.imageset/ic_help_outline_black_24dp@2x.png b/Sources/Earthquake Network/Assets.xcassets/ic_help_outline_black_24dp.imageset/ic_help_outline_black_24dp@2x.png new file mode 100644 index 0000000..3687bb6 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_help_outline_black_24dp.imageset/ic_help_outline_black_24dp@2x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_help_outline_black_24dp.imageset/ic_help_outline_black_24dp@3x.png b/Sources/Earthquake Network/Assets.xcassets/ic_help_outline_black_24dp.imageset/ic_help_outline_black_24dp@3x.png new file mode 100644 index 0000000..49e8346 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_help_outline_black_24dp.imageset/ic_help_outline_black_24dp@3x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_info_outline_black_24dp.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/ic_info_outline_black_24dp.imageset/Contents.json new file mode 100644 index 0000000..6e373d7 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/ic_info_outline_black_24dp.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_info_outline_black_24dp.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ic_info_outline_black_24dp@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_info_outline_black_24dp@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_info_outline_black_24dp.imageset/ic_info_outline_black_24dp.png b/Sources/Earthquake Network/Assets.xcassets/ic_info_outline_black_24dp.imageset/ic_info_outline_black_24dp.png new file mode 100644 index 0000000..23a2860 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_info_outline_black_24dp.imageset/ic_info_outline_black_24dp.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_info_outline_black_24dp.imageset/ic_info_outline_black_24dp@2x.png b/Sources/Earthquake Network/Assets.xcassets/ic_info_outline_black_24dp.imageset/ic_info_outline_black_24dp@2x.png new file mode 100644 index 0000000..6417ec6 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_info_outline_black_24dp.imageset/ic_info_outline_black_24dp@2x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_info_outline_black_24dp.imageset/ic_info_outline_black_24dp@3x.png b/Sources/Earthquake Network/Assets.xcassets/ic_info_outline_black_24dp.imageset/ic_info_outline_black_24dp@3x.png new file mode 100644 index 0000000..47efbec Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_info_outline_black_24dp.imageset/ic_info_outline_black_24dp@3x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_person_black_24dp.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/ic_person_black_24dp.imageset/Contents.json new file mode 100644 index 0000000..6b670f9 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/ic_person_black_24dp.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_person_black_24dp.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ic_person_black_24dp@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_person_black_24dp@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_person_black_24dp.imageset/ic_person_black_24dp.png b/Sources/Earthquake Network/Assets.xcassets/ic_person_black_24dp.imageset/ic_person_black_24dp.png new file mode 100644 index 0000000..3e1fa0a Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_person_black_24dp.imageset/ic_person_black_24dp.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_person_black_24dp.imageset/ic_person_black_24dp@2x.png b/Sources/Earthquake Network/Assets.xcassets/ic_person_black_24dp.imageset/ic_person_black_24dp@2x.png new file mode 100644 index 0000000..54fc49b Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_person_black_24dp.imageset/ic_person_black_24dp@2x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_person_black_24dp.imageset/ic_person_black_24dp@3x.png b/Sources/Earthquake Network/Assets.xcassets/ic_person_black_24dp.imageset/ic_person_black_24dp@3x.png new file mode 100644 index 0000000..e9a0c2f Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_person_black_24dp.imageset/ic_person_black_24dp@3x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_settings_black_24dp.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/ic_settings_black_24dp.imageset/Contents.json new file mode 100644 index 0000000..ff53a02 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/ic_settings_black_24dp.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_settings_black_24dp.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ic_settings_black_24dp@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_settings_black_24dp@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_settings_black_24dp.imageset/ic_settings_black_24dp.png b/Sources/Earthquake Network/Assets.xcassets/ic_settings_black_24dp.imageset/ic_settings_black_24dp.png new file mode 100644 index 0000000..d788943 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_settings_black_24dp.imageset/ic_settings_black_24dp.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_settings_black_24dp.imageset/ic_settings_black_24dp@2x.png b/Sources/Earthquake Network/Assets.xcassets/ic_settings_black_24dp.imageset/ic_settings_black_24dp@2x.png new file mode 100644 index 0000000..b40ee05 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_settings_black_24dp.imageset/ic_settings_black_24dp@2x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_settings_black_24dp.imageset/ic_settings_black_24dp@3x.png b/Sources/Earthquake Network/Assets.xcassets/ic_settings_black_24dp.imageset/ic_settings_black_24dp@3x.png new file mode 100644 index 0000000..e18303a Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_settings_black_24dp.imageset/ic_settings_black_24dp@3x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_shield_half_full_black_24dp.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/ic_shield_half_full_black_24dp.imageset/Contents.json new file mode 100644 index 0000000..53f035c --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/ic_shield_half_full_black_24dp.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_shield_half_full_black_24dp.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ic_shield_half_full_black_24dp@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_shield_half_full_black_24dp@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_shield_half_full_black_24dp.imageset/ic_shield_half_full_black_24dp.png b/Sources/Earthquake Network/Assets.xcassets/ic_shield_half_full_black_24dp.imageset/ic_shield_half_full_black_24dp.png new file mode 100644 index 0000000..5d6de17 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_shield_half_full_black_24dp.imageset/ic_shield_half_full_black_24dp.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_shield_half_full_black_24dp.imageset/ic_shield_half_full_black_24dp@2x.png b/Sources/Earthquake Network/Assets.xcassets/ic_shield_half_full_black_24dp.imageset/ic_shield_half_full_black_24dp@2x.png new file mode 100644 index 0000000..1f0fc57 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_shield_half_full_black_24dp.imageset/ic_shield_half_full_black_24dp@2x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_shield_half_full_black_24dp.imageset/ic_shield_half_full_black_24dp@3x.png b/Sources/Earthquake Network/Assets.xcassets/ic_shield_half_full_black_24dp.imageset/ic_shield_half_full_black_24dp@3x.png new file mode 100644 index 0000000..39d31c0 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_shield_half_full_black_24dp.imageset/ic_shield_half_full_black_24dp@3x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_star_border_black_24dp.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/ic_star_border_black_24dp.imageset/Contents.json new file mode 100644 index 0000000..8c913fa --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/ic_star_border_black_24dp.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_star_border_black_24dp.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ic_star_border_black_24dp@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_star_border_black_24dp@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_star_border_black_24dp.imageset/ic_star_border_black_24dp.png b/Sources/Earthquake Network/Assets.xcassets/ic_star_border_black_24dp.imageset/ic_star_border_black_24dp.png new file mode 100644 index 0000000..82e2c7a Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_star_border_black_24dp.imageset/ic_star_border_black_24dp.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_star_border_black_24dp.imageset/ic_star_border_black_24dp@2x.png b/Sources/Earthquake Network/Assets.xcassets/ic_star_border_black_24dp.imageset/ic_star_border_black_24dp@2x.png new file mode 100644 index 0000000..a4dba51 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_star_border_black_24dp.imageset/ic_star_border_black_24dp@2x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_star_border_black_24dp.imageset/ic_star_border_black_24dp@3x.png b/Sources/Earthquake Network/Assets.xcassets/ic_star_border_black_24dp.imageset/ic_star_border_black_24dp@3x.png new file mode 100644 index 0000000..aec91f1 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_star_border_black_24dp.imageset/ic_star_border_black_24dp@3x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_verified_user_black_24dp.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/ic_verified_user_black_24dp.imageset/Contents.json new file mode 100644 index 0000000..1b547cd --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/ic_verified_user_black_24dp.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_verified_user_black_24dp.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ic_verified_user_black_24dp@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_verified_user_black_24dp@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_verified_user_black_24dp.imageset/ic_verified_user_black_24dp.png b/Sources/Earthquake Network/Assets.xcassets/ic_verified_user_black_24dp.imageset/ic_verified_user_black_24dp.png new file mode 100644 index 0000000..5436a0d Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_verified_user_black_24dp.imageset/ic_verified_user_black_24dp.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_verified_user_black_24dp.imageset/ic_verified_user_black_24dp@2x.png b/Sources/Earthquake Network/Assets.xcassets/ic_verified_user_black_24dp.imageset/ic_verified_user_black_24dp@2x.png new file mode 100644 index 0000000..ce560d2 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_verified_user_black_24dp.imageset/ic_verified_user_black_24dp@2x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/ic_verified_user_black_24dp.imageset/ic_verified_user_black_24dp@3x.png b/Sources/Earthquake Network/Assets.xcassets/ic_verified_user_black_24dp.imageset/ic_verified_user_black_24dp@3x.png new file mode 100644 index 0000000..60f5f20 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/ic_verified_user_black_24dp.imageset/ic_verified_user_black_24dp@3x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/if_sync.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/if_sync.imageset/Contents.json new file mode 100644 index 0000000..59d48b9 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/if_sync.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_action_refresh.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ic_action_refresh @2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_action_refresh @3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/if_sync.imageset/ic_action_refresh @2x.png b/Sources/Earthquake Network/Assets.xcassets/if_sync.imageset/ic_action_refresh @2x.png new file mode 100644 index 0000000..e0f0ca2 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/if_sync.imageset/ic_action_refresh @2x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/if_sync.imageset/ic_action_refresh @3x.png b/Sources/Earthquake Network/Assets.xcassets/if_sync.imageset/ic_action_refresh @3x.png new file mode 100644 index 0000000..723185d Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/if_sync.imageset/ic_action_refresh @3x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/if_sync.imageset/ic_action_refresh.png b/Sources/Earthquake Network/Assets.xcassets/if_sync.imageset/ic_action_refresh.png new file mode 100644 index 0000000..8f7e16b Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/if_sync.imageset/ic_action_refresh.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/menu.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/menu.imageset/Contents.json new file mode 100644 index 0000000..acf46f4 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/menu.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "menu.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "menu@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "menu@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/menu.imageset/menu.png b/Sources/Earthquake Network/Assets.xcassets/menu.imageset/menu.png new file mode 100644 index 0000000..34c5f6b Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/menu.imageset/menu.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/menu.imageset/menu@2x.png b/Sources/Earthquake Network/Assets.xcassets/menu.imageset/menu@2x.png new file mode 100644 index 0000000..177f9f3 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/menu.imageset/menu@2x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/menu.imageset/menu@3x.png b/Sources/Earthquake Network/Assets.xcassets/menu.imageset/menu@3x.png new file mode 100644 index 0000000..d21cf59 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/menu.imageset/menu@3x.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/message.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/message.imageset/Contents.json new file mode 100644 index 0000000..ac596f0 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/message.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "message-1.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "message-2.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "message.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/message.imageset/message-1.png b/Sources/Earthquake Network/Assets.xcassets/message.imageset/message-1.png new file mode 100644 index 0000000..8ff5839 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/message.imageset/message-1.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/message.imageset/message-2.png b/Sources/Earthquake Network/Assets.xcassets/message.imageset/message-2.png new file mode 100644 index 0000000..830ae73 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/message.imageset/message-2.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/message.imageset/message.png b/Sources/Earthquake Network/Assets.xcassets/message.imageset/message.png new file mode 100644 index 0000000..4d68d12 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/message.imageset/message.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/priority.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/priority.imageset/Contents.json new file mode 100644 index 0000000..becb7d3 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/priority.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "priority.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "priority copia 2.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "priority copia 3.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/priority.imageset/priority copia 2.png b/Sources/Earthquake Network/Assets.xcassets/priority.imageset/priority copia 2.png new file mode 100644 index 0000000..3ad0f2c Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/priority.imageset/priority copia 2.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/priority.imageset/priority copia 3.png b/Sources/Earthquake Network/Assets.xcassets/priority.imageset/priority copia 3.png new file mode 100644 index 0000000..8ec0732 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/priority.imageset/priority copia 3.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/priority.imageset/priority.png b/Sources/Earthquake Network/Assets.xcassets/priority.imageset/priority.png new file mode 100644 index 0000000..20ea3d9 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/priority.imageset/priority.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/star_blue.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/star_blue.imageset/Contents.json new file mode 100644 index 0000000..21101be --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/star_blue.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "star_blue-1.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "star_blue.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "star_blue-2.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/star_blue.imageset/star_blue-1.png b/Sources/Earthquake Network/Assets.xcassets/star_blue.imageset/star_blue-1.png new file mode 100644 index 0000000..1562b1d Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/star_blue.imageset/star_blue-1.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/star_blue.imageset/star_blue-2.png b/Sources/Earthquake Network/Assets.xcassets/star_blue.imageset/star_blue-2.png new file mode 100644 index 0000000..cb54dfa Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/star_blue.imageset/star_blue-2.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/star_blue.imageset/star_blue.png b/Sources/Earthquake Network/Assets.xcassets/star_blue.imageset/star_blue.png new file mode 100644 index 0000000..841d96b Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/star_blue.imageset/star_blue.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/star_blue1.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/star_blue1.imageset/Contents.json new file mode 100644 index 0000000..b2f8df3 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/star_blue1.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "star_blue1-2.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "star_blue1.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "star_blue1-1.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/star_blue1.imageset/star_blue1-1.png b/Sources/Earthquake Network/Assets.xcassets/star_blue1.imageset/star_blue1-1.png new file mode 100644 index 0000000..78e4d19 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/star_blue1.imageset/star_blue1-1.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/star_blue1.imageset/star_blue1-2.png b/Sources/Earthquake Network/Assets.xcassets/star_blue1.imageset/star_blue1-2.png new file mode 100644 index 0000000..ab2ebee Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/star_blue1.imageset/star_blue1-2.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/star_blue1.imageset/star_blue1.png b/Sources/Earthquake Network/Assets.xcassets/star_blue1.imageset/star_blue1.png new file mode 100644 index 0000000..d130f1e Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/star_blue1.imageset/star_blue1.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/star_green.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/star_green.imageset/Contents.json new file mode 100644 index 0000000..64945b2 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/star_green.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "star_green1-1.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "star_green1-2.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "star_green1.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/star_green.imageset/star_green1-1.png b/Sources/Earthquake Network/Assets.xcassets/star_green.imageset/star_green1-1.png new file mode 100644 index 0000000..527e1a4 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/star_green.imageset/star_green1-1.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/star_green.imageset/star_green1-2.png b/Sources/Earthquake Network/Assets.xcassets/star_green.imageset/star_green1-2.png new file mode 100644 index 0000000..76807d4 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/star_green.imageset/star_green1-2.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/star_green.imageset/star_green1.png b/Sources/Earthquake Network/Assets.xcassets/star_green.imageset/star_green1.png new file mode 100644 index 0000000..7ad3f7c Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/star_green.imageset/star_green1.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/star_lightblue.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/star_lightblue.imageset/Contents.json new file mode 100644 index 0000000..d10b166 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/star_lightblue.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "star_lightblue-1.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "star_lightblue.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "star_lightblue-2.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/star_lightblue.imageset/star_lightblue-1.png b/Sources/Earthquake Network/Assets.xcassets/star_lightblue.imageset/star_lightblue-1.png new file mode 100644 index 0000000..6b42811 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/star_lightblue.imageset/star_lightblue-1.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/star_lightblue.imageset/star_lightblue-2.png b/Sources/Earthquake Network/Assets.xcassets/star_lightblue.imageset/star_lightblue-2.png new file mode 100644 index 0000000..5f3eab2 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/star_lightblue.imageset/star_lightblue-2.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/star_lightblue.imageset/star_lightblue.png b/Sources/Earthquake Network/Assets.xcassets/star_lightblue.imageset/star_lightblue.png new file mode 100644 index 0000000..06e6f10 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/star_lightblue.imageset/star_lightblue.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/star_lightblue1.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/star_lightblue1.imageset/Contents.json new file mode 100644 index 0000000..2767bda --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/star_lightblue1.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "star_lightblue1.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "star_lightblue1-1.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "star_lightblue1-2.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/star_lightblue1.imageset/star_lightblue1-1.png b/Sources/Earthquake Network/Assets.xcassets/star_lightblue1.imageset/star_lightblue1-1.png new file mode 100644 index 0000000..3c66866 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/star_lightblue1.imageset/star_lightblue1-1.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/star_lightblue1.imageset/star_lightblue1-2.png b/Sources/Earthquake Network/Assets.xcassets/star_lightblue1.imageset/star_lightblue1-2.png new file mode 100644 index 0000000..b488c51 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/star_lightblue1.imageset/star_lightblue1-2.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/star_lightblue1.imageset/star_lightblue1.png b/Sources/Earthquake Network/Assets.xcassets/star_lightblue1.imageset/star_lightblue1.png new file mode 100644 index 0000000..53bab60 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/star_lightblue1.imageset/star_lightblue1.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/star_red1.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/star_red1.imageset/Contents.json new file mode 100644 index 0000000..93865a5 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/star_red1.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "star_red1.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "star_red1-1.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "star_red1-2.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/star_red1.imageset/star_red1-1.png b/Sources/Earthquake Network/Assets.xcassets/star_red1.imageset/star_red1-1.png new file mode 100644 index 0000000..9779403 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/star_red1.imageset/star_red1-1.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/star_red1.imageset/star_red1-2.png b/Sources/Earthquake Network/Assets.xcassets/star_red1.imageset/star_red1-2.png new file mode 100644 index 0000000..7fe78df Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/star_red1.imageset/star_red1-2.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/star_red1.imageset/star_red1.png b/Sources/Earthquake Network/Assets.xcassets/star_red1.imageset/star_red1.png new file mode 100644 index 0000000..98fc654 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/star_red1.imageset/star_red1.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/star_white.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/star_white.imageset/Contents.json new file mode 100644 index 0000000..0ad4081 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/star_white.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "star_white-2.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "star_white.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "star_white-1.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/star_white.imageset/star_white-1.png b/Sources/Earthquake Network/Assets.xcassets/star_white.imageset/star_white-1.png new file mode 100644 index 0000000..0a272c1 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/star_white.imageset/star_white-1.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/star_white.imageset/star_white-2.png b/Sources/Earthquake Network/Assets.xcassets/star_white.imageset/star_white-2.png new file mode 100644 index 0000000..9135ff3 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/star_white.imageset/star_white-2.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/star_white.imageset/star_white.png b/Sources/Earthquake Network/Assets.xcassets/star_white.imageset/star_white.png new file mode 100644 index 0000000..b529ac6 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/star_white.imageset/star_white.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/star_white1.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/star_white1.imageset/Contents.json new file mode 100644 index 0000000..1b22117 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/star_white1.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "star_white1-2.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "star_white1-1.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "star_white1.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/star_white1.imageset/star_white1-1.png b/Sources/Earthquake Network/Assets.xcassets/star_white1.imageset/star_white1-1.png new file mode 100644 index 0000000..d024097 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/star_white1.imageset/star_white1-1.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/star_white1.imageset/star_white1-2.png b/Sources/Earthquake Network/Assets.xcassets/star_white1.imageset/star_white1-2.png new file mode 100644 index 0000000..6164401 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/star_white1.imageset/star_white1-2.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/star_white1.imageset/star_white1.png b/Sources/Earthquake Network/Assets.xcassets/star_white1.imageset/star_white1.png new file mode 100644 index 0000000..1f4f0c6 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/star_white1.imageset/star_white1.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/star_yellow.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/star_yellow.imageset/Contents.json new file mode 100644 index 0000000..7eb272b --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/star_yellow.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "star_yellow.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "star_yellow1.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "star_yellow1-1.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/star_yellow.imageset/star_yellow.png b/Sources/Earthquake Network/Assets.xcassets/star_yellow.imageset/star_yellow.png new file mode 100644 index 0000000..4250801 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/star_yellow.imageset/star_yellow.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/star_yellow.imageset/star_yellow1-1.png b/Sources/Earthquake Network/Assets.xcassets/star_yellow.imageset/star_yellow1-1.png new file mode 100644 index 0000000..503829c Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/star_yellow.imageset/star_yellow1-1.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/star_yellow.imageset/star_yellow1.png b/Sources/Earthquake Network/Assets.xcassets/star_yellow.imageset/star_yellow1.png new file mode 100644 index 0000000..a3ea088 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/star_yellow.imageset/star_yellow1.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/top_100k.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/top_100k.imageset/Contents.json new file mode 100644 index 0000000..bb797f6 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/top_100k.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "top_100k-1.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "top_100k-2.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "top_100k.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/top_100k.imageset/top_100k-1.png b/Sources/Earthquake Network/Assets.xcassets/top_100k.imageset/top_100k-1.png new file mode 100644 index 0000000..6b92bc3 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/top_100k.imageset/top_100k-1.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/top_100k.imageset/top_100k-2.png b/Sources/Earthquake Network/Assets.xcassets/top_100k.imageset/top_100k-2.png new file mode 100644 index 0000000..ac4323f Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/top_100k.imageset/top_100k-2.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/top_100k.imageset/top_100k.png b/Sources/Earthquake Network/Assets.xcassets/top_100k.imageset/top_100k.png new file mode 100644 index 0000000..4745029 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/top_100k.imageset/top_100k.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/top_10k.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/top_10k.imageset/Contents.json new file mode 100644 index 0000000..8b47818 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/top_10k.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "top_10k-1.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "top_10k-2.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "top_10k.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/top_10k.imageset/top_10k-1.png b/Sources/Earthquake Network/Assets.xcassets/top_10k.imageset/top_10k-1.png new file mode 100644 index 0000000..c2ccc70 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/top_10k.imageset/top_10k-1.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/top_10k.imageset/top_10k-2.png b/Sources/Earthquake Network/Assets.xcassets/top_10k.imageset/top_10k-2.png new file mode 100644 index 0000000..854ab3a Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/top_10k.imageset/top_10k-2.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/top_10k.imageset/top_10k.png b/Sources/Earthquake Network/Assets.xcassets/top_10k.imageset/top_10k.png new file mode 100644 index 0000000..2632bdc Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/top_10k.imageset/top_10k.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/weather_01d.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/weather_01d.imageset/Contents.json new file mode 100644 index 0000000..ab82228 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/weather_01d.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "weather_01d.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/weather_01d.imageset/weather_01d.png b/Sources/Earthquake Network/Assets.xcassets/weather_01d.imageset/weather_01d.png new file mode 100644 index 0000000..7d2f792 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/weather_01d.imageset/weather_01d.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/weather_01n.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/weather_01n.imageset/Contents.json new file mode 100644 index 0000000..dd4944e --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/weather_01n.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "weather_01n.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/weather_01n.imageset/weather_01n.png b/Sources/Earthquake Network/Assets.xcassets/weather_01n.imageset/weather_01n.png new file mode 100644 index 0000000..19d0c2e Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/weather_01n.imageset/weather_01n.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/weather_02d.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/weather_02d.imageset/Contents.json new file mode 100644 index 0000000..2a902f4 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/weather_02d.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "weather_02d.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/weather_02d.imageset/weather_02d.png b/Sources/Earthquake Network/Assets.xcassets/weather_02d.imageset/weather_02d.png new file mode 100644 index 0000000..d86a99c Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/weather_02d.imageset/weather_02d.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/weather_02n.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/weather_02n.imageset/Contents.json new file mode 100644 index 0000000..c1a7665 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/weather_02n.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "weather_02n.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/weather_02n.imageset/weather_02n.png b/Sources/Earthquake Network/Assets.xcassets/weather_02n.imageset/weather_02n.png new file mode 100644 index 0000000..780c35c Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/weather_02n.imageset/weather_02n.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/weather_03d.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/weather_03d.imageset/Contents.json new file mode 100644 index 0000000..4f91ed0 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/weather_03d.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "weather_03d.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/weather_03d.imageset/weather_03d.png b/Sources/Earthquake Network/Assets.xcassets/weather_03d.imageset/weather_03d.png new file mode 100644 index 0000000..8a4a8e9 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/weather_03d.imageset/weather_03d.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/weather_03n.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/weather_03n.imageset/Contents.json new file mode 100644 index 0000000..253cc3c --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/weather_03n.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "weather_03n.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/weather_03n.imageset/weather_03n.png b/Sources/Earthquake Network/Assets.xcassets/weather_03n.imageset/weather_03n.png new file mode 100644 index 0000000..8a4a8e9 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/weather_03n.imageset/weather_03n.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/weather_04d.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/weather_04d.imageset/Contents.json new file mode 100644 index 0000000..ed4df03 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/weather_04d.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "weather_04d.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/weather_04d.imageset/weather_04d.png b/Sources/Earthquake Network/Assets.xcassets/weather_04d.imageset/weather_04d.png new file mode 100644 index 0000000..4677b85 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/weather_04d.imageset/weather_04d.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/weather_04n.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/weather_04n.imageset/Contents.json new file mode 100644 index 0000000..fd0473d --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/weather_04n.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "weather_04n.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/weather_04n.imageset/weather_04n.png b/Sources/Earthquake Network/Assets.xcassets/weather_04n.imageset/weather_04n.png new file mode 100644 index 0000000..4677b85 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/weather_04n.imageset/weather_04n.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/weather_09d.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/weather_09d.imageset/Contents.json new file mode 100644 index 0000000..a3b0e4f --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/weather_09d.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "weather_09d.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/weather_09d.imageset/weather_09d.png b/Sources/Earthquake Network/Assets.xcassets/weather_09d.imageset/weather_09d.png new file mode 100644 index 0000000..b7cb53b Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/weather_09d.imageset/weather_09d.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/weather_09n.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/weather_09n.imageset/Contents.json new file mode 100644 index 0000000..5544beb --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/weather_09n.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "weather_09n.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/weather_09n.imageset/weather_09n.png b/Sources/Earthquake Network/Assets.xcassets/weather_09n.imageset/weather_09n.png new file mode 100644 index 0000000..b7cb53b Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/weather_09n.imageset/weather_09n.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/weather_10d.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/weather_10d.imageset/Contents.json new file mode 100644 index 0000000..4dbe297 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/weather_10d.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "weather_10d.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/weather_10d.imageset/weather_10d.png b/Sources/Earthquake Network/Assets.xcassets/weather_10d.imageset/weather_10d.png new file mode 100644 index 0000000..b1e1f83 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/weather_10d.imageset/weather_10d.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/weather_10n.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/weather_10n.imageset/Contents.json new file mode 100644 index 0000000..01e3441 --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/weather_10n.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "weather_10n.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/weather_10n.imageset/weather_10n.png b/Sources/Earthquake Network/Assets.xcassets/weather_10n.imageset/weather_10n.png new file mode 100644 index 0000000..b09628e Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/weather_10n.imageset/weather_10n.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/weather_11d.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/weather_11d.imageset/Contents.json new file mode 100644 index 0000000..cb0638b --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/weather_11d.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "weather_11d.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/weather_11d.imageset/weather_11d.png b/Sources/Earthquake Network/Assets.xcassets/weather_11d.imageset/weather_11d.png new file mode 100644 index 0000000..f3ce654 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/weather_11d.imageset/weather_11d.png differ diff --git a/Sources/Earthquake Network/Assets.xcassets/weather_11n.imageset/Contents.json b/Sources/Earthquake Network/Assets.xcassets/weather_11n.imageset/Contents.json new file mode 100644 index 0000000..b9d0f7f --- /dev/null +++ b/Sources/Earthquake Network/Assets.xcassets/weather_11n.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "weather_11n.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sources/Earthquake Network/Assets.xcassets/weather_11n.imageset/weather_11n.png b/Sources/Earthquake Network/Assets.xcassets/weather_11n.imageset/weather_11n.png new file mode 100644 index 0000000..f3ce654 Binary files /dev/null and b/Sources/Earthquake Network/Assets.xcassets/weather_11n.imageset/weather_11n.png differ diff --git a/Sources/Earthquake Network/Base.lproj/LaunchScreen.storyboard b/Sources/Earthquake Network/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..9d9a985 --- /dev/null +++ b/Sources/Earthquake Network/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sources/Earthquake Network/Base.lproj/Main.storyboard b/Sources/Earthquake Network/Base.lproj/Main.storyboard new file mode 100644 index 0000000..db65555 --- /dev/null +++ b/Sources/Earthquake Network/Base.lproj/Main.storyboard @@ -0,0 +1,4938 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sources/Earthquake Network/Costanti.h b/Sources/Earthquake Network/Costanti.h new file mode 100644 index 0000000..10be575 --- /dev/null +++ b/Sources/Earthquake Network/Costanti.h @@ -0,0 +1,343 @@ +// +// Costanti.h +// Earthquake Network +// +// Created by Luca Beretta on 14/09/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#ifndef Costanti_h +#define Costanti_h + +// costante gravitazionale +#define G 9.81 + +// URL registrazione server +#define URL_SERVER_REGISTRAZIONE @"http://srv.earthquakenetwork.it/distquake_upload_gcm_regid2.php" +// URL posizione server +#define URL_SERVER_POSIZIONE @"http://srv.earthquakenetwork.it/distquake_upload_gcm_latlon.php" + +#define URL_SERVER_CAL_RIL @"http://srv.earthquakenetwork.it/distquake_upload4.php" +// download rete smartphone +#define URL_SERVER_DOWNLOAD @"http://srv.earthquakenetwork.it/distquake_count_redis.php" +// download grafico smartphone +#define URL_SERVER_GEAFICO_UTENTI @"http://srv.earthquakenetwork.it/distquake_download_users.php" +// download area check +#define URL_SERVER_AREA_CHECK @"http://srv.earthquakenetwork.it/distquake_download_areacheck.php" +// download pastquakes +#define URL_SERVER_PAST_QUAKES @"http://srv.earthquakenetwork.it/distquake_download_pastquakes.php" +// download Utenti disponibili +#define URL_SERVER_UTENTI_DISPONIBILI @"http://srv.earthquakenetwork.it/distquake_count_top_redis.php" +// download tempo disponibili passare a Pro +#define URL_SERVER_TEMPO_DISPONIBILI @"http://srv.earthquakenetwork.it/distquake_download_offer_status.php" +// download segnalazioni +#define URL_SERVER_DOWNLOAD_SEGNALAZIONI_UTENTE @"http://srv.earthquakenetwork.it/distquake_download_manual.php" +// Invio segnalazione +#define URL_SERVER_UPLOAD_SEGNALAZIONI_UTENTE @"http://srv.earthquakenetwork.it/distquake_upload_manual3.php" +#define URL_SERVER_UPLOAD_SEGNALAZIONI_COMMENTO_UTENTE @"http://srv.earthquakenetwork.it/distquake_upload_manual_message.php" + +// upload impostazioni // http://srv.earthquakenetwork.it/distquake_upload_settings8.php + +#define URL_SERVER_UPLOAD_IMPOSTAZIONI @"http://srv.earthquakenetwork.it/distquake_upload_settings9.php" + +#define URL_LINK_MESSAGGIO @"http://www.finazzieng.it/mysql/distquake_download_message.php" + +// twitter +#define TWITTER_LINK @"https://twitter.com/SismoDetector" + +#define TEMPO_INVIO_MESSAGGIO 5 +#define TEMPO_INVIO_COMMENTO 30 + + +// informazioni menu sinistra + +#define INDIRIZZO_INGLESE @"http://wp.earthquakenetwork.it/en" +#define INDIRIZZO_ITALIANO @"http://wp.earthquakenetwork.it/it" +#define INDIRIZZO_SPAGNOLO @"http://wp.earthquakenetwork.it/es" + + +// download reti sismiche +#define URL_SERVER_DOWNLOAD_RETI_SISMICHE @"http://srv.earthquakenetwork.it/distquake_download_automatic14.php" +// Mappa locale +#define URL_SERVER_MAPPA_LOCALE_UTENTE @"https://fusiontables.googleusercontent.com/embedviz?viz=MAP&q=select+col2+from+1nEJRfnVQzL0qNA1pDc2nPDX" +// Tsunami +#define URL_SERVER_DOWNLOAD_TSUNAMI @"http://srv.earthquakenetwork.it/distquake_download_tsunami.php" + +#define URL_SERVER_MAPPA_LOCALE @"httpS://fusiontables.googleusercontent.com/embedviz?viz=MAP&qselect+col2+from+1nEJRfnVQzL0qNA1pDc2nPDX" + +// colori navigation bar +#define COLORE_BARRA_NAVIGAZIONE [UIColor colorWithRed:198.0/255.0 green:213.0/255.0 blue:247.0/255.0 alpha:1.0] + +// colori celle tableview rete sismi +#define COLORE_CELLA_MAGNITUTE_LEGGERA [UIColor colorWithRed:208.0/255.0 green:234.0/255.0 blue:201.0/255.0 alpha:1.0] +#define COLORE_CELLA_MAGNITUTE_LEGGERA_ETI [UIColor colorWithRed:215.0/255.0 green:253.0/255.0 blue:210.0/255.0 alpha:1.0] +#define COLORE_CELLA_MAGNITUTE_MEDIA [UIColor colorWithRed:254.0/255.0 green:252.0/255.0 blue:203.0/255.0 alpha:1.0] +#define COLORE_CELLA_MAGNITUTE_MEDIA_ETI [UIColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:245.0/255.0 alpha:1.0] +#define COLORE_CELLA_MAGNITUTE_FORTE [UIColor colorWithRed:254.0/255.0 green:186.0/255.0 blue:186.0/255.0 alpha:1.0] +#define COLORE_CELLA_MAGNITUTE_FORTE_ETI [UIColor colorWithRed:252.0/255.0 green:219.0/255.0 blue:219.0/255.0 alpha:1.0] + +#define COLORE_CELLA_MAGNITUTE_FORTE_TESTO [UIColor colorWithRed:240.0/255.0 green:0.0/255.0 blue:14.0/255.0 alpha:1.0] +#define COLORE_CELLA_MAGNITUTE_MEDIA_TESTO [UIColor colorWithRed:238.0/255.0 green:185.0/255.0 blue:14.0/255.0 alpha:1.0] +#define COLORE_CELLA_MAGNITUTE_LEGGERA_TESTO [UIColor colorWithRed:26.0/255.0 green:144.0/255.0 blue:20.0/255.0 alpha:1.0] + +// rete Smartphone +#define IDENTIFIER_ANNOTATION_RETESMARTPHONE @"IDENTIFIER_ANNOTATION_RETESMARTPHONE" +// pastequakes +#define IDENTIFIER_ANNOTATION_PASTQUAKES @"IDENTIFIER_ANNOTATION_PASTQUAKES" + +// sismi +#define IDENTIFIER_ANNOTATION_SISMI @"IDENTIFIER_ANNOTATION_SISMI" +// rete smartphone notifiche +#define IDENTIFIER_ANNOTATION_RS_NOTIFICA @"IDENTIFIER_ANNOTATION_RS_NOTIFICA" + +// filtriMappaTime +typedef enum : NSInteger { + dieciMinuti = 0, + unOra, + dueOre, + seiOre, + dodiciOre, + unGiorno, + unaSettimana, + unMese, + unAnno +} EQNFiltriMappa; + +// cella tipo Rete sismica + +typedef enum : NSInteger { + defaultCell = 0, + mappaCell, + meteoCell + +} EQNReteSismicaCell; + +// dettagli Mappa tipo +typedef enum : NSInteger { + reteSmartphone = 0, + reteSismica, + segnalazioneUtenti + +} EQNTipoDettagliMappa; + +typedef enum : NSInteger { + reteSmartphoneController = 0, + reteSismicaController, + segnalazioneUtentiController, + tsunamiControler + +} EQNController; + + +// IMPOSTAZIONI NAZIONE RETE SISMICA + +typedef enum : NSInteger { + mondo = 0, + italia, + spagna, + cina, + giappone, + nicaragua, + messico, + colombia, + costaRica, + chile, + venezuela, + nuovaZelanda, + argentina, + equador, + filippine, + perù, + repubblicaDomenicana, + altro + +} EQNNazioneSelect; + +typedef enum : NSInteger { + annulla = 0, + nazione, + enti + +} EQNfiltroEnti; +// Chiave googleMaps + +#define GOOGLE_MAP_KEY @"AIzaSyDc2V2vpBmbSnAisiN18rY17Dm7lzVWNAg" + +// NOTIFICHE +#define NOTIFICA_DOWNLOAD_TERMINATO @"NOTIFICA_DOWNLOAD_TERMINATO" + +#define MESSAGGIO @"MESSAGGIO_ERRORE" + +typedef enum : NSInteger { + registrazione = 0, + posizione, + calibrazione, + rilevamento, + downloadDati, + graficoSmartPhone, + areaCheck, + pastquakes, + utentiDisponibili, + tempoDisponibile, + segnalazioneManuale, + tsunami, + segnalazzioneTerremoto, + commentoTerremoto, + impostazioniNotifiche +} EQNTipoChiamata; + +// Manager +#define MANAGER_DATA_RETE_SMARTPHONE @"MANAGER_DATA_RETE_SMARTPHONE" +#define MANAGER_DATA_AREA_CHECK @"MANAGER_DATA_AREA_CHECK" +#define MANAGER_DATA_DATI_GRAFICO_UTENTI @"MANAGER_DATA_DATI_GRAFICO_UTENTI" +#define MANAGER_DATA_DATI_PASTQUAKES @"MANAGER_DATA_DATI_PASTQUAKES" +#define MANAGER_DATA_ELENCO_SEGNALAZIONI_MANUALI @"MANAGER_DATA_ELENCO_SEGNALAZIONI_MANUALI" +#define MANAGER_DATA_RETI_SISMICHE @"MANAGER_DATA_RETI_SISMICHE" +#define MANAGER_DATA_LISTA_TSUNAMI @"MANAGER_DATA_LISTA_TSUNAMI" + + +// chiavi rMax e rMin +#define rMax @"rMax" +#define rMin @"rMin" + +// costante frequenza campionamento accelerometro +#define kUpdateInterval (1.0f / 100.0f) + +// costante distanza posizione per avviare la segnalazone +#define DISTANZA_METRI_SEGNALAZIONE 8000 +#define TEMPO_AGGIORNAMENTO_POSIZIONE 5400 + +//////////////////////////////////////// RILEVAMENTO //////////////////////////////////////// +// secondi durata rilevamento +#define SECONDI_RILIEVO 3 +// Soglia deviazione standard se superata lo stato del rilievo è positivo altrimenti negativo +#define SOGLIA_DEVIAZIONE_RILIEVO 1.8 +// stato rilievo +// il parametro viene inviato al server e_t1 +typedef enum : NSInteger { + negativo = 0, + positivo +} EQNRilevamentoSoglia; + +//////////////////////////////////////// CALIBRAZIONE //////////////////////////////////////// +// secondi durata calibrazione +#define SECONDI_CALIBRAZIONE 120 +#define TEMPO_LATENZA_CALIBRAZIONE 120 +#define TEMPO_RIPETIZIONE_CALIBRAZIONE 1800 + +// soglia valore che il valore massimo r non deve superare +#define SOGLIAMAX 0.2 +// soglia valore che il valore minimo r non deve superare +#define SOGLIAMIN -0.2 +// stato calibrazione +// il parametro viene inviato al server e_t +typedef enum : NSInteger { + calibrato = 0, + nonCalibrato +} EQNStatoCal; + +//////////////////////////////////////// SEGNALAZIONE MANUALE TERREMOTI //////////////////////////////////////// +#define CODE_MESSAGE_EQN @"CODE_MESSAGE_EQN" +#define DATA_MESSAGE_EQN @"DATA_MESSAGE_EQN" + + +//////////////////////////////////////// USER //////////////////////////////////////// + +#define TOKEN_USER @"EQNToken_User" +#define USER_ID @"EQNUSER_ID" +#define LAST_LOCATION @"EQNLast_Location" +#define DISTANZA_USER @"EQNDistanza_User" +#define NOTIFICA_TOKEN @"FCMToken_EQN" +#endif /* Costanti_h */ + + +/////////////////////////////////// impostazioni //////////////////////////////////// + +#define NOTIFICHE_SISMI @"NOTIFICHE_SISMI" +#define NOTIFICHE_ORA_INIZIO @"NOTIFICHE_ORA_INIZIO" +#define NOTIFICHE_ORA_FINE @"NOTIFICHE_ORA_FINE" +#define NOTIFICHE_ATTIVA_ORARIO @"NOTIFICHE_ATTIVA_ORARIO" + + +#define INFORMAZIONI_APP_MENU @"INFORMAZIONI_APP_MENU" + + +///////////////////// Tempo reale ///////////////////////////////// +#define NOTIFICHE_TR_DISTANZA_TEMPO_REALE_LIEVE @"NOTIFICHE_TR_DISTANZA_TEMPO_REALE_LIEVE" +#define NOTIFICHE_TR_DISTANZA_TEMPO_REALE_FORTE @"NOTIFICHE_TR_DISTANZA_TEMPO_REALE_FORTE" +#define NOTIFICHE_TR_ATTIVA_TEMPO_REALE @"NOTIFICHE_TR_ATTIVA_TEMPO_REALE" +#define NOTIFICHE_TR_ATTIVA_SISMI_SENZA_INTENSITA @"NOTIFICHE_TR_ATTIVA_SISMI_SENZA_INTENSITA" +#define NOTIFICHE_TR_ATTIVA_SISMI_FORTI @"NOTIFICHE_TR_ATTIVA_SISMI_FORTI" + +/////////////////// Segnalazioni Utente //////////////////////////// +#define NOTIFICHE_SU_DISTANZA_POSIZIONE @"NOTIFICHE_SU_DISTANZA_POSIZIONE" +#define NOTIFICHE_SU_ATTIVA_SEGNALAZIONE_UTENTE @"NOTIFICHE_SU_ATTIVA_SEGNALAZIONE_UTENTE" + +/////////////////// Reti sismiche //////////////////////////// +#define NOTIFICHE_DISTANZA_POSIZIONE_RETI_SISMICHE @"NOTIFICHE_DISTANZA_POSIZIONE_RETI_SISMICHE" +#define NOTIFICHE_ATTIVA_RETI_SISMICHE @"NOTIFICHE_ATTIVA_RETI_SISMICHE" +#define NOTIFICHE_ATTIVA_RETI_SISMICHE_VICINE @"NOTIFICHE_ATTIVA_RETI_SISMICHE_VICINE" +#define NOTIFICHE_ATTIVA_RETI_TERREMOTI_FORTI @"NOTIFICHE_ATTIVA_RETI_TERREMOTI_FORTI" +#define NOTIFICHE_ATTIVA_RETI_ENERGIA_SISMI @"NOTIFICHE_ATTIVA_RETI_ENERGIA_SISMI" +#define NOTIFICHE_ATTIVA_RETI_DISTANZA_VICINI @"NOTIFICHE_ATTIVA_RETI_DISTANZA_VICINI" +#define NOTIFICHE_ATTIVA_RETI_ENERGIA_FORTI @"NOTIFICHE_ATTIVA_RETI_ENERGIA_FORTI" +#define NOTIFICHE_ATTIVA_RETI_LISTA_ENTI @"NOTIFICHE_ATTIVA_RETI_LISTA_ENTI" + + +#define IMPOSTAZIONE_NAZIONE_RETI_SISMICHEI @"IMPOSTAZIONE_NAZIONE_RETI_SISMICHEI" +#define IMPOSTAZIONE_ENTI_RETI_SISMICHEI @"IMPOSTAZIONE_ENTI_RETI_SISMICHEI" +#define IMPOSTAZIONE_TIPO_FILTRO_RETI_SISMICHEI @"IMPOSTAZIONE_TIPO_FILTRO_RETI_SISMICHEI" + + +/////////////////// Tsunami //////////////////////////// +#define NOTIFICHE_ORA_INIZIO_TSUNAMI @"NOTIFICHE_ORA_INIZIO_TSUNAMI" +#define NOTIFICHE_ORA_FINE_TSUNAMI @"NOTIFICHE_ORA_FINE_TSUNAMI" +#define NOTIFICHE_ABILITATO_TSUNAMI @"NOTIFICHE_ABILITATO_TSUNAMI" +#define NOTIFICHE_ABILITATO_ITERVALLO_TSUNAMI @"NOTIFICHE_ABILITATO_ITERVALLO_TSUNAMI" +#define NOTIFICHE_LISTA_MESSAGGI__TSUNAMI @"NOTIFICHE_LISTA_MESSAGGI__TSUNAMI" +#define NOTIFICHE_LISTA_AREE_INTERESSE_TSUNAMI @"NOTIFICHE_LISTA_AREE_INTERESSE_TSUNAMI" + +/////////////////// Allera sismica //////////////////////////// +#define NOTIFICHE_ALLERA_SISMICA_ABILITATO @"NOTIFICHE_ALLERA_SISMICA_ABILITATO" +#define NOTIFICHE_ALLERA_SISMICA_SISMI_DA_NOTIFICARE @"NOTIFICHE_ALLERA_SISMICA_SISMI_DA_NOTIFICARE" +#define NOTIFICHE_ALLERA_SISMICA_SENZA_INTENSITA @"NOTIFICHE_ALLERA_SISMICA_SENZA_INTENSITA" +#define NOTIFICHE_ALLERA_SISMICA_RAGGIO_SISMI_LIEVI @"NOTIFICHE_ALLERA_SISMICA_RAGGIO_SISMI_LIEVI" +#define NOTIFICHE_ALLERA_SISMICA_RAGGIO_SISMI_FORTI @"NOTIFICHE_ALLERA_SISMICA_RAGGIO_SISMI_FORTI" +#define NOTIFICHE_ALLERA_SISMICA_TONO_ALLARME @"NOTIFICHE_ALLERA_SISMICA_TONO_ALLARME" +#define NOTIFICHE_ALLERA_SISMICA_IMPOSTA_VOLUME @"NOTIFICHE_ALLERA_SISMICA_IMPOSTA_VOLUME" +#define NOTIFICHE_ALLERA_SISMICA_TESTA_ALLARME @"NOTIFICHE_ALLERA_SISMICA_TESTA_ALLARME" +#define NOTIFICHE_ALLERA_SISMICA_ABILITA_INTERVALLO @"NOTIFICHE_ALLERA_SISMICA_ABILITA_INTERVALLO" +#define NOTIFICHE_ALLERA_SISMICA_ORA_INIZIO @"NOTIFICHE_ALLERA_SISMICA_ORA_INIZIO" +#define NOTIFICHE_ALLERA_SISMICA_ORA_FINE @"NOTIFICHE_ALLERA_SISMICA_ORA_INIZIO" + +// NOTIFICHE RETE SMARTPHONE +#define NOTIFICHE_RETE_SMARTPHONE_DATA_NOTIFICA @"NOTIFICHE_RETE_SMARTPHONE_DATA_NOTIFICA" +#define NOTIFICHE_RETE_SMARTPHONE_DIZIONARIO_NOTIFICA @"NOTIFICHE_RETE_SMARTPHONE_DIZIONARIO_NOTIFICA" +#define TEMPO_VISUALIZZAZIONE_NOTIFICA 10800 + + +// AD MOB +//ADMOB_APP_ID +#define EQN_ADMOB_APP_IDA @"ca-app-pub-0053870219990922~2021960172" +#define EQN_ADMOB_ANNUNCIO_IDA @"ca-app-pub-0053870219990922/3394298808" +#define EQN_ADMOB_ANNUNCIO_IDA_TEST @"ca-app-pub-3940256099942544/2934735716" + +// ACQUISTI IN APP +#define EQN_ACQ_IN_APP @"EQN_ACQ_IN_APP" +#define CONTEGGIO_APERTURE_PER_SCONTO @"CONTEGGIO_APERTURE_PER_SCONTO" +#define DATA_APERTURE_PER_SCONTO @"DATA_APERTURE_PER_SCONTO" +#define TEMPO_APERTURE_PER_SCONTO 2880 +#define AQUISTO_PRO @"com.finazzi.distquake.ProPrezzoPieno" +#define AQUISTO_PRO_SCONTATO @"com.finazzi.distquake.VersioneProScontata" +#define IAPHelperPurchaseNotification @"IAPHelperPurchaseNotification" + +// FILTRO ENTI +#define EQN_MAGNITUDO_MINIMA @"EQN_MAGNITUDO_MINIMA" +#define EQN_DISTANZA_MASSIMA @"EQN_DISTANZA_MASSIMA" +#define EQN_ETA_MASSIMA @"EQN_ETA_MASSIMA" +#define EQN_SISMI_FORTI @"EQN_SISMI_FORTI" + + +#define IS_IPHONE ( [[[UIDevice currentDevice] model] isEqualToString:@"iPhone"] ) +#define IS_HEIGHT_GTE_568 [[UIScreen mainScreen ] bounds].size.height <= 570.0f +#define IS_IPHONE_5 ( IS_IPHONE && IS_HEIGHT_GTE_568 ) diff --git a/Sources/Earthquake Network/Earthquake Network.entitlements b/Sources/Earthquake Network/Earthquake Network.entitlements new file mode 100644 index 0000000..903def2 --- /dev/null +++ b/Sources/Earthquake Network/Earthquake Network.entitlements @@ -0,0 +1,8 @@ + + + + + aps-environment + development + + diff --git a/Sources/Earthquake Network/Earthquake_Network.xcdatamodeld/.xccurrentversion b/Sources/Earthquake Network/Earthquake_Network.xcdatamodeld/.xccurrentversion new file mode 100644 index 0000000..63bbc21 --- /dev/null +++ b/Sources/Earthquake Network/Earthquake_Network.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ + + + + + _XCCurrentVersionName + Earthquake_Network.xcdatamodel + + diff --git a/Sources/Earthquake Network/Earthquake_Network.xcdatamodeld/Earthquake_Network.xcdatamodel/contents b/Sources/Earthquake Network/Earthquake_Network.xcdatamodeld/Earthquake_Network.xcdatamodel/contents new file mode 100644 index 0000000..ad82c3b --- /dev/null +++ b/Sources/Earthquake Network/Earthquake_Network.xcdatamodeld/Earthquake_Network.xcdatamodel/contents @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Sources/Earthquake Network/GoogleService-Info-.plist b/Sources/Earthquake Network/GoogleService-Info-.plist new file mode 100644 index 0000000..cd05d26 --- /dev/null +++ b/Sources/Earthquake Network/GoogleService-Info-.plist @@ -0,0 +1,40 @@ + + + + + AD_UNIT_ID_FOR_BANNER_TEST + ca-app-pub-3940256099942544/2934735716 + AD_UNIT_ID_FOR_INTERSTITIAL_TEST + ca-app-pub-3940256099942544/4411468910 + CLIENT_ID + 899482329945-jhobrnjg3ko2ldsnj4si6jk03d1osk2v.apps.googleusercontent.com + REVERSED_CLIENT_ID + com.googleusercontent.apps.899482329945-jhobrnjg3ko2ldsnj4si6jk03d1osk2v + API_KEY + AIzaSyCgZRSGERqXX3KKB9yCwRwo3tmHSN2tYgA + GCM_SENDER_ID + 899482329945 + PLIST_VERSION + 1 + BUNDLE_ID + com.finazzi.distquake + PROJECT_ID + hybrid-bastion-406 + STORAGE_BUCKET + hybrid-bastion-406.appspot.com + IS_ADS_ENABLED + + IS_ANALYTICS_ENABLED + + IS_APPINVITE_ENABLED + + IS_GCM_ENABLED + + IS_SIGNIN_ENABLED + + GOOGLE_APP_ID + 1:899482329945:ios:e9ac57970038fe35 + DATABASE_URL + https://hybrid-bastion-406.firebaseio.com + + \ No newline at end of file diff --git a/Sources/Earthquake Network/GoogleService-Info.plist b/Sources/Earthquake Network/GoogleService-Info.plist new file mode 100644 index 0000000..cd05d26 --- /dev/null +++ b/Sources/Earthquake Network/GoogleService-Info.plist @@ -0,0 +1,40 @@ + + + + + AD_UNIT_ID_FOR_BANNER_TEST + ca-app-pub-3940256099942544/2934735716 + AD_UNIT_ID_FOR_INTERSTITIAL_TEST + ca-app-pub-3940256099942544/4411468910 + CLIENT_ID + 899482329945-jhobrnjg3ko2ldsnj4si6jk03d1osk2v.apps.googleusercontent.com + REVERSED_CLIENT_ID + com.googleusercontent.apps.899482329945-jhobrnjg3ko2ldsnj4si6jk03d1osk2v + API_KEY + AIzaSyCgZRSGERqXX3KKB9yCwRwo3tmHSN2tYgA + GCM_SENDER_ID + 899482329945 + PLIST_VERSION + 1 + BUNDLE_ID + com.finazzi.distquake + PROJECT_ID + hybrid-bastion-406 + STORAGE_BUCKET + hybrid-bastion-406.appspot.com + IS_ADS_ENABLED + + IS_ANALYTICS_ENABLED + + IS_APPINVITE_ENABLED + + IS_GCM_ENABLED + + IS_SIGNIN_ENABLED + + GOOGLE_APP_ID + 1:899482329945:ios:e9ac57970038fe35 + DATABASE_URL + https://hybrid-bastion-406.firebaseio.com + + \ No newline at end of file diff --git a/Sources/Earthquake Network/Info.plist b/Sources/Earthquake Network/Info.plist new file mode 100644 index 0000000..c73f310 --- /dev/null +++ b/Sources/Earthquake Network/Info.plist @@ -0,0 +1,68 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + $(PRODUCT_NAME) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 2.0 + CFBundleVersion + 1.9 + LSApplicationQueriesSchemes + + googlechromes + comgooglemaps + + LSRequiresIPhoneOS + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + NSLocationAlwaysAndWhenInUseUsageDescription + Ci occorre la tua posizione per inviare messaggi precisi in caso di terremoto + NSLocationAlwaysUsageDescription + Ci occorre la tua posizione per inviare messaggi precisi in caso di terremoto + NSLocationWhenInUseUsageDescription + Ci occorre la tua posizione per inviare messaggi precisi in caso di terremoto + UIBackgroundModes + + audio + fetch + location + remote-notification + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Sources/Earthquake Network/NSDictionary+BVJSONString.h b/Sources/Earthquake Network/NSDictionary+BVJSONString.h new file mode 100644 index 0000000..0497ad6 --- /dev/null +++ b/Sources/Earthquake Network/NSDictionary+BVJSONString.h @@ -0,0 +1,18 @@ +// +// NSDictionary+BVJSONString.h +// Smash +// +// Created by Luca Beretta on 24/03/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface NSDictionary (BVJSONString) +-(NSString*) bv_jsonStringWithPrettyPrint:(BOOL) prettyPrint; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sources/Earthquake Network/NSDictionary+BVJSONString.m b/Sources/Earthquake Network/NSDictionary+BVJSONString.m new file mode 100644 index 0000000..984e332 --- /dev/null +++ b/Sources/Earthquake Network/NSDictionary+BVJSONString.m @@ -0,0 +1,25 @@ +// +// NSDictionary+BVJSONString.m +// Smash +// +// Created by Luca Beretta on 24/03/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import "NSDictionary+BVJSONString.h" + +@implementation NSDictionary (BVJSONString) +-(NSString*) bv_jsonStringWithPrettyPrint:(BOOL) prettyPrint { + NSError *error; + NSData *jsonData = [NSJSONSerialization dataWithJSONObject:self + options:(NSJSONWritingOptions) (prettyPrint ? NSJSONWritingPrettyPrinted : 0) + error:&error]; + + if (! jsonData) { + NSLog(@"%s: error: %@", __func__, error.localizedDescription); + return @"{}"; + } else { + return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; + } +} +@end diff --git a/Sources/Earthquake Network/Reachability.h b/Sources/Earthquake Network/Reachability.h new file mode 100644 index 0000000..50c048c --- /dev/null +++ b/Sources/Earthquake Network/Reachability.h @@ -0,0 +1,64 @@ +/* + Copyright (C) 2016 Apple Inc. All Rights Reserved. + See LICENSE.txt for this sample’s licensing information + + Abstract: + Basic demonstration of how to use the SystemConfiguration Reachablity APIs. + */ + +#import +#import +#import + + +typedef enum : NSInteger { + NotReachable = 0, + ReachableViaWiFi, + ReachableViaWWAN +} NetworkStatus; + +#pragma mark IPv6 Support +//Reachability fully support IPv6. For full details, see ReadMe.md. + + +extern NSString *kReachabilityChangedNotification; + + +@interface Reachability : NSObject + +/*! + * Use to check the reachability of a given host name. + */ ++ (instancetype)reachabilityWithHostName:(NSString *)hostName; + +/*! + * Use to check the reachability of a given IP address. + */ ++ (instancetype)reachabilityWithAddress:(const struct sockaddr *)hostAddress; + +/*! + * Checks whether the default route is available. Should be used by applications that do not connect to a particular host. + */ ++ (instancetype)reachabilityForInternetConnection; + + +#pragma mark reachabilityForLocalWiFi +//reachabilityForLocalWiFi has been removed from the sample. See ReadMe.md for more information. +//+ (instancetype)reachabilityForLocalWiFi; + +/*! + * Start listening for reachability notifications on the current run loop. + */ +- (BOOL)startNotifier; +- (void)stopNotifier; + +- (NetworkStatus)currentReachabilityStatus; + +/*! + * WWAN may be available, but not active until a connection has been established. WiFi may require a connection for VPN on Demand. + */ +- (BOOL)connectionRequired; + +@end + + diff --git a/Sources/Earthquake Network/Reachability.m b/Sources/Earthquake Network/Reachability.m new file mode 100644 index 0000000..fd84325 --- /dev/null +++ b/Sources/Earthquake Network/Reachability.m @@ -0,0 +1,242 @@ +/* + Copyright (C) 2016 Apple Inc. All Rights Reserved. + See LICENSE.txt for this sample’s licensing information + + Abstract: + Basic demonstration of how to use the SystemConfiguration Reachablity APIs. + */ + +#import +#import +#import +#import +#import + +#import + +#import "Reachability.h" + +#pragma mark IPv6 Support +//Reachability fully support IPv6. For full details, see ReadMe.md. + + +NSString *kReachabilityChangedNotification = @"kNetworkReachabilityChangedNotification"; + + +#pragma mark - Supporting functions + +#define kShouldPrintReachabilityFlags 1 + +static void PrintReachabilityFlags(SCNetworkReachabilityFlags flags, const char* comment) +{ +#if kShouldPrintReachabilityFlags + + /* NSLog(@"Reachability Flag Status: %c%c %c%c%c%c%c%c%c %s\n", + (flags & kSCNetworkReachabilityFlagsIsWWAN) ? 'W' : '-', + (flags & kSCNetworkReachabilityFlagsReachable) ? 'R' : '-', + + (flags & kSCNetworkReachabilityFlagsTransientConnection) ? 't' : '-', + (flags & kSCNetworkReachabilityFlagsConnectionRequired) ? 'c' : '-', + (flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) ? 'C' : '-', + (flags & kSCNetworkReachabilityFlagsInterventionRequired) ? 'i' : '-', + (flags & kSCNetworkReachabilityFlagsConnectionOnDemand) ? 'D' : '-', + (flags & kSCNetworkReachabilityFlagsIsLocalAddress) ? 'l' : '-', + (flags & kSCNetworkReachabilityFlagsIsDirect) ? 'd' : '-', + comment + );*/ +#endif +} + + +static void ReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void* info) +{ +#pragma unused (target, flags) + NSCAssert(info != NULL, @"info was NULL in ReachabilityCallback"); + NSCAssert([(__bridge NSObject*) info isKindOfClass: [Reachability class]], @"info was wrong class in ReachabilityCallback"); + + Reachability* noteObject = (__bridge Reachability *)info; + // Post a notification to notify the client that the network reachability changed. + [[NSNotificationCenter defaultCenter] postNotificationName: kReachabilityChangedNotification object: noteObject]; +} + + +#pragma mark - Reachability implementation + +@implementation Reachability +{ + SCNetworkReachabilityRef _reachabilityRef; +} + ++ (instancetype)reachabilityWithHostName:(NSString *)hostName +{ + Reachability* returnValue = NULL; + SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(NULL, [hostName UTF8String]); + if (reachability != NULL) + { + returnValue= [[self alloc] init]; + if (returnValue != NULL) + { + returnValue->_reachabilityRef = reachability; + } + else { + CFRelease(reachability); + } + } + return returnValue; +} + + ++ (instancetype)reachabilityWithAddress:(const struct sockaddr *)hostAddress +{ + SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, hostAddress); + + Reachability* returnValue = NULL; + + if (reachability != NULL) + { + returnValue = [[self alloc] init]; + if (returnValue != NULL) + { + returnValue->_reachabilityRef = reachability; + } + else { + CFRelease(reachability); + } + } + return returnValue; +} + + ++ (instancetype)reachabilityForInternetConnection +{ + struct sockaddr_in zeroAddress; + bzero(&zeroAddress, sizeof(zeroAddress)); + zeroAddress.sin_len = sizeof(zeroAddress); + zeroAddress.sin_family = AF_INET; + + return [self reachabilityWithAddress: (const struct sockaddr *) &zeroAddress]; +} + +#pragma mark reachabilityForLocalWiFi +//reachabilityForLocalWiFi has been removed from the sample. See ReadMe.md for more information. +//+ (instancetype)reachabilityForLocalWiFi + + + +#pragma mark - Start and stop notifier + +- (BOOL)startNotifier +{ + BOOL returnValue = NO; + SCNetworkReachabilityContext context = {0, (__bridge void *)(self), NULL, NULL, NULL}; + + if (SCNetworkReachabilitySetCallback(_reachabilityRef, ReachabilityCallback, &context)) + { + if (SCNetworkReachabilityScheduleWithRunLoop(_reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode)) + { + returnValue = YES; + } + } + + return returnValue; +} + + +- (void)stopNotifier +{ + if (_reachabilityRef != NULL) + { + SCNetworkReachabilityUnscheduleFromRunLoop(_reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode); + } +} + + +- (void)dealloc +{ + [self stopNotifier]; + if (_reachabilityRef != NULL) + { + CFRelease(_reachabilityRef); + } +} + + +#pragma mark - Network Flag Handling + +- (NetworkStatus)networkStatusForFlags:(SCNetworkReachabilityFlags)flags +{ + PrintReachabilityFlags(flags, "networkStatusForFlags"); + if ((flags & kSCNetworkReachabilityFlagsReachable) == 0) + { + // The target host is not reachable. + return NotReachable; + } + + NetworkStatus returnValue = NotReachable; + + if ((flags & kSCNetworkReachabilityFlagsConnectionRequired) == 0) + { + /* + If the target host is reachable and no connection is required then we'll assume (for now) that you're on Wi-Fi... + */ + returnValue = ReachableViaWiFi; + } + + if ((((flags & kSCNetworkReachabilityFlagsConnectionOnDemand ) != 0) || + (flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) != 0)) + { + /* + ... and the connection is on-demand (or on-traffic) if the calling application is using the CFSocketStream or higher APIs... + */ + + if ((flags & kSCNetworkReachabilityFlagsInterventionRequired) == 0) + { + /* + ... and no [user] intervention is needed... + */ + returnValue = ReachableViaWiFi; + } + } + + if ((flags & kSCNetworkReachabilityFlagsIsWWAN) == kSCNetworkReachabilityFlagsIsWWAN) + { + /* + ... but WWAN connections are OK if the calling application is using the CFNetwork APIs. + */ + returnValue = ReachableViaWWAN; + } + + return returnValue; +} + + +- (BOOL)connectionRequired +{ + NSAssert(_reachabilityRef != NULL, @"connectionRequired called with NULL reachabilityRef"); + SCNetworkReachabilityFlags flags; + + if (SCNetworkReachabilityGetFlags(_reachabilityRef, &flags)) + { + return (flags & kSCNetworkReachabilityFlagsConnectionRequired); + } + + return NO; +} + + +- (NetworkStatus)currentReachabilityStatus +{ + NSAssert(_reachabilityRef != NULL, @"currentNetworkStatus called with NULL SCNetworkReachabilityRef"); + NetworkStatus returnValue = NotReachable; + SCNetworkReachabilityFlags flags; + + if (SCNetworkReachabilityGetFlags(_reachabilityRef, &flags)) + { + returnValue = [self networkStatusForFlags:flags]; + } + + return returnValue; +} + + +@end diff --git a/Sources/Earthquake Network/ServerRequest.h b/Sources/Earthquake Network/ServerRequest.h new file mode 100644 index 0000000..41fa632 --- /dev/null +++ b/Sources/Earthquake Network/ServerRequest.h @@ -0,0 +1,30 @@ +// +// ServerRequest.h +// Telegea +// +// Created by Luca Beretta on 15/02/17. +// Copyright © 2017 Luca Beretta. All rights reserved. +// + +#import +#import +#import "Costanti.h" + + +@interface ServerRequest : NSObject + +@property (nonatomic) BOOL isConnect; + + ++(ServerRequest *) defaultServerConnectionSingleton; + +-(void)inviaInformazioniAlServerWithURL:(NSURL *)url richiesta:(EQNTipoChiamata )chiamata success:(void(^)(id result)) success failure:(void(^)(NSError *))failure; + +-(void)inviaRicevuta:(NSData *)ricevuta success:(void(^)(id result)) success failure:(void(^)(NSError *))failure; + +/* +-(void)sendGetMethod:(NSURLRequest *)request typeRequest:(TypeRequest)type success:(void(^)(id dictionary)) success failure:(void(^)(NSError *))failure; + +-(UIAlertController *)mostraAllertWithMessage:(NSString *)messaggio close:(void(^)(BOOL terminato))terminato; +*/ +@end diff --git a/Sources/Earthquake Network/ServerRequest.m b/Sources/Earthquake Network/ServerRequest.m new file mode 100644 index 0000000..a5bbe39 --- /dev/null +++ b/Sources/Earthquake Network/ServerRequest.m @@ -0,0 +1,498 @@ +// +// ServerRequest.m +// Telegea +// +// Created by Luca Beretta on 15/02/17. +// Copyright © 2017 Luca Beretta. All rights reserved. +// + +#import "ServerRequest.h" +#import "Reachability.h" +#import "Costanti.h" +#import "EQNUtility.h" +#import "NSDictionary+BVJSONString.h" + +//#import "User.h" +//#import "Portachiavi.h" + +@interface ServerRequest (){ + + NSURLSession *session; + +} +@property (nonatomic) Reachability *hostReachability; +@property (nonatomic) Reachability *internetReachability; + +@end + +@implementation ServerRequest + +static ServerRequest *_sharedInstance = nil; + ++(ServerRequest *) defaultServerConnectionSingleton{ + + @synchronized (_sharedInstance) { + + if (_sharedInstance == nil){ + _sharedInstance = [[ServerRequest alloc] init]; + + } + [_sharedInstance initSingleton]; + + return _sharedInstance; + } +} + +-(void)initSingleton{ + + NSURLSessionConfiguration *config = [NSURLSessionConfiguration ephemeralSessionConfiguration]; + session = [NSURLSession sessionWithConfiguration:config]; + + // registro notifiche rilevamento connessione + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reachabilityChanged:) name:kReachabilityChangedNotification object:nil]; + NSString *remoteHostName = @"http://srv.earthquakenetwork.it"; + + self.hostReachability = [Reachability reachabilityWithHostName:remoteHostName]; + [self.hostReachability startNotifier]; + [self setValue:@([self updateConnectionhReachability:self.hostReachability]) forKey:@"isConnect"]; + // self.isConnect = [self updateConnectionhReachability:self.hostReachability]; + + self.internetReachability = [Reachability reachabilityForInternetConnection]; + [self.internetReachability startNotifier]; + // self.isConnect = [self updateConnectionhReachability:self.internetReachability]; + [self setValue:@([self updateConnectionhReachability:self.internetReachability]) forKey:@"isConnect"]; + +} + +/*! + * Called by Reachability whenever status changes. + */ +- (void) reachabilityChanged:(NSNotification *)note +{ + Reachability* curReach = [note object]; + NSParameterAssert([curReach isKindOfClass:[Reachability class]]); + // self.isConnect = [self updateConnectionhReachability:curReach]; + + [self setValue:@([self updateConnectionhReachability:curReach]) forKey:@"isConnect"]; +} + +- (BOOL)updateConnectionhReachability:(Reachability *)reachability +{ + NetworkStatus netStatus = [reachability currentReachabilityStatus]; + switch (netStatus) { + case NotReachable: + return NO; + break; + default: + return YES; + break; + } + +} + +-(void)inviaInformazioniAlServerWithURL:(NSURL *)url richiesta:(EQNTipoChiamata )chiamata success:(void(^)(id result)) success failure:(void(^)(NSError *))failure{ + + if (!self.isConnect) { + + NSError *error = [NSError errorWithDomain:NSMachErrorDomain code:401 userInfo:@{MESSAGGIO : NSLocalizedString(@"Nessuna connessione", @"messaggio assenza connesione")}]; + failure(error); + + } + + NSMutableURLRequest * urlRequest = [NSMutableURLRequest requestWithURL:url]; + [urlRequest setHTTPMethod:@"GET"]; + + dispatch_async(dispatch_get_main_queue(), ^{ + [UIApplication sharedApplication].networkActivityIndicatorVisible = YES; + }); + + NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:urlRequest completionHandler:^(NSData *data, NSURLResponse *response, NSError *error){ + + NSHTTPURLResponse *httpResp = (NSHTTPURLResponse *)response; + + + if(!error){ + + NSError *jsonError; + // NSData *myRequestData = [response dataUsingEncoding:NSUTF8StringEncoding]; + id JSON = [NSJSONSerialization JSONObjectWithData:data + options:NSJSONReadingAllowFragments + error:&jsonError]; + + if (!jsonError){ + + switch (httpResp.statusCode) { + case 200: + switch (chiamata) { + case registrazione: + success(JSON); + break; + case posizione: + success(@"success"); + break; + case calibrazione: + success(JSON); + break; + case rilevamento: + success(JSON); + break; + case downloadDati: + success(JSON); + break; + case graficoSmartPhone: + success(JSON); + break; + case areaCheck: + success(JSON); + break; + case pastquakes: + success(JSON); + break; + case utentiDisponibili: + success(JSON); + break; + case segnalazioneManuale: + success(JSON); + break; + case tsunami: + success(JSON); + break; + case segnalazzioneTerremoto: + success(JSON); + break; + case commentoTerremoto: + success(JSON); + break; + case tempoDisponibile: + success(JSON); + break; + case impostazioniNotifiche: + success(JSON); + break; + default: + break; + } + // NSLog(@"Risultato richiesta server %@", JSON); + // success(@""); + dispatch_async(dispatch_get_main_queue(), ^{ + + [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; + }); + } + } + else{ + + NSString* newStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + if (newStr) { + if (chiamata == segnalazzioneTerremoto) { + + NSLog(@"risultato segnalazione %@", [EQNUtility clearStringMessaggi:newStr]); + success([EQNUtility clearStringMessaggi:newStr]); + + } + + if (chiamata == rilevamento) { + + /// NSLog(@"newStr %@", newStr); + + success([EQNUtility clearStringMessaggi:newStr]); + + + } + + if (chiamata == registrazione) { + + NSLog(@"newStr %@", newStr); + + } + if (chiamata == tempoDisponibile) { + + NSLog(@"newStr %@", newStr); + + } + + if (chiamata == calibrazione) { + + NSLog(@"calibrazione %@", newStr); + success(newStr); + + } + if (chiamata == rilevamento) { + + success(newStr); + + } + if (chiamata == impostazioniNotifiche) { + + NSLog(@"impostazioniNotifiche %@", newStr); + + success(newStr); + + } + if (chiamata == segnalazioneManuale) { + + NSLog(@"segnalazioneManuale %@", newStr); + + } + } else{ + + + NSLog(@"Error %@", [jsonError description]); + + NSError *error = [NSError errorWithDomain:NSMachErrorDomain code:0 userInfo:@{MESSAGGIO : NSLocalizedString(@"Username e Password sbagliati", @"messaggio errore inserimento credenziali")}]; + failure(error); + dispatch_async(dispatch_get_main_queue(), ^{ + [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; + }); + + + } + } + + } + + }]; + + [dataTask resume]; + +} + +-(void)inviaRicevuta:(NSData *)ricevuta success:(void(^)(id result)) success failure:(void(^)(NSError *))failure{ + + + NSString *jsonObjectString = [ricevuta base64EncodedStringWithOptions:0]; + + // NSString* BASEURl = @"XXXXXXXXX/XXX/XXXX"; + // NSString *testReceipt= [BASEURl stringByAppendingString:@"/InApp/iOS/updatePurchase"]; + NSDictionary *params = @{@"ricevuta" :jsonObjectString}; + NSString *parametri = [params bv_jsonStringWithPrettyPrint:YES]; + + NSMutableURLRequest * urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@""]]; + [urlRequest setHTTPMethod:@"POST"]; + [urlRequest addValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; + [urlRequest addValue:@"application/json" forHTTPHeaderField:@"Accept"]; + [urlRequest setHTTPBody:[parametri dataUsingEncoding:NSUTF8StringEncoding]]; + + NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:urlRequest completionHandler:^(NSData *data, NSURLResponse *response, NSError *error){ + + NSHTTPURLResponse *httpResp = (NSHTTPURLResponse *)response; + + if(!error){ + + NSError *jsonError; + // NSData *myRequestData = [response dataUsingEncoding:NSUTF8StringEncoding]; + NSDictionary *JSON = [NSJSONSerialization JSONObjectWithData:data + options:NSJSONReadingAllowFragments + error:&jsonError]; + + if (!jsonError){ + + switch (httpResp.statusCode) { + case 200: + success(JSON); + + break; + + default: + NSLog(@"httpResp.statusCode %ld", (long)httpResp.statusCode); + + break; + + } + + } + } + else{ + + failure(error.userInfo[@"NSLocalizedDescription"]); + NSLog(@"Error %@", error.userInfo); + + } + + }]; + + [dataTask resume]; + + +} + +/* +-(void)sendGetMethod:(NSURLRequest *)request typeRequest:(TypeRequest)type success:(void(^)(id dictionary)) success failure:(void(^)(NSError *))failure{ + + if (!self.isConnect) { + + NSError *error = [NSError errorWithDomain:NSMachErrorDomain code:401 userInfo:@{MESSAGGIO : NSLocalizedString(@"Nessuna connessione", @"messaggio assenza connesione")}]; + failure(error); + + } + + [UIApplication sharedApplication].networkActivityIndicatorVisible = YES; + + NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error){ + + NSHTTPURLResponse *httpResp = (NSHTTPURLResponse *)response; + + if(!error){ + + NSError *jsonError; + + NSDictionary *showJSON = [NSJSONSerialization JSONObjectWithData:data + options:NSJSONReadingAllowFragments + error:&jsonError]; + if (!jsonError){ + + switch (httpResp.statusCode) { + case 200: + success(showJSON); + [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; + break; + } + } + else{ + + NSError *error; + switch (type) { + case login: + error = [NSError errorWithDomain:NSMachErrorDomain code:login userInfo:@{MESSAGGIO : NSLocalizedString(@"Username e Password sbagliati", @"messaggio errore inserimento credenziali")}]; + break; + case reading: + error = [NSError errorWithDomain:NSMachErrorDomain code:reading userInfo:@{MESSAGGIO : NSLocalizedString(@"Errore! Impossibile accedere all'impianto", @"messaggio errore richiesta apikey impianto")}]; + break; + case sending: + // error = [NSError errorWithDomain:NSMachErrorDomain code:httpResp.statusCode userInfo:@{MESSAGGIO : NSLocalizedString(@"sending", @"")}]; + case zona: + error = [NSError errorWithDomain:NSMachErrorDomain code:zona userInfo:@{MESSAGGIO : NSLocalizedString(@"Sì è verificato un errore sulla centralina", @"messaggio errore richiesta dev_cmd")}]; + break; + default: + error = [NSError errorWithDomain:NSMachErrorDomain code:httpResp.statusCode userInfo:@{MESSAGGIO : NSLocalizedString(@"Errore sconosciuto", @"")}]; + + break; + } + failure(error); + [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; + + + } + + } + + }]; + + [dataTask resume]; +} + + + +-(void)caricaImpianto:(Plant *)plant success:(void(^)(BOOL))success failure:(void(^)(NSError *))failure{ + + NSMutableURLRequest * urlRequest = [NSMutableURLRequest requestWithURL:[self urlWithInfo:plant]]; + [urlRequest setHTTPMethod:@"GET"]; + + + [self sendGetMethod:urlRequest + typeRequest:login + success:^(NSDictionary *result){ + + plant.apikey = result[@"apikey"]; + [self caricaZoneiWithPlant:plant success:^(BOOL result){ + + + // caricamento zone + success(result); + + }failure:^(NSError *error){ + // caricamento zone + failure(error); + }]; + } + failure:^(NSError *error){ + + // caricamento impianto + + failure(error); + + }]; + +} + +-(NSURL *)urlWithInfo:(Plant *)plant{ + + NSURL *url =[NSURL URLWithString:[NSString stringWithFormat:@"%@?%@=%@&%@=%@&%@=%@", LOGIN_URL, USERNAME, [User defaultUser].nome, PSW, [Portachiavi getCredenziali:[User defaultUser].nome], PLANT_ID, plant.plant_id]]; + + return url; + +} + +-(void)caricaZoneiWithPlant:(Plant *)plant success:(void(^)(BOOL))success failure:(void(^)(NSError *))failure{ + + + NSString *url = [NSString stringWithFormat:@"%@?%@=%@&%@=%@&%@=[{\"mod\":10,\"reg\":100}]", DEVICE_COMMANDS_URL, APIKEY, plant.apikey, PLANT_ID, plant.plant_id, DEV_CMD]; + + NSURL *theUrl = [NSURL URLWithString:[url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLFragmentAllowedCharacterSet]]]; + + NSMutableURLRequest * urlRequest = [NSMutableURLRequest requestWithURL:theUrl]; + [urlRequest setHTTPMethod:@"GET"]; + [self sendGetMethod:urlRequest + typeRequest:reading + success:^(NSDictionary *result){ + + NSArray *valori = result[@"result"]; + NSNumber *numeroZone; + + if(valori.count == 0){ + //numeroZone = @1; + NSError *error = [NSError errorWithDomain:NSMachErrorDomain code:0 userInfo:@{MESSAGGIO : NSLocalizedString(@"Errore! Impossibile accedere all'impianto", @"messaggio errore richiesta apikey impianto")}]; + failure(error); + return ; + + } + else if([[valori firstObject][@"val"] isEqual:[NSNull null]]){ + //numeroZone = @1; + NSError *error = [NSError errorWithDomain:NSMachErrorDomain code:0 userInfo:@{MESSAGGIO : NSLocalizedString(@"Errore! Impossibile accedere all'impianto", @"messaggio errore richiesta apikey impianto")}]; + failure(error); + return ; + + } + else + numeroZone = [valori firstObject][@"val"]; + + + [plant creaZone:[numeroZone intValue]]; + success(YES); + } + + failure:^(NSError *error){ + failure(error); + + }]; + +} + +-(UIAlertController *)mostraAllertWithMessage:(NSString *)messaggio close:(void(^)(BOOL terminato))terminato{ + + NSString *titolo = @""; + if ([messaggio isEqualToString:NSLocalizedString(@"Nessuna connessione", @"messaggio assenza connesione")]) + titolo = NSLocalizedString(@"Attenzione", @""); + + UIAlertController* alert = [UIAlertController alertControllerWithTitle:titolo//NSLocalizedString(@"Attenzione", @"") + message:messaggio + preferredStyle:UIAlertControllerStyleAlert]; + UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"OK", @"") + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { + + terminato(YES); + + }]; + [alert addAction:defaultAction]; + + return alert; +} + +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self name:kReachabilityChangedNotification object:nil]; +} + */ + +@end diff --git a/Sources/Earthquake Network/ViewController/Dettagli mappa/DettagliMappaViewController.h b/Sources/Earthquake Network/ViewController/Dettagli mappa/DettagliMappaViewController.h new file mode 100644 index 0000000..d803bfb --- /dev/null +++ b/Sources/Earthquake Network/ViewController/Dettagli mappa/DettagliMappaViewController.h @@ -0,0 +1,34 @@ +// +// DettagliMappaViewController.h +// Earthquake Network +// +// Created by Luca Beretta on 21/10/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import +#import "Costanti.h" +#import +#import +#import "EQNSegnalazione.h" +#import "EQNManager.h" +#import "ReteSismicaAnnotation.h" +#import "PickerViewController.h" +#import "EQNUtility.h" +#import "EQNPastquakes.h" + +@interface DettagliMappaViewController : UIViewController + +@property (nonatomic, assign) EQNTipoDettagliMappa tipoMappa; +@property (nonatomic, strong) IBOutlet MKMapView *mapView; +@property (weak, nonatomic) IBOutlet UIView *containerView; +@property (weak, nonatomic) IBOutlet UIButton *buttonAzione; +@property (weak, nonatomic) IBOutlet UILabel *labelAzione; +@property (weak, nonatomic) IBOutlet UIImageView *imageAzione; + +@property (nonatomic, strong) NSArray *filtroArray; + +-(void)creaMarcherWithSegnalazione:(id)segnalazione; +-(IBAction)visualizzaPikerFiltro:(id)sender; +-(void)applicaFiltroWithTime:(NSNumber *)time; +@end diff --git a/Sources/Earthquake Network/ViewController/Dettagli mappa/DettagliMappaViewController.m b/Sources/Earthquake Network/ViewController/Dettagli mappa/DettagliMappaViewController.m new file mode 100644 index 0000000..acd6433 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/Dettagli mappa/DettagliMappaViewController.m @@ -0,0 +1,293 @@ +// +// DettagliMappaViewController.m +// Earthquake Network +// +// Created by Luca Beretta on 21/10/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "DettagliMappaViewController.h" + + +@interface DettagliMappaViewController () + + +@property (nonatomic, strong) PickerViewController *pikerViewController; +@property (nonatomic, strong) NSMutableArray *annotationArray; +@end + +@implementation DettagliMappaViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. + // coordinate -33.86,151.20 at zoom level 6. + UIView *viewNavigationBar = [[UIView alloc] initWithFrame:CGRectMake(-18, 5, 150, 44)]; + UIImageView *imageLogo = [[UIImageView alloc] initWithFrame:CGRectMake(-18, 5, 38, 38)]; + imageLogo.image = [UIImage imageNamed:@"distquake_app_wave"]; + [viewNavigationBar addSubview:imageLogo]; + UILabel *textForNavi = [[UILabel alloc] initWithFrame:CGRectMake(25, 5, 150, 38)]; + textForNavi.text = NSLocalizedString(@"Rilevatore Terremoti", @"titolo navigation bar"); + [viewNavigationBar addSubview:textForNavi]; + self.navigationItem.titleView = viewNavigationBar; + [[UINavigationBar appearance] setBarTintColor:COLORE_BARRA_NAVIGAZIONE]; + [[UINavigationBar appearance] setTranslucent:NO]; + + // self.navigationItem.rightBarButtonItems = [self generePulsantiTipoMappa]; + self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"back"] + style:UIBarButtonItemStyleDone + target:self + action:@selector(chiudi:)]; + + + self.pikerViewController = [[PickerViewController alloc] initWithNibName:@"PickerViewController" bundle:nil dati:self.filtroArray]; + self.pikerViewController.delegate = self; + /* + switch (self.tipoMappa) { + case reteSmartphone: + [self setUpMappaReteSmartphone]; + break; + case reteSismica: + [self setUpMappaReteSismica]; + break; + default: + break; + }*/ + +} +-(void)chiudi:(id)sender{ + + [self dismissViewControllerAnimated:YES completion:nil]; +} +-(void)setUpMappaReteSmartphone{ + + + +} + +-(void)setUpSegnalazioniUtente{ + + self.labelAzione.text = NSLocalizedString(@"Un giorno", @""); + NSArray *lista = [EQNManager defaultManager].elencoSelagnazioniManuali; + unsigned unitFlags = NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitDay; + NSDate *now = [NSDate date]; + NSCalendar *gregorian = [NSCalendar currentCalendar]; + NSDateComponents *comps = [gregorian components:unitFlags fromDate:now]; + [comps setHour:[comps hour] - 24]; + NSDate *hundredYearsAgo = [gregorian dateFromComponents:comps]; + NSMutableArray *array = [NSMutableArray array]; + for (EQNSegnalazione *seg in lista) { + NSLog(@"data seg %@ confronto %@", seg.date, hundredYearsAgo); + if([seg.date laterDate:hundredYearsAgo]) + [array addObject:seg]; + } + + if (array.count == 0){ + + return; + } + + NSSortDescriptor *dateDescriptor = [NSSortDescriptor + sortDescriptorWithKey:@"date" + ascending:YES]; + NSArray *sortDescriptors = [NSArray arrayWithObject:dateDescriptor]; + NSArray *sortedEventArray = [array + sortedArrayUsingDescriptors:sortDescriptors]; + + for (EQNSegnalazione *seg in sortedEventArray) { + + NSLog(@"seg data %@", seg.date); + } + + + EQNSegnalazione *segnalazione = sortedEventArray[0]; + CLLocation *coordinate = [[CLLocation alloc] initWithLatitude:[segnalazione.latitude doubleValue] longitude:[segnalazione.longitude doubleValue]]; + MKCoordinateSpan span = MKCoordinateSpanMake(10.5, 10.5); + MKCoordinateRegion region = MKCoordinateRegionMake(coordinate.coordinate, span); + self.mapView.delegate = self; + [self.mapView setCenterCoordinate:coordinate.coordinate animated:NO]; + [self.mapView setRegion:region animated:YES]; + self.mapView.scrollEnabled = NO; + + [self.buttonAzione addTarget:self action:@selector(visualizzaPikerFiltro:) forControlEvents:UIControlEventTouchDown]; + + for (EQNPastquakes *seg in array) + [self creaMarcherWithSegnalazione:seg]; + + [self.mapView addAnnotations:self.annotationArray]; + +} + +-(void)setUpMappaReteSismica{ + + + +} + +-(void)creaMarcherWithSegnalazione:(id)segnalazione{ + /* + if(!self.annotationArray) + self.annotationArray = [NSMutableArray array]; + CLLocationCoordinate2D location = CLLocationCoordinate2DMake([segnalazione.latitude doubleValue], [segnalazione.longitude doubleValue]); + ReteSismicaAnnotation *anAnnotation = [[ReteSismicaAnnotation alloc] initWithTitle:segnalazione.users location:location magnitudo:[segnalazione.intensity intValue]]; + [self.annotationArray addObject:anAnnotation];*/ + +} + +-(MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id)annotation{ + /* + if ([annotation isKindOfClass:[ReteSismicaAnnotation class]]) { + ReteSismicaAnnotation *anLocation = (ReteSismicaAnnotation *)annotation; + MKAnnotationView *annotationView = [mapView dequeueReusableAnnotationViewWithIdentifier:IDENTIFIER_ANNOTATION_RETESMARTPHONE]; + if (annotationView == nil) + annotationView = anLocation.annotationView; + else + annotationView.annotation = anLocation; + + return annotationView; + } + else*/ + return nil; +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +-(NSArray *)generePulsantiTipoMappa{ + + UIBarButtonItem *item1; + UIBarButtonItem *item2; + switch (self.tipoMappa) { + case reteSmartphone:{ + item1 = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"ic_action_settings"] style:UIBarButtonItemStyleDone + target:self + action:@selector(setting)]; + + item2 = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"ic_action_share"] style:UIBarButtonItemStyleDone + target:self + action:@selector(condividi)]; + return @[item2, item1]; + } + break; + case reteSismica: + return nil; + + break; + case segnalazioneUtenti: + return nil; + + break; + default: + return nil; + break; + } +} + +-(IBAction)visualizzaPikerFiltro:(id)sender{ + + [self addChildViewController:self.pikerViewController]; + [self.view addSubview:self.pikerViewController.view]; + UIView *subView=self.pikerViewController.view; + UIView *parent=self.view; + + subView.translatesAutoresizingMaskIntoConstraints = NO; + + //Trailing + NSLayoutConstraint *trailing =[NSLayoutConstraint + constraintWithItem:subView + attribute:NSLayoutAttributeTrailing + relatedBy:NSLayoutRelationEqual + toItem:parent + attribute:NSLayoutAttributeTrailing + multiplier:1.0f + constant:0.f]; + + //Leading + + NSLayoutConstraint *leading = [NSLayoutConstraint + constraintWithItem:subView + attribute:NSLayoutAttributeLeading + relatedBy:NSLayoutRelationEqual + toItem:parent + attribute:NSLayoutAttributeLeading + multiplier:1.0f + constant:0.f]; + + //Bottom + NSLayoutConstraint *bottom =[NSLayoutConstraint + constraintWithItem:subView + attribute:NSLayoutAttributeBottom + relatedBy:NSLayoutRelationEqual + toItem:parent + attribute:NSLayoutAttributeBottom + multiplier:1.0f + constant:0.f]; + + //Height to be fixed for SubView same as AdHeight + NSLayoutConstraint *height = [NSLayoutConstraint + constraintWithItem:subView + attribute:NSLayoutAttributeHeight + relatedBy:NSLayoutRelationEqual + toItem:nil + attribute:NSLayoutAttributeNotAnAttribute + multiplier:0 + constant:200]; + + //Add constraints to the Parent + [parent addConstraint:trailing]; + [parent addConstraint:bottom]; + [parent addConstraint:leading]; + + //Add height constraint to the subview, as subview owns it. + [subView addConstraint:height]; + +} + +-(void)applicaFiltroWithTime:(NSNumber *)time{ + /* + NSArray *array = [EQNUtility applicaFiltroWithTime:unAnno withList:[EQNManager defaultManager].datiPastQuakes]; + EQNSegnalazione *segnalazione = array[0]; + CLLocation *coordinate = [[CLLocation alloc] initWithLatitude:[segnalazione.latitude doubleValue] longitude:[segnalazione.longitude doubleValue]]; + MKCoordinateSpan span = MKCoordinateSpanMake(10.5, 10.5); + MKCoordinateRegion region = MKCoordinateRegionMake(coordinate.coordinate, span); + [self.mapView setCenterCoordinate:coordinate.coordinate animated:NO]; + [self.mapView setRegion:region animated:YES]; + self.mapView.scrollEnabled = NO; + + for (EQNPastquakes *seg in array) + [self creaMarcherWithSegnalazione:seg]; + + [self.mapView addAnnotations:self.annotationArray]; + + NSLog(@"conto tutti %lu, conto filtrato %lu ",(unsigned long)[EQNManager defaultManager].elencoSelagnazioniManuali.count, (unsigned long)array.count);*/ + +} +#pragma mark - PikerControl delegate + +-(void)inviaDati:(NSDictionary *)elementi{ + + [self.pikerViewController.view removeFromSuperview]; + [self.pikerViewController removeFromParentViewController]; + NSNumber *index = elementi[@"indice"]; + [self.mapView removeAnnotations:self.annotationArray]; + [self applicaFiltroWithTime:index]; +} + +-(void)chiudiView{ + + [self.pikerViewController.view removeFromSuperview]; + [self.pikerViewController removeFromParentViewController]; +} +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/Sources/Earthquake Network/ViewController/Dettagli mappa/PastquakesDettagliMappa.h b/Sources/Earthquake Network/ViewController/Dettagli mappa/PastquakesDettagliMappa.h new file mode 100644 index 0000000..8d9cca0 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/Dettagli mappa/PastquakesDettagliMappa.h @@ -0,0 +1,14 @@ +// +// PastquakesDettagliMappa.h +// Earthquake Network +// +// Created by Luca Beretta on 03/11/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "DettagliMappaViewController.h" + +@interface PastquakesDettagliMappa : DettagliMappaViewController +//@property (weak, nonatomic) IBOutlet NSLayoutConstraint *altezzaMappa; + +@end diff --git a/Sources/Earthquake Network/ViewController/Dettagli mappa/PastquakesDettagliMappa.m b/Sources/Earthquake Network/ViewController/Dettagli mappa/PastquakesDettagliMappa.m new file mode 100644 index 0000000..b7e3e22 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/Dettagli mappa/PastquakesDettagliMappa.m @@ -0,0 +1,173 @@ +// +// PastquakesDettagliMappa.m +// Earthquake Network +// +// Created by Luca Beretta on 03/11/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "PastquakesDettagliMappa.h" +#import "PastquakesAnnotation.h" + +@interface PastquakesDettagliMappa () + +@property (nonatomic, strong) NSMutableArray *annotationArray; +@property(nonatomic, strong) GADBannerView *bannerView; + +@end + +@implementation PastquakesDettagliMappa + +- (void)viewDidLoad { + + self.filtroArray = @[NSLocalizedString(@"Ultimo anno", @""), NSLocalizedString(@"Ultimo mese", @""),NSLocalizedString(@"Ultima settimana", @""),NSLocalizedString(@"Ultimo giorno", @""),NSLocalizedString(@"Ultim\'ora", @"")]; + + [super viewDidLoad]; + // Do any additional setup after loading the view. + /* UIBarButtonItem *item1 = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"ic_action_settings"] + style:UIBarButtonItemStyleDone + target:self + action:@selector(setting)]; + + UIBarButtonItem *item2 = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"ic_action_share"] + style:UIBarButtonItemStyleDone + target:self + action:@selector(condividi)]; + + self.navigationItem.rightBarButtonItems = @[item2, item1];*/ + + self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"back"] + style:UIBarButtonItemStyleDone + target:self + action:@selector(chiudi:)]; + + self.mapView.delegate = self; + + //NSArray *lista = [EQNUtility applicaFiltroWithTime:unGiorno withList:[EQNManager defaultManager].datiPastQuakes]; +/* + EQNPastquakes *segnalazione = lista[0]; + CLLocation *coordinate = [[CLLocation alloc] initWithLatitude:[segnalazione.latitude doubleValue] longitude:[segnalazione.longitude doubleValue]]; + MKCoordinateSpan span = MKCoordinateSpanMake(10.5, 10.5); + MKCoordinateRegion region = MKCoordinateRegionMake(coordinate.coordinate, span); + [self.mapView setCenterCoordinate:coordinate.coordinate animated:NO]; + [self.mapView setRegion:region animated:YES]; + self.mapView.scrollEnabled = NO;*/ + + + [self.buttonAzione addTarget:self action:@selector(visualizzaPikerFiltro:) forControlEvents:UIControlEventTouchDown]; + [self applicaFiltroWithTime:@(2)]; + + if ([[NSUserDefaults standardUserDefaults] boolForKey:EQN_ACQ_IN_APP]) + NSLog(@"ciao"); + else + self.bannerView = [EQNUtility ottieniBannerWithController:self position:NO]; + + +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +-(void)creaMarcherWithSegnalazione:(id)segnalazione{ + + [super creaMarcherWithSegnalazione:segnalazione]; + + if(!self.annotationArray) + self.annotationArray = [NSMutableArray array]; + + EQNPastquakes *pasq = (EQNPastquakes *)segnalazione; + + CLLocationCoordinate2D location = CLLocationCoordinate2DMake([pasq.latitude doubleValue], [pasq.longitude doubleValue]); + PastquakesAnnotation *anAnnotation = [[PastquakesAnnotation alloc] initWithTitle:[NSString stringWithFormat:@"%@ %@ %@",NSLocalizedString(@"Sisma rilevato da", @"") ,pasq.users, NSLocalizedString(@"smartphones", @"")] location:location intensita:[pasq.intensity intValue]]; + [self.annotationArray addObject:anAnnotation]; + +} + +-(MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id)annotation{ + + + if ([annotation isKindOfClass:[PastquakesAnnotation class]]) { + PastquakesAnnotation *anLocation = (PastquakesAnnotation *)annotation; + MKAnnotationView *annotationView = [mapView dequeueReusableAnnotationViewWithIdentifier:IDENTIFIER_ANNOTATION_PASTQUAKES]; + if (annotationView == nil) + annotationView = anLocation.annotationView; + else + annotationView.annotation = anLocation; + + return annotationView; + } + else + return nil; + + +} + + +-(void)applicaFiltroWithTime:(NSNumber *)time{ + + EQNFiltriMappa filtro = unGiorno; + switch ([time intValue]) { + case 0: + filtro = unAnno; + break; + case 1: + filtro = unMese; + break; + case 2: + filtro = unaSettimana; + break; + case 3: + filtro = unGiorno; + break; + case 4: + filtro = unOra; + break; + default: + break; + } + + NSArray *lista = [EQNUtility applicaFiltroWithTime:filtro withList:[EQNManager defaultManager].datiPastQuakes]; + + // EQNPastquakes *segnalazione = lista[0]; + // CLLocation *coordinate = [[CLLocation alloc] initWithLatitude:[segnalazione.latitude doubleValue] longitude:[segnalazione.longitude doubleValue]]; + // MKCoordinateSpan span = MKCoordinateSpanMake(10.5, 10.5); + // MKCoordinateRegion region = MKCoordinateRegionMake(coordinate.coordinate, span); + // [self.mapView setCenterCoordinate:coordinate.coordinate animated:NO]; + // [self.mapView setRegion:region animated:YES]; + + self.mapView.scrollEnabled = YES; + + [self.annotationArray removeAllObjects]; + + for (EQNPastquakes *seg in lista) + [self creaMarcherWithSegnalazione:seg]; + + NSLog(@"Lista sismi %lu", (unsigned long)lista.count); + + [self.mapView addAnnotations:self.annotationArray]; + [self.mapView showAnnotations:self.annotationArray animated:YES]; + self.labelAzione.text = self.filtroArray[[time intValue]]; + /* + MKMapRect zoomRect = MKMapRectNull; + for (id annotation in self.mapView .annotations) + { + MKMapPoint annotationPoint = MKMapPointForCoordinate(annotation.coordinate); + MKMapRect pointRect = MKMapRectMake(annotationPoint.x, annotationPoint.y, 0.1, 0.1); + zoomRect = MKMapRectUnion(zoomRect, pointRect); + } + [mapView setVisibleMapRect:zoomRect animated:YES];*/ + +} +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/Sources/Earthquake Network/ViewController/Dettagli mappa/ReteSismiDettagliMappa.h b/Sources/Earthquake Network/ViewController/Dettagli mappa/ReteSismiDettagliMappa.h new file mode 100644 index 0000000..6bc08cd --- /dev/null +++ b/Sources/Earthquake Network/ViewController/Dettagli mappa/ReteSismiDettagliMappa.h @@ -0,0 +1,16 @@ +// +// ReteSismiDettagliMappa.h +// Earthquake Network +// +// Created by Luca Beretta on 07/11/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "DettagliMappaViewController.h" +#import "EQNSisma.h" + + +@interface ReteSismiDettagliMappa : DettagliMappaViewController + +@property (nonatomic, strong) EQNSisma *sisma; +@end diff --git a/Sources/Earthquake Network/ViewController/Dettagli mappa/ReteSismiDettagliMappa.m b/Sources/Earthquake Network/ViewController/Dettagli mappa/ReteSismiDettagliMappa.m new file mode 100644 index 0000000..a157d5e --- /dev/null +++ b/Sources/Earthquake Network/ViewController/Dettagli mappa/ReteSismiDettagliMappa.m @@ -0,0 +1,101 @@ +// +// ReteSismiDettagliMappa.m +// Earthquake Network +// +// Created by Luca Beretta on 07/11/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "ReteSismiDettagliMappa.h" +#import "SismaAnnotation.h" + +@interface ReteSismiDettagliMappa () +@property(nonatomic, strong) GADBannerView *bannerView; + +@end + +@implementation ReteSismiDettagliMappa + +- (void)viewDidLoad { + + + self.mapView.delegate = self; + + [super viewDidLoad]; + // Do any additional setup after loading the view. + + + self.navigationController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"back"] + style:UIBarButtonItemStyleDone + target:self + action:@selector(chiudi:)]; + + + for (EQNSisma *sismi in [EQNManager defaultManager].retiSismiche ) { + [self creaMarcherWithSegnalazione:sismi]; + + } + + if (![[NSUserDefaults standardUserDefaults] boolForKey:EQN_ACQ_IN_APP]){ + self.bannerView = [EQNUtility ottieniBannerWithController:self position:YES]; + + } +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + + +-(void)creaMarcherWithSegnalazione:(id)segnalazione{ + + [super creaMarcherWithSegnalazione:segnalazione]; + + CLLocationCoordinate2D location = CLLocationCoordinate2DMake([self.sisma.latitude doubleValue], [self.sisma.longitude doubleValue]); + SismaAnnotation *anAnnotation = [[SismaAnnotation alloc] initWithTitle:self.sisma.place location:location intensita:[self.sisma.magnitude doubleValue]]; + + [self.mapView addAnnotation:anAnnotation]; + + CLLocation *coordinate = [[CLLocation alloc] initWithLatitude:[self.sisma.latitude doubleValue] longitude:[self.sisma.longitude doubleValue]]; + MKCoordinateSpan span = MKCoordinateSpanMake(10.5, 10.5); + MKCoordinateRegion region = MKCoordinateRegionMake(coordinate.coordinate, span); + [self.mapView setCenterCoordinate:coordinate.coordinate animated:NO]; + [self.mapView setRegion:region animated:YES]; + +} + +-(MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id)annotation{ + + + if ([annotation isKindOfClass:[SismaAnnotation class]]) { + SismaAnnotation *anLocation = (SismaAnnotation *)annotation; + MKAnnotationView *annotationView = [mapView dequeueReusableAnnotationViewWithIdentifier:IDENTIFIER_ANNOTATION_SISMI]; + if (annotationView == nil) + annotationView = anLocation.annotationView; + else + annotationView.annotation = anLocation; + + return annotationView; + } + else + return nil; + + +} + + // apriImpostazioni + + + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/Sources/Earthquake Network/ViewController/Dettagli mappa/SegnalazioniUtenteDettagliMappa.h b/Sources/Earthquake Network/ViewController/Dettagli mappa/SegnalazioniUtenteDettagliMappa.h new file mode 100644 index 0000000..a2082b6 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/Dettagli mappa/SegnalazioniUtenteDettagliMappa.h @@ -0,0 +1,13 @@ +// +// SegnalazioniUtenteDettagliMappa.h +// Earthquake Network +// +// Created by Luca Beretta on 07/11/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "DettagliMappaViewController.h" + +@interface SegnalazioniUtenteDettagliMappa : DettagliMappaViewController + +@end diff --git a/Sources/Earthquake Network/ViewController/Dettagli mappa/SegnalazioniUtenteDettagliMappa.m b/Sources/Earthquake Network/ViewController/Dettagli mappa/SegnalazioniUtenteDettagliMappa.m new file mode 100644 index 0000000..38520c3 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/Dettagli mappa/SegnalazioniUtenteDettagliMappa.m @@ -0,0 +1,195 @@ +// +// SegnalazioniUtenteDettagliMappa.m +// Earthquake Network +// +// Created by Luca Beretta on 07/11/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "SegnalazioniUtenteDettagliMappa.h" +#import "ReteSismicaAnnotation.h" +@interface SegnalazioniUtenteDettagliMappa () + +@property (nonatomic, strong) NSMutableArray *annotationArray; +@property(nonatomic, strong) GADBannerView *bannerView; + +@end + +@implementation SegnalazioniUtenteDettagliMappa + +- (void)viewDidLoad { + + self.filtroArray = @[NSLocalizedString(@"Un giorno", @""), NSLocalizedString(@"Dodici ore", @""),NSLocalizedString(@"Sei ore", @""),NSLocalizedString(@"Due ore", @""),NSLocalizedString(@"Un ora", @""), NSLocalizedString(@"Dieci minuti", @"")]; + + [super viewDidLoad]; + + /* + // Do any additional setup after loading the view. + UIBarButtonItem *item1 = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"ic_action_settings"] + style:UIBarButtonItemStyleDone + target:self + action:@selector(setting)]; + + UIBarButtonItem *item2 = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"ic_action_share"] + style:UIBarButtonItemStyleDone + target:self + action:@selector(condividi)]; + + + + self.navigationItem.rightBarButtonItems = @[item2, item1];*/ + + self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"back"] + style:UIBarButtonItemStyleDone + target:self + action:@selector(chiudi:)]; + + self.mapView.delegate = self; + + [self.buttonAzione addTarget:self action:@selector(visualizzaPikerFiltro:) forControlEvents:UIControlEventTouchDown]; + [self applicaFiltroWithTime:@(0)]; + + if (![[NSUserDefaults standardUserDefaults] boolForKey:EQN_ACQ_IN_APP]){ + self.bannerView = [EQNUtility ottieniBannerWithController:self position:NO]; + + } +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +-(void)creaMarcherWithSegnalazione:(id)segnalazione{ + + [super creaMarcherWithSegnalazione:segnalazione]; + + if(!self.annotationArray) + self.annotationArray = [NSMutableArray array]; + + EQNSegnalazione *anSegnalazione = (EQNSegnalazione *)segnalazione; + + CLLocationCoordinate2D location = CLLocationCoordinate2DMake([anSegnalazione.latitude doubleValue], [anSegnalazione.longitude doubleValue]); + ReteSismicaAnnotation *anAnnotation = [[ReteSismicaAnnotation alloc] initWithTitle:anSegnalazione.address location:location magnitudo:[anSegnalazione.magnitude intValue]]; + [self.annotationArray addObject:anAnnotation]; + +} +-(MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id)annotation{ + + + if ([annotation isKindOfClass:[ReteSismicaAnnotation class]]) { + ReteSismicaAnnotation *anLocation = (ReteSismicaAnnotation *)annotation; + MKAnnotationView *annotationView = [mapView dequeueReusableAnnotationViewWithIdentifier:IDENTIFIER_ANNOTATION_RETESMARTPHONE]; + if (annotationView == nil) + annotationView = anLocation.annotationView; + else + annotationView.annotation = anLocation; + + return annotationView; + } + else + return nil; + + +} + + +-(void)applicaFiltroWithTime:(NSNumber *)time{ + + EQNFiltriMappa filtro = unGiorno; + switch ([time intValue]) { + case 0: + filtro = unGiorno; + break; + case 1: + filtro = dodiciOre; + break; + case 2: + filtro = seiOre; + break; + case 3: + filtro = dueOre; + break; + case 4: + filtro = unOra; + break; + case 5: + filtro = dieciMinuti; + break; + default: + break; + } + + NSArray *lista = [EQNUtility applicaFiltroWithTime:filtro withList:[EQNManager defaultManager].elencoSelagnazioniManuali]; + + + // EQNPastquakes *segnalazione = lista[0]; + // CLLocation *coordinate = [[CLLocation alloc] initWithLatitude:[segnalazione.latitude doubleValue] longitude:[segnalazione.longitude doubleValue]]; + // MKCoordinateSpan span = MKCoordinateSpanMake(10.5, 10.5); + // MKCoordinateRegion region = MKCoordinateRegionMake(coordinate.coordinate, span); + // [self.mapView setCenterCoordinate:coordinate.coordinate animated:NO]; + // [self.mapView setRegion:region animated:YES]; + + self.mapView.scrollEnabled = YES; + + [self.annotationArray removeAllObjects]; + + for (EQNSegnalazione *seg in lista) + [self creaMarcherWithSegnalazione:seg]; + + [self.mapView addAnnotations:self.annotationArray]; + [self.mapView showAnnotations:self.annotationArray animated:YES]; + self.labelAzione.text = self.filtroArray[[time intValue]]; + + if (lista.count == 0) { + return; + } + + NSSortDescriptor *dateDescriptor = [NSSortDescriptor + sortDescriptorWithKey:@"date" + ascending:YES]; + NSArray *sortDescriptors = [NSArray arrayWithObject:dateDescriptor]; + NSArray *sortedEventArray = [lista + sortedArrayUsingDescriptors:sortDescriptors]; + + for (EQNSegnalazione *seg in sortedEventArray) { + + NSLog(@"seg data %@", seg.date); + } + + + EQNSegnalazione *segnalazione = sortedEventArray[0]; + CLLocation *coordinate = [[CLLocation alloc] initWithLatitude:[segnalazione.latitude doubleValue] longitude:[segnalazione.longitude doubleValue]]; + MKCoordinateSpan span = MKCoordinateSpanMake(10.5, 10.5); + MKCoordinateRegion region = MKCoordinateRegionMake(coordinate.coordinate, span); + self.mapView.delegate = self; + [self.mapView setCenterCoordinate:coordinate.coordinate animated:NO]; + [self.mapView setRegion:region animated:YES]; + self.mapView.scrollEnabled = NO; + + [self.buttonAzione addTarget:self action:@selector(visualizzaPikerFiltro:) forControlEvents:UIControlEventTouchDown]; + + + /* + MKMapRect zoomRect = MKMapRectNull; + for (id annotation in self.mapView .annotations) + { + MKMapPoint annotationPoint = MKMapPointForCoordinate(annotation.coordinate); + MKMapRect pointRect = MKMapRectMake(annotationPoint.x, annotationPoint.y, 0.1, 0.1); + zoomRect = MKMapRectUnion(zoomRect, pointRect); + } + [mapView setVisibleMapRect:zoomRect animated:YES];*/ + +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/Sources/Earthquake Network/ViewController/DettagliTsunamiViewController.h b/Sources/Earthquake Network/ViewController/DettagliTsunamiViewController.h new file mode 100644 index 0000000..e770b53 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/DettagliTsunamiViewController.h @@ -0,0 +1,14 @@ +// +// DettagliTsunamiViewController.h +// Earthquake Network +// +// Created by Luca Beretta on 13/11/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import + +@interface DettagliTsunamiViewController : UIViewController + +@property (nonatomic, strong) NSURL *link; +@end diff --git a/Sources/Earthquake Network/ViewController/DettagliTsunamiViewController.m b/Sources/Earthquake Network/ViewController/DettagliTsunamiViewController.m new file mode 100644 index 0000000..d1c7035 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/DettagliTsunamiViewController.m @@ -0,0 +1,48 @@ +// +// DettagliTsunamiViewController.m +// Earthquake Network +// +// Created by Luca Beretta on 13/11/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "DettagliTsunamiViewController.h" + +@interface DettagliTsunamiViewController () + +@property (weak, nonatomic) IBOutlet UIWebView *webView; +- (IBAction)chiudi:(id)sender; + +@end + +@implementation DettagliTsunamiViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. + NSURLRequest *requestObj = [NSURLRequest requestWithURL:self.link]; + [self.webView loadRequest:requestObj]; + + //Load the request in the UIWebView. +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +- (IBAction)chiudi:(id)sender { + + [self dismissViewControllerAnimated:YES completion:nil]; +} +@end diff --git a/Sources/Earthquake Network/ViewController/EQNRetiSismiViewController.h b/Sources/Earthquake Network/ViewController/EQNRetiSismiViewController.h new file mode 100644 index 0000000..05cce57 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/EQNRetiSismiViewController.h @@ -0,0 +1,13 @@ +// +// EQNRetiSismiViewController.h +// Earthquake Network +// +// Created by Luca Beretta on 25/10/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import + +@interface EQNRetiSismiViewController : UIViewController +-(void)aggiornaTabella:(id)sender; +@end diff --git a/Sources/Earthquake Network/ViewController/EQNRetiSismiViewController.m b/Sources/Earthquake Network/ViewController/EQNRetiSismiViewController.m new file mode 100644 index 0000000..791f198 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/EQNRetiSismiViewController.m @@ -0,0 +1,191 @@ +// +// EQNRetiSismiViewController.m +// Earthquake Network +// +// Created by Luca Beretta on 25/10/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "EQNRetiSismiViewController.h" +#import "EQNManager.h" +#import "EQNSisma.h" +#import "Costanti.h" +#import +#import "CellDettagliMappaTableViewCell.h" +#import "Cell_Reti_sismicheTableViewCell.h" +#import "Cell_Meteo_TableViewCell.h" +#import "ReteSismiDettagliMappa.h" +#import "SismaAnnotation.h" +#import + + +@interface EQNRetiSismiViewController () + +@property (nonatomic, strong) NSArray *listaSismi; +@property (nonatomic, strong) IBOutlet UITableView *tableView; +@property (nonatomic, strong) NSIndexPath *selectIndex; +@property (nonatomic, assign) EQNReteSismicaCell tipoCell; +@property (weak, nonatomic) IBOutlet NSLayoutConstraint *fooTable; + +@end + +@implementation EQNRetiSismiViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(aggiornaTabella:) name:NOTIFICA_DOWNLOAD_TERMINATO object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(setupView) name:IAPHelperPurchaseNotification object:nil]; + + [self setupView]; + [self aggiornaTabella:nil]; + +} +-(void)setupView{ + + if([[NSUserDefaults standardUserDefaults] objectForKey:AQUISTO_PRO] || [[NSUserDefaults standardUserDefaults] objectForKey:AQUISTO_PRO_SCONTATO]) + self.fooTable.constant = 0; +} + +-(void)aggiornaTabella:(id)sender{ + + self.listaSismi = [EQNUtility arrayRetisismicheFiltrate:[EQNManager defaultManager].retiSismiche]; + + dispatch_async(dispatch_get_main_queue(), ^{ + [self.tableView reloadData]; + }); +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +-(void)apriDettagli:(id)sender{ + + UIButton *button = (UIButton *)sender; + UITableViewCell *cell = (UITableViewCell *)[[[button superview] superview] superview]; + self.selectIndex = [self.tableView indexPathForCell:cell]; + switch (button.tag) { + case 12: + self.tipoCell = mappaCell; + break; + case 14: + self.tipoCell = meteoCell; + break; + default: + self.tipoCell = defaultCell; + [self chiudiMappa]; + return; + break; + } + [self.tableView reloadRowsAtIndexPaths:@[self.selectIndex] withRowAnimation:UITableViewRowAnimationNone]; + [self.tableView scrollToRowAtIndexPath:self.selectIndex + atScrollPosition:UITableViewScrollPositionTop animated:YES]; + +} + +-(void)apriDettagliMappa:(id)sender{ + + UIButton *button = (UIButton *)sender; + UITableViewCell *cell = (UITableViewCell *)[[button superview] superview]; + NSIndexPath *index = [self.tableView indexPathForCell:cell]; + + EQNSisma *sisma = self.listaSismi[index.row]; + [self performSegueWithIdentifier:@"apri_mappa_dettagli" sender:sisma]; + +} +-(void)chiudiMappa{ + + NSIndexPath *indexDelete = [self.selectIndex copy]; + self.selectIndex = nil; + [self.tableView reloadRowsAtIndexPaths:@[indexDelete] withRowAnimation:UITableViewRowAnimationNone]; + indexDelete = nil; + self.tipoCell = defaultCell; + [self.tableView scrollToRowAtIndexPath:indexDelete + atScrollPosition:UITableViewScrollPositionTop animated:NO]; +} + +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. + if ([segue.identifier isEqualToString:@"apri_mappa_dettagli"]) { + + EQNSisma *sisma = (EQNSisma *)sender; + UINavigationController *nav = (UINavigationController *)segue.destinationViewController; + ReteSismiDettagliMappa *mappaDett = (ReteSismiDettagliMappa *)nav.topViewController; + mappaDett.sisma = sisma; + } +} + + +#pragma table view + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ + + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ + + return self.listaSismi.count; +} + +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ + + if (self.selectIndex && self.selectIndex.row == indexPath.row) + return 368; + return 180; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ + + EQNSisma *sisma = self.listaSismi[indexPath.row]; + Cell_Reti_sismicheTableViewCell *cell; + if (self.selectIndex && self.selectIndex.row == indexPath.row){ + switch (self.tipoCell) + case mappaCell:{ + cell = (CellDettagliMappaTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"sismaCell_mappa" forIndexPath:indexPath]; + break; + default: + cell = (Cell_Meteo_TableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"sismaCell_meteo" forIndexPath:indexPath]; + break; + } + [cell createOtherButton]; + + + } + else + cell = [tableView dequeueReusableCellWithIdentifier:@"sismaCell" forIndexPath:indexPath]; + + cell.sisma = sisma; + [cell setupView]; + [cell.chiudi addTarget:self action:@selector(chiudiMappa) forControlEvents:UIControlEventTouchDown]; + [cell.mappaButton addTarget:self action:@selector(apriDettagli:) forControlEvents:UIControlEventTouchDown]; + [cell.meteoButton addTarget:self action:@selector(apriDettagli:) forControlEvents:UIControlEventTouchDown]; + [cell.dettagliMappa addTarget:self action:@selector(apriDettagliMappa:) forControlEvents:UIControlEventTouchDown]; + [cell.clickMappa addTarget:self action:@selector(apriDettagliMappa:) forControlEvents:UIControlEventTouchDown]; + [cell.condividi addTarget:self action:@selector(condividiView:) forControlEvents:UIControlEventTouchDown]; + return cell; + +} + +-(void)condividiView:(id)sender{ + + UIButton *button = (UIButton *)sender; + CellDettagliMappaTableViewCell *cell = (CellDettagliMappaTableViewCell *)button.superview.superview.superview; + [self presentViewController:[EQNUtility shareFileWithPath:[cell condividiViewPath]] animated:YES completion:^{}]; + +} + +-(void)dealloc{ + + [[NSNotificationCenter defaultCenter] removeObserver:self]; + +} + +@end diff --git a/Sources/Earthquake Network/ViewController/ElencoFiltroEntiTableViewController.h b/Sources/Earthquake Network/ViewController/ElencoFiltroEntiTableViewController.h new file mode 100644 index 0000000..3755beb --- /dev/null +++ b/Sources/Earthquake Network/ViewController/ElencoFiltroEntiTableViewController.h @@ -0,0 +1,24 @@ +// +// ElencoFiltroEntiTableViewController.h +// Earthquake Network +// +// Created by Luca Beretta on 06/02/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import +#import "costanti.h" + +NS_ASSUME_NONNULL_BEGIN +@protocol MenuListaEntiDelegate + +-(void)inviaDatiLista:(EQNfiltroEnti )filtro; +@end + + +@interface ElencoFiltroEntiTableViewController : UITableViewController +@property (strong, nonatomic) id delegate; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sources/Earthquake Network/ViewController/ElencoFiltroEntiTableViewController.m b/Sources/Earthquake Network/ViewController/ElencoFiltroEntiTableViewController.m new file mode 100644 index 0000000..2db56eb --- /dev/null +++ b/Sources/Earthquake Network/ViewController/ElencoFiltroEntiTableViewController.m @@ -0,0 +1,112 @@ +// +// ElencoFiltroEntiTableViewController.m +// Earthquake Network +// +// Created by Luca Beretta on 06/02/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import "ElencoFiltroEntiTableViewController.h" +#import "EQNUtility.h" +#import "costanti.h" + +@interface ElencoFiltroEntiTableViewController () +@property (nonatomic, strong) NSArray *listaEnti; +-(IBAction)save:(id)sender; +-(IBAction)cancell:(id)sender; + +@end + +@implementation ElencoFiltroEntiTableViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + if([[NSUserDefaults standardUserDefaults] objectForKey:IMPOSTAZIONE_ENTI_RETI_SISMICHEI]){ + self.listaEnti = [[NSUserDefaults standardUserDefaults] objectForKey:IMPOSTAZIONE_ENTI_RETI_SISMICHEI]; + + }else{ + self.listaEnti = [EQNUtility arrayEnti]; + } + +} + +#pragma mark - Table view data source + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + + return [EQNUtility arrayEnti].count; +} + +-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ + + return 70; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + + NSArray *descrizioni = [EQNUtility arrayDescrizioneEnti]; + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellaSelezioneAbilita" forIndexPath:indexPath]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = [EQNUtility arrayEnti][indexPath.row]; + UILabel *stato = (UILabel *)[cell viewWithTag:2]; + stato.text = descrizioni[indexPath.row];//NSLocalizedString(@"Ricevi le notifiche dei sismi rilevati dalle agenzie nazionalie internazionali", @"voce menu"); + cell.accessoryType = UITableViewCellAccessoryNone; + if ([self.listaEnti containsObject:titolo.text]){ + cell.accessoryType = UITableViewCellAccessoryCheckmark; + titolo.textColor = [UIColor blackColor]; + stato.textColor = [UIColor blackColor]; + }else{ + cell.accessoryType = UITableViewCellAccessoryNone; + titolo.textColor = [UIColor grayColor]; + stato.textColor = [UIColor grayColor]; + + } + + return cell; +} + +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ + + NSMutableArray *array = [self.listaEnti mutableCopy]; + NSString *selezioneEnete = [EQNUtility arrayEnti][indexPath.row]; + if ([array containsObject:selezioneEnete]) + [array removeObject:selezioneEnete]; + else + [array addObject:selezioneEnete]; + + self.listaEnti = [NSArray arrayWithArray:array]; + [self.tableView reloadData]; +} + + +-(IBAction)save:(id)sender{ + + [[NSUserDefaults standardUserDefaults] setObject:self.listaEnti forKey:IMPOSTAZIONE_ENTI_RETI_SISMICHEI]; + + if (self.listaEnti.count == 1){ + + NSArray *enti = [EQNUtility arrayEnti]; + NSUInteger index = [enti indexOfObject:[self.listaEnti firstObject]]; + [[NSUserDefaults standardUserDefaults] setInteger:index forKey:IMPOSTAZIONE_NAZIONE_RETI_SISMICHEI]; + + }else{ + + [[NSUserDefaults standardUserDefaults] removeObjectForKey:IMPOSTAZIONE_NAZIONE_RETI_SISMICHEI]; + + } + + [self.delegate inviaDatiLista:enti]; + [self dismissViewControllerAnimated:YES + completion:nil]; +} +-(IBAction)cancell:(id)sender{ + + [self dismissViewControllerAnimated:YES completion:nil]; +} + +@end diff --git a/Sources/Earthquake Network/ViewController/ImpostazioniViewController.h b/Sources/Earthquake Network/ViewController/ImpostazioniViewController.h new file mode 100644 index 0000000..0624b23 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/ImpostazioniViewController.h @@ -0,0 +1,13 @@ +// +// ImpostazioniViewController.h +// Earthquake Network +// +// Created by Luca Beretta on 08/11/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import + +@interface ImpostazioniViewController : UIViewController + +@end diff --git a/Sources/Earthquake Network/ViewController/ImpostazioniViewController.m b/Sources/Earthquake Network/ViewController/ImpostazioniViewController.m new file mode 100644 index 0000000..41d54ee --- /dev/null +++ b/Sources/Earthquake Network/ViewController/ImpostazioniViewController.m @@ -0,0 +1,71 @@ +// +// ImpostazioniViewController.m +// Earthquake Network +// +// Created by Luca Beretta on 08/11/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "ImpostazioniViewController.h" + +@interface ImpostazioniViewController () +@property (weak, nonatomic) IBOutlet UILabel *titolo; +@property (weak, nonatomic) IBOutlet UILabel *nazione; +@property (weak, nonatomic) IBOutlet UIButton *buttonNazione; +@property (weak, nonatomic) IBOutlet UILabel *etichetta; +@property (weak, nonatomic) IBOutlet UIButton *buttonReteSismiche; +@property (weak, nonatomic) IBOutlet UIButton *buttonChiudi; +- (IBAction)selezionaNazione:(id)sender; +- (IBAction)selezionaRetiSismiche:(id)sender; +- (IBAction)chiudi:(id)sender; + +@end + +@implementation ImpostazioniViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. + + self.titolo.text = NSLocalizedString(@"Se vuoi filtrare la lista dei sismi, seleziona la nazione in cui vivi", @""); + + self.etichetta.text = NSLocalizedString(@"oppure", @""); + + [self.buttonNazione setTitle:[NSLocalizedString(@"Conferma nazione", @"") uppercaseString] forState:UIControlStateNormal]; + + [self.buttonReteSismiche setTitle:NSLocalizedString(@"Gestisci le reti sismiche", @"") forState:UIControlStateNormal]; + + [self.buttonChiudi setTitle:[NSLocalizedString(@"Annulla", @"") uppercaseString] forState:UIControlStateNormal]; + +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +- (IBAction)selezionaNazione:(id)sender { + + + +} + +- (IBAction)selezionaRetiSismiche:(id)sender { + +} + +- (IBAction)chiudi:(id)sender { + + [self dismissViewControllerAnimated:YES completion:nil]; +} +@end diff --git a/Sources/Earthquake Network/ViewController/InformazioniViewController.h b/Sources/Earthquake Network/ViewController/InformazioniViewController.h new file mode 100644 index 0000000..c26bc0b --- /dev/null +++ b/Sources/Earthquake Network/ViewController/InformazioniViewController.h @@ -0,0 +1,19 @@ +// +// InformazioniViewController.h +// Earthquake Network +// +// Created by Luca Beretta on 11/02/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface InformazioniViewController : UIViewController + +@property (nonatomic, strong) NSIndexPath *index; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sources/Earthquake Network/ViewController/InformazioniViewController.m b/Sources/Earthquake Network/ViewController/InformazioniViewController.m new file mode 100644 index 0000000..3be9876 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/InformazioniViewController.m @@ -0,0 +1,92 @@ +// +// InformazioniViewController.m +// Earthquake Network +// +// Created by Luca Beretta on 11/02/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import "InformazioniViewController.h" + +@interface InformazioniViewController () +@property (weak, nonatomic) IBOutlet UITextView *testo; + +@end + +@implementation InformazioniViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. + UIView *viewNavigationBar = [[UIView alloc] initWithFrame:CGRectMake(-18, 5, 190, 44)]; + UIImageView *imageLogo = [[UIImageView alloc] initWithFrame:CGRectMake(-18, 5, 38, 38)]; + imageLogo.image = [UIImage imageNamed:@"distquake_app_wave"]; + [viewNavigationBar addSubview:imageLogo]; + UILabel *textForNavi = [[UILabel alloc] initWithFrame:CGRectMake(25, 5, 180, 38)]; + + + UIBarButtonItem *item1 = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"chiudi", @"") + style:UIBarButtonItemStyleDone + target:self + action:@selector(chiudi:)]; + + + self.navigationItem.rightBarButtonItems = @[item1]; + + NSString *nameFile = @""; + switch (self.index.row) { + case 2: + nameFile = @"info"; + break; + case 3: + nameFile = @"faq"; + break; + case 4: + nameFile = @"disclaimer"; + break; + case 5: + nameFile = @"author"; + break; + case 6: + nameFile = @"privacy"; + break; + default: + break; + } + + + textForNavi.text = [nameFile uppercaseString]; + [viewNavigationBar addSubview:textForNavi]; + self.navigationItem.titleView = viewNavigationBar; + + self.testo.text = [self testWithFileName:nameFile]; +} + +-(NSString *)testWithFileName:(NSString *)name{ + + NSString* path = [[NSBundle mainBundle] pathForResource:name + ofType:@"txt"]; + NSString* content = [NSString stringWithContentsOfFile:path + encoding:NSUTF8StringEncoding + error:NULL]; + return content; + + +} + +-(void)chiudi:(id)sender{ + + [self dismissViewControllerAnimated:YES completion:nil]; + +} +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/Sources/Earthquake Network/ViewController/LogViewController.h b/Sources/Earthquake Network/ViewController/LogViewController.h new file mode 100644 index 0000000..223f06f --- /dev/null +++ b/Sources/Earthquake Network/ViewController/LogViewController.h @@ -0,0 +1,13 @@ +// +// LogViewController.h +// Earthquake Network +// +// Created by Luca Beretta on 01/12/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import + +@interface LogViewController : UIViewController + +@end diff --git a/Sources/Earthquake Network/ViewController/LogViewController.m b/Sources/Earthquake Network/ViewController/LogViewController.m new file mode 100644 index 0000000..90117a7 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/LogViewController.m @@ -0,0 +1,76 @@ +// +// LogViewController.m +// Earthquake Network +// +// Created by Luca Beretta on 01/12/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "LogViewController.h" +#import "EQNManager.h" +#import "EQMAccelerometroManager.h" +#import "EQNUser.h" + +@interface LogViewController () + +@property (nonatomic, strong) IBOutlet UITextView *logView; +@property (nonatomic, strong) NSString *testo; + +-(IBAction)chiudi:(id)sender; +@end + +@implementation LogViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(aggiornaLog:) name:@"AGGIORNA_LOG" object:nil]; + + [[EQNManager defaultManager] avviaManager]; + [[EQMAccelerometroManager sharedInstance] startUpdatingLocationBackground]; + + self.testo = [NSString stringWithFormat:@" LOG ID UTENTE %@\n\nTOKEN FIREBASE:\n%@\n\n", [EQNUser defaultUser].user_ID, [EQNUser defaultUser].tokenUser]; + + self.logView.text = self.testo; +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} +-(IBAction)chiudi:(id)sender{ + + + [[EQNManager defaultManager] stopManager]; + [[EQMAccelerometroManager sharedInstance] stopUpdatingLocation]; + [[NSNotificationCenter defaultCenter] removeObserver:self]; + + [self dismissViewControllerAnimated:YES completion:nil]; +} + +-(void)aggiornaLog:(NSNotification *)notificaton{ + + NSDictionary *messaggio = notificaton.userInfo; + NSString *messagioString = messaggio[@"messaggio"]; + NSString *mes = self.logView.text; + + // [mes stringByAppendingString:messagioString]; + dispatch_async(dispatch_get_main_queue(), ^{ + + self.logView.text = [NSString stringWithFormat:@"%@\n%@", mes, messagioString]; + }); + +} + + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/Sources/Earthquake Network/ViewController/MasterViewController.h b/Sources/Earthquake Network/ViewController/MasterViewController.h new file mode 100644 index 0000000..ffd73a4 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/MasterViewController.h @@ -0,0 +1,27 @@ +// +// MasterViewController.h +// Earthquake Network +// +// Created by Luca Beretta on 17/10/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import + +@interface MasterViewController : UIViewController + +@property (nonatomic, strong) IBOutlet UICollectionView *collectionView; +@property (nonatomic, strong) NSArray *listaAzioniCollectView; +@property (nonatomic, strong) IBOutlet UIBarButtonItem *sidebarButton; + +-(void)apriImpostazioni; +-(void)sincronizza; +-(void)apriManu; +-(void)clock; +-(void)heart; + +-(void)selezionaItem:(NSIndexPath *)indexPath; +-(void)caricaChildrenViewController:(NSIndexPath *)indexPath; +-(void)fetchNewDataWithCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler; + +@end diff --git a/Sources/Earthquake Network/ViewController/MasterViewController.m b/Sources/Earthquake Network/ViewController/MasterViewController.m new file mode 100644 index 0000000..faa57bb --- /dev/null +++ b/Sources/Earthquake Network/ViewController/MasterViewController.m @@ -0,0 +1,426 @@ +// +// MasterViewController.m +// Earthquake Network +// +// Created by Luca Beretta on 17/10/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "MasterViewController.h" +#import "SWRevealViewController.h" +#import "ReteSmartphone.h" +#import "SegnalazioniViewController.h" +#import "EQNRetiSismiViewController.h" +#import "TsunamiViewController.h" +#import "Costanti.h" +#import "EQNUtility.h" +#import "EQNManager.h" +#import "EQNUser.h" +#import "ServerRequest.h" +#import "EQNGeneratoreURLServer.h" +#import "MasterViewController.h" +#import "AppDelegate.h" +#import "MenuSelezioneEntiViewController.h" +#import "ElencoFiltroEntiTableViewController.h" +#import "InformazioniViewController.h" +#import "MenuFiltroEntiViewController.h" + +@interface MasterViewController () +@property (weak, nonatomic) IBOutlet UIView *containerView; + +@property (strong, nonatomic) ReteSmartphone *reteSmartphone; +@property (strong, nonatomic) SegnalazioniViewController *segnalazioni; +@property (strong, nonatomic) EQNRetiSismiViewController *restiSismi; +@property (strong, nonatomic) TsunamiViewController *tsunami; +@property(nonatomic, strong) GADBannerView *bannerView; + +@property (nonatomic, strong) UIStoryboard *mainStoreBoard; +@property (nonatomic, strong) NSIndexPath *selectIndex; +@end + +@implementation MasterViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. + + + AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; + appDelegate.masterViewController = self; + + [self sincronizza]; + + + NSURL *receiptURL = [[NSBundle mainBundle] appStoreReceiptURL]; + NSData *receipt = [NSData dataWithContentsOfURL:receiptURL]; + if (!receipt) { /* No local receipt -- handle the error. */ + + [[NSUserDefaults standardUserDefaults] setBool:NO forKey:EQN_ACQ_IN_APP]; + self.bannerView = [EQNUtility ottieniBannerWithController:self position:YES]; + + } else { + + [[ServerRequest defaultServerConnectionSingleton] inviaRicevuta:receipt success:^(id result) { + + } failure:^(NSError *error) { + + }]; + + + } + + /* ... Send the receipt data to your server ... */ + + SWRevealViewController *revealViewController = self.revealViewController; + if ( revealViewController ) + { + [self.sidebarButton setTarget: self.revealViewController]; + [self.sidebarButton setAction: @selector( revealToggle: )]; + [self.view addGestureRecognizer:self.revealViewController.panGestureRecognizer]; + } + + + [self performSegueWithIdentifier:@"load_view_waiter" sender:self]; + + UIView *viewNavigationBar = [[UIView alloc] initWithFrame:CGRectMake(-18, 5, 190, 44)]; + UIImageView *imageLogo = [[UIImageView alloc] initWithFrame:CGRectMake(-18, 5, 38, 38)]; + imageLogo.image = [UIImage imageNamed:@"distquake_app_wave"]; + [viewNavigationBar addSubview:imageLogo]; + UILabel *textForNavi = [[UILabel alloc] initWithFrame:CGRectMake(25, 5, 140, 38)]; + textForNavi.text = NSLocalizedString(@"Rilevatore Terremoti", @"titolo navigation bar"); + textForNavi.adjustsFontSizeToFitWidth = YES; + [textForNavi setMinimumScaleFactor:12.0/[UIFont labelFontSize]]; + if(IS_IPHONE_5) + { + textForNavi.text = @""; + } + + [viewNavigationBar addSubview:textForNavi]; + self.navigationItem.titleView = viewNavigationBar; + [[UINavigationBar appearance] setBarTintColor:COLORE_BARRA_NAVIGAZIONE]; + [[UINavigationBar appearance] setTranslucent:NO]; + + [self registraNotifiche]; + + self.listaAzioniCollectView = @[NSLocalizedString(@"RETE SMARTPHONE", @"pulsanti orrizontale"), NSLocalizedString(@"SEGNALAZIONI", @"pulsanti orrizontale"), NSLocalizedString(@"RETI SISMICHE", @"pulsanti orrizontale"), NSLocalizedString(@"TSUNAMI", @"pulsanti orrizontale")/*, NSLocalizedString(@"CHAT", @"pulsanti orrizontale"), NSLocalizedString(@"E-MAIL/SMS", @"pulsanti orrizontale"), NSLocalizedString(@"ALTRO", @"pulsanti orrizontale"), NSLocalizedString(@"SPONSOR", @"pulsanti orrizontale")*/]; + + [self caricaChildrenViewController:[NSIndexPath indexPathForRow:0 inSection:0]]; + + if (![[NSUserDefaults standardUserDefaults] boolForKey:EQN_ACQ_IN_APP]){ + self.bannerView = [EQNUtility ottieniBannerWithController:self position:YES]; + } +} + +-(void)annullaAcquisitiInApp{ + + + [[NSUserDefaults standardUserDefaults] setBool:NO + forKey:@"com.finazzi.distquake.ProPrezzoPieno"]; + + [[NSUserDefaults standardUserDefaults] setBool:NO + forKey:@"com.finazzi.distquake.VersioneProScontata"]; + [[NSUserDefaults standardUserDefaults] setBool:NO + forKey:@"com.finazzi.distquake.Abbonamento10k.mensileAutomatico"]; + [[NSUserDefaults standardUserDefaults] setBool:NO + forKey:@"com.finazzi.distquake.Abbonamento10k.annualeAutomatico"]; + [[NSUserDefaults standardUserDefaults] setBool:NO + forKey:@"com.finazzi.distquake.Abbonamento10k.annualeAutomaticoScontato"]; + [[NSUserDefaults standardUserDefaults] setBool:NO + forKey:@"com.finazzi.distquake.Abbonamento100k.mensileAutomatico"]; + [[NSUserDefaults standardUserDefaults] setBool:NO + forKey:@"com.finazzi.distquake.Abbonamento100k.annualeAutomatico"]; + [[NSUserDefaults standardUserDefaults] setBool:NO + forKey:@"com.finazzi.distquake.Abbonamento100k.annualeAutomaticoscontato"]; + +} + +-(void)registraNotifiche{ + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(apriNotificheSismi) name:NOTIFICHE_SISMI object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(apriInformazioni:) name:INFORMAZIONI_APP_MENU object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(acquistiInApp:) name:IAPHelperPurchaseNotification object:nil]; + + +} + +-(void)apriImpostazioni{ + + // impostazioniEntiSismi + [self performSegueWithIdentifier:@"impostazioniEntiSismi" sender:nil]; + + +} + +-(void)caricaChildrenViewController:(NSIndexPath *)indexPath{ + + if (!self.mainStoreBoard) + self.mainStoreBoard = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]]; + + switch (indexPath.row) { + case 0:{ + if (!self.reteSmartphone) + self.reteSmartphone = (ReteSmartphone *)[self.mainStoreBoard instantiateViewControllerWithIdentifier:@"ReteSmartphone"]; + self.navigationItem.rightBarButtonItems = [EQNUtility getButtonForControllerTipe:reteSmartphoneController withController:self]; + + [self add:self.reteSmartphone]; + + } + break; + + case 1:{ + if (!self.segnalazioni) + self.segnalazioni = (SegnalazioniViewController *)[self.mainStoreBoard instantiateViewControllerWithIdentifier:@"SegnalazioniViewController"]; + self.navigationItem.rightBarButtonItems = [EQNUtility getButtonForControllerTipe:tsunamiControler withController:self]; + + [self add:self.segnalazioni]; + + } + break; + case 2:{ + if (!self.restiSismi) + self.restiSismi = (EQNRetiSismiViewController *)[self.mainStoreBoard instantiateViewControllerWithIdentifier:@"EQNRetiSismiViewController"]; + self.navigationItem.rightBarButtonItems = [EQNUtility getButtonForControllerTipe:reteSismicaController withController:self]; + + [self add:self.restiSismi]; + + } + break; + + case 3:{ + if (!self.tsunami) + self.tsunami = (TsunamiViewController *)[self.mainStoreBoard instantiateViewControllerWithIdentifier:@"TsunamiViewController"]; + self.navigationItem.rightBarButtonItems = [EQNUtility getButtonForControllerTipe:tsunamiControler withController:self]; + + [self add:self.tsunami]; + + } + break; + default: + break; + } + +} + +-(void)acquistiInApp:(NSNotification *)notification{ + + [self.bannerView removeFromSuperview]; + self.bannerView = nil; + +} + +-(void)apriImpostazioni:(NSNotification *)notifica{ + + [self performSegueWithIdentifier:@"apriImpostazioniReteSismiche" sender:nil]; +} + +-(void)sincronizza{ + + [[EQNManager defaultManager] sincronizza]; +} + +-(void)apriManu{ + + [self performSegueWithIdentifier:@"FiltriEntiSismici" sender:nil]; + +} + +-(void)clock{ + + +} + +-(void)apriNotificheSismi{ + + [self performSegueWithIdentifier:@"dettagliImpostazioni" sender:nil]; + +} + +-(void)apriInformazioni:(NSNotification *)notification{ + + [self performSegueWithIdentifier:@"apriInformazioni" sender:notification]; + +} +-(void)heart{ + + [self performSegueWithIdentifier:@"logViewController" sender:nil]; + +} +-(void)add:(UIViewController *)viewController{ + + [self addChildViewController:viewController]; + [self.containerView addSubview:viewController.view]; + viewController.view.frame = self.containerView.bounds; + viewController.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + [viewController didMoveToParentViewController:self]; +} + +-(void)remove:(NSIndexPath *)indexPath{ + + if (self.childViewControllers.count>0) { + + UIViewController *controller = self.childViewControllers[0]; + [controller willMoveToParentViewController:nil]; + [controller.view removeFromSuperview]; + [controller removeFromParentViewController]; + } + + [self caricaChildrenViewController:indexPath]; + + +} + + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +#pragma collection view + +-(NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView{ + + return 1; +} + +- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{ + + return self.listaAzioniCollectView.count; +} + +- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionView *)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section +{ + return 0.0f; // This is the minimum inter item spacing, can be more +} + + +- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{ + + UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"buttoneMenu" forIndexPath:indexPath]; + UILabel *titolo = (UILabel *)[cell viewWithTag:10]; + titolo.text = self.listaAzioniCollectView[indexPath.row]; + UILabel *indicatore = (UILabel *)[cell viewWithTag:11]; + if(indexPath.row == self.selectIndex.row) + indicatore.backgroundColor = [UIColor redColor]; + else + indicatore.backgroundColor = [UIColor clearColor]; + + + return cell; + +} + + +- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{ + + + [self selezionaItem:indexPath]; + +} +-(void)selezionaItem:(NSIndexPath *)indexPath{ + + self.selectIndex = indexPath; + if (indexPath.row == 0) + [self.reteSmartphone setUpView]; + + [self remove:indexPath]; + [self.collectionView reloadData]; + [self.collectionView scrollToItemAtIndexPath:indexPath atScrollPosition:UICollectionViewScrollPositionCenteredHorizontally animated:YES]; +} + +-(void)fetchNewDataWithCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler{ + + [[ServerRequest defaultServerConnectionSingleton] inviaInformazioniAlServerWithURL:[EQNGeneratoreURLServer urlPosizione] richiesta:posizione success:^(id result) { + + completionHandler(UIBackgroundFetchResultNewData); + + } failure:^(NSError *errore) { + + completionHandler(UIBackgroundFetchResultFailed); + + }]; + +} + +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. + if([segue.identifier isEqualToString:@"impostazioniEntiSismi"]){ + + MenuSelezioneEntiViewController *controller = (MenuSelezioneEntiViewController *)segue.destinationViewController; + controller.delegate = self; + + } + // + if([segue.identifier isEqualToString:@"FiltriEntiSismici"]){ + + + MenuFiltroEntiViewController *controller = (MenuFiltroEntiViewController *)segue.destinationViewController; + controller.delegate = self; + + } + if([segue.identifier isEqualToString:@"elencoRetiSismiche"]){ + + UINavigationController *nav = (UINavigationController *)segue.destinationViewController; + ElencoFiltroEntiTableViewController *controller = (ElencoFiltroEntiTableViewController *)nav.topViewController; + controller.delegate = self; + + } + + if([segue.identifier isEqualToString:@"apriInformazioni"]){ + + NSNotification *notification = (NSNotification *)sender; + NSDictionary *userInfo = notification.userInfo; + + UINavigationController *nav = (UINavigationController *)segue.destinationViewController; + InformazioniViewController *controller = (InformazioniViewController *)nav.topViewController; + controller.index = userInfo[@"indice"]; + + } +} + + +-(void)dealloc{ + + [[NSNotificationCenter defaultCenter] removeObserver:self]; + +} + +#pragma mark menuFilterDelegate + +-(void)inviaDati:(EQNfiltroEnti)filtro{ + + [[NSUserDefaults standardUserDefaults] setInteger:filtro forKey:IMPOSTAZIONE_TIPO_FILTRO_RETI_SISMICHEI]; + + [self.restiSismi aggiornaTabella:nil]; + +} + +-(void)apriElencoEnti{ + + [self performSegueWithIdentifier:@"elencoRetiSismiche" sender:nil]; + +} +// elencoRetiSismiche +#pragma mark Menu Lista Enti Delegate + +-(void)inviaDatiLista:(EQNfiltroEnti)filtro{ + + [[NSUserDefaults standardUserDefaults] setInteger:filtro forKey:IMPOSTAZIONE_TIPO_FILTRO_RETI_SISMICHEI]; + + [self.restiSismi aggiornaTabella:nil]; + +} +#pragma mark Menu Filtro Enti Delegate + +-(void)aggiornaFiltro{ + + [self.restiSismi aggiornaTabella:nil]; + +} + +@end diff --git a/Sources/Earthquake Network/ViewController/MenuFiltroEntiViewController.h b/Sources/Earthquake Network/ViewController/MenuFiltroEntiViewController.h new file mode 100644 index 0000000..e17955d --- /dev/null +++ b/Sources/Earthquake Network/ViewController/MenuFiltroEntiViewController.h @@ -0,0 +1,22 @@ +// +// MenuFiltroEntiViewController.h +// Earthquake Network +// +// Created by Luca Beretta on 09/03/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@protocol MenuFiltroEntiDelegate + +-(void)aggiornaFiltro; +@end + +@interface MenuFiltroEntiViewController : UIViewController +@property (strong, nonatomic) id delegate; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sources/Earthquake Network/ViewController/MenuFiltroEntiViewController.m b/Sources/Earthquake Network/ViewController/MenuFiltroEntiViewController.m new file mode 100644 index 0000000..c563375 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/MenuFiltroEntiViewController.m @@ -0,0 +1,120 @@ +// +// MenuFiltroEntiViewController.m +// Earthquake Network +// +// Created by Luca Beretta on 09/03/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import "MenuFiltroEntiViewController.h" +#import "PickerViewController.h" +#import "EQNUtility.h" +#import "FiltroEnti.h" + +@interface MenuFiltroEntiViewController () +@property (weak, nonatomic) IBOutlet UILabel *labelTitolo; +@property (weak, nonatomic) IBOutlet UILabel *labelMagnitudiMinima; +@property (weak, nonatomic) IBOutlet UITextField *textMagnitutiMinima; +@property (weak, nonatomic) IBOutlet UILabel *labelDistanzaMassima; +@property (weak, nonatomic) IBOutlet UITextField *textDistanzaMassima; +@property (weak, nonatomic) IBOutlet UILabel *labelEtaMassima; +@property (weak, nonatomic) IBOutlet UITextField *textEtaMassima; +@property (weak, nonatomic) IBOutlet UILabel *labelSismiForti; +@property (weak, nonatomic) IBOutlet UITextField *textSismiForti; +@property (weak, nonatomic) IBOutlet UIButton *buttonEsci; +@property (nonatomic, strong) PickerViewController *pikerMagnitudoMinima; +@property (nonatomic, strong) PickerViewController *pikerViewDistanza; +@property (nonatomic, strong) PickerViewController *etaMassima; +@property (nonatomic, strong) PickerViewController *pikerViewforti; + +@end + +@implementation MenuFiltroEntiViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. + + self.labelTitolo.text = NSLocalizedString(@"Filtro", @""); + self.labelMagnitudiMinima.text = NSLocalizedString(@"Magnitudo minima", @""); + self.labelDistanzaMassima.text = NSLocalizedString(@"Distanza massima", @""); + self.labelEtaMassima.text = NSLocalizedString(@"Età massima", @""); + self.labelSismiForti.text = NSLocalizedString(@"Mostra sismi forti a qualsiasi distanza se di", @""); + [self.buttonEsci setTitle:NSLocalizedString(@"Esci", @"") forState:UIControlStateNormal]; + [self.buttonEsci addTarget:self action:@selector(chiudi:) forControlEvents:UIControlEventTouchUpInside]; + + self.pikerMagnitudoMinima = [[PickerViewController alloc] initWithNibName:@"PickerViewController" bundle:nil dati:@[@"2.0", @"3.0", @"3.5", @"4.0", @"4.5", @"5.5", @"6.0", @"6.5", @"7.5"]]; + self.pikerMagnitudoMinima.delegate = self; + self.textMagnitutiMinima.inputView = self.pikerMagnitudoMinima.view; + + self.pikerViewDistanza = [[PickerViewController alloc] initWithNibName:@"PickerViewController" bundle:nil dati:[EQNUtility arrayRaggioSismi]]; + self.pikerViewDistanza.delegate = self; + self.textDistanzaMassima.inputView = self.pikerViewDistanza.view; + + self.etaMassima = [[PickerViewController alloc] initWithNibName:@"PickerViewController" bundle:nil dati:@[NSLocalizedString(@"Un giorno", @""), NSLocalizedString(@"Dodici ore", @""),NSLocalizedString(@"Sei ore", @""),NSLocalizedString(@"Due ore", @""),NSLocalizedString(@"Un ora", @""), NSLocalizedString(@"Dieci minuti", @"")]]; + self.etaMassima.delegate = self; + self.textEtaMassima.inputView = self.etaMassima.view; + + self.pikerViewforti = [[PickerViewController alloc] initWithNibName:@"PickerViewController" bundle:nil dati:@[@"5.5", @"6.0", @"6.5", @"7.5"]]; + self.pikerViewforti.delegate = self; + self.textSismiForti.inputView = self.pikerViewforti.view; + + self.textMagnitutiMinima.text = [FiltroEnti defaultFiltro].magnitudoMinima; + self.textDistanzaMassima.text = [FiltroEnti defaultFiltro].distanzaMassima; + self.textEtaMassima.text = [FiltroEnti defaultFiltro].etaMassima; + self.textSismiForti.text = [NSString stringWithFormat:@"%@ >= %@", NSLocalizedString(@"Magnitudo", @"") , [FiltroEnti defaultFiltro].sismiForti]; + +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +-(void)chiudi:(id)sender{ + + [self.delegate aggiornaFiltro]; + [self dismissViewControllerAnimated:YES completion:nil]; + +} + +# pragma mark pikerView string + +-(void)inviaDati:(NSDictionary *)elementi{ + + NSString *elemento = elementi[@"elemento"]; + // NSNumber *indice = elementi[@"indice"]; + + if (self.textMagnitutiMinima.isFirstResponder){ + self.textMagnitutiMinima.text = elemento; + } + if (self.textDistanzaMassima.isFirstResponder){ + self.textDistanzaMassima.text = elemento; + } + if (self.textEtaMassima.isFirstResponder){ + self.textEtaMassima.text = elemento; + } + if (self.textSismiForti.isFirstResponder){ + self.textSismiForti.text = [NSString stringWithFormat:@"%@ >= %@", NSLocalizedString(@"Magnitudo", @"") ,elemento]; + [FiltroEnti defaultFiltro].sismiForti = elemento; + + } + [self.view endEditing:YES]; + + [FiltroEnti defaultFiltro].magnitudoMinima = self.textMagnitutiMinima.text; + [FiltroEnti defaultFiltro].distanzaMassima = self.textDistanzaMassima.text; + [FiltroEnti defaultFiltro].etaMassima = self.textEtaMassima.text; + [[FiltroEnti defaultFiltro] saveFiltro]; +} + +-(void)chiudiView{ + + [self.view endEditing:YES]; +} + +@end diff --git a/Sources/Earthquake Network/ViewController/MenuSelezioneEntiViewController.h b/Sources/Earthquake Network/ViewController/MenuSelezioneEntiViewController.h new file mode 100644 index 0000000..8d6a54e --- /dev/null +++ b/Sources/Earthquake Network/ViewController/MenuSelezioneEntiViewController.h @@ -0,0 +1,30 @@ +// +// MenuSelezioneEntiViewController.h +// Earthquake Network +// +// Created by Luca Beretta on 06/02/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import +#import "costanti.h" + +NS_ASSUME_NONNULL_BEGIN +@protocol MenuSelezioneEntiDelegate + +-(void)inviaDati:(EQNfiltroEnti )filtro; +-(void)apriElencoEnti; + +@end + +@interface MenuSelezioneEntiViewController : UIViewController +@property (weak, nonatomic) IBOutlet UITextField *textNazione; +@property (strong, nonatomic) id delegate; + +- (IBAction)selezionaNazione:(id)sender; +- (IBAction)selezionaEnte:(id)sender; +- (IBAction)annulla:(id)sender; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sources/Earthquake Network/ViewController/MenuSelezioneEntiViewController.m b/Sources/Earthquake Network/ViewController/MenuSelezioneEntiViewController.m new file mode 100644 index 0000000..b4e2d40 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/MenuSelezioneEntiViewController.m @@ -0,0 +1,123 @@ +// +// MenuSelezioneEntiViewController.m +// Earthquake Network +// +// Created by Luca Beretta on 06/02/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import "MenuSelezioneEntiViewController.h" +#import "PickerViewController.h" +#import "costanti.h" +#import "EQNUtility.h" + +@interface MenuSelezioneEntiViewController () +@property (nonatomic, strong) PickerViewController *pikerViewNazione; +@property (nonatomic, assign) EQNNazioneSelect indice; +@property (nonatomic, assign) EQNfiltroEnti tipoFiltro; + +@end + +@implementation MenuSelezioneEntiViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. + + NSArray *nazioniList = [EQNUtility arrayNazioni]; + + self.pikerViewNazione = [[PickerViewController alloc] initWithNibName:@"PickerViewController" bundle:nil dati:nazioniList]; + self.pikerViewNazione.delegate = self; + self.textNazione.inputView = self.pikerViewNazione.view; + + if ([[NSUserDefaults standardUserDefaults] integerForKey:IMPOSTAZIONE_NAZIONE_RETI_SISMICHEI]) { + self.textNazione.text = nazioniList[[[NSUserDefaults standardUserDefaults] integerForKey:IMPOSTAZIONE_NAZIONE_RETI_SISMICHEI]]; + } +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +- (IBAction)selezionaNazione:(id)sender { + + if (self.textNazione.text.length == 0) { + + UIAlertController *messaggio = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Attenzione ", @"") message:NSLocalizedString(@"Non hai seleziato nessuna nazione", @"") preferredStyle:UIAlertControllerStyleAlert]; + UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { + + [self.textNazione becomeFirstResponder]; + }]; + + [messaggio addAction:defaultAction]; + [self presentViewController:messaggio animated:YES completion:nil]; + + + }else{ + + NSArray *enti = [EQNUtility arrayEnti]; + [[NSUserDefaults standardUserDefaults] setInteger:self.indice forKey:IMPOSTAZIONE_NAZIONE_RETI_SISMICHEI]; + + if (self.indice == 0) { + + [[NSUserDefaults standardUserDefaults] setObject:enti forKey:IMPOSTAZIONE_ENTI_RETI_SISMICHEI]; + }else{ + + NSArray *ente = @[enti[self.indice]]; + [[NSUserDefaults standardUserDefaults] setObject:ente forKey:IMPOSTAZIONE_ENTI_RETI_SISMICHEI]; + + } + + self.tipoFiltro = nazione; + [self chiudi]; + } +} + +- (IBAction)selezionaEnte:(id)sender { + + self.tipoFiltro = enti; + [self.delegate apriElencoEnti]; + [self annulla:sender]; + +} + +- (IBAction)annulla:(id)sender { + + // self.tipoFiltro = annulla; + [self dismissViewControllerAnimated:YES completion:nil]; + +} + +-(void)chiudi{ + + [self.delegate inviaDati:self.tipoFiltro]; + [self dismissViewControllerAnimated:YES completion:nil]; + +} + +# pragma mark pikerView string + +-(void)inviaDati:(NSDictionary *)elementi{ + + NSString *elemento = elementi[@"elemento"]; + self.indice = [elementi[@"indice"] intValue]; + self.textNazione.text = elemento; + [self.view endEditing:YES]; + +} + +-(void)chiudiView{ + + [self.view endEditing:YES]; + +} + + +@end diff --git a/Sources/Earthquake Network/ViewController/PrioritaViewController.h b/Sources/Earthquake Network/ViewController/PrioritaViewController.h new file mode 100644 index 0000000..479490f --- /dev/null +++ b/Sources/Earthquake Network/ViewController/PrioritaViewController.h @@ -0,0 +1,13 @@ +// +// PrioritaViewController.h +// Earthquake Network +// +// Created by Luca Beretta on 16/10/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import + +@interface PrioritaViewController : UIViewController + +@end diff --git a/Sources/Earthquake Network/ViewController/PrioritaViewController.m b/Sources/Earthquake Network/ViewController/PrioritaViewController.m new file mode 100644 index 0000000..6dadc6b --- /dev/null +++ b/Sources/Earthquake Network/ViewController/PrioritaViewController.m @@ -0,0 +1,120 @@ +// +// PrioritaViewController.m +// Earthquake Network +// +// Created by Luca Beretta on 16/10/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "PrioritaViewController.h" +#import "ServerRequest.h" +#import "Costanti.h" + +@interface PrioritaViewController () + +@property (nonatomic, strong) NSArray *lista; +@property (nonatomic, strong) IBOutlet UITableView *tableView; +@property (nonatomic, strong) NSString *top_10k_available; +@property (nonatomic, strong) NSString *top_100k_available; + +@end + +@implementation PrioritaViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. + [self scaricautentiDisponibili]; + + UIView *viewNavigationBar = [[UIView alloc] initWithFrame:CGRectMake(-18, 5, 150, 44)]; + UIImageView *imageLogo = [[UIImageView alloc] initWithFrame:CGRectMake(-18, 5, 38, 38)]; + imageLogo.image = [UIImage imageNamed:@"distquake_app_wave"]; + [viewNavigationBar addSubview:imageLogo]; + UILabel *textForNavi = [[UILabel alloc] initWithFrame:CGRectMake(25, 5, 160, 38)]; + textForNavi.text = NSLocalizedString(@"Rilevatore Terremoti", @"titolo navigation bar"); + [viewNavigationBar addSubview:textForNavi]; + self.navigationItem.titleView = viewNavigationBar; + +} + +-(void)scaricautentiDisponibili{ + + [[ServerRequest defaultServerConnectionSingleton] inviaInformazioniAlServerWithURL:[NSURL URLWithString:URL_SERVER_UTENTI_DISPONIBILI] richiesta:utentiDisponibili success:^(id result) { + + NSArray *disp = result; + for (NSDictionary *dict in disp) { + + if ([dict objectForKey:@"top_10k_available"]) { + self.top_10k_available = [dict objectForKey:@"top_10k_available"]; + } + + if ([dict objectForKey:@"top_100k_available"]) { + self.top_100k_available = [dict objectForKey:@"top_100k_available"]; + } + + } + + self.lista = @[@"1",@"2"]; + dispatch_async(dispatch_get_main_queue(), ^{ + [self.tableView reloadData]; + }); + + } failure:^(NSError * error) { + + }]; + +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} +#pragma table view + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ + + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ + + return self.lista.count; +} + +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ + + switch (indexPath.row) { + case 0: + return 126; + break; + default: + return 372; + break; + } +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ + + // modalita base + switch (indexPath.row) { + case 0:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"sottoscrizioniAttive" forIndexPath:indexPath]; + return cell; + } + break; + default:{ + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"servizioPriorità" forIndexPath:indexPath]; + + UILabel *descrizione = (UILabel *)[cell viewWithTag:100]; + descrizione.text = [NSString stringWithFormat:@"Top 10K: %@ %@\n\nTop 100K: %@ %@", self.top_10k_available, NSLocalizedString(@"sottoscrizioni ancora disponibiliper essere allertato in meno di 1 secondo dal rilevamento del sistema", @"descrizione Top 10K"), self.top_100k_available, NSLocalizedString(@"sottoscrizioni ancora disponibiliper essere allertato in meno di 5 secondi dal rilevamento del sistema", @"descrizione Top 100K")]; + + return cell; + } + break; + } + +} + + +@end diff --git a/Sources/Earthquake Network/ViewController/ReteSmartphone.h b/Sources/Earthquake Network/ViewController/ReteSmartphone.h new file mode 100644 index 0000000..443a219 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/ReteSmartphone.h @@ -0,0 +1,16 @@ +// +// ViewController.h +// Earthquake Network +// +// Created by Luca Beretta on 12/09/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import + +@interface ReteSmartphone : UIViewController +-(void)fetchNewDataWithCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler; +-(void)setUpView; + +@end + diff --git a/Sources/Earthquake Network/ViewController/ReteSmartphone.m b/Sources/Earthquake Network/ViewController/ReteSmartphone.m new file mode 100644 index 0000000..9a6db2d --- /dev/null +++ b/Sources/Earthquake Network/ViewController/ReteSmartphone.m @@ -0,0 +1,584 @@ +// +// ViewController.m +// Earthquake Network +// +// Created by Luca Beretta on 12/09/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "ReteSmartphone.h" +#import "EQNCalibrazione.h" +#include "math.h" +#import +#import "Costanti.h" +#import "ServerRequest.h" +#import "EQNGeneratoreURLServer.h" +#import "SWRevealViewController.h" +#import "EQNManager.h" +#import "EQNReteSmartphone.h" +#import "PastquakesDettagliMappa.h" +#import "PastquakesAnnotation.h" +#import "EQNUser.h" +#import "AppDelegate.h" +#import "ServerRequest.h" +#import "EQNAreaCheck.h" +@import StoreKit; + +@import GoogleMobileAds; + +@interface ReteSmartphone () + +@property (assign, nonatomic) CMAcceleration acceleration; +@property (strong, nonatomic) CMMotionManager *motionManager; +@property (strong, nonatomic) NSOperationQueue *queue; +@property (nonatomic, strong) NSMutableArray *bufferAccelerometro; +@property (nonatomic, strong) NSTimer *timer; +//@property (nonatomic, strong) NSArray *listaAzioniCollectView; +@property (nonatomic, strong) NSMutableArray *listaItemTableView; +@property (nonatomic, strong) IBOutlet UIBarButtonItem *sidebarButton; +@property (nonatomic, strong) IBOutlet UICollectionView *collectionView; +@property (nonatomic, strong) IBOutlet UITableView *tableView; +@property (nonatomic, assign) BOOL isAvanzata; +@property (nonatomic, assign) BOOL isNotificaAttiva; +@property (nonatomic, strong) NSString *testoPerUtenti; +@property(nonatomic, strong) GADBannerView *bannerView; +@property (weak, nonatomic) IBOutlet NSLayoutConstraint *fooTable; + +@end + +@implementation ReteSmartphone + +- (void)viewDidLoad { + [super viewDidLoad]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(setUpView) name:NOTIFICA_DOWNLOAD_TERMINATO object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(setUpView) name:IAPHelperPurchaseNotification object:nil]; + + SWRevealViewController *revealViewController = self.revealViewController; + if ( revealViewController ) + { + [self.sidebarButton setTarget: self.revealViewController]; + [self.sidebarButton setAction: @selector( revealToggle: )]; + [self.view addGestureRecognizer:self.revealViewController.panGestureRecognizer]; + } + + [self.tableView setContentInset:UIEdgeInsetsMake(20,0,0,0)]; + + UIView *viewNavigationBar = [[UIView alloc] initWithFrame:CGRectMake(-18, 5, 150, 44)]; + UIImageView *imageLogo = [[UIImageView alloc] initWithFrame:CGRectMake(-18, 5, 38, 38)]; + imageLogo.image = [UIImage imageNamed:@"distquake_app_wave"]; + [viewNavigationBar addSubview:imageLogo]; + UILabel *textForNavi = [[UILabel alloc] initWithFrame:CGRectMake(25, 5, 130, 38)]; + textForNavi.text = NSLocalizedString(@"Rilevatore Terremoti", @"titolo navigation bar"); + [viewNavigationBar addSubview:textForNavi]; + self.navigationItem.titleView = viewNavigationBar; + [[UINavigationBar appearance] setBarTintColor:COLORE_BARRA_NAVIGAZIONE]; + [[UINavigationBar appearance] setTranslucent:NO]; + + + AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; + appDelegate.reteSmartphone = self; + + self.listaItemTableView = [@[] mutableCopy]; + /* + [[ServerRequest defaultServerConnectionSingleton] inviaInformazioniAlServerWithURL:[NSURL URLWithString:URL_LINK_MESSAGGIO] richiesta:downloadDati success:^(id result) { + self.testoPerUtenti = result[0][@"message"]; + + [self performSelectorOnMainThread:@selector(setUpView) withObject:nil waitUntilDone:YES]; + + } failure:^(NSError * error) { + + // NSLog(@"Errore scaricaDatiReteSmartphone %@", error); + + }];*/ + + NSString *appId = @"https://itunes.apple.com/app/id1449893235"; + + self.testoPerUtenti = [NSString stringWithFormat:@"%@ %@ %@", NSLocalizedString(@"testo utenti1" , @""), appId, NSLocalizedString(@"testo utenti2" , @"")]; + + [self setUpView]; + + // self.bannerView = [EQNUtility ottieniBannerWithController:self]; + +} + + +-(void)setUpView{ + + NSDate *date = [[NSUserDefaults standardUserDefaults] objectForKey:NOTIFICHE_RETE_SMARTPHONE_DATA_NOTIFICA]; + if (date) { + if ([EQNUtility getDifferenceMinute:date] < TEMPO_VISUALIZZAZIONE_NOTIFICA) + self.isNotificaAttiva = YES; + else{ + self.isNotificaAttiva = NO; + [[NSUserDefaults standardUserDefaults] removeObjectForKey:NOTIFICHE_RETE_SMARTPHONE_DATA_NOTIFICA]; + [[NSUserDefaults standardUserDefaults] synchronize]; + + } + + } + + [self aggiornaTabella:nil]; +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +-(void)aggiornaTabella:(NSNotification *)notifica{ + + self.listaItemTableView = [@[@"Allerta sismica",/* NSLocalizedString(@"Dispositivo affidabile", @"item tabelle") ,*/ NSLocalizedString(@"Sismi rilevati da smartphone", @"item tabelle"), NSLocalizedString(@"Rete smartphone", @"item tabelle"), NSLocalizedString(@"Lista priorità - NUOVA!", @"item tabelle"), NSLocalizedString(@"Versione PRO", @"item tabelle"), NSLocalizedString(@"messaggio per utenti", @"item tabelle")] mutableCopy]; + + if([[NSUserDefaults standardUserDefaults] objectForKey:AQUISTO_PRO] || [[NSUserDefaults standardUserDefaults] objectForKey:AQUISTO_PRO_SCONTATO]){ + self.fooTable.constant = 0; + [self.listaItemTableView removeObject:NSLocalizedString(@"Versione PRO", @"item tabelle")]; + + } + dispatch_async(dispatch_get_main_queue(), ^{ + + [self.tableView reloadData]; //reload table view + }); + +} + +-(void)apriMappa:(id)sender{ + + [self performSegueWithIdentifier:@"dettagliMappa" sender:sender]; +} +-(void)apriPriorita:(id)sender{ + + [self performSegueWithIdentifier:@"servizioPriorità" sender:sender]; +} +-(void)apriVersionePRO:(id)sender{ + + [self performSegueWithIdentifier:@"passaVersionePro" sender:sender]; +} + +-(void)cambiaVista:(id)sender{ + + UIButton *buttonSender = (UIButton *)sender; + + if(buttonSender.tag == 20) + self.isAvanzata = YES; + + if(buttonSender.tag == 30) + self.isAvanzata = NO; + + [self.tableView reloadData]; +} + +-(void)chiudiNotifica:(id)sender{ + + [[NSUserDefaults standardUserDefaults] removeObjectForKey:NOTIFICHE_RETE_SMARTPHONE_DATA_NOTIFICA]; + [[NSUserDefaults standardUserDefaults] removeObjectForKey:NOTIFICHE_RETE_SMARTPHONE_DIZIONARIO_NOTIFICA]; + [[NSUserDefaults standardUserDefaults] synchronize]; + self.isNotificaAttiva = NO; + + [self.tableView reloadData]; + +} + +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + + if ([segue.identifier isEqualToString:@"dettagliMappa"]) { + + UINavigationController *controller = (UINavigationController *)segue.destinationViewController; + PastquakesDettagliMappa *dettagliMappa = (PastquakesDettagliMappa *)controller.topViewController; + dettagliMappa.tipoMappa = reteSmartphone; + + } + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +#pragma table view + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ + + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ + + return self.listaItemTableView.count; +} + +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ + + switch (indexPath.row) { + case 0: + if (self.isNotificaAttiva) + return 480; + return 100; + break; + // case 1: + // return 50; + break; + case 1: + return 124; + break; + case 2: + { + if(self.isAvanzata) + return 542; + + return 140; + } + break; + case 3: + return 127; + break; + case 4:{ + if (self.listaItemTableView.count == 5) + return 250; + return 127; + } + break; + case 5:{ + if (self.listaItemTableView.count == 6) + return 250; + return 127; + } + break; + default: + return 127; + break; + } +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ + + // modalita base + switch (indexPath.row) { + case 0:{ + if (self.isNotificaAttiva) { + + NSDictionary *info = [EQNUtility readDictyWithCustomObjFromUserDefaults:NOTIFICHE_RETE_SMARTPHONE_DIZIONARIO_NOTIFICA]; + int intensita = [info[@"intensity"] intValue]; + UIColor *backgroudColor; + UIColor *buttonColor; + UIColor *buttonBackroundColor; + + switch (intensita) { + case 0: + backgroudColor = COLORE_CELLA_MAGNITUTE_LEGGERA; + buttonBackroundColor = COLORE_CELLA_MAGNITUTE_LEGGERA_ETI; + buttonColor = COLORE_CELLA_MAGNITUTE_LEGGERA_TESTO; + + break; + case 1: + backgroudColor = COLORE_CELLA_MAGNITUTE_MEDIA; + buttonBackroundColor = COLORE_CELLA_MAGNITUTE_MEDIA_ETI; + buttonColor = COLORE_CELLA_MAGNITUTE_MEDIA_TESTO; + + break; + case 2: + backgroudColor = COLORE_CELLA_MAGNITUTE_FORTE; + buttonBackroundColor = COLORE_CELLA_MAGNITUTE_FORTE_ETI; + buttonColor = COLORE_CELLA_MAGNITUTE_FORTE_TESTO; + break; + default: + break; + } + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellNotifica" forIndexPath:indexPath]; + + UIView *containerView = [cell viewWithTag:1]; + containerView.backgroundColor = backgroudColor; + + NSLog(@"Info %@", info); + + NSString *titoloString = info[@"aps"][@"alert"][@"title-loc-key"]; + NSArray *arrayArgs = info[@"aps"][@"alert"][@"loc-args"]; + NSString *bodyString = [NSString stringWithFormat:NSLocalizedString(info[@"aps"][@"alert"][@"loc-key"], @""), info[@"aps"][@"alert"][@"loc-args"][0]]; + if (arrayArgs.count == 0){ + NSString *bodyString1 = NSLocalizedString(info[@"aps"][@"alert"][@"loc-key"], @""); + bodyString = [bodyString1 substringToIndex:[bodyString1 length]-2]; + } + + UILabel *titolo = (UILabel *)[containerView viewWithTag:2]; + titolo.text = NSLocalizedString(titoloString, @""); + titolo.textColor = buttonColor; + + + + UIButton *button = (UIButton *)[containerView viewWithTag:3]; + button.layer.cornerRadius = button.frame.size.width/2; + [button addTarget:self action:@selector(chiudiNotifica:) forControlEvents:UIControlEventTouchUpInside]; + button.backgroundColor = buttonColor; + + UILabel *dettagli = (UILabel *)[containerView viewWithTag:4]; + dettagli.text = bodyString; + + MKMapView *mappa = (MKMapView *)[containerView viewWithTag:5]; + CLLocation *coordinate = [[CLLocation alloc] initWithLatitude:[info[@"latitude"] doubleValue] longitude:[info[@"longitude"] doubleValue]]; + MKCoordinateSpan span = MKCoordinateSpanMake(10.5, 10.5); + MKCoordinateRegion region = MKCoordinateRegionMake(coordinate.coordinate, span); + mappa.delegate = self; + [mappa setCenterCoordinate:coordinate.coordinate animated:NO]; + [mappa setRegion:region animated:YES]; + mappa.scrollEnabled = NO; + + PastquakesAnnotation *pasquaAnnotation = [[PastquakesAnnotation alloc] initWithTitle:info[@"title"] location:coordinate.coordinate intensita:[info[@"intensity"] intValue]]; + + [mappa addAnnotation:pasquaAnnotation]; + + UIButton *condividi = (UIButton *)[containerView viewWithTag:6]; + condividi.layer.borderWidth = 1; + condividi.layer.borderColor = [UIColor blackColor].CGColor; + condividi.layer.cornerRadius = 5; + condividi.backgroundColor = buttonBackroundColor; + [condividi setTitle:NSLocalizedString(@"CONDIVIDI", @"titolo pulsante notifica rete smartphone") forState:UIControlStateNormal]; + [condividi addTarget:self action:@selector(share:) forControlEvents:UIControlEventTouchUpInside]; + + UIButton *votaApp = (UIButton *)[containerView viewWithTag:7]; + votaApp.layer.borderWidth = 1; + votaApp.layer.borderColor = [UIColor blackColor].CGColor; + votaApp.layer.cornerRadius = 5; + votaApp.backgroundColor = buttonBackroundColor; + [votaApp setTitle:NSLocalizedString(@"VOTA L'APP", @"titolo pulsante notifica rete smartphone") forState:UIControlStateNormal]; + [votaApp addTarget:self action:@selector(votaApp:) forControlEvents:UIControlEventTouchUpInside]; + + UIButton *twitter = (UIButton *)[containerView viewWithTag:8]; + twitter.layer.borderWidth = 1; + twitter.layer.borderColor = [UIColor blackColor].CGColor; + twitter.layer.cornerRadius = 5; + twitter.backgroundColor = buttonBackroundColor; + [twitter setTitle:NSLocalizedString(@"VEDI IN TWITTER", @"titolo pulsante notifica rete smartphone") forState:UIControlStateNormal]; + [twitter addTarget:self action:@selector(apriTwitter:) forControlEvents:UIControlEventTouchUpInside]; + + UILabel *NOTE = (UILabel *)[containerView viewWithTag:9]; + NOTE.text = NSLocalizedString(@"La magnitudo sarà calcola e cominicata dalla rete sismica nazionale e comparirà nella sezione Reti Sismiche dell'app.", @""); + + return cell; + + } + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell_1" forIndexPath:indexPath]; + return cell; + } + break; + /* case 1:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell_2" forIndexPath:indexPath]; + return cell; + } + break;*/ + case 1:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell_3" forIndexPath:indexPath]; + UILabel *ultime24h = (UILabel *)[cell viewWithTag:10]; + ultime24h.text = [EQNManager defaultManager].rete_smartphone.eq; + UILabel *totali = (UILabel *)[cell viewWithTag:20]; + totali.text = [EQNManager defaultManager].rete_smartphone.eq_p; + UIButton *mappaButton = (UIButton *)[cell viewWithTag:30]; + [mappaButton addTarget:self action:@selector(apriMappa:) forControlEvents:UIControlEventTouchDown]; + return cell; + } + break; + case 2:{ + if(self.isAvanzata){ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell_4_Avv" forIndexPath:indexPath]; + UILabel *smartphoneAttivi = (UILabel *)[cell viewWithTag:10]; + smartphoneAttivi.text = [[EQNManager defaultManager].rete_smartphone.green stringValue]; + + UIButton *avanzata = (UIButton *)[cell viewWithTag:30]; + [avanzata addTarget:self action:@selector(cambiaVista:) forControlEvents:UIControlEventTouchDown]; + + UIWebView *mappaLocale = (UIWebView *)[cell viewWithTag:100]; + + NSString *urlAddress = @"https://fusiontables.googleusercontent.com/embedviz?viz=MAP&q=select+col2+from+1nEJRfnVQzL0qNA1pDc2nPDXRmDCy9Gg11aEhAp2G&h=false&lat=0&lng=0&z=2&t=1&l=col2&y=2&tmplt=3"; + + if ([EQNUser defaultUser].lastPosition) + urlAddress = [NSString stringWithFormat:@"https://fusiontables.googleusercontent.com/embedviz?viz=MAP&q=select+col2+from+1nEJRfnVQzL0qNA1pDc2nPDXRmDCy9Gg11aEhAp2G&h=false&lat=%f&lng=%f&z=2&t=1&l=col2&y=2&tmplt=3", [EQNUser defaultUser].lastPosition.coordinate.latitude, [EQNUser defaultUser].lastPosition.coordinate.latitude]; + + + NSURL *url = [NSURL URLWithString:urlAddress]; + NSURLRequest *requestObj = [NSURLRequest requestWithURL:url]; + [mappaLocale loadRequest:requestObj]; + + UIWebView *mappaGlobale = (UIWebView *)[cell viewWithTag:110]; + + urlAddress = @"https://fusiontables.google.com/embedviz?q=select+col0+from+1OAR6ifIK-zOkbQEh1Zr7uzDj6fTp5x1uS2fZDQ0i&viz=MAP&h=false&lat=0&lng=0&t=1&z=2&l=col0&y=2&tmplt=2&hml=KML"; + + if ([EQNUser defaultUser].lastPosition) + urlAddress = [NSString stringWithFormat:@"https://fusiontables.google.com/embedviz?q=select+col0+from+1OAR6ifIK-zOkbQEh1Zr7uzDj6fTp5x1uS2fZDQ0i&viz=MAP&h=false&lat=%f&lng=%f&t=1&z=2&l=col0&y=2&tmplt=2&hml=KML", [EQNUser defaultUser].lastPosition.coordinate.latitude, [EQNUser defaultUser].lastPosition.coordinate.latitude]; + + NSURL *url2 = [NSURL URLWithString:urlAddress]; + NSURLRequest *requestObj2 = [NSURLRequest requestWithURL:url2]; + [mappaGlobale loadRequest:requestObj2]; + + return cell; + + } + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell_4" forIndexPath:indexPath]; + UILabel *smartphoneAttivi = (UILabel *)[cell viewWithTag:10]; + smartphoneAttivi.text = [[EQNManager defaultManager].rete_smartphone.green stringValue]; + + UIButton *avanzata = (UIButton *)[cell viewWithTag:20]; + [avanzata addTarget:self action:@selector(cambiaVista:) forControlEvents:UIControlEventTouchDown]; + avanzata.hidden = YES; + avanzata.enabled = NO; + UIButton *pulsante = (UIButton *)[cell viewWithTag:200]; + pulsante.layer.cornerRadius = 5; + pulsante.layer.borderWidth = 1; + pulsante.layer.borderColor = [UIColor blackColor].CGColor; + [pulsante addTarget:self action:@selector(visualizzaCopertura) forControlEvents:UIControlEventTouchUpInside]; + + + return cell; + } + break; + case 3:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell_5" forIndexPath:indexPath]; + + UIButton *buttonPriorita = (UIButton *)[cell viewWithTag:10]; + [buttonPriorita addTarget:self action:@selector(apriPriorita:) forControlEvents:UIControlEventTouchDown]; + return cell; + } + break; + case 4:{ + + if (self.listaItemTableView.count == 5){ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell_7" forIndexPath:indexPath]; + + UITextView *textView = (UITextView *)[cell viewWithTag:12]; + textView.text = self.testoPerUtenti; + + UIButton *condividi = (UIButton *)[cell viewWithTag:100]; + [condividi addTarget:self action:@selector(share:) forControlEvents:UIControlEventTouchUpInside]; + + return cell; + }else{ + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell_6" forIndexPath:indexPath]; + + UIButton *buttonPRO = (UIButton *)[cell viewWithTag:10]; + [buttonPRO addTarget:self action:@selector(apriVersionePRO:) forControlEvents:UIControlEventTouchDown]; + return cell; + } + + } + break; + case 5:{ + if (self.listaItemTableView.count == 6){ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell_7" forIndexPath:indexPath]; + + UITextView *textView = (UITextView *)[cell viewWithTag:12]; + textView.text = self.testoPerUtenti; + + UIButton *condividi = (UIButton *)[cell viewWithTag:100]; + [condividi addTarget:self action:@selector(share:) forControlEvents:UIControlEventTouchUpInside]; + + return cell; + }else{ + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell_6" forIndexPath:indexPath]; + + UIButton *buttonPRO = (UIButton *)[cell viewWithTag:10]; + [buttonPRO addTarget:self action:@selector(apriVersionePRO:) forControlEvents:UIControlEventTouchDown]; + return cell; + } + } + break; + default:{ + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell_1" forIndexPath:indexPath]; + return cell; + } + break; + } + + +} + +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ + + switch (indexPath.row) { + case 3: + [self apriPriorita:nil]; + break; + + default: + break; + } + +} +-(void)fetchNewDataWithCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler{ + + dispatch_async(dispatch_get_main_queue(), ^{ + + [self setUpView]; + }); + completionHandler(UIBackgroundFetchResultNewData); + +} + +-(MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id)annotation{ + + + if ([annotation isKindOfClass:[PastquakesAnnotation class]]) { + PastquakesAnnotation *anLocation = (PastquakesAnnotation *)annotation; + MKAnnotationView *annotationView = [mapView dequeueReusableAnnotationViewWithIdentifier:IDENTIFIER_ANNOTATION_PASTQUAKES]; + if (annotationView == nil) + annotationView = anLocation.annotationView; + else + annotationView.annotation = anLocation; + + return annotationView; + } + else + return nil; +} + +- (void)share:(id)sender { + + NSString *appName = [NSProcessInfo processInfo].processName; + NSString *url=@"https://itunes.apple.com/app/id1449893235?mt=8"; + NSString * title =[NSString stringWithFormat:@"%@%@ %@",NSLocalizedString(@"Scarica ", @""),appName,url]; + + [self presentViewController: [EQNUtility shareFileWithPath:title] animated:YES completion:^{}]; + + +} + +-(void)visualizzaCopertura{ + + [[EQNManager defaultManager] sincronizza]; + EQNAreaCheck *areaCheck = [EQNManager defaultManager].area_check; + + UIAlertController * alertController = [UIAlertController + alertControllerWithTitle:NSLocalizedString(@"Copertura" , @"") + message:[NSString stringWithFormat:@"%@ %@ %@", NSLocalizedString(@"Dispositivi totali", @""), areaCheck.total, NSLocalizedString(@"Dispositivi attivi", @"")] + preferredStyle:UIAlertControllerStyleAlert]; + + [alertController addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"OK" ,@"") + style:UIAlertActionStyleDefault + handler:nil]]; + + [self presentViewController:alertController animated:YES completion:nil]; +} + +-(void)apriTwitter:(id)sender{ + + // TWITTER_LINK + + UIApplication *mySafari = [UIApplication sharedApplication]; + NSURL *myURL = [[NSURL alloc]initWithString:TWITTER_LINK]; + [mySafari openURL:myURL options:@{} completionHandler:nil]; + +} + +-(void)votaApp:(id)sender{ + + [SKStoreReviewController requestReview]; +} + +-(void)dealloc{ + + [[NSNotificationCenter defaultCenter] removeObserver:self]; + +} +@end diff --git a/Sources/Earthquake Network/ViewController/SWRevealViewController.h b/Sources/Earthquake Network/ViewController/SWRevealViewController.h new file mode 100755 index 0000000..345dfaa --- /dev/null +++ b/Sources/Earthquake Network/ViewController/SWRevealViewController.h @@ -0,0 +1,422 @@ +/* + + Copyright (c) 2013 Joan Lluch + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is furnished + to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + Early code inspired on a similar class by Philip Kluz (Philip.Kluz@zuui.org) + +*/ + +/* + + RELEASE NOTES + + Version 2.4.0 (Current Version) + + - Updated behaviour of appearance method calls on child controllers + - Removes Xcode 6.3.1 warnings + + Version 2.3.0 + + - StoryBoard initializing bug fix + - Minor Code refactoring + + Version 2.2.0 + + - State Restoration support. + - Reverted panGestureRecognizer implementation to before v2.1.0 (works better). + - New properties 'toggleAnimationType', 'springDampingRatio'. Default reveal animation is 'Spring' + - New property 'frontViewShadowColor' + - New properties 'clipsViewsToBounds' and '_extendedPointInsideHit' + - New delegate methods for finer control of front view location in the overdraw area, as long as deprecation note on former delegate methods + - Other minor changes that should not affect current implementations + + Version 2.1.0 + + - Removed SWDirectionPanGestureRecognizer. Horizontal panning is filtered on the shouldBegin delegate. This is cleaner, I hope it does not break previous funcionality + - Took a cleaner approach to storyboard support. SWRevealViewControllerSegue is now deprecated and you should use SWRevealViewControllerSegueSetController and SWRevealViewControllerSeguePushController instead. + - A minor change on the autoresizingMask of the internal views to fix a glitch on iOS8. This should not affect iOS7 + + Version 2.0.2 + + - Added new delegates for better control of gesture recognizers + + Version 2.0.1 + + - Fix: draggableBorderWidth now correctly handles the cases where one of the rear controllers is not provided + - Fix: the shadow related properties are now granted at any time after view load, not just after initialization. + + Version 2.0.0 + +- Dropped support for iOS6 and earlier. This version will only work on iOS7 + +- The method setFrontViewController:animated: does not longer perform a full reveal animation. Instead it just replaces the frontViewController in + its current position. Use the new pushFrontViewController:animated: method to perform a replacement of the front controlles with reveal animation + as in the previous version + + IMPORTANT: You must replace all calls to setFrontViewController:animated by calls to pushFrontViewController:animated to prevent breaking + functionality on existing projects. + +- Added support for animated replacement of child controllers: setRearViewController, setFrontViewController, setRightViewController now have animated versions. + +- The new 'replaceViewAnimationDuration' property sets the default duration of child viewController replacement. + +- Added the following new delegate methods + revealController:willAddViewController:forOperation:animated: + revealController:didAddViewController:forOperation:animated: + +- The class also supports custom UIViewControllerAnimatedTransitioning related with the replacement of child viewControllers. + You can implement the following new delegate method: revealController:animationControllerForOperation:fromViewController:toViewController: + and provide an object conforming to UIViewControllerAnimatedTransitioning to implement custom animations. + + Version 1.1.3 + +- Reverted the supportedInterfaceOrientations to the default behavior. This is consistent with Apple provided controllers + +- The presentFrontViewHierarchically now dynamically takes into account the smaller header height of bars on iPhone landscape orientation + + Version 1.1.2 + + - The status bar style and appearance are now handled in sync with the class animations. + You can implement the methods preferredStatusBarStyle and prefersStatusBarHidden on your child controllers to define the desired appearance + + - The loadView method now calls a method, loadStoryboardControllers, just for the purpose of loading child controllers from a storyboard. + You can override this method and remove the @try @catch statements if you want the debugger not to stop at them in case you have set an exception breakpoint. + + Version 1.1.1 + + - You can now get a tapGestureRecognizer from the class. See the tapGestureRecognizer method for more information. + + - Both the panGestureRecognizer and the tapGestureRecognizer are now attached to the revealViewController's front content view + by default, so they will start working just by calling their access methods even if you do not attach them to any of your views. + This enables you to dissable interactions on your views -for example based on position- without breaking normal gesture behavior. + + - Corrected a bug that caused a crash on iOS6 and earlier. + + Version 1.1.0 + + - The method setFrontViewController:animated now performs the correct animations both for left and right controllers. + + - The class now automatically handles the status bar appearance depending on the currently shown child controller. + + Version 1.0.8 + + - Support for constant width frontView by setting a negative value to reveal widths. See properties rearViewRevealWidth and rightViewRevealWidth + + - Support for draggableBorderWidth. See property of the same name. + + - The Pan gesture recongnizer can be disabled by implementing the following delegate method and returning NO + revealControllerPanGestureShouldBegin: + + - Added the ability to track pan gesture reveal progress through the following new delegate methods + revealController:panGestureBeganFromLocation:progress: + revealController:panGestureMovedToLocation:progress: + revealController:panGestureEndedToLocation:progress: + + Previous Versions + + - No release notes were updated for previous versions. + +*/ + + +#import + +@class SWRevealViewController; +@protocol SWRevealViewControllerDelegate; + +#pragma mark - SWRevealViewController Class + +// Enum values for setFrontViewPosition:animated: +typedef NS_ENUM( NSInteger, FrontViewPosition) +{ + // Front controller is removed from view. Animated transitioning from this state will cause the same + // effect than animating from FrontViewPositionLeftSideMost. Use this instead of FrontViewPositionLeftSideMost when + // you want to remove the front view controller view from the view hierarchy. + FrontViewPositionLeftSideMostRemoved, + + // Left most position, front view is presented left-offseted by rightViewRevealWidth+rigthViewRevealOverdraw + FrontViewPositionLeftSideMost, + + // Left position, front view is presented left-offseted by rightViewRevealWidth + FrontViewPositionLeftSide, + + // Center position, rear view is hidden behind front controller + FrontViewPositionLeft, + + // Right possition, front view is presented right-offseted by rearViewRevealWidth + FrontViewPositionRight, + + // Right most possition, front view is presented right-offseted by rearViewRevealWidth+rearViewRevealOverdraw + FrontViewPositionRightMost, + + // Front controller is removed from view. Animated transitioning from this state will cause the same + // effect than animating from FrontViewPositionRightMost. Use this instead of FrontViewPositionRightMost when + // you intent to remove the front controller view from the view hierarchy. + FrontViewPositionRightMostRemoved, + +}; + +// Enum values for toggleAnimationType +typedef NS_ENUM(NSInteger, SWRevealToggleAnimationType) +{ + SWRevealToggleAnimationTypeSpring, // <- produces a spring based animation + SWRevealToggleAnimationTypeEaseOut, // <- produces an ease out curve animation +}; + + +@interface SWRevealViewController : UIViewController + +/* Basic API */ + +// Object instance init and rear view setting +- (id)initWithRearViewController:(UIViewController *)rearViewController frontViewController:(UIViewController *)frontViewController; + +// Rear view controller, can be nil if not used +@property (nonatomic) UIViewController *rearViewController; +- (void)setRearViewController:(UIViewController *)rearViewController animated:(BOOL)animated; + +// Optional right view controller, can be nil if not used +@property (nonatomic) UIViewController *rightViewController; +- (void)setRightViewController:(UIViewController *)rightViewController animated:(BOOL)animated; + +// Front view controller, can be nil on initialization but must be supplied by the time the view is loaded +@property (nonatomic) UIViewController *frontViewController; +- (void)setFrontViewController:(UIViewController *)frontViewController animated:(BOOL)animated; + +// Sets the frontViewController using a default set of chained animations consisting on moving the +// presented frontViewController to the right most possition, replacing it, and moving it back to the left position +- (void)pushFrontViewController:(UIViewController *)frontViewController animated:(BOOL)animated; + +// Sets the frontViewController position. You can call the animated version several times with different +// positions to obtain a set of animations that will be performed in order one after the other. +@property (nonatomic) FrontViewPosition frontViewPosition; +- (void)setFrontViewPosition:(FrontViewPosition)frontViewPosition animated:(BOOL)animated; + +// The following methods are meant to be directly connected to the action method of a button +// to perform user triggered postion change of the controller views. This is ussually added to a +// button on top left or right of the frontViewController +- (IBAction)revealToggle:(id)sender; +- (IBAction)rightRevealToggle:(id)sender; // <-- simetric implementation of the above for the rightViewController + +// Toogles the current state of the front controller between Left or Right and fully visible +// Use setFrontViewPosition to set a particular position +- (void)revealToggleAnimated:(BOOL)animated; +- (void)rightRevealToggleAnimated:(BOOL)animated; // <-- simetric implementation of the above for the rightViewController + +// The following method will provide a panGestureRecognizer suitable to be added to any view +// in order to perform usual drag and swipe gestures to reveal the rear views. This is usually added to the top bar +// of a front controller, but it can be added to your frontViewController view or to the reveal controller view to provide full screen panning. +// By default, the panGestureRecognizer is added to the view containing the front controller view. To keep this default behavior +// you still need to call this method, just don't add it to any of your views. The default setup allows you to dissable +// user interactions on your controller views without affecting the recognizer. +- (UIPanGestureRecognizer*)panGestureRecognizer; + +// The following method will provide a tapGestureRecognizer suitable to be added to any view on the frontController +// for concealing the rear views. By default no tap recognizer is created or added to any view, however if you call this method after +// the controller's view has been loaded the recognizer is added to the reveal controller's front container view. +// Thus, you can disable user interactions on your frontViewController view without affecting the tap recognizer. +- (UITapGestureRecognizer*)tapGestureRecognizer; + +/* The following properties are provided for further customization, they are set to default values on initialization, + you do not generally have to set them */ + +// Defines how much of the rear or right view is shown, default is 260. +// Negative values indicate that the reveal width should be computed by substracting the full front view width, +// so the revealed frontView width is kept constant when bounds change as opposed to the rear or right width. +@property (nonatomic) CGFloat rearViewRevealWidth; +@property (nonatomic) CGFloat rightViewRevealWidth; // <-- simetric implementation of the above for the rightViewController + +// Defines how much of an overdraw can occur when dragging further than 'rearViewRevealWidth', default is 60. +@property (nonatomic) CGFloat rearViewRevealOverdraw; +@property (nonatomic) CGFloat rightViewRevealOverdraw; // <-- simetric implementation of the above for the rightViewController + +// Defines how much displacement is applied to the rear view when animating or dragging the front view, default is 40. +@property (nonatomic) CGFloat rearViewRevealDisplacement; +@property (nonatomic) CGFloat rightViewRevealDisplacement; // <-- simetric implementation of the above for the rightViewController + +// Defines a width on the border of the view attached to the panGesturRecognizer where the gesture is allowed, +// default is 0 which means no restriction. +@property (nonatomic) CGFloat draggableBorderWidth; + +// If YES (the default) the controller will bounce to the Left position when dragging further than 'rearViewRevealWidth' +@property (nonatomic) BOOL bounceBackOnOverdraw; +@property (nonatomic) BOOL bounceBackOnLeftOverdraw; // <-- simetric implementation of the above for the rightViewController + +// If YES (default is NO) the controller will allow permanent dragging up to the rightMostPosition +@property (nonatomic) BOOL stableDragOnOverdraw; +@property (nonatomic) BOOL stableDragOnLeftOverdraw; // <-- simetric implementation of the above for the rightViewController + +// If YES (default is NO) the front view controller will be ofsseted vertically by the height of a navigation bar. +// Use this on iOS7 when you add an instance of RevealViewController as a child of a UINavigationController (or another SWRevealViewController) +// and you want the front view controller to be presented below the navigation bar of its UINavigationController grand parent. +// The rearViewController will still appear full size and blurred behind the navigation bar of its UINavigationController grand parent +@property (nonatomic) BOOL presentFrontViewHierarchically; + +// Velocity required for the controller to toggle its state based on a swipe movement, default is 250 +@property (nonatomic) CGFloat quickFlickVelocity; + +// Duration for the revealToggle animation, default is 0.25 +@property (nonatomic) NSTimeInterval toggleAnimationDuration; + +// Animation type, default is SWRevealToggleAnimationTypeSpring +@property (nonatomic) SWRevealToggleAnimationType toggleAnimationType; + +// When animation type is SWRevealToggleAnimationTypeSpring determines the damping ratio, default is 1 +@property (nonatomic) CGFloat springDampingRatio; + +// Duration for animated replacement of view controllers +@property (nonatomic) NSTimeInterval replaceViewAnimationDuration; + +// Defines the radius of the front view's shadow, default is 2.5f +@property (nonatomic) CGFloat frontViewShadowRadius; + +// Defines the radius of the front view's shadow offset default is {0.0f,2.5f} +@property (nonatomic) CGSize frontViewShadowOffset; + +// Defines the front view's shadow opacity, default is 1.0f +@property (nonatomic) CGFloat frontViewShadowOpacity; + +// Defines the front view's shadow color, default is blackColor +@property (nonatomic) UIColor *frontViewShadowColor; + +// Defines whether the controller should clip subviews to its view bounds. Default is NO. +// Set this to YES when you are presenting this controller as a non full-screen child of a +// custom container controller which does not explicitly clips its subviews. +@property (nonatomic) BOOL clipsViewsToBounds; + +// Defines whether your views clicable area extends beyond the bounds of this controller. Default is NO. +// Set this to YES if you are presenting this controller as a non full-screen child of a custom container and you are not +// clipping your front view to this controller bounds. +@property (nonatomic) BOOL extendsPointInsideHit; + +/* The class properly handles all the relevant calls to appearance methods on the contained controllers. + Moreover you can assign a delegate to let the class inform you on positions and animation activity */ + +// Delegate +@property (nonatomic,weak) id delegate; + +@end + + +#pragma mark - SWRevealViewControllerDelegate Protocol + +typedef enum +{ + SWRevealControllerOperationNone, + SWRevealControllerOperationReplaceRearController, + SWRevealControllerOperationReplaceFrontController, + SWRevealControllerOperationReplaceRightController, + +} SWRevealControllerOperation; + + +@protocol SWRevealViewControllerDelegate + +@optional + +// The following delegate methods will be called before and after the front view moves to a position +- (void)revealController:(SWRevealViewController *)revealController willMoveToPosition:(FrontViewPosition)position; +- (void)revealController:(SWRevealViewController *)revealController didMoveToPosition:(FrontViewPosition)position; + +// This will be called inside the reveal animation, thus you can use it to place your own code that will be animated in sync +- (void)revealController:(SWRevealViewController *)revealController animateToPosition:(FrontViewPosition)position; + +// Implement this to return NO when you want the pan gesture recognizer to be ignored +- (BOOL)revealControllerPanGestureShouldBegin:(SWRevealViewController *)revealController; + +// Implement this to return NO when you want the tap gesture recognizer to be ignored +- (BOOL)revealControllerTapGestureShouldBegin:(SWRevealViewController *)revealController; + +// Implement this to return YES if you want other gesture recognizer to share touch events with the pan gesture +- (BOOL)revealController:(SWRevealViewController *)revealController + panGestureRecognizerShouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer; + +// Implement this to return YES if you want other gesture recognizer to share touch events with the tap gesture +- (BOOL)revealController:(SWRevealViewController *)revealController + tapGestureRecognizerShouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer; + +// Called when the gestureRecognizer began and ended +- (void)revealControllerPanGestureBegan:(SWRevealViewController *)revealController; +- (void)revealControllerPanGestureEnded:(SWRevealViewController *)revealController; + +// The following methods provide a means to track the evolution of the gesture recognizer. +// The 'location' parameter is the X origin coordinate of the front view as the user drags it +// The 'progress' parameter is a number ranging from 0 to 1 indicating the front view location relative to the +// rearRevealWidth or rightRevealWidth. 1 is fully revealed, dragging ocurring in the overDraw region will result in values above 1. +// The 'overProgress' parameter is a number ranging from 0 to 1 indicating the front view location relative to the +// overdraw region. 0 is fully revealed, 1 is fully overdrawn. Negative values occur inside the normal reveal region +- (void)revealController:(SWRevealViewController *)revealController panGestureBeganFromLocation:(CGFloat)location progress:(CGFloat)progress overProgress:(CGFloat)overProgress; +- (void)revealController:(SWRevealViewController *)revealController panGestureMovedToLocation:(CGFloat)location progress:(CGFloat)progress overProgress:(CGFloat)overProgress; +- (void)revealController:(SWRevealViewController *)revealController panGestureEndedToLocation:(CGFloat)location progress:(CGFloat)progress overProgress:(CGFloat)overProgress; + +// Notification of child controller replacement +- (void)revealController:(SWRevealViewController *)revealController willAddViewController:(UIViewController *)viewController + forOperation:(SWRevealControllerOperation)operation animated:(BOOL)animated; +- (void)revealController:(SWRevealViewController *)revealController didAddViewController:(UIViewController *)viewController + forOperation:(SWRevealControllerOperation)operation animated:(BOOL)animated; + +// Support for custom transition animations while replacing child controllers. If implemented, it will be fired in response +// to calls to 'setXXViewController' methods +- (id)revealController:(SWRevealViewController *)revealController + animationControllerForOperation:(SWRevealControllerOperation)operation fromViewController:(UIViewController *)fromVC toViewController:(UIViewController *)toVC; + +// DEPRECATED - The following delegate methods will be removed some time in the future +- (void)revealController:(SWRevealViewController *)revealController panGestureBeganFromLocation:(CGFloat)location progress:(CGFloat)progress; // (DEPRECATED) +- (void)revealController:(SWRevealViewController *)revealController panGestureMovedToLocation:(CGFloat)location progress:(CGFloat)progress; // (DEPRECATED) +- (void)revealController:(SWRevealViewController *)revealController panGestureEndedToLocation:(CGFloat)location progress:(CGFloat)progress; // (DEPRECATED) +@end + + +#pragma mark - UIViewController(SWRevealViewController) Category + +// A category of UIViewController to let childViewControllers easily access their parent SWRevealViewController +@interface UIViewController(SWRevealViewController) + +- (SWRevealViewController*)revealViewController; + +@end + + +#pragma mark - StoryBoard support Classes + +/* StoryBoard support */ + +// String identifiers to be applied to segues on a storyboard +extern NSString* const SWSegueRearIdentifier; // this is @"sw_rear" +extern NSString* const SWSegueFrontIdentifier; // this is @"sw_front" +extern NSString* const SWSegueRightIdentifier; // this is @"sw_right" + +/* This will allow the class to be defined on a storyboard */ + +// Use this along with one of the above segue identifiers to segue to the initial state +@interface SWRevealViewControllerSegueSetController : UIStoryboardSegue +@end + +// Use this to push a view controller +@interface SWRevealViewControllerSeguePushController : UIStoryboardSegue +@end + + +//#pragma mark - SWRevealViewControllerSegue (DEPRECATED) +// +//@interface SWRevealViewControllerSegue : UIStoryboardSegue // DEPRECATED: USE SWRevealViewControllerSegueSetController instead +//@property (nonatomic, strong) void(^performBlock)( SWRevealViewControllerSegue* segue, UIViewController* svc, UIViewController* dvc ); +//@end diff --git a/Sources/Earthquake Network/ViewController/SWRevealViewController.m b/Sources/Earthquake Network/ViewController/SWRevealViewController.m new file mode 100755 index 0000000..d378d13 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/SWRevealViewController.m @@ -0,0 +1,1936 @@ +/* + + Copyright (c) 2013 Joan Lluch + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is furnished + to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + Early code inspired on a similar class by Philip Kluz (Philip.Kluz@zuui.org) + +*/ + +#import + +#import "SWRevealViewController.h" + + +#pragma mark - StatusBar Helper Function + +// computes the required offset adjustment due to the status bar for the passed in view, +// it will return the statusBar height if view fully overlaps the statusBar, otherwise returns 0.0f +static CGFloat statusBarAdjustment( UIView* view ) +{ + CGFloat adjustment = 0.0f; + UIApplication *app = [UIApplication sharedApplication]; + CGRect viewFrame = [view convertRect:view.bounds toView:[app keyWindow]]; + CGRect statusBarFrame = [app statusBarFrame]; + + if ( CGRectIntersectsRect(viewFrame, statusBarFrame) ) + adjustment = fminf(statusBarFrame.size.width, statusBarFrame.size.height); + + return adjustment; +} + + +#pragma mark - SWRevealView Class + +@interface SWRevealView: UIView +{ + __weak SWRevealViewController *_c; +} + +@property (nonatomic, readonly) UIView *rearView; +@property (nonatomic, readonly) UIView *rightView; +@property (nonatomic, readonly) UIView *frontView; +@property (nonatomic, assign) BOOL disableLayout; + +@end + + +@interface SWRevealViewController() +- (void)_getRevealWidth:(CGFloat*)pRevealWidth revealOverDraw:(CGFloat*)pRevealOverdraw forSymetry:(int)symetry; +- (void)_getBounceBack:(BOOL*)pBounceBack pStableDrag:(BOOL*)pStableDrag forSymetry:(int)symetry; +- (void)_getAdjustedFrontViewPosition:(FrontViewPosition*)frontViewPosition forSymetry:(int)symetry; +@end + + +@implementation SWRevealView + + +static CGFloat scaledValue( CGFloat v1, CGFloat min2, CGFloat max2, CGFloat min1, CGFloat max1) +{ + CGFloat result = min2 + (v1-min1)*((max2-min2)/(max1-min1)); + if ( result != result ) return min2; // nan + if ( result < min2 ) return min2; + if ( result > max2 ) return max2; + return result; +} + + +- (id)initWithFrame:(CGRect)frame controller:(SWRevealViewController*)controller +{ + self = [super initWithFrame:frame]; + if ( self ) + { + _c = controller; + CGRect bounds = self.bounds; + + _frontView = [[UIView alloc] initWithFrame:bounds]; + _frontView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; + [self reloadShadow]; + + [self addSubview:_frontView]; + } + return self; +} + + +- (void)reloadShadow +{ + CALayer *frontViewLayer = _frontView.layer; + frontViewLayer.shadowColor = [_c.frontViewShadowColor CGColor]; + frontViewLayer.shadowOpacity = _c.frontViewShadowOpacity; + frontViewLayer.shadowOffset = _c.frontViewShadowOffset; + frontViewLayer.shadowRadius = _c.frontViewShadowRadius; +} + + +- (CGRect)hierarchycalFrameAdjustment:(CGRect)frame +{ + if ( _c.presentFrontViewHierarchically ) + { + UINavigationBar *dummyBar = [[UINavigationBar alloc] init]; + CGFloat barHeight = [dummyBar sizeThatFits:CGSizeMake(100,100)].height; + CGFloat offset = barHeight + statusBarAdjustment(self); + frame.origin.y += offset; + frame.size.height -= offset; + } + return frame; +} + + +- (void)prepareRearViewForPosition:(FrontViewPosition)newPosition +{ + if ( _rearView == nil ) + { + _rearView = [[UIView alloc] initWithFrame:self.bounds]; + _rearView.autoresizingMask = /*UIViewAutoresizingFlexibleWidth|*/UIViewAutoresizingFlexibleHeight; + [self insertSubview:_rearView belowSubview:_frontView]; + } + + CGFloat xLocation = [self frontLocationForPosition:_c.frontViewPosition]; + [self _layoutRearViewsForLocation:xLocation]; + [self _prepareForNewPosition:newPosition]; +} + + +- (void)prepareRightViewForPosition:(FrontViewPosition)newPosition +{ + if ( _rightView == nil ) + { + _rightView = [[UIView alloc] initWithFrame:self.bounds]; + _rightView.autoresizingMask = /*UIViewAutoresizingFlexibleWidth|*/UIViewAutoresizingFlexibleHeight; + [self insertSubview:_rightView belowSubview:_frontView]; + } + + CGFloat xLocation = [self frontLocationForPosition:_c.frontViewPosition]; + [self _layoutRearViewsForLocation:xLocation]; + [self _prepareForNewPosition:newPosition]; +} + + +- (void)unloadRearView +{ + [_rearView removeFromSuperview]; + _rearView = nil; +} + + +- (void)unloadRightView +{ + [_rightView removeFromSuperview]; + _rightView = nil; +} + + +- (CGFloat)frontLocationForPosition:(FrontViewPosition)frontViewPosition +{ + CGFloat revealWidth; + CGFloat revealOverdraw; + + CGFloat location = 0.0f; + + int symetry = frontViewPosition FrontViewPositionRight ) + location = revealWidth + revealOverdraw; + + return location*symetry; +} + + +- (void)dragFrontViewToXLocation:(CGFloat)xLocation +{ + CGRect bounds = self.bounds; + + xLocation = [self _adjustedDragLocationForLocation:xLocation]; + [self _layoutRearViewsForLocation:xLocation]; + + CGRect frame = CGRectMake(xLocation, 0.0f, bounds.size.width, bounds.size.height); + _frontView.frame = [self hierarchycalFrameAdjustment:frame]; +} + + +# pragma mark - overrides + +- (void)layoutSubviews +{ + if ( _disableLayout ) return; + + CGRect bounds = self.bounds; + + FrontViewPosition position = _c.frontViewPosition; + CGFloat xLocation = [self frontLocationForPosition:position]; + + // set rear view frames + [self _layoutRearViewsForLocation:xLocation]; + + // set front view frame + CGRect frame = CGRectMake(xLocation, 0.0f, bounds.size.width, bounds.size.height); + _frontView.frame = [self hierarchycalFrameAdjustment:frame]; + + // setup front view shadow path if needed (front view loaded and not removed) + UIViewController *frontViewController = _c.frontViewController; + BOOL viewLoaded = frontViewController != nil && frontViewController.isViewLoaded; + BOOL viewNotRemoved = position > FrontViewPositionLeftSideMostRemoved && position < FrontViewPositionRightMostRemoved; + CGRect shadowBounds = viewLoaded && viewNotRemoved ? _frontView.bounds : CGRectZero; + + UIBezierPath *shadowPath = [UIBezierPath bezierPathWithRect:shadowBounds]; + _frontView.layer.shadowPath = shadowPath.CGPath; +} + + +- (BOOL)pointInsideD:(CGPoint)point withEvent:(UIEvent *)event +{ + BOOL isInside = [super pointInside:point withEvent:event]; + if ( _c.extendsPointInsideHit ) + { + if ( !isInside && _rearView && [_c.rearViewController isViewLoaded] ) + { + CGPoint pt = [self convertPoint:point toView:_rearView]; + isInside = [_rearView pointInside:pt withEvent:event]; + } + + if ( !isInside && _frontView && [_c.frontViewController isViewLoaded] ) + { + CGPoint pt = [self convertPoint:point toView:_frontView]; + isInside = [_frontView pointInside:pt withEvent:event]; + } + + if ( !isInside && _rightView && [_c.rightViewController isViewLoaded] ) + { + CGPoint pt = [self convertPoint:point toView:_rightView]; + isInside = [_rightView pointInside:pt withEvent:event]; + } + } + return isInside; +} + + +- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event +{ + BOOL isInside = [super pointInside:point withEvent:event]; + if ( !isInside && _c.extendsPointInsideHit ) + { + UIView *testViews[] = { _rearView, _frontView, _rightView }; + UIViewController *testControllers[] = { _c.rearViewController, _c.frontViewController, _c.rightViewController }; + + for ( NSInteger i=0 ; i<3 && !isInside ; i++ ) + { + if ( testViews[i] && [testControllers[i] isViewLoaded] ) + { + CGPoint pt = [self convertPoint:point toView:testViews[i]]; + isInside = [testViews[i] pointInside:pt withEvent:event]; + } + } + } + return isInside; +} + + +# pragma mark - private + + +- (void)_layoutRearViewsForLocation:(CGFloat)xLocation +{ + CGRect bounds = self.bounds; + + CGFloat rearRevealWidth = _c.rearViewRevealWidth; + if ( rearRevealWidth < 0) rearRevealWidth = bounds.size.width + _c.rearViewRevealWidth; + + CGFloat rearXLocation = scaledValue(xLocation, -_c.rearViewRevealDisplacement, 0, 0, rearRevealWidth); + + CGFloat rearWidth = rearRevealWidth + _c.rearViewRevealOverdraw; + _rearView.frame = CGRectMake(rearXLocation, 0.0, rearWidth, bounds.size.height); + + CGFloat rightRevealWidth = _c.rightViewRevealWidth; + if ( rightRevealWidth < 0) rightRevealWidth = bounds.size.width + _c.rightViewRevealWidth; + + CGFloat rightXLocation = scaledValue(xLocation, 0, _c.rightViewRevealDisplacement, -rightRevealWidth, 0); + + CGFloat rightWidth = rightRevealWidth + _c.rightViewRevealOverdraw; + _rightView.frame = CGRectMake(bounds.size.width-rightWidth+rightXLocation, 0.0f, rightWidth, bounds.size.height); +} + + +- (void)_prepareForNewPosition:(FrontViewPosition)newPosition; +{ + if ( _rearView == nil || _rightView == nil ) + return; + + int symetry = newPosition 0 && rearIndex < rightIndex) ) + [self exchangeSubviewAtIndex:rightIndex withSubviewAtIndex:rearIndex]; +} + + +- (CGFloat)_adjustedDragLocationForLocation:(CGFloat)x +{ + CGFloat result; + + CGFloat revealWidth; + CGFloat revealOverdraw; + BOOL bounceBack; + BOOL stableDrag; + FrontViewPosition position = _c.frontViewPosition; + + int symetry = x<0 ? -1 : 1; + + [_c _getRevealWidth:&revealWidth revealOverDraw:&revealOverdraw forSymetry:symetry]; + [_c _getBounceBack:&bounceBack pStableDrag:&stableDrag forSymetry:symetry]; + + BOOL stableTrack = !bounceBack || stableDrag || position==FrontViewPositionRightMost || position==FrontViewPositionLeftSideMost; + if ( stableTrack ) + { + revealWidth += revealOverdraw; + revealOverdraw = 0.0f; + } + + x = x * symetry; + + if (x <= revealWidth) + result = x; // Translate linearly. + + else if (x <= revealWidth+2*revealOverdraw) + result = revealWidth + (x-revealWidth)/2; // slow down translation by halph the movement. + + else + result = revealWidth+revealOverdraw; // keep at the rightMost location. + + return result * symetry; +} + +@end + + +#pragma mark - SWContextTransitioningObject + +@interface SWContextTransitionObject : NSObject +@end + + +@implementation SWContextTransitionObject +{ + __weak SWRevealViewController *_revealVC; + UIView *_view; + UIViewController *_toVC; + UIViewController *_fromVC; + void (^_completion)(void); +} + + +- (id)initWithRevealController:(SWRevealViewController*)revealVC containerView:(UIView*)view fromVC:(UIViewController*)fromVC + toVC:(UIViewController*)toVC completion:(void (^)(void))completion +{ + self = [super init]; + if ( self ) + { + _revealVC = revealVC; + _view = view; + _fromVC = fromVC; + _toVC = toVC; + _completion = completion; + } + return self; +} + + +- (UIView *)containerView +{ + return _view; +} + + +- (BOOL)isAnimated +{ + return YES; +} + + +- (BOOL)isInteractive +{ + return NO; // not supported +} + + +- (BOOL)transitionWasCancelled +{ + return NO; // not supported +} + + +- (CGAffineTransform)targetTransform +{ + return CGAffineTransformIdentity; +} + + +- (UIModalPresentationStyle)presentationStyle +{ + return UIModalPresentationNone; // not applicable +} + + +- (void)updateInteractiveTransition:(CGFloat)percentComplete +{ + // not supported +} + + +- (void)finishInteractiveTransition +{ + // not supported +} + + +- (void)cancelInteractiveTransition +{ + // not supported +} + + +- (void)completeTransition:(BOOL)didComplete +{ + _completion(); +} + + +- (UIViewController *)viewControllerForKey:(NSString *)key +{ + if ( [key isEqualToString:UITransitionContextFromViewControllerKey] ) + return _fromVC; + + if ( [key isEqualToString:UITransitionContextToViewControllerKey] ) + return _toVC; + + return nil; +} + + +- (UIView *)viewForKey:(NSString *)key +{ + return nil; +} + + +- (CGRect)initialFrameForViewController:(UIViewController *)vc +{ + return _view.bounds; +} + + +- (CGRect)finalFrameForViewController:(UIViewController *)vc +{ + return _view.bounds; +} + +@end + + +#pragma mark - SWDefaultAnimationController Class + +@interface SWDefaultAnimationController : NSObject +@end + +@implementation SWDefaultAnimationController +{ + NSTimeInterval _duration; +} + + +- (id)initWithDuration:(NSTimeInterval)duration +{ + self = [super init]; + if ( self ) + { + _duration = duration; + } + return self; +} + + +- (NSTimeInterval)transitionDuration:(id)transitionContext +{ + return _duration; +} + + +- (void)animateTransition:(id )transitionContext +{ + UIViewController *fromViewController = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; + UIViewController *toViewController = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; + + if ( fromViewController ) + { + [UIView transitionFromView:fromViewController.view toView:toViewController.view duration:_duration + options:UIViewAnimationOptionTransitionCrossDissolve|UIViewAnimationOptionOverrideInheritedOptions + completion:^(BOOL finished) { [transitionContext completeTransition:finished]; }]; + } + else + { + // tansitionFromView does not correctly handle the case where the fromView is nil (at least on iOS7) it just pops up the toView view with no animation, + // so in such case we replace the crossDissolve animation by a simple alpha animation on the appearing view + UIView *toView = toViewController.view; + CGFloat alpha = toView.alpha; + toView.alpha = 0; + + [UIView animateWithDuration:_duration delay:0 options:UIViewAnimationOptionCurveEaseOut + animations:^{ toView.alpha = alpha;} + completion:^(BOOL finished) { [transitionContext completeTransition:finished];}]; + } +} + +@end + + +#pragma mark - SWRevealViewControllerPanGestureRecognizer + +#import + +@interface SWRevealViewControllerPanGestureRecognizer : UIPanGestureRecognizer +@end + +@implementation SWRevealViewControllerPanGestureRecognizer +{ + BOOL _dragging; + CGPoint _beginPoint; +} + +- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event +{ + [super touchesBegan:touches withEvent:event]; + + UITouch *touch = [touches anyObject]; + _beginPoint = [touch locationInView:self.view]; + _dragging = NO; +} + + +- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event +{ + [super touchesMoved:touches withEvent:event]; + + if ( _dragging || self.state == UIGestureRecognizerStateFailed) + return; + + const CGFloat kDirectionPanThreshold = 5; + + UITouch *touch = [touches anyObject]; + CGPoint nowPoint = [touch locationInView:self.view]; + + if (ABS(nowPoint.x - _beginPoint.x) > kDirectionPanThreshold) _dragging = YES; + else if (ABS(nowPoint.y - _beginPoint.y) > kDirectionPanThreshold) self.state = UIGestureRecognizerStateFailed; +} + +@end + + +#pragma mark - SWRevealViewController Class + +@interface SWRevealViewController() +{ + SWRevealView *_contentView; + UIPanGestureRecognizer *_panGestureRecognizer; + UITapGestureRecognizer *_tapGestureRecognizer; + FrontViewPosition _frontViewPosition; + FrontViewPosition _rearViewPosition; + FrontViewPosition _rightViewPosition; + SWContextTransitionObject *_rearTransitioningController; + SWContextTransitionObject *_frontTransitioningController; + SWContextTransitionObject *_rightTransitioningController; +} +@end + + +@implementation SWRevealViewController +{ + FrontViewPosition _panInitialFrontPosition; + NSMutableArray *_animationQueue; + BOOL _userInteractionStore; +} + +const int FrontViewPositionNone = 0xff; + + +#pragma mark - Init + +- (id)initWithCoder:(NSCoder *)aDecoder +{ + self = [super initWithCoder:aDecoder]; + if ( self ) + { + [self _initDefaultProperties]; + } + return self; +} + + +- (id)init +{ + return [self initWithRearViewController:nil frontViewController:nil]; +} + + +- (id)initWithRearViewController:(UIViewController *)rearViewController frontViewController:(UIViewController *)frontViewController; +{ + self = [super init]; + if ( self ) + { + [self _initDefaultProperties]; + [self _performTransitionOperation:SWRevealControllerOperationReplaceRearController withViewController:rearViewController animated:NO]; + [self _performTransitionOperation:SWRevealControllerOperationReplaceFrontController withViewController:frontViewController animated:NO]; + } + return self; +} + + +- (void)_initDefaultProperties +{ + _frontViewPosition = FrontViewPositionLeft; + _rearViewPosition = FrontViewPositionLeft; + _rightViewPosition = FrontViewPositionLeft; + _rearViewRevealWidth = 260.0f; + _rearViewRevealOverdraw = 60.0f; + _rearViewRevealDisplacement = 40.0f; + _rightViewRevealWidth = 260.0f; + _rightViewRevealOverdraw = 60.0f; + _rightViewRevealDisplacement = 40.0f; + _bounceBackOnOverdraw = YES; + _bounceBackOnLeftOverdraw = YES; + _stableDragOnOverdraw = NO; + _stableDragOnLeftOverdraw = NO; + _presentFrontViewHierarchically = NO; + _quickFlickVelocity = 250.0f; + _toggleAnimationDuration = 0.3; + _toggleAnimationType = SWRevealToggleAnimationTypeSpring; + _springDampingRatio = 1; + _replaceViewAnimationDuration = 0.25; + _frontViewShadowRadius = 2.5f; + _frontViewShadowOffset = CGSizeMake(0.0f, 2.5f); + _frontViewShadowOpacity = 1.0f; + _frontViewShadowColor = [UIColor blackColor]; + _userInteractionStore = YES; + _animationQueue = [NSMutableArray array]; + _draggableBorderWidth = 0.0f; + _clipsViewsToBounds = NO; + _extendsPointInsideHit = NO; +} + + +#pragma mark - StatusBar + +- (UIViewController *)childViewControllerForStatusBarStyle +{ + int positionDif = _frontViewPosition - FrontViewPositionLeft; + + UIViewController *controller = _frontViewController; + if ( positionDif > 0 ) controller = _rearViewController; + else if ( positionDif < 0 ) controller = _rightViewController; + + return controller; +} + +- (UIViewController *)childViewControllerForStatusBarHidden +{ + UIViewController *controller = [self childViewControllerForStatusBarStyle]; + return controller; +} + + +#pragma mark - View lifecycle + +- (void)loadView +{ + // Do not call super, to prevent the apis from unfruitful looking for inexistent xibs! + //[super loadView]; + + // load any defined front/rear controllers from the storyboard before + [self loadStoryboardControllers]; + + // This is what Apple used to tell us to set as the initial frame, which is of course totally irrelevant + // with view controller containment patterns, let's leave it for the sake of it! + // CGRect frame = [[UIScreen mainScreen] applicationFrame]; + + // On iOS7 the applicationFrame does not return the whole screen. This is possibly a bug. + // As a workaround we use the screen bounds, this still works on iOS6, any zero based frame would work anyway! + CGRect frame = [[UIScreen mainScreen] bounds]; + + // create a custom content view for the controller + _contentView = [[SWRevealView alloc] initWithFrame:frame controller:self]; + + // set the content view to resize along with its superview + [_contentView setAutoresizingMask:UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight]; + + // set the content view to clip its bounds if requested + [_contentView setClipsToBounds:_clipsViewsToBounds]; + + // set our contentView to the controllers view + self.view = _contentView; + + // Apple also tells us to do this: + _contentView.backgroundColor = [UIColor blackColor]; + + // we set the current frontViewPosition to none before seting the + // desired initial position, this will force proper controller reload + FrontViewPosition initialPosition = _frontViewPosition; + _frontViewPosition = FrontViewPositionNone; + _rearViewPosition = FrontViewPositionNone; + _rightViewPosition = FrontViewPositionNone; + + // now set the desired initial position + [self _setFrontViewPosition:initialPosition withDuration:0.0]; +} + + +- (void)viewDidAppear:(BOOL)animated +{ + [super viewDidAppear:animated]; + + // Uncomment the following code if you want the child controllers + // to be loaded at this point. + // + // We leave this commented out because we think loading childs here is conceptually wrong. + // Instead, we refrain view loads until necesary, for example we may never load + // the rear controller view -or the front controller view- if it is never displayed. + // + // If you need to manipulate views of any of your child controllers in an override + // of this method, you can load yourself the views explicitly on your overriden method. + // However we discourage it as an app following the MVC principles should never need to do so + +// [_frontViewController view]; +// [_rearViewController view]; + + // we store at this point the view's user interaction state as we may temporarily disable it + // and resume it back to the previous state, it is possible to override this behaviour by + // intercepting it on the panGestureBegan and panGestureEnded delegates + _userInteractionStore = _contentView.userInteractionEnabled; +} + + +- (NSUInteger)supportedInterfaceOrientations +{ + // we could have simply not implemented this, but we choose to call super to make explicit that we + // want the default behavior. + return [super supportedInterfaceOrientations]; +} + + +#pragma mark - Public methods and property accessors + +- (void)setFrontViewController:(UIViewController *)frontViewController +{ + [self setFrontViewController:frontViewController animated:NO]; +} + + +- (void)setFrontViewController:(UIViewController *)frontViewController animated:(BOOL)animated +{ + if ( ![self isViewLoaded]) + { + [self _performTransitionOperation:SWRevealControllerOperationReplaceFrontController withViewController:frontViewController animated:NO]; + return; + } + + [self _dispatchTransitionOperation:SWRevealControllerOperationReplaceFrontController withViewController:frontViewController animated:animated]; +} + + +- (void)pushFrontViewController:(UIViewController *)frontViewController animated:(BOOL)animated +{ + if ( ![self isViewLoaded]) + { + [self _performTransitionOperation:SWRevealControllerOperationReplaceFrontController withViewController:frontViewController animated:NO]; + return; + } + + [self _dispatchPushFrontViewController:frontViewController animated:animated]; +} + + +- (void)setRearViewController:(UIViewController *)rearViewController +{ + [self setRearViewController:rearViewController animated:NO]; +} + + +- (void)setRearViewController:(UIViewController *)rearViewController animated:(BOOL)animated +{ + if ( ![self isViewLoaded]) + { + [self _performTransitionOperation:SWRevealControllerOperationReplaceRearController withViewController:rearViewController animated:NO]; + return; + } + + [self _dispatchTransitionOperation:SWRevealControllerOperationReplaceRearController withViewController:rearViewController animated:animated]; +} + + +- (void)setRightViewController:(UIViewController *)rightViewController +{ + [self setRightViewController:rightViewController animated:NO]; +} + + +- (void)setRightViewController:(UIViewController *)rightViewController animated:(BOOL)animated +{ + if ( ![self isViewLoaded]) + { + [self _performTransitionOperation:SWRevealControllerOperationReplaceRightController withViewController:rightViewController animated:NO]; + return; + } + + [self _dispatchTransitionOperation:SWRevealControllerOperationReplaceRightController withViewController:rightViewController animated:animated]; +} + + +- (void)revealToggleAnimated:(BOOL)animated +{ + FrontViewPosition toggledFrontViewPosition = FrontViewPositionLeft; + if (_frontViewPosition <= FrontViewPositionLeft) + toggledFrontViewPosition = FrontViewPositionRight; + + [self setFrontViewPosition:toggledFrontViewPosition animated:animated]; +} + + +- (void)rightRevealToggleAnimated:(BOOL)animated +{ + FrontViewPosition toggledFrontViewPosition = FrontViewPositionLeft; + if (_frontViewPosition >= FrontViewPositionLeft) + toggledFrontViewPosition = FrontViewPositionLeftSide; + + [self setFrontViewPosition:toggledFrontViewPosition animated:animated]; +} + + +- (void)setFrontViewPosition:(FrontViewPosition)frontViewPosition +{ + [self setFrontViewPosition:frontViewPosition animated:NO]; +} + + +- (void)setFrontViewPosition:(FrontViewPosition)frontViewPosition animated:(BOOL)animated +{ + if ( ![self isViewLoaded] ) + { + _frontViewPosition = frontViewPosition; + _rearViewPosition = frontViewPosition; + _rightViewPosition = frontViewPosition; + return; + } + + [self _dispatchSetFrontViewPosition:frontViewPosition animated:animated]; +} + + +- (void)setFrontViewShadowRadius:(CGFloat)frontViewShadowRadius +{ + _frontViewShadowRadius = frontViewShadowRadius; + [_contentView reloadShadow]; +} + + +- (void)setFrontViewShadowOffset:(CGSize)frontViewShadowOffset +{ + _frontViewShadowOffset = frontViewShadowOffset; + [_contentView reloadShadow]; +} + + +- (void)setFrontViewShadowOpacity:(CGFloat)frontViewShadowOpacity +{ + _frontViewShadowOpacity = frontViewShadowOpacity; + [_contentView reloadShadow]; +} + + +- (void)setFrontViewShadowColor:(UIColor *)frontViewShadowColor +{ + _frontViewShadowColor = frontViewShadowColor; + [_contentView reloadShadow]; +} + + +- (UIPanGestureRecognizer*)panGestureRecognizer +{ + if ( _panGestureRecognizer == nil ) + { + _panGestureRecognizer = [[SWRevealViewControllerPanGestureRecognizer alloc] initWithTarget:self action:@selector(_handleRevealGesture:)]; + _panGestureRecognizer.delegate = self; + [_contentView.frontView addGestureRecognizer:_panGestureRecognizer]; + } + return _panGestureRecognizer; +} + + +- (UITapGestureRecognizer*)tapGestureRecognizer +{ + if ( _tapGestureRecognizer == nil ) + { + UITapGestureRecognizer *tapRecognizer = + [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(_handleTapGesture:)]; + + tapRecognizer.delegate = self; + [_contentView.frontView addGestureRecognizer:tapRecognizer]; + _tapGestureRecognizer = tapRecognizer ; + } + return _tapGestureRecognizer; +} + + +- (void)setClipsViewsToBounds:(BOOL)clipsViewsToBounds +{ + _clipsViewsToBounds = clipsViewsToBounds; + [_contentView setClipsToBounds:clipsViewsToBounds]; +} + + + +#pragma mark - Provided acction methods + +- (IBAction)revealToggle:(id)sender +{ + [self revealToggleAnimated:YES]; +} + + +- (IBAction)rightRevealToggle:(id)sender +{ + [self rightRevealToggleAnimated:YES]; +} + + +#pragma mark - UserInteractionEnabling + +// disable userInteraction on the entire control +- (void)_disableUserInteraction +{ + [_contentView setUserInteractionEnabled:NO]; + [_contentView setDisableLayout:YES]; +} + +// restore userInteraction on the control +- (void)_restoreUserInteraction +{ + // we use the stored userInteraction state just in case a developer decided + // to have our view interaction disabled beforehand + [_contentView setUserInteractionEnabled:_userInteractionStore]; + [_contentView setDisableLayout:NO]; +} + + +#pragma mark - PanGesture progress notification + +- (void)_notifyPanGestureBegan +{ + if ( [_delegate respondsToSelector:@selector(revealControllerPanGestureBegan:)] ) + [_delegate revealControllerPanGestureBegan:self]; + + CGFloat xLocation, dragProgress, overProgress; + [self _getDragLocation:&xLocation progress:&dragProgress overdrawProgress:&overProgress]; + + if ( [_delegate respondsToSelector:@selector(revealController:panGestureBeganFromLocation:progress:overProgress:)] ) + [_delegate revealController:self panGestureBeganFromLocation:xLocation progress:dragProgress overProgress:overProgress]; + + else if ( [_delegate respondsToSelector:@selector(revealController:panGestureBeganFromLocation:progress:)] ) + [_delegate revealController:self panGestureBeganFromLocation:xLocation progress:dragProgress]; +} + +- (void)_notifyPanGestureMoved +{ + CGFloat xLocation, dragProgress, overProgress; + [self _getDragLocation:&xLocation progress:&dragProgress overdrawProgress:&overProgress]; + + if ( [_delegate respondsToSelector:@selector(revealController:panGestureMovedToLocation:progress:overProgress:)] ) + [_delegate revealController:self panGestureMovedToLocation:xLocation progress:dragProgress overProgress:overProgress]; + + else if ( [_delegate respondsToSelector:@selector(revealController:panGestureMovedToLocation:progress:)] ) + [_delegate revealController:self panGestureMovedToLocation:xLocation progress:dragProgress]; +} + +- (void)_notifyPanGestureEnded +{ + CGFloat xLocation, dragProgress, overProgress; + [self _getDragLocation:&xLocation progress:&dragProgress overdrawProgress:&overProgress]; + + if ( [_delegate respondsToSelector:@selector(revealController:panGestureEndedToLocation:progress:overProgress:)] ) + [_delegate revealController:self panGestureEndedToLocation:xLocation progress:dragProgress overProgress:overProgress]; + + else if ( [_delegate respondsToSelector:@selector(revealController:panGestureEndedToLocation:progress:)] ) + [_delegate revealController:self panGestureEndedToLocation:xLocation progress:dragProgress]; + + if ( [_delegate respondsToSelector:@selector(revealControllerPanGestureEnded:)] ) + [_delegate revealControllerPanGestureEnded:self]; +} + + +#pragma mark - Symetry + +- (void)_getRevealWidth:(CGFloat*)pRevealWidth revealOverDraw:(CGFloat*)pRevealOverdraw forSymetry:(int)symetry +{ + if ( symetry < 0 ) *pRevealWidth = _rightViewRevealWidth, *pRevealOverdraw = _rightViewRevealOverdraw; + else *pRevealWidth = _rearViewRevealWidth, *pRevealOverdraw = _rearViewRevealOverdraw; + + if (*pRevealWidth < 0) *pRevealWidth = _contentView.bounds.size.width + *pRevealWidth; +} + +- (void)_getBounceBack:(BOOL*)pBounceBack pStableDrag:(BOOL*)pStableDrag forSymetry:(int)symetry +{ + if ( symetry < 0 ) *pBounceBack = _bounceBackOnLeftOverdraw, *pStableDrag = _stableDragOnLeftOverdraw; + else *pBounceBack = _bounceBackOnOverdraw, *pStableDrag = _stableDragOnOverdraw; +} + +- (void)_getAdjustedFrontViewPosition:(FrontViewPosition*)frontViewPosition forSymetry:(int)symetry +{ + if ( symetry < 0 ) *frontViewPosition = FrontViewPositionLeft + symetry*(*frontViewPosition-FrontViewPositionLeft); +} + +- (void)_getDragLocationx:(CGFloat*)xLocation progress:(CGFloat*)progress +{ + UIView *frontView = _contentView.frontView; + *xLocation = frontView.frame.origin.x; + + int symetry = *xLocation<0 ? -1 : 1; + + CGFloat xWidth = symetry < 0 ? _rightViewRevealWidth : _rearViewRevealWidth; + if ( xWidth < 0 ) xWidth = _contentView.bounds.size.width + xWidth; + + *progress = *xLocation/xWidth * symetry; +} + +- (void)_getDragLocation:(CGFloat*)xLocation progress:(CGFloat*)progress overdrawProgress:(CGFloat*)overProgress +{ + UIView *frontView = _contentView.frontView; + *xLocation = frontView.frame.origin.x; + + int symetry = *xLocation<0 ? -1 : 1; + + CGFloat xWidth = symetry < 0 ? _rightViewRevealWidth : _rearViewRevealWidth; + CGFloat xOverWidth = symetry < 0 ? _rightViewRevealOverdraw : _rearViewRevealOverdraw; + + if ( xWidth < 0 ) xWidth = _contentView.bounds.size.width + xWidth; + + *progress = *xLocation*symetry/xWidth; + *overProgress = (*xLocation*symetry-xWidth)/xOverWidth; +} + + +#pragma mark - Deferred block execution queue + +// Define a convenience macro to enqueue single statements +#define _enqueue(code) [self _enqueueBlock:^{code;}]; + +// Defers the execution of the passed in block until a paired _dequeue call is received, +// or executes the block right away if no pending requests are present. +- (void)_enqueueBlock:(void (^)(void))block +{ + [_animationQueue insertObject:block atIndex:0]; + if ( _animationQueue.count == 1) + { + block(); + } +} + +// Removes the top most block in the queue and executes the following one if any. +// Calls to this method must be paired with calls to _enqueueBlock, particularly it may be called +// from within a block passed to _enqueueBlock to remove itself when done with animations. +- (void)_dequeue +{ + [_animationQueue removeLastObject]; + + if ( _animationQueue.count > 0 ) + { + void (^block)(void) = [_animationQueue lastObject]; + block(); + } +} + + +#pragma mark - Gesture Delegate + +- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)recognizer +{ + // only allow gesture if no previous request is in process + if ( _animationQueue.count == 0 ) + { + if ( recognizer == _panGestureRecognizer ) + return [self _panGestureShouldBegin]; + + if ( recognizer == _tapGestureRecognizer ) + return [self _tapGestureShouldBegin]; + } + + return NO; +} + + +- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer +{ + if ( gestureRecognizer == _panGestureRecognizer ) + { + if ( [_delegate respondsToSelector:@selector(revealController:panGestureRecognizerShouldRecognizeSimultaneouslyWithGestureRecognizer:)] ) + if ( [_delegate revealController:self panGestureRecognizerShouldRecognizeSimultaneouslyWithGestureRecognizer:otherGestureRecognizer] != NO ) + return YES; + } + if ( gestureRecognizer == _tapGestureRecognizer ) + { + if ( [_delegate respondsToSelector:@selector(revealController:tapGestureRecognizerShouldRecognizeSimultaneouslyWithGestureRecognizer:)] ) + if ( [_delegate revealController:self tapGestureRecognizerShouldRecognizeSimultaneouslyWithGestureRecognizer:otherGestureRecognizer] != NO ) + return YES; + } + + return NO; +} + + +- (BOOL)_tapGestureShouldBegin +{ + if ( _frontViewPosition == FrontViewPositionLeft || + _frontViewPosition == FrontViewPositionRightMostRemoved || + _frontViewPosition == FrontViewPositionLeftSideMostRemoved ) + return NO; + + // forbid gesture if the following delegate is implemented and returns NO + if ( [_delegate respondsToSelector:@selector(revealControllerTapGestureShouldBegin:)] ) + if ( [_delegate revealControllerTapGestureShouldBegin:self] == NO ) + return NO; + + return YES; +} + + +- (BOOL)_panGestureShouldBegin +{ + // forbid gesture if the initial translation is not horizontal + UIView *recognizerView = _panGestureRecognizer.view; + CGPoint translation = [_panGestureRecognizer translationInView:recognizerView]; +// NSLog( @"translation:%@", NSStringFromCGPoint(translation) ); +// if ( fabs(translation.y/translation.x) > 1 ) +// return NO; + + // forbid gesture if the following delegate is implemented and returns NO + if ( [_delegate respondsToSelector:@selector(revealControllerPanGestureShouldBegin:)] ) + if ( [_delegate revealControllerPanGestureShouldBegin:self] == NO ) + return NO; + + CGFloat xLocation = [_panGestureRecognizer locationInView:recognizerView].x; + CGFloat width = recognizerView.bounds.size.width; + + BOOL draggableBorderAllowing = ( + /*_frontViewPosition != FrontViewPositionLeft ||*/ _draggableBorderWidth == 0.0f || + (_rearViewController && xLocation <= _draggableBorderWidth) || + (_rightViewController && xLocation >= (width - _draggableBorderWidth)) ); + + + BOOL translationForbidding = ( _frontViewPosition == FrontViewPositionLeft && + ((_rearViewController == nil && translation.x > 0) || (_rightViewController == nil && translation.x < 0)) ); + + // allow gesture only within the bounds defined by the draggableBorderWidth property + return draggableBorderAllowing && !translationForbidding ; +} + + +#pragma mark - Gesture Based Reveal + +- (void)_handleTapGesture:(UITapGestureRecognizer *)recognizer +{ + NSTimeInterval duration = _toggleAnimationDuration; + [self _setFrontViewPosition:FrontViewPositionLeft withDuration:duration]; +} + + +- (void)_handleRevealGesture:(UIPanGestureRecognizer *)recognizer +{ + switch ( recognizer.state ) + { + case UIGestureRecognizerStateBegan: + [self _handleRevealGestureStateBeganWithRecognizer:recognizer]; + break; + + case UIGestureRecognizerStateChanged: + [self _handleRevealGestureStateChangedWithRecognizer:recognizer]; + break; + + case UIGestureRecognizerStateEnded: + [self _handleRevealGestureStateEndedWithRecognizer:recognizer]; + break; + + case UIGestureRecognizerStateCancelled: + //case UIGestureRecognizerStateFailed: + [self _handleRevealGestureStateCancelledWithRecognizer:recognizer]; + break; + + default: + break; + } +} + + +- (void)_handleRevealGestureStateBeganWithRecognizer:(UIPanGestureRecognizer *)recognizer +{ + // we know that we will not get here unless the animationQueue is empty because the recognizer + // delegate prevents it, however we do not want any forthcoming programatic actions to disturb + // the gesture, so we just enqueue a dummy block to ensure any programatic acctions will be + // scheduled after the gesture is completed + [self _enqueueBlock:^{}]; // <-- dummy block + + // we store the initial position and initialize a target position + _panInitialFrontPosition = _frontViewPosition; + + // we disable user interactions on the views, however programatic accions will still be + // enqueued to be performed after the gesture completes + [self _disableUserInteraction]; + [self _notifyPanGestureBegan]; +} + + +- (void)_handleRevealGestureStateChangedWithRecognizer:(UIPanGestureRecognizer *)recognizer +{ + CGFloat translation = [recognizer translationInView:_contentView].x; + + CGFloat baseLocation = [_contentView frontLocationForPosition:_panInitialFrontPosition]; + CGFloat xLocation = baseLocation + translation; + + if ( xLocation < 0 ) + { + if ( _rightViewController == nil ) xLocation = 0; + [self _rightViewDeploymentForNewFrontViewPosition:FrontViewPositionLeftSide](); + [self _rearViewDeploymentForNewFrontViewPosition:FrontViewPositionLeftSide](); + } + + if ( xLocation > 0 ) + { + if ( _rearViewController == nil ) xLocation = 0; + [self _rightViewDeploymentForNewFrontViewPosition:FrontViewPositionRight](); + [self _rearViewDeploymentForNewFrontViewPosition:FrontViewPositionRight](); + } + + [_contentView dragFrontViewToXLocation:xLocation]; + [self _notifyPanGestureMoved]; +} + + +- (void)_handleRevealGestureStateEndedWithRecognizer:(UIPanGestureRecognizer *)recognizer +{ + UIView *frontView = _contentView.frontView; + + CGFloat xLocation = frontView.frame.origin.x; + CGFloat velocity = [recognizer velocityInView:_contentView].x; + //NSLog( @"Velocity:%1.4f", velocity); + + // depending on position we compute a simetric replacement of widths and positions + int symetry = xLocation<0 ? -1 : 1; + + // simetring computing of widths + CGFloat revealWidth ; + CGFloat revealOverdraw ; + BOOL bounceBack; + BOOL stableDrag; + + [self _getRevealWidth:&revealWidth revealOverDraw:&revealOverdraw forSymetry:symetry]; + [self _getBounceBack:&bounceBack pStableDrag:&stableDrag forSymetry:symetry]; + + // simetric replacement of position + xLocation = xLocation * symetry; + + // initially we assume drag to left and default duration + FrontViewPosition frontViewPosition = FrontViewPositionLeft; + NSTimeInterval duration = _toggleAnimationDuration; + + // Velocity driven change: + if (ABS(velocity) > _quickFlickVelocity) + { + // we may need to set the drag position and to adjust the animation duration + CGFloat journey = xLocation; + if (velocity*symetry > 0.0f) + { + frontViewPosition = FrontViewPositionRight; + journey = revealWidth - xLocation; + if (xLocation > revealWidth) + { + if (!bounceBack && stableDrag /*&& xPosition > _rearViewRevealWidth+_rearViewRevealOverdraw*0.5f*/) + { + frontViewPosition = FrontViewPositionRightMost; + journey = revealWidth+revealOverdraw - xLocation; + } + } + } + + duration = ABS(journey/velocity); + } + + // Position driven change: + else + { + // we may need to set the drag position + if (xLocation > revealWidth*0.5f) + { + frontViewPosition = FrontViewPositionRight; + if (xLocation > revealWidth) + { + if (bounceBack) + frontViewPosition = FrontViewPositionLeft; + + else if (stableDrag && xLocation > revealWidth+revealOverdraw*0.5f) + frontViewPosition = FrontViewPositionRightMost; + } + } + } + + // symetric replacement of frontViewPosition + [self _getAdjustedFrontViewPosition:&frontViewPosition forSymetry:symetry]; + + // restore user interaction and animate to the final position + [self _restoreUserInteraction]; + [self _notifyPanGestureEnded]; + [self _setFrontViewPosition:frontViewPosition withDuration:duration]; +} + + +- (void)_handleRevealGestureStateCancelledWithRecognizer:(UIPanGestureRecognizer *)recognizer +{ + [self _restoreUserInteraction]; + [self _notifyPanGestureEnded]; + [self _dequeue]; +} + + +#pragma mark Enqueued position and controller setup + +- (void)_dispatchSetFrontViewPosition:(FrontViewPosition)frontViewPosition animated:(BOOL)animated +{ + NSTimeInterval duration = animated?_toggleAnimationDuration:0.0; + __weak SWRevealViewController *theSelf = self; + _enqueue( [theSelf _setFrontViewPosition:frontViewPosition withDuration:duration] ); +} + + +- (void)_dispatchPushFrontViewController:(UIViewController *)newFrontViewController animated:(BOOL)animated +{ + FrontViewPosition preReplacementPosition = FrontViewPositionLeft; + if ( _frontViewPosition > FrontViewPositionLeft ) preReplacementPosition = FrontViewPositionRightMost; + if ( _frontViewPosition < FrontViewPositionLeft ) preReplacementPosition = FrontViewPositionLeftSideMost; + + NSTimeInterval duration = animated?_toggleAnimationDuration:0.0; + NSTimeInterval firstDuration = duration; + NSInteger initialPosDif = ABS( _frontViewPosition - preReplacementPosition ); + if ( initialPosDif == 1 ) firstDuration *= 0.8; + else if ( initialPosDif == 0 ) firstDuration = 0; + + __weak SWRevealViewController *theSelf = self; + if ( animated ) + { + _enqueue( [theSelf _setFrontViewPosition:preReplacementPosition withDuration:firstDuration] ); + _enqueue( [theSelf _performTransitionOperation:SWRevealControllerOperationReplaceFrontController withViewController:newFrontViewController animated:NO] ); + _enqueue( [theSelf _setFrontViewPosition:FrontViewPositionLeft withDuration:duration] ); + } + else + { + _enqueue( [theSelf _performTransitionOperation:SWRevealControllerOperationReplaceFrontController withViewController:newFrontViewController animated:NO] ); + } +} + + +- (void)_dispatchTransitionOperation:(SWRevealControllerOperation)operation withViewController:(UIViewController *)newViewController animated:(BOOL)animated +{ + __weak SWRevealViewController *theSelf = self; + _enqueue( [theSelf _performTransitionOperation:operation withViewController:newViewController animated:animated] ); +} + + +#pragma mark Animated view controller deployment and layout + +// Primitive method for view controller deployment and animated layout to the given position. +- (void)_setFrontViewPosition:(FrontViewPosition)newPosition withDuration:(NSTimeInterval)duration +{ + void (^rearDeploymentCompletion)() = [self _rearViewDeploymentForNewFrontViewPosition:newPosition]; + void (^rightDeploymentCompletion)() = [self _rightViewDeploymentForNewFrontViewPosition:newPosition]; + void (^frontDeploymentCompletion)() = [self _frontViewDeploymentForNewFrontViewPosition:newPosition]; + + void (^animations)() = ^() + { + // Calling this in the animation block causes the status bar to appear/dissapear in sync with our own animation + [self setNeedsStatusBarAppearanceUpdate]; + + // We call the layoutSubviews method on the contentView view and send a delegate, which will + // occur inside of an animation block if any animated transition is being performed + [_contentView layoutSubviews]; + + if ([_delegate respondsToSelector:@selector(revealController:animateToPosition:)]) + [_delegate revealController:self animateToPosition:_frontViewPosition]; + }; + + void (^completion)(BOOL) = ^(BOOL finished) + { + rearDeploymentCompletion(); + rightDeploymentCompletion(); + frontDeploymentCompletion(); + [self _dequeue]; + }; + + if ( duration > 0.0 ) + { + if ( _toggleAnimationType == SWRevealToggleAnimationTypeEaseOut ) + { + [UIView animateWithDuration:duration delay:0.0 + options:UIViewAnimationOptionCurveEaseOut animations:animations completion:completion]; + } + else + { + [UIView animateWithDuration:_toggleAnimationDuration delay:0.0 usingSpringWithDamping:_springDampingRatio initialSpringVelocity:1/duration + options:0 animations:animations completion:completion]; + } + } + else + { + animations(); + completion(YES); + } +} + + +// Primitive method for animated controller transition +//- (void)_performTransitionToViewController:(UIViewController*)new operation:(SWRevealControllerOperation)operation animated:(BOOL)animated +- (void)_performTransitionOperation:(SWRevealControllerOperation)operation withViewController:(UIViewController*)new animated:(BOOL)animated +{ + if ( [_delegate respondsToSelector:@selector(revealController:willAddViewController:forOperation:animated:)] ) + [_delegate revealController:self willAddViewController:new forOperation:operation animated:animated]; + + UIViewController *old = nil; + UIView *view = nil; + + if ( operation == SWRevealControllerOperationReplaceRearController ) + old = _rearViewController, _rearViewController = new, view = _contentView.rearView; + + else if ( operation == SWRevealControllerOperationReplaceFrontController ) + old = _frontViewController, _frontViewController = new, view = _contentView.frontView; + + else if ( operation == SWRevealControllerOperationReplaceRightController ) + old = _rightViewController, _rightViewController = new, view = _contentView.rightView; + + void (^completion)() = [self _transitionFromViewController:old toViewController:new inView:view]; + + void (^animationCompletion)() = ^ + { + completion(); + if ( [_delegate respondsToSelector:@selector(revealController:didAddViewController:forOperation:animated:)] ) + [_delegate revealController:self didAddViewController:new forOperation:operation animated:animated]; + + [self _dequeue]; + }; + + if ( animated ) + { + id animationController = nil; + + if ( [_delegate respondsToSelector:@selector(revealController:animationControllerForOperation:fromViewController:toViewController:)] ) + animationController = [_delegate revealController:self animationControllerForOperation:operation fromViewController:old toViewController:new]; + + if ( !animationController ) + animationController = [[SWDefaultAnimationController alloc] initWithDuration:_replaceViewAnimationDuration]; + + SWContextTransitionObject *transitioningObject = [[SWContextTransitionObject alloc] initWithRevealController:self containerView:view + fromVC:old toVC:new completion:animationCompletion]; + + if ( [animationController transitionDuration:transitioningObject] > 0 ) + [animationController animateTransition:transitioningObject]; + else + animationCompletion(); + } + else + { + animationCompletion(); + } +} + + +#pragma mark Position based view controller deployment + +// Deploy/Undeploy of the front view controller following the containment principles. Returns a block +// that must be invoked on animation completion in order to finish deployment +- (void (^)(void))_frontViewDeploymentForNewFrontViewPosition:(FrontViewPosition)newPosition +{ + if ( (_rightViewController == nil && newPosition < FrontViewPositionLeft) || + (_rearViewController == nil && newPosition > FrontViewPositionLeft) ) + newPosition = FrontViewPositionLeft; + + BOOL positionIsChanging = (_frontViewPosition != newPosition); + + BOOL appear = + (_frontViewPosition >= FrontViewPositionRightMostRemoved || _frontViewPosition <= FrontViewPositionLeftSideMostRemoved || _frontViewPosition == FrontViewPositionNone) && + (newPosition < FrontViewPositionRightMostRemoved && newPosition > FrontViewPositionLeftSideMostRemoved); + + BOOL disappear = + (newPosition >= FrontViewPositionRightMostRemoved || newPosition <= FrontViewPositionLeftSideMostRemoved ) && + (_frontViewPosition < FrontViewPositionRightMostRemoved && _frontViewPosition > FrontViewPositionLeftSideMostRemoved && _frontViewPosition != FrontViewPositionNone); + + if ( positionIsChanging ) + { + if ( [_delegate respondsToSelector:@selector(revealController:willMoveToPosition:)] ) + [_delegate revealController:self willMoveToPosition:newPosition]; + } + + _frontViewPosition = newPosition; + + void (^deploymentCompletion)() = + [self _deploymentForViewController:_frontViewController inView:_contentView.frontView appear:appear disappear:disappear]; + + void (^completion)() = ^() + { + deploymentCompletion(); + if ( positionIsChanging ) + { + if ( [_delegate respondsToSelector:@selector(revealController:didMoveToPosition:)] ) + [_delegate revealController:self didMoveToPosition:newPosition]; + } + }; + + return completion; +} + +// Deploy/Undeploy of the left view controller following the containment principles. Returns a block +// that must be invoked on animation completion in order to finish deployment +- (void (^)(void))_rearViewDeploymentForNewFrontViewPosition:(FrontViewPosition)newPosition +{ + if ( _presentFrontViewHierarchically ) + newPosition = FrontViewPositionRight; + + if ( _rearViewController == nil && newPosition > FrontViewPositionLeft ) + newPosition = FrontViewPositionLeft; + + BOOL appear = (_rearViewPosition <= FrontViewPositionLeft || _rearViewPosition == FrontViewPositionNone) && newPosition > FrontViewPositionLeft; + BOOL disappear = newPosition <= FrontViewPositionLeft && (_rearViewPosition > FrontViewPositionLeft && _rearViewPosition != FrontViewPositionNone); + + if ( appear ) + [_contentView prepareRearViewForPosition:newPosition]; + + _rearViewPosition = newPosition; + + void (^deploymentCompletion)() = + [self _deploymentForViewController:_rearViewController inView:_contentView.rearView appear:appear disappear:disappear]; + + void (^completion)() = ^() + { + deploymentCompletion(); + if ( disappear ) + [_contentView unloadRearView]; + }; + + return completion; +} + +// Deploy/Undeploy of the right view controller following the containment principles. Returns a block +// that must be invoked on animation completion in order to finish deployment +- (void (^)(void))_rightViewDeploymentForNewFrontViewPosition:(FrontViewPosition)newPosition +{ + if ( _rightViewController == nil && newPosition < FrontViewPositionLeft ) + newPosition = FrontViewPositionLeft; + + BOOL appear = (_rightViewPosition >= FrontViewPositionLeft || _rightViewPosition == FrontViewPositionNone) && newPosition < FrontViewPositionLeft ; + BOOL disappear = newPosition >= FrontViewPositionLeft && (_rightViewPosition < FrontViewPositionLeft && _rightViewPosition != FrontViewPositionNone); + + if ( appear ) + [_contentView prepareRightViewForPosition:newPosition]; + + _rightViewPosition = newPosition; + + void (^deploymentCompletion)() = + [self _deploymentForViewController:_rightViewController inView:_contentView.rightView appear:appear disappear:disappear]; + + void (^completion)() = ^() + { + deploymentCompletion(); + if ( disappear ) + [_contentView unloadRightView]; + }; + + return completion; +} + + +- (void (^)(void)) _deploymentForViewController:(UIViewController*)controller inView:(UIView*)view appear:(BOOL)appear disappear:(BOOL)disappear +{ + if ( appear ) return [self _deployForViewController:controller inView:view]; + if ( disappear ) return [self _undeployForViewController:controller]; + return ^{}; +} + + +#pragma mark Containment view controller deployment and transition + +// Containment Deploy method. Returns a block to be invoked at the +// animation completion, or right after return in case of non-animated deployment. +- (void (^)(void))_deployForViewController:(UIViewController*)controller inView:(UIView*)view +{ + if ( !controller || !view ) + return ^(void){}; + + CGRect frame = view.bounds; + + UIView *controllerView = controller.view; + controllerView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + controllerView.frame = frame; + + if ( [controllerView isKindOfClass:[UIScrollView class]] ) + { + BOOL adjust = controller.automaticallyAdjustsScrollViewInsets; + + if ( adjust ) + { + [(id)controllerView setContentInset:UIEdgeInsetsMake(statusBarAdjustment(_contentView), 0, 0, 0)]; + } + } + + [view addSubview:controllerView]; + + void (^completionBlock)(void) = ^(void) + { + // nothing to do on completion at this stage + }; + + return completionBlock; +} + +// Containment Undeploy method. Returns a block to be invoked at the +// animation completion, or right after return in case of non-animated deployment. +- (void (^)(void))_undeployForViewController:(UIViewController*)controller +{ + if (!controller) + return ^(void){}; + + // nothing to do before completion at this stage + + void (^completionBlock)(void) = ^(void) + { + [controller.view removeFromSuperview]; + }; + + return completionBlock; +} + +// Containment Transition method. Returns a block to be invoked at the +// animation completion, or right after return in case of non-animated transition. +- (void(^)(void))_transitionFromViewController:(UIViewController*)fromController toViewController:(UIViewController*)toController inView:(UIView*)view +{ + if ( fromController == toController ) + return ^(void){}; + + if ( toController ) [self addChildViewController:toController]; + + void (^deployCompletion)() = [self _deployForViewController:toController inView:view]; + + [fromController willMoveToParentViewController:nil]; + + void (^undeployCompletion)() = [self _undeployForViewController:fromController]; + + void (^completionBlock)(void) = ^(void) + { + undeployCompletion() ; + [fromController removeFromParentViewController]; + + deployCompletion() ; + [toController didMoveToParentViewController:self]; + }; + return completionBlock; +} + +// Load any defined front/rear controllers from the storyboard +// This method is intended to be overrided in case the default behavior will not meet your needs +- (void)loadStoryboardControllers +{ + if ( self.storyboard && _rearViewController == nil ) + { + //Try each segue separately so it doesn't break prematurely if either Rear or Right views are not used. + @try + { + [self performSegueWithIdentifier:SWSegueRearIdentifier sender:nil]; + } + @catch(NSException *exception) {} + + @try + { + [self performSegueWithIdentifier:SWSegueFrontIdentifier sender:nil]; + } + @catch(NSException *exception) {} + + @try + { + [self performSegueWithIdentifier:SWSegueRightIdentifier sender:nil]; + } + @catch(NSException *exception) {} + } +} + + +#pragma mark state preservation / restoration + ++ (UIViewController *)viewControllerWithRestorationIdentifierPath:(NSArray *)identifierComponents coder:(NSCoder*)coder +{ + SWRevealViewController* vc = nil; + UIStoryboard* sb = [coder decodeObjectForKey:UIStateRestorationViewControllerStoryboardKey]; + + if (sb) + { + vc = (SWRevealViewController*)[sb instantiateViewControllerWithIdentifier:@"SWRevealViewController"]; + vc.restorationIdentifier = [identifierComponents lastObject]; + vc.restorationClass = [SWRevealViewController class]; + } + return vc; +} + + +- (void)encodeRestorableStateWithCoder:(NSCoder *)coder +{ + [coder encodeDouble:_rearViewRevealWidth forKey:@"_rearViewRevealWidth"]; + [coder encodeDouble:_rearViewRevealOverdraw forKey:@"_rearViewRevealOverdraw"]; + [coder encodeDouble:_rearViewRevealDisplacement forKey:@"_rearViewRevealDisplacement"]; + [coder encodeDouble:_rightViewRevealWidth forKey:@"_rightViewRevealWidth"]; + [coder encodeDouble:_rightViewRevealOverdraw forKey:@"_rightViewRevealOverdraw"]; + [coder encodeDouble:_rightViewRevealDisplacement forKey:@"_rightViewRevealDisplacement"]; + [coder encodeBool:_bounceBackOnOverdraw forKey:@"_bounceBackOnOverdraw"]; + [coder encodeBool:_bounceBackOnLeftOverdraw forKey:@"_bounceBackOnLeftOverdraw"]; + [coder encodeBool:_stableDragOnOverdraw forKey:@"_stableDragOnOverdraw"]; + [coder encodeBool:_stableDragOnLeftOverdraw forKey:@"_stableDragOnLeftOverdraw"]; + [coder encodeBool:_presentFrontViewHierarchically forKey:@"_presentFrontViewHierarchically"]; + [coder encodeDouble:_quickFlickVelocity forKey:@"_quickFlickVelocity"]; + [coder encodeDouble:_toggleAnimationDuration forKey:@"_toggleAnimationDuration"]; + [coder encodeInteger:_toggleAnimationType forKey:@"_toggleAnimationType"]; + [coder encodeDouble:_springDampingRatio forKey:@"_springDampingRatio"]; + [coder encodeDouble:_replaceViewAnimationDuration forKey:@"_replaceViewAnimationDuration"]; + [coder encodeDouble:_frontViewShadowRadius forKey:@"_frontViewShadowRadius"]; + [coder encodeCGSize:_frontViewShadowOffset forKey:@"_frontViewShadowOffset"]; + [coder encodeDouble:_frontViewShadowOpacity forKey:@"_frontViewShadowOpacity"]; + [coder encodeObject:_frontViewShadowColor forKey:@"_frontViewShadowColor"]; + [coder encodeBool:_userInteractionStore forKey:@"_userInteractionStore"]; + [coder encodeDouble:_draggableBorderWidth forKey:@"_draggableBorderWidth"]; + [coder encodeBool:_clipsViewsToBounds forKey:@"_clipsViewsToBounds"]; + [coder encodeBool:_extendsPointInsideHit forKey:@"_extendsPointInsideHit"]; + + [coder encodeObject:_rearViewController forKey:@"_rearViewController"]; + [coder encodeObject:_frontViewController forKey:@"_frontViewController"]; + [coder encodeObject:_rightViewController forKey:@"_rightViewController"]; + + [coder encodeInteger:_frontViewPosition forKey:@"_frontViewPosition"]; + + [super encodeRestorableStateWithCoder:coder]; +} + + +- (void)decodeRestorableStateWithCoder:(NSCoder *)coder +{ + _rearViewRevealWidth = [coder decodeDoubleForKey:@"_rearViewRevealWidth"]; + _rearViewRevealOverdraw = [coder decodeDoubleForKey:@"_rearViewRevealOverdraw"]; + _rearViewRevealDisplacement = [coder decodeDoubleForKey:@"_rearViewRevealDisplacement"]; + _rightViewRevealWidth = [coder decodeDoubleForKey:@"_rightViewRevealWidth"]; + _rightViewRevealOverdraw = [coder decodeDoubleForKey:@"_rightViewRevealOverdraw"]; + _rightViewRevealDisplacement = [coder decodeDoubleForKey:@"_rightViewRevealDisplacement"]; + _bounceBackOnOverdraw = [coder decodeBoolForKey:@"_bounceBackOnOverdraw"]; + _bounceBackOnLeftOverdraw = [coder decodeBoolForKey:@"_bounceBackOnLeftOverdraw"]; + _stableDragOnOverdraw = [coder decodeBoolForKey:@"_stableDragOnOverdraw"]; + _stableDragOnLeftOverdraw = [coder decodeBoolForKey:@"_stableDragOnLeftOverdraw"]; + _presentFrontViewHierarchically = [coder decodeBoolForKey:@"_presentFrontViewHierarchically"]; + _quickFlickVelocity = [coder decodeDoubleForKey:@"_quickFlickVelocity"]; + _toggleAnimationDuration = [coder decodeDoubleForKey:@"_toggleAnimationDuration"]; + _toggleAnimationType = [coder decodeIntegerForKey:@"_toggleAnimationType"]; + _springDampingRatio = [coder decodeDoubleForKey:@"_springDampingRatio"]; + _replaceViewAnimationDuration = [coder decodeDoubleForKey:@"_replaceViewAnimationDuration"]; + _frontViewShadowRadius = [coder decodeDoubleForKey:@"_frontViewShadowRadius"]; + _frontViewShadowOffset = [coder decodeCGSizeForKey:@"_frontViewShadowOffset"]; + _frontViewShadowOpacity = [coder decodeDoubleForKey:@"_frontViewShadowOpacity"]; + _frontViewShadowColor = [coder decodeObjectForKey:@"_frontViewShadowColor"]; + _userInteractionStore = [coder decodeBoolForKey:@"_userInteractionStore"]; + _animationQueue = [NSMutableArray array]; + _draggableBorderWidth = [coder decodeDoubleForKey:@"_draggableBorderWidth"]; + _clipsViewsToBounds = [coder decodeBoolForKey:@"_clipsViewsToBounds"]; + _extendsPointInsideHit = [coder decodeBoolForKey:@"_extendsPointInsideHit"]; + + [self setRearViewController:[coder decodeObjectForKey:@"_rearViewController"]]; + [self setFrontViewController:[coder decodeObjectForKey:@"_frontViewController"]]; + [self setRightViewController:[coder decodeObjectForKey:@"_rightViewController"]]; + + [self setFrontViewPosition:[coder decodeIntForKey: @"_frontViewPosition"]]; + + [super decodeRestorableStateWithCoder:coder]; +} + + +- (void)applicationFinishedRestoringState +{ + // nothing to do at this stage +} + + +@end + + +#pragma mark - UIViewController(SWRevealViewController) Category + +@implementation UIViewController(SWRevealViewController) + +- (SWRevealViewController*)revealViewController +{ + UIViewController *parent = self; + Class revealClass = [SWRevealViewController class]; + while ( nil != (parent = [parent parentViewController]) && ![parent isKindOfClass:revealClass] ) {} + return (id)parent; +} + +@end + + +#pragma mark - SWRevealViewControllerSegueSetController segue identifiers + +NSString * const SWSegueRearIdentifier = @"sw_rear"; +NSString * const SWSegueFrontIdentifier = @"sw_front"; +NSString * const SWSegueRightIdentifier = @"sw_right"; + + +#pragma mark - SWRevealViewControllerSegueSetController class + +@implementation SWRevealViewControllerSegueSetController + +- (void)perform +{ + SWRevealControllerOperation operation = SWRevealControllerOperationNone; + + NSString *identifier = self.identifier; + SWRevealViewController *rvc = self.sourceViewController; + UIViewController *dvc = self.destinationViewController; + + if ( [identifier isEqualToString:SWSegueFrontIdentifier] ) + operation = SWRevealControllerOperationReplaceFrontController; + + else if ( [identifier isEqualToString:SWSegueRearIdentifier] ) + operation = SWRevealControllerOperationReplaceRearController; + + else if ( [identifier isEqualToString:SWSegueRightIdentifier] ) + operation = SWRevealControllerOperationReplaceRightController; + + if ( operation != SWRevealControllerOperationNone ) + [rvc _performTransitionOperation:operation withViewController:dvc animated:NO]; +} + +@end + + +#pragma mark - SWRevealViewControllerSeguePushController class + +@implementation SWRevealViewControllerSeguePushController + +- (void)perform +{ + SWRevealViewController *rvc = [self.sourceViewController revealViewController]; + UIViewController *dvc = self.destinationViewController; + [rvc pushFrontViewController:dvc animated:YES]; +} + +@end + + +//#pragma mark - SWRevealViewControllerSegue Class +// +//@implementation SWRevealViewControllerSegue // DEPRECATED +// +//- (void)perform +//{ +// if ( _performBlock ) +// _performBlock( self, self.sourceViewController, self.destinationViewController ); +//} +// +//@end +// +// +//#pragma mark Storyboard support +// +//@implementation SWRevealViewController(deprecated) +// +//- (void)prepareForSegue:(SWRevealViewControllerSegue *)segue sender:(id)sender // TO REMOVE: DEPRECATED IMPLEMENTATION +//{ +// // This method is required for compatibility with SWRevealViewControllerSegue, now deprecated. +// // It can be simply removed when using SWRevealViewControllerSegueSetController and SWRevealViewControlerSeguePushController +// +// NSString *identifier = segue.identifier; +// if ( [segue isKindOfClass:[SWRevealViewControllerSegue class]] && sender == nil ) +// { +// if ( [identifier isEqualToString:SWSegueRearIdentifier] ) +// { +// segue.performBlock = ^(SWRevealViewControllerSegue* rvc_segue, UIViewController* svc, UIViewController* dvc) +// { +// [self _setRearViewController:dvc animated:NO]; +// }; +// } +// else if ( [identifier isEqualToString:SWSegueFrontIdentifier] ) +// { +// segue.performBlock = ^(SWRevealViewControllerSegue* rvc_segue, UIViewController* svc, UIViewController* dvc) +// { +// [self _setFrontViewController:dvc animated:NO]; +// }; +// } +// else if ( [identifier isEqualToString:SWSegueRightIdentifier] ) +// { +// segue.performBlock = ^(SWRevealViewControllerSegue* rvc_segue, UIViewController* svc, UIViewController* dvc) +// { +// [self _setRightViewController:dvc animated:NO]; +// }; +// } +// } +//} +// +//@end + + diff --git a/Sources/Earthquake Network/ViewController/SegnalazioniViewController.h b/Sources/Earthquake Network/ViewController/SegnalazioniViewController.h new file mode 100644 index 0000000..140df14 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/SegnalazioniViewController.h @@ -0,0 +1,13 @@ +// +// SegnalazioniViewController.h +// Earthquake Network +// +// Created by Luca Beretta on 17/10/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "MasterViewController.h" + +@interface SegnalazioniViewController : UIViewController + +@end diff --git a/Sources/Earthquake Network/ViewController/SegnalazioniViewController.m b/Sources/Earthquake Network/ViewController/SegnalazioniViewController.m new file mode 100644 index 0000000..324de6a --- /dev/null +++ b/Sources/Earthquake Network/ViewController/SegnalazioniViewController.m @@ -0,0 +1,381 @@ +// +// SegnalazioniViewController.m +// Earthquake Network +// +// Created by Luca Beretta on 17/10/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "SegnalazioniViewController.h" +#import "ServerRequest.h" +#import "EQNSegnalazione.h" +#import "EQNManager.h" +#import "EQNUser.h" +#import "EQNGeneratoreURLServer.h" +#import "EQNUtility.h" + +@interface SegnalazioniViewController () + +@property (weak, nonatomic) IBOutlet UITableView *tableView; +@property (nonatomic, assign) int verde; +@property (nonatomic, assign) int giallo; +@property (nonatomic, assign) int rosso; +@property (nonatomic, strong) NSUserDefaults *userDefoult; +@property (weak, nonatomic) IBOutlet NSLayoutConstraint *fooTable; + +- (IBAction)inviaMessaggio:(id)sender; + +@end + +@implementation SegnalazioniViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(aggiornaTabella:) name:NOTIFICA_DOWNLOAD_TERMINATO object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(setupView) name:IAPHelperPurchaseNotification object:nil]; + + self.verde = 0; + self.giallo = 0; + self.rosso = 0; + [self setupView]; + + [self.tableView setContentInset:UIEdgeInsetsMake(20,0,0,0)]; + + self.userDefoult = [NSUserDefaults standardUserDefaults]; +} + +-(void)aggiornaTabella:(id)sender{ + + [self setupView]; +} + +-(void)setupView{ + + if([self.userDefoult objectForKey:DATA_MESSAGE_EQN]){ + + NSDate *dateMessage = [self.userDefoult objectForKey:DATA_MESSAGE_EQN]; + if ([EQNUtility getDifferenceMinute:dateMessage] >= TEMPO_INVIO_COMMENTO){ + + [self.userDefoult removeObjectForKey:DATA_MESSAGE_EQN]; + [self.userDefoult removeObjectForKey:CODE_MESSAGE_EQN]; + + } + } + + self.verde = 0; + self.giallo = 0; + self.rosso = 0; + + /* + for(EQNSegnalazione *segn in [EQNManager defaultManager].elencoSelagnazioniManuali){ + + if ([segn.magnitude intValue] == 1) + self.verde++; + if ([segn.magnitude intValue] == 2) + self.giallo++; + if ([segn.magnitude intValue] == 3) + self.rosso++; + } + */ + + + + if([[NSUserDefaults standardUserDefaults] objectForKey:AQUISTO_PRO] || [[NSUserDefaults standardUserDefaults] objectForKey:AQUISTO_PRO_SCONTATO]) + self.fooTable.constant = 0; + + dispatch_async(dispatch_get_main_queue(), ^{ + [self.tableView reloadData]; + }); + +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +- (IBAction)apriMappa:(id)sender { +} + +#pragma table view + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ + + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ + + return 2; +} + +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ + + switch (indexPath.row) { + case 0: + return 140; + break; + default: + return 446; + break; + } +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ + + // modalita base + + EQNReteSmartphone *reteSmartPhone = [EQNManager defaultManager].rete_smartphone; + + switch (indexPath.row) { + case 0:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"primaCell" forIndexPath:indexPath]; + + UILabel *verdeLabel = (UILabel *)[cell viewWithTag:1]; + verdeLabel.text = [NSString stringWithFormat:@"%@", reteSmartPhone.g_man]; + + UILabel *giallaLabel = (UILabel *)[cell viewWithTag:2]; + giallaLabel.text = [NSString stringWithFormat:@"%@", reteSmartPhone.y_man]; + + UILabel *rossaLabel = (UILabel *)[cell viewWithTag:3]; + rossaLabel.text = [NSString stringWithFormat:@"%@", reteSmartPhone.r_man]; + + UIButton *mappaButton = (UIButton *)[cell viewWithTag:4]; + [mappaButton setTitle:[NSLocalizedString(@"Mappa", @"") uppercaseString] forState:UIControlStateNormal]; + mappaButton.layer.borderColor = [UIColor darkGrayColor].CGColor; + mappaButton.layer.borderWidth = 1.5; + mappaButton.layer.cornerRadius = 4; + + return cell; + } + break; + default:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"secondaCell" forIndexPath:indexPath]; + + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = NSLocalizedString(@"Usa il bottone per segnalare il sisma", @""); + + UILabel *verdeLabel = (UILabel *)[cell viewWithTag:2]; + verdeLabel.text = NSLocalizedString(@"LEGGERO\n(Solo percepito)", @""); + verdeLabel.layer.borderColor = [UIColor darkGrayColor].CGColor; + verdeLabel.layer.borderWidth = 1.5; + verdeLabel.layer.cornerRadius = 8; + verdeLabel.clipsToBounds = YES; + + UILabel *giallaLabel = (UILabel *)[cell viewWithTag:3]; + giallaLabel.text = NSLocalizedString(@"FORTE\n(Caduta di oggetti)", @""); + giallaLabel.layer.borderColor = [UIColor darkGrayColor].CGColor; + giallaLabel.layer.borderWidth = 1.5; + giallaLabel.layer.cornerRadius = 8; + giallaLabel.clipsToBounds = YES; + + UILabel *rossaLabel = (UILabel *)[cell viewWithTag:4]; + rossaLabel.text = NSLocalizedString(@"MOLTO FORTE\n(Crollo di edifici)", @""); + rossaLabel.layer.borderColor = [UIColor darkGrayColor].CGColor; + rossaLabel.layer.borderWidth = 1.5; + rossaLabel.layer.cornerRadius = 8; + rossaLabel.clipsToBounds = YES; + + UILabel *info = (UILabel *)[cell viewWithTag:5]; + info.text = NSLocalizedString(@"Invia un messaggio che gli altri utenti possono leggere sul sisma che hai segnalato", @""); + + UIButton *mappaButton = (UIButton *)[cell viewWithTag:6]; + [mappaButton setTitle:[NSLocalizedString(@"Invia messaggio", @"") uppercaseString] forState:UIControlStateNormal]; + mappaButton.layer.borderColor = [UIColor darkGrayColor].CGColor; + mappaButton.layer.borderWidth = 1.5; + mappaButton.layer.cornerRadius = 4; + [mappaButton addTarget:self action:@selector(aggiungCommento:) forControlEvents:UIControlEventTouchDown]; + if([self.userDefoult objectForKey:CODE_MESSAGE_EQN]){ + + mappaButton.enabled = YES; + [mappaButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; + }else{ + mappaButton.enabled = NO; + [mappaButton setTitleColor:[UIColor grayColor] forState:UIControlStateNormal]; + + } + + + + return cell; + } + break; + } + +} +- (IBAction)inviaMessaggio:(id)sender { + + if ([self.userDefoult objectForKey:CODE_MESSAGE_EQN]) { + + NSDate *dateMessage = [self.userDefoult objectForKey:DATA_MESSAGE_EQN]; + if ([EQNUtility getDifferenceMinute:dateMessage] <= TEMPO_INVIO_MESSAGGIO){ + + UIAlertController *messaggio = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Attenzione ", @"") message:NSLocalizedString(@"Il messaggio è già stato in viato, al momento non è possibile inviare una nuova segnalazione", @"") preferredStyle:UIAlertControllerStyleAlert]; + UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { + + return ; + }]; + + [messaggio addAction:defaultAction]; + [self presentViewController:messaggio animated:YES completion:nil]; + + + [self performSelectorOnMainThread:@selector(sincronizzazione) withObject:nil waitUntilDone:YES]; + + + return; + } + + } + + UIButton *button = (UIButton *)sender; + CLGeocoder *geocoder = [CLGeocoder new]; + [geocoder reverseGeocodeLocation:[EQNUser defaultUser].lastPosition + completionHandler:^(NSArray *placemarks, NSError *error) { + + if (error) { + + dispatch_async(dispatch_get_main_queue(), ^{ + + UIAlertController *errore = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Attenzione", @"") message:NSLocalizedString(@"La tua posizione geografica è sconosciuta e non è possibile segnalare il sisma", @"") preferredStyle:UIAlertControllerStyleAlert]; + UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { + + return ; + }]; + + [errore addAction:defaultAction]; + [self presentViewController:errore animated:YES completion:nil]; + + }); + } + + // Check if any placemarks were found + if (placemarks && placemarks.count > 0) + { + CLPlacemark *placemark = placemarks[0]; + // Dictionary containing address information + // NSDictionary *addressDictionary = placemark.addressDictionary; + + NSString *address = [NSString stringWithFormat:@"%@-%@", placemark.locality, placemark.country]; + + NSURL *url = [EQNGeneratoreURLServer urlInvioMessagioTerremoto:button.tag withAdress:address]; + + [[ServerRequest defaultServerConnectionSingleton] inviaInformazioniAlServerWithURL:url richiesta:segnalazzioneTerremoto success:^(id result) { + + [self.userDefoult setObject:result forKey:CODE_MESSAGE_EQN]; + [self.userDefoult setObject:[NSDate date] forKey:DATA_MESSAGE_EQN]; + + UIAlertController *messaggio = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Segnalazione ", @"") message:NSLocalizedString(@"La tua segnalazione è stata inviata correttamente", @"") preferredStyle:UIAlertControllerStyleAlert]; + UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { + + return ; + }]; + + [messaggio addAction:defaultAction]; + [self presentViewController:messaggio animated:YES completion:nil]; + + + [self performSelectorOnMainThread:@selector(sincronizzazione) withObject:nil waitUntilDone:YES]; + + } failure:^(NSError * error) { + + dispatch_async(dispatch_get_main_queue(), ^{ + + + UIAlertController *errore = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Attenzione", @"") message:error.localizedDescription preferredStyle:UIAlertControllerStyleAlert]; + UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { + + return ; + }]; + + [errore addAction:defaultAction]; + [self presentViewController:errore animated:YES completion:nil]; + + }); + + }]; + + } + + }]; + +} + +-(void)aggiungCommento:(id)sender{ + + UIAlertController * alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Messaggio" , @"") + message: @"" + preferredStyle:UIAlertControllerStyleAlert]; + [alertController addTextFieldWithConfigurationHandler:^(UITextField *textField) { + textField.textColor = [UIColor blueColor]; + textField.clearButtonMode = UITextFieldViewModeWhileEditing; + textField.borderStyle = UITextBorderStyleRoundedRect; + }]; + + [alertController addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"OK" ,@"") style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { + + NSArray * textfields = alertController.textFields; + UITextField * messaggio = textfields[0]; + + NSURL *url = [EQNGeneratoreURLServer urlInvioCommentoTerremoto:messaggio.text codeMessage:[self.userDefoult objectForKey:CODE_MESSAGE_EQN]]; + + NSLog(@"url %@", url); + + [[ServerRequest defaultServerConnectionSingleton] inviaInformazioniAlServerWithURL:url richiesta:commentoTerremoto success:^(id result) { + + NSLog(@"Reseult %@",result); + + + } failure:^(NSError * error) { + + + }]; + + [self performSelectorOnMainThread:@selector(inviaCommento:) withObject:messaggio.text waitUntilDone:YES]; + + }]]; + + [alertController addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"Annulla" ,@"") style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { + + + }]]; + + [self presentViewController:alertController animated:YES completion:nil]; + +} + +-(void)inviaCommento:(NSString *)commento{ + +} + +-(void)sincronizzazione{ + + [self.tableView reloadData]; + [[EQNManager defaultManager] sincronizza]; + +} + +-(void)dealloc{ + + [[NSNotificationCenter defaultCenter] removeObserver:self]; + +} + +@end diff --git a/Sources/Earthquake Network/ViewController/TsunamiViewController.h b/Sources/Earthquake Network/ViewController/TsunamiViewController.h new file mode 100644 index 0000000..6e107fb --- /dev/null +++ b/Sources/Earthquake Network/ViewController/TsunamiViewController.h @@ -0,0 +1,13 @@ +// +// TsunamiViewController.h +// Earthquake Network +// +// Created by Luca Beretta on 11/11/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import + +@interface TsunamiViewController : UIViewController + +@end diff --git a/Sources/Earthquake Network/ViewController/TsunamiViewController.m b/Sources/Earthquake Network/ViewController/TsunamiViewController.m new file mode 100644 index 0000000..3271380 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/TsunamiViewController.m @@ -0,0 +1,128 @@ +// +// TsunamiViewController.m +// Earthquake Network +// +// Created by Luca Beretta on 11/11/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "TsunamiViewController.h" +#import "Costanti.h" +#import "EQNManager.h" +#import "Tsunami.h" +#import "DettagliTsunamiViewController.h" + +@interface TsunamiViewController () + +@property (nonatomic, weak) IBOutlet UITableView *tableView; +@property (nonatomic, strong) NSArray *listaTsunami; +@property (weak, nonatomic) IBOutlet NSLayoutConstraint *fooTable; + +@end + +@implementation TsunamiViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(aggiornaTabella:) name:NOTIFICA_DOWNLOAD_TERMINATO object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(setupView) name:IAPHelperPurchaseNotification object:nil]; + + + [self setupView]; + self.listaTsunami = [EQNManager defaultManager].listaTsunami; +} + +-(void)setupView{ + + if([[NSUserDefaults standardUserDefaults] objectForKey:AQUISTO_PRO] || [[NSUserDefaults standardUserDefaults] objectForKey:AQUISTO_PRO_SCONTATO]) + self.fooTable.constant = 0; +} + +-(void)aggiornaTabella:(id)sender{ + + // self.listaSismi = [NSArray arrayWithArray:[EQNManager defaultManager].retiSismiche]; + + [self.tableView reloadData]; +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + + +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. + if ([segue.identifier isEqualToString:@"apriDettagliTsunami"]) { + + DettagliTsunamiViewController *dettagli = (DettagliTsunamiViewController *)segue.destinationViewController; + NSURL *link = (NSURL *)sender; + dettagli.link = link; + } +} + + +#pragma table view + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ + + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ + + return self.listaTsunami.count; +} + +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ + + return 150; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ + + Tsunami *anTsunami = self.listaTsunami[indexPath.row]; + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"tsunami" forIndexPath:indexPath]; + + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = [anTsunami.message uppercaseString]; + + UIImageView *lettera = (UIImageView *)[cell viewWithTag:2]; + UILabel *descrizione = (UILabel *)[cell viewWithTag:3]; + + NSString *place = NSLocalizedString(@"Oceano Pacifico", @""); + if ([anTsunami.receiver isEqualToString:@"Car"]) { + place = NSLocalizedString(@"Mar dei Caraibi", @""); + } + if ([anTsunami.receiver isEqualToString:@"Haw"]) { + place = NSLocalizedString(@"Isole Hawaii", @""); + } + + descrizione.text = [NSString stringWithFormat:@"%@: %@", NSLocalizedString(@"Area di interesse", @""), place]; + UILabel *dettagli = (UILabel *)[cell viewWithTag:5]; + dettagli.text = [NSString stringWithFormat:@"%@: %@ %@ - %@",NSLocalizedString(@"Data", @""), anTsunami.date, NSLocalizedString(@"(Ora tua)", @""), anTsunami.differenza]; + UIImageView *orologio = (UIImageView *)[cell viewWithTag:4]; + + return cell; + +} + +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ + + Tsunami *anTsunami = self.listaTsunami[indexPath.row]; + [self performSegueWithIdentifier:@"apriDettagliTsunami" sender:anTsunami.link]; +} + +-(void)dealloc{ + + [[NSNotificationCenter defaultCenter] removeObserver:self]; + +} + +@end diff --git a/Sources/Earthquake Network/ViewController/VersionePROViewController.h b/Sources/Earthquake Network/ViewController/VersionePROViewController.h new file mode 100644 index 0000000..bc0e32e --- /dev/null +++ b/Sources/Earthquake Network/ViewController/VersionePROViewController.h @@ -0,0 +1,16 @@ +// +// VersionePROViewController.h +// Earthquake Network +// +// Created by Luca Beretta on 16/10/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import + +@interface VersionePROViewController : UIViewController +@property (weak, nonatomic) IBOutlet UILabel *descrizioneAcquisto; +@property (weak, nonatomic) IBOutlet UILabel *prezzo_Acquisto; +@property (weak, nonatomic) IBOutlet UIButton *pilsanteAcquisto; + +@end diff --git a/Sources/Earthquake Network/ViewController/VersionePROViewController.m b/Sources/Earthquake Network/ViewController/VersionePROViewController.m new file mode 100644 index 0000000..003ce86 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/VersionePROViewController.m @@ -0,0 +1,75 @@ +// +// VersionePROViewController.m +// Earthquake Network +// +// Created by Luca Beretta on 16/10/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "VersionePROViewController.h" +#import "Earthquake_Network-Swift.h" +#import "costanti.h" +#import "EQNUtility.h" + +@interface VersionePROViewController () + +@end + +@implementation VersionePROViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. + UIView *viewNavigationBar = [[UIView alloc] initWithFrame:CGRectMake(-18, 5, 150, 44)]; + UIImageView *imageLogo = [[UIImageView alloc] initWithFrame:CGRectMake(-18, 5, 38, 38)]; + imageLogo.image = [UIImage imageNamed:@"distquake_app_wave"]; + [viewNavigationBar addSubview:imageLogo]; + UILabel *textForNavi = [[UILabel alloc] initWithFrame:CGRectMake(25, 5, 160, 38)]; + textForNavi.text = NSLocalizedString(@"Rilevatore Terremoti", @"titolo navigation bar"); + [viewNavigationBar addSubview:textForNavi]; + self.navigationItem.titleView = viewNavigationBar; + + /* + VersioneProProducts.store.requestProducts{ [weak self] success, products in + guard let self = self else { return } + if success { + self.products = products! + + self.tableView.reloadData() + } + + self.refreshControl?.endRefreshing() + } +*/ + +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +-(BOOL)prezzoScontato{ + + NSUInteger i = [[NSUserDefaults standardUserDefaults] integerForKey:CONTEGGIO_APERTURE_PER_SCONTO]; + NSDate *date = [[NSUserDefaults standardUserDefaults] objectForKey:DATA_APERTURE_PER_SCONTO]; + NSUInteger minute = [EQNUtility getDifferenceMinute:date]; + + if (i >= 15 && minute <= TEMPO_APERTURE_PER_SCONTO) + return YES; + else + return NO; + +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/Sources/Earthquake Network/ViewController/WaitViewController.h b/Sources/Earthquake Network/ViewController/WaitViewController.h new file mode 100644 index 0000000..17ac5fa --- /dev/null +++ b/Sources/Earthquake Network/ViewController/WaitViewController.h @@ -0,0 +1,13 @@ +// +// WaitViewController.h +// Earthquake Network +// +// Created by Luca Beretta on 15/10/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import + +@interface WaitViewController : UIViewController + +@end diff --git a/Sources/Earthquake Network/ViewController/WaitViewController.m b/Sources/Earthquake Network/ViewController/WaitViewController.m new file mode 100644 index 0000000..835cda2 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/WaitViewController.m @@ -0,0 +1,52 @@ +// +// WaitViewController.m +// Earthquake Network +// +// Created by Luca Beretta on 15/10/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "WaitViewController.h" +#import "Costanti.h" +@interface WaitViewController () + + +@end + +@implementation WaitViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(chiudi:) name:NOTIFICA_DOWNLOAD_TERMINATO object:nil]; + + [NSTimer scheduledTimerWithTimeInterval:10 target:self selector:@selector(chiudi:) userInfo:nil repeats:NO]; + + + // Do any additional setup after loading the view. +} +-(void)chiudi:(NSNotification *)notifica{ + + [self dismissViewControllerAnimated:NO completion:nil]; + +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +-(void)dealloc{ + + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/Sources/Earthquake Network/ViewController/cellTableView/CellDettagliMappaTableViewCell.h b/Sources/Earthquake Network/ViewController/cellTableView/CellDettagliMappaTableViewCell.h new file mode 100644 index 0000000..e32eb0f --- /dev/null +++ b/Sources/Earthquake Network/ViewController/cellTableView/CellDettagliMappaTableViewCell.h @@ -0,0 +1,19 @@ +// +// CellDettagliMappaTableViewCell.h +// Earthquake Network +// +// Created by Luca Beretta on 31/10/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import +#import "Cell_Reti_sismicheTableViewCell.h" +#import +#import "EQNSisma.h" +#import + +@interface CellDettagliMappaTableViewCell : Cell_Reti_sismicheTableViewCell + +@property (nonatomic, strong) IBOutlet MKMapView *mapView; +-(UIImage *)condividiViewPath; +@end diff --git a/Sources/Earthquake Network/ViewController/cellTableView/CellDettagliMappaTableViewCell.m b/Sources/Earthquake Network/ViewController/cellTableView/CellDettagliMappaTableViewCell.m new file mode 100644 index 0000000..07672d6 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/cellTableView/CellDettagliMappaTableViewCell.m @@ -0,0 +1,55 @@ +// +// CellDettagliMappaTableViewCell.m +// Earthquake Network +// +// Created by Luca Beretta on 31/10/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "CellDettagliMappaTableViewCell.h" +#import "Costanti.h" +#import + +@implementation CellDettagliMappaTableViewCell + +- (void)awakeFromNib { + [super awakeFromNib]; + // Initialization code + [self setupView]; +} + +-(void)setupView{ + + [super setupView]; + + CLLocation *coordinate = [[CLLocation alloc] initWithLatitude:[self.sisma.latitude doubleValue] longitude:[self.sisma.longitude doubleValue]]; + + MKCoordinateSpan span = MKCoordinateSpanMake(0.5, 0.5); + MKCoordinateRegion region = MKCoordinateRegionMake(coordinate.coordinate, span); + + [self.mapView setCenterCoordinate:coordinate.coordinate animated:NO]; + [self.mapView setRegion:region animated:YES]; + self.mapView.scrollEnabled = NO; + +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated { + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + +-(UIImage *)condividiViewPath{ + + // define the size and grab a UIImage from it + + UIGraphicsBeginImageContextWithOptions(self.bounds.size, self.opaque, 0.0); + [self.layer renderInContext:UIGraphicsGetCurrentContext()]; + UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + + return image; +} + + +@end diff --git a/Sources/Earthquake Network/ViewController/cellTableView/Cell_Meteo_TableViewCell.h b/Sources/Earthquake Network/ViewController/cellTableView/Cell_Meteo_TableViewCell.h new file mode 100644 index 0000000..0bcb390 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/cellTableView/Cell_Meteo_TableViewCell.h @@ -0,0 +1,13 @@ +// +// Cell_Meteo_TableViewCell.h +// Earthquake Network +// +// Created by Luca Beretta on 01/11/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "Cell_Reti_sismicheTableViewCell.h" + +@interface Cell_Meteo_TableViewCell : Cell_Reti_sismicheTableViewCell + +@end diff --git a/Sources/Earthquake Network/ViewController/cellTableView/Cell_Meteo_TableViewCell.m b/Sources/Earthquake Network/ViewController/cellTableView/Cell_Meteo_TableViewCell.m new file mode 100644 index 0000000..7e7888a --- /dev/null +++ b/Sources/Earthquake Network/ViewController/cellTableView/Cell_Meteo_TableViewCell.m @@ -0,0 +1,85 @@ +// +// Cell_Meteo_TableViewCell.m +// Earthquake Network +// +// Created by Luca Beretta on 01/11/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "Cell_Meteo_TableViewCell.h" +#import + +@implementation Cell_Meteo_TableViewCell + +- (void)awakeFromNib { + [super awakeFromNib]; + // Initialization code + +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated { + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + +-(void)setupView{ + + [super setupView]; + + NSString *temp = NSLocalizedString(@"Temperatura: ", @""); + NSString *valueTemp = [NSString stringWithFormat:@"%1.f %°C", [self.sisma.te floatValue]-273]; + NSString *tempDesc = [NSString stringWithFormat:@"%@%@", temp, valueTemp]; + + + NSString *pres = NSLocalizedString(@"Pressione:", @""); + NSString *valuePre = [NSString stringWithFormat:@"%@mb", self.sisma.pr]; + NSString *presDesc = [NSString stringWithFormat:@"%@%@",pres, valuePre]; + + NSString *vent = NSLocalizedString(@"Velocità vento: ", @""); + NSString *valueVento = [NSString stringWithFormat:@"%@m/s", self.sisma.ws]; + NSString *ventoDesc = [NSString stringWithFormat:@"%@%@", vent, valueVento]; + + NSString *umi = NSLocalizedString(@"Umidità : ", @""); + NSString *umiValue = [NSString stringWithFormat:@"%@%%", self.sisma.hu]; + NSString *umiditaDesc = [NSString stringWithFormat:@"%@%@", umi, umiValue]; + + NSString *nuv = NSLocalizedString(@"Copertura nuvolosa : ", @""); + NSString *nuvValue = [NSString stringWithFormat:@"%@%%", self.sisma.cl]; + NSString *nuvolDesc = [NSString stringWithFormat:@"%@%@",nuv, nuvValue]; + + UILabel *titolo = (UILabel *)[self viewWithTag:20]; + titolo.text = NSLocalizedString(@"Meteo al momento del sisma", @""); + + UILabel *temperatura = (UILabel *)[self viewWithTag:21]; + temperatura.attributedText = [self getAttributeString:tempDesc withRange:NSMakeRange(temp.length, valueTemp.length)]; + + UILabel *pressione = (UILabel *)[self viewWithTag:22]; + pressione.attributedText = [self getAttributeString:presDesc withRange:NSMakeRange(pres.length, valuePre.length)]; + + UILabel *vento = (UILabel *)[self viewWithTag:23]; + vento.attributedText = [self getAttributeString:ventoDesc withRange:NSMakeRange(vent.length, valueVento.length)]; + + UILabel *umidita = (UILabel *)[self viewWithTag:24]; + umidita.attributedText = [self getAttributeString:umiditaDesc withRange:NSMakeRange(umi.length, umiValue.length)]; + + UILabel *nuvolosita = (UILabel *)[self viewWithTag:25]; + nuvolosita.attributedText = [self getAttributeString:nuvolDesc withRange:NSMakeRange(nuv.length, nuvValue.length)]; + + UIImageView *icona = (UIImageView *)[self viewWithTag:26]; + NSString *imagName = [NSString stringWithFormat:@"weather_%@.png", self.sisma.ic]; + icona.image = [UIImage imageNamed:imagName]; +} + +-(NSMutableAttributedString *)getAttributeString:(NSString *)string withRange:(NSRange )range{ + + NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc] initWithString:string]; + [attrString beginEditing]; + [attrString addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:17] range:range]; + [attrString endEditing]; + + return attrString; + +} + +@end diff --git a/Sources/Earthquake Network/ViewController/cellTableView/Cell_Reti_sismicheTableViewCell.h b/Sources/Earthquake Network/ViewController/cellTableView/Cell_Reti_sismicheTableViewCell.h new file mode 100644 index 0000000..dbfb684 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/cellTableView/Cell_Reti_sismicheTableViewCell.h @@ -0,0 +1,26 @@ +// +// Cell_Reti_sismicheTableViewCell.h +// Earthquake Network +// +// Created by Luca Beretta on 01/11/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import +#import "Costanti.h" +#import "EQNSisma.h" + +@interface Cell_Reti_sismicheTableViewCell : UITableViewCell + +@property (nonatomic, strong) EQNSisma *sisma; +@property (nonatomic, weak) UIButton *mappaButton; +@property (nonatomic, weak) UIButton *meteoButton; +@property (nonatomic, weak) UIButton *chiudi; +@property (nonatomic, weak) UIButton *condividi; +@property (nonatomic, weak) UIButton *dettagliMappa; +@property (nonatomic, weak) UIButton *clickMappa; + +-(void)setupView; +-(void)createOtherButton; +-(void)condividiView; +@end diff --git a/Sources/Earthquake Network/ViewController/cellTableView/Cell_Reti_sismicheTableViewCell.m b/Sources/Earthquake Network/ViewController/cellTableView/Cell_Reti_sismicheTableViewCell.m new file mode 100644 index 0000000..af4b6e7 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/cellTableView/Cell_Reti_sismicheTableViewCell.m @@ -0,0 +1,149 @@ +// +// Cell_Reti_sismicheTableViewCell.m +// Earthquake Network +// +// Created by Luca Beretta on 01/11/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "Cell_Reti_sismicheTableViewCell.h" + +@implementation Cell_Reti_sismicheTableViewCell + +- (void)awakeFromNib { + [super awakeFromNib]; + // Initialization code +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated { + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + +-(void)setupView{ + + UILabel *place = (UILabel *)[self viewWithTag:1]; + place.text = self.sisma.place; + + UILabel *provider = (UILabel *)[self viewWithTag:2]; + provider.text = self.sisma.provider; + + UILabel *magnitudo = (UILabel *)[self viewWithTag:3]; + magnitudo.text = NSLocalizedString(@"Magnitudo", @""); + + UILabel *magnitudoValore = (UILabel *)[self viewWithTag:4]; + magnitudoValore.text = [NSString stringWithFormat:@"%@ mb", self.sisma.magnitude]; + + UILabel *profondita = (UILabel *)[self viewWithTag:5]; + profondita.text = [NSString stringWithFormat:@"%@: %.2f Km", NSLocalizedString(@"Profondità", @""), [self.sisma.depth floatValue]]; + + UILabel *data = (UILabel *)[self viewWithTag:6]; + + int tempo = 0; + if ([self.sisma.differenza intValue] > 60) { + + tempo = [self.sisma.differenza intValue]/60; + data.text = [NSString stringWithFormat:@"%@ %@",NSLocalizedString(@"Data(Ora tua):", @"") , [NSString stringWithFormat:@"%@ - %d %@", self.sisma.data, tempo, NSLocalizedString(@"ore fa", @"")]]; + }else{ + + data.text = [NSString stringWithFormat:@"%@ %@",NSLocalizedString(@"Data(Ora tua):", @"") , [NSString stringWithFormat:@"%@ - %@ %@", self.sisma.data, self.sisma.differenza, NSLocalizedString(@"minuti fa", @"")]]; + } + + // UILabel *dataValue = (UILabel *)[self viewWithTag:8]; + // dataValue.text = ; + + UILabel *distanza = (UILabel *)[self viewWithTag:9]; + distanza.text = [NSString stringWithFormat:@"%@: %@", NSLocalizedString(@"Distanza", @""), [NSString stringWithFormat:@"%i km %@", [self.sisma.distanzaKM intValue], NSLocalizedString(@"dalla tua posizione", @"")]]; + + // UILabel *distanzaValue = (UILabel *)[self viewWithTag:11]; + // distanzaValue.text = ; + + self.mappaButton = (UIButton *)[self viewWithTag:12]; + [self.mappaButton setTitle:NSLocalizedString(@"MAPPA", @"") forState:UIControlStateNormal]; + self.mappaButton.layer.borderWidth = 1; + self.mappaButton.layer.borderColor = [UIColor blackColor].CGColor; + self.mappaButton.layer.cornerRadius = 5; + // [mappa addTarget:self action:@selector(apriMappa:) forControlEvents:UIControlEventTouchDown]; + + UIButton *trend = (UIButton *)[self viewWithTag:13]; + [trend setTitle:NSLocalizedString(@"TRENS", @"") forState:UIControlStateNormal]; + trend.layer.borderWidth = 1; + trend.layer.borderColor = [UIColor blackColor].CGColor; + trend.layer.cornerRadius = 5; + + self.meteoButton = (UIButton *)[self viewWithTag:14]; + [self.meteoButton setTitle:NSLocalizedString(@"METEO", @"") forState:UIControlStateNormal]; + self.meteoButton.layer.borderWidth = 1; + self.meteoButton.layer.borderColor = [UIColor blackColor].CGColor; + self.meteoButton.layer.cornerRadius = 5; + + UIButton *config = (UIButton *)[self viewWithTag:15]; + [config setTitle:NSLocalizedString(@"CONFIG", @"") forState:UIControlStateNormal]; + config.layer.borderWidth = 1; + config.layer.borderColor = [UIColor blackColor].CGColor; + config.layer.cornerRadius = 5; + + self.dettagliMappa = (UIButton *)[self viewWithTag:300]; + self.clickMappa = (UIButton *)[self viewWithTag:112]; + UIView *containerView = (UIView *)[self viewWithTag:100]; + + if([self.sisma.magnitude doubleValue] > 4.0){ + containerView.backgroundColor = COLORE_CELLA_MAGNITUTE_FORTE; + provider.backgroundColor = COLORE_CELLA_MAGNITUTE_FORTE_ETI; + self.mappaButton.backgroundColor = COLORE_CELLA_MAGNITUTE_FORTE_ETI; + trend.backgroundColor = COLORE_CELLA_MAGNITUTE_FORTE_ETI; + self.meteoButton.backgroundColor = COLORE_CELLA_MAGNITUTE_FORTE_ETI; + config.backgroundColor = COLORE_CELLA_MAGNITUTE_FORTE_ETI; + magnitudoValore.textColor = COLORE_CELLA_MAGNITUTE_FORTE_TESTO; + + }else if ([self.sisma.magnitude doubleValue] < 3.0){ + containerView.backgroundColor = COLORE_CELLA_MAGNITUTE_LEGGERA; + provider.backgroundColor = COLORE_CELLA_MAGNITUTE_LEGGERA_ETI; + self.mappaButton.backgroundColor = COLORE_CELLA_MAGNITUTE_LEGGERA_ETI; + trend.backgroundColor = COLORE_CELLA_MAGNITUTE_LEGGERA_ETI; + self.meteoButton.backgroundColor = COLORE_CELLA_MAGNITUTE_LEGGERA_ETI; + config.backgroundColor = COLORE_CELLA_MAGNITUTE_LEGGERA_ETI; + magnitudoValore.textColor = COLORE_CELLA_MAGNITUTE_LEGGERA_TESTO; + + + }else{ + containerView.backgroundColor = COLORE_CELLA_MAGNITUTE_MEDIA; + provider.backgroundColor = COLORE_CELLA_MAGNITUTE_MEDIA_ETI; + self.mappaButton.backgroundColor = COLORE_CELLA_MAGNITUTE_MEDIA_ETI; + trend.backgroundColor = COLORE_CELLA_MAGNITUTE_MEDIA_ETI; + self.meteoButton.backgroundColor = COLORE_CELLA_MAGNITUTE_MEDIA_ETI; + config.backgroundColor = COLORE_CELLA_MAGNITUTE_MEDIA_ETI; + magnitudoValore.textColor = COLORE_CELLA_MAGNITUTE_MEDIA_TESTO; + + } + containerView.layer.cornerRadius = 2; + containerView.layer.masksToBounds = NO; + containerView.layer.shadowOffset = CGSizeMake(0.0, 2); + containerView.layer.shadowRadius = 5; + containerView.layer.shadowOpacity = 0.5; + + +} + +-(void)createOtherButton{ + + self.condividi = (UIButton *)[self viewWithTag:17]; + [self.condividi setTitle:NSLocalizedString(@"CONDIVIDI", @"") forState:UIControlStateNormal]; + self.condividi.layer.borderWidth = 1; + self.condividi.layer.borderColor = [UIColor blackColor].CGColor; + self.condividi.layer.cornerRadius = 5; + // [self.condividi addTarget:self action:@selector(condividiView) forControlEvents:UIControlEventTouchUpInside]; + + self.chiudi = (UIButton *)[self viewWithTag:18]; + [self.chiudi setTitle:NSLocalizedString(@"CHIUDI", @"") forState:UIControlStateNormal]; + self.chiudi.layer.borderWidth = 1; + self.chiudi.layer.borderColor = [UIColor blackColor].CGColor; + self.chiudi.layer.cornerRadius = 5; + +} + +-(void)condividiView{ + +} +@end diff --git a/Sources/Earthquake Network/ViewController/impostazioniNotifiche/AllertaSismiTableViewController.h b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/AllertaSismiTableViewController.h new file mode 100644 index 0000000..082692c --- /dev/null +++ b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/AllertaSismiTableViewController.h @@ -0,0 +1,17 @@ +// +// AletaSismiTableViewController.h +// Earthquake Network +// +// Created by Luca Beretta on 14/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface AllertaSismiTableViewController : UITableViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sources/Earthquake Network/ViewController/impostazioniNotifiche/AllertaSismiTableViewController.m b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/AllertaSismiTableViewController.m new file mode 100644 index 0000000..f45ebee --- /dev/null +++ b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/AllertaSismiTableViewController.m @@ -0,0 +1,537 @@ +// +// AletaSismiTableViewController.m +// Earthquake Network +// +// Created by Luca Beretta on 14/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import "AllertaSismiTableViewController.h" +#import "EQNAllertaSismica.h" +#import "PickerViewController.h" +#import "EQNUtility.h" +#import "TBDInputViewControllerData.h" + +@interface AllertaSismiTableViewController () + +@property (nonatomic, strong) NSArray *lista; +@property (nonatomic, assign) BOOL isAbilitato; +@property (nonatomic, assign) BOOL isSimiSenzaIntensita; +@property (nonatomic, assign) BOOL isintervalloAllarme; + +@property (nonatomic, strong) UITextField *textSismiNotificare; +@property (nonatomic, strong) NSString *stringSismiNotificare; +@property (nonatomic, strong) UITextField *textraggioSismiLievi; +@property (nonatomic, strong) NSString *stringraggioSismiLievi; +@property (nonatomic, strong) UITextField *textraggioSismiForti; +@property (nonatomic, strong) NSString *stringraggioSismiForti; +@property (nonatomic, strong) UITextField *textTono; +@property (nonatomic, strong) NSString *stringaTono; +@property (nonatomic, strong) NSString *oraInizio; +@property (nonatomic, strong) NSString *oraFine; +@property (nonatomic, strong) UITextField *textFildInizio; +@property (nonatomic, strong) UITextField *textFildfine; +@property (nonatomic, strong) PickerViewController *pikerViewIntensita; +@property (nonatomic, strong) PickerViewController *pikerViewDistanza; +@property (nonatomic, strong) PickerViewController *pikerViewToni; +@property (nonatomic, strong) PickerViewController *pikerViewforti; +@property (nonatomic, strong) TBDInputViewControllerData *pikerViewController; +@property (nonatomic, strong) UITextField *textFild; +@property (nonatomic, strong) NSDateFormatter *dateFormatter; +@property (nonatomic, strong) UIColor *textColor; + +@end + +@implementation AllertaSismiTableViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + self.lista = @[NSLocalizedString(@"Abilitato", @"voce menu"), + NSLocalizedString(@"Sismi da notificare", @"voce menu"), + NSLocalizedString(@"Sismi senza intensità", @"voce menu"), + NSLocalizedString(@"Raggio sismi lievi", @"voce menu"), + NSLocalizedString(@"Raggio sismi forti o intensità non disponibile", @"voce menu"), + /*NSLocalizedString(@"Tono di allarme", @"voce menu"), + NSLocalizedString(@"Imposta volume", @"voce menu"), + NSLocalizedString(@"Testa allarme", @"voce menu"),*/ + NSLocalizedString(@"Intervallo allarme", @"voce menu"), + NSLocalizedString(@"Ora di inizio", @"voce menu"), + NSLocalizedString(@"Ora di fine", @"voce menu"),]; + + self.pikerViewIntensita = [[PickerViewController alloc] initWithNibName:@"PickerViewController" bundle:nil dati:@[NSLocalizedString(@"Magnitudo >= 2.0", @"voce menu"), NSLocalizedString(@"Magnitudo >= 3.0", @"voce menu"), NSLocalizedString(@"Magnitudo >= 3.5", @"voce menu"), NSLocalizedString(@"Magnitudo >= 4.5", @"voce menu"), NSLocalizedString(@"Magnitudo >= 5.5", @"voce menu"), NSLocalizedString(@"Magnitudo >= 6.0", @"voce menu"), NSLocalizedString(@"Magnitudo >= 6.5", @"voce menu"), NSLocalizedString(@"Magnitudo >= 7.5", @"voce menu"), NSLocalizedString(@"Magnitudo >= 7.5", @"voce menu")]]; + self.pikerViewIntensita.delegate = self; + + self.pikerViewforti = [[PickerViewController alloc] initWithNibName:@"PickerViewController" bundle:nil dati:@[NSLocalizedString(@"Qualsiasi intensità", @"voce menu"), NSLocalizedString(@"Solo sismi forti", @"voce menu")]]; + self.pikerViewforti.delegate = self; + + self.pikerViewToni = [[PickerViewController alloc] initWithNibName:@"PickerViewController" bundle:nil dati:@[@"alert_star_trek.wav",@"alerta_japanese.m4r",@"alerta_mexico.m4r"]]; + self.pikerViewToni.delegate = self; + + self.pikerViewDistanza = [[PickerViewController alloc] initWithNibName:@"PickerViewController" bundle:nil dati:[EQNUtility arrayRaggioSismi]]; + self.pikerViewDistanza.delegate = self; + + self.pikerViewController = [[TBDInputViewControllerData alloc] initWithNibName:@"TBDInputViewControllerData" bundle:nil]; + self.pikerViewController.delegate = self; + + self.dateFormatter = [[NSDateFormatter alloc] init]; + [self.dateFormatter setDateFormat:@"HH:mm"]; + self.textColor = [UIColor colorWithRed:0 green:0.5647 blue:0.317 alpha:1]; + + + if (![EQNAllertaSismica center].sismiDaNotificare || [[EQNAllertaSismica center].sismiDaNotificare isEqualToString:@"0"]) + [EQNAllertaSismica center].sismiDaNotificare = @"0"; + else{ + [EQNAllertaSismica center].sismiDaNotificare = @"1"; + } + if (![EQNAllertaSismica center].raggioSismiLievi|| [[EQNAllertaSismica center].sismiDaNotificare isEqualToString:@"100000"]) + [EQNAllertaSismica center].raggioSismiLievi = @"100000"; + if (![EQNAllertaSismica center].raggioSismiForti|| [[EQNAllertaSismica center].sismiDaNotificare isEqualToString:@"100000"]) + [EQNAllertaSismica center].raggioSismiForti = @"100000"; + + + [self setupView]; +} + +-(void)setupView{ + + self.isAbilitato = [EQNAllertaSismica center].isAbilitato; + self.isSimiSenzaIntensita = [EQNAllertaSismica center].isSimiSenzaIntensita; + self.isintervalloAllarme = [EQNAllertaSismica center].isintervalloAllarme; + + if (![EQNAllertaSismica center].sismiDaNotificare || [[EQNAllertaSismica center].sismiDaNotificare isEqualToString:@"0"]) + self.stringSismiNotificare = NSLocalizedString(@"Qualsiasi intensità", @"voce menu"); + else + self.stringSismiNotificare = NSLocalizedString(@"Solo sismi forti", @"voce menu"); + + if ([[EQNAllertaSismica center].raggioSismiLievi isEqualToString:@"100000"]) + self.stringraggioSismiLievi = NSLocalizedString(@"Qualsiasi distanza", @"voce elenco raggio sismi"); + else + self.stringraggioSismiLievi = [EQNAllertaSismica center].raggioSismiLievi; + + if ([[EQNAllertaSismica center].raggioSismiForti isEqualToString:@"100000"]) + self.stringraggioSismiForti = NSLocalizedString(@"Qualsiasi distanza", @"voce elenco raggio sismi"); + else + self.stringraggioSismiForti = [EQNAllertaSismica center].raggioSismiForti; + + self.stringaTono = [EQNAllertaSismica center].tonoAllarme; + + if ([EQNAllertaSismica center].oraioInizio) + self.oraInizio = [self.dateFormatter stringFromDate:[EQNAllertaSismica center].oraioInizio]; + else + self.oraInizio = @"8:00"; + if ([EQNAllertaSismica center].orarioFine) + self.oraFine = [self.dateFormatter stringFromDate:[EQNAllertaSismica center].orarioFine]; + else + self.oraFine = @"22:00"; + + [self.tableView reloadData]; +} + + +#pragma mark - Table view data source + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return self.lista.count; +} + +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ + + return 90; + +} + +- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{ + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellSection"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = NSLocalizedString(@"Alerta sismica", @"titolo impostazioni notifiche"); + + return cell; + +} + + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + + switch (indexPath.row) { + case 0:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellaSelezioneAbilita"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + UILabel *stato = (UILabel *)[cell viewWithTag:2]; + stato.text = NSLocalizedString(@"Suona un allarme quando un sisma è rilevato dalla rete di smartphones ", @"voce menu"); + if (self.isAbilitato){ + cell.accessoryType = UITableViewCellAccessoryCheckmark; + titolo.textColor = [UIColor blackColor]; + stato.textColor = [UIColor blackColor]; + } + else{ + cell.accessoryType = UITableViewCellAccessoryNone; + titolo.textColor = [UIColor grayColor]; + stato.textColor = [UIColor grayColor]; + } + return cell; + } + break; + case 1:{ + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"vociDettagli"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + self.textSismiNotificare = (UITextField *)[cell viewWithTag:2]; + self.textSismiNotificare.delegate = self; + self.textSismiNotificare.inputView = self.pikerViewforti.view; + self.textSismiNotificare.text = self.stringSismiNotificare; + if (self.isAbilitato){ + self.textSismiNotificare.textColor = self.textColor; + titolo.textColor = [UIColor blackColor]; + + } + else{ + self.textSismiNotificare.textColor = [UIColor grayColor]; + titolo.textColor = [UIColor grayColor]; + + } + + self.textSismiNotificare.enabled = self.isAbilitato; + + return cell; + + } + break; + case 2:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellaSelezioneAbilita"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + UILabel *stato = (UILabel *)[cell viewWithTag:2]; + stato.text = NSLocalizedString(@"Attiva l'allerta anche su i sismi per i quali non è possibile stimare l'intensità", @"voce menu"); + if (self.isSimiSenzaIntensita && self.isAbilitato){ + cell.accessoryType = UITableViewCellAccessoryCheckmark; + titolo.textColor = [UIColor blackColor]; + stato.textColor = [UIColor blackColor]; + } + else{ + cell.accessoryType = UITableViewCellAccessoryNone; + titolo.textColor = [UIColor grayColor]; + stato.textColor = [UIColor grayColor]; + } + return cell; + } + break; + case 3:{ + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"vociDettagli"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + self.textraggioSismiLievi = (UITextField *)[cell viewWithTag:2]; + self.textraggioSismiLievi.delegate = self; + self.textraggioSismiLievi.inputView = self.pikerViewDistanza.view; + self.textraggioSismiLievi.text = self.stringraggioSismiLievi; + if (self.isAbilitato){ + self.textraggioSismiLievi.textColor = self.textColor; + titolo.textColor = [UIColor blackColor]; + + } + else{ + self.textraggioSismiLievi.textColor = [UIColor grayColor]; + titolo.textColor = [UIColor grayColor]; + + } + self.textraggioSismiLievi.enabled = self.isAbilitato; + + + return cell; + + } + break; + case 4:{ + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"vociDettagli"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + self.textraggioSismiForti = (UITextField *)[cell viewWithTag:2]; + self.textraggioSismiForti.delegate = self; + self.textraggioSismiForti.inputView = self.pikerViewDistanza.view; + self.textraggioSismiForti.text = self.stringraggioSismiForti; + if (self.isAbilitato){ + self.textraggioSismiForti.textColor = self.textColor; + titolo.textColor = [UIColor blackColor]; + + } + else{ + self.textraggioSismiForti.textColor = [UIColor grayColor]; + titolo.textColor = [UIColor grayColor]; + + } + + self.textraggioSismiForti.enabled = self.isAbilitato; + + return cell; + + } + break; + /* case 5:{ + +// UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"vociDettagli" forIndexPath:indexPath]; + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"vociDettagli"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + self.textTono = (UITextField *)[cell viewWithTag:2]; + self.textTono.delegate = self; + self.textTono.inputView = self.pikerViewToni.view; + self.textTono.text = self.stringaTono; + if (self.isAbilitato){ + self.textTono.textColor = [UIColor blackColor]; + titolo.textColor = [UIColor blackColor]; + + } + else{ + self.textTono.textColor = [UIColor grayColor]; + titolo.textColor = [UIColor grayColor]; + + } + self.textTono.enabled = self.isAbilitato; + return cell; + + } + break;*//* + case 5:{ + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"impostazioniNotifiche"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + if (self.isAbilitato){ + titolo.textColor = [UIColor blackColor]; + } + else{ + titolo.textColor = [UIColor grayColor]; + } + return cell; + + } + break; + case 6:{ + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellaSelezioneAbilita"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + UILabel *stato = (UILabel *)[cell viewWithTag:2]; + stato.text = NSLocalizedString(@"Un sisma è simulato. Dovresti ricevere l'allerta e l'allarme dovrebbe suonare. Se attive, ricordati di disabilitare l'invio della mail automatiche ai tuoi contatti per non allarmarli", @"voce menu"); + cell.accessoryType = UITableViewCellAccessoryNone; + if (self.isAbilitato){ + titolo.textColor = [UIColor blackColor]; + stato.textColor = [UIColor blackColor]; + + } + else{ + titolo.textColor = [UIColor grayColor]; + stato.textColor = [UIColor grayColor]; + + } + return cell; + + } + break;*/ + case 5:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellaSelezioneAbilita"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + UILabel *stato = (UILabel *)[cell viewWithTag:2]; + stato.text = NSLocalizedString(@"Suona un allarme quando un sisma è rilevato dalla rete di smartphones ", @"voce menu"); + if (self.isintervalloAllarme && self.isAbilitato){ + cell.accessoryType = UITableViewCellAccessoryCheckmark; + titolo.textColor = [UIColor blackColor]; + stato.textColor = [UIColor blackColor]; + } + else{ + cell.accessoryType = UITableViewCellAccessoryNone; + titolo.textColor = [UIColor grayColor]; + stato.textColor = [UIColor grayColor]; + } + return cell; + + } + break; + + case 6:{ + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"vociDettagli"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + + self.textFildInizio = (UITextField *)[cell viewWithTag:2]; + self.textFildInizio.delegate = self; + self.textFildInizio.inputView = self.pikerViewController.view; + self.textFildInizio.text = self.oraInizio; + self.textFildInizio.enabled = self.isintervalloAllarme; + if (self.isintervalloAllarme && self.isAbilitato) { + titolo.textColor = [UIColor blackColor]; + self.textFildInizio.textColor = self.textColor; + } + else{ + titolo.textColor = [UIColor grayColor]; + self.textFildInizio.textColor = [UIColor grayColor]; + } + + self.textFildInizio.enabled = self.isAbilitato; + + return cell; + + } + break; + case 7:{ + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"vociDettagli"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + self.textFildfine = (UITextField *)[cell viewWithTag:2]; + self.textFildfine.delegate = self; + self.textFildfine.inputView = self.pikerViewController.view; + self.textFildfine.text = self.oraFine; + self.textFildfine.enabled = self.isintervalloAllarme; + if (self.isintervalloAllarme && self.isAbilitato) { + titolo.textColor = [UIColor blackColor]; + self.textFildfine.textColor = self.textColor; + } + else{ + titolo.textColor = [UIColor grayColor]; + self.textFildfine.textColor = [UIColor grayColor]; + } + + self.textFildfine.enabled = self.isAbilitato; + + return cell; + + } + break; + default:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"impostazioniNotifiche"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + if (self.isAbilitato){ + titolo.textColor = [UIColor blackColor]; + + } + else{ + titolo.textColor = [UIColor grayColor]; + + } + return cell; + + }break; + } + +} + +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ + + switch (indexPath.row) { + case 0:{ + self.isAbilitato = !self.isAbilitato; + [EQNAllertaSismica center].isAbilitato = self.isAbilitato; + + [[EQNAllertaSismica center] saveUserInfo]; + [self.tableView reloadData]; + }break; + case 2:{ + self.isSimiSenzaIntensita = !self.isSimiSenzaIntensita; + [EQNAllertaSismica center].isSimiSenzaIntensita = self.isSimiSenzaIntensita; + [[EQNAllertaSismica center] saveUserInfo]; + [self.tableView reloadData]; + }break; + case 5:{ + self.isintervalloAllarme = !self.isintervalloAllarme; + [EQNAllertaSismica center].isintervalloAllarme = self.isintervalloAllarme; + [[EQNAllertaSismica center] saveUserInfo]; + [self.tableView reloadData]; + }break; + default: + break; + } + +} + +# pragma textFild delegate +- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField{ + + self.textFild = textField; + + return YES; +} + +# pragma mark pikerView string + +-(void)inviaDati:(NSDictionary *)elementi{ + + NSString *elemento = elementi[@"elemento"]; +// NSNumber *indice = elementi[@"indice"]; + + if ([elemento isEqualToString:NSLocalizedString(@"Qualsiasi distanza", @"voce elenco raggio sismi")]) + elemento = @"100000"; + + + if ([elemento isEqualToString:NSLocalizedString(@"Solo sismi forti", @"voce menu")]) { + elemento = @"1"; + } + + if ([elemento isEqualToString:NSLocalizedString(@"Qualsiasi intensità", @"voce menu")]) { + elemento = @"0"; + } + + if (self.textFild == self.textSismiNotificare) + [EQNAllertaSismica center].sismiDaNotificare = elemento; + + if (self.textFild == self.textraggioSismiLievi) + [EQNAllertaSismica center].raggioSismiLievi = elemento; + + if (self.textFild == self.textraggioSismiForti) + [EQNAllertaSismica center].raggioSismiForti = elemento; + + if (self.textFild == self.textTono) + [EQNAllertaSismica center].tonoAllarme = elemento; + + if (self.textFild == self.textSismiNotificare) + [EQNAllertaSismica center].sismiDaNotificare = elemento; + + + [[EQNAllertaSismica center] saveUserInfo]; + + [self setupView]; + + [self.tableView endEditing:YES]; + +} + +-(void)chiudiView{ + + [self.tableView endEditing:YES]; + +} + +# pragma mark pikerViewdata data + +-(void)dataSelezionata:(NSDate *)data withTextFild:(UITextField *)textFild{ + + self.textFild.text = [self.dateFormatter stringFromDate:data]; + if (self.textFild == self.textFildInizio) + [EQNAllertaSismica center].oraioInizio = data; + else + [EQNAllertaSismica center].orarioFine = data; + + [[EQNAllertaSismica center] saveUserInfo]; + [self setupView]; + + [self.tableView endEditing:YES]; + +} + +-(void)esci{ + + [self.tableView endEditing:YES]; +} +@end diff --git a/Sources/Earthquake Network/ViewController/impostazioniNotifiche/AreaInteresseTableViewController.h b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/AreaInteresseTableViewController.h new file mode 100644 index 0000000..9317767 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/AreaInteresseTableViewController.h @@ -0,0 +1,17 @@ +// +// AreaInteresseTableViewController.h +// Earthquake Network +// +// Created by Luca Beretta on 14/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface AreaInteresseTableViewController : UITableViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sources/Earthquake Network/ViewController/impostazioniNotifiche/AreaInteresseTableViewController.m b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/AreaInteresseTableViewController.m new file mode 100644 index 0000000..b93b5c5 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/AreaInteresseTableViewController.m @@ -0,0 +1,85 @@ +// +// AreaInteresseTableViewController.m +// Earthquake Network +// +// Created by Luca Beretta on 14/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import "AreaInteresseTableViewController.h" +#import "EQNUtility.h" +#import "EQNNotificheTsunami.h" + +@interface AreaInteresseTableViewController () + +@end + +@implementation AreaInteresseTableViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + if (![EQNNotificheTsunami center].listaAreeInteresse) { + [EQNNotificheTsunami center].listaAreeInteresse = [[EQNUtility arrayAreeInteresseTsunami] copy]; + [[EQNNotificheTsunami center] saveUserInfo]; + } + +} + +#pragma mark - Table view data source + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + + return [EQNUtility arrayAreeInteresseTsunami].count;; + +} + +- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{ + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellSection"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = NSLocalizedString(@"Area di interesse", @"titolo impostazioni notifiche"); + + return cell; + +} +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellaSelezioneAbilita" forIndexPath:indexPath]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = [EQNUtility arrayAreeInteresseTsunami][indexPath.row]; + UILabel *stato = (UILabel *)[cell viewWithTag:2]; + stato.text = NSLocalizedString(@"Ricevi le notifiche dei sismi rilevati dalle agenzie nazionalie internazionali", @"voce menu"); + if ([[EQNNotificheTsunami center].listaAreeInteresse containsObject:titolo.text]){ + cell.accessoryType = UITableViewCellAccessoryCheckmark; + titolo.textColor = [UIColor blackColor]; + stato.textColor = [UIColor blackColor]; + }else{ + cell.accessoryType = UITableViewCellAccessoryNone; + titolo.textColor = [UIColor grayColor]; + stato.textColor = [UIColor grayColor]; + + } + + return cell; +} + +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ + + NSMutableArray *array = [[EQNNotificheTsunami center].listaAreeInteresse mutableCopy]; + NSString *selezioneEnete = [EQNUtility arrayAreeInteresseTsunami][indexPath.row]; + if ([array containsObject:selezioneEnete]) + [array removeObject:selezioneEnete]; + else + [array addObject:selezioneEnete]; + + [EQNNotificheTsunami center].listaAreeInteresse = [NSArray arrayWithArray:array]; + [[EQNNotificheTsunami center] saveUserInfo]; + + [self.tableView reloadData]; +} +@end diff --git a/Sources/Earthquake Network/ViewController/impostazioniNotifiche/DettadliMenuTableViewController.h b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/DettadliMenuTableViewController.h new file mode 100644 index 0000000..1b8c897 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/DettadliMenuTableViewController.h @@ -0,0 +1,18 @@ +// +// DettadliMenuTableViewController.h +// Earthquake Network +// +// Created by Luca Beretta on 08/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface DettadliMenuTableViewController : UITableViewController +@property (nonatomic, strong) NSArray *lista; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sources/Earthquake Network/ViewController/impostazioniNotifiche/DettadliMenuTableViewController.m b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/DettadliMenuTableViewController.m new file mode 100644 index 0000000..e491b8e --- /dev/null +++ b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/DettadliMenuTableViewController.m @@ -0,0 +1,99 @@ +// +// DettadliMenuTableViewController.m +// Earthquake Network +// +// Created by Luca Beretta on 08/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import "DettadliMenuTableViewController.h" +#import "ServerRequest.h" +#import "EQNGeneratoreURLServer.h" + +@interface DettadliMenuTableViewController () + +@end + +@implementation DettadliMenuTableViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Chiudi", @"pulsante chiudi impostazioni") style:UIBarButtonItemStyleDone target:self action:@selector(chiudi:)]; + + self.lista = @[NSLocalizedString(@"Notifiche sismi", @"voce menu"), NSLocalizedString(@"Notifiche tsunami", @"voce menu"), NSLocalizedString(@"Allerta in tempo reale", @"voce menu")]; +} + +#pragma mark - Table view data source + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return self.lista.count; +} + + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"vociDettagli" forIndexPath:indexPath]; + + // Configure the cell... + + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + UIImageView *icona = (UIImageView *)[cell viewWithTag:2]; + NSString *iconaString = @""; + + switch (indexPath.row) { + case 0: + iconaString = @""; + break; + case 1: + iconaString = @""; + break; + case 2: + iconaString = @""; + break; + default: + break; + } + + icona.image = [UIImage imageNamed:iconaString]; + + return cell; +} + +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ + + switch (indexPath.row) { + case 0: + [self performSegueWithIdentifier:@"notificheSismi" sender:nil]; + break; + case 1: + [self performSegueWithIdentifier:@"notificheTsunami" sender:nil]; + break; + case 2: + [self performSegueWithIdentifier:@"allertaSiksmica" sender:nil]; + break; + default: + break; + } + +} + +-(void)chiudi:(id)sender{ + + + [[ServerRequest defaultServerConnectionSingleton] inviaInformazioniAlServerWithURL:[EQNGeneratoreURLServer urlInvioImpostazioniNotifiche] richiesta:impostazioniNotifiche success:^(id result){ + + [self dismissViewControllerAnimated:YES completion:nil]; + + } failure:^(NSError *error){ + + [self dismissViewControllerAnimated:YES completion:nil]; + + }]; + +} +@end diff --git a/Sources/Earthquake Network/ViewController/impostazioniNotifiche/ListaEntiTableViewController.h b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/ListaEntiTableViewController.h new file mode 100644 index 0000000..29828ff --- /dev/null +++ b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/ListaEntiTableViewController.h @@ -0,0 +1,17 @@ +// +// ListaEntiTableViewController.h +// Earthquake Network +// +// Created by Luca Beretta on 13/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface ListaEntiTableViewController : UITableViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sources/Earthquake Network/ViewController/impostazioniNotifiche/ListaEntiTableViewController.m b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/ListaEntiTableViewController.m new file mode 100644 index 0000000..1329e39 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/ListaEntiTableViewController.m @@ -0,0 +1,125 @@ +// +// ListaEntiTableViewController.m +// Earthquake Network +// +// Created by Luca Beretta on 13/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import "ListaEntiTableViewController.h" +#import "EQNNotificeReteSismiche.h" +#import "EQNUtility.h" +@interface ListaEntiTableViewController () + +@end + +@implementation ListaEntiTableViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + +} + +#pragma mark - Table view data source + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return [EQNUtility arrayEnti].count; +} + +- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{ + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellSection"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = NSLocalizedString(@"Reti sismiche", @"titolo impostazioni notifiche"); + + return cell; + +} + + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellaSelezioneAbilita" forIndexPath:indexPath]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = [EQNUtility arrayEnti][indexPath.row]; + UILabel *stato = (UILabel *)[cell viewWithTag:2]; + stato.text = NSLocalizedString(@"Ricevi le notifiche dei sismi rilevati dalle agenzie nazionalie internazionali", @"voce menu"); + cell.accessoryType = UITableViewCellAccessoryNone; + if ([[EQNNotificeReteSismiche center].listaEnti containsObject:titolo.text]){ + cell.accessoryType = UITableViewCellAccessoryCheckmark; + titolo.textColor = [UIColor blackColor]; + stato.textColor = [UIColor blackColor]; + }else{ + cell.accessoryType = UITableViewCellAccessoryNone; + titolo.textColor = [UIColor grayColor]; + stato.textColor = [UIColor grayColor]; + + } + + return cell; +} + +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ + + NSMutableArray *array = [[EQNNotificeReteSismiche center].listaEnti mutableCopy]; + NSString *selezioneEnete = [EQNUtility arrayEnti][indexPath.row]; + if ([array containsObject:selezioneEnete]) + [array removeObject:selezioneEnete]; + else + [array addObject:selezioneEnete]; + + [EQNNotificeReteSismiche center].listaEnti = [NSArray arrayWithArray:array]; + [[EQNNotificeReteSismiche center] saveUserInfo]; + + [self.tableView reloadData]; +} + +/* +// Override to support conditional editing of the table view. +- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { + // Return NO if you do not want the specified item to be editable. + return YES; +} +*/ + +/* +// Override to support editing the table view. +- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { + if (editingStyle == UITableViewCellEditingStyleDelete) { + // Delete the row from the data source + [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; + } else if (editingStyle == UITableViewCellEditingStyleInsert) { + // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view + } +} +*/ + +/* +// Override to support rearranging the table view. +- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath { +} +*/ + +/* +// Override to support conditional rearranging of the table view. +- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { + // Return NO if you do not want the item to be re-orderable. + return YES; +} +*/ + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/Sources/Earthquake Network/ViewController/impostazioniNotifiche/ManuTableViewController.h b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/ManuTableViewController.h new file mode 100644 index 0000000..107684f --- /dev/null +++ b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/ManuTableViewController.h @@ -0,0 +1,17 @@ +// +// ManuTableViewController.h +// Earthquake Network +// +// Created by Luca Beretta on 08/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface ManuTableViewController : UITableViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sources/Earthquake Network/ViewController/impostazioniNotifiche/ManuTableViewController.m b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/ManuTableViewController.m new file mode 100644 index 0000000..0ffb780 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/ManuTableViewController.m @@ -0,0 +1,227 @@ +// +// ManuTableViewController.m +// Earthquake Network +// +// Created by Luca Beretta on 08/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import "ManuTableViewController.h" +#import "EQNUser.h" +#import "Costanti.h" +#import "SWRevealViewController.h" + + +@interface ManuTableViewController () + +@property (nonatomic, strong) NSArray *lista; + +@end + +@implementation ManuTableViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + // Uncomment the following line to preserve selection between presentations. + // self.clearsSelectionOnViewWillAppear = NO; + + // Uncomment the following line to display an Edit button in the navigation bar for this view controller. + // self.navigationItem.rightBarButtonItem = self.editButtonItem; + + self.lista = @[@"presentazione", + NSLocalizedString(@"Impostazioni", @"voce menu"), + NSLocalizedString(@"Informazioni", @"voce menu"), + NSLocalizedString(@"F.A.Q.", @"voce menu"), + /*NSLocalizedString(@"Lista notifiche", @"voce menu"),*/ + NSLocalizedString(@"Disclaimer", @"voce menu"), + NSLocalizedString(@"Autore", @"voce menu"), + NSLocalizedString(@"Privacy", @"voce menu")]; +} + +#pragma mark - Table view data source + + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + + return self.lista.count; +} +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ + + switch (indexPath.row) { + case 0: + return 160; + break; + + default: + return 61; + break; + } + +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + + switch (indexPath.row) { + case 0:{ + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"presentazioneMenu" forIndexPath:indexPath]; + NSString *versioneString = NSLocalizedString(@"Versione", @"etichetta versione app"); + UILabel *versione = (UILabel *)[cell viewWithTag:1]; + versione.text = [NSString stringWithFormat:@"%@: %@", versioneString,[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]]; + UILabel *idUtente = (UILabel *)[cell viewWithTag:2]; + idUtente.text = [NSString stringWithFormat:@"ID: %@", [EQNUser defaultUser].user_ID]; + + + CAGradientLayer *gradient = [CAGradientLayer layer]; + UIColor *blueColor = [UIColor colorWithRed:0.47 green:0.72 blue:0.98 alpha:1]; + gradient.frame = cell.bounds; + gradient.colors = @[(id)blueColor.CGColor, (id)[UIColor whiteColor].CGColor]; + [cell.layer insertSublayer:gradient atIndex:0]; + + + return cell; + + } + break; + + default:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"vociMenu" forIndexPath:indexPath]; + + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + UIImageView *icona = (UIImageView *)[cell viewWithTag:2]; + NSString *iconaString = @""; + switch (indexPath.row) { + case 1: + iconaString = @"ic_settings_black_24dp"; + break; + case 2: + iconaString = @"ic_info_outline_black_24dp"; + break; + case 3: + iconaString = @"ic_help_outline_black_24dp"; + break; + case 4: + iconaString = @"ic_star_border_black_24dp"; + break; + case 5: + iconaString = @"ic_verified_user_black_24dp"; + break; + case 6: + iconaString = @"ic_person_black_24dp"; + break; + case 7: + iconaString = @"ic_shield_half_full_black_24dp"; + break; + default: + break; + } + + icona.image = [UIImage imageNamed:iconaString]; + + return cell; + } + break; + } +} + +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ + + //SWRevealViewController *revealViewController = self.revealViewController; + // if ( revealViewController ) + [self.revealViewController revealToggleAnimated:YES]; + + NSString *indirizzo = @""; + NSString * language = [[NSLocale preferredLanguages] firstObject]; + language = [language substringToIndex:2]; + + + if ([language isEqualToString:@"it"]) + indirizzo = INDIRIZZO_ITALIANO; + else if ([language isEqualToString:@"es"]) + indirizzo = INDIRIZZO_SPAGNOLO; + else + indirizzo = INDIRIZZO_INGLESE; + + + switch (indexPath.row) { + case 0: + return; + break; + case 1: + [[NSNotificationCenter defaultCenter] postNotificationName:NOTIFICHE_SISMI object:nil]; + return; + break; + case 3: + indirizzo = [indirizzo stringByAppendingString:@"/f-a-q/"]; + break; + case 4: + indirizzo = [indirizzo stringByAppendingString:@"/terms-conditions/"]; + break; + case 5: + indirizzo = [indirizzo stringByAppendingString:@"/contact/"]; + break; + case 6: + indirizzo = [indirizzo stringByAppendingString:@"/privacy/"]; + break; + /* default: + [[NSNotificationCenter defaultCenter] postNotificationName:INFORMAZIONI_APP_MENU object:nil userInfo:@{@"indice" : indexPath}]; + break;*/ + } + + NSLog(@"indirizzo %@ %@", indirizzo, language); + + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:indirizzo] options:@{} completionHandler:nil]; + +} + +/* +// Override to support conditional editing of the table view. +- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { + // Return NO if you do not want the specified item to be editable. + return YES; +} +*/ + +/* +// Override to support editing the table view. +- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { + if (editingStyle == UITableViewCellEditingStyleDelete) { + // Delete the row from the data source + [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; + } else if (editingStyle == UITableViewCellEditingStyleInsert) { + // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view + } +} +*/ + +/* +// Override to support rearranging the table view. +- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath { +} +*/ + +/* +// Override to support conditional rearranging of the table view. +- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { + // Return NO if you do not want the item to be re-orderable. + return YES; +} +*/ + + +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} + + +@end diff --git a/Sources/Earthquake Network/ViewController/impostazioniNotifiche/MessaggioInformativoTableViewController.h b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/MessaggioInformativoTableViewController.h new file mode 100644 index 0000000..d2e442e --- /dev/null +++ b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/MessaggioInformativoTableViewController.h @@ -0,0 +1,17 @@ +// +// MessaggioInformativoTableViewController.h +// Earthquake Network +// +// Created by Luca Beretta on 13/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface MessaggioInformativoTableViewController : UITableViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sources/Earthquake Network/ViewController/impostazioniNotifiche/MessaggioInformativoTableViewController.m b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/MessaggioInformativoTableViewController.m new file mode 100644 index 0000000..cb7fbd0 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/MessaggioInformativoTableViewController.m @@ -0,0 +1,89 @@ +// +// MessaggioInformativoTableViewController.m +// Earthquake Network +// +// Created by Luca Beretta on 13/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import "MessaggioInformativoTableViewController.h" +#import "EQNUtility.h" +#import "EQNNotificheTsunami.h" + +@interface MessaggioInformativoTableViewController () + +@end + +@implementation MessaggioInformativoTableViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + if (![EQNNotificheTsunami center].listaMessaggi) { + [EQNNotificheTsunami center].listaMessaggi = [[EQNUtility arrayMessaggiTsunami] copy]; + [[EQNNotificheTsunami center] saveUserInfo]; + } + +} + +#pragma mark - Table view data source + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return [EQNUtility arrayMessaggiTsunami].count;; +} + +- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{ + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellSection"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = NSLocalizedString(@"Tipo messaggio", @"titolo impostazioni notifiche"); + + return cell; + +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellaSelezioneAbilita" forIndexPath:indexPath]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = [EQNUtility arrayMessaggiTsunami][indexPath.row]; + UILabel *stato = (UILabel *)[cell viewWithTag:2]; + stato.text = NSLocalizedString(@"Ricevi le notifiche dei sismi rilevati dalle agenzie nazionalie internazionali", @"voce menu"); + + if ([[EQNNotificheTsunami center].listaMessaggi containsObject:titolo.text]){ + cell.accessoryType = UITableViewCellAccessoryCheckmark; + titolo.textColor = [UIColor blackColor]; + stato.textColor = [UIColor blackColor]; + } + else{ + + cell.accessoryType = UITableViewCellAccessoryNone; + titolo.textColor = [UIColor grayColor]; + stato.textColor = [UIColor grayColor]; + } + + + + return cell; +} + +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ + + NSMutableArray *array = [[EQNNotificheTsunami center].listaMessaggi mutableCopy]; + NSString *selezioneEnete = [EQNUtility arrayMessaggiTsunami][indexPath.row]; + if ([array containsObject:selezioneEnete]) + [array removeObject:selezioneEnete]; + else + [array addObject:selezioneEnete]; + + [EQNNotificheTsunami center].listaMessaggi = [NSArray arrayWithArray:array]; + [[EQNNotificheTsunami center] saveUserInfo]; + + [self.tableView reloadData]; +} + + +@end diff --git a/Sources/Earthquake Network/ViewController/impostazioniNotifiche/NotificheSismiTableViewController.h b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/NotificheSismiTableViewController.h new file mode 100644 index 0000000..7d8f1c5 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/NotificheSismiTableViewController.h @@ -0,0 +1,18 @@ +// +// NotificheSismiTableViewController.h +// Earthquake Network +// +// Created by Luca Beretta on 08/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface NotificheSismiTableViewController : UITableViewController +@property (nonatomic, strong) NSArray *lista; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sources/Earthquake Network/ViewController/impostazioniNotifiche/NotificheSismiTableViewController.m b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/NotificheSismiTableViewController.m new file mode 100644 index 0000000..d3b605f --- /dev/null +++ b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/NotificheSismiTableViewController.m @@ -0,0 +1,235 @@ +// +// NotificheSismiTableViewController.m +// Earthquake Network +// +// Created by Luca Beretta on 08/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import "NotificheSismiTableViewController.h" +#import "TBDInputViewControllerData.h" +#import "EQNImpostazioniNotifiche.h" +#import "EQNUtility.h" +#import "EQNNotificheTempoReale.h" +#import "EQNNotificheSegnalazioniUtente.h" + +@interface NotificheSismiTableViewController () +@property (nonatomic, assign) BOOL abilitaIntervallo; +@property (nonatomic, strong) TBDInputViewControllerData *pikerViewController; +@property (nonatomic, strong) NSString *oraInizio; +@property (nonatomic, strong) NSString *oraFine; +@property (nonatomic, strong) UITextField *textFildInizio; +@property (nonatomic, strong) UITextField *textFildfine; +@property (nonatomic, strong) UITextField *textFild; +@property (nonatomic, strong) NSDateFormatter *dateFormatter; +@property (nonatomic, strong) UIColor *textColor; + +@end + +@implementation NotificheSismiTableViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + self.lista = @[/*NSLocalizedString(@"Notifiche sismi rilevati in tempo reale", @"voce menu"),*/ NSLocalizedString(@"Notifiche segnalazioni utente", @"voce menu"), NSLocalizedString(@"Notifiche da reti sismiche", @"voce menu")/*, NSLocalizedString(@"Intervallo notifiche", @"voce menu"), NSLocalizedString(@"Ora inizio", @"voce menu"), NSLocalizedString(@"Ora fine", @"voce menu")*/]; + + self.pikerViewController = [[TBDInputViewControllerData alloc] initWithNibName:@"TBDInputViewControllerData" bundle:nil]; + self.pikerViewController.delegate = self; + + self.dateFormatter = [[NSDateFormatter alloc] init]; + [self.dateFormatter setDateFormat:@"HH:mm"]; + self.textColor = [UIColor colorWithRed:0 green:0.5647 blue:0.317 alpha:1]; + [self setUpView]; + +} + +-(void)setUpView{ + + self.abilitaIntervallo = [EQNImpostazioniNotifiche center].attivaIntervalloNotifica; + if ([EQNImpostazioniNotifiche center].oraioInizio) + self.oraInizio = [self.dateFormatter stringFromDate:[EQNImpostazioniNotifiche center].oraioInizio]; + else + self.oraInizio = @"8:00"; + if ([EQNImpostazioniNotifiche center].orarioFine) + self.oraFine = [self.dateFormatter stringFromDate:[EQNImpostazioniNotifiche center].orarioFine]; + else + self.oraFine = @"22:00"; + +} +#pragma mark - Table view data source + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 1; +} + +- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{ + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellSection"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = NSLocalizedString(@"Notifiche sismi", @"titolo impostazioni notifiche"); + + return cell; + +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + + return self.lista.count; +} + +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ + + switch (indexPath.row) { + case 0: + return 60; + break; + case 1: + return 60; + break; + /* case 2: + return 60; + break;*/ + default: + break; + } + return 90; + +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + + + switch (indexPath.row) { + case 2:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellaSelezioneOrario"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + UILabel *stato = (UILabel *)[cell viewWithTag:2]; + stato.text = NSLocalizedString(@"Ricevi le notifiche solo in un intervallo del giorno", @"voce menu"); + + if (self.abilitaIntervallo){ + cell.accessoryType = UITableViewCellAccessoryCheckmark; + titolo.textColor = [UIColor blackColor]; + stato.textColor = [UIColor blackColor]; + } + else{ + cell.accessoryType = UITableViewCellAccessoryNone; + titolo.textColor = [UIColor grayColor]; + stato.textColor = [UIColor grayColor]; + } + return cell; + } + break; + case 3:{ + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellaOrario"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + + self.textFildInizio = (UITextField *)[cell viewWithTag:2]; + self.textFildInizio.delegate = self; + self.textFildInizio.inputView = self.pikerViewController.view; + self.textFildInizio.text = self.oraInizio; + self.textFildInizio.enabled = self.abilitaIntervallo; + if (self.abilitaIntervallo) { + titolo.textColor = [UIColor blackColor]; + self.textFildInizio.textColor = self.textColor; + } + else{ + titolo.textColor = [UIColor grayColor]; + self.textFildInizio.textColor = [UIColor grayColor]; + } + + return cell; + + } + break; + case 4:{ + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellaOrario"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + self.textFildfine = (UITextField *)[cell viewWithTag:2]; + self.textFildfine.delegate = self; + self.textFildfine.inputView = self.pikerViewController.view; + self.textFildfine.text = self.oraFine; + self.textFildfine.enabled = self.abilitaIntervallo; + if (self.abilitaIntervallo) { + titolo.textColor = [UIColor blackColor]; + self.textFildfine.textColor = self.textColor; + } + else{ + titolo.textColor = [UIColor grayColor]; + self.textFildfine.textColor = [UIColor grayColor]; + } + return cell; + + } + break; + default:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"impostazioniNotifiche"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + return cell; + + } + break; + } + +} + +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ + + switch (indexPath.row) { + /* case 0:{ + [self performSegueWithIdentifier:@"sismiTempoReale" sender:nil]; + }break;*/ + case 0: + [self performSegueWithIdentifier:@"segnalazioneUtenti" sender:nil]; + break; + case 1: + [self performSegueWithIdentifier:@"retiSismiche" sender:nil]; + break; + case 2:{ + self.abilitaIntervallo = !self.abilitaIntervallo; + [EQNImpostazioniNotifiche center].attivaIntervalloNotifica = self.abilitaIntervallo; + [[EQNImpostazioniNotifiche center] saveUserInfo]; + [self.tableView reloadData]; + }break; + + default: + break; + } + +} + +# pragma textFild delegate +- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField{ + + self.textFild = textField; + + return YES; +} + +# pragma mark pikerViewdata data + +-(void)dataSelezionata:(NSDate *)data withTextFild:(UITextField *)textFild{ + + self.textFild.text = [self.dateFormatter stringFromDate:data]; + if (self.textFild == self.textFildInizio) + [EQNImpostazioniNotifiche center].oraioInizio = data; + else + [EQNImpostazioniNotifiche center].orarioFine = data; + + [[EQNImpostazioniNotifiche center] saveUserInfo]; + [self setUpView]; + + [self.tableView endEditing:YES]; + +} + +-(void)esci{ + + [self.tableView endEditing:YES]; +} +@end diff --git a/Sources/Earthquake Network/ViewController/impostazioniNotifiche/NotificheTsunamiTableViewController.h b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/NotificheTsunamiTableViewController.h new file mode 100644 index 0000000..b83890b --- /dev/null +++ b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/NotificheTsunamiTableViewController.h @@ -0,0 +1,17 @@ +// +// NotificheTsunamiTableViewController.h +// Earthquake Network +// +// Created by Luca Beretta on 13/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface NotificheTsunamiTableViewController : UITableViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sources/Earthquake Network/ViewController/impostazioniNotifiche/NotificheTsunamiTableViewController.m b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/NotificheTsunamiTableViewController.m new file mode 100644 index 0000000..8cd0289 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/NotificheTsunamiTableViewController.m @@ -0,0 +1,300 @@ +// +// NotificheTsunamiTableViewController.m +// Earthquake Network +// +// Created by Luca Beretta on 13/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import "NotificheTsunamiTableViewController.h" +#import "EQNNotificheTsunami.h" +#import "TBDInputViewControllerData.h" +#import "EQNUtility.h" + + +@interface NotificheTsunamiTableViewController () +@property (nonatomic, strong) NSArray *lista; +@property (nonatomic, strong) NSArray *listaVibrazioni; +@property (nonatomic, assign) BOOL isAbilitato; +@property (nonatomic, assign) BOOL isIntervalloNotifiche; +@property (nonatomic, strong) TBDInputViewControllerData *pikerViewController; +@property (nonatomic, strong) NSString *oraInizio; +@property (nonatomic, strong) NSString *oraFine; +@property (nonatomic, strong) UITextField *textFildInizio; +@property (nonatomic, strong) UITextField *textFildfine; +@property (nonatomic, strong) UITextField *textFild; +@property (nonatomic, strong) NSDateFormatter *dateFormatter; +@property (nonatomic, strong) UIColor *textColor; + +@end + +@implementation NotificheTsunamiTableViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + self.lista = @[NSLocalizedString(@"Abilitato", @"voce menu"), /*NSLocalizedString(@"Tipo messaggio", @"voce menu"),*/ NSLocalizedString(@"Area di interesse", @"voce menu" )]; + + self.listaVibrazioni = @[NSLocalizedString(@"Modifica impostazioni", @"voce menu"), NSLocalizedString(@"Intervallo notifiche", @"voce menu"), NSLocalizedString(@"Ora inizio", @"voce menu"), NSLocalizedString(@"Ora fine", @"voce menu")]; + + self.pikerViewController = [[TBDInputViewControllerData alloc] initWithNibName:@"TBDInputViewControllerData" bundle:nil]; + self.pikerViewController.delegate = self; + + self.dateFormatter = [[NSDateFormatter alloc] init]; + [self.dateFormatter setDateFormat:@"HH:mm"]; + self.textColor = [UIColor colorWithRed:0 green:0.5647 blue:0.317 alpha:1]; + + [self setupView]; +} +-(void)setupView{ + + self.isAbilitato = [EQNNotificheTsunami center].isAbilitato; + self.isIntervalloNotifiche = [EQNNotificheTsunami center].isIntervalloNotifiche; + + if ([EQNNotificheTsunami center].oraioInizio) + self.oraInizio = [self.dateFormatter stringFromDate:[EQNNotificheTsunami center].oraioInizio]; + else + self.oraInizio = @"8:00"; + if ([EQNNotificheTsunami center].orarioFine) + self.oraFine = [self.dateFormatter stringFromDate:[EQNNotificheTsunami center].orarioFine]; + else + self.oraFine = @"22:00"; + + [self.tableView reloadData]; +} +#pragma mark - Table view data source + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 1; +} +- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{ + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellSection"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + if (section == 0) + titolo.text = NSLocalizedString(@"Notifiche tsunami", @"titolo impostazioni notifiche"); + else + titolo.text = NSLocalizedString(@"Vibrazioni e suono", @"titolo impostazioni notifiche"); + + return cell; + +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + if (section == 0) + return self.lista.count; + else + return self.listaVibrazioni.count; + +} + +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ + + if (indexPath.section == 0) + switch (indexPath.row) { + case 0: + return 90; + break; + + default: + return 60; + break; + } + + switch (indexPath.row) { + case 0: + return 60; + break; + + default: + return 90; + break; + } +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + + if (indexPath.section == 0) { + switch (indexPath.row) { + case 0:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellaSelezioneAbilita" forIndexPath:indexPath]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + UILabel *stato = (UILabel *)[cell viewWithTag:2]; + stato.text = NSLocalizedString(@"Ricevi le notifiche per i messaggi rilasciati dal Pacific Tsunami Warning Center", @"voce menu"); + if (self.isAbilitato){ + cell.accessoryType = UITableViewCellAccessoryCheckmark; + titolo.textColor = [UIColor blackColor]; + stato.textColor = [UIColor blackColor]; + } + else{ + cell.accessoryType = UITableViewCellAccessoryNone; + titolo.textColor = [UIColor grayColor]; + stato.textColor = [UIColor grayColor]; + } + return cell; + + } + break; + + default:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"impostazioniNotifiche" forIndexPath:indexPath]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + if (self.isAbilitato){ + titolo.textColor = [UIColor blackColor]; + } + else{ + titolo.textColor = [UIColor grayColor]; + } + + + return cell; + + }break; + } + + } + switch (indexPath.row) { + + case 0:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellaEtichettaRossa" forIndexPath:indexPath]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.listaVibrazioni[indexPath.row]; + titolo.textColor = [UIColor blackColor]; + return cell; + } + break; + case 1:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellaSelezioneAbilita" forIndexPath:indexPath]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.listaVibrazioni[indexPath.row]; + UILabel *stato = (UILabel *)[cell viewWithTag:2]; + stato.text = NSLocalizedString(@"Ricevi le notifiche per i messaggi rilasciati dal Pacific Tsunami Warning Center", @"voce menu"); + if (self.isIntervalloNotifiche){ + cell.accessoryType = UITableViewCellAccessoryCheckmark; + titolo.textColor = [UIColor blackColor]; + stato.textColor = [UIColor blackColor]; + } + else{ + cell.accessoryType = UITableViewCellAccessoryNone; + titolo.textColor = [UIColor grayColor]; + stato.textColor = [UIColor grayColor]; + } + return cell; + } + break; + case 2:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellaOrario" forIndexPath:indexPath]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.listaVibrazioni[indexPath.row]; + self.textFildInizio = (UITextField *)[cell viewWithTag:2]; + self.textFildInizio.delegate = self; + self.textFildInizio.inputView = self.pikerViewController.view; + self.textFildInizio.text = self.oraInizio; + self.textFildInizio.enabled = self.isIntervalloNotifiche; + if (self.isIntervalloNotifiche) { + titolo.textColor = [UIColor blackColor]; + self.textFildInizio.textColor = self.textColor; + } + else{ + titolo.textColor = [UIColor grayColor]; + self.textFildInizio.textColor = [UIColor grayColor]; + } + return cell; + + } + break; + default:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellaOrario" forIndexPath:indexPath]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.listaVibrazioni[indexPath.row]; + self.textFildfine = (UITextField *)[cell viewWithTag:2]; + self.textFildfine.delegate = self; + self.textFildfine.inputView = self.pikerViewController.view; + self.textFildfine.text = self.oraFine; + self.textFildfine.enabled = self.isIntervalloNotifiche; + if (self.isIntervalloNotifiche) { + titolo.textColor = [UIColor blackColor]; + self.textFildfine.textColor = self.textColor; + } + else{ + titolo.textColor = [UIColor grayColor]; + self.textFildfine.textColor = [UIColor grayColor]; + } + return cell; + + }break; + + } +} + + +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ + + if(indexPath.section == 0) + switch (indexPath.row) { + case 0:{ + self.isAbilitato = !self.isAbilitato; + [EQNNotificheTsunami center].isAbilitato = self.isAbilitato; + [[EQNNotificheTsunami center] saveUserInfo]; + [self.tableView reloadData]; + }break; + /* case 1: + if (self.isAbilitato) + [self performSegueWithIdentifier:@"messaggioInformativo" sender:nil]; + break;*/ + case 1:{ + if (self.isAbilitato) + [self performSegueWithIdentifier:@"areaInteresse" sender:nil]; + }break; + default: + break; + } + + else{ + + switch (indexPath.row) { + case 1:{ + self.isIntervalloNotifiche = !self.isIntervalloNotifiche; + [EQNNotificheTsunami center].isIntervalloNotifiche = self.isIntervalloNotifiche; + [[EQNNotificheTsunami center] saveUserInfo]; + [self.tableView reloadData]; + default: + break; + } + } + } + +} + +# pragma textFild delegate +- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField{ + + self.textFild = textField; + + return YES; +} + +# pragma mark pikerViewdata data + +-(void)dataSelezionata:(NSDate *)data withTextFild:(UITextField *)textFild{ + + self.textFild.text = [self.dateFormatter stringFromDate:data]; + if (self.textFild == self.textFildInizio) + [EQNNotificheTsunami center].oraioInizio = data; + else + [EQNNotificheTsunami center].orarioFine = data; + + [[EQNNotificheTsunami center] saveUserInfo]; + [self setupView]; + + [self.tableView endEditing:YES]; + +} + +-(void)esci{ + + [self.tableView endEditing:YES]; +} +@end diff --git a/Sources/Earthquake Network/ViewController/impostazioniNotifiche/RetiSismicheTableViewController.h b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/RetiSismicheTableViewController.h new file mode 100644 index 0000000..493160a --- /dev/null +++ b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/RetiSismicheTableViewController.h @@ -0,0 +1,17 @@ +// +// RetiSismicheTableViewController.h +// Earthquake Network +// +// Created by Luca Beretta on 13/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface RetiSismicheTableViewController : UITableViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sources/Earthquake Network/ViewController/impostazioniNotifiche/RetiSismicheTableViewController.m b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/RetiSismicheTableViewController.m new file mode 100644 index 0000000..022e46f --- /dev/null +++ b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/RetiSismicheTableViewController.m @@ -0,0 +1,514 @@ +// +// RetiSismicheTableViewController.m +// Earthquake Network +// +// Created by Luca Beretta on 13/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import "RetiSismicheTableViewController.h" +#import "EQNNotificeReteSismiche.h" +#import "EQNUtility.h" +#import "PickerViewController.h" + +@interface RetiSismicheTableViewController () + +@property (nonatomic, strong) NSArray *lista; +@property (nonatomic, strong) NSArray *listaVibrazioni; +@property (nonatomic, assign) BOOL isAbilitato; +@property (nonatomic, assign) BOOL isAbilitaVicini; +@property (nonatomic, assign) BOOL isTerremortiForti; + +@property (nonatomic, strong) PickerViewController *pikerViewDistanza; +@property (nonatomic, strong) PickerViewController *pikerViewMagnitudoDebole; +@property (nonatomic, strong) PickerViewController *pikerViewMagnitudoForte; + +@property (nonatomic, strong) UITextField *textRaggioPosizione; +@property (nonatomic, strong) NSString *stringRaggioPosizione; +@property (nonatomic, strong) UITextField *textEnergiaSisma; +@property (nonatomic, strong) NSString *stringEnergiaSisma; +@property (nonatomic, strong) UITextField *textDistanzaVicini; +@property (nonatomic, strong) NSString *stringDistanzaVicini; +@property (nonatomic, strong) UITextField *textEnergiaTerremotiForti; +@property (nonatomic, strong) NSString *stringEnergiaTerremotiForti; +@property (nonatomic, strong) UITextField *textFild; + +@property (nonatomic, strong) UIColor *coloreTesto; + +@end + +@implementation RetiSismicheTableViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + self.lista = @[NSLocalizedString(@"Abilitato", @"voce menu"), NSLocalizedString(@"Reti sismiche", @"voce menu"), NSLocalizedString(@"Raggio dalla tua posizione", @"voce menu"), NSLocalizedString(@"Energia sisma", @"voce menu"), NSLocalizedString(@"Terremoti vicini", @"voce menu"), NSLocalizedString(@"Distanza", @"voce menu"), NSLocalizedString(@"Terremoti forti", @"voce menu"), NSLocalizedString(@"Magnitudo", @"voce menu")]; + + self.listaVibrazioni = @[NSLocalizedString(@"Modifica impostazioni", @"voce menu")]; + + self.pikerViewDistanza = [[PickerViewController alloc] initWithNibName:@"PickerViewController" bundle:nil dati:[EQNUtility arrayRaggioSismi]]; + self.pikerViewDistanza.delegate = self; + + self.pikerViewMagnitudoDebole = [[PickerViewController alloc] initWithNibName:@"PickerViewController" bundle:nil dati:@[NSLocalizedString(@"Magnitudo >= 2.0", @"voce menu"), NSLocalizedString(@"Magnitudo >= 3.0", @"voce menu"), NSLocalizedString(@"Magnitudo >= 3.5", @"voce menu"), NSLocalizedString(@"Magnitudo >= 4.5", @"voce menu"), NSLocalizedString(@"Magnitudo >= 5.5", @"voce menu")]]; + self.pikerViewMagnitudoDebole.delegate = self; + + self.pikerViewMagnitudoForte = [[PickerViewController alloc] initWithNibName:@"PickerViewController" bundle:nil dati:@[NSLocalizedString(@"Magnitudo >= 5.5", @"voce menu"), NSLocalizedString(@"Magnitudo >= 6.0", @"voce menu"), NSLocalizedString(@"Magnitudo >= 6.5", @"voce menu"), NSLocalizedString(@"Magnitudo >= 7.5", @"voce menu"), NSLocalizedString(@"Magnitudo >= 7.5", @"voce menu")]]; + self.pikerViewMagnitudoForte.delegate = self; + + if (![EQNNotificeReteSismiche center].distanzaPosizione) + [EQNNotificeReteSismiche center].distanzaPosizione = @"100000"; + if (![EQNNotificeReteSismiche center].distanzaVicini) + [EQNNotificeReteSismiche center].distanzaVicini = @"100000"; //NSLocalizedString(@"Qualsiasi distanza", @"voce elenco raggio sismi"); + + if (![EQNNotificeReteSismiche center].listaEnti) { + [EQNNotificeReteSismiche center].listaEnti = [[EQNUtility arrayEnti] copy]; + [[EQNNotificeReteSismiche center] saveUserInfo]; + } + + [[EQNNotificeReteSismiche center] saveUserInfo]; + + self.coloreTesto = [UIColor colorWithRed:0 green:0.5647 blue:0.317 alpha:1]; + + [self setupView]; +} + +-(void)viewDidAppear:(BOOL)animated{ + + [super viewDidAppear:animated]; + [self.tableView reloadData]; +} +-(void)setupView{ + + self.isAbilitato = [EQNNotificeReteSismiche center].isAbilitato; + self.isAbilitaVicini = [EQNNotificeReteSismiche center].isAbilitaVicini; + self.isTerremortiForti = [EQNNotificeReteSismiche center].isTerremortiForti; + + if ([[EQNNotificeReteSismiche center].distanzaPosizione isEqualToString:@"100000"]) + self.stringRaggioPosizione = NSLocalizedString(@"Qualsiasi distanza", @"voce elenco raggio sismi"); + else + self.stringRaggioPosizione = [EQNNotificeReteSismiche center].distanzaPosizione; + + if ([[EQNNotificeReteSismiche center].distanzaVicini isEqualToString:@"100000"]) + self.stringDistanzaVicini = NSLocalizedString(@"Qualsiasi distanza", @"voce elenco raggio sismi") ; + else + self.stringDistanzaVicini = [EQNNotificeReteSismiche center].distanzaVicini; + + if ([EQNNotificeReteSismiche center].energiaSisma) + self.stringEnergiaSisma = [NSString stringWithFormat:@"%@ >= %@", NSLocalizedString(@"Magnitudo", @""),[EQNNotificeReteSismiche center].energiaSisma]; + else{ + [EQNNotificeReteSismiche center].energiaSisma = @"2.0"; + + self.stringEnergiaSisma = [NSString stringWithFormat:@"%@ >= %@", NSLocalizedString(@"Magnitudo", @""), [EQNNotificeReteSismiche center].energiaSisma]; + } + + if ([EQNNotificeReteSismiche center].energiaTerremotiForti) + self.stringEnergiaTerremotiForti = [NSString stringWithFormat:@"%@ >= %@", NSLocalizedString(@"Magnitudo", @""),[EQNNotificeReteSismiche center].energiaTerremotiForti]; + else{ + [EQNNotificeReteSismiche center].energiaTerremotiForti = @"5.5"; + + self.stringEnergiaTerremotiForti = [NSString stringWithFormat:@"%@ >= %@", NSLocalizedString(@"Magnitudo", @""), [EQNNotificeReteSismiche center].energiaTerremotiForti]; + } + + [self.tableView reloadData]; +} + + +#pragma mark - Table view data source + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + + if (section == 0) + return self.lista.count; + else + return self.listaVibrazioni.count; +} + +- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{ + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellSection"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + if (section == 0) + titolo.text = NSLocalizedString(@"Notifiche da reti sismiche", @"titolo impostazioni notifiche"); + else + titolo.text = NSLocalizedString(@"Vibrazioni e suono", @"titolo impostazioni notifiche"); + + return cell; + +} + +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ + + if (indexPath.section == 0) + return 90; + return 50; + +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + + if (indexPath.section == 0) { + + switch (indexPath.row) { + case 0:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellaSelezioneAbilita"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + UILabel *stato = (UILabel *)[cell viewWithTag:2]; + stato.text = NSLocalizedString(@"Ricevi le notifiche dei sismi rilevati dalle agenzie nazionalie internazionali", @"voce menu"); + + if (self.isAbilitato){ + cell.accessoryType = UITableViewCellAccessoryCheckmark; + titolo.textColor = [UIColor blackColor]; + stato.textColor = [UIColor blackColor]; + } + else{ + cell.accessoryType = UITableViewCellAccessoryNone; + titolo.textColor = [UIColor grayColor]; + stato.textColor = [UIColor grayColor]; + } + return cell; + + } + break; + case 1:{ + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellaEnti"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + UILabel *enti = (UILabel *)[cell viewWithTag:2]; + NSString *elencoEnti = @""; + int i = 1; + for (NSString *ente in [EQNNotificeReteSismiche center].listaEnti){ + + NSString *formato = [NSString stringWithFormat:@"%@, ",ente ]; + if (i == [EQNNotificeReteSismiche center].listaEnti.count) + formato = ente; + elencoEnti = [elencoEnti stringByAppendingString:formato]; + i++; + + } + + + enti.text = elencoEnti; + + if (self.isAbilitato){ + titolo.textColor = [UIColor blackColor]; + enti.textColor = self.coloreTesto; + } + else{ + titolo.textColor = [UIColor grayColor]; + enti.textColor = [UIColor grayColor]; + } + + + return cell; + + } + break; + case 2:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"vociDettagli"]; + + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + // Configure the cell... + self.textRaggioPosizione = (UITextField *)[cell viewWithTag:2]; + self.textRaggioPosizione.inputView = self.pikerViewDistanza.view; + self.textRaggioPosizione.text = self.stringRaggioPosizione; + self.textRaggioPosizione.delegate = self; + if (self.isAbilitato){ + self.textRaggioPosizione.textColor = self.coloreTesto; + titolo.textColor = [UIColor blackColor]; + + } + else{ + self.textRaggioPosizione.textColor = [UIColor grayColor]; + titolo.textColor = [UIColor grayColor]; + + } + + self.textRaggioPosizione.enabled = self.isAbilitato; + return cell; + + } + break; + case 4:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellaSelezioneAbilita"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + UILabel *stato = (UILabel *)[cell viewWithTag:2]; + stato.text = NSLocalizedString(@"Notifica sismi di qualsiasi magnitudo se la distanza è inferiore a", @"voce menu"); + + if (self.isAbilitaVicini && self.isAbilitato){ + cell.accessoryType = UITableViewCellAccessoryCheckmark; + titolo.textColor = [UIColor blackColor]; + stato.textColor = [UIColor blackColor]; + } + else{ + cell.accessoryType = UITableViewCellAccessoryNone; + titolo.textColor = [UIColor grayColor]; + stato.textColor = [UIColor grayColor]; + } + return cell; + + } + break; + + case 3:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"vociDettagli"]; + + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + // Configure the cell... + self.textEnergiaSisma = (UITextField *)[cell viewWithTag:2]; + self.textEnergiaSisma.inputView = self.pikerViewMagnitudoDebole.view; + self.textEnergiaSisma.text = self.stringEnergiaSisma; + self.textEnergiaSisma.delegate = self; + + if (self.isAbilitato){ + self.textEnergiaSisma.textColor = self.coloreTesto; + titolo.textColor = [UIColor blackColor]; + + } + else{ + self.textEnergiaSisma.textColor = [UIColor grayColor]; + titolo.textColor = [UIColor grayColor]; + + } + + self.textEnergiaSisma.enabled = self.isAbilitato; + + return cell; + + } + break; + case 5:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"vociDettagli"]; + + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + // Configure the cell... + self.textDistanzaVicini = (UITextField *)[cell viewWithTag:2]; + self.textDistanzaVicini.inputView = self.pikerViewDistanza.view; + self.textDistanzaVicini.text = self.stringDistanzaVicini; + self.textDistanzaVicini.delegate = self; + + if (self.isAbilitaVicini && self.isAbilitato){ + self.textDistanzaVicini.textColor = self.coloreTesto; + titolo.textColor = [UIColor blackColor]; + } + else{ + self.textDistanzaVicini.textColor = [UIColor grayColor]; + titolo.textColor = [UIColor grayColor]; + } + self.textDistanzaVicini.enabled = self.isAbilitaVicini; + self.textDistanzaVicini.enabled = self.isAbilitato; + + + + return cell; + + } + break; + case 6:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellaSelezioneAbilita"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + UILabel *stato = (UILabel *)[cell viewWithTag:2]; + stato.text = NSLocalizedString(@"Notifica sismi forti a qualsiasi distanza se la magnitudo è maggiore a", @"voce menu"); + + if (self.isTerremortiForti && self.isAbilitato){ + cell.accessoryType = UITableViewCellAccessoryCheckmark; + titolo.textColor = [UIColor blackColor]; + stato.textColor = [UIColor blackColor]; + } + else{ + cell.accessoryType = UITableViewCellAccessoryNone; + titolo.textColor = [UIColor grayColor]; + stato.textColor = [UIColor grayColor]; + } + return cell; + + } + break; + case 7:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"vociDettagli"]; + + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + // Configure the cell... + self.textEnergiaTerremotiForti = (UITextField *)[cell viewWithTag:2]; + self.textEnergiaTerremotiForti.inputView = self.pikerViewMagnitudoForte.view; + self.textEnergiaTerremotiForti.text = self.stringEnergiaTerremotiForti; + self.textEnergiaTerremotiForti.delegate = self; + + if (self.isTerremortiForti && self.isAbilitato){ + self.textEnergiaTerremotiForti.textColor = self.coloreTesto; + titolo.textColor = [UIColor blackColor]; + } + else{ + self.textEnergiaTerremotiForti.textColor = [UIColor grayColor]; + titolo.textColor = [UIColor grayColor]; + } + self.textEnergiaTerremotiForti.enabled = self.isAbilitaVicini; + self.textEnergiaTerremotiForti.enabled = self.isAbilitato; + + return cell; + + } + break; + default:{ + + }break; + } + + } + + // Configure the cell... + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellaEtichettaRossa"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.listaVibrazioni[indexPath.row]; + titolo.textColor = [UIColor blackColor]; + + return cell; +} + +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ + + if(indexPath.section == 0) + switch (indexPath.row) { + case 0:{ + self.isAbilitato = !self.isAbilitato; + [EQNNotificeReteSismiche center].isAbilitato = self.isAbilitato; + [[EQNNotificeReteSismiche center] saveUserInfo]; + [self.tableView reloadData]; + }break; + case 1: + [self performSegueWithIdentifier:@"listaEventi" sender:nil]; + break; + case 4:{ + self.isAbilitaVicini = !self.isAbilitaVicini; + [EQNNotificeReteSismiche center].isAbilitaVicini = self.isAbilitaVicini; + [[EQNNotificeReteSismiche center] saveUserInfo]; + [self.tableView reloadData]; + }break; + case 6:{ + self.isTerremortiForti = !self.isTerremortiForti; + [EQNNotificeReteSismiche center].isTerremortiForti = self.isTerremortiForti; + [[EQNNotificeReteSismiche center] saveUserInfo]; + [self.tableView reloadData]; + }break; + default: + break; + } + + else{ + + } + +} + + +# pragma textFild delegate +- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField{ + + self.textFild = textField; + + return YES; +} + +# pragma mark pikerView string + +-(void)inviaDati:(NSDictionary *)elementi{ + + NSString *elemento = elementi[@"elemento"]; + NSNumber *indice = elementi[@"indice"]; + + if ([elemento isEqualToString:NSLocalizedString(@"Qualsiasi distanza", @"voce elenco raggio sismi")]) { + elemento = @"100000"; + } + + if (self.textFild == self.textRaggioPosizione) + [EQNNotificeReteSismiche center].distanzaPosizione = elemento; + + if (self.textFild == self.textDistanzaVicini) + [EQNNotificeReteSismiche center].distanzaVicini = elemento; + + if (self.textFild == self.textEnergiaSisma){ + + NSString *intesita = @""; + switch ([indice intValue]) { + case 0: + intesita = @"2.0"; + break; + case 1: + intesita = @"3.0"; + break; + case 2: + intesita = @"3.5"; + break; + case 3: + intesita = @"4.0"; + break; + case 4: + intesita = @"4.5"; + break; + case 5: + intesita = @"5.0"; + break; + case 6: + intesita = @"5.5"; + break; + default: + break; + } + + [EQNNotificeReteSismiche center].energiaSisma = intesita; + + } + + if (self.textFild == self.textEnergiaTerremotiForti) { + + NSString *intesita = @""; + switch ([indice intValue]) { + case 0: + intesita = @"5.5"; + break; + case 1: + intesita = @"6.0"; + break; + case 2: + intesita = @"6.5"; + break; + case 3: + intesita = @"7.0"; + break; + case 4: + intesita = @"7.5"; + break; + default: + break; + } + + [EQNNotificeReteSismiche center].energiaTerremotiForti = intesita; + + } + [[EQNNotificeReteSismiche center] saveUserInfo]; + + [self setupView]; + + [self.tableView endEditing:YES]; + +} + +-(void)chiudiView{ + + [self.tableView endEditing:YES]; + +} + +@end diff --git a/Sources/Earthquake Network/ViewController/impostazioniNotifiche/SegnalazioniUtentiTableViewController.h b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/SegnalazioniUtentiTableViewController.h new file mode 100644 index 0000000..c33818d --- /dev/null +++ b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/SegnalazioniUtentiTableViewController.h @@ -0,0 +1,17 @@ +// +// SegnalazioniUtentiTableViewController.h +// Earthquake Network +// +// Created by Luca Beretta on 12/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface SegnalazioniUtentiTableViewController : UITableViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sources/Earthquake Network/ViewController/impostazioniNotifiche/SegnalazioniUtentiTableViewController.m b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/SegnalazioniUtentiTableViewController.m new file mode 100644 index 0000000..951f369 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/SegnalazioniUtentiTableViewController.m @@ -0,0 +1,205 @@ +// +// SegnalazioniUtentiTableViewController.m +// Earthquake Network +// +// Created by Luca Beretta on 12/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import "SegnalazioniUtentiTableViewController.h" +#import "PickerViewController.h" +#import "EQNNotificheSegnalazioniUtente.h" +#import "EQNUtility.h" + +@interface SegnalazioniUtentiTableViewController () + +@property (nonatomic, strong) NSArray *lista; +@property (nonatomic, strong) NSArray *listaVibrazioni; +@property (nonatomic, assign) BOOL isAbilitato; +@property (nonatomic, strong) UITextField *textRaggioPosizione; +@property (nonatomic, strong) NSString *stringRaggioPosizione; +@property (nonatomic, strong) PickerViewController *pikerViewDistanza; +@property (nonatomic, strong) UIColor *textColor; + +@end + +@implementation SegnalazioniUtentiTableViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + self.lista = @[NSLocalizedString(@"Abilitato", @"voce menu"), NSLocalizedString(@"Raggio dalla tua posizione", @"voce menu")]; + + self.listaVibrazioni = @[NSLocalizedString(@"Modifica impostazioni", @"voce menu")]; + + self.pikerViewDistanza = [[PickerViewController alloc] initWithNibName:@"PickerViewController" bundle:nil dati:[EQNUtility arrayRaggioSismi]]; + self.pikerViewDistanza.delegate = self; + + if (![EQNNotificheSegnalazioniUtente center].distanzaPosizione) + [EQNNotificheSegnalazioniUtente center].distanzaPosizione = @"100000"; //NSLocalizedString(@"Qualsiasi distanza", @"voce elenco raggio sismi"); + [[EQNNotificheSegnalazioniUtente center] saveUserInfo]; + + self.textColor = [UIColor colorWithRed:0 green:0.5647 blue:0.317 alpha:1]; + + [self setupView]; +} + +-(void)setupView{ + + self.isAbilitato = [EQNNotificheSegnalazioniUtente center].isAbilitato; + + if ([[EQNNotificheSegnalazioniUtente center].distanzaPosizione isEqualToString:@"100000"]) + self.stringRaggioPosizione = NSLocalizedString(@"Qualsiasi distanza", @"voce elenco raggio sismi"); + else + self.stringRaggioPosizione = [EQNNotificheSegnalazioniUtente center].distanzaPosizione; + + [self.tableView reloadData]; +} + +#pragma mark - Table view data source + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 1; +} +- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{ + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellSection"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + if (section == 0) + titolo.text = NSLocalizedString(@"Notifiche segnalazioni utente", @"titolo impostazioni notifiche"); + else + titolo.text = NSLocalizedString(@"Vibrazioni e suono", @"titolo impostazioni notifiche"); + + return cell; + +} + +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ + + if (indexPath.section == 0) + return 90; + + return 50; + +} +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + + switch (section) { + case 0: + return self.lista.count; + break; + + default: + return self.listaVibrazioni.count; + break; + } + return 0; +} + + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + + if (indexPath.section == 0) { + + switch (indexPath.row) { + case 0:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellaSelezioneAbilita"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + UILabel *stato = (UILabel *)[cell viewWithTag:2]; + stato.text = NSLocalizedString(@"Ricevi le notifiche dei suonisegnalati manualemente dagli utenti", @"voce menu"); + + if (self.isAbilitato){ + cell.accessoryType = UITableViewCellAccessoryCheckmark; + titolo.textColor = [UIColor blackColor]; + stato.textColor = [UIColor blackColor]; + } + else{ + cell.accessoryType = UITableViewCellAccessoryNone; + titolo.textColor = [UIColor grayColor]; + stato.textColor = [UIColor grayColor]; + } + return cell; + + } + break; + default:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"vociDettagli"]; + + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + // Configure the cell... + self.textRaggioPosizione = (UITextField *)[cell viewWithTag:2]; + self.textRaggioPosizione.inputView = self.pikerViewDistanza.view; + self.textRaggioPosizione.text = self.stringRaggioPosizione; + if (self.isAbilitato){ + self.textRaggioPosizione.textColor = self.textColor; + } + else{ + self.textRaggioPosizione.textColor = [UIColor grayColor]; + } + self.textRaggioPosizione.enabled = self.isAbilitato; + return cell; + }break; + } + + } + + // Configure the cell... + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellaEtichettaRossa"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.listaVibrazioni[indexPath.row]; + titolo.textColor = [UIColor blackColor]; + + return cell; + +} + +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ + + if(indexPath.section == 0) + switch (indexPath.row) { + case 0:{ + self.isAbilitato = !self.isAbilitato; + [EQNNotificheSegnalazioniUtente center].isAbilitato = self.isAbilitato; + [[EQNNotificheSegnalazioniUtente center] saveUserInfo]; + [self.tableView reloadData]; + }break; + default: + break; + } + + else{ + + } + +} + +# pragma mark pikerView string + +-(void)inviaDati:(NSDictionary *)elementi{ + + NSString *elemento = elementi[@"elemento"]; + + if ([elemento isEqualToString:NSLocalizedString(@"Qualsiasi distanza", @"voce elenco raggio sismi") ]) + elemento = @"100000"; + + + [EQNNotificheSegnalazioniUtente center].distanzaPosizione = elemento; + [[EQNNotificheSegnalazioniUtente center] saveUserInfo]; + + [self setupView]; + + [self.tableView endEditing:YES]; + +} + +-(void)chiudiView{ + + [self.tableView endEditing:YES]; + +} + + +@end diff --git a/Sources/Earthquake Network/ViewController/impostazioniNotifiche/TempoRealeTableViewController.h b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/TempoRealeTableViewController.h new file mode 100644 index 0000000..b913bd1 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/TempoRealeTableViewController.h @@ -0,0 +1,17 @@ +// +// TempoRealeTableViewController.h +// Earthquake Network +// +// Created by Luca Beretta on 09/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TempoRealeTableViewController : UITableViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sources/Earthquake Network/ViewController/impostazioniNotifiche/TempoRealeTableViewController.m b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/TempoRealeTableViewController.m new file mode 100644 index 0000000..a9ee3d9 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/impostazioniNotifiche/TempoRealeTableViewController.m @@ -0,0 +1,364 @@ +// +// TempoRealeTableViewController.m +// Earthquake Network +// +// Created by Luca Beretta on 09/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import "TempoRealeTableViewController.h" +#import "EQNNotificheTempoReale.h" +#import "EQNUtility.h" +#import "PickerViewController.h" +#import "TBDInputViewControllerData.h" + +@interface TempoRealeTableViewController () + +@property (nonatomic, strong) NSArray *lista; +@property (nonatomic, strong) NSArray *listaVibrazioni; +@property (nonatomic, strong) PickerViewController *pikerViewDistanza; +@property (nonatomic, strong) PickerViewController *pikerViewIntensita; +@property (nonatomic, assign) BOOL isAbilitato; +@property (nonatomic, assign) BOOL isSismaSenzaIntensita; +@property (nonatomic, strong) UITextField *textsismiDaNotificare; +@property (nonatomic, strong) UITextField *textFildSismiLievi; +@property (nonatomic, strong) UITextField *textFildSismiForti; +@property (nonatomic, strong) UITextField *textFild; +@property (nonatomic, strong) NSString *stringSismiDaNotificare; +@property (nonatomic, strong) NSString *stringDistanzaLievi; +@property (nonatomic, strong) NSString *stringDistanzaForti; + +@end + +@implementation TempoRealeTableViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + self.lista = @[NSLocalizedString(@"Abilitato", @"voce menu"), NSLocalizedString(@"Dettagli importanti sulla rilevazione dei sismi", @"voce menu"), NSLocalizedString(@"Sismi da notificare", @"voce menu"), NSLocalizedString(@"Sismi senza intensità", @"voce menu"), NSLocalizedString(@"Raggio sismi lievi", @"voce menu"), NSLocalizedString(@"Raggio sismi forti o intensità non disponibile", @"voce menu")]; + + self.listaVibrazioni = @[NSLocalizedString(@"Modifica impostazioni", @"voce menu")]; + + self.pikerViewDistanza = [[PickerViewController alloc] initWithNibName:@"PickerViewController" bundle:nil dati:[EQNUtility arrayRaggioSismi]]; + self.pikerViewDistanza.delegate = self; + + self.pikerViewIntensita = [[PickerViewController alloc] initWithNibName:@"PickerViewController" bundle:nil dati:@[NSLocalizedString(@"Qualsiasi intensità", @"voce menu"), NSLocalizedString(@"Solo sismi forti", @"voce menu")]]; + self.pikerViewIntensita.delegate = self; + + if (![EQNNotificheTempoReale center].distanzaTempoRealeLievi) + [EQNNotificheTempoReale center].distanzaTempoRealeLievi = @"100000";// NSLocalizedString(@"Qualsiasi distanza", @"voce elenco raggio sismi"); + if (![EQNNotificheTempoReale center].distanzaTempoRealeForti) + [EQNNotificheTempoReale center].distanzaTempoRealeForti = @"100000"; // NSLocalizedString(@"Qualsiasi distanza", @"voce elenco raggio sismi"); + + [[EQNNotificheTempoReale center] saveUserInfo]; + [self setUpView]; +} + + +-(void)setUpView{ + + + self.isAbilitato = [EQNNotificheTempoReale center].attivaTempoReale; + self.isSismaSenzaIntensita = [EQNNotificheTempoReale center].attivaSismiSenzaIntensita; + + + if ([EQNNotificheTempoReale center].isSismiForti) + self.stringSismiDaNotificare = NSLocalizedString(@"Solo sismi forti", @"voce menu"); + else + self.stringSismiDaNotificare = NSLocalizedString(@"Qualsiasi intensità", @"voce menu"); + + if ([[EQNNotificheTempoReale center].distanzaTempoRealeLievi isEqualToString:NSLocalizedString(@"Qualsiasi distanza", @"voce elenco raggio sismi") ]) + self.stringDistanzaLievi = [NSString stringWithFormat:@"%@, %@", NSLocalizedString(@"Abilitato", @""),[EQNNotificheTempoReale center].distanzaTempoRealeLievi]; + else + self.stringDistanzaLievi = [NSString stringWithFormat:@"%@, %@ km", NSLocalizedString(@"Abilitato", @""), [EQNNotificheTempoReale center].distanzaTempoRealeLievi]; + + + if ([[EQNNotificheTempoReale center].distanzaTempoRealeForti isEqualToString:NSLocalizedString(@"Qualsiasi distanza", @"voce elenco raggio sismi")]) + self.stringDistanzaForti = [NSString stringWithFormat:@"%@, %@", NSLocalizedString(@"Abilitato", @""), [EQNNotificheTempoReale center].distanzaTempoRealeForti]; + else + self.stringDistanzaForti = [NSString stringWithFormat:@"%@, %@ km", NSLocalizedString(@"Abilitato", @""), [EQNNotificheTempoReale center].distanzaTempoRealeForti]; + + [self.tableView reloadData]; +} +#pragma mark - Table view data source + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 2; +} +- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{ + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellSection"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + if (section == 0) + titolo.text = NSLocalizedString(@"Notifiche sismi rilevati in tempo reale", @"titolo impostazioni notifiche"); + else + titolo.text = NSLocalizedString(@"Vibrazioni e suono", @"titolo impostazioni notifiche"); + + return cell; + +} + +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ + + if (indexPath.section == 0) { + + switch (indexPath.row) { + case 1: + return 50; + break; + default: + return 90; + break; + } + } + return 50; + +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + + switch (section) { + case 0: + return self.lista.count; + break; + + default: + return self.listaVibrazioni.count; + + break; + } + return 0; +} + + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + + if (indexPath.section == 0) { + + switch (indexPath.row) { + case 0:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellaSelezioneAbilita"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + UILabel *stato = (UILabel *)[cell viewWithTag:2]; + stato.text = NSLocalizedString(@"Ricevi le notifiche in tempo reale dei sismi rilevati dalla rete smartphone", @"voce menu"); + if (self.isAbilitato){ + cell.accessoryType = UITableViewCellAccessoryCheckmark; + titolo.textColor = [UIColor blackColor]; + stato.textColor = [UIColor blackColor]; + } + else{ + cell.accessoryType = UITableViewCellAccessoryNone; + titolo.textColor = [UIColor grayColor]; + stato.textColor = [UIColor grayColor]; + } + + return cell; + + } + break; + case 3:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellaSelezioneAbilita"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + UILabel *stato = (UILabel *)[cell viewWithTag:2]; + stato.text = NSLocalizedString(@"Notifica anche sismi per i quali non è possibile stimare l'intensità", @"voce menu"); + + if (self.isSismaSenzaIntensita){ + cell.accessoryType = UITableViewCellAccessoryCheckmark; + titolo.textColor = [UIColor blackColor]; + stato.textColor = [UIColor blackColor]; + } + else{ + cell.accessoryType = UITableViewCellAccessoryNone; + titolo.textColor = [UIColor grayColor]; + stato.textColor = [UIColor grayColor]; + } + return cell; + + } + case 2:{ + + // vociDettagli + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"vociDettagli"]; + + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + // Configure the cell... + self.textsismiDaNotificare = (UITextField *)[cell viewWithTag:2]; + self.textsismiDaNotificare.delegate = self; + self.textsismiDaNotificare.inputView = self.pikerViewIntensita.view; + self.textsismiDaNotificare.text = self.stringSismiDaNotificare; + + return cell; + + } + break; + case 4:{ + + // vociDettagli + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"vociDettagli"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + // Configure the cell... + self.textFildSismiLievi = (UITextField *)[cell viewWithTag:2]; + self.textFildSismiLievi.delegate = self; + self.textFildSismiLievi.inputView = self.pikerViewDistanza.view; + self.textFildSismiLievi.text = self.stringDistanzaLievi; + + return cell; + + } + case 5:{ + + // vociDettagli + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"vociDettagli"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.lista[indexPath.row]; + // Configure the cell... + self.textFildSismiForti = (UITextField *)[cell viewWithTag:2]; + self.textFildSismiForti.delegate = self; + self.textFildSismiForti.inputView = self.pikerViewDistanza.view; + self.textFildSismiForti.text = self.stringDistanzaForti; + + return cell; + + } + break; + default:{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellaEtichettaRossa"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = NSLocalizedString(@"Dettagli importanti sulla rilevazione di sismi", @"voce menu"); + return cell; + }break; + } + + } + + // Configure the cell... + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellaEtichettaRossa"]; + UILabel *titolo = (UILabel *)[cell viewWithTag:1]; + titolo.text = self.listaVibrazioni[indexPath.row]; + titolo.textColor = [UIColor blackColor]; + + return cell; + +} + +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ + + if(indexPath.section == 0) + switch (indexPath.row) { + case 0:{ + self.isAbilitato = !self.isAbilitato; + [EQNNotificheTempoReale center].attivaTempoReale = self.isAbilitato; + [[EQNNotificheTempoReale center] saveUserInfo]; + [self.tableView reloadData]; + }break; + case 3:{ + self.isSismaSenzaIntensita = !self.isSismaSenzaIntensita; + [EQNNotificheTempoReale center].attivaSismiSenzaIntensita = self.isSismaSenzaIntensita; + [[EQNNotificheTempoReale center] saveUserInfo]; + [self.tableView reloadData]; + }break; + default: + break; + } + + else{ + + } + +} + +# pragma textFild delegate +- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField{ + + self.textFild = textField; + + return YES; +} +# pragma mark pikerView string + +-(void)inviaDati:(NSDictionary *)elementi{ + + NSString *elemento = elementi[@"elemento"]; + + if (self.textFild == self.textsismiDaNotificare){ + + if ([elemento isEqualToString:NSLocalizedString(@"Qualsiasi intensità", @"voce menu")]) + [EQNNotificheTempoReale center].isSismiForti = NO; + else + [EQNNotificheTempoReale center].isSismiForti = YES; + + } + if (self.textFild == self.textFildSismiLievi) + [EQNNotificheTempoReale center].distanzaTempoRealeLievi = elemento; + + + if (self.textFild == self.textFildSismiForti) + [EQNNotificheTempoReale center].distanzaTempoRealeForti = elemento; + + [[EQNNotificheTempoReale center] saveUserInfo]; + + [self setUpView]; + + [self.tableView endEditing:YES]; + +} + +-(void)chiudiView{ + + [self.tableView endEditing:YES]; + +} + +/* +// Override to support conditional editing of the table view. +- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { + // Return NO if you do not want the specified item to be editable. + return YES; +} +*/ + +/* +// Override to support editing the table view. +- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { + if (editingStyle == UITableViewCellEditingStyleDelete) { + // Delete the row from the data source + [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; + } else if (editingStyle == UITableViewCellEditingStyleInsert) { + // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view + } +} +*/ + +/* +// Override to support rearranging the table view. +- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath { +} +*/ + +/* +// Override to support conditional rearranging of the table view. +- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { + // Return NO if you do not want the item to be re-orderable. + return YES; +} +*/ + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/Sources/Earthquake Network/ViewController/inputView/PickerViewController.h b/Sources/Earthquake Network/ViewController/inputView/PickerViewController.h new file mode 100644 index 0000000..f31ffbc --- /dev/null +++ b/Sources/Earthquake Network/ViewController/inputView/PickerViewController.h @@ -0,0 +1,31 @@ +// +// PickerViewController.h +// Osteopatia +// +// Created by Beretta Luca on 17/12/12. +// Copyright (c) 2012 Luca Beretta. All rights reserved. +// + +#import + +@protocol PickerViewDelegate + +@optional +-(void)inviaDati:(NSDictionary *)elementi; +-(void)chiudiView; + +@end + + +@interface PickerViewController : UIViewController + +@property (weak, nonatomic) IBOutlet UIPickerView *pickerController; +@property (nonatomic, strong) id delegate; +@property (nonatomic, weak) IBOutlet UIBarButtonItem *cancellaButton; +@property (nonatomic, weak) IBOutlet UIBarButtonItem *confermabutton; + +-(id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil dati:(NSArray *)dati; + +- (IBAction)chiudi:(id)sender; +- (IBAction)inviaDati:(id)sender; +@end diff --git a/Sources/Earthquake Network/ViewController/inputView/PickerViewController.m b/Sources/Earthquake Network/ViewController/inputView/PickerViewController.m new file mode 100644 index 0000000..a03f59e --- /dev/null +++ b/Sources/Earthquake Network/ViewController/inputView/PickerViewController.m @@ -0,0 +1,108 @@ +// +// PickerViewController.m +// Osteopatia +// +// Created by Beretta Luca on 17/12/12. +// Copyright (c) 2012 Luca Beretta. All rights reserved. +// + +#import "PickerViewController.h" + +@interface PickerViewController (){ + + NSArray *datiPicker; + NSNumber *indiceElemento; + NSString *elemento; + UIFont *customFont; + + BOOL isVAS; +} + +@end + +@implementation PickerViewController + +-(id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil dati:(NSArray *)dati +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + // Custom initialization + datiPicker = [NSArray arrayWithArray:dati]; + } + return self; +} + +- (void)viewDidLoad +{ + [super viewDidLoad]; + // Do any additional setup after loading the view from its nib. + indiceElemento = 0; + elemento = datiPicker[[indiceElemento intValue]]; + customFont = [UIFont fontWithName:@"Tahoma" size:23.0]; + + [self.cancellaButton setTitle:NSLocalizedString(@"Annulla", @"")]; + [self.confermabutton setTitle:NSLocalizedString(@"Seleziona", @"")]; + + +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +- (IBAction)chiudi:(id)sender { + + [self.delegate chiudiView]; +} + +- (IBAction)inviaDati:(id)sender { + + if (indiceElemento == NULL) indiceElemento = [NSNumber numberWithInt:0]; + NSDictionary *dict = @{@"indice":indiceElemento, @"elemento" : elemento}; + [self.delegate inviaDati:dict]; +} +- (void)viewDidUnload { + [self setPickerController:nil]; + [super viewDidUnload]; +} +#pragma mark UIPickerViewDataSource + +- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{ + + return 1; + +} + +- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component{ + + return datiPicker.count; + +} + +#pragma mark UIPickerViewDelegate +- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{ + + indiceElemento = [NSNumber numberWithInteger:row]; + elemento = datiPicker[row]; + +} +/* +- (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component +{ + return datiPicker[row]; +} + */ +- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view +{ + UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, pickerView.frame.size.width, 25)]; + label.textAlignment = NSTextAlignmentCenter; + label.textColor = [UIColor colorWithRed:0.1569 green:0.22745 blue:0.3411 alpha:1]; + label.backgroundColor = [UIColor clearColor]; + label.font = customFont; + label.text = datiPicker[row]; + return label; + +} +@end diff --git a/Sources/Earthquake Network/ViewController/inputView/PickerViewController.xib b/Sources/Earthquake Network/ViewController/inputView/PickerViewController.xib new file mode 100644 index 0000000..eb137a7 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/inputView/PickerViewController.xib @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sources/Earthquake Network/ViewController/inputView/TBDInputViewControllerData.h b/Sources/Earthquake Network/ViewController/inputView/TBDInputViewControllerData.h new file mode 100644 index 0000000..5ee22a8 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/inputView/TBDInputViewControllerData.h @@ -0,0 +1,29 @@ +// +// TBDInputViewControllerData.h +// Salva lo scontrino +// +// Created by Luca Beretta on 16/07/12. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import + +@protocol InputViewControllerDataDelegate + +@optional +-(void)dataSelezionata:(NSDate *)data withTextFild:(UITextField *)textFild; +-(void)esci; + +@end + +@interface TBDInputViewControllerData : UIViewController + +@property (nonatomic, retain) id delegate; +@property (nonatomic, retain) IBOutlet UIDatePicker *myDataPicker; +@property (nonatomic, strong) UITextField *testFild; +-(IBAction)chiudiView:(id)sender; +-(IBAction)inviaData:(id)sender; +@property (weak, nonatomic) IBOutlet UIBarButtonItem *cancellaButton; +@property (weak, nonatomic) IBOutlet UIBarButtonItem *confermaButton; + +@end diff --git a/Sources/Earthquake Network/ViewController/inputView/TBDInputViewControllerData.m b/Sources/Earthquake Network/ViewController/inputView/TBDInputViewControllerData.m new file mode 100644 index 0000000..824fe1b --- /dev/null +++ b/Sources/Earthquake Network/ViewController/inputView/TBDInputViewControllerData.m @@ -0,0 +1,63 @@ +// +// TBDInputViewControllerData.m +// Salva lo scontrino +// +// Created by Luca Beretta on 16/07/12. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import "TBDInputViewControllerData.h" + +@interface TBDInputViewControllerData () + +@end + +@implementation TBDInputViewControllerData + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + // Custom initialization + + } + return self; +} + +- (void)viewDidLoad +{ + [super viewDidLoad]; + // Do any additional setup after loading the view. + + self.myDataPicker.date = [NSDate date]; + [self.cancellaButton setTitle:NSLocalizedString(@"Annulla", @"")]; + [self.confermaButton setTitle:NSLocalizedString(@"Seleziona", @"")]; +} + + +- (void)viewDidUnload +{ + [super viewDidUnload]; + // Release any retained subviews of the main view. +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation +{ + return (interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) || (interfaceOrientation == UIInterfaceOrientationPortrait); +} +-(IBAction)chiudiView:(id)sender{ + + [self.delegate esci]; +} +-(IBAction)inviaData:(id)sender{ + + [self.delegate dataSelezionata:self.myDataPicker.date withTextFild:self.testFild]; + +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; +} + + +@end diff --git a/Sources/Earthquake Network/ViewController/inputView/TBDInputViewControllerData.xib b/Sources/Earthquake Network/ViewController/inputView/TBDInputViewControllerData.xib new file mode 100644 index 0000000..0362318 --- /dev/null +++ b/Sources/Earthquake Network/ViewController/inputView/TBDInputViewControllerData.xib @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sources/Earthquake Network/alert_star_trek.wav b/Sources/Earthquake Network/alert_star_trek.wav new file mode 100755 index 0000000..5610a32 Binary files /dev/null and b/Sources/Earthquake Network/alert_star_trek.wav differ diff --git a/Sources/Earthquake Network/alerta_japanese.m4r b/Sources/Earthquake Network/alerta_japanese.m4r new file mode 100644 index 0000000..9d021c4 Binary files /dev/null and b/Sources/Earthquake Network/alerta_japanese.m4r differ diff --git a/Sources/Earthquake Network/alerta_mexico.m4r b/Sources/Earthquake Network/alerta_mexico.m4r new file mode 100644 index 0000000..ec19c15 Binary files /dev/null and b/Sources/Earthquake Network/alerta_mexico.m4r differ diff --git a/Sources/Earthquake Network/en.lproj/Localizable.strings b/Sources/Earthquake Network/en.lproj/Localizable.strings new file mode 100644 index 0000000..11fe67a --- /dev/null +++ b/Sources/Earthquake Network/en.lproj/Localizable.strings @@ -0,0 +1,797 @@ +/* + Localizable.strings + Earthquake Network + + Created by Luca Beretta on 07/05/2019. + Copyright © 2019 Luca Beretta. All rights reserved. +*/ +/* No comment provided by engineer. */ +" 10000 persone allertate." = " 10,000 people alerted."; + +/* No comment provided by engineer. */ +" 100000 persone allertate." = " 100,000 people alerted."; + +/* No comment provided by engineer. */ +"(Ora tua)" = "(Your time)"; + +/* No comment provided by engineer. */ +"Abbonamenti annuali" = "Annual subscriptions"; + +/* No comment provided by engineer. */ +"Abbonamenti mensili" = "Monthly subscriptions"; + +/* No comment provided by engineer. */ +"Abbonamento annuale, priorità 10000 persone " = "Annual subscription, priority 10,000 people"; + +/* No comment provided by engineer. */ +"Abbonamento annuale, priorità 100000 persone " = "Annual subscription, priority 100,000 people "; + +/* No comment provided by engineer. */ +"Abbonamento mensile, priorità 10000 persone " = "Monthly subscription, priority 10,000 people "; + +/* No comment provided by engineer. */ +"Abbonamento mensile, priorità 100000 persone " = "Monthly subscription, priority 100,000 people "; + +/* voce menu */ +"Abilitato" = "Enabled"; + +/* titolo impostazioni notifiche */ +"Alerta sismica" = "Seismic alert"; + +/* voce elenco messaggio tsunami */ +"Allerta cancellata" = "Alert cancelled"; + +/* voce menu */ +"Allerta in tempo reale" = "Real-time alert"; + +/* voce elenco messaggio tsunami */ +"Allerta Tsunami" = "Tsunami alert"; + +/* No comment provided by engineer. */ +"Altro" = "Other"; + +/* pulsanti orrizontale */ +"ALTRO" = "OTHER"; + +/* No comment provided by engineer. */ +"Annulla" = "Cancel"; + +/* The name of the app to display in a navigation bar along with a placeholder for the SDK version number */ +"App.NameAndVersion" = "App.NameAndVersion"; + +/* titolo impostazioni notifiche + voce menu */ +"Area di interesse" = "Area of interest"; + +/* No comment provided by engineer. */ +"Argentina" = "Argentina"; + +/* No comment provided by engineer. */ +"Attenzione" = "Attention"; + +/* No comment provided by engineer. */ +"Attenzione " = "Attention "; + +/* voce menu */ +"Attiva l'allerta anche su i sismi per i quali non è possibile stimare l'intensità" = "Enable the alert even for earthquakes for which it is not possible to estimate the intensity"; + +/* voce menu */ +"Autore" = "Author"; + +/* Back */ +"Back" = "Back"; + +/* pulsanti orrizontale */ +"CHAT" = "CHAT"; + +/* No comment provided by engineer. */ +"Chile" = "Chile"; + +/* No comment provided by engineer. */ +"chiudi" = "close"; + +/* pulsante chiudi impostazioni */ +"Chiudi" = "Close"; + +/* No comment provided by engineer. */ +"CHIUDI" = "CLOSE"; + +/* No comment provided by engineer. */ +"Cina" = "China"; + +/* No comment provided by engineer. */ +"Colombia" = "Colombia"; + +/* titolo pulsante notifica rete smartphone */ +"CONDIVIDI" = "SHARE APP"; + +/* allerta acquisto o restor pro */ +"Conferma" = "Confirm"; + +/* No comment provided by engineer. */ +"Conferma nazione" = "Confirm country"; + +/* No comment provided by engineer. */ +"CONFIG" = "CONFIG"; + +/* No comment provided by engineer. */ +"Copertura" = "Coverage"; + +/* No comment provided by engineer. */ +"Copertura nuvolosa : " = "Cloud cover : "; + +/* No comment provided by engineer. */ +"Costa Rica" = "Costa Rica"; + +/* No comment provided by engineer. */ +"dalla tua posizione" = "from your location"; + +/* No comment provided by engineer. */ +"Data" = "Date"; + +/* No comment provided by engineer. */ +"Data(Ora tua):" = "Date(Your time):"; + +/* Prompt to enter text for autocomplete demo */ +"Demo.Content.Autocomplete.EnterTextPrompt" = "Demo.Content.Autocomplete.EnterTextPrompt"; + +/* Format string for 'autocomplete failed with error' message */ +"Demo.Content.Autocomplete.FailedErrorMessage" = "Demo.Content.Autocomplete.FailedErrorMessage"; + +/* Button title for 'show autocomplete widget' */ +"Demo.Content.Autocomplete.ShowWidgetButton" = "Demo.Content.Autocomplete.ShowWidgetButton"; + +/* Button title for the 'BlueColors' styled autocomplete widget. */ +"Demo.Content.Autocomplete.Styling.Colors.BlueColors" = "Demo.Content.Autocomplete.Styling.Colors.BlueColors"; + +/* Button title for the 'Hot Dog Stand' styled autocomplete widget. */ +"Demo.Content.Autocomplete.Styling.Colors.HotDogStand" = "Demo.Content.Autocomplete.Styling.Colors.HotDogStand"; + +/* Button title for the 'WhiteOnBlack' styled autocomplete widget. */ +"Demo.Content.Autocomplete.Styling.Colors.WhiteOnBlack" = "Demo.Content.Autocomplete.Styling.Colors.WhiteOnBlack"; + +/* Button title for the 'Yellow and Brown' styled autocomplete widget. */ +"Demo.Content.Autocomplete.Styling.Colors.YellowAndBrown" = "Demo.Content.Autocomplete.Styling.Colors.YellowAndBrown"; + +/* String for 'autocomplete canceled message' */ +"Demo.Content.Autocomplete.WasCanceledMessage" = "Demo.Content.Autocomplete.WasCanceledMessage"; + +/* Button title for the 'Modal' view of the place picker. */ +"Demo.Content.PlacePicker.ViewController.Modal" = "Demo.Content.PlacePicker.ViewController.Modal"; + +/* Button title for the 'Navigation' view of the place picker. */ +"Demo.Content.PlacePicker.ViewController.Navigation" = "Demo.Content.PlacePicker.ViewController.Navigation"; + +/* Button title for the 'Popover' view of the place picker. */ +"Demo.Content.PlacePicker.ViewController.Popover" = "Demo.Content.PlacePicker.ViewController.Popover"; + +/* Title of the autocomplete demo section */ +"Demo.Section.Title.Autocomplete" = "Demo.Section.Title.Autocomplete"; + +/* Title of the 'Programmatic' demo section */ +"Demo.Section.Title.Programmatic" = "Demo.Section.Title.Programmatic"; + +/* Title of the full-screen autocomplete demo for display in a list or nav header */ +"Demo.Title.Autocomplete.FullScreen" = "Demo.Title.Autocomplete.FullScreen"; + +/* Title of the pushed autocomplete demo for display in a list or nav header */ +"Demo.Title.Autocomplete.Push" = "Demo.Title.Autocomplete.Push"; + +/* Title of the Styling autocomplete demo for display in a list or nav header */ +"Demo.Title.Autocomplete.Styling" = "Demo.Title.Autocomplete.Styling"; + +/* Title of the UISearchController autocomplete demo for display in a list or nav header */ +"Demo.Title.Autocomplete.UISearchController" = "Demo.Title.Autocomplete.UISearchController"; + +/* Title of the UISearchDisplayController autocomplete demo for display in a list or nav header */ +"Demo.Title.Autocomplete.UISearchDisplayController" = "Demo.Title.Autocomplete.UISearchDisplayController"; + +/* Title of the UITextField autocomplete demo for display in a list or nav header */ +"Demo.Title.Autocomplete.UITextField" = "Demo.Title.Autocomplete.UITextField"; + +/* Title of the photos demo for display in a list or nav header */ +"Demo.Title.Photos" = "Demo.Title.Photos"; + +/* Title of the 'select place' button within the photos demo */ +"Demo.Title.Photos.SelectPlace" = "Demo.Title.Photos.SelectPlace"; + +/* Title of the Place Picker demo for displaying the picker in a popover, navigation controller, or modally. */ +"Demo.Title.PlacePicker.ViewController" = "Demo.Title.PlacePicker.ViewController"; + +/* pulsante abbonamenti */ +"DETTAGLI" = "DETAILS"; + +/* voce menu */ +"Dettagli importanti sulla rilevazione dei sismi" = "Important details on earthquake detection"; + +/* voce menu */ +"Dettagli importanti sulla rilevazione di sismi" = "Important details on earthquake detection"; + +/* No comment provided by engineer. */ +"Dieci minuti" = "Ten minutes"; + +/* voce menu */ +"Disclaimer" = "Disclaimer"; + +/* No comment provided by engineer. */ +"Dispositivi attivi" = "smartphones monitoring in real time for earthquakes. To improve detection share the app with your family and friends, thanks!"; + +/* No comment provided by engineer. */ +"Dispositivi totali" = "At this time, in your area there are"; + +/* item tabelle */ +"Dispositivo affidabile" = "Reliable device"; + +/* voce menu */ +"Distanza" = "Distance"; + +/* No comment provided by engineer. */ +"Distanza massima" = "Maximum distance"; + +/* No comment provided by engineer. */ +"Dodici ore" = "Twelve hours"; + +/* No comment provided by engineer. */ +"Due ore" = "Two hours"; + +/* pulsanti orrizontale */ +"E-MAIL/SMS" = "E-MAIL/SMS"; + +/* voce menu */ +"Energia sisma" = "Earthquake energy"; + +/* No comment provided by engineer. */ +"Equador" = "Ecuador"; + +/* No comment provided by engineer. */ +"Errore sconosciuto" = "Unknown error"; + +/* messaggio errore richiesta apikey impianto */ +"Errore! Impossibile accedere all'impianto" = "Errore! Impossibile accedere all'impianto"; + +/* No comment provided by engineer. */ +"Esci" = "Exit"; + +/* No comment provided by engineer. */ +"Età massima" = "Maximum age"; + +/* voce menu */ +"F.A.Q." = "F.A.Q."; + +/* No comment provided by engineer. */ +"Filippine" = "Philippines"; + +/* No comment provided by engineer. */ +"Filtro" = "Filter"; + +/* No comment provided by engineer. */ +"FORTE\n(Caduta di oggetti)" = "STRONG\n(Fall of objects)"; + +/* No comment provided by engineer. */ +"Gestisci le reti sismiche" = "Manage seismic networks"; + +/* No comment provided by engineer. */ +"Giappone" = "Japan"; + +/* No comment provided by engineer. */ +"giorni fa" = "days ago"; + +/* allerta acquisto o restor pro */ +"Hai ripristinato il prodotto da te acquistato" = "You have restored the product you purchased"; + +/* No comment provided by engineer. */ +"Il messaggio è già stato in viato, al momento non è possibile inviare una nuova segnalazione" = "The report has already been sent, at the moment it is not possible to send a new report"; + +/* voce menu */ +"Imposta volume" = "Set volume"; + +/* voce menu */ +"Impostazioni" = "Settings"; + +/* voce menu */ +"Informazioni" = "Information"; + +/* voce menu */ +"Intervallo allarme" = "Alarm interval"; + +/* voce menu */ +"Intervallo notifiche" = "Notification interval"; + +/* No comment provided by engineer. */ +"Invia messaggio" = "Send message"; + +/* No comment provided by engineer. */ +"Invia un messaggio che gli altri utenti possono leggere sul sisma che hai segnalato" = "Send a message that other users can read about the earthquake you reported"; + +/* voce elenco aree tsunami */ +"Isole Hawaii" = "Hawaii Islands"; + +/* No comment provided by engineer. */ +"Isole Hawaii" = "Hawaii Islands"; + +/* No comment provided by engineer. */ +"Italia" = "Italy"; + +/* No comment provided by engineer. */ +"La magnitudo sarà calcola e cominicata dalla rete sismica nazionale e comparirà nella sezione Reti Sismiche dell'app." = "The magnitude will be calculated and reported by the national seismic network and will appear in the Seismic Networks section of the app."; + +/* No comment provided by engineer. */ +"La tua posizione geografica è sconosciuta e non è possibile segnalare il sisma" = "Your location is unknown and the earthquake cannot be reported"; + +/* No comment provided by engineer. */ +"La tua segnalazione è stata inviata correttamente" = "Your report has been sent correctly"; + +/* No comment provided by engineer. */ +"LEGGERO\n(Solo percepito)" = "MILD\n(Only perceived)"; + +/* voce menu */ +"Lista notifiche" = "Notification list"; + +/* item tabelle */ +"Lista priorità - NUOVA!" = "Priority service"; + +/* voce menu */ +"Magnitudo" = "Magnitude"; + +/* voce menu */ +"Magnitudo >= 2.0" = "Magnitude >= 2.0"; + +/* voce menu */ +"Magnitudo >= 3.0" = "Magnitude >= 3.0"; + +/* voce menu */ +"Magnitudo >= 3.5" = "Magnitude >= 3.5"; + +/* voce menu */ +"Magnitudo >= 4.5" = "Magnitude >= 4.5"; + +/* voce menu */ +"Magnitudo >= 5.5" = "Magnitude >= 5.5"; + +/* voce menu */ +"Magnitudo >= 6.0" = "Magnitude >= 6.0"; + +/* voce menu */ +"Magnitudo >= 6.5" = "Magnitude >= 6.5"; + +/* voce menu */ +"Magnitudo >= 7.5" = "Magnitude >= 7.5"; + +/* No comment provided by engineer. */ +"Magnitudo minima" = "Minumum magnitude"; + +/* No comment provided by engineer. */ +"MAPPA" = "MAP"; + +/* No comment provided by engineer. */ +"Mappa" = "Map"; + +/* Maps SDK Demos */ +"Maps SDK Demos" = "Maps SDK Demos"; + +/* voce elenco aree tsunami */ +"Mar dei Caraibi" = "Carribean Sea"; + +/* No comment provided by engineer. */ +"Messaggio" = "Message"; + +/* voce elenco messaggio tsunami */ +"Messaggio informativo" = "Informative message"; + +/* item tabelle */ +"messaggio per utenti" = "message for users"; + +/* No comment provided by engineer. */ +"Messico" = "Mexico"; + +/* No comment provided by engineer. */ +"METEO" = "WEATHER"; + +/* No comment provided by engineer. */ +"Meteo al momento del sisma" = "Weather at the time of the earthquake"; + +/* No comment provided by engineer. */ +"minuti fa" = "minutes ago"; + +/* No comment provided by engineer. */ +"minuto fa" = "minute ago"; + +/* voce menu */ +"Modifica impostazioni" = "Change settings"; + +/* No comment provided by engineer. */ +"MOLTO FORTE\n(Crollo di edifici)" = "VERY STRONG\n(Collapse of buildings)"; + +/* No comment provided by engineer. */ +"Mondo" = "Globe"; + +/* No comment provided by engineer. */ +"Mostra sismi forti a qualsiasi distanza se di" = "Show strong earthquakes at any distance if"; + +/* messaggio assenza connesione */ +"Nessuna connessione" = "No Internet connection"; + +/* No comment provided by engineer. */ +"Nessuna sottoscrizione attiva. Nella lista delle persone da allertare " = "No active subscription."; + +/* No comment provided by engineer. */ +"Nicaragua" = "Nicaragua"; + +/* No comment provided by engineer. */ +"Non hai seleziato nessuna nazione" = "You have not selected any country"; + +/* voce menu */ +"Notifica anche sismi per i quali non è possibile stimare l'intensità" = "Also notifies earthquakes for which it is not possible to estimate the intensity"; + +/* voce menu */ +"Notifica sismi di qualsiasi magnitudo se la distanza è inferiore a" = "Notify earthquakes of any magnitude if the distance is less than"; + +/* voce menu */ +"Notifica sismi forti a qualsiasi distanza se la magnitudo è maggiore a" = "Notify strong earthquakes at any distance if the magnitude is greater than"; + +/* titolo impostazioni notifiche + voce menu */ +"Notifiche da reti sismiche" = "Notifications from seismic networks"; + +/* titolo impostazioni notifiche + voce menu */ +"Notifiche segnalazioni utente" = "Notification of user reports"; + +/* titolo impostazioni notifiche + voce menu */ +"Notifiche sismi" = "Earthquake notifications"; + +/* titolo impostazioni notifiche + voce menu */ +"Notifiche sismi rilevati in tempo reale" = "Notifications of earthquake detected in real-time"; + +/* titolo impostazioni notifiche + voce menu */ +"Notifiche tsunami" = "Tsunami notifications"; + +/* No comment provided by engineer. */ +"Nuova Zelanda" = "New Zeland"; + +/* voce elenco aree tsunami */ +"Oceano Pacifico" = "Pacific Ocean"; + +/* No comment provided by engineer. */ +"OK" = "OK"; + +/* No comment provided by engineer. */ +"Onda sismica in" = "Seismic wave in"; + +/* No comment provided by engineer. */ +"oppure" = "otherwise"; + +/* voce menu */ +"Ora di fine" = "Ending time"; + +/* voce menu */ +"Ora di inizio" = "Starting time"; + +/* No comment provided by engineer. */ +"ora fa" = "hour ago"; + +/* voce menu */ +"Ora fine" = "Ending time"; + +/* voce menu */ +"Ora inizio" = "Starting time"; + +/* No comment provided by engineer. */ +"ore fa" = "hours ago"; + +/* No comment provided by engineer. */ +"pagerai al mese:" = "you will pay per month:"; + +/* No comment provided by engineer. */ +"pagerai all'anno:" = "you will pay per year:"; + +/* voce elenco messaggio tsunami */ +"Pericolo cessato" = "Warning ceased"; + +/* voce elenco messaggio tsunami */ +"Pericolo tsunami" = "Tsunami warning"; + +/* No comment provided by engineer. */ +"Perù" = "Per"; + +/* No comment provided by engineer. */ +"Pressione:" = "Pressure:"; + +/* voce menu */ +"Privacy" = "Privacy"; + +/* No comment provided by engineer. */ +"Privacy: http://wp.earthquakenetwork.it/privacy/\n\nTermini e condizioni: http://wp.earthquakenetwork.it/it/terms-conditions/" = "Privacy: http://wp.earthquakenetwork.it/privacy/\n\nTerms and conditions: http://wp.earthquakenetwork.it/it/terms-conditions/"; + +/* No comment provided by engineer. */ +"Profondità" = "Depth"; + +/* versione pro */ +"Puoi convertire la tua app nella versione PRO senza doverla scariche dallo store. La versione PRO a notifiche e allerte tramite sintetizazione vocale, la visione in realtà aumentata, l'allerta sui movimenti rilevati dal proprio smartphone e non ha alcuna pubblicità. In più sostieni il progetto di ricerca il quale non sostiene finanziamenti esterni. Grazie per considerare l'acquisto! Alternativamente il passaggio alla versione PRO è GRATUITO sottoscrivendo uno degli abbonamenti annuali della lista di priorità.\n\nPrivacy: http://wp.earthquakenetwork.it/privacy/ \n\nTermini e condizioni: http://wp.earthquakenetwork.it/it/terms-conditions/" = "Earthquake Network is the only research project that develops a worldwide real-time seismic alert system based on smartphones. By purchasing the PRO version you support the project which does not receive any kind of financing. The PRO version has no advertising and in the future will include additional features compared to the basic version. Thank you for considering buying and supporting the project!\n\nPrivacy: http://wp.earthquakenetwork.it/privacy\n\nTerms and conditions: http://wp.earthquakenetwork.it/it/terms-conditions/"; + +/* No comment provided by engineer. */ +"Puoi entrare a fare parte delle liste di priorità prime" = "You can join the priority list of the first"; + +/* voce elenco raggio sismi */ +"Qualsiasi distanza" = "Any distance"; + +/* voce menu */ +"Qualsiasi intensità" = "Any intensity"; + +/* voce menu */ +"Raggio dalla tua posizione" = "Radius from your location"; + +/* voce menu */ +"Raggio sismi forti o intensità non disponibile" = "Radius strong earthquakes or intensity not available"; + +/* voce menu */ +"Raggio sismi lievi" = "Radius mild earthquakes"; + +/* No comment provided by engineer. */ +"Repubblica Domenicana" = "Dominican Republic"; + +/* item tabelle */ +"Rete smartphone" = "Smartphone Network"; + +/* pulsanti orrizontale */ +"RETE SMARTPHONE" = "SMARTPHONE NETWORK"; + +/* titolo impostazioni notifiche + voce menu */ +"Reti sismiche" = "Seismic networks"; + +/* pulsanti orrizontale */ +"RETI SISMICHE" = "SEISMIC NETWORKS"; + +/* voce menu */ +"Ricevi le notifiche dei sismi rilevati dalle agenzie nazionalie internazionali" = "Receive notifications of earthquakes detected by national and international seismic agencies"; + +/* voce menu */ +"Ricevi le notifiche dei suonisegnalati manualemente dagli utenti" = "Receive notifications of earthquakes manually reported by users"; + +/* voce menu */ +"Ricevi le notifiche in tempo reale dei sismi rilevati dalla rete smartphone" = "Receive real-time notifications of earthquakes detected by the smartphone network"; + +/* voce menu */ +"Ricevi le notifiche per i messaggi rilasciati dal Pacific Tsunami Warning Center" = "Receive notifications for messages released by the Pacific Tsunami Warning Center"; + +/* voce menu */ +"Ricevi le notifiche solo in un intervallo del giorno" = "Receive notifications only in a range of day"; + +/* titolo navigation bar */ +"Rilevatore Terremoti" = "Earthquake Network"; + +/* Samples */ +"Samples" = "Samples"; + +/* No comment provided by engineer. */ +"Scarica " = "Download "; + +/* No comment provided by engineer. */ +"Se vuoi filtrare la lista dei sismi, seleziona la nazione in cui vivi" = "If you want to filter the list of earthquakes, select the country where you live"; + +/* No comment provided by engineer. */ +"secondi" = "seconds"; + +/* No comment provided by engineer. */ +"Segnalazione " = "Report "; + +/* pulsanti orrizontale */ +"SEGNALAZIONI" = "REPORTS"; + +/* No comment provided by engineer. */ +"Sei abbonato: priorità 10000 persone, rinnovo annuale " = "You are subscribed to the 10'000 priority list, annual renewal "; + +/* No comment provided by engineer. */ +"Sei abbonato: priorità 10000 persone, rinnovo mensile " = "You are subscribed to the 10'000 priority list, monthly renewal "; + +/* No comment provided by engineer. */ +"Sei abbonato: priorità 100000 persone, rinnovo annuale " = "You are subscribed to the 100'000 priority list, annual renewal "; + +/* No comment provided by engineer. */ +"Sei abbonato: priorità 100000 persone, rinnovo mensile " = "You are subscribed to the 100'000 priority list, monthly renewal "; + +/* No comment provided by engineer. */ +"Sei ore" = "six hours"; + +/* No comment provided by engineer. */ +"Seleziona" = "Select"; + +/* No comment provided by engineer. */ +"sending" = "sending"; + +/* voce menu */ +"Sismi da notificare" = "Earthquakes to report"; + +/* item tabelle */ +"Sismi rilevati da smartphone" = "Earthquakes detected by smartphones"; + +/* voce menu */ +"Sismi senza intensità" = "Earthquakes without intensity"; + +/* messaggio errore richiesta dev_cmd */ +"Sì è verificato un errore sulla centralina" = "Sì è verificato un errore sulla centralina"; + +/* voce menu */ +"Solo sismi forti" = "Only strong earthquakes"; + +/* descrizione Top 10K */ +"sottoscrizioni ancora disponibiliper essere allertato in meno di 1 secondo dal rilevamento del sistema" = "subscriptions still available to be alerted in less than 1 second from the earthquake"; + +/* descrizione Top 100K */ +"sottoscrizioni ancora disponibiliper essere allertato in meno di 5 secondi dal rilevamento del sistema" = "subscriptions still available to be alerted in less than 5 seconds from the earthquake"; + +/* No comment provided by engineer. */ +"Spagna" = "Spain"; + +/* pulsanti orrizontale */ +"SPONSOR" = "SPONSOR"; + +/* No comment provided by engineer. */ +"Stai acquistando la verisone pro, verrà rimossa la pubblicità" = "You are buying the PRO version, advertisement will be removed"; + +/* voce menu */ +"Suona un allarme quando un sisma è rilevato dalla rete di smartphones " = "Activate an alarm when an earthquake is detected by the smartphone network "; + +/* voce elenco messaggio tsunami */ +"Supplemento di allerta" = "Alert supplement"; + +/* voce elenco messaggio tsunami */ +"Supplemento di valutazione" = "Evaluation supplement"; + +/* No comment provided by engineer. */ +"Temperatura: " = "Temperature: "; + +/* voce menu */ +"Terremoti forti" = "Strong earthquakes"; + +/* voce menu */ +"Terremoti vicini" = "Nearby earthquakes"; + +/* voce menu */ +"Testa allarme" = "Test alarm"; + +"testo utenti1" = "Is this app useful for you? Vote and support the app with 5 stars at"; + +"testo utenti2" = "thanks! Real time detection of quakes works better if the app is installed on many devices. Share the app with family and friends to improve detection."; +/* titolo impostazioni notifiche + voce menu */ +"Tipo messaggio" = "Message type"; + +/* voce menu */ +"Tono di allarme" = "Alarm tone"; + +/* No comment provided by engineer. */ +"TRENS" = "TREND"; + +/* pulsanti orrizontale */ +"TSUNAMI" = "TSUNAMI"; + +/* No comment provided by engineer. */ +"Ultim\'ora" = "Last hour"; + +/* No comment provided by engineer. */ +"Ultima settimana" = "Last week"; + +/* No comment provided by engineer. */ +"Ultimo anno" = "Last year"; + +/* No comment provided by engineer. */ +"Ultimo giorno" = "Last day"; + +/* No comment provided by engineer. */ +"Ultimo mese" = "Last month"; + +/* No comment provided by engineer. */ +"Umidità : " = "Humidity : "; + +/* No comment provided by engineer. */ +"Un anno" = "One year"; + +/* No comment provided by engineer. */ +"un anno" = "one year"; + +/* No comment provided by engineer. */ +"Un giorno" = "One day"; + +/* No comment provided by engineer. */ +"Un mese" = "One month"; + +/* No comment provided by engineer. */ +"Un ora" = "One hour"; + +/* voce menu */ +"Un sisma è simulato. Dovresti ricevere l'allerta e l'allarme dovrebbe suonare. Se attive, ricordati di disabilitare l'invio della mail automatiche ai tuoi contatti per non allarmarli" = "Un sisma è simulato. Dovresti ricevere l'allerta e l'allarme dovrebbe suonare. Se attive, ricordati di disabilitare l'invio della mail automatiche ai tuoi contatti per non allarmarli"; + +/* No comment provided by engineer. */ +"Un\'ora" = "One hour"; + +/* No comment provided by engineer. */ +"Una settimana" = "One week"; + +/* No comment provided by engineer. */ +"Usa il bottone per segnalare il sisma" = "Use the button to report an earthquake"; + +/* messaggio errore inserimento credenziali */ +"Username e Password sbagliati" = "Username e Password sbagliati"; + +/* voce elenco messaggio tsunami */ +"Valutazione cancellata" = "Evaluation canceled"; + +/* voce elenco messaggio tsunami */ +"Valutazione Tsunami" = "Tsunami evaluation"; + +/* titolo pulsante notifica rete smartphone */ +"VEDI IN TWITTER" = "SEE ON TWITTER"; + +/* No comment provided by engineer. */ +"Velocità vento: " = "Wind speed: "; + +/* No comment provided by engineer. */ +"Venezuela" = "Venezuela"; + +/* etichetta versione app */ +"Versione" = "Version"; + +/* item tabelle */ +"Versione PRO" = "PRO version"; + +/* titolo impostazioni notifiche */ +"Vibrazioni e suono" = "Sound and vibration"; + +/* titolo pulsante notifica rete smartphone */ +"VOTA L'APP" = "Vote the app"; + +/* No comment provided by engineer. */ +"• Il pagamento verrà addebitato sull'account iTunes alla conferma dell'acquisto\n\n• L'abbonamento si rinnova automaticamente a meno che il rinnovo automatico non venga disattivato almeno 24 ore prima della fine del periodo corrente\n\n• L'abbonamento verrà addebitato per il rinnovo entro 24 ore prima della fine del periodo corrente e identificato il costo del rinnovo\n\n• Le sottoscrizioni possono essere gestite dall'utente e il rinnovo automatico può essere disattivato accedendo alle Impostazioni account dell'utente dopo l'acquisto." = "• Your payment will be charged to your iTunes account upon confirmation of purchase\n\n• The subscription is automatically renewed unless the automatic renewal is deactivated at least 24 hours before the end of the current period\n\n• Subscription will be charged for renewal within 24 hours before the end of the current period and the renewal cost identified\n\n• Subscriptions can be managed by the user and automatic renewal can be deactivated by accessing the user's account settings after the purchase."; + +/* No comment provided by engineer. */ +"• L'abbonamento si rinnova automaticamente a meno che il rinnovo automatico non venga disattivato almeno 24 ore prima della fine del periodo corrente\n\n• L'abbonamento verrà addebitato per il rinnovo entro 24 ore prima della fine del periodo corrente e identificato il costo del rinnovo\n\n• Le sottoscrizioni possono essere gestite dall'utente e il rinnovo automatico può essere disattivato accedendo alle Impostazioni account dell'utente dopo l'acquisto.\n\n" = "• The subscription is automatically renewed unless the automatic renewal is deactivated at least 24 hours before the end of the current period\n\n• The subscription will be charged for renewal within 24 hours before the end of the current period and the renewal cost identified\n\n• Subscriptions can be managed by the user and automatic renewal can be deactivated by accessing the user's account settings after purchase."; + +"Globale" = "Global"; +"Italia" = "Italy"; +"Spagna" = "Spain"; +"Cina" = "China"; +"Giappone" = "Japan"; +"Nicaragua" = "Nicaragua"; +"Messico" = "Mexico"; +"Colombia" = "Colombia"; +"Costa Rica" = "Costa Rica"; +"Cile" = "Chile"; +"Venezuela" = "Venezuela"; +"Nuova Zelanda" = "New Zeland"; +"Argentina" = "Argentina"; +"Ecuador" = "Ecuador"; +"Filippine" = "Philippines"; +"Perù" = "Peru"; +"Repubblica Dominicana" = "Dominican Republic"; + + + + + + +/// notifiche + +"Allerta sismica in tempo reale" = "Real time seismic alert"; +"Segnalazione utente" = "User report"; +"Segnalazione da rete sismica" = "Seismic network report"; +"Allerta tsunami" = "Tsunami alert"; + + +/// notifiche body + +"Rilevato sisma debole a" = "Mild quake detected at %@"; +"Rilevato sisma forte a" = "Strong quake detected at %@"; +"Rilevato sisma a" = "Quake detected at %@"; +"Sisma lieve segnalato da utente a" = "Mild quake reported by user at %@"; +"Sisma forte segnalato da utente a" = "Strong quake reported by user at %@"; +"Sisma molto forte segnalato da utente a" = "Very strong quake reported by user at %@"; +"Sisma rilevato a" = "Quake detected at %@"; +"Area di interesse: Mar dei Caraibi" = "Area of interest: Carribean Sea"; +"Area di interesse: Hawaii" = "Area of interest: Hawaii"; +"Area di interesse: Oceano Pacifico" = "Area of interest: Pacific Ocean"; +"Sisma rilevato da" = "earthquake detected by"; diff --git a/Sources/Earthquake Network/es.lproj/Info.plist b/Sources/Earthquake Network/es.lproj/Info.plist new file mode 100644 index 0000000..da842bd --- /dev/null +++ b/Sources/Earthquake Network/es.lproj/Info.plist @@ -0,0 +1,66 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.1 + CFBundleVersion + 1.1 + LSApplicationQueriesSchemes + + googlechromes + comgooglemaps + + LSRequiresIPhoneOS + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + NSLocationAlwaysAndWhenInUseUsageDescription + Necesitamos tu ubicación para enviarte alertas sísmicas en tiempo real + NSLocationAlwaysUsageDescription + Necesitamos tu ubicación para enviarte alertas sísmicas en tiempo real + NSLocationWhenInUseUsageDescription + Necesitamos tu ubicación para enviarte alertas sísmicas en tiempo real + UIBackgroundModes + + audio + fetch + location + remote-notification + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Sources/Earthquake Network/es.lproj/LaunchScreen.strings b/Sources/Earthquake Network/es.lproj/LaunchScreen.strings new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Sources/Earthquake Network/es.lproj/LaunchScreen.strings @@ -0,0 +1 @@ + diff --git a/Sources/Earthquake Network/es.lproj/Localizable.strings b/Sources/Earthquake Network/es.lproj/Localizable.strings new file mode 100644 index 0000000..3843c09 --- /dev/null +++ b/Sources/Earthquake Network/es.lproj/Localizable.strings @@ -0,0 +1,792 @@ +/* No comment provided by engineer. */ +" 10000 persone allertate." = " 10.000 personas alertadas."; + +/* No comment provided by engineer. */ +" 100000 persone allertate." = " 100.000 personas alertadas."; + +/* No comment provided by engineer. */ +"(Ora tua)" = "(Tu hora)"; + +/* No comment provided by engineer. */ +"Abbonamenti annuali" = "Suscripciones anuales"; + +/* No comment provided by engineer. */ +"Abbonamenti mensili" = "Suscripciones mensuales"; + +/* No comment provided by engineer. */ +"Abbonamento annuale, priorità 10000 persone " = "Suscripción anual, prioridad 10.000 personas "; + +/* No comment provided by engineer. */ +"Abbonamento annuale, priorità 100000 persone " = "Suscripción anual, prioridad 100.000 personas "; + +/* No comment provided by engineer. */ +"Abbonamento mensile, priorità 10000 persone " = "Suscripción mensual, prioridad 10.000 personas "; + +/* No comment provided by engineer. */ +"Abbonamento mensile, priorità 100000 persone " = "Suscripción mensual, prioridad 100.000 personas "; + +/* voce menu */ +"Abilitato" = "Activado"; + +/* titolo impostazioni notifiche */ +"Alerta sismica" = "Alerta sismica"; + +/* voce elenco messaggio tsunami */ +"Allerta cancellata" = "Alerta cancelada"; + +/* voce menu */ +"Allerta in tempo reale" = "Alerta en tiempo real"; + +/* voce elenco messaggio tsunami */ +"Allerta Tsunami" = "Alerta tsunami"; + +/* No comment provided by engineer. */ +"Altro" = "Otro"; + +/* pulsanti orrizontale */ +"ALTRO" = "OTRO"; + +/* No comment provided by engineer. */ +"Annulla" = "Cancelar"; + +/* The name of the app to display in a navigation bar along with a placeholder for the SDK version number */ +"App.NameAndVersion" = "App.NameAndVersion"; + +/* titolo impostazioni notifiche + voce menu */ +"Area di interesse" = "Área de interés"; + +/* No comment provided by engineer. */ +"Argentina" = "Argentina"; + +/* No comment provided by engineer. */ +"Attenzione" = "Atención"; + +/* No comment provided by engineer. */ +"Attenzione " = "Atención "; + +/* voce menu */ +"Attiva l'allerta anche su i sismi per i quali non è possibile stimare l'intensità" = "También activa la alerta de sismos para los cuales no es posible estimar la intensidad."; + +/* voce menu */ +"Autore" = "Autor"; + +/* Back */ +"Back" = "Espalda"; + +/* pulsanti orrizontale */ +"CHAT" = "CHAT"; + +/* No comment provided by engineer. */ +"Chile" = "Chile"; + +/* No comment provided by engineer. */ +"chiudi" = "cerra"; + +/* pulsante chiudi impostazioni */ +"Chiudi" = "Cerra"; + +/* No comment provided by engineer. */ +"CHIUDI" = "CERRA"; + +/* No comment provided by engineer. */ +"Cina" = "China"; + +/* No comment provided by engineer. */ +"Colombia" = "Colombia"; + +/* titolo pulsante notifica rete smartphone */ +"CONDIVIDI" = "COMPARTA APP"; + +/* allerta acquisto o restor pro */ +"Conferma" = "Confirmar"; + +/* No comment provided by engineer. */ +"Conferma nazione" = "Confirmar pais"; + +/* No comment provided by engineer. */ +"CONFIG" = "CONFIG"; + +/* No comment provided by engineer. */ +"Copertura" = "Cobertura"; + +/* No comment provided by engineer. */ +"Copertura nuvolosa : " = "Cubierta de nubes: "; + +/* No comment provided by engineer. */ +"Costa Rica" = "Costa Rica"; + +/* No comment provided by engineer. */ +"dalla tua posizione" = "desde tu ubicación"; + +/* No comment provided by engineer. */ +"Data" = "Fecha"; + +/* No comment provided by engineer. */ +"Data(Ora tua):" = "Fecha(Tu tiempo):"; + +/* Prompt to enter text for autocomplete demo */ +"Demo.Content.Autocomplete.EnterTextPrompt" = "Demo.Content.Autocomplete.EnterTextPrompt"; + +/* Format string for 'autocomplete failed with error' message */ +"Demo.Content.Autocomplete.FailedErrorMessage" = "Demo.Content.Autocomplete.FailedErrorMessage"; + +/* Button title for 'show autocomplete widget' */ +"Demo.Content.Autocomplete.ShowWidgetButton" = "Demo.Content.Autocomplete.ShowWidgetButton"; + +/* Button title for the 'BlueColors' styled autocomplete widget. */ +"Demo.Content.Autocomplete.Styling.Colors.BlueColors" = "Demo.Content.Autocomplete.Styling.Colors.BlueColors"; + +/* Button title for the 'Hot Dog Stand' styled autocomplete widget. */ +"Demo.Content.Autocomplete.Styling.Colors.HotDogStand" = "Demo.Content.Autocomplete.Styling.Colors.HotDogStand"; + +/* Button title for the 'WhiteOnBlack' styled autocomplete widget. */ +"Demo.Content.Autocomplete.Styling.Colors.WhiteOnBlack" = "Demo.Content.Autocomplete.Styling.Colors.WhiteOnBlack"; + +/* Button title for the 'Yellow and Brown' styled autocomplete widget. */ +"Demo.Content.Autocomplete.Styling.Colors.YellowAndBrown" = "Demo.Content.Autocomplete.Styling.Colors.YellowAndBrown"; + +/* String for 'autocomplete canceled message' */ +"Demo.Content.Autocomplete.WasCanceledMessage" = "Demo.Content.Autocomplete.WasCanceledMessage"; + +/* Button title for the 'Modal' view of the place picker. */ +"Demo.Content.PlacePicker.ViewController.Modal" = "Demo.Content.PlacePicker.ViewController.Modal"; + +/* Button title for the 'Navigation' view of the place picker. */ +"Demo.Content.PlacePicker.ViewController.Navigation" = "Demo.Content.PlacePicker.ViewController.Navigation"; + +/* Button title for the 'Popover' view of the place picker. */ +"Demo.Content.PlacePicker.ViewController.Popover" = "Demo.Content.PlacePicker.ViewController.Popover"; + +/* Title of the autocomplete demo section */ +"Demo.Section.Title.Autocomplete" = "Demo.Section.Title.Autocomplete"; + +/* Title of the 'Programmatic' demo section */ +"Demo.Section.Title.Programmatic" = "Demo.Section.Title.Programmatic"; + +/* Title of the full-screen autocomplete demo for display in a list or nav header */ +"Demo.Title.Autocomplete.FullScreen" = "Demo.Title.Autocomplete.FullScreen"; + +/* Title of the pushed autocomplete demo for display in a list or nav header */ +"Demo.Title.Autocomplete.Push" = "Demo.Title.Autocomplete.Push"; + +/* Title of the Styling autocomplete demo for display in a list or nav header */ +"Demo.Title.Autocomplete.Styling" = "Demo.Title.Autocomplete.Styling"; + +/* Title of the UISearchController autocomplete demo for display in a list or nav header */ +"Demo.Title.Autocomplete.UISearchController" = "Demo.Title.Autocomplete.UISearchController"; + +/* Title of the UISearchDisplayController autocomplete demo for display in a list or nav header */ +"Demo.Title.Autocomplete.UISearchDisplayController" = "Demo.Title.Autocomplete.UISearchDisplayController"; + +/* Title of the UITextField autocomplete demo for display in a list or nav header */ +"Demo.Title.Autocomplete.UITextField" = "Demo.Title.Autocomplete.UITextField"; + +/* Title of the photos demo for display in a list or nav header */ +"Demo.Title.Photos" = "Demo.Title.Photos"; + +/* Title of the 'select place' button within the photos demo */ +"Demo.Title.Photos.SelectPlace" = "Demo.Title.Photos.SelectPlace"; + +/* Title of the Place Picker demo for displaying the picker in a popover, navigation controller, or modally. */ +"Demo.Title.PlacePicker.ViewController" = "Demo.Title.PlacePicker.ViewController"; + +/* pulsante abbonamenti */ +"DETTAGLI" = "DETALLES"; + +/* voce menu */ +"Dettagli importanti sulla rilevazione dei sismi" = "Detalles importantes sobre la detección de sismos"; + +/* voce menu */ +"Dettagli importanti sulla rilevazione di sismi" = "Detalles importantes sobre la detección de sismos"; + +/* No comment provided by engineer. */ +"Dieci minuti" = "Diez minutos"; + +/* voce menu */ +"Disclaimer" = "Disclaimer"; + +/* No comment provided by engineer. */ +"Dispositivi attivi" = "smartphones que están monitoreando los sismos en tiempo real. Para mejorar la detección comparta la app con tus amigos y familia, gracias!"; + +/* No comment provided by engineer. */ +"Dispositivi totali" = "En este momento, en tu área hay"; + +/* item tabelle */ +"Dispositivo affidabile" = "Dispositivo confiable"; + +/* voce menu */ +"Distanza" = "Distancia"; + +/* No comment provided by engineer. */ +"Distanza massima" = "Distancia maxima"; + +/* No comment provided by engineer. */ +"Dodici ore" = "Doce horas"; + +/* No comment provided by engineer. */ +"Due ore" = "Dos horas"; + +/* pulsanti orrizontale */ +"E-MAIL/SMS" = "E-MAIL/SMS"; + +/* voce menu */ +"Energia sisma" = "Energía del sismos"; + +/* No comment provided by engineer. */ +"Equador" = "Ecuador"; + +/* No comment provided by engineer. */ +"Errore sconosciuto" = "Error desconocido"; + +/* messaggio errore richiesta apikey impianto */ +"Errore! Impossibile accedere all'impianto" = "Errore! Impossibile accedere all'impianto"; + +/* No comment provided by engineer. */ +"Esci" = "Salida"; + +/* No comment provided by engineer. */ +"Età massima" = "Edad maxima"; + +/* voce menu */ +"F.A.Q." = "F.A.Q."; + +/* No comment provided by engineer. */ +"Filippine" = "Filipinas"; + +/* No comment provided by engineer. */ +"Filtro" = "Filtro"; + +/* No comment provided by engineer. */ +"FORTE\n(Caduta di oggetti)" = "FUERTE\n(Caída de objetos)"; + +/* No comment provided by engineer. */ +"Gestisci le reti sismiche" = "Gestionar redes sísmicas"; + +"GESTISCI LE RETI SISMICHE" = "Gestionar redes sísmicas"; + +/* No comment provided by engineer. */ +"Giappone" = "Japón"; + +/* No comment provided by engineer. */ +"giorni fa" = "days"; + +/* allerta acquisto o restor pro */ +"Hai ripristinato il prodotto da te acquistato" = "Has restaurado el producto que compraste"; + +/* No comment provided by engineer. */ +"Il messaggio è già stato in viato, al momento non è possibile inviare una nuova segnalazione" = "El informe ya ha sido enviado, por el momento no es posible enviar un nuevo informe."; + +/* voce menu */ +"Imposta volume" = "Ajustar el volumen"; + +/* voce menu */ +"Impostazioni" = "Ajustes"; + +/* voce menu */ +"Informazioni" = "Información"; + +/* voce menu */ +"Intervallo allarme" = "Intervalo de alarma"; + +/* voce menu */ +"Intervallo notifiche" = "Intervalo de notificación"; + +/* No comment provided by engineer. */ +"Invia messaggio" = "Enviar mensaje"; + +/* No comment provided by engineer. */ +"Invia un messaggio che gli altri utenti possono leggere sul sisma che hai segnalato" = "Envía un mensaje para que otros usuarios puedan leer sobre el sismo que reportaste"; + +/* voce elenco aree tsunami */ +"Isole Hawaii" = "Islas hawai"; + +/* No comment provided by engineer. */ +"Isole Hawaii" = "Islas hawai"; + +/* No comment provided by engineer. */ +"Italia" = "Italia"; + +/* No comment provided by engineer. */ +"La magnitudo sarà calcola e cominicata dalla rete sismica nazionale e comparirà nella sezione Reti Sismiche dell'app." = "La magnitud será calculada e informada por la red sísmica nacional y aparecerá en la sección redes sísmicas de la aplicación."; + +/* No comment provided by engineer. */ +"La tua posizione geografica è sconosciuta e non è possibile segnalare il sisma" = "Tu ubicación es desconocida y el sismos no puede ser reportado"; + +/* No comment provided by engineer. */ +"La tua segnalazione è stata inviata correttamente" = "Tu informe ha sido enviado correctamente"; + +/* No comment provided by engineer. */ +"LEGGERO\n(Solo percepito)" = "LEVE\n(solo percibido)"; + +/* voce menu */ +"Lista notifiche" = "Lista de notificaciones"; + +/* item tabelle */ +"Lista priorità - NUOVA!" = "Servicio prioritario"; + +/* voce menu */ +"Magnitudo" = "Magnitud"; + +/* voce menu */ +"Magnitudo >= 2.0" = "Magnitud >= 2.0"; + +/* voce menu */ +"Magnitudo >= 3.0" = "Magnitud >= 3.0"; + +/* voce menu */ +"Magnitudo >= 3.5" = "Magnitud >= 3.5"; + +/* voce menu */ +"Magnitudo >= 4.5" = "Magnitud >= 4.5"; + +/* voce menu */ +"Magnitudo >= 5.5" = "Magnitud >= 5.5"; + +/* voce menu */ +"Magnitudo >= 6.0" = "Magnitud >= 6.0"; + +/* voce menu */ +"Magnitudo >= 6.5" = "Magnitud >= 6.5"; + +/* voce menu */ +"Magnitudo >= 7.5" = "Magnitud >= 7.5"; + +/* No comment provided by engineer. */ +"Magnitudo minima" = "Magnitud mínima"; + +/* No comment provided by engineer. */ +"MAPPA" = "MAPA"; + +/* No comment provided by engineer. */ +"Mappa" = "Mapa"; + +/* Maps SDK Demos */ +"Maps SDK Demos" = "Maps SDK Demos"; + +/* voce elenco aree tsunami */ +"Mar dei Caraibi" = "Mar Caribe"; + +/* No comment provided by engineer. */ +"Messaggio" = "Mensaje"; + +/* voce elenco messaggio tsunami */ +"Messaggio informativo" = "Mensaje informativo"; + +/* item tabelle */ +"messaggio per utenti" = "mensaje para los usuarios"; + +/* No comment provided by engineer. */ +"Messico" = "Mexico"; + +/* No comment provided by engineer. */ +"METEO" = "TIEMPO"; + +/* No comment provided by engineer. */ +"Meteo al momento del sisma" = "Tiempo en el momento del terremoto"; + +/* No comment provided by engineer. */ +"minuti fa" = "minutos"; + +/* No comment provided by engineer. */ +"minuto fa" = "minuto"; + +/* voce menu */ +"Modifica impostazioni" = "Cambiar ajustes"; + +/* No comment provided by engineer. */ +"MOLTO FORTE\n(Crollo di edifici)" = "MUY FUERTE\n(Colapso de edificios)"; + +/* No comment provided by engineer. */ +"Mondo" = "Globo"; + +/* No comment provided by engineer. */ +"Mostra sismi forti a qualsiasi distanza se di" = "Mostrar sismos fuertes a cualquier distancia si"; + +/* messaggio assenza connesione */ +"Nessuna connessione" = "No hay conexión a internet"; + +/* No comment provided by engineer. */ +"Nessuna sottoscrizione attiva. Nella lista delle persone da allertare " = "No hay suscripción activa."; + +/* No comment provided by engineer. */ +"Nicaragua" = "Nicaragua"; + +/* No comment provided by engineer. */ +"Non hai seleziato nessuna nazione" = "No has seleccionado ningún país"; + +/* voce menu */ +"Notifica anche sismi per i quali non è possibile stimare l'intensità" = "También notifica sismos para los que no es posible estimar la intensidad."; + +/* voce menu */ +"Notifica sismi di qualsiasi magnitudo se la distanza è inferiore a" = "Notificar sismos de cualquier magnitud si la distancia es inferior a"; + +/* voce menu */ +"Notifica sismi forti a qualsiasi distanza se la magnitudo è maggiore a" = "Notificar sismos fuertes a cualquier distancia si la magnitud es mayor que"; + +/* titolo impostazioni notifiche + voce menu */ +"Notifiche da reti sismiche" = "Notificaciones desde redes sísmicas"; + +/* titolo impostazioni notifiche + voce menu */ +"Notifiche segnalazioni utente" = "Notificaciones desde informes de usuario"; + +/* titolo impostazioni notifiche + voce menu */ +"Notifiche sismi" = "Notificaciones de sismos"; + +/* titolo impostazioni notifiche + voce menu */ +"Notifiche sismi rilevati in tempo reale" = "Notificaciones de sismos detectados en tiempo real."; + +/* titolo impostazioni notifiche + voce menu */ +"Notifiche tsunami" = "Notificaciones de tsunami"; + +/* No comment provided by engineer. */ +"Nuova Zelanda" = "Nueva Zelanda"; + +/* voce elenco aree tsunami */ +"Oceano Pacifico" = "Oceano Pacifico"; + +/* No comment provided by engineer. */ +"OK" = "OK"; + +/* No comment provided by engineer. */ +"Onda sismica in" = "Onda sísmica en"; + +/* No comment provided by engineer. */ +"oppure" = "de otra manera"; + +/* voce menu */ +"Ora di fine" = "Hora de inicio"; + +/* voce menu */ +"Ora di inizio" = "Hora de fine"; + +/* No comment provided by engineer. */ +"ora fa" = "hora"; + +/* voce menu */ +"Ora fine" = "Hora de fine"; + +/* voce menu */ +"Ora inizio" = "Hora de inicio"; + +/* No comment provided by engineer. */ +"ore fa" = "horas"; + +/* No comment provided by engineer. */ +"pagerai al mese:" = "pagaras por mes:"; + +/* No comment provided by engineer. */ +"pagerai all'anno:" = "pagaras por año:"; + +/* voce elenco messaggio tsunami */ +"Pericolo cessato" = "Cesado peligro"; + +/* voce elenco messaggio tsunami */ +"Pericolo tsunami" = "Peligro de tsunami"; + +/* No comment provided by engineer. */ +"Perù" = "Peru"; + +/* No comment provided by engineer. */ +"Pressione:" = "Presión:"; + +/* voce menu */ +"Privacy" = "Privacidad"; + +/* No comment provided by engineer. */ +"Privacy: http://wp.earthquakenetwork.it/privacy/\n\nTermini e condizioni: http://wp.earthquakenetwork.it/it/terms-conditions/" = "Privacidad: http://wp.earthquakenetwork.it/privacy/\n\nTérminos y condiciones: http://wp.earthquakenetwork.it/it/terms-conditions/"; + +/* No comment provided by engineer. */ +"Profondità" = "Profundidad"; + +/* versione pro */ +"Puoi convertire la tua app nella versione PRO senza doverla scariche dallo store. La versione PRO a notifiche e allerte tramite sintetizazione vocale, la visione in realtà aumentata, l'allerta sui movimenti rilevati dal proprio smartphone e non ha alcuna pubblicità. In più sostieni il progetto di ricerca il quale non sostiene finanziamenti esterni. Grazie per considerare l'acquisto! Alternativamente il passaggio alla versione PRO è GRATUITO sottoscrivendo uno degli abbonamenti annuali della lista di priorità.\n\nPrivacy: http://wp.earthquakenetwork.it/privacy/ \n\nTermini e condizioni: http://wp.earthquakenetwork.it/it/terms-conditions/" = "Sismo Detector es el único proyecto de investigación que desarrolla un sistema mundial de alerta sísmica en tiempo real basado en teléfonos inteligentes. Al comprar la versión PRO, usted apoya el proyecto que no recibe ningún tipo de financiamiento. La versión PRO no tiene publicidad y en el futuro incluirá características adicionales en comparación con la versión básica. ¡Gracias por considerar comprar y apoyar el proyecto!\n\nPrivacidad: http://wp.earthquakenetwork.it/privacy\n\nTérminos y Condiciones: http://wp.earthquakenetwork.it/it/terms-conditions/"; + +/* No comment provided by engineer. */ +"Puoi entrare a fare parte delle liste di priorità prime" = "Puedes unirte a la lista de priorida de las primeras"; + +/* voce elenco raggio sismi */ +"Qualsiasi distanza" = "Cualquier distancia"; + +/* voce menu */ +"Qualsiasi intensità" = "Cualquier intensidad"; + +/* voce menu */ +"Raggio dalla tua posizione" = "Radio desde tu ubicación"; + +/* voce menu */ +"Raggio sismi forti o intensità non disponibile" = "Radio sismos fuertes o con intensidad no disponible"; + +/* voce menu */ +"Raggio sismi lievi" = "Radio sismos leves"; + +/* No comment provided by engineer. */ +"Repubblica Domenicana" = "Republica Dominicana"; + +/* item tabelle */ +"Rete smartphone" = "Red smartphone"; + +/* pulsanti orrizontale */ +"RETE SMARTPHONE" = "RED SMARTPHONE"; + +/* titolo impostazioni notifiche + voce menu */ +"Reti sismiche" = "Redes sismicas"; + +/* pulsanti orrizontale */ +"RETI SISMICHE" = "REDES SISMICAS"; + +/* voce menu */ +"Ricevi le notifiche dei sismi rilevati dalle agenzie nazionalie internazionali" = "Recibe notificaciones de sismos detectados por las agencias sísmicas nacionales e internacionales."; + +/* voce menu */ +"Ricevi le notifiche dei suonisegnalati manualemente dagli utenti" = "Recibe notificaciones de sismos reportados manualmente por los usuarios."; + +/* voce menu */ +"Ricevi le notifiche in tempo reale dei sismi rilevati dalla rete smartphone" = "Recibe notificaciones en tiempo real de los sismos detectados por la red de teléfonos inteligentes."; + +/* voce menu */ +"Ricevi le notifiche per i messaggi rilasciati dal Pacific Tsunami Warning Center" = "Recibe notificaciones de mensajes publicados por el Pacific Tsunami Warning Center"; + +/* voce menu */ +"Ricevi le notifiche solo in un intervallo del giorno" = "Recibe notificaciones solo"; + +/* titolo navigation bar */ +"Rilevatore Terremoti" = "Sismo Detector"; + +/* Samples */ +"Samples" = "Samples"; + +/* No comment provided by engineer. */ +"Scarica " = "Download "; + +/* No comment provided by engineer. */ +"Se vuoi filtrare la lista dei sismi, seleziona la nazione in cui vivi" = "Si desea filtrar la lista de sismos, selecciona el país donde vive."; + +/* No comment provided by engineer. */ +"secondi" = "segundos"; + +/* No comment provided by engineer. */ +"Segnalazione " = "Informe "; + +/* pulsanti orrizontale */ +"SEGNALAZIONI" = "INFORMES"; + +/* No comment provided by engineer. */ +"Sei abbonato: priorità 10000 persone, rinnovo annuale " = "Estás suscrito a la lista de prioridades de 10'000, renovación anual "; + +/* No comment provided by engineer. */ +"Sei abbonato: priorità 10000 persone, rinnovo mensile " = "Estás suscrito a la lista de prioridades de 10'000, renovación mensual "; + +/* No comment provided by engineer. */ +"Sei abbonato: priorità 100000 persone, rinnovo annuale " = "Estás suscrito a la lista de prioridades de 100'000, renovación anual "; + +/* No comment provided by engineer. */ +"Sei abbonato: priorità 100000 persone, rinnovo mensile " = "Estás suscrito a la lista de prioridades de 100'000, renovación mensual "; + +/* No comment provided by engineer. */ +"Sei ore" = "seis horas"; + +/* No comment provided by engineer. */ +"Seleziona" = "Seleccionar"; + +/* No comment provided by engineer. */ +"sending" = "enviando"; + +/* voce menu */ +"Sismi da notificare" = "Sismos para informar"; + +/* item tabelle */ +"Sismi rilevati da smartphone" = "Sismos detectados por smartphones"; + +/* voce menu */ +"Sismi senza intensità" = "Sismos sin intensidad"; + +/* messaggio errore richiesta dev_cmd */ +"Sì è verificato un errore sulla centralina" = "Sì è verificato un errore sulla centralina"; + +/* voce menu */ +"Solo sismi forti" = "Solo sismos fuertes"; + +/* descrizione Top 10K */ +"sottoscrizioni ancora disponibiliper essere allertato in meno di 1 secondo dal rilevamento del sistema" = "suscripciones aún disponibles para ser alertados en menos de 1 segundo desde el sismo"; + +/* descrizione Top 100K */ +"sottoscrizioni ancora disponibiliper essere allertato in meno di 5 secondi dal rilevamento del sistema" = "suscripciones aún disponibles para ser alertados en menos de 5 segundos desde el sismo"; + +/* No comment provided by engineer. */ +"Spagna" = "España"; + +/* pulsanti orrizontale */ +"SPONSOR" = "SPONSOR"; + +/* No comment provided by engineer. */ +"Stai acquistando la verisone pro, verrà rimossa la pubblicità" = "Está comprando la versión pro, el anuncios serán eliminados"; + +/* voce menu */ +"Suona un allarme quando un sisma è rilevato dalla rete di smartphones " = "Activa una alarma cuando la red de teléfonos inteligentes detecta un sismo"; + +/* voce elenco messaggio tsunami */ +"Supplemento di allerta" = "Suplemento de alerta"; + +/* voce elenco messaggio tsunami */ +"Supplemento di valutazione" = "Suplemento de evaluación"; + +/* No comment provided by engineer. */ +"Temperatura: " = "Temperaturas: "; + +/* voce menu */ +"Terremoti forti" = "Sismos fuertes"; + +/* voce menu */ +"Terremoti vicini" = "Sismos cercanos"; + +/* voce menu */ +"Testa allarme" = "Prueba alarma"; + +"testo utenti1" = "Esta app es útil para ti? Vota la app con 5 estrellas en"; + +"testo utenti2" = "gracias! Más personas tiene instalada la app, mejor funcionarán las alertas. Comparta la app para mejorar la detección en tiempo real."; +/* titolo impostazioni notifiche + voce menu */ +"Tipo messaggio" = "Tipo de mensaje"; + +/* voce menu */ +"Tono di allarme" = "Tono de alarma"; + +/* No comment provided by engineer. */ +"TRENS" = "TENDENCIA"; + +/* pulsanti orrizontale */ +"TSUNAMI" = "TSUNAMI"; + +/* No comment provided by engineer. */ +"Ultim\'ora" = "Ultima hora"; + +/* No comment provided by engineer. */ +"Ultima settimana" = "Ultima semana"; + +/* No comment provided by engineer. */ +"Ultimo anno" = "Ultima año"; + +/* No comment provided by engineer. */ +"Ultimo giorno" = "Ultimo dia"; + +/* No comment provided by engineer. */ +"Ultimo mese" = "Ultimo mes"; + +/* No comment provided by engineer. */ +"Umidità : " = "Humedad: "; + +/* No comment provided by engineer. */ +"Un anno" = "Un año"; + +/* No comment provided by engineer. */ +"un anno" = "un año"; + +/* No comment provided by engineer. */ +"Un giorno" = "Un dia"; + +/* No comment provided by engineer. */ +"Un mese" = "Un mes"; + +/* No comment provided by engineer. */ +"Un ora" = "Una hora"; + +/* voce menu */ +"Un sisma è simulato. Dovresti ricevere l'allerta e l'allarme dovrebbe suonare. Se attive, ricordati di disabilitare l'invio della mail automatiche ai tuoi contatti per non allarmarli" = "Un sisma è simulato. Dovresti ricevere l'allerta e l'allarme dovrebbe suonare. Se attive, ricordati di disabilitare l'invio della mail automatiche ai tuoi contatti per non allarmarli"; + +/* No comment provided by engineer. */ +"Un\'ora" = "Una hora"; + +/* No comment provided by engineer. */ +"Una settimana" = "Una semana"; + +/* No comment provided by engineer. */ +"Usa il bottone per segnalare il sisma" = "Usa el botón para reportar un sismo"; + +/* messaggio errore inserimento credenziali */ +"Username e Password sbagliati" = "Username e Password sbagliati"; + +/* voce elenco messaggio tsunami */ +"Valutazione cancellata" = "Evaluación cancelada"; + +/* voce elenco messaggio tsunami */ +"Valutazione Tsunami" = "Evaluación tsunami"; + +/* titolo pulsante notifica rete smartphone */ +"VEDI IN TWITTER" = "VER EN TWITTER"; + +/* No comment provided by engineer. */ +"Velocità vento: " = "Velocidad viento: "; + +/* No comment provided by engineer. */ +"Venezuela" = "Venezuela"; + +/* etichetta versione app */ +"Versione" = "Versión"; + +/* item tabelle */ +"Versione PRO" = "Versión PRO"; + +/* titolo impostazioni notifiche */ +"Vibrazioni e suono" = "Sonido y vibracion"; + +/* titolo pulsante notifica rete smartphone */ +"VOTA L'APP" = "Vota la app"; + +/* No comment provided by engineer. */ +"• Il pagamento verrà addebitato sull'account iTunes alla conferma dell'acquisto\n\n• L'abbonamento si rinnova automaticamente a meno che il rinnovo automatico non venga disattivato almeno 24 ore prima della fine del periodo corrente\n\n• L'abbonamento verrà addebitato per il rinnovo entro 24 ore prima della fine del periodo corrente e identificato il costo del rinnovo\n\n• Le sottoscrizioni possono essere gestite dall'utente e il rinnovo automatico può essere disattivato accedendo alle Impostazioni account dell'utente dopo l'acquisto." = "• Tu pago se cargará a tu cuenta de iTunes después de la confirmación de la compra\n\n• La suscripción se renueva automáticamente a menos que la renovación automática se desactive al menos 24 horas antes del final del período actual\n\n• Se cobrará la suscripción para la renovación dentro de las 24 horas antes del final del período actual\n\n• Las suscripciones pueden ser administradas por el usuario y la renovación automática puede desactivarse accediendo a la configuración de la cuenta del usuario después de la compra."; + +/* No comment provided by engineer. */ +"• L'abbonamento si rinnova automaticamente a meno che il rinnovo automatico non venga disattivato almeno 24 ore prima della fine del periodo corrente\n\n• L'abbonamento verrà addebitato per il rinnovo entro 24 ore prima della fine del periodo corrente e identificato il costo del rinnovo\n\n• Le sottoscrizioni possono essere gestite dall'utente e il rinnovo automatico può essere disattivato accedendo alle Impostazioni account dell'utente dopo l'acquisto.\n\n" = "• La suscripción se renueva automáticamente a menos que la renovación automática se desactive al menos 24 horas antes del final del período actual\n\n• La suscripción se cobrará por la renovación dentro de las 24 horas anteriores al final del período actual\n\n• Las suscripciones pueden ser administradas por el usuario y la renovación automática puede desactivarse accediendo a la configuración de la cuenta del usuario después de la compra."; + + +"Globale" = "Global"; +"Italia" = "Italia"; +"Spagna" = "España"; +"Cina" = "China"; +"Giappone" = "Japón"; +"Nicaragua" = "Nicaragua"; +"Messico" = "México"; +"Colombia" = "Colombia"; +"Costa Rica" = "Costa Rica"; +"Cile" = "Chile"; +"Venezuela" = "Venezuela"; +"Nuova Zelanda" = "Nueva Zelanda"; +"Argentina" = "Argentina"; +"Ecuador" = "Ecuador"; +"Filippine" = "Filipinas"; +"Perù" = "Perú"; +"Repubblica Dominicana" = "Republica Dominicana"; + + + + + +/// notifiche + +"Allerta sismica in tempo reale" = "Alerta sísmica en tiempo real"; +"Segnalazione utente" = "Informe de usuario"; +"Segnalazione da rete sismica" = "Informe de red sísmica"; +"Allerta tsunami" = "Alerta de tsunami"; + +/// notifiche body + +"Rilevato sisma debole a" = "Sismo leve detectado en %@"; +"Rilevato sisma forte a" = "Sismo fuerte detectado en %@"; +"Rilevato sisma a" = "Sismo detectado en %@"; +"Sisma lieve segnalato da utente a" = "Sismo leve reportado por usuario en %@"; +"Sisma forte segnalato da utente a" = "Sismo fuerte reportado por usuario en %@"; +"Sisma molto forte segnalato da utente a" = "Sismo muy fuerte reportado por usuario en %@"; +"Sisma rilevato a" = "Sismo detectado en %@"; +"Area di interesse: Mar dei Caraibi" = "Área de interés: Mar Caribe"; +"Area di interesse: Hawaii" = "Área de interés: Islas hawai"; +"Area di interesse: Oceano Pacifico" = "Área de interés: Océano Pacífico"; +"Sisma rilevato da" = "terremoto detectado por"; + diff --git a/Sources/Earthquake Network/es.lproj/Main.strings b/Sources/Earthquake Network/es.lproj/Main.strings new file mode 100644 index 0000000..e0e00c1 --- /dev/null +++ b/Sources/Earthquake Network/es.lproj/Main.strings @@ -0,0 +1,525 @@ + +/* Class = "UILabel"; text = "Ho sentito un sisma!"; ObjectID = "0Ak-hW-RBU"; */ +"0Ak-hW-RBU.text" = "¡Siento un sismo!"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "1sq-6I-E5n"; */ +"1sq-6I-E5n.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "MAPPA"; ObjectID = "2A5-yR-eOQ"; */ +"2A5-yR-eOQ.normalTitle" = "MAPPA"; + +/* Class = "UIButton"; normalTitle = "CHIUDI"; ObjectID = "2Br-cq-xVZ"; */ +"2Br-cq-xVZ.normalTitle" = "CHIUDI"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "2HX-pm-zSu"; */ +"2HX-pm-zSu.text" = "Label"; + +/* Class = "UILabel"; text = "Mappa rete smartphone"; ObjectID = "3dd-aM-obj"; */ +"3dd-aM-obj.text" = "Mappa rete smartphone"; + +/* Class = "UIButton"; normalTitle = "MAPPA"; ObjectID = "4EG-hN-3FP"; */ +"4EG-hN-3FP.normalTitle" = "MAPPA"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "4Hy-lX-lCp"; */ +"4Hy-lX-lCp.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "4gX-D0-zeu"; */ +"4gX-D0-zeu.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "GESTISCI LE RETI SISMICHE"; ObjectID = "4md-qt-Zwo"; */ +"4md-qt-Zwo.normalTitle" = "Gestionar redes sísmicas"; + +/* Class = "UILabel"; text = "Nessuna allerta sismica in tempo reale ricevuta recentemente"; ObjectID = "5El-UZ-GKU"; */ +"5El-UZ-GKU.text" = "Ninguna alerta en tiempo real recibida recientemente por tu smartphone"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "5hU-OF-FaR"; */ +"5hU-OF-FaR.text" = "Label"; + +/* Class = "UILabel"; text = "Magnitudo"; ObjectID = "5y9-OK-Kfs"; */ +"5y9-OK-Kfs.text" = "Magnitudo"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "69U-0c-ZLI"; */ +"69U-0c-ZLI.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "6pX-89-eYU"; */ +"6pX-89-eYU.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "COPERTURA LOCALE"; ObjectID = "769-Iq-JPs"; */ +"769-Iq-JPs.normalTitle" = "COBERTURA LOCAL"; + +/* Class = "UINavigationItem"; title = "Detail"; ObjectID = "76n-gb-S2z"; */ +"76n-gb-S2z.title" = "Detail"; + +/* Class = "UIButton"; normalTitle = "METEO"; ObjectID = "77F-LL-WYK"; */ +"77F-LL-WYK.normalTitle" = "METEO"; + +/* Class = "UILabel"; text = "Puoi essere il primo ad essere notificato quando un sisma viene rilevato. Un cliente ha sottoscritto il servizio soltanto 2 ore fa!"; ObjectID = "7EC-pz-u3s"; */ +"7EC-pz-u3s.text" = "Sé el primero en ser alertado cuando se detecta un sismo en tiempo real."; + +/* Class = "UILabel"; text = "Label"; ObjectID = "85m-tz-xYz"; */ +"85m-tz-xYz.text" = "Label"; + +/* Class = "UILabel"; text = "Magnitudo"; ObjectID = "86G-GS-MXw"; */ +"86G-GS-MXw.text" = "Magnitudo"; + +/* Class = "UILabel"; text = "Mappa rete globale"; ObjectID = "88p-Zw-SQw"; */ +"88p-Zw-SQw.text" = "Mappa rete globale"; + +/* Class = "UILabel"; text = "Ultime 24 h:"; ObjectID = "8fS-Us-UId"; */ +"8fS-Us-UId.text" = "Últimas 24 h:"; + +/* Class = "UILabel"; text = "Dispositivo affidabile"; ObjectID = "8ix-uO-Qah"; */ +"8ix-uO-Qah.text" = "Dispositivo affidabile"; + +/* Class = "UITextField"; placeholder = "Seleziona la nazione"; ObjectID = "8lr-r3-yom"; */ +"8lr-r3-yom.placeholder" = "Selecciona el pais"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "8zP-ga-ogL"; */ +"8zP-ga-ogL.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "9n5-rN-Hyd"; */ +"9n5-rN-Hyd.text" = "Label"; + +/* Class = "UILabel"; text = "Segnalazioni Utente"; ObjectID = "A3b-4E-9kc"; */ +"A3b-4E-9kc.text" = "Reportes usuarios últimas 24h"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "A6Y-pQ-1P5"; */ +"A6Y-pQ-1P5.text" = "Label"; + +/* Class = "UILabel"; text = "Totale: "; ObjectID = "ASR-KA-q00"; */ +"ASR-KA-q00.text" = "Total: "; + +/* Class = "UILabel"; text = "Magnitudo"; ObjectID = "Ah1-CG-g7M"; */ +"Ah1-CG-g7M.text" = "Magnitudo"; + +/* Class = "UILabel"; text = "Messaggio per gli utenti"; ObjectID = "CNf-MQ-1xI"; */ +"CNf-MQ-1xI.text" = "Mensaje para los usuarios"; + +/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "CYK-HC-2lv"; */ +"CYK-HC-2lv.normalTitle" = "Button"; + +/* Class = "UILabel"; text = "Magnitudo"; ObjectID = "CYe-N3-4cN"; */ +"CYe-N3-4cN.text" = "Magnitudo"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "Cxa-dk-bH9"; */ +"Cxa-dk-bH9.text" = "Label"; + +/* Class = "UILabel"; text = "Sottoscrizioni attive"; ObjectID = "D1z-2N-Kzv"; */ +"D1z-2N-Kzv.text" = "Suscripciones activas"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "EhO-Xe-kaN"; */ +"EhO-Xe-kaN.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "DETTAGLI"; ObjectID = "EnF-WI-a9a"; */ +"EnF-WI-a9a.normalTitle" = "DETTAGLI"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "FGQ-PN-e9e"; */ +"FGQ-PN-e9e.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "FSg-lV-siS"; */ +"FSg-lV-siS.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "Fkj-uY-a3t"; */ +"Fkj-uY-a3t.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "GCe-cb-Wlp"; */ +"GCe-cb-Wlp.text" = "Label"; + +/* Class = "UILabel"; text = "Magnitudo"; ObjectID = "HIi-bS-da2"; */ +"HIi-bS-da2.text" = "Magnitudo"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "Hcz-F8-6wV"; */ +"Hcz-F8-6wV.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "HdO-wA-FHK"; */ +"HdO-wA-FHK.text" = "Label"; + +/* Class = "UINavigationItem"; title = "Master"; ObjectID = "I4H-lo-DTA"; */ +"I4H-lo-DTA.title" = "Master"; + +/* Class = "UILabel"; text = "Nessuna sottoscrizione attiva. Nella lista delle persone da allertare"; ObjectID = "IOC-5n-qa0"; */ +"IOC-5n-qa0.text" = "No hay suscripción activa."; + +/* Class = "UITextView"; text = "Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda."; ObjectID = "IOH-Xc-XjL"; */ +"IOH-Xc-XjL.text" = "Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda."; + +/* Class = "UILabel"; text = "Label"; ObjectID = "IgH-la-uKP"; */ +"IgH-la-uKP.text" = "Label"; + +/* Class = "UILabel"; text = "Lista priorità - NUOVA!"; ObjectID = "IyW-lN-cXy"; */ +"IyW-lN-cXy.text" = "Servicio prioritario"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "JAu-kk-n4H"; */ +"JAu-kk-n4H.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "INIZIA LA CONVERSIONE"; ObjectID = "JKo-9B-PZh"; */ +"JKo-9B-PZh.normalTitle" = "Iniciar la conversión"; + +/* Class = "UIBarButtonItem"; title = "Item"; ObjectID = "JQa-KO-YJs"; */ +"JQa-KO-YJs.title" = "Item"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "Jeo-dP-3lB"; */ +"Jeo-dP-3lB.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "KI7-0R-pnR"; */ +"KI7-0R-pnR.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "Kv4-iM-8Td"; */ +"Kv4-iM-8Td.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "MSh-ry-KRA"; */ +"MSh-ry-KRA.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "Mic-8d-Dnd"; */ +"Mic-8d-Dnd.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "CONDIVIDI"; ObjectID = "NDa-a1-WFp"; */ +"NDa-a1-WFp.normalTitle" = "COMPARTA APP"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "NhL-DG-FAz"; */ +"NhL-DG-FAz.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "P51-pk-ur9"; */ +"P51-pk-ur9.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "POg-DV-nSl"; */ +"POg-DV-nSl.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "Psv-I2-jwN"; */ +"Psv-I2-jwN.text" = "Label"; + +/* Class = "UILabel"; text = "Magnitudo"; ObjectID = "QdI-xm-PU6"; */ +"QdI-xm-PU6.text" = "Magnitudo"; + +/* Class = "UILabel"; text = "Rete smartphone"; ObjectID = "RJX-0r-Rfg"; */ +"RJX-0r-Rfg.text" = "Red smartphone"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "RPb-mG-G7i"; */ +"RPb-mG-G7i.text" = "Label"; + +/* Class = "UILabel"; text = "Versione PRO"; ObjectID = "SBb-oo-qja"; */ +"SBb-oo-qja.text" = "Versión PRO"; + +/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "STa-f1-QwN"; */ +"STa-f1-QwN.normalTitle" = "Button"; + +/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "Sse-Jt-L1G"; */ +"Sse-Jt-L1G.normalTitle" = "Button"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "Sx2-Xi-NrV"; */ +"Sx2-Xi-NrV.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "TN4-4n-dYj"; */ +"TN4-4n-dYj.text" = "Label"; + +/* Class = "UILabel"; text = "Sismi rilevati da smartphone"; ObjectID = "TdN-jP-cPf"; */ +"TdN-jP-cPf.text" = "Sismos detectados por smartphones"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "Ty0-3Z-tCg"; */ +"Ty0-3Z-tCg.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "UYV-p9-uzc"; */ +"UYV-p9-uzc.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "Uht-yY-3n8"; */ +"Uht-yY-3n8.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "Ul5-Ri-NUN"; */ +"Ul5-Ri-NUN.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "UlR-wR-qw5"; */ +"UlR-wR-qw5.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "VNx-fE-Rhs"; */ +"VNx-fE-Rhs.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "VgM-Do-cEe"; */ +"VgM-Do-cEe.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "VsF-W2-Jzb"; */ +"VsF-W2-Jzb.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "Vv4-ou-iqD"; */ +"Vv4-ou-iqD.normalTitle" = "Button"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "WAn-AD-eef"; */ +"WAn-AD-eef.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "WZQ-HQ-xBq"; */ +"WZQ-HQ-xBq.text" = "Label"; + +/* Class = "UILabel"; text = "smartphone sono in monitoraggio sismico"; ObjectID = "WdA-gj-Qr2"; */ +"WdA-gj-Qr2.text" = "smartphones están en monitoreo sísmico"; + +/* Class = "UIViewController"; title = "Detail"; ObjectID = "Wj9-pD-mnF"; */ +"Wj9-pD-mnF.title" = "Detail"; + +/* Class = "UILabel"; text = "Quando un sisma è rilevato in tempo reale dagli smartphone vicini all'epicentro, il server invia un'allerta a tutti gli utenti che hanno l'app. Allertare tutti gli utenti può richiedere fino a 10 secondi in quanto non è tecnicamente fattibile farlo istantaneamente. Ora puoi entrare a fare parte delle liste di priorità prime 10000 o 100000 persone allertate."; ObjectID = "Wp2-4P-Na5"; */ +"Wp2-4P-Na5.text" = "Smartphones cerca del epicentro detectan el sismo al instante. En este punto, el servidor notifica a todos los usuarios de la aplicación y si no vive muy cerca del epicentro puede tomar medidas antes de que el sismo te alcanza. El proceso de notificación puede tardar hasta 10 segundos para cubrir todos los usuarios. Ahora puede comprar una prioridad con el fin de estar entre las primeras 10\'000 o 100\'000 personas notificadas."; + +/* Class = "UILabel"; text = "Label"; ObjectID = "X60-02-FXo"; */ +"X60-02-FXo.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "CHIUDI"; ObjectID = "YTn-Br-zUU"; */ +"YTn-Br-zUU.normalTitle" = "CHIUDI"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "YrE-fF-dFW"; */ +"YrE-fF-dFW.text" = "Label"; + +/* Class = "UILabel"; text = "Magnitudo"; ObjectID = "ZI0-eg-3Yd"; */ +"ZI0-eg-3Yd.text" = "Magnitudo"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "ZSQ-Ah-wA8"; */ +"ZSQ-Ah-wA8.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "a9G-nS-tWW"; */ +"a9G-nS-tWW.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "aFA-SZ-reV"; */ +"aFA-SZ-reV.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "X"; ObjectID = "auz-rc-k35"; */ +"auz-rc-k35.normalTitle" = "X"; + +/* Class = "UILabel"; text = "Stai pagando:"; ObjectID = "awF-Zd-fAt"; */ +"awF-Zd-fAt.text" = "Está pagando:"; + +/* Class = "UIButton"; normalTitle = "CONFERMA NAZIONE"; ObjectID = "bYB-me-lg7"; */ +"bYB-me-lg7.normalTitle" = "Confirmar pais"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "bgA-WP-7Ut"; */ +"bgA-WP-7Ut.text" = "Label"; + +/* Class = "UILabel"; text = "oppure"; ObjectID = "c39-TN-fIZ"; */ +"c39-TN-fIZ.text" = "de otra manera"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "cOC-hS-Gxk"; */ +"cOC-hS-Gxk.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "ch3-lb-gg8"; */ +"ch3-lb-gg8.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "MAPPA"; ObjectID = "d8m-gN-HSj"; */ +"d8m-gN-HSj.normalTitle" = "MAPPA"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "dIG-8S-PcU"; */ +"dIG-8S-PcU.text" = "Label"; + +/* Class = "UILabel"; text = "Magnitudo"; ObjectID = "dOI-Vx-NaB"; */ +"dOI-Vx-NaB.text" = "Magnitudo"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "dtY-rw-xfq"; */ +"dtY-rw-xfq.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "METEO"; ObjectID = "evB-bn-cGC"; */ +"evB-bn-cGC.normalTitle" = "METEO"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "f3p-2E-xJU"; */ +"f3p-2E-xJU.text" = "Label"; + +/* Class = "UILabel"; text = "Ultime 24 h:"; ObjectID = "fI2-EU-9pf"; */ +"fI2-EU-9pf.text" = "Ultime 24 h:"; + +/* Class = "UILabel"; text = "Title"; ObjectID = "fkf-ZE-eUX"; */ +"fkf-ZE-eUX.text" = "Title"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "fzZ-un-KyL"; */ +"fzZ-un-KyL.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "g0c-oz-aha"; */ +"g0c-oz-aha.normalTitle" = "Button"; + +/* Class = "UIButton"; normalTitle = "chiudi"; ObjectID = "g5C-Wg-DEu"; */ +"g5C-Wg-DEu.normalTitle" = "chiudi"; + +/* Class = "UILabel"; text = "Rete smartphone"; ObjectID = "gA9-1y-GkX"; */ +"gA9-1y-GkX.text" = "Red smartphone"; + +/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "gH3-JA-kpZ"; */ +"gH3-JA-kpZ.normalTitle" = "Button"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "giY-Wc-DhN"; */ +"giY-Wc-DhN.text" = "Label"; + +/* Class = "UIBarButtonItem"; title = "Item"; ObjectID = "go0-F7-Zhq"; */ +"go0-F7-Zhq.title" = "Item"; + +/* Class = "UIButton"; normalTitle = "METEO"; ObjectID = "gxf-sn-X3o"; */ +"gxf-sn-X3o.normalTitle" = "METEO"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "gz7-iN-sSG"; */ +"gz7-iN-sSG.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "hcf-rB-rCy"; */ +"hcf-rB-rCy.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "Annulla"; ObjectID = "i4A-Xa-gJv"; */ +"i4A-Xa-gJv.normalTitle" = "Cancelar"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "iVr-7d-dbb"; */ +"iVr-7d-dbb.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "j4G-Ck-LqX"; */ +"j4G-Ck-LqX.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "jMx-Or-mvH"; */ +"jMx-Or-mvH.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "jRS-Cp-CNI"; */ +"jRS-Cp-CNI.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "jvz-vt-Vjt"; */ +"jvz-vt-Vjt.text" = "Label"; + +/* Class = "UILabel"; text = "Converti la tua app nella versione PRO! Scopri come"; ObjectID = "jzO-Nm-azA"; */ +"jzO-Nm-azA.text" = "Convierte tu app a la versión PRO! Descubres cómo."; + +/* Class = "UILabel"; text = "Label"; ObjectID = "k9g-Q3-Znk"; */ +"k9g-Q3-Znk.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "kFI-uR-U91"; */ +"kFI-uR-U91.normalTitle" = "Button"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "kxE-d4-etz"; */ +"kxE-d4-etz.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "lLs-bT-kHd"; */ +"lLs-bT-kHd.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "laB-mX-KEL"; */ +"laB-mX-KEL.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "lut-wL-P63"; */ +"lut-wL-P63.text" = "Label"; + +/* Class = "UILabel"; text = "smartphone sono in monitoraggio sismico"; ObjectID = "mSt-vL-RlL"; */ +"mSt-vL-RlL.text" = "smartphones están en monitoreo sísmico"; + +/* Class = "UIButton"; normalTitle = "Esci"; ObjectID = "mbc-UD-cj9"; */ +"mbc-UD-cj9.normalTitle" = "Esci"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "nYa-8A-3yt"; */ +"nYa-8A-3yt.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "CONDIVIDI"; ObjectID = "nuC-fx-3PA"; */ +"nuC-fx-3PA.normalTitle" = "COMPARTA APP"; + +/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "o6r-rw-AGL"; */ +"o6r-rw-AGL.normalTitle" = "Button"; + +/* Class = "UILabel"; text = "Subtitle"; ObjectID = "oQ5-7g-0zb"; */ +"oQ5-7g-0zb.text" = "Subtitle"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "oR4-uQ-fKx"; */ +"oR4-uQ-fKx.text" = "Label"; + +/* Class = "UILabel"; text = "Magnitudo"; ObjectID = "oTa-fo-fYi"; */ +"oTa-fo-fYi.text" = "Magnitudo"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "oVp-Ry-d2d"; */ +"oVp-Ry-d2d.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "p5v-fA-y8G"; */ +"p5v-fA-y8G.text" = "Label"; + +/* Class = "UILabel"; text = "Ultime 24 h:"; ObjectID = "p79-JV-CBM"; */ +"p79-JV-CBM.text" = "Ultime 24 h:"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "pXK-JQ-Xeu"; */ +"pXK-JQ-Xeu.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "chiudi"; ObjectID = "pZJ-ch-465"; */ +"pZJ-ch-465.normalTitle" = "chiudi"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "pde-71-z1D"; */ +"pde-71-z1D.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "MAPPA"; ObjectID = "ppn-JO-Eda"; */ +"ppn-JO-Eda.normalTitle" = "MAPPA"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "q3f-N3-If9"; */ +"q3f-N3-If9.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "qAK-ZJ-bfK"; */ +"qAK-ZJ-bfK.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "sqK-xD-x0a"; */ +"sqK-xD-x0a.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "stO-8E-VwV"; */ +"stO-8E-VwV.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "swQ-Mz-tdr"; */ +"swQ-Mz-tdr.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "tCc-0T-BeB"; */ +"tCc-0T-BeB.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "uRT-cO-0Qp"; */ +"uRT-cO-0Qp.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "uhQ-Zr-CHu"; */ +"uhQ-Zr-CHu.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "upr-qE-1te"; */ +"upr-qE-1te.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "ABBONATI AL SERVIZIO"; ObjectID = "uuc-Yo-Axy"; */ +"uuc-Yo-Axy.normalTitle" = "ABBONATI AL SERVIZIO"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "vSb-fa-Blr"; */ +"vSb-fa-Blr.text" = "Label"; + +/* Class = "UILabel"; text = "Magnitudo"; ObjectID = "vbK-LB-cEA"; */ +"vbK-LB-cEA.text" = "Magnitudo"; + +/* Class = "UILabel"; text = "Versione PRO"; ObjectID = "vcB-Og-UR8"; */ +"vcB-Og-UR8.text" = "Versión PRO"; + +/* Class = "UITableViewController"; title = "Master"; ObjectID = "vch-mp-anl"; */ +"vch-mp-anl.title" = "Master"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "w8w-9g-aeX"; */ +"w8w-9g-aeX.text" = "Label"; + +/* Class = "UITextView"; text = "Privacy: http://wp.earthquakenetwork.it/privacy/"; ObjectID = "wSy-mE-siO"; */ +"wSy-mE-siO.text" = "Privacy: http://wp.earthquakenetwork.it/privacy/"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "wWB-25-EIr"; */ +"wWB-25-EIr.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "wa3-Nw-fqp"; */ +"wa3-Nw-fqp.text" = "Label"; + +/* Class = "UILabel"; text = "Magnitudo"; ObjectID = "xAb-RL-kXs"; */ +"xAb-RL-kXs.text" = "Magnitudo"; + +/* Class = "UILabel"; text = "Se vuoi filtrare la lista dei sismi, seleziona la nazione in cui vivi"; ObjectID = "xhC-AG-6qG"; */ +"xhC-AG-6qG.text" = "Si desea filtrar la lista de sismos, selecciona el país donde vive."; + +/* Class = "UILabel"; text = "Label"; ObjectID = "xnr-9z-b3F"; */ +"xnr-9z-b3F.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "yE5-wI-8FM"; */ +"yE5-wI-8FM.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "yL7-QS-kK8"; */ +"yL7-QS-kK8.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "CONDIVIDI"; ObjectID = "ygR-b2-Seh"; */ +"ygR-b2-Seh.normalTitle" = "COMPARTA APP"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "yn6-On-9ez"; */ +"yn6-On-9ez.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "zCw-yW-TG3"; */ +"zCw-yW-TG3.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "zFT-ku-ebI"; */ +"zFT-ku-ebI.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "zKM-qV-ybx"; */ +"zKM-qV-ybx.text" = "Label"; + +/* Class = "UILabel"; text = "Magnitudo"; ObjectID = "zZw-zo-2om"; */ +"zZw-zo-2om.text" = "Magnitudo"; diff --git a/Sources/Earthquake Network/it.lproj/Info.plist b/Sources/Earthquake Network/it.lproj/Info.plist new file mode 100644 index 0000000..5f8213a --- /dev/null +++ b/Sources/Earthquake Network/it.lproj/Info.plist @@ -0,0 +1,66 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.1 + CFBundleVersion + 1.1 + LSApplicationQueriesSchemes + + googlechromes + comgooglemaps + + LSRequiresIPhoneOS + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + NSLocationAlwaysAndWhenInUseUsageDescription + La tua posizione è necessaria per ricevere le allerte sismiche in tempo reale + NSLocationAlwaysUsageDescription + La tua posizione è necessaria per ricevere le allerte sismiche in tempo reale + NSLocationWhenInUseUsageDescription + La tua posizione è necessaria per ricevere le allerte sismiche in tempo reale + UIBackgroundModes + + audio + fetch + location + remote-notification + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Sources/Earthquake Network/it.lproj/LaunchScreen.strings b/Sources/Earthquake Network/it.lproj/LaunchScreen.strings new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Sources/Earthquake Network/it.lproj/LaunchScreen.strings @@ -0,0 +1 @@ + diff --git a/Sources/Earthquake Network/it.lproj/Localizable.strings b/Sources/Earthquake Network/it.lproj/Localizable.strings new file mode 100644 index 0000000..de17311 --- /dev/null +++ b/Sources/Earthquake Network/it.lproj/Localizable.strings @@ -0,0 +1,790 @@ +/* No comment provided by engineer. */ +" 10000 persone allertate." = " 10\'000 persone allertate."; + +/* No comment provided by engineer. */ +" 100000 persone allertate." = " 100\'000 persone allertate."; + +/* No comment provided by engineer. */ +"(Ora tua)" = "(Ora tua)"; + +/* No comment provided by engineer. */ +"Abbonamenti annuali" = "Abbonamenti annuali"; + +/* No comment provided by engineer. */ +"Abbonamenti mensili" = "Abbonamenti mensili"; + +/* No comment provided by engineer. */ +"Abbonamento annuale, priorità 10000 persone " = "Abbonamento annuale, priorità 10\'000 persone "; + +/* No comment provided by engineer. */ +"Abbonamento annuale, priorità 100000 persone " = "Abbonamento annuale, priorità 100\'000 persone "; + +/* No comment provided by engineer. */ +"Abbonamento mensile, priorità 10000 persone " = "Abbonamento mensile, priorità 10\'000 persone "; + +/* No comment provided by engineer. */ +"Abbonamento mensile, priorità 100000 persone " = "Abbonamento mensile, priorità 100\'000 persone "; + +/* voce menu */ +"Abilitato" = "Abilitato"; + +/* titolo impostazioni notifiche */ +"Alerta sismica" = "Alerta sismica"; + +/* voce elenco messaggio tsunami */ +"Allerta cancellata" = "Allerta cancellata"; + +/* voce menu */ +"Allerta in tempo reale" = "Allerta in tempo reale"; + +/* voce elenco messaggio tsunami */ +"Allerta Tsunami" = "Allerta tsunami"; + +/* No comment provided by engineer. */ +"Altro" = "Altro"; + +/* pulsanti orrizontale */ +"ALTRO" = "ALTRO"; + +/* No comment provided by engineer. */ +"Annulla" = "Annulla"; + +/* The name of the app to display in a navigation bar along with a placeholder for the SDK version number */ +"App.NameAndVersion" = "App.NameAndVersion"; + +/* titolo impostazioni notifiche + voce menu */ +"Area di interesse" = "Area di interesse"; + +/* No comment provided by engineer. */ +"Argentina" = "Argentina"; + +/* No comment provided by engineer. */ +"Attenzione" = "Attenzione"; + +/* No comment provided by engineer. */ +"Attenzione " = "Attenzione "; + +/* voce menu */ +"Attiva l'allerta anche su i sismi per i quali non è possibile stimare l'intensità" = "Attiva l\'allerta anche sui sismi per i quali non è possibile stimare l\'intensità"; + +/* voce menu */ +"Autore" = "Autore"; + +/* Back */ +"Back" = "Back"; + +/* pulsanti orrizontale */ +"CHAT" = "CHAT"; + +/* No comment provided by engineer. */ +"Chile" = "Cile"; + +/* No comment provided by engineer. */ +"chiudi" = "chiudi"; + +/* pulsante chiudi impostazioni */ +"Chiudi" = "Chiudi"; + +/* No comment provided by engineer. */ +"CHIUDI" = "CHIUDI"; + +/* No comment provided by engineer. */ +"Cina" = "Cina"; + +/* No comment provided by engineer. */ +"Colombia" = "Colombia"; + +/* titolo pulsante notifica rete smartphone */ +"CONDIVIDI" = "CONDIVIDI APP"; + +/* allerta acquisto o restor pro */ +"Conferma" = "Conferma"; + +/* No comment provided by engineer. */ +"Conferma nazione" = "Conferma nazione"; + +/* No comment provided by engineer. */ +"CONFIG" = "CONFIG"; + +/* No comment provided by engineer. */ +"Copertura" = "Copertura"; + +/* No comment provided by engineer. */ +"Copertura nuvolosa : " = "Copertura nuvolosa : "; + +/* No comment provided by engineer. */ +"Costa Rica" = "Costa Rica"; + +/* No comment provided by engineer. */ +"dalla tua posizione" = "dalla tua posizione"; + +/* No comment provided by engineer. */ +"Data" = "Data"; + +/* No comment provided by engineer. */ +"Data(Ora tua):" = "Data(Ora tua):"; + +/* Prompt to enter text for autocomplete demo */ +"Demo.Content.Autocomplete.EnterTextPrompt" = "Demo.Content.Autocomplete.EnterTextPrompt"; + +/* Format string for 'autocomplete failed with error' message */ +"Demo.Content.Autocomplete.FailedErrorMessage" = "Demo.Content.Autocomplete.FailedErrorMessage"; + +/* Button title for 'show autocomplete widget' */ +"Demo.Content.Autocomplete.ShowWidgetButton" = "Demo.Content.Autocomplete.ShowWidgetButton"; + +/* Button title for the 'BlueColors' styled autocomplete widget. */ +"Demo.Content.Autocomplete.Styling.Colors.BlueColors" = "Demo.Content.Autocomplete.Styling.Colors.BlueColors"; + +/* Button title for the 'Hot Dog Stand' styled autocomplete widget. */ +"Demo.Content.Autocomplete.Styling.Colors.HotDogStand" = "Demo.Content.Autocomplete.Styling.Colors.HotDogStand"; + +/* Button title for the 'WhiteOnBlack' styled autocomplete widget. */ +"Demo.Content.Autocomplete.Styling.Colors.WhiteOnBlack" = "Demo.Content.Autocomplete.Styling.Colors.WhiteOnBlack"; + +/* Button title for the 'Yellow and Brown' styled autocomplete widget. */ +"Demo.Content.Autocomplete.Styling.Colors.YellowAndBrown" = "Demo.Content.Autocomplete.Styling.Colors.YellowAndBrown"; + +/* String for 'autocomplete canceled message' */ +"Demo.Content.Autocomplete.WasCanceledMessage" = "Demo.Content.Autocomplete.WasCanceledMessage"; + +/* Button title for the 'Modal' view of the place picker. */ +"Demo.Content.PlacePicker.ViewController.Modal" = "Demo.Content.PlacePicker.ViewController.Modal"; + +/* Button title for the 'Navigation' view of the place picker. */ +"Demo.Content.PlacePicker.ViewController.Navigation" = "Demo.Content.PlacePicker.ViewController.Navigation"; + +/* Button title for the 'Popover' view of the place picker. */ +"Demo.Content.PlacePicker.ViewController.Popover" = "Demo.Content.PlacePicker.ViewController.Popover"; + +/* Title of the autocomplete demo section */ +"Demo.Section.Title.Autocomplete" = "Demo.Section.Title.Autocomplete"; + +/* Title of the 'Programmatic' demo section */ +"Demo.Section.Title.Programmatic" = "Demo.Section.Title.Programmatic"; + +/* Title of the full-screen autocomplete demo for display in a list or nav header */ +"Demo.Title.Autocomplete.FullScreen" = "Demo.Title.Autocomplete.FullScreen"; + +/* Title of the pushed autocomplete demo for display in a list or nav header */ +"Demo.Title.Autocomplete.Push" = "Demo.Title.Autocomplete.Push"; + +/* Title of the Styling autocomplete demo for display in a list or nav header */ +"Demo.Title.Autocomplete.Styling" = "Demo.Title.Autocomplete.Styling"; + +/* Title of the UISearchController autocomplete demo for display in a list or nav header */ +"Demo.Title.Autocomplete.UISearchController" = "Demo.Title.Autocomplete.UISearchController"; + +/* Title of the UISearchDisplayController autocomplete demo for display in a list or nav header */ +"Demo.Title.Autocomplete.UISearchDisplayController" = "Demo.Title.Autocomplete.UISearchDisplayController"; + +/* Title of the UITextField autocomplete demo for display in a list or nav header */ +"Demo.Title.Autocomplete.UITextField" = "Demo.Title.Autocomplete.UITextField"; + +/* Title of the photos demo for display in a list or nav header */ +"Demo.Title.Photos" = "Demo.Title.Photos"; + +/* Title of the 'select place' button within the photos demo */ +"Demo.Title.Photos.SelectPlace" = "Demo.Title.Photos.SelectPlace"; + +/* Title of the Place Picker demo for displaying the picker in a popover, navigation controller, or modally. */ +"Demo.Title.PlacePicker.ViewController" = "Demo.Title.PlacePicker.ViewController"; + +/* pulsante abbonamenti */ +"DETTAGLI" = "DETTAGLI"; + +/* voce menu */ +"Dettagli importanti sulla rilevazione dei sismi" = "Dettagli importanti sulla rilevazione dei sismi"; + +/* voce menu */ +"Dettagli importanti sulla rilevazione di sismi" = "Dettagli importanti sulla rilevazione dei sismi"; + +/* No comment provided by engineer. */ +"Dieci minuti" = "Dieci minuti"; + +/* voce menu */ +"Disclaimer" = "Disclaimer"; + +/* No comment provided by engineer. */ +"Dispositivi attivi" = "smartphone che stanno monitorando in tempo reale eventuali sismi. Condividi la app per migliorare il rilevamento."; + +/* No comment provided by engineer. */ +"Dispositivi totali" = "In questo momento, nella tua zona ci sono"; + +/* item tabelle */ +"Dispositivo affidabile" = "Dispositivo affidabile"; + +/* voce menu */ +"Distanza" = "Distanza"; + +/* No comment provided by engineer. */ +"Distanza massima" = "Distanza massima"; + +/* No comment provided by engineer. */ +"Dodici ore" = "Dodici ore"; + +/* No comment provided by engineer. */ +"Due ore" = "Due ore"; + +/* pulsanti orrizontale */ +"E-MAIL/SMS" = "E-MAIL/SMS"; + +/* voce menu */ +"Energia sisma" = "Energia sisma"; + +/* No comment provided by engineer. */ +"Equador" = "Ecuador"; + +/* No comment provided by engineer. */ +"Errore sconosciuto" = "Errore sconosciuto"; + +/* messaggio errore richiesta apikey impianto */ +"Errore! Impossibile accedere all'impianto" = "Errore! Impossibile accedere all'impianto"; + +/* No comment provided by engineer. */ +"Esci" = "Esci"; + +/* No comment provided by engineer. */ +"Età massima" = "Età massima"; + +/* voce menu */ +"F.A.Q." = "F.A.Q."; + +/* No comment provided by engineer. */ +"Filippine" = "Filippine"; + +/* No comment provided by engineer. */ +"Filtro" = "Filtro"; + +/* No comment provided by engineer. */ +"FORTE\n(Caduta di oggetti)" = "FORTE\n(Caduta di oggetti)"; + +/* No comment provided by engineer. */ +"Gestisci le reti sismiche" = "Gestisci le reti sismiche"; + +/* No comment provided by engineer. */ +"Giappone" = "Giappone"; + +/* No comment provided by engineer. */ +"giorni fa" = "giorni fa"; + +/* allerta acquisto o restor pro */ +"Hai ripristinato il prodotto da te acquistato" = "Hai ripristinato il prodotto da te acquistato"; + +/* No comment provided by engineer. */ +"Il messaggio è già stato in viato, al momento non è possibile inviare una nuova segnalazione" = "La segnalazione è già stata inviata, al momento non è possibile inviare una nuova segnalazione"; + +/* voce menu */ +"Imposta volume" = "Imposta volume"; + +/* voce menu */ +"Impostazioni" = "Impostazioni"; + +/* voce menu */ +"Informazioni" = "Informazioni"; + +/* voce menu */ +"Intervallo allarme" = "Intervallo allarme"; + +/* voce menu */ +"Intervallo notifiche" = "Intervallo notifiche"; + +/* No comment provided by engineer. */ +"Invia messaggio" = "Invia messaggio"; + +/* No comment provided by engineer. */ +"Invia un messaggio che gli altri utenti possono leggere sul sisma che hai segnalato" = "Invia un messaggio che gli altri utenti possono leggere sul sisma che hai segnalato"; + +/* voce elenco aree tsunami */ +"Isole Hawaii" = "Isole Hawaii"; + +/* No comment provided by engineer. */ +"Isole Hawaii" = "Isole Hawaii"; + +/* No comment provided by engineer. */ +"Italia" = "Italia"; + +/* No comment provided by engineer. */ +"La magnitudo sarà calcola e cominicata dalla rete sismica nazionale e comparirà nella sezione Reti Sismiche dell'app." = "La magnitudo sarà calcola e cominicata dalla rete sismica nazionale e comparirà nella sezione Reti Sismiche dell\'app."; + +/* No comment provided by engineer. */ +"La tua posizione geografica è sconosciuta e non è possibile segnalare il sisma" = "La tua posizione geografica è sconosciuta e non è possibile segnalare il sisma"; + +/* No comment provided by engineer. */ +"La tua segnalazione è stata inviata correttamente" = "La tua segnalazione è stata inviata correttamente"; + +/* No comment provided by engineer. */ +"LEGGERO\n(Solo percepito)" = "LEGGERO\n(Solo percepito)"; + +/* voce menu */ +"Lista notifiche" = "Lista notifiche"; + +/* item tabelle */ +"Lista priorità - NUOVA!" = "Servizio priorità"; + +/* voce menu */ +"Magnitudo" = "Magnitudo"; + +/* voce menu */ +"Magnitudo >= 2.0" = "Magnitudo >= 2.0"; + +/* voce menu */ +"Magnitudo >= 3.0" = "Magnitudo >= 3.0"; + +/* voce menu */ +"Magnitudo >= 3.5" = "Magnitudo >= 3.5"; + +/* voce menu */ +"Magnitudo >= 4.5" = "Magnitudo >= 4.5"; + +/* voce menu */ +"Magnitudo >= 5.5" = "Magnitudo >= 5.5"; + +/* voce menu */ +"Magnitudo >= 6.0" = "Magnitudo >= 6.0"; + +/* voce menu */ +"Magnitudo >= 6.5" = "Magnitudo >= 6.5"; + +/* voce menu */ +"Magnitudo >= 7.5" = "Magnitudo >= 7.5"; + +/* No comment provided by engineer. */ +"Magnitudo minima" = "Magnitudo minima"; + +/* No comment provided by engineer. */ +"MAPPA" = "MAPPA"; + +/* No comment provided by engineer. */ +"Mappa" = "Mappa"; + +/* Maps SDK Demos */ +"Maps SDK Demos" = "Maps SDK Demos"; + +/* voce elenco aree tsunami */ +"Mar dei Caraibi" = "Mar dei Caraibi"; + +/* No comment provided by engineer. */ +"Messaggio" = "Messaggio"; + +/* voce elenco messaggio tsunami */ +"Messaggio informativo" = "Messaggio informativo"; + +/* item tabelle */ +"messaggio per utenti" = "messaggio per utenti"; + +/* No comment provided by engineer. */ +"Messico" = "Messico"; + +/* No comment provided by engineer. */ +"METEO" = "METEO"; + +/* No comment provided by engineer. */ +"Meteo al momento del sisma" = "Meteo al momento del sisma"; + +/* No comment provided by engineer. */ +"minuti fa" = "minuti fa"; + +/* No comment provided by engineer. */ +"minuto fa" = "minuto fa"; + +/* voce menu */ +"Modifica impostazioni" = "Modifica impostazioni"; + +/* No comment provided by engineer. */ +"MOLTO FORTE\n(Crollo di edifici)" = "MOLTO FORTE\n(Crollo di edifici)"; + +/* No comment provided by engineer. */ +"Mondo" = "Mondo"; + +/* No comment provided by engineer. */ +"Mostra sismi forti a qualsiasi distanza se di" = "Mostra sismi forti a qualsiasi distanza se di"; + +/* messaggio assenza connesione */ +"Nessuna connessione" = "Nessuna connessione"; + +/* No comment provided by engineer. */ +"Nessuna sottoscrizione attiva. Nella lista delle persone da allertare " = "Nessuna sottoscrizione attiva."; + +/* No comment provided by engineer. */ +"Nicaragua" = "Nicaragua"; + +/* No comment provided by engineer. */ +"Non hai seleziato nessuna nazione" = "Non hai seleziato nessuna nazione"; + +/* voce menu */ +"Notifica anche sismi per i quali non è possibile stimare l'intensità" = "Notifica anche sismi per i quali non è possibile stimare l\'intensità"; + +/* voce menu */ +"Notifica sismi di qualsiasi magnitudo se la distanza è inferiore a" = "Notifica sismi di qualsiasi magnitudo se la distanza è inferiore a"; + +/* voce menu */ +"Notifica sismi forti a qualsiasi distanza se la magnitudo è maggiore a" = "Notifica sismi forti a qualsiasi distanza se la magnitudo è maggiore a"; + +/* titolo impostazioni notifiche + voce menu */ +"Notifiche da reti sismiche" = "Notifiche da reti sismiche"; + +/* titolo impostazioni notifiche + voce menu */ +"Notifiche segnalazioni utente" = "Notifiche segnalazioni utente"; + +/* titolo impostazioni notifiche + voce menu */ +"Notifiche sismi" = "Notifiche sismi"; + +/* titolo impostazioni notifiche + voce menu */ +"Notifiche sismi rilevati in tempo reale" = "Notifiche sismi rilevati in tempo reale"; + +/* titolo impostazioni notifiche + voce menu */ +"Notifiche tsunami" = "Notifiche tsunami"; + +/* No comment provided by engineer. */ +"Nuova Zelanda" = "Nuova Zelanda"; + +/* voce elenco aree tsunami */ +"Oceano Pacifico" = "Oceano Pacifico"; + +/* No comment provided by engineer. */ +"OK" = "OK"; + +/* No comment provided by engineer. */ +"Onda sismica in" = "Onda sismica in"; + +/* No comment provided by engineer. */ +"oppure" = "oppure"; + +/* voce menu */ +"Ora di fine" = "Ora di fine"; + +/* voce menu */ +"Ora di inizio" = "Ora di inizio"; + +/* No comment provided by engineer. */ +"ora fa" = "ora fa"; + +/* voce menu */ +"Ora fine" = "Ora fine"; + +/* voce menu */ +"Ora inizio" = "Ora inizio"; + +/* No comment provided by engineer. */ +"ore fa" = "ore fa"; + +/* No comment provided by engineer. */ +"pagerai al mese:" = "pagerai al mese:"; + +/* No comment provided by engineer. */ +"pagerai all'anno:" = "pagerai all\'anno:"; + +/* voce elenco messaggio tsunami */ +"Pericolo cessato" = "Pericolo cessato"; + +/* voce elenco messaggio tsunami */ +"Pericolo tsunami" = "Pericolo tsunami"; + +/* No comment provided by engineer. */ +"Perù" = "Perù"; + +/* No comment provided by engineer. */ +"Pressione:" = "Pressione:"; + +/* voce menu */ +"Privacy" = "Privacy"; + +/* No comment provided by engineer. */ +"Privacy: http://wp.earthquakenetwork.it/privacy/\n\nTermini e condizioni: http://wp.earthquakenetwork.it/it/terms-conditions/" = "Privacy: http://wp.earthquakenetwork.it/privacy/\n\nTermini e condizioni: http://wp.earthquakenetwork.it/it/terms-conditions/"; + +/* No comment provided by engineer. */ +"Profondità" = "Profondità"; + +/* versione pro */ +"Puoi convertire la tua app nella versione PRO senza doverla scariche dallo store. La versione PRO a notifiche e allerte tramite sintetizazione vocale, la visione in realtà aumentata, l'allerta sui movimenti rilevati dal proprio smartphone e non ha alcuna pubblicità. In più sostieni il progetto di ricerca il quale non sostiene finanziamenti esterni. Grazie per considerare l'acquisto! Alternativamente il passaggio alla versione PRO è GRATUITO sottoscrivendo uno degli abbonamenti annuali della lista di priorità.\n\nPrivacy: http://wp.earthquakenetwork.it/privacy/ \n\nTermini e condizioni: http://wp.earthquakenetwork.it/it/terms-conditions/" = "Earthquake Network è l\'unico progetto di ricerca che sviluppa un sistema mondiale di allerta sismica in tempo reale basato su smartphone. Acquistando la versione PRO sostieni il progetto che non riceve alcun tipo di finanziamento. La versione PRO non ha pubblicità ed in futuro includerà funzionalità aggiuntive rispetto alla versione base. Grazie per considerare di acquistare e supportare il progetto!\n\nPrivacy: http://wp.earthquakenetwork.it/privacy/ \n\nTermini e condizioni: http://wp.earthquakenetwork.it/it/terms-conditions/"; + +/* No comment provided by engineer. */ +"Puoi entrare a fare parte delle liste di priorità prime" = "Puoi entrare a fare parte della lista di priorità delle prime"; + +/* voce elenco raggio sismi */ +"Qualsiasi distanza" = "Qualsiasi distanza"; + +/* voce menu */ +"Qualsiasi intensità" = "Qualsiasi intensità"; + +/* voce menu */ +"Raggio dalla tua posizione" = "Raggio dalla tua posizione"; + +/* voce menu */ +"Raggio sismi forti o intensità non disponibile" = "Raggio sismi forti o intensità non disponibile"; + +/* voce menu */ +"Raggio sismi lievi" = "Raggio sismi lievi"; + +/* No comment provided by engineer. */ +"Repubblica Domenicana" = "Repubblica Domenicana"; + +/* item tabelle */ +"Rete smartphone" = "Rete smartphone"; + +/* pulsanti orrizontale */ +"RETE SMARTPHONE" = "RETE SMARTPHONE"; + +/* titolo impostazioni notifiche + voce menu */ +"Reti sismiche" = "Reti sismiche"; + +/* pulsanti orrizontale */ +"RETI SISMICHE" = "RETI SISMICHE"; + +/* voce menu */ +"Ricevi le notifiche dei sismi rilevati dalle agenzie nazionalie internazionali" = "Ricevi le notifiche dei sismi rilevati dalle agenzie nazionalie internazionali"; + +/* voce menu */ +"Ricevi le notifiche dei suonisegnalati manualemente dagli utenti" = "Ricevi le notifiche dei suonisegnalati manualemente dagli utenti"; + +/* voce menu */ +"Ricevi le notifiche in tempo reale dei sismi rilevati dalla rete smartphone" = "Ricevi le notifiche in tempo reale dei sismi rilevati dalla rete smartphone"; + +/* voce menu */ +"Ricevi le notifiche per i messaggi rilasciati dal Pacific Tsunami Warning Center" = "Ricevi le notifiche per i messaggi rilasciati dal Pacific Tsunami Warning Center"; + +/* voce menu */ +"Ricevi le notifiche solo in un intervallo del giorno" = "Ricevi le notifiche solo in un intervallo del giorno"; + +/* titolo navigation bar */ +"Rilevatore Terremoti" = "Rilevatore Terremoto"; + +/* Samples */ +"Samples" = "Samples"; + +/* No comment provided by engineer. */ +"Scarica " = "Scarica "; + +/* No comment provided by engineer. */ +"Se vuoi filtrare la lista dei sismi, seleziona la nazione in cui vivi" = "Se vuoi filtrare la lista dei sismi, seleziona la nazione in cui vivi"; + +/* No comment provided by engineer. */ +"secondi" = "secondi"; + +/* No comment provided by engineer. */ +"Segnalazione " = "Segnalazione "; + +/* pulsanti orrizontale */ +"SEGNALAZIONI" = "SEGNALAZIONI"; + +/* No comment provided by engineer. */ +"Sei abbonato: priorità 10000 persone, rinnovo annuale " = "Sei abbonato: priorità 10000 persone, rinnovo annuale "; + +/* No comment provided by engineer. */ +"Sei abbonato: priorità 10000 persone, rinnovo mensile " = "Sei abbonato: priorità 10000 persone, rinnovo mensile "; + +/* No comment provided by engineer. */ +"Sei abbonato: priorità 100000 persone, rinnovo annuale " = "Sei abbonato: priorità 100000 persone, rinnovo annuale "; + +/* No comment provided by engineer. */ +"Sei abbonato: priorità 100000 persone, rinnovo mensile " = "Sei abbonato: priorità 100000 persone, rinnovo mensile "; + +/* No comment provided by engineer. */ +"Sei ore" = "Sei ore"; + +/* No comment provided by engineer. */ +"Seleziona" = "Seleziona"; + +/* No comment provided by engineer. */ +"sending" = "sending"; + +/* voce menu */ +"Sismi da notificare" = "Sismi da notificare"; + +/* item tabelle */ +"Sismi rilevati da smartphone" = "Sismi rilevati da smartphone"; + +/* voce menu */ +"Sismi senza intensità" = "Sismi senza intensità"; + +/* messaggio errore richiesta dev_cmd */ +"Sì è verificato un errore sulla centralina" = "Sì è verificato un errore sulla centralina"; + +/* voce menu */ +"Solo sismi forti" = "Solo sismi forti"; + +/* descrizione Top 10K */ +"sottoscrizioni ancora disponibiliper essere allertato in meno di 1 secondo dal rilevamento del sistema" = "sottoscrizioni ancora disponibiliper essere allertato in meno di 1 secondo dal rilevamento del sistema"; + +/* descrizione Top 100K */ +"sottoscrizioni ancora disponibiliper essere allertato in meno di 5 secondi dal rilevamento del sistema" = "sottoscrizioni ancora disponibiliper essere allertato in meno di 5 secondi dal rilevamento del sistema"; + +/* No comment provided by engineer. */ +"Spagna" = "Spagna"; + +/* pulsanti orrizontale */ +"SPONSOR" = "SPONSOR"; + +/* No comment provided by engineer. */ +"Stai acquistando la verisone pro, verrà rimossa la pubblicità" = "Stai acquistando la versione pro, verrà rimossa la pubblicità"; + +/* voce menu */ +"Suona un allarme quando un sisma è rilevato dalla rete di smartphones " = "Suona un allarme quando un sisma è rilevato dalla rete di smartphones "; + +/* voce elenco messaggio tsunami */ +"Supplemento di allerta" = "Supplemento di allerta"; + +/* voce elenco messaggio tsunami */ +"Supplemento di valutazione" = "Supplemento di valutazione"; + +/* No comment provided by engineer. */ +"Temperatura: " = "Temperatura: "; + +/* voce menu */ +"Terremoti forti" = "Sismi forti"; + +/* voce menu */ +"Terremoti vicini" = "Sismi vicini"; + +/* voce menu */ +"Testa allarme" = "Testa allarme"; + +"testo utenti1" = "Trovi questa app utile? Vota e supporta la app con 5 stelle su"; + +"testo utenti2" = "grazie! La rilevazione in tempo reale funziona se la app è installata su un numero sufficiente di smartphone. Condividi l'app per migliorare il rilevamento."; + +/* titolo impostazioni notifiche + voce menu */ +"Tipo messaggio" = "Tipo messaggio"; + +/* voce menu */ +"Tono di allarme" = "Tono di allarme"; + +/* No comment provided by engineer. */ +"TRENS" = "TREND"; + +/* pulsanti orrizontale */ +"TSUNAMI" = "TSUNAMI"; + +/* No comment provided by engineer. */ +"Ultim\'ora" = "Ultim\'ora"; + +/* No comment provided by engineer. */ +"Ultima settimana" = "Ultima settimana"; + +/* No comment provided by engineer. */ +"Ultimo anno" = "Ultimo anno"; + +/* No comment provided by engineer. */ +"Ultimo giorno" = "Ultimo giorno"; + +/* No comment provided by engineer. */ +"Ultimo mese" = "Ultimo mese"; + +/* No comment provided by engineer. */ +"Umidità : " = "Umidità : "; + +/* No comment provided by engineer. */ +"Un anno" = "Un anno"; + +/* No comment provided by engineer. */ +"un anno" = "un anno"; + +/* No comment provided by engineer. */ +"Un giorno" = "Un giorno"; + +/* No comment provided by engineer. */ +"Un mese" = "Un mese"; + +/* No comment provided by engineer. */ +"Un ora" = "Un ora"; + +/* voce menu */ +"Un sisma è simulato. Dovresti ricevere l'allerta e l'allarme dovrebbe suonare. Se attive, ricordati di disabilitare l'invio della mail automatiche ai tuoi contatti per non allarmarli" = "Un sisma è simulato. Dovresti ricevere l\'allerta e l\'allarme dovrebbe suonare. Se attive, ricordati di disabilitare l\'invio della mail automatiche ai tuoi contatti per non allarmarli"; + +/* No comment provided by engineer. */ +"Un\'ora" = "Un\'ora"; + +/* No comment provided by engineer. */ +"Una settimana" = "Una settimana"; + +/* No comment provided by engineer. */ +"Usa il bottone per segnalare il sisma" = "Usa il bottone per segnalare il sisma"; + +/* messaggio errore inserimento credenziali */ +"Username e Password sbagliati" = "Username e Password sbagliati"; + +/* voce elenco messaggio tsunami */ +"Valutazione cancellata" = "Valutazione cancellata"; + +/* voce elenco messaggio tsunami */ +"Valutazione Tsunami" = "Valutazione Tsunami"; + +/* titolo pulsante notifica rete smartphone */ +"VEDI IN TWITTER" = "VEDI IN TWITTER"; + +/* No comment provided by engineer. */ +"Velocità vento: " = "Velocità vento: "; + +/* No comment provided by engineer. */ +"Venezuela" = "Venezuela"; + +/* etichetta versione app */ +"Versione" = "Versione"; + +/* item tabelle */ +"Versione PRO" = "Versione PRO"; + +/* titolo impostazioni notifiche */ +"Vibrazioni e suono" = "Vibrazioni e suono"; + +/* titolo pulsante notifica rete smartphone */ +"VOTA L'APP" = "VOTA L\'APP"; + +/* No comment provided by engineer. */ +"• Il pagamento verrà addebitato sull'account iTunes alla conferma dell'acquisto\n\n• L'abbonamento si rinnova automaticamente a meno che il rinnovo automatico non venga disattivato almeno 24 ore prima della fine del periodo corrente\n\n• L'abbonamento verrà addebitato per il rinnovo entro 24 ore prima della fine del periodo corrente e identificato il costo del rinnovo\n\n• Le sottoscrizioni possono essere gestite dall'utente e il rinnovo automatico può essere disattivato accedendo alle Impostazioni account dell'utente dopo l'acquisto." = "• Il pagamento verrà addebitato sull\'account iTunes alla conferma dell\'acquisto\n\n• L\'abbonamento si rinnova automaticamente a meno che il rinnovo automatico non venga disattivato almeno 24 ore prima della fine del periodo corrente\n\n• L\'abbonamento verrà addebitato per il rinnovo entro 24 ore prima della fine del periodo corrente e identificato il costo del rinnovo\n\n• Le sottoscrizioni possono essere gestite dall\'utente e il rinnovo automatico può essere disattivato accedendo alle Impostazioni account dell\'utente dopo l\'acquisto."; + +/* No comment provided by engineer. */ +"• L'abbonamento si rinnova automaticamente a meno che il rinnovo automatico non venga disattivato almeno 24 ore prima della fine del periodo corrente\n\n• L'abbonamento verrà addebitato per il rinnovo entro 24 ore prima della fine del periodo corrente e identificato il costo del rinnovo\n\n• Le sottoscrizioni possono essere gestite dall'utente e il rinnovo automatico può essere disattivato accedendo alle Impostazioni account dell'utente dopo l'acquisto.\n\n" = "• L\'abbonamento si rinnova automaticamente a meno che il rinnovo automatico non venga disattivato almeno 24 ore prima della fine del periodo corrente\n\n• L\'abbonamento verrà addebitato per il rinnovo entro 24 ore prima della fine del periodo corrente e identificato il costo del rinnovo\n\n• Le sottoscrizioni possono essere gestite dall\'utente e il rinnovo automatico può essere disattivato accedendo alle Impostazioni account dell\'utente dopo l\'acquisto."; + + +"Globale" = "Globale"; +"Italia" = "Italia"; +"Spagna" = "Spagna"; +"Cina" = "Cina"; +"Giappone" = "Giappone"; +"Nicaragua" = "Nicaragua"; +"Messico" = "Messico"; +"Colombia" = "Colombia"; +"Costa Rica" = "Costa Rica"; +"Cile" = "Cile"; +"Venezuela" = "Venezuela"; +"Nuova Zelanda" = "Nuova Zelanda"; +"Argentina" = "Argentina"; +"Ecuador" = "Ecuador"; +"Filippine" = "Filippine"; +"Perù" = "Perù"; +"Repubblica Dominicana" = "Repubblica Dominicana"; + + + + + +/// notifiche titolo + +"Allerta sismica in tempo reale" = "Allerta sismica in tempo reale"; +"Segnalazione utente" = "Segnalazione utente"; +"Segnalazione da rete sismica" = "Segnalazione da rete sismica"; +"Allerta tsunami" = "Allerta tsunami"; + +/// notifiche body + +"Rilevato sisma debole a" = "Rilevato sisma debole a %@"; +"Rilevato sisma forte a" = "Rilevato sisma forte a %@"; +"Rilevato sisma a" = "Rilevato sisma a %@"; +"Sisma lieve segnalato da utente a" = "Sisma lieve segnalato da utente a %@"; +"Sisma forte segnalato da utente a" = "Sisma forte segnalato da utente a %@"; +"Sisma molto forte segnalato da utente a" = "Sisma molto forte segnalato da utente a %@"; +"Sisma rilevato a" = "Sisma rilevato a %@"; +"Area di interesse: Mar dei Caraibi" = "Area di interesse: Mar dei Caraibi"; +"Area di interesse: Hawaii" = "Area di interesse: Hawaii"; +"Area di interesse: Oceano Pacifico" = "Area di interesse: Oceano Pacifico"; +"Sisma rilevato da" = "Sisma rilevato da"; diff --git a/Sources/Earthquake Network/it.lproj/Main.strings b/Sources/Earthquake Network/it.lproj/Main.strings new file mode 100644 index 0000000..08037a4 --- /dev/null +++ b/Sources/Earthquake Network/it.lproj/Main.strings @@ -0,0 +1,525 @@ + +/* Class = "UILabel"; text = "Ho sentito un sisma!"; ObjectID = "0Ak-hW-RBU"; */ +"0Ak-hW-RBU.text" = "Ho sentito un sisma!"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "1sq-6I-E5n"; */ +"1sq-6I-E5n.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "MAPPA"; ObjectID = "2A5-yR-eOQ"; */ +"2A5-yR-eOQ.normalTitle" = "MAPPA"; + +/* Class = "UIButton"; normalTitle = "CHIUDI"; ObjectID = "2Br-cq-xVZ"; */ +"2Br-cq-xVZ.normalTitle" = "CHIUDI"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "2HX-pm-zSu"; */ +"2HX-pm-zSu.text" = "Label"; + +/* Class = "UILabel"; text = "Mappa rete smartphone"; ObjectID = "3dd-aM-obj"; */ +"3dd-aM-obj.text" = "Mappa rete smartphone"; + +/* Class = "UIButton"; normalTitle = "MAPPA"; ObjectID = "4EG-hN-3FP"; */ +"4EG-hN-3FP.normalTitle" = "MAPPA"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "4Hy-lX-lCp"; */ +"4Hy-lX-lCp.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "4gX-D0-zeu"; */ +"4gX-D0-zeu.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "GESTISCI LE RETI SISMICHE"; ObjectID = "4md-qt-Zwo"; */ +"4md-qt-Zwo.normalTitle" = "Gestisci le reti sismiche"; + +/* Class = "UILabel"; text = "Nessuna allerta sismica in tempo reale ricevuta recentemente"; ObjectID = "5El-UZ-GKU"; */ +"5El-UZ-GKU.text" = "Nessuna allerta sismica in tempo reale ricevuta recentemente"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "5hU-OF-FaR"; */ +"5hU-OF-FaR.text" = "Label"; + +/* Class = "UILabel"; text = "Magnitudo"; ObjectID = "5y9-OK-Kfs"; */ +"5y9-OK-Kfs.text" = "Magnitudo"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "69U-0c-ZLI"; */ +"69U-0c-ZLI.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "6pX-89-eYU"; */ +"6pX-89-eYU.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "COPERTURA LOCALE"; ObjectID = "769-Iq-JPs"; */ +"769-Iq-JPs.normalTitle" = "COPERTURA LOCALE"; + +/* Class = "UINavigationItem"; title = "Detail"; ObjectID = "76n-gb-S2z"; */ +"76n-gb-S2z.title" = "Detail"; + +/* Class = "UIButton"; normalTitle = "METEO"; ObjectID = "77F-LL-WYK"; */ +"77F-LL-WYK.normalTitle" = "METEO"; + +/* Class = "UILabel"; text = "Puoi essere il primo ad essere notificato quando un sisma viene rilevato. Un cliente ha sottoscritto il servizio soltanto 2 ore fa!"; ObjectID = "7EC-pz-u3s"; */ +"7EC-pz-u3s.text" = "Puoi essere il primo ad essere notificato quando un sisma viene rilevato."; + +/* Class = "UILabel"; text = "Label"; ObjectID = "85m-tz-xYz"; */ +"85m-tz-xYz.text" = "Label"; + +/* Class = "UILabel"; text = "Magnitudo"; ObjectID = "86G-GS-MXw"; */ +"86G-GS-MXw.text" = "Magnitudo"; + +/* Class = "UILabel"; text = "Mappa rete globale"; ObjectID = "88p-Zw-SQw"; */ +"88p-Zw-SQw.text" = "Mappa rete globale"; + +/* Class = "UILabel"; text = "Ultime 24 h:"; ObjectID = "8fS-Us-UId"; */ +"8fS-Us-UId.text" = "Ultime 24 h:"; + +/* Class = "UILabel"; text = "Dispositivo affidabile"; ObjectID = "8ix-uO-Qah"; */ +"8ix-uO-Qah.text" = "Dispositivo affidabile"; + +/* Class = "UITextField"; placeholder = "Seleziona la nazione"; ObjectID = "8lr-r3-yom"; */ +"8lr-r3-yom.placeholder" = "Seleziona la nazione"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "8zP-ga-ogL"; */ +"8zP-ga-ogL.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "9n5-rN-Hyd"; */ +"9n5-rN-Hyd.text" = "Label"; + +/* Class = "UILabel"; text = "Segnalazioni Utente"; ObjectID = "A3b-4E-9kc"; */ +"A3b-4E-9kc.text" = "Rapporti utente ultimi 24 ore"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "A6Y-pQ-1P5"; */ +"A6Y-pQ-1P5.text" = "Label"; + +/* Class = "UILabel"; text = "Totale: "; ObjectID = "ASR-KA-q00"; */ +"ASR-KA-q00.text" = "Totale: "; + +/* Class = "UILabel"; text = "Magnitudo"; ObjectID = "Ah1-CG-g7M"; */ +"Ah1-CG-g7M.text" = "Magnitudo"; + +/* Class = "UILabel"; text = "Messaggio per gli utenti"; ObjectID = "CNf-MQ-1xI"; */ +"CNf-MQ-1xI.text" = "Messaggio per gli utenti"; + +/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "CYK-HC-2lv"; */ +"CYK-HC-2lv.normalTitle" = "Button"; + +/* Class = "UILabel"; text = "Magnitudo"; ObjectID = "CYe-N3-4cN"; */ +"CYe-N3-4cN.text" = "Magnitudo"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "Cxa-dk-bH9"; */ +"Cxa-dk-bH9.text" = "Label"; + +/* Class = "UILabel"; text = "Sottoscrizioni attive"; ObjectID = "D1z-2N-Kzv"; */ +"D1z-2N-Kzv.text" = "Sottoscrizioni attive"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "EhO-Xe-kaN"; */ +"EhO-Xe-kaN.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "DETTAGLI"; ObjectID = "EnF-WI-a9a"; */ +"EnF-WI-a9a.normalTitle" = "DETTAGLI"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "FGQ-PN-e9e"; */ +"FGQ-PN-e9e.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "FSg-lV-siS"; */ +"FSg-lV-siS.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "Fkj-uY-a3t"; */ +"Fkj-uY-a3t.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "GCe-cb-Wlp"; */ +"GCe-cb-Wlp.text" = "Label"; + +/* Class = "UILabel"; text = "Magnitudo"; ObjectID = "HIi-bS-da2"; */ +"HIi-bS-da2.text" = "Magnitudo"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "Hcz-F8-6wV"; */ +"Hcz-F8-6wV.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "HdO-wA-FHK"; */ +"HdO-wA-FHK.text" = "Label"; + +/* Class = "UINavigationItem"; title = "Master"; ObjectID = "I4H-lo-DTA"; */ +"I4H-lo-DTA.title" = "Master"; + +/* Class = "UILabel"; text = "Nessuna sottoscrizione attiva. Nella lista delle persone da allertare"; ObjectID = "IOC-5n-qa0"; */ +"IOC-5n-qa0.text" = "Nessuna sottoscrizione attiva."; + +/* Class = "UITextView"; text = "Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda."; ObjectID = "IOH-Xc-XjL"; */ +"IOH-Xc-XjL.text" = "Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda."; + +/* Class = "UILabel"; text = "Label"; ObjectID = "IgH-la-uKP"; */ +"IgH-la-uKP.text" = "Label"; + +/* Class = "UILabel"; text = "Lista priorità - NUOVA!"; ObjectID = "IyW-lN-cXy"; */ +"IyW-lN-cXy.text" = "Servizio priorità"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "JAu-kk-n4H"; */ +"JAu-kk-n4H.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "INIZIA LA CONVERSIONE"; ObjectID = "JKo-9B-PZh"; */ +"JKo-9B-PZh.normalTitle" = "INIZIA LA CONVERSIONE"; + +/* Class = "UIBarButtonItem"; title = "Item"; ObjectID = "JQa-KO-YJs"; */ +"JQa-KO-YJs.title" = "Item"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "Jeo-dP-3lB"; */ +"Jeo-dP-3lB.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "KI7-0R-pnR"; */ +"KI7-0R-pnR.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "Kv4-iM-8Td"; */ +"Kv4-iM-8Td.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "MSh-ry-KRA"; */ +"MSh-ry-KRA.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "Mic-8d-Dnd"; */ +"Mic-8d-Dnd.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "CONDIVIDI"; ObjectID = "NDa-a1-WFp"; */ +"NDa-a1-WFp.normalTitle" = "CONDIVIDI APP"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "NhL-DG-FAz"; */ +"NhL-DG-FAz.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "P51-pk-ur9"; */ +"P51-pk-ur9.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "POg-DV-nSl"; */ +"POg-DV-nSl.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "Psv-I2-jwN"; */ +"Psv-I2-jwN.text" = "Label"; + +/* Class = "UILabel"; text = "Magnitudo"; ObjectID = "QdI-xm-PU6"; */ +"QdI-xm-PU6.text" = "Magnitudo"; + +/* Class = "UILabel"; text = "Rete smartphone"; ObjectID = "RJX-0r-Rfg"; */ +"RJX-0r-Rfg.text" = "Rete smartphone"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "RPb-mG-G7i"; */ +"RPb-mG-G7i.text" = "Label"; + +/* Class = "UILabel"; text = "Versione PRO"; ObjectID = "SBb-oo-qja"; */ +"SBb-oo-qja.text" = "Versione PRO"; + +/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "STa-f1-QwN"; */ +"STa-f1-QwN.normalTitle" = "Button"; + +/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "Sse-Jt-L1G"; */ +"Sse-Jt-L1G.normalTitle" = "Button"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "Sx2-Xi-NrV"; */ +"Sx2-Xi-NrV.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "TN4-4n-dYj"; */ +"TN4-4n-dYj.text" = "Label"; + +/* Class = "UILabel"; text = "Sismi rilevati da smartphone"; ObjectID = "TdN-jP-cPf"; */ +"TdN-jP-cPf.text" = "Sismi rilevati da smartphone"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "Ty0-3Z-tCg"; */ +"Ty0-3Z-tCg.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "UYV-p9-uzc"; */ +"UYV-p9-uzc.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "Uht-yY-3n8"; */ +"Uht-yY-3n8.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "Ul5-Ri-NUN"; */ +"Ul5-Ri-NUN.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "UlR-wR-qw5"; */ +"UlR-wR-qw5.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "VNx-fE-Rhs"; */ +"VNx-fE-Rhs.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "VgM-Do-cEe"; */ +"VgM-Do-cEe.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "VsF-W2-Jzb"; */ +"VsF-W2-Jzb.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "Vv4-ou-iqD"; */ +"Vv4-ou-iqD.normalTitle" = "Button"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "WAn-AD-eef"; */ +"WAn-AD-eef.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "WZQ-HQ-xBq"; */ +"WZQ-HQ-xBq.text" = "Label"; + +/* Class = "UILabel"; text = "smartphone sono in monitoraggio sismico"; ObjectID = "WdA-gj-Qr2"; */ +"WdA-gj-Qr2.text" = "smartphone sono in monitoraggio sismico"; + +/* Class = "UIViewController"; title = "Detail"; ObjectID = "Wj9-pD-mnF"; */ +"Wj9-pD-mnF.title" = "Detail"; + +/* Class = "UILabel"; text = "Quando un sisma è rilevato in tempo reale dagli smartphone vicini all'epicentro, il server invia un'allerta a tutti gli utenti che hanno l'app. Allertare tutti gli utenti può richiedere fino a 10 secondi in quanto non è tecnicamente fattibile farlo istantaneamente. Ora puoi entrare a fare parte delle liste di priorità prime 10000 o 100000 persone allertate."; ObjectID = "Wp2-4P-Na5"; */ +"Wp2-4P-Na5.text" = "Quando un sisma è rilevato in tempo reale dagli smartphone vicini all'epicentro, un'allerta è inviata a tutti gli utenti che hanno l'app. Allertare tutti gli utenti può richiedere fino a 10 secondi. E' possibile entrare a fare parte delle liste di priorità delle prime 10'000 o 100'000 persone allertate."; + +/* Class = "UILabel"; text = "Label"; ObjectID = "X60-02-FXo"; */ +"X60-02-FXo.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "CHIUDI"; ObjectID = "YTn-Br-zUU"; */ +"YTn-Br-zUU.normalTitle" = "CHIUDI"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "YrE-fF-dFW"; */ +"YrE-fF-dFW.text" = "Label"; + +/* Class = "UILabel"; text = "Magnitudo"; ObjectID = "ZI0-eg-3Yd"; */ +"ZI0-eg-3Yd.text" = "Magnitudo"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "ZSQ-Ah-wA8"; */ +"ZSQ-Ah-wA8.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "a9G-nS-tWW"; */ +"a9G-nS-tWW.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "aFA-SZ-reV"; */ +"aFA-SZ-reV.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "X"; ObjectID = "auz-rc-k35"; */ +"auz-rc-k35.normalTitle" = "X"; + +/* Class = "UILabel"; text = "Stai pagando:"; ObjectID = "awF-Zd-fAt"; */ +"awF-Zd-fAt.text" = "Stai pagando:"; + +/* Class = "UIButton"; normalTitle = "CONFERMA NAZIONE"; ObjectID = "bYB-me-lg7"; */ +"bYB-me-lg7.normalTitle" = "Conferma nazione"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "bgA-WP-7Ut"; */ +"bgA-WP-7Ut.text" = "Label"; + +/* Class = "UILabel"; text = "oppure"; ObjectID = "c39-TN-fIZ"; */ +"c39-TN-fIZ.text" = "otherwise"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "cOC-hS-Gxk"; */ +"cOC-hS-Gxk.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "ch3-lb-gg8"; */ +"ch3-lb-gg8.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "MAPPA"; ObjectID = "d8m-gN-HSj"; */ +"d8m-gN-HSj.normalTitle" = "MAPPA"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "dIG-8S-PcU"; */ +"dIG-8S-PcU.text" = "Label"; + +/* Class = "UILabel"; text = "Magnitudo"; ObjectID = "dOI-Vx-NaB"; */ +"dOI-Vx-NaB.text" = "Magnitudo"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "dtY-rw-xfq"; */ +"dtY-rw-xfq.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "METEO"; ObjectID = "evB-bn-cGC"; */ +"evB-bn-cGC.normalTitle" = "METEO"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "f3p-2E-xJU"; */ +"f3p-2E-xJU.text" = "Label"; + +/* Class = "UILabel"; text = "Ultime 24 h:"; ObjectID = "fI2-EU-9pf"; */ +"fI2-EU-9pf.text" = "Ultime 24 h:"; + +/* Class = "UILabel"; text = "Title"; ObjectID = "fkf-ZE-eUX"; */ +"fkf-ZE-eUX.text" = "Title"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "fzZ-un-KyL"; */ +"fzZ-un-KyL.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "g0c-oz-aha"; */ +"g0c-oz-aha.normalTitle" = "Button"; + +/* Class = "UIButton"; normalTitle = "chiudi"; ObjectID = "g5C-Wg-DEu"; */ +"g5C-Wg-DEu.normalTitle" = "chiudi"; + +/* Class = "UILabel"; text = "Rete smartphone"; ObjectID = "gA9-1y-GkX"; */ +"gA9-1y-GkX.text" = "Rete smartphone"; + +/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "gH3-JA-kpZ"; */ +"gH3-JA-kpZ.normalTitle" = "Button"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "giY-Wc-DhN"; */ +"giY-Wc-DhN.text" = "Label"; + +/* Class = "UIBarButtonItem"; title = "Item"; ObjectID = "go0-F7-Zhq"; */ +"go0-F7-Zhq.title" = "Item"; + +/* Class = "UIButton"; normalTitle = "METEO"; ObjectID = "gxf-sn-X3o"; */ +"gxf-sn-X3o.normalTitle" = "METEO"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "gz7-iN-sSG"; */ +"gz7-iN-sSG.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "hcf-rB-rCy"; */ +"hcf-rB-rCy.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "Annulla"; ObjectID = "i4A-Xa-gJv"; */ +"i4A-Xa-gJv.normalTitle" = "Annulla"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "iVr-7d-dbb"; */ +"iVr-7d-dbb.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "j4G-Ck-LqX"; */ +"j4G-Ck-LqX.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "jMx-Or-mvH"; */ +"jMx-Or-mvH.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "jRS-Cp-CNI"; */ +"jRS-Cp-CNI.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "jvz-vt-Vjt"; */ +"jvz-vt-Vjt.text" = "Label"; + +/* Class = "UILabel"; text = "Converti la tua app nella versione PRO! Scopri come"; ObjectID = "jzO-Nm-azA"; */ +"jzO-Nm-azA.text" = "Converti la tua app nella versione PRO! Scopri come"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "k9g-Q3-Znk"; */ +"k9g-Q3-Znk.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "kFI-uR-U91"; */ +"kFI-uR-U91.normalTitle" = "Button"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "kxE-d4-etz"; */ +"kxE-d4-etz.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "lLs-bT-kHd"; */ +"lLs-bT-kHd.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "laB-mX-KEL"; */ +"laB-mX-KEL.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "lut-wL-P63"; */ +"lut-wL-P63.text" = "Label"; + +/* Class = "UILabel"; text = "smartphone sono in monitoraggio sismico"; ObjectID = "mSt-vL-RlL"; */ +"mSt-vL-RlL.text" = "smartphone sono in monitoraggio sismico"; + +/* Class = "UIButton"; normalTitle = "Esci"; ObjectID = "mbc-UD-cj9"; */ +"mbc-UD-cj9.normalTitle" = "Esci"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "nYa-8A-3yt"; */ +"nYa-8A-3yt.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "CONDIVIDI"; ObjectID = "nuC-fx-3PA"; */ +"nuC-fx-3PA.normalTitle" = "CONDIVIDI APP"; + +/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "o6r-rw-AGL"; */ +"o6r-rw-AGL.normalTitle" = "Button"; + +/* Class = "UILabel"; text = "Subtitle"; ObjectID = "oQ5-7g-0zb"; */ +"oQ5-7g-0zb.text" = "Subtitle"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "oR4-uQ-fKx"; */ +"oR4-uQ-fKx.text" = "Label"; + +/* Class = "UILabel"; text = "Magnitudo"; ObjectID = "oTa-fo-fYi"; */ +"oTa-fo-fYi.text" = "Magnitudo"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "oVp-Ry-d2d"; */ +"oVp-Ry-d2d.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "p5v-fA-y8G"; */ +"p5v-fA-y8G.text" = "Label"; + +/* Class = "UILabel"; text = "Ultime 24 h:"; ObjectID = "p79-JV-CBM"; */ +"p79-JV-CBM.text" = "Ultime 24 h:"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "pXK-JQ-Xeu"; */ +"pXK-JQ-Xeu.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "chiudi"; ObjectID = "pZJ-ch-465"; */ +"pZJ-ch-465.normalTitle" = "chiudi"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "pde-71-z1D"; */ +"pde-71-z1D.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "MAPPA"; ObjectID = "ppn-JO-Eda"; */ +"ppn-JO-Eda.normalTitle" = "MAPPA"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "q3f-N3-If9"; */ +"q3f-N3-If9.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "qAK-ZJ-bfK"; */ +"qAK-ZJ-bfK.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "sqK-xD-x0a"; */ +"sqK-xD-x0a.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "stO-8E-VwV"; */ +"stO-8E-VwV.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "swQ-Mz-tdr"; */ +"swQ-Mz-tdr.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "tCc-0T-BeB"; */ +"tCc-0T-BeB.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "uRT-cO-0Qp"; */ +"uRT-cO-0Qp.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "uhQ-Zr-CHu"; */ +"uhQ-Zr-CHu.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "upr-qE-1te"; */ +"upr-qE-1te.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "ABBONATI AL SERVIZIO"; ObjectID = "uuc-Yo-Axy"; */ +"uuc-Yo-Axy.normalTitle" = "ABBONATI AL SERVIZIO"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "vSb-fa-Blr"; */ +"vSb-fa-Blr.text" = "Label"; + +/* Class = "UILabel"; text = "Magnitudo"; ObjectID = "vbK-LB-cEA"; */ +"vbK-LB-cEA.text" = "Magnitudo"; + +/* Class = "UILabel"; text = "Versione PRO"; ObjectID = "vcB-Og-UR8"; */ +"vcB-Og-UR8.text" = "Versione PRO"; + +/* Class = "UITableViewController"; title = "Master"; ObjectID = "vch-mp-anl"; */ +"vch-mp-anl.title" = "Master"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "w8w-9g-aeX"; */ +"w8w-9g-aeX.text" = "Label"; + +/* Class = "UITextView"; text = "Privacy: http://wp.earthquakenetwork.it/privacy/"; ObjectID = "wSy-mE-siO"; */ +"wSy-mE-siO.text" = "Privacy: http://wp.earthquakenetwork.it/privacy/"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "wWB-25-EIr"; */ +"wWB-25-EIr.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "wa3-Nw-fqp"; */ +"wa3-Nw-fqp.text" = "Label"; + +/* Class = "UILabel"; text = "Magnitudo"; ObjectID = "xAb-RL-kXs"; */ +"xAb-RL-kXs.text" = "Magnitudo"; + +/* Class = "UILabel"; text = "Se vuoi filtrare la lista dei sismi, seleziona la nazione in cui vivi"; ObjectID = "xhC-AG-6qG"; */ +"xhC-AG-6qG.text" = "Se vuoi filtrare la lista dei sismi, seleziona la nazione in cui vivi"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "xnr-9z-b3F"; */ +"xnr-9z-b3F.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "yE5-wI-8FM"; */ +"yE5-wI-8FM.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "yL7-QS-kK8"; */ +"yL7-QS-kK8.text" = "Label"; + +/* Class = "UIButton"; normalTitle = "CONDIVIDI"; ObjectID = "ygR-b2-Seh"; */ +"ygR-b2-Seh.normalTitle" = "CONDIVIDI APP"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "yn6-On-9ez"; */ +"yn6-On-9ez.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "zCw-yW-TG3"; */ +"zCw-yW-TG3.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "zFT-ku-ebI"; */ +"zFT-ku-ebI.text" = "Label"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "zKM-qV-ybx"; */ +"zKM-qV-ybx.text" = "Label"; + +/* Class = "UILabel"; text = "Magnitudo"; ObjectID = "zZw-zo-2om"; */ +"zZw-zo-2om.text" = "Magnitudo"; diff --git a/Sources/Earthquake Network/main.m b/Sources/Earthquake Network/main.m new file mode 100644 index 0000000..a7b990b --- /dev/null +++ b/Sources/Earthquake Network/main.m @@ -0,0 +1,16 @@ +// +// main.m +// Earthquake Network +// +// Created by Luca Beretta on 12/09/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/Sources/Earthquake Network/model/EQMAccelerometroManager.h b/Sources/Earthquake Network/model/EQMAccelerometroManager.h new file mode 100644 index 0000000..f5f07e5 --- /dev/null +++ b/Sources/Earthquake Network/model/EQMAccelerometroManager.h @@ -0,0 +1,24 @@ +// +// EQMAccelerometroManager.h +// Earthquake Network +// +// Created by Luca Beretta on 19/09/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import +#import +#import + +@interface EQMAccelerometroManager : NSObject + +@property (strong, nonatomic) CLLocationManager *locationManager; +@property (strong, nonatomic) CLLocation *currentLocation; + ++(EQMAccelerometroManager *) sharedInstance; ++(void)avviaLetturaAccellerometroisCal:(BOOL)isCal withResult:(void(^)(NSArray *dati)) success; +-(void)getPosition; +-(void)startUpdatingLocationBackground; +-(void)stopUpdatingLocation; + +@end diff --git a/Sources/Earthquake Network/model/EQMAccelerometroManager.m b/Sources/Earthquake Network/model/EQMAccelerometroManager.m new file mode 100644 index 0000000..f047fec --- /dev/null +++ b/Sources/Earthquake Network/model/EQMAccelerometroManager.m @@ -0,0 +1,154 @@ +// +// EQMAccelerometroManager.m +// Earthquake Network +// +// Created by Luca Beretta on 19/09/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "EQMAccelerometroManager.h" +#import +#import "Costanti.h" +#import "EQNMath.h" +#import "EQNUser.h" +#import "EQNManager.h" +@interface EQMAccelerometroManager () +@property (nonatomic, assign) BOOL posizioneRilevata; + +@end + +@implementation EQMAccelerometroManager + ++(EQMAccelerometroManager *) sharedInstance +{ + static EQMAccelerometroManager *instance = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + instance = [[self alloc]init]; + }); + return instance; +} + +- (id)init { + self = [super init]; + if(self != nil) { + self.locationManager = [[CLLocationManager alloc] init]; + if ([self.locationManager respondsToSelector:@selector(requestAlwaysAuthorization)]){ + [self.locationManager requestAlwaysAuthorization]; + //[self.locationManager requestWhenInUseAuthorization]; + } + self.locationManager.desiredAccuracy = kCLLocationAccuracyBestForNavigation; + self.locationManager.delegate = self; + self.posizioneRilevata = NO; + + } + return self; +} + +-(void)getPosition{ + + [self.locationManager requestLocation]; +} + +-(void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status{ + + switch (status) { + case kCLAuthorizationStatusAuthorizedAlways:{ + + if (![EQNUser defaultUser].user_ID) + [self getPosition]; + + } + break; + case kCLAuthorizationStatusDenied:{ + + [[NSNotificationCenter defaultCenter] postNotificationName:@"" object:nil userInfo:@{@"auto" : @(kCLAuthorizationStatusDenied)}]; + + }break; + + case kCLAuthorizationStatusAuthorizedWhenInUse: + + break; + + case kCLAuthorizationStatusRestricted:{ + + [[NSNotificationCenter defaultCenter] postNotificationName:@"" object:nil userInfo:@{@"auto" : @(kCLAuthorizationStatusRestricted)}]; + + }break; + + default: + break; + } + +} + +- (void)startUpdatingLocationBackground +{ + NSLog(@"Starting location updates"); + self.locationManager.allowsBackgroundLocationUpdates = TRUE; + [self.locationManager startUpdatingLocation]; +} + +- (void)stopUpdatingLocation +{ + NSLog(@"Stop location updates"); + [self.locationManager stopUpdatingLocation]; +} + +- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error +{ + NSLog(@"Location service failed with error %@", error); +} + +- (void)locationManager:(CLLocationManager *)manager + didUpdateLocations:(NSArray*)locations +{ + CLLocation *location = [locations lastObject]; + // verifica il tempo trascorso dall'ultimo rilevamento della posizione + if([location.timestamp timeIntervalSinceDate:[EQNUser defaultUser].lastPosition.timestamp] > TEMPO_AGGIORNAMENTO_POSIZIONE && [EQNUser defaultUser].lastPosition.coordinate.longitude > 0.000000){ + self.posizioneRilevata = NO; + } + + // per evitare il ripetersi dell'aggiornamento della posizione utilizzo la variabile posizioneRilevata + if (!self.posizioneRilevata) { + self.posizioneRilevata = YES; + self.currentLocation = location; + } + + // se l'app è in background avvia il rilevamento dell'accellerometro + if ([EQNManager defaultManager].isBackground) + [[EQNManager defaultManager] controllaStatoApplicazione]; + +} + ++(void)avviaLetturaAccellerometroisCal:(BOOL)isCal withResult:(void(^)(NSArray *dati)) success{ + + NSMutableArray *dati = [NSMutableArray array]; + CMMotionManager *motionManager = [[CMMotionManager alloc] init]; + NSOperationQueue *queue = [[NSOperationQueue alloc] init]; + motionManager.accelerometerUpdateInterval = kUpdateInterval; + __block NSTimeInterval cont = 0; + + NSTimeInterval timer = SECONDI_RILIEVO; + if (isCal) + timer = SECONDI_CALIBRAZIONE; + + [motionManager startAccelerometerUpdatesToQueue:queue withHandler: + ^(CMAccelerometerData *accelerometerData, NSError *error) { + + if(cont == 0) + cont = accelerometerData.timestamp; + + [dati addObject:@([EQNMath powSum:accelerometerData])]; + + if (accelerometerData.timestamp-cont >= timer) { + [motionManager stopAccelerometerUpdates]; + + NSLog(@"time %f", accelerometerData.timestamp-cont); + + success([NSArray arrayWithArray:dati]); + } + }]; +} + +@end diff --git a/Sources/Earthquake Network/model/EQNAreaCheck.h b/Sources/Earthquake Network/model/EQNAreaCheck.h new file mode 100644 index 0000000..93a88e1 --- /dev/null +++ b/Sources/Earthquake Network/model/EQNAreaCheck.h @@ -0,0 +1,18 @@ +// +// EQNAreaCheck.h +// Earthquake Network +// +// Created by Luca Beretta on 09/10/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import + +@interface EQNAreaCheck : NSObject + +@property (nonatomic, strong) NSString *total; +@property (nonatomic, strong) NSString *active; + +-(id)initWithInfo:(NSArray *)info; + +@end diff --git a/Sources/Earthquake Network/model/EQNAreaCheck.m b/Sources/Earthquake Network/model/EQNAreaCheck.m new file mode 100644 index 0000000..02a0415 --- /dev/null +++ b/Sources/Earthquake Network/model/EQNAreaCheck.m @@ -0,0 +1,41 @@ +// +// EQNAreaCheck.m +// Earthquake Network +// +// Created by Luca Beretta on 09/10/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "EQNAreaCheck.h" + +@implementation EQNAreaCheck + +-(id)initWithInfo:(NSArray *)info{ + + self = [super init]; + if(self != nil) { + + _total = info[0][@"total"]; + _active = info[1][@"active"]; + + } + return self; +} +- (void)encodeWithCoder:(NSCoder *)encoder { + //Encode properties, other class variables, etc + [encoder encodeObject:self.total forKey:@"total"]; + [encoder encodeObject:self.active forKey:@"active"]; + +} + +- (id)initWithCoder:(NSCoder *)decoder { + if((self = [super init])) { + //decode properties, other class vars + self.total = [decoder decodeObjectForKey:@"total"]; + self.active = [decoder decodeObjectForKey:@"active"]; + + } + return self; +} + +@end diff --git a/Sources/Earthquake Network/model/EQNCalibrazione.h b/Sources/Earthquake Network/model/EQNCalibrazione.h new file mode 100644 index 0000000..ac9c458 --- /dev/null +++ b/Sources/Earthquake Network/model/EQNCalibrazione.h @@ -0,0 +1,24 @@ +// +// Calibrazione.h +// Earthquake Network +// +// Created by Luca Beretta on 14/09/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import +#import "Costanti.h" + +@interface EQNCalibrazione : NSObject + +@property (nonatomic, assign) float media; +@property (nonatomic, assign) float deviazione; +@property (nonatomic, assign) float r3; + +@property (nonatomic, assign) EQNStatoCal stato; + ++(void)startCalibrazione:(void(^)(EQNCalibrazione *cal))cal; +//-(NSString *)serverMessage; + + +@end diff --git a/Sources/Earthquake Network/model/EQNCalibrazione.m b/Sources/Earthquake Network/model/EQNCalibrazione.m new file mode 100644 index 0000000..7ab20da --- /dev/null +++ b/Sources/Earthquake Network/model/EQNCalibrazione.m @@ -0,0 +1,51 @@ +// +// Calibrazione.m +// Earthquake Network +// +// Created by Luca Beretta on 14/09/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "EQNCalibrazione.h" +#import "EQNMath.h" +#import "EQMAccelerometroManager.h" + +@implementation EQNCalibrazione + ++(void)startCalibrazione:(void(^)(EQNCalibrazione *cal))cal{ + + [EQMAccelerometroManager avviaLetturaAccellerometroisCal:YES withResult:^(NSArray *dati) { +// [[EQMAccelerometroManager sharedInstance] startUpdatingLocation]; + EQNCalibrazione *calibrazione = [[EQNCalibrazione alloc] init]; + calibrazione.media = [[EQNMath meanOf:dati] floatValue]; + calibrazione.deviazione = [[EQNMath standardDeviationOf:dati] floatValue]; + NSDictionary *rDic = [EQNMath rLimiti:dati]; + float max = [rDic[rMax] floatValue] - calibrazione.media; + float min = [rDic[rMin] floatValue] - calibrazione.media; + calibrazione.r3 = max; + if ( max != min){ + if (min > SOGLIAMIN && max < SOGLIAMAX){ + calibrazione.stato = calibrato; + + }else + calibrazione.stato = nonCalibrato; + } + + cal(calibrazione); + + }]; +} + +-(id)copyWithZone:(NSZone *)zone { + EQNCalibrazione *model = [[[self class] allocWithZone:zone] init]; + + model.media = self.media; + model.deviazione = self.deviazione; + model.r3 = self.r3; + model.stato = self.stato; + + return model; +} + + +@end diff --git a/Sources/Earthquake Network/model/EQNDatoGrafico.h b/Sources/Earthquake Network/model/EQNDatoGrafico.h new file mode 100644 index 0000000..f42f3e8 --- /dev/null +++ b/Sources/Earthquake Network/model/EQNDatoGrafico.h @@ -0,0 +1,19 @@ +// +// EQNDatoGrafico.h +// Earthquake Network +// +// Created by Luca Beretta on 09/10/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import + +@interface EQNDatoGrafico : NSObject +@property (nonatomic, strong) NSString *en; +@property (nonatomic, strong) NSString *geo; +@property (nonatomic, strong) NSString *tot; +@property (nonatomic, strong) NSString *dat; + +-(id)initWithInfo:(NSDictionary *)info; + +@end diff --git a/Sources/Earthquake Network/model/EQNDatoGrafico.m b/Sources/Earthquake Network/model/EQNDatoGrafico.m new file mode 100644 index 0000000..a7643f1 --- /dev/null +++ b/Sources/Earthquake Network/model/EQNDatoGrafico.m @@ -0,0 +1,49 @@ +// +// EQNDatoGrafico.m +// Earthquake Network +// +// Created by Luca Beretta on 09/10/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "EQNDatoGrafico.h" + +@implementation EQNDatoGrafico + + +-(id)initWithInfo:(NSDictionary *)info{ + self = [super init]; + if(self != nil) { + + _dat = info[@"dat"]; + _en = info[@"en"]; + _geo = info[@"geo"]; + _tot = info[@"tot"]; + + } + return self; +} + +- (void)encodeWithCoder:(NSCoder *)encoder { + //Encode properties, other class variables, etc + [encoder encodeObject:self.dat forKey:@"dat"]; + [encoder encodeObject:self.en forKey:@"en"]; + [encoder encodeObject:self.geo forKey:@"geo"]; + [encoder encodeObject:self.tot forKey:@"tot"]; + +} + +- (id)initWithCoder:(NSCoder *)decoder { + + if((self = [super init])) { + //decode properties, other class vars + self.dat = [decoder decodeObjectForKey:@"dat"]; + self.en = [decoder decodeObjectForKey:@"en"]; + self.geo = [decoder decodeObjectForKey:@"geo"]; + self.tot = [decoder decodeObjectForKey:@"tot"]; + + } + return self; +} + +@end diff --git a/Sources/Earthquake Network/model/EQNGeneratoreURLServer.h b/Sources/Earthquake Network/model/EQNGeneratoreURLServer.h new file mode 100644 index 0000000..0c2c3ed --- /dev/null +++ b/Sources/Earthquake Network/model/EQNGeneratoreURLServer.h @@ -0,0 +1,24 @@ +// +// EQNGeneratoreURLServer.h +// Earthquake Network +// +// Created by Luca Beretta on 19/09/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import +#import "EQNCalibrazione.h" +#import "EQNRilevamento.h" + +@interface EQNGeneratoreURLServer : NSObject + ++(NSURL *)urlDownloadDati; ++(NSURL *)urlRegistrazione; ++(NSURL *)urlPosizione; ++(NSURL *)urlTempoDisponibile; ++(NSURL *)urlMessagioStatoSmartPhone:(EQNCalibrazione *)calibrazione rilevamento:(EQNRilevamento *)rilevamento; ++(NSURL *)urlInvioMessagioTerremoto:(NSInteger )magnitudo withAdress:(NSString *)address; ++(NSURL *)urlInvioCommentoTerremoto:(NSString *)commento codeMessage:(NSString *)code; ++(NSURL *)urlInvioImpostazioniNotifiche; + +@end diff --git a/Sources/Earthquake Network/model/EQNGeneratoreURLServer.m b/Sources/Earthquake Network/model/EQNGeneratoreURLServer.m new file mode 100644 index 0000000..54aab03 --- /dev/null +++ b/Sources/Earthquake Network/model/EQNGeneratoreURLServer.m @@ -0,0 +1,276 @@ +// +// EQNGeneratoreURLServer.m +// Earthquake Network +// +// Created by Luca Beretta on 19/09/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "EQNGeneratoreURLServer.h" +#import "Costanti.h" +#import "EQNUser.h" +#import "EQNCalibrazione.h" +#import "EQNRilevamento.h" +#import +#import "EQNImpostazioniNotifiche.h" +#import "EQNNotificheTempoReale.h" +#import "EQNNotificheSegnalazioniUtente.h" +#import "EQNNotificeReteSismiche.h" +#import "EQNNotificheTsunami.h" +#import "EQNAllertaSismica.h" + +@implementation EQNGeneratoreURLServer + ++(NSURL *)urlDownloadDati{ + + NSString *stringUrl = [NSString stringWithFormat:@"%@",URL_SERVER_DOWNLOAD]; + return [NSURL URLWithString:stringUrl]; +} + ++(NSURL *)urlRegistrazione{ + + NSString *primaRegistrazione = @"0"; + if ([EQNUser defaultUser].registrato){ + primaRegistrazione = @"1"; + NSLog(@"Utente registrato"); + } + + NSString *stringUrl = [NSString stringWithFormat:@"%@?u_id=%@&r_id=%@&lat=%f&lon=%f&ios=1",URL_SERVER_REGISTRAZIONE, primaRegistrazione, [EQNUser defaultUser].tokenUser, [EQNUser defaultUser].lastPosition.coordinate.latitude, [EQNUser defaultUser].lastPosition.coordinate.longitude ]; + + return [NSURL URLWithString:stringUrl]; +} + ++(NSURL *)urlPosizione{ + + NSString *stringUrl = [NSString stringWithFormat:@"%@?u_id=%@&lat=%f&lon=%f",URL_SERVER_POSIZIONE, [EQNUser defaultUser].user_ID, [EQNUser defaultUser].lastPosition.coordinate.latitude, [EQNUser defaultUser].lastPosition.coordinate.longitude ]; + + return [NSURL URLWithString:stringUrl]; +} + ++(NSURL *)urlTempoDisponibile{ + + NSString *stringUrl = [NSString stringWithFormat:@"%@?u_id=%@",URL_SERVER_TEMPO_DISPONIBILI, [EQNUser defaultUser].user_ID]; + + return [NSURL URLWithString:stringUrl]; +} + ++(NSURL *)urlMessagioStatoSmartPhone:(EQNCalibrazione *)calibrazione rilevamento:(EQNRilevamento *)rilevamento{ + + NSString *e_t = @"0"; + NSString *a_max = @"0"; + + if (rilevamento.rilievo == positivo){ + e_t = @"1"; + a_max =[NSString stringWithFormat:@"%f",rilevamento.maxAssoluto]; + } + + NSString *u_id = [EQNUser defaultUser].user_ID; + NSString *lat = [NSString stringWithFormat:@"%f", [EQNUser defaultUser].lastPosition.coordinate.latitude]; + NSString *lon = [NSString stringWithFormat:@"%f", [EQNUser defaultUser].lastPosition.coordinate.longitude]; + NSString *acc = @"10"; + NSString *d_not = @"0"; + NSString *calib = @"0"; + if (calibrazione.stato == calibrato) + calib = @"1"; + + NSString *ch = @"0"; + if ([EQNUser defaultUser].inCarica) + ch = @"1"; + + NSString *s_on = @"0"; + if ([EQNUser defaultUser].monitorOn) + s_on = @"1"; + + NSString *tru = @"0"; + + NSString *upd = @"0"; + if ([EQNUser defaultUser].distanza > DISTANZA_METRI_SEGNALAZIONE) + upd = @"1"; + + NSString *ver = [self ottieniVersioneComeIntero]; + NSString *os = @"1"; + NSString *stringUrl = [NSString stringWithFormat:@"%@?e_t=%@&u_id=%@&lat=%@&lon=%@&acc=%@&a_max=%@&d_not=%@&cal=%@&ch=%@&s_on=%@&tru=%@&upd=%@&ver=%@&os=%@", URL_SERVER_CAL_RIL,e_t,u_id,lat,lon,acc,a_max,d_not,calib,ch,s_on,tru,upd,ver,os]; + + return [NSURL URLWithString:stringUrl]; +} + ++(NSString *)ottieniVersioneComeIntero{ + + NSNumber * versone = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]; + int versioneItero = [versone intValue]; + + return [NSString stringWithFormat:@"%i", versioneItero]; + +} + ++(NSURL *)urlInvioMessagioTerremoto:(NSInteger )magnitudo withAdress:(NSString *)address{ + + NSString *lat = [NSString stringWithFormat:@"%f", [EQNUser defaultUser].lastPosition.coordinate.latitude]; + NSString *lon = [NSString stringWithFormat:@"%f", [EQNUser defaultUser].lastPosition.coordinate.longitude]; + NSDate *date = [NSDate date]; + NSDateFormatter *formatOre = [[NSDateFormatter alloc] init]; + [formatOre setDateFormat:@"HH"]; + NSString *ora = [formatOre stringFromDate:date]; + NSString *stringUrl = [NSString stringWithFormat:@"%@?u_id=%@&lat=%@&lon=%@&mag=%ld&address=%@&hod=%@", URL_SERVER_UPLOAD_SEGNALAZIONI_UTENTE, [EQNUser defaultUser].user_ID, lat, lon, (long)magnitudo, address, ora]; + + NSURL *url = [NSURL URLWithString:stringUrl]; + if (url) { + return url; + } + else{ + + stringUrl = [NSString stringWithFormat:@"%@?u_id=%@&lat=%@&lon=%@&mag=%ld&hod=%@", URL_SERVER_UPLOAD_SEGNALAZIONI_UTENTE, [EQNUser defaultUser].user_ID, lat, lon, (long)magnitudo, ora]; + return [NSURL URLWithString:stringUrl]; + } + +} + ++(NSURL *)urlInvioCommentoTerremoto:(NSString *)commento codeMessage:(NSString *)code{ + + + NSString* codeEscaped = [code stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLHostAllowedCharacterSet ]]; + + NSString* commentEscaped = [commento stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLHostAllowedCharacterSet ]]; + + NSString *stringUrl = [NSString stringWithFormat:@"%@?u_id=%@&e_code=%@&message=%@", URL_SERVER_UPLOAD_SEGNALAZIONI_COMMENTO_UTENTE, [EQNUser defaultUser].user_ID, codeEscaped, commentEscaped]; + + return [NSURL URLWithString: stringUrl]; + +} + ++(NSURL *)urlInvioImpostazioniNotifiche{ + + NSString *n_e = [NSString stringWithFormat:@"&n_e=%i",[EQNAllertaSismica center].isAbilitato]; + + NSString *n_m = [NSString stringWithFormat:@"&n_m=%i",[EQNNotificheSegnalazioniUtente center].isAbilitato]; + NSString *n_o = [NSString stringWithFormat:@"&n_o=%i",[EQNNotificeReteSismiche center].isAbilitato]; + NSString *n_o_near = [NSString stringWithFormat:@"&n_o_near=%i",[EQNNotificeReteSismiche center].isAbilitaVicini]; + NSString *n_o_mag = [NSString stringWithFormat:@"&n_o_mag=%@",[EQNNotificeReteSismiche center].energiaSisma]; + NSString *n_tsu = [NSString stringWithFormat:@"&n_tsu=%i",[EQNNotificheTsunami center].isAbilitato]; + + NSString *n_o_usgs = @"&n_o_usgs=0"; + NSString *n_o_emsc = @"&n_o_emsc=0"; + NSString *n_o_ingv = @"&n_o_ingv=0"; + NSString *n_o_ign = @"&n_o_ign=0"; + NSString *n_o_csi = @"&n_o_csi=0"; + NSString *n_o_jma = @"&n_o_jma=0"; + NSString *n_o_ineter = @"&n_o_ineter=0"; + NSString *n_o_ssn = @"&n_o_ssn=0"; + NSString *n_o_sgc = @"&n_o_sgc=0"; + NSString *n_o_rsn = @"&n_o_rsn=0"; + NSString *n_o_csn = @"&n_o_csn=0"; + NSString *n_o_funvisis = @"&n_o_funvisis=0"; + NSString *n_o_geonet = @"&n_o_geonet=0"; + NSString *n_o_inpres = @"&n_o_inpres=0"; + NSString *n_o_igepn = @"&n_o_igepn=0"; + NSString *n_o_phivolcs = @"&n_o_phivolcs=0"; + NSString *n_o_igp = @"&n_o_igp=0"; + NSString *n_o_uasd = @"&n_o_uasd=0"; + + for (NSString *ente in [EQNNotificeReteSismiche center].listaEnti) { + + if ([ente isEqualToString:@"USGS"]) + n_o_usgs = @"&n_o_usgs=1"; + if ([ente isEqualToString:@"EMSC"]) + n_o_emsc = @"&n_o_emsc=1"; + if ([ente isEqualToString:@"INGV"]) + n_o_ingv = @"&n_o_ingv=1"; + if ([ente isEqualToString:@"IGN"]) + n_o_ign = @"&n_o_ign=1"; + if ([ente isEqualToString:@"CSI"]) + n_o_csi = @"&n_o_csi=1"; + if ([ente isEqualToString:@"JMA"]) + n_o_jma = @"&n_o_jma=1"; + if ([ente isEqualToString:@"Ineter"]) + n_o_ineter = @"&n_o_ineter=1"; + if ([ente isEqualToString:@"SSN"]) + n_o_ssn = @"&n_o_ssn=1"; + if ([ente isEqualToString:@"SGC"]) + n_o_sgc = @"&n_o_sgc=1"; + if ([ente isEqualToString:@"RSN"]) + n_o_rsn = @"&n_o_rsn=1"; + if ([ente isEqualToString:@"CSN"]) + n_o_csn = @"&n_o_csn=1"; + if ([ente isEqualToString:@"FUNVISIS"]) + n_o_funvisis = @"&n_o_funvisis=1"; + if ([ente isEqualToString:@"GeoNet"]) + n_o_geonet = @"&n_o_geonet=1"; + if ([ente isEqualToString:@"INPRES"]) + n_o_inpres = @"&n_o_inpres=1"; + if ([ente isEqualToString:@"IGEPN"]) + n_o_igepn = @"&n_o_igepn=1"; + if ([ente isEqualToString:@"PHIVOLCS"]) + n_o_phivolcs = @"&n_o_phivolcs=1"; + if ([ente isEqualToString:@"IGP"]) + n_o_igp = @"&n_o_igp=1"; + if ([ente isEqualToString:@"UASD"]) + n_o_uasd = @"&n_o_uasd=1"; + } + NSString *enti = [NSString stringWithFormat:@"%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@", n_o_usgs, n_o_emsc, n_o_ingv, n_o_ign, n_o_csi, n_o_jma, n_o_ineter, n_o_ssn, n_o_sgc, n_o_rsn, n_o_csn, n_o_funvisis, n_o_geonet, n_o_inpres, n_o_igepn, n_o_phivolcs, n_o_igp, n_o_uasd]; + + NSString *n_o_strong = [NSString stringWithFormat:@"n_o_strong=%i",[EQNNotificeReteSismiche center].isTerremortiForti]; + + NSString *n_tsu_car = @"&n_tsu_car=1"; + NSString *n_tsu_pac = @"&n_tsu_pac=1"; + NSString *n_tsu_haw = @"&n_tsu_haw=1"; + + + if (![[EQNNotificheTsunami center].listaAreeInteresse containsObject:NSLocalizedString(@"Mar dei Caraibi", @"voce elenco aree tsunami")]) { + n_tsu_car = @"&n_tsu_car=0"; + + } + if (![[EQNNotificheTsunami center].listaAreeInteresse containsObject:NSLocalizedString(@"Oceano Pacifico", @"voce elenco aree tsunami")]) { + n_tsu_pac = @"&n_tsu_pac=0"; + + } + if (![[EQNNotificheTsunami center].listaAreeInteresse containsObject:NSLocalizedString(@"Isole Hawaii", @"voce elenco aree tsunami")]) { + n_tsu_haw = @"&n_tsu_haw=0"; + + } + + NSString *n_tsu_aree = [NSString stringWithFormat:@"%@%@%@",n_tsu_car, n_tsu_pac, n_tsu_haw]; + NSString *n_e_unk = [NSString stringWithFormat:@"&n_e_unk=%i", [EQNAllertaSismica center].isSimiSenzaIntensita]; + + NSString *n_o_strmag = [NSString stringWithFormat:@"&n_o_strmag=%@", [EQNNotificeReteSismiche center].energiaTerremotiForti]; + if ([[EQNAllertaSismica center].sismiDaNotificare isEqualToString:NSLocalizedString(@"Qualsiasi intensità", @"")]) + n_o_strmag = @"&n_o_strmag=0"; + + + NSString *r_e_mild = [NSString stringWithFormat:@"&r_e_mild=%@", [EQNAllertaSismica center].raggioSismiLievi]; + + if ([[EQNAllertaSismica center].raggioSismiLievi isEqualToString:NSLocalizedString(@"Qualsiasi distanza", @"")]) + r_e_mild = @"&r_e_mild=100000"; + + NSString *r_e_strong = [NSString stringWithFormat:@"&r_e_strong=%@", [EQNAllertaSismica center].raggioSismiForti]; + + if ([[EQNAllertaSismica center].raggioSismiForti isEqualToString:NSLocalizedString(@"Qualsiasi distanza", @"")]) + r_e_strong = @"&r_e_strong=100000"; + + NSString *r_m = [NSString stringWithFormat:@"&r_m=%@", [EQNNotificheSegnalazioniUtente center].distanzaPosizione]; + if ([[EQNNotificheSegnalazioniUtente center].distanzaPosizione isEqualToString:NSLocalizedString(@"Qualsiasi distanza", @"")]) + r_m = @"&r_m=100000"; + + + NSString *r_o = [NSString stringWithFormat:@"&r_o=%@", [EQNNotificeReteSismiche center].distanzaPosizione]; + if ([[EQNNotificeReteSismiche center].distanzaPosizione isEqualToString:NSLocalizedString(@"Qualsiasi distanza", @"")]) + r_o = @"&r_o=100000"; + + NSString *r_o_near = [NSString stringWithFormat:@"&r_o_near=%@", [EQNNotificeReteSismiche center].distanzaVicini]; + if ([[EQNNotificeReteSismiche center].distanzaPosizione isEqualToString:NSLocalizedString(@"Qualsiasi distanza", @"")]) + r_o_near = @"&r_o_near=100000"; + + // da sistemare + NSString *n_e_type = [NSString stringWithFormat:@"&n_e_type=%@", [EQNAllertaSismica center].sismiDaNotificare]; + + NSString *stringUrl = [NSString stringWithFormat:@"%@?u_id=%@&lat=%f&lon=%f%@%@%@%@%@%@%@&ios=1&%@%@%@%@%@%@%@%@%@%@",URL_SERVER_UPLOAD_IMPOSTAZIONI, [EQNUser defaultUser].user_ID, [EQNUser defaultUser].lastPosition.coordinate.latitude, [EQNUser defaultUser].lastPosition.coordinate.longitude, n_e, n_m, n_o, n_o_near,n_o_mag, enti, n_tsu, n_o_strong,n_tsu_aree, n_e_type, n_e_unk, n_o_strmag, r_e_mild, r_e_strong, r_m, r_o, r_o_near]; + + NSLog(@"stringUrl %@", stringUrl); + + + return [NSURL URLWithString:stringUrl]; + +} + +@end + + diff --git a/Sources/Earthquake Network/model/EQNManager.h b/Sources/Earthquake Network/model/EQNManager.h new file mode 100644 index 0000000..193d44e --- /dev/null +++ b/Sources/Earthquake Network/model/EQNManager.h @@ -0,0 +1,32 @@ +// +// EQNManager.h +// Earthquake Network +// +// Created by Luca Beretta on 17/09/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import +#import "EQNReteSmartphone.h" +#import "EQNAreaCheck.h" +#import "EQNSegnalazione.h" + +@interface EQNManager : NSObject +@property (nonatomic, assign) BOOL isBackground; +@property (nonatomic, strong) EQNReteSmartphone *rete_smartphone; +@property (nonatomic, strong) EQNAreaCheck *area_check; +@property (nonatomic, strong) NSArray *datiGraficoUtente; +@property (nonatomic, strong) NSArray *datiPastQuakes; +@property (nonatomic, strong) NSArray *elencoSelagnazioniManuali; +@property (nonatomic, strong) NSArray *retiSismiche; +@property (nonatomic, strong) NSArray *listaTsunami; + + ++(EQNManager *) defaultManager; +-(void)avviaManager; +-(void)stopManager; +-(void)controllaStatoApplicazione; +-(void)sincronizza; +-(void)recuperaDati; + +@end diff --git a/Sources/Earthquake Network/model/EQNManager.m b/Sources/Earthquake Network/model/EQNManager.m new file mode 100644 index 0000000..4ae38d7 --- /dev/null +++ b/Sources/Earthquake Network/model/EQNManager.m @@ -0,0 +1,463 @@ +// +// EQNManager.m +// Earthquake Network +// +// Created by Luca Beretta on 17/09/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "EQNManager.h" +#import +#import "EQNCalibrazione.h" +#import "EQNRilevamento.h" +#import "EQNUser.h" +#import "Costanti.h" +#import "ServerRequest.h" +#import "EQNGeneratoreURLServer.h" +#import "EQNReteSmartphone.h" +#import "EQNDatoGrafico.h" +#import "EQNPastquakes.h" +#import "EQNSegnalazione.h" +#import "EQNSisma.h" +#import "EQNUtility.h" +#import "Tsunami.h" +//#import + +@interface EQNManager() + +@property (nonatomic, strong) EQNCalibrazione *calibrazione; + +@property (nonatomic, strong) NSDate *timeStamp; +@property (nonatomic, assign) BOOL inCalibrazione; +@property (nonatomic, assign) BOOL inRilevamento; + +@end + +@implementation EQNManager + +static EQNManager *_sharedInstance = nil; + ++(EQNManager *) defaultManager{ + static EQNManager *instance = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + instance = [[self alloc]init]; + [instance recuperaDati]; +// [instance scaricaDatiGrafico]; +// [instance scaricaAreaCheck]; +// [instance scaricaPastquakes]; + + }); + return instance; +} + +-(void)sincronizza{ + + [self scaricaDatiReteSmartphone]; + +} + +-(void)scaricaDatiReteSmartphone{ + + [[ServerRequest defaultServerConnectionSingleton] inviaInformazioniAlServerWithURL:[NSURL URLWithString:URL_SERVER_DOWNLOAD] richiesta:downloadDati success:^(id result) { + + NSLog(@"%@\nresult segnalazioni %@",[NSURL URLWithString:URL_SERVER_DOWNLOAD] ,result); + self.rete_smartphone = [[EQNReteSmartphone alloc] initWithInfo:result]; + + [self performSelectorOnMainThread:@selector(scaricaDatiGrafico) withObject:nil waitUntilDone:YES]; + + } failure:^(NSError * error) { + + // NSLog(@"Errore scaricaDatiReteSmartphone %@", error); + + }]; +} + +-(void)scaricaDatiGrafico{ + + [[ServerRequest defaultServerConnectionSingleton] inviaInformazioniAlServerWithURL:[NSURL URLWithString:URL_SERVER_GEAFICO_UTENTI] richiesta:graficoSmartPhone success:^(id result) { + + NSMutableArray *arryTemp = [NSMutableArray array]; + for (NSDictionary *dic in result) + [arryTemp addObject:[[EQNDatoGrafico alloc] initWithInfo:dic]]; + + self.datiGraficoUtente = arryTemp; + + // NSLog(@"result scaricaDatiGrafico %@", result); + + [self performSelectorOnMainThread:@selector(scaricaAreaCheck) withObject:nil waitUntilDone:YES]; + + } failure:^(NSError * error) { + + // NSLog(@"Errore scaricaDatiGrafico %@", error); + + + }]; + +} + +-(void)scaricaAreaCheck{ + + [[ServerRequest defaultServerConnectionSingleton] inviaInformazioniAlServerWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@?lat=%f&lon=%f", URL_SERVER_AREA_CHECK, [EQNUser defaultUser].lastPosition.coordinate.latitude, [EQNUser defaultUser].lastPosition.coordinate.longitude]] richiesta:areaCheck success:^(id result) { + + self.area_check = [[EQNAreaCheck alloc] initWithInfo:result]; + + NSLog(@"%@ \nresult scaricaAreaCheck %@",[NSString stringWithFormat:@"%@?lat%f&lon=%f", URL_SERVER_AREA_CHECK, [EQNUser defaultUser].lastPosition.coordinate.latitude, [EQNUser defaultUser].lastPosition.coordinate.longitude] ,result); + + [self performSelectorOnMainThread:@selector(scaricaPastquakes) withObject:nil waitUntilDone:YES]; + + } failure:^(NSError * error) { + + // NSLog(@"Errore scaricaAreaCheck %@", error); + + }]; +} + +-(void)scaricaPastquakes{ + + [[ServerRequest defaultServerConnectionSingleton] inviaInformazioniAlServerWithURL:[NSURL URLWithString:URL_SERVER_PAST_QUAKES] richiesta:pastquakes success:^(id result) { + + NSMutableArray *arryTemp = [NSMutableArray array]; + for (NSDictionary *dic in result) + [arryTemp addObject:[[EQNPastquakes alloc] initWithInfo:dic]]; + self.datiPastQuakes = arryTemp; + + // NSLog(@"result scaricaPastquakes %@", result); + + [self performSelectorOnMainThread:@selector(scaricaSegnalazioniManuali) withObject:nil waitUntilDone:YES]; + + + } failure:^(NSError * error) { + + // NSLog(@"Errore scaricaPastquakes %@", error); + + + }]; +} + +-(void)scaricaSegnalazioniManuali{ + + [[ServerRequest defaultServerConnectionSingleton] inviaInformazioniAlServerWithURL:[NSURL URLWithString:URL_SERVER_DOWNLOAD_SEGNALAZIONI_UTENTE] richiesta:segnalazioneManuale success:^(id result) { + + NSMutableArray *array = [NSMutableArray array]; + NSArray *tempArray = (NSArray *)result; + for (NSDictionary *dict in tempArray) { + + [array addObject:[[EQNSegnalazione alloc] initWithInfo:dict]]; + + } + + self.elencoSelagnazioniManuali = [NSArray arrayWithArray:array]; + + [self performSelectorOnMainThread:@selector(scaricaReteSismica) withObject:nil waitUntilDone:YES]; + + } failure:^(NSError * error) { + + // NSLog(@"Errore scaricaSegnalazioniManuali %@", error); + + }]; +} + + +-(void)scaricaReteSismica{ + + [[ServerRequest defaultServerConnectionSingleton] inviaInformazioniAlServerWithURL:[NSURL URLWithString:URL_SERVER_DOWNLOAD_RETI_SISMICHE] richiesta:downloadDati success:^(id result) { + + NSMutableArray *array = [NSMutableArray array]; + for (NSDictionary *dic in result) + [array addObject:[[EQNSisma alloc] initWithInfo:dic]]; + + self.retiSismiche = [NSArray arrayWithArray:array]; + + [[NSNotificationCenter defaultCenter] postNotificationName:NOTIFICA_DOWNLOAD_TERMINATO object:nil userInfo:nil]; + + + [self performSelectorOnMainThread:@selector(scaricaTsunami) withObject:nil waitUntilDone:YES]; + [self salvaDati]; + + } failure:^(NSError * error) { + + // NSLog(@"Errore scaricaReteSismica %@", error); + + }]; +} + +-(void)scaricaTsunami{ + + [[ServerRequest defaultServerConnectionSingleton] inviaInformazioniAlServerWithURL:[NSURL URLWithString:URL_SERVER_DOWNLOAD_TSUNAMI] richiesta:segnalazioneManuale success:^(id result) { + + NSMutableArray *array = [NSMutableArray array]; + NSArray *tempArray = (NSArray *)result; + for (NSDictionary *dict in tempArray) { + [array addObject:[[Tsunami alloc] initWithInfo:dict]]; + } + + // NSLog(@"result scaricaTsunami %@", result); + + self.listaTsunami = [NSArray arrayWithArray:array]; + + [self performSelectorOnMainThread:@selector(scaricaTempoDisponibile) withObject:nil waitUntilDone:YES]; + + + } failure:^(NSError * error) { + + // NSLog(@"Errore scaricaTsunami %@", error); + + }]; +} + +-(void)scaricaTempoDisponibile{ + + [[ServerRequest defaultServerConnectionSingleton] inviaInformazioniAlServerWithURL:[EQNGeneratoreURLServer urlTempoDisponibile] richiesta:tempoDisponibile success:^(id result) { + + NSLog(@"%@", result); + NSLog(@"result scaricaTempoDisponibile %@", result); + + // [[NSNotificationCenter defaultCenter] postNotificationName:NOTIFICA_DOWNLOAD_TERMINATO object:nil userInfo:nil]; + + } failure:^(NSError * error) { + + NSLog(@"Errore scaricaTempoDisponibile %@", error); + + + }]; + + +} + + +/* + -(void)registerforDeviceLockNotif { + + //Alert notification + CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), + NULL, // observer + displayStatusChanged, // callback + CFSTR("com.apple.springboard.showingAlertItem"), // event name + NULL, // object + CFNotificationSuspensionBehaviorDeliverImmediately); + + + } + */ + +-(void)avviaManager{ + + self.isBackground = YES; + self.timeStamp = [NSDate date]; + +} +-(void)stopManager{ + + self.isBackground = NO;; + self.timeStamp = nil; + +} + +-(void)controllaStatoApplicazione{ + + [[UIDevice currentDevice] setBatteryMonitoringEnabled:YES]; + + switch ([[UIDevice currentDevice] batteryState]) { + case UIDeviceBatteryStateUnknown: + [EQNUser defaultUser].inCarica = NO; + break; + case UIDeviceBatteryStateUnplugged: + [EQNUser defaultUser].inCarica = NO; + break; + case UIDeviceBatteryStateCharging: + [EQNUser defaultUser].inCarica = YES; + break; + case UIDeviceBatteryStateFull: + [EQNUser defaultUser].inCarica = YES; + break; + default: + break; + } + + NSLog(@"Loanciato controllo batteria "); + + if ([EQNUser defaultUser].inCarica){ + + // NSLog(@"Tempo Manager %f", [[NSDate date] timeIntervalSinceDate:self.timeStamp]); + + NSTimeInterval timer = [[NSDate date] timeIntervalSinceDate:self.timeStamp]; + NSLog(@"Timer %f", timer); + + //[[NSNotificationCenter defaultCenter] postNotificationName:@"AGGIORNA_LOG" object:nil userInfo:@{@"messaggio": [NSString stringWithFormat:@"timer %f ", timer]}]; + + if (!self.calibrazione) { + if (!self.inCalibrazione) { + + if(timer > TEMPO_LATENZA_CALIBRAZIONE){ + + [[NSNotificationCenter defaultCenter] postNotificationName:@"AGGIORNA_LOG" object:nil userInfo:@{@"messaggio": @"Avvio Calibrazione"}]; + + NSLog(@"Avvio Calibrazione"); + self.inCalibrazione = YES; + [self avviaCalibrazione]; + } + } + }else{ + if(timer > TEMPO_RIPETIZIONE_CALIBRAZIONE){ + [self annullaCalibrazione]; + self.inCalibrazione = YES; + [self avviaCalibrazione]; + } + + if (!self.inRilevamento && self.calibrazione.stato == calibrato) { + + [self avviaRilevamento]; + } + } + } + + else + [self annullaCalibrazione]; + +} + +-(void)avviaCalibrazione{ + + [EQNCalibrazione startCalibrazione:^(EQNCalibrazione *cal) { + self.calibrazione = cal; + + // [self iniviaMessaggioAlServer:nil]; + NSLog(@"Media %f stato %li", cal.media, (long)cal.stato ); + [self performSelectorOnMainThread:@selector(iniviaMessaggioAlServer:) + withObject:nil + waitUntilDone:YES]; + + [[NSNotificationCenter defaultCenter] postNotificationName:@"AGGIORNA_LOG" object:nil userInfo:@{@"messaggio": [NSString stringWithFormat:@"Media %f stato %li", cal.media, (long)cal.stato ]}]; + + + if (self.calibrazione.stato == nonCalibrato){ + + self.inCalibrazione = YES; + [self performSelectorOnMainThread:@selector(avviaCalibrazione) + withObject:nil + waitUntilDone:YES]; + }else{ + + self.inCalibrazione = NO; + [self performSelectorOnMainThread:@selector(avviaRilevamento) + withObject:nil + waitUntilDone:YES]; + + } + }]; +} + +-(void)annullaCalibrazione{ + + self.calibrazione = nil; + self.inRilevamento = NO; + self.inCalibrazione = NO; + self.timeStamp = [NSDate date]; + +} + +-(void)avviaRilevamento{ + + if (self.calibrazione) { + self.inRilevamento = YES; + [EQNRilevamento startRilevamentoWithCalibrazione:self.calibrazione result:^(EQNRilevamento *ril) { + + NSLog(@"Rilevamento data %@ stato %li deviaizone %f ", ril.timestamp, (long)ril.rilievo, ril.deviazione); + + [[NSNotificationCenter defaultCenter] postNotificationName:@"AGGIORNA_LOG" object:nil userInfo:@{@"messaggio": [NSString stringWithFormat:@"Rilevamento data %@ stato %li deviaizone %f deviazione calibrazione %f", ril.timestamp, (long)ril.rilievo, ril.deviazione, self.calibrazione.deviazione]}]; + + if (ril == NULL){ + [self performSelectorOnMainThread:@selector(avviaCalibrazione) + withObject:nil + waitUntilDone:YES]; + return; + } + + switch (ril.rilievo) { + case positivo:{ + [self performSelectorOnMainThread:@selector(iniviaMessaggioAlServer:) + withObject:ril + waitUntilDone:YES]; + + self.calibrazione = nil; + } + break; + case negativo: + /* [self performSelectorOnMainThread:@selector(riavviaRilevamento) + withObject:nil + waitUntilDone:YES];*/ + + self.inRilevamento = NO; + break; + default: + break; + } + }]; + } +} + +-(void)riavviaRilevamento{ + + if (self.calibrazione) + [self avviaRilevamento]; +} + +-(void)iniviaMessaggioAlServer:(EQNRilevamento *)anRilevamento{ + + EQNTipoChiamata tipo = calibrazione; + EQNCalibrazione *anCalibrazione = [self.calibrazione copy]; + if (anRilevamento.rilievo == positivo){ + tipo = rilevamento; + [self annullaCalibrazione]; + } + + [[ServerRequest defaultServerConnectionSingleton] inviaInformazioniAlServerWithURL:[EQNGeneratoreURLServer urlMessagioStatoSmartPhone:anCalibrazione rilevamento:anRilevamento] richiesta:tipo success:^(id result) { + + [[NSNotificationCenter defaultCenter] postNotificationName:@"AGGIORNA_LOG" object:nil userInfo:@{@"messaggio": [NSString stringWithFormat:@"invio informazione al server tipo %ld inviato ", (long)tipo]}]; + + } failure:^(NSError *error) { + + + [[NSNotificationCenter defaultCenter] postNotificationName:@"AGGIORNA_LOG" object:nil userInfo:@{@"messaggio": [NSString stringWithFormat:@"invio informazione al server tipo %ld fallito ", (long)tipo]}]; + }]; +} + +// Salvataggio dati + +-(void)salvaDati{ + + /* + [EQNUtility saveCustomObject:self.retiSismiche key:MANAGER_DATA_RETE_SMARTPHONE]; + [EQNUtility saveCustomObject:self.area_check key:MANAGER_DATA_AREA_CHECK]; + + [EQNUtility writeArrayWithCustomObjToUserDefaults:MANAGER_DATA_DATI_GRAFICO_UTENTI withArray:self.datiGraficoUtente]; + [EQNUtility writeArrayWithCustomObjToUserDefaults:MANAGER_DATA_DATI_PASTQUAKES withArray:self.datiPastQuakes]; + [EQNUtility writeArrayWithCustomObjToUserDefaults:MANAGER_DATA_ELENCO_SEGNALAZIONI_MANUALI withArray:self.elencoSelagnazioniManuali]; + [EQNUtility writeArrayWithCustomObjToUserDefaults:MANAGER_DATA_RETI_SISMICHE withArray:self.retiSismiche]; + [EQNUtility writeArrayWithCustomObjToUserDefaults:MANAGER_DATA_LISTA_TSUNAMI withArray:self.listaTsunami]; + */ +} + +-(void)recuperaDati{ + /* + self.retiSismiche = [EQNUtility readArrayWithCustomObjFromUserDefaults:MANAGER_DATA_RETI_SISMICHE]; + + self.datiGraficoUtente = [EQNUtility readArrayWithCustomObjFromUserDefaults:MANAGER_DATA_DATI_GRAFICO_UTENTI]; + + self.datiPastQuakes = [EQNUtility readArrayWithCustomObjFromUserDefaults:MANAGER_DATA_DATI_PASTQUAKES]; + + self.elencoSelagnazioniManuali = [EQNUtility readArrayWithCustomObjFromUserDefaults:MANAGER_DATA_ELENCO_SEGNALAZIONI_MANUALI]; + + self.listaTsunami = [EQNUtility readArrayWithCustomObjFromUserDefaults:MANAGER_DATA_LISTA_TSUNAMI]; + + self.rete_smartphone = (EQNReteSmartphone *)[EQNUtility loadCustomObjectWithKey:MANAGER_DATA_RETE_SMARTPHONE]; + + self.area_check = (EQNAreaCheck *)[EQNUtility loadCustomObjectWithKey:MANAGER_DATA_AREA_CHECK]; + + [[NSNotificationCenter defaultCenter] postNotificationName:NOTIFICA_DOWNLOAD_TERMINATO object:nil userInfo:nil]; +*/ +} + +@end + diff --git a/Sources/Earthquake Network/model/EQNMath.h b/Sources/Earthquake Network/model/EQNMath.h new file mode 100644 index 0000000..0a97404 --- /dev/null +++ b/Sources/Earthquake Network/model/EQNMath.h @@ -0,0 +1,23 @@ +// +// EQNMath.h +// Earthquake Network +// +// Created by Luca Beretta on 14/09/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import +#import + +@interface EQNMath : NSObject + +// calcola la somma dei quadrati delle assi/G ottenute dall'accelerometro ++ (float)powSum:(CMAccelerometerData *)accelerometerData; +// calcola la media dei valori contenuta nell'array passato ++ (NSNumber *)meanOf:(NSArray *)array; +// calcola la deviazione standard dei valori contenuti nell'array passato ++ (NSNumber *)standardDeviationOf:(NSArray *)array; +// restituisce valore massimo e valore minimo contenuto nellarray ++ (NSDictionary *)rLimiti:(NSArray *)array; + +@end diff --git a/Sources/Earthquake Network/model/EQNMath.m b/Sources/Earthquake Network/model/EQNMath.m new file mode 100644 index 0000000..59f1312 --- /dev/null +++ b/Sources/Earthquake Network/model/EQNMath.m @@ -0,0 +1,59 @@ +// +// EQNMath.m +// Earthquake Network +// +// Created by Luca Beretta on 14/09/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "EQNMath.h" +#include +#import "Costanti.h" + + +@implementation EQNMath + ++ (float)powSum:(CMAccelerometerData *)accelerometerData { + + return sqrt(pow(accelerometerData.acceleration.x, 2.0)+pow(accelerometerData.acceleration.y, 2.0)+pow(accelerometerData.acceleration.z, 2.0)); +} + ++ (NSNumber *)meanOf:(NSArray *)array +{ + double runningTotal = 0.0; + for(NSNumber *number in array) + { + runningTotal += [number doubleValue]; + } + + return [NSNumber numberWithDouble:(runningTotal / [array count])]; +} + ++ (NSNumber *)standardDeviationOf:(NSArray *)array +{ + if(![array count]) return nil; + double mean = [[self meanOf:array] doubleValue]; + double sumOfSquaredDifferences = 0.0; + for(NSNumber *number in array) + { + double valueOfNumber = [number doubleValue]; + double difference = valueOfNumber - mean; + sumOfSquaredDifferences += difference * difference; + } + + return [NSNumber numberWithDouble:sqrt(sumOfSquaredDifferences / [array count])]; +} ++ (NSDictionary *)rLimiti:(NSArray *)array{ + + float xmax = -MAXFLOAT; + float xmin = MAXFLOAT; + + for (NSNumber *num in array) { + float x = num.floatValue; + if (x < xmin) xmin = x; + if (x > xmax) xmax = x; + } + + return @{rMax : @(xmax), rMin : @(xmin)}; +} +@end diff --git a/Sources/Earthquake Network/model/EQNPastquakes.h b/Sources/Earthquake Network/model/EQNPastquakes.h new file mode 100644 index 0000000..bf47d9e --- /dev/null +++ b/Sources/Earthquake Network/model/EQNPastquakes.h @@ -0,0 +1,24 @@ +// +// EQNPastquakes.h +// Earthquake Network +// +// Created by Luca Beretta on 09/10/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import + +@interface EQNPastquakes : NSObject + +@property (nonatomic, strong) NSString *latitude; +@property (nonatomic, strong) NSString *longitude; +@property (nonatomic, strong) NSString *users; +@property (nonatomic, strong) NSString *state; +@property (nonatomic, strong) NSString *code; +@property (nonatomic, strong) NSDate *date; +@property (nonatomic, strong) NSString *differencePas; +@property (nonatomic, strong) NSString *intensity; + +-(id)initWithInfo:(NSDictionary *)info; + +@end diff --git a/Sources/Earthquake Network/model/EQNPastquakes.m b/Sources/Earthquake Network/model/EQNPastquakes.m new file mode 100644 index 0000000..bb306ee --- /dev/null +++ b/Sources/Earthquake Network/model/EQNPastquakes.m @@ -0,0 +1,61 @@ +// +// EQNPastquakes.m +// Earthquake Network +// +// Created by Luca Beretta on 09/10/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "EQNPastquakes.h" +#import "EQNUtility.h" + +@implementation EQNPastquakes + +-(id)initWithInfo:(NSDictionary *)info{ + + self = [super init]; + if(self != nil) { + _latitude = info[@"latitude"]; + _longitude = info[@"longitude"]; + _users = info[@"users"]; + _state = info[@"state"]; + _code = info[@"code"]; + _date = [EQNUtility getDataFromString:info[@"date"]]; + _differencePas = info[@"difference"]; + _intensity = info[@"intensity"]; + } + return self; + +} + +- (void)encodeWithCoder:(NSCoder *)encoder { + //Encode properties, other class variables, etc + [encoder encodeObject:self.latitude forKey:@"latitude"]; + [encoder encodeObject:self.longitude forKey:@"longitude"]; + [encoder encodeObject:self.users forKey:@"users"]; + [encoder encodeObject:self.state forKey:@"state"]; + [encoder encodeObject:self.code forKey:@"code"]; + [encoder encodeObject:self.date forKey:@"date"]; + [encoder encodeObject:self.differencePas forKey:@"differencePas"]; + [encoder encodeObject:self.intensity forKey:@"intensity"]; + +} + +- (id)initWithCoder:(NSCoder *)decoder { + + if((self = [super init])) { + //decode properties, other class vars + self.latitude = [decoder decodeObjectForKey:@"latitude"]; + self.longitude = [decoder decodeObjectForKey:@"longitude"]; + self.users = [decoder decodeObjectForKey:@"users"]; + self.state = [decoder decodeObjectForKey:@"state"]; + self.code = [decoder decodeObjectForKey:@"code"]; + self.date = [decoder decodeObjectForKey:@"date"]; + self.differencePas = [decoder decodeObjectForKey:@"differencePas"]; + self.intensity = [decoder decodeObjectForKey:@"intensity"]; + + } + return self; +} + +@end diff --git a/Sources/Earthquake Network/model/EQNReteSmartphone.h b/Sources/Earthquake Network/model/EQNReteSmartphone.h new file mode 100644 index 0000000..f5e7c9a --- /dev/null +++ b/Sources/Earthquake Network/model/EQNReteSmartphone.h @@ -0,0 +1,23 @@ +// +// EQNReteSmartphone.h +// Earthquake Network +// +// Created by Luca Beretta on 09/10/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import + +@interface EQNReteSmartphone : NSObject + +@property (nonatomic, strong) NSString *eq; +@property (nonatomic, strong) NSString *eq_p; +@property (nonatomic, strong) NSNumber *green; +@property (nonatomic, strong) NSNumber *g_man; +@property (nonatomic, strong) NSNumber *y_man; +@property (nonatomic, strong) NSNumber *r_man; +@property (nonatomic, strong) NSString *diff; + +-(id)initWithInfo:(NSArray *)list; + +@end diff --git a/Sources/Earthquake Network/model/EQNReteSmartphone.m b/Sources/Earthquake Network/model/EQNReteSmartphone.m new file mode 100644 index 0000000..82d617a --- /dev/null +++ b/Sources/Earthquake Network/model/EQNReteSmartphone.m @@ -0,0 +1,74 @@ +// +// EQNReteSmartphone.m +// Earthquake Network +// +// Created by Luca Beretta on 09/10/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "EQNReteSmartphone.h" + +@implementation EQNReteSmartphone + +-(id)initWithInfo:(NSArray *)list{ + self = [super init]; + if(self != nil) { + for ( int i = 0; i < list.count; i++) { + NSDictionary *dict = list[i]; + switch (i) { + case 0: + _eq = dict[@"eq"]; + break; + case 1: + _eq_p = dict[@"eq_p"]; + break; + case 2: + _green = dict[@"green"]; + break; + case 3: + _g_man = dict[@"g_man"]; + break; + case 4: + _y_man = dict[@"y_man"]; + break; + case 5: + _r_man = dict[@"r_man"]; + break; + default: + _diff = dict[@"diff"]; + break; + } + } + } + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)encoder { + //Encode properties, other class variables, etc + [encoder encodeObject:self.eq forKey:@"eq"]; + [encoder encodeObject:self.eq_p forKey:@"eq_p"]; + [encoder encodeObject:self.green forKey:@"green"]; + [encoder encodeObject:self.g_man forKey:@"g_man"]; + [encoder encodeObject:self.y_man forKey:@"y_man"]; + [encoder encodeObject:self.r_man forKey:@"r_man"]; + [encoder encodeObject:self.diff forKey:@"diff"]; + +} + +- (id)initWithCoder:(NSCoder *)decoder { + if((self = [super init])) { + //decode properties, other class vars + self.eq = [decoder decodeObjectForKey:@"eq"]; + self.eq_p = [decoder decodeObjectForKey:@"eq_p"]; + self.green = [decoder decodeObjectForKey:@"green"]; + self.g_man = [decoder decodeObjectForKey:@"g_man"]; + self.y_man = [decoder decodeObjectForKey:@"y_man"]; + self.r_man = [decoder decodeObjectForKey:@"r_man"]; + self.diff = [decoder decodeObjectForKey:@"diff"]; + + } + return self; +} + +@end diff --git a/Sources/Earthquake Network/model/EQNRilevamento.h b/Sources/Earthquake Network/model/EQNRilevamento.h new file mode 100644 index 0000000..aabb4cc --- /dev/null +++ b/Sources/Earthquake Network/model/EQNRilevamento.h @@ -0,0 +1,24 @@ +// +// EQNRilevamento.h +// Earthquake Network +// +// Created by Luca Beretta on 19/09/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import +#import "EQNCalibrazione.h" +#import "Costanti.h" + +@interface EQNRilevamento : NSObject + +@property (nonatomic, assign) float media; +@property (nonatomic, assign) float deviazione; +@property (nonatomic, assign) float maxAssoluto; +@property (nonatomic, assign) EQNRilevamentoSoglia rilievo; +@property (nonatomic, strong) NSDate *timestamp; + + ++(void)startRilevamentoWithCalibrazione:(EQNCalibrazione *)cal result:(void(^)(EQNRilevamento *ril))rilevamento; + +@end diff --git a/Sources/Earthquake Network/model/EQNRilevamento.m b/Sources/Earthquake Network/model/EQNRilevamento.m new file mode 100644 index 0000000..5f5e45f --- /dev/null +++ b/Sources/Earthquake Network/model/EQNRilevamento.m @@ -0,0 +1,39 @@ +// +// EQNRilevamento.m +// Earthquake Network +// +// Created by Luca Beretta on 19/09/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "EQNRilevamento.h" +#import +#import "EQNMath.h" +#import "EQMAccelerometroManager.h" + +@implementation EQNRilevamento + ++(void)startRilevamentoWithCalibrazione:(EQNCalibrazione *)cal result:(void(^)(EQNRilevamento *ril))rilevamento{ + + if (!cal) + rilevamento(NULL); + + [EQMAccelerometroManager avviaLetturaAccellerometroisCal:NO withResult:^(NSArray *dati) { + + EQNRilevamento *anRilievo = [[EQNRilevamento alloc] init]; + anRilievo.media = [[EQNMath meanOf:dati] floatValue]; + anRilievo.deviazione = [[EQNMath standardDeviationOf:dati] floatValue]; + NSDictionary *rDic = [EQNMath rLimiti:dati]; + float max = [rDic[rMax] floatValue] - cal.media; + anRilievo.maxAssoluto = fabsf(max); + if (anRilievo.deviazione > SOGLIA_DEVIAZIONE_RILIEVO*cal.deviazione) + anRilievo.rilievo = positivo; + else + anRilievo.rilievo = negativo; + + anRilievo.timestamp = [NSDate date]; + rilevamento(anRilievo); + + }]; +} +@end diff --git a/Sources/Earthquake Network/model/EQNSegnalazione.h b/Sources/Earthquake Network/model/EQNSegnalazione.h new file mode 100644 index 0000000..d85a2fc --- /dev/null +++ b/Sources/Earthquake Network/model/EQNSegnalazione.h @@ -0,0 +1,25 @@ +// +// EQNSegnalazione.h +// Earthquake Network +// +// Created by Luca Beretta on 20/10/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import + +@interface EQNSegnalazione : NSObject + +@property (nonatomic, strong) NSString *address; +@property (nonatomic, strong) NSString *ban; +@property (nonatomic, strong) NSString *code; +@property (nonatomic, strong) NSDate *date; +@property (nonatomic, strong) NSString *differenceSeg; +@property (nonatomic, strong) NSNumber *latitude; +@property (nonatomic, strong) NSNumber *longitude; +@property (nonatomic, strong) NSNumber *magnitude; +@property (nonatomic, strong) NSString *msg; + +-(id)initWithInfo:(NSDictionary *)info; + +@end diff --git a/Sources/Earthquake Network/model/EQNSegnalazione.m b/Sources/Earthquake Network/model/EQNSegnalazione.m new file mode 100644 index 0000000..d7dc512 --- /dev/null +++ b/Sources/Earthquake Network/model/EQNSegnalazione.m @@ -0,0 +1,69 @@ +// +// EQNSegnalazione.m +// Earthquake Network +// +// Created by Luca Beretta on 20/10/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "EQNSegnalazione.h" +#import "EQNUtility.h" + +@implementation EQNSegnalazione + +-(id)initWithInfo:(NSDictionary *)info{ + + self = [super init]; + if(self != nil) { + _address = info[@"address"]; + _ban = info[@"ban"]; + _code = info[@"code"]; + + // NSDate *dateServer = [dataFormatter dateFromString:info[@"data"]]; + _date = [EQNUtility getDataFromString:info[@"date"]]; + _differenceSeg = info[@"difference"]; + _latitude = info[@"latitude"]; + _longitude = info[@"longitude"]; + _magnitude = info[@"magnitude"]; + _msg = info[@"msg"]; + + } + return self; + + +} + +- (void)encodeWithCoder:(NSCoder *)encoder { + //Encode properties, other class variables, etc + [encoder encodeObject:self.address forKey:@"address"]; + [encoder encodeObject:self.ban forKey:@"ban"]; + [encoder encodeObject:self.code forKey:@"code"]; + [encoder encodeObject:self.date forKey:@"date"]; + [encoder encodeObject:self.differenceSeg forKey:@"differenceSeg"]; + [encoder encodeObject:self.latitude forKey:@"latitude"]; + [encoder encodeObject:self.longitude forKey:@"longitude"]; + [encoder encodeObject:self.magnitude forKey:@"magnitude"]; + [encoder encodeObject:self.msg forKey:@"msg"]; + +} + +- (id)initWithCoder:(NSCoder *)decoder { + + if((self = [super init])) { + //decode properties, other class vars + self.address = [decoder decodeObjectForKey:@"address"]; + self.ban = [decoder decodeObjectForKey:@"ban"]; + self.code = [decoder decodeObjectForKey:@"code"]; + self.date = [decoder decodeObjectForKey:@"date"]; + self.differenceSeg = [decoder decodeObjectForKey:@"differenceSeg"]; + self.latitude = [decoder decodeObjectForKey:@"latitude"]; + self.longitude = [decoder decodeObjectForKey:@"longitude"]; + self.magnitude = [decoder decodeObjectForKey:@"magnitude"]; + self.msg = [decoder decodeObjectForKey:@"msg"]; + + } + return self; +} + + +@end diff --git a/Sources/Earthquake Network/model/EQNSisma.h b/Sources/Earthquake Network/model/EQNSisma.h new file mode 100644 index 0000000..bee97c3 --- /dev/null +++ b/Sources/Earthquake Network/model/EQNSisma.h @@ -0,0 +1,40 @@ +// +// EQNSisma.h +// Earthquake Network +// +// Created by Luca Beretta on 25/10/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import + +@interface EQNSisma : NSObject + +@property (nonatomic, strong) NSNumber *latitude; +@property (nonatomic, strong) NSNumber *longitude; +@property (nonatomic, strong) NSNumber *depth; +@property (nonatomic, strong) NSNumber *magnitude; +@property (nonatomic, strong) NSString *mt; +@property (nonatomic, strong) NSNumber *pop25; +@property (nonatomic, strong) NSNumber *pop100; +@property (nonatomic, strong) NSNumber *pop200; +@property (nonatomic, strong) NSNumber *intensity; +@property (nonatomic, strong) NSString *place; +@property (nonatomic, strong) NSString *provider; +@property (nonatomic, strong) NSString *data; +@property (nonatomic, strong) NSNumber *differenza; +@property (nonatomic, strong) NSString *wc; +@property (nonatomic, strong) NSString *ic; +@property (nonatomic, strong) NSNumber *cl; +@property (nonatomic, strong) NSNumber *ws; +@property (nonatomic, strong) NSNumber *pr; +@property (nonatomic, strong) NSNumber *hu; +@property (nonatomic, strong) NSNumber *te; +@property (nonatomic, strong) NSNumber *pc; +@property (nonatomic, strong) NSNumber *distanzaKM; + +-(id)initWithInfo:(NSDictionary *)info; + + + +@end diff --git a/Sources/Earthquake Network/model/EQNSisma.m b/Sources/Earthquake Network/model/EQNSisma.m new file mode 100644 index 0000000..fe62de9 --- /dev/null +++ b/Sources/Earthquake Network/model/EQNSisma.m @@ -0,0 +1,122 @@ +// +// EQNSisma.m +// Earthquake Network +// +// Created by Luca Beretta on 25/10/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "EQNSisma.h" +#import "EQNUser.h" +#import "EQNUtility.h" + +@implementation EQNSisma + +-(id)initWithInfo:(NSDictionary *)info{ + + self = [super init]; + if(self != nil) { + _latitude = info[@"latitude"]; + _longitude = info[@"longitude"]; + _depth = info[@"depth"]; + _magnitude = info[@"magnitude"]; + _mt = info[@"mt"]; + _pop25 = info[@"pop25"]; + _pop100 = info[@"pop100"]; + _pop200 = info[@"pop200"]; + _intensity = info[@"intensity"]; + _place = info[@"place"]; + _provider = info[@"provider"]; + + NSDateFormatter *dataFormatter = [[NSDateFormatter alloc] init]; + [dataFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; + NSDate *dateServer = [EQNUtility getDataFromString:info[@"data"]]; + NSDateFormatter *dataFormatter2 = [[NSDateFormatter alloc] init]; + [dataFormatter2 setDateFormat:@"HH:mm:ss MMM-d"]; + _data = [dataFormatter2 stringFromDate:dateServer]; + + _differenza = info[@"difference"]; + _wc = info[@"wc"]; + _ic = info[@"ic"]; + _cl = info[@"cl"]; + _ws = info[@"ws"]; + _pr = info[@"pr"]; + _hu = info[@"hu"]; + _te = info[@"te"]; + _pc = info[@"pc"]; + CLLocation *location = [[CLLocation alloc] initWithLatitude:[_latitude doubleValue] longitude:[_longitude doubleValue]]; + CLLocationDistance distance = [[EQNUser defaultUser].lastPosition distanceFromLocation:location]; + _distanzaKM = @(distance/1000); + + // distance is a double representing the distance in meters + + } + return self; + + +} + +- (void)encodeWithCoder:(NSCoder *)encoder { + //Encode properties, other class variables, etc + + [encoder encodeObject:self.latitude forKey:@"latitude"]; + [encoder encodeObject:self.longitude forKey:@"longitude"]; + [encoder encodeObject:self.depth forKey:@"depth"]; + [encoder encodeObject:self.magnitude forKey:@"magnitude"]; + [encoder encodeObject:self.mt forKey:@"mt"]; + [encoder encodeObject:self.pop25 forKey:@"pop25"]; + [encoder encodeObject:self.pop100 forKey:@"pop100"]; + [encoder encodeObject:self.pop200 forKey:@"pop200"]; + [encoder encodeObject:self.intensity forKey:@"intensity"]; + [encoder encodeObject:self.place forKey:@"place"]; + [encoder encodeObject:self.provider forKey:@"provider"]; + [encoder encodeObject:self.data forKey:@"data"]; + [encoder encodeObject:self.differenza forKey:@"difference"]; + [encoder encodeObject:self.wc forKey:@"wc"]; + [encoder encodeObject:self.ic forKey:@"ic"]; + [encoder encodeObject:self.cl forKey:@"cl"]; + [encoder encodeObject:self.ws forKey:@"ws"]; + [encoder encodeObject:self.pr forKey:@"pr"]; + [encoder encodeObject:self.hu forKey:@"hu"]; + [encoder encodeObject:self.te forKey:@"te"]; + [encoder encodeObject:self.pc forKey:@"pc"]; + [encoder encodeObject:self.differenza forKey:@"differenza"]; + + +} + +- (id)initWithCoder:(NSCoder *)decoder { + + if((self = [super init])) { + //decode properties, other class vars + self.latitude = [decoder decodeObjectForKey:@"latitude"]; + self.longitude = [decoder decodeObjectForKey:@"longitude"]; + self.depth = [decoder decodeObjectForKey:@"depth"]; + self.magnitude = [decoder decodeObjectForKey:@"magnitude"]; + self.mt = [decoder decodeObjectForKey:@"mt"]; + self.pop25 = [decoder decodeObjectForKey:@"pop25"]; + self.pop100 = [decoder decodeObjectForKey:@"pop100"]; + self.pop200 = [decoder decodeObjectForKey:@"pop200"]; + self.intensity = [decoder decodeObjectForKey:@"intensity"]; + self.place = [decoder decodeObjectForKey:@"intensity"]; + self.provider = [decoder decodeObjectForKey:@"provider"]; + self.data = [decoder decodeObjectForKey:@"data"]; + self.differenza = [decoder decodeObjectForKey:@"differenza"]; + self.wc = [decoder decodeObjectForKey:@"wc"]; + self.ic = [decoder decodeObjectForKey:@"ic"]; + self.cl = [decoder decodeObjectForKey:@"cl"]; + self.ws = [decoder decodeObjectForKey:@"ws"]; + self.pr = [decoder decodeObjectForKey:@"pr"]; + self.hu = [decoder decodeObjectForKey:@"hu"]; + self.te = [decoder decodeObjectForKey:@"te"]; + self.pc = [decoder decodeObjectForKey:@"pc"]; + self.te = [decoder decodeObjectForKey:@"te"]; + self.differenza = [decoder decodeObjectForKey:@"difference"]; + + } + return self; +} + + + +@end diff --git a/Sources/Earthquake Network/model/EQNUser.h b/Sources/Earthquake Network/model/EQNUser.h new file mode 100644 index 0000000..0c467bb --- /dev/null +++ b/Sources/Earthquake Network/model/EQNUser.h @@ -0,0 +1,26 @@ +// +// EQNUser.h +// Earthquake Network +// +// Created by Luca Beretta on 20/09/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import +#import + +@interface EQNUser : NSObject + +@property (nonatomic, strong) NSString *tokenUser; +@property (nonatomic, strong) NSString *user_ID; +@property (nonatomic, strong) CLLocation *lastPosition; +@property (nonatomic, assign) CLLocationDistance distanza; +@property (nonatomic, assign) BOOL monitorOn; +@property (nonatomic, assign) BOOL inCarica; +@property (nonatomic, assign) BOOL registrato; + ++(EQNUser *)defaultUser; +-(void)inviaPosizioneServer; +-(void)saveUserInfo; +-(void)removeUser; +@end diff --git a/Sources/Earthquake Network/model/EQNUser.m b/Sources/Earthquake Network/model/EQNUser.m new file mode 100644 index 0000000..322f5da --- /dev/null +++ b/Sources/Earthquake Network/model/EQNUser.m @@ -0,0 +1,155 @@ +// +// EQNUser.m +// Earthquake Network +// +// Created by Luca Beretta on 20/09/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "EQNUser.h" +#import "Costanti.h" +#import +#import "EQMAccelerometroManager.h" +#import "ServerRequest.h" +#import "EQNGeneratoreURLServer.h" +#import "EQNUtility.h" +#import "EQNManager.h" + +//#import + +@implementation EQNUser +static EQNUser *_sharedInstance = nil; + + ++(EQNUser *)defaultUser{ + + static EQNUser *instance = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + instance = [[self alloc]init]; + [instance initSingleton]; + }); + return instance; +} + +-(void)initSingleton{ + + + self.tokenUser = [[NSUserDefaults standardUserDefaults] objectForKey:TOKEN_USER]; + self.user_ID = [[NSUserDefaults standardUserDefaults] objectForKey:USER_ID]; + + NSArray *lastPosArray = [EQNUtility readArrayWithCustomObjFromUserDefaults:LAST_LOCATION]; + if (lastPosArray.count > 0) + self.lastPosition = [lastPosArray lastObject]; + + self.registrato = NO; + if (self.user_ID) + self.registrato = YES; + + [[EQMAccelerometroManager sharedInstance] addObserver:(id)self + forKeyPath:@"currentLocation" + options:NSKeyValueObservingOptionNew + context:nil]; + + [[EQMAccelerometroManager sharedInstance] startUpdatingLocationBackground]; + // [self registerforDeviceLockNotif]; + +} + +-(void)saveUserInfo{ + [[NSUserDefaults standardUserDefaults] setObject:self.tokenUser forKey:TOKEN_USER]; + [[NSUserDefaults standardUserDefaults] setObject:self.user_ID forKey:USER_ID]; + NSArray *lastPosiArray = @[self.lastPosition]; + [EQNUtility writeArrayWithCustomObjToUserDefaults:LAST_LOCATION withArray:lastPosiArray]; + + + +} + +-(void)removeUser{ + + [[NSUserDefaults standardUserDefaults] removeObjectForKey:TOKEN_USER]; + [[NSUserDefaults standardUserDefaults] removeObjectForKey:USER_ID]; + [[NSUserDefaults standardUserDefaults] removeObjectForKey:LAST_LOCATION]; + [[NSUserDefaults standardUserDefaults] synchronize]; + self.tokenUser = nil; +} + +/* +-(void)writeArrayWithCustomObjToUserDefaults:(NSString *)keyName withArray:(NSArray *)myArray +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSData *data = [NSKeyedArchiver archivedDataWithRootObject:myArray]; + [defaults setObject:data forKey:keyName]; + [defaults synchronize]; + [[NSUserDefaults standardUserDefaults] synchronize]; + +} + +-(NSArray *)readArrayWithCustomObjFromUserDefaults:(NSString*)keyName +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSData *data = [defaults objectForKey:keyName]; + NSArray *myArray = [NSKeyedUnarchiver unarchiveObjectWithData:data]; + [defaults synchronize]; + return myArray; +} +*/ +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context +{ + if([keyPath isEqualToString:@"currentLocation"]) { + // do some stuff + if (self.lastPosition) { + self.distanza = [self.lastPosition distanceFromLocation:[EQMAccelerometroManager sharedInstance].currentLocation]; + } + self.lastPosition = [EQMAccelerometroManager sharedInstance].currentLocation; + [self verificaRegistrazione]; + + if (![EQNManager defaultManager].isBackground) + [[EQMAccelerometroManager sharedInstance] stopUpdatingLocation]; + + + } +} + +-(void)verificaRegistrazione{ + + if (!self.user_ID && self.tokenUser) + [self inviaregistrazioneServer:self.tokenUser withPosition:self.lastPosition]; + + else + [self inviaPosizioneServer]; + +} + +-(void)inviaregistrazioneServer:(NSString *)token withPosition:(CLLocation *)location{ + + [[ServerRequest defaultServerConnectionSingleton] inviaInformazioniAlServerWithURL:[EQNGeneratoreURLServer urlRegistrazione] richiesta:registrazione success:^(id result) { + + self.user_ID = (NSString *)result; + [self saveUserInfo]; + + } failure:^(NSError *errore) { + + NSLog(@"USER_ID Error %@", errore); + + + }]; + +} +-(void)inviaPosizioneServer{ + + NSLog(@"URLPosizione %@", [EQNGeneratoreURLServer urlPosizione]); + + [[ServerRequest defaultServerConnectionSingleton] inviaInformazioniAlServerWithURL:[EQNGeneratoreURLServer urlPosizione] richiesta:posizione success:^(id result) { + + NSLog(@"inviato"); + + } failure:^(NSError *errore) { + + + }]; + +} + +@end diff --git a/Sources/Earthquake Network/model/EQNUtility.h b/Sources/Earthquake Network/model/EQNUtility.h new file mode 100644 index 0000000..d2a03a8 --- /dev/null +++ b/Sources/Earthquake Network/model/EQNUtility.h @@ -0,0 +1,40 @@ +// +// EQNUtility.h +// Earthquake Network +// +// Created by Luca Beretta on 02/11/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import +#import +#import "Costanti.h" +#import "MasterViewController.h" +@import GoogleMobileAds; + +@interface EQNUtility : NSObject + ++(NSDate *)getDataFromString:(NSString *)stringData; ++(NSArray *)applicaFiltroWithTime:(EQNFiltriMappa )filtro withList:(NSArray *)list; ++(NSArray *)getButtonForControllerTipe:(EQNController )filtro withController:(MasterViewController *)controller; ++(void)writeArrayWithCustomObjToUserDefaults:(NSString *)keyName withArray:(NSArray *)myArray; ++(void)writeArrayWithCustomObjToUserDefaults:(NSString *)keyName withDict:(NSDictionary *)myDict; ++(NSArray *)readArrayWithCustomObjFromUserDefaults:(NSString*)keyName; ++(NSDictionary *)readDictyWithCustomObjFromUserDefaults:(NSString*)keyName; ++(void)saveCustomObject:(id)object key:(NSString *)key; ++(id )loadCustomObjectWithKey:(NSString *)key; ++(NSString *)clearStringMessaggi:(NSString *)messaggio; ++(NSInteger )getDifferenceMinute:(NSDate *)date; ++(NSArray *)arrayRaggioSismi; ++(NSArray *)arrayEnti; ++(NSArray *)arrayMessaggiTsunami; ++(NSArray *)arrayAreeInteresseTsunami; ++(NSArray *)arrayNazioni; ++(NSArray *)arrayRetisismicheFiltrate:(NSArray *)list; ++(UIViewController *)shareFileWithPath:(id)path; ++(NSArray *)arrayDescrizioneEnti; + ++(GADBannerView *)ottieniBannerWithController:(UIViewController *)controller position:(BOOL)isButton; + + +@end diff --git a/Sources/Earthquake Network/model/EQNUtility.m b/Sources/Earthquake Network/model/EQNUtility.m new file mode 100644 index 0000000..c9de5fb --- /dev/null +++ b/Sources/Earthquake Network/model/EQNUtility.m @@ -0,0 +1,447 @@ +// +// EQNUtility.m +// Earthquake Network +// +// Created by Luca Beretta on 02/11/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "EQNUtility.h" +#import "EQNSegnalazione.h" +#import "EQNSegnalazione.h" +#import "EQNPastquakes.h" +#import "MasterViewController.h" +#import "EQNSisma.h" +#import "FiltroEnti.h" + +@implementation EQNUtility + ++(NSDate *)getDataFromString:(NSString *)stringData{ + + NSDateFormatter *dataFormatter = [[NSDateFormatter alloc] init]; + [dataFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; + return [dataFormatter dateFromString:stringData]; +} + ++(NSDate *)impostaFiltroWithTime:(EQNFiltriMappa )filtro{ + + unsigned unitFlags = NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitDay | NSCalendarUnitHour | NSCalendarUnitMinute; + + NSDate *now = [NSDate date]; + NSCalendar *gregorian = [NSCalendar currentCalendar]; + NSDateComponents *comps = [gregorian components:unitFlags fromDate:now]; + switch (filtro) { + case unAnno: + [comps setYear:[comps year] - 1]; + break; + case unMese: + [comps setMonth:[comps month] - 1]; + break; + case unaSettimana: + [comps setDay:[comps day] - 7]; + break; + case unGiorno: + [comps setDay:[comps day] - 1]; + break; + case dodiciOre: + [comps setHour:[comps hour] - 10]; + break; + case dueOre: + [comps setHour:[comps hour] - 2]; + break; + case unOra: + [comps setHour:[comps hour] - 1]; + break; + case dieciMinuti: + [comps setMinute:[comps minute] - 10]; + break; + default: + break; + + } + return [gregorian dateFromComponents:comps]; + +} + ++(NSArray *)applicaFiltroWithTime:(EQNFiltriMappa )filtro withList:(NSArray *)list { + + NSDate *date = [self impostaFiltroWithTime:filtro]; + NSMutableArray *temp = [NSMutableArray array]; + + for (id object in list) { + if ([object isKindOfClass:[EQNPastquakes class]]) { + EQNPastquakes *anPasq = (EQNPastquakes *)object; + if ([anPasq.date compare:date] == NSOrderedDescending) { + [temp addObject:anPasq]; + NSLog(@"\n\naggiunto %@ filtro %@", anPasq.date, date); + + } + else{ + + NSLog(@"\n\nNon aggiunto %@ filtro %@", anPasq.date, date); + + } + } else if ([object isKindOfClass:[EQNSegnalazione class]]){ + + EQNSegnalazione *anSegn = (EQNSegnalazione *)object; + if ([anSegn.date compare:date] == NSOrderedDescending) { + [temp addObject:anSegn]; + NSLog(@"\n\naggiunto %@ filtro %@", anSegn.date, date); + + } + else{ + + NSLog(@"\n\nNon aggiunto %@ filtro %@", anSegn.date, date); + + } + } + } + + NSLog(@"filtrati %lu tutti %lu", (unsigned long)temp.count, (unsigned long)list.count); + return temp; +} + ++(NSArray *)getButtonForControllerTipe:(EQNController )filtro withController:(MasterViewController *)controller{ + + switch (filtro) { + case reteSismicaController: + return [self reteSismicaControllerWithController:controller]; + break; + case tsunamiControler: + return [self tsunamiControllerWithController:controller]; + break; + case reteSmartphoneController: + return [self reteSmartphoneControllerWithController:controller]; + break; + default: + return [self defaultControllerWithController:controller]; + + break; + } + return nil; + +} + ++(NSArray *)defaultControllerWithController:(MasterViewController *)controller{ + + UIBarButtonItem *item1 = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"clock"] + style:UIBarButtonItemStyleDone + target:controller + action:@selector(clock)]; + + UIBarButtonItem *item3 = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"heart"] + style:UIBarButtonItemStyleDone + target:controller + action:@selector(heart)]; + + UIBarButtonItem *item2 = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"ic_action_settings"] + style:UIBarButtonItemStyleDone + target:controller + action:@selector(apriImpostazioni)]; + + return @[item1, item2 , item3]; + +} + ++(NSArray *)reteSismicaControllerWithController:(MasterViewController *)controller{ + + UIBarButtonItem *item1 = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"ic_filter_grey600_24dp"] + style:UIBarButtonItemStyleDone + target:controller + action:@selector(apriManu)]; + + UIBarButtonItem *item2 = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"if_sync"] + style:UIBarButtonItemStyleDone + target:controller + action:@selector(sincronizza)]; + + UIBarButtonItem *item3 = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"ic_action_settings"] + style:UIBarButtonItemStyleDone + target:controller + action:@selector(apriImpostazioni)]; + + return @[item1, item2, item3]; + +} + ++(NSArray *)tsunamiControllerWithController:(MasterViewController *)controller{ + + + UIBarButtonItem *item2 = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"if_sync"] + style:UIBarButtonItemStyleDone + target:controller + action:@selector(sincronizza)]; + + + return @[item2]; + +} + ++(NSArray *)reteSmartphoneControllerWithController:(MasterViewController *)controller{ + + + UIBarButtonItem *item2 = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"if_sync"] + style:UIBarButtonItemStyleDone + target:controller + action:@selector(sincronizza)]; + + + /* UIBarButtonItem *item3 = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"heart"] + style:UIBarButtonItemStyleDone + target:controller + action:@selector(heart)];*/ + + + return @[item2/*, item3*/]; + +} + ++(NSArray *)arrayNazioni{ + + return @[NSLocalizedString(@"Mondo", @""), NSLocalizedString(@"Italia", @""), NSLocalizedString(@"Spagna" , @""), NSLocalizedString(@"Cina", @""), NSLocalizedString(@"Giappone", @""), NSLocalizedString(@"Nicaragua", @""),NSLocalizedString(@"Messico", @""),NSLocalizedString(@"Colombia", @""),NSLocalizedString(@"Costa Rica", @""),NSLocalizedString(@"Chile", @""),NSLocalizedString(@"Venezuela", @""),NSLocalizedString(@"Nuova Zelanda", @""),NSLocalizedString(@"Argentina", @""),NSLocalizedString(@"Equador", @""),NSLocalizedString(@"Filippine", @""),NSLocalizedString(@"Perù", @""), NSLocalizedString(@"Repubblica Domenicana", @""), NSLocalizedString(@"Altro", @"")]; + +} ++(NSArray *)arrayRetisismicheFiltrate:(NSArray *)list{ + + NSArray *filtrato = [NSArray arrayWithArray:list]; + + switch ([[NSUserDefaults standardUserDefaults] integerForKey:IMPOSTAZIONE_TIPO_FILTRO_RETI_SISMICHEI]) { + case nazione:{ + + NSArray *dato = [self arrayEnti]; + if ([[NSUserDefaults standardUserDefaults] integerForKey:IMPOSTAZIONE_NAZIONE_RETI_SISMICHEI]) { + NSString *pr = dato[[[NSUserDefaults standardUserDefaults] integerForKey:IMPOSTAZIONE_NAZIONE_RETI_SISMICHEI]]; + + NSPredicate *predicate = [NSPredicate predicateWithFormat:@"provider = %@", pr]; + NSLog(@"pr %@", predicate); + filtrato = [list filteredArrayUsingPredicate:predicate]; + + // return filtrato; + + } + } + break; + case enti:{ + + NSMutableArray *arrayfiltro = [NSMutableArray array]; + for (NSString *ente in [[NSUserDefaults standardUserDefaults] objectForKey:IMPOSTAZIONE_ENTI_RETI_SISMICHEI]) { + for (EQNSisma *sisma in filtrato) { + if ([sisma.provider isEqualToString:ente]) { + [arrayfiltro addObject:sisma]; + } + } + } + + filtrato = [arrayfiltro filteredArrayUsingPredicate:[FiltroEnti defaultFiltro].getPredicateWithFilter]; + + } + break; + default: + break; + } + + filtrato = [filtrato filteredArrayUsingPredicate:[FiltroEnti defaultFiltro].getPredicateWithFilter]; + return filtrato; + +} + + ++(void)writeArrayWithCustomObjToUserDefaults:(NSString *)keyName withArray:(NSArray *)myArray +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSData *data = [NSKeyedArchiver archivedDataWithRootObject:myArray]; + [defaults setObject:data forKey:keyName]; + [defaults synchronize]; + [[NSUserDefaults standardUserDefaults] synchronize]; + +} + ++(NSArray *)readArrayWithCustomObjFromUserDefaults:(NSString*)keyName +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSData *data = [defaults objectForKey:keyName]; + NSArray *myArray = [NSKeyedUnarchiver unarchiveObjectWithData:data]; + [defaults synchronize]; + return myArray; +} ++(void)writeArrayWithCustomObjToUserDefaults:(NSString *)keyName withDict:(NSDictionary *)myDict +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSData *data = [NSKeyedArchiver archivedDataWithRootObject:myDict]; + [defaults setObject:data forKey:keyName]; + [defaults synchronize]; + [[NSUserDefaults standardUserDefaults] synchronize]; + +} + ++(NSDictionary *)readDictyWithCustomObjFromUserDefaults:(NSString*)keyName +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSData *data = [defaults objectForKey:keyName]; + NSDictionary *myDict = [NSKeyedUnarchiver unarchiveObjectWithData:data]; + [defaults synchronize]; + return myDict; +} ++ (void)saveCustomObject:(id)object key:(NSString *)key { + NSData *encodedObject = [NSKeyedArchiver archivedDataWithRootObject:object]; + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + [defaults setObject:encodedObject forKey:key]; + [defaults synchronize]; + +} + ++ (id )loadCustomObjectWithKey:(NSString *)key { + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSData *encodedObject = [defaults objectForKey:key]; + id object = [NSKeyedUnarchiver unarchiveObjectWithData:encodedObject]; + return object; + +} + + ++(NSString *)clearStringMessaggi:(NSString *)messaggio{ + + NSString *clearString = [messaggio stringByReplacingOccurrencesOfString:@" " withString:@""]; + clearString = [clearString stringByReplacingOccurrencesOfString:@"[" withString:@""]; + clearString = [clearString stringByReplacingOccurrencesOfString:@"]" withString:@""]; + clearString = [clearString stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + clearString = [clearString stringByReplacingOccurrencesOfString:@"<" withString:@""]; + clearString = [clearString stringByReplacingOccurrencesOfString:@">" withString:@""]; + clearString = [clearString stringByReplacingOccurrencesOfString:@"/" withString:@""]; + clearString = [clearString stringByReplacingOccurrencesOfString:@"span" withString:@""]; + + return clearString; + +} + ++(NSInteger )getDifferenceMinute:(NSDate *)date{ + + NSDate *now = [NSDate date]; + NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; + NSDateComponents *components = [calendar components:NSCalendarUnitMinute + fromDate:date + toDate:now + options:0]; + + return components.minute; + +} + ++(NSArray *)arrayRaggioSismi{ + + return [NSArray arrayWithObjects:@"200", @"300", @"400", @"500", @"600", @"800", @"1000", @"2000", @"3000", @"4000", NSLocalizedString(@"Qualsiasi distanza", @"voce elenco raggio sismi"), nil]; + +} + ++(NSArray *)arrayEnti{ + + return @[@"USGS", @"INGV", @"IGN", @"CSI", @"JMA", @"Ineter", @"SSN", @"SGC", @"RSN", @"CSN", @"FUNVISIS", @"GeoNet", @"INPRES", @"IGEPN", @"PHIVOLCS", @"IGP", @"UASD", @"EMSC" ]; +} + ++(NSArray *)arrayDescrizioneEnti{ + + return @[NSLocalizedString(@"Globale", @"USGS"), + NSLocalizedString(@"Italia", @"INGV"), + NSLocalizedString(@"Spagna", @"IGN"), + NSLocalizedString(@"Cina", @"CSI"), + NSLocalizedString(@"Giappone", @"JMA"), + NSLocalizedString(@"Nicaragua", @"Ineter"), + NSLocalizedString(@"Messico",@"SSN"), + NSLocalizedString(@"Colombia",@"SGC"), + NSLocalizedString(@"Costa Rica",@"RSN"), + NSLocalizedString(@"Cile",@"CSN"), + NSLocalizedString(@"Venezuela",@"FUNVISIS"), + NSLocalizedString(@"Nuova Zelanda",@"GeoNet"), + NSLocalizedString(@"Argentina",@"INPRES"), + NSLocalizedString(@"Ecuador",@"IGEPN"), + NSLocalizedString(@"Filippine",@"PHIVOLCS"), + NSLocalizedString(@"Perù",@"IGP"), + NSLocalizedString(@"Repubblica Dominicana",@"UASD"), + NSLocalizedString(@"Globale",@"EMSC") ]; +} + ++(NSArray *)arrayMessaggiTsunami{ + + return @[NSLocalizedString(@"Messaggio informativo", @"voce elenco messaggio tsunami"), NSLocalizedString(@"Valutazione Tsunami", @"voce elenco messaggio tsunami"), NSLocalizedString(@"Supplemento di valutazione", @"voce elenco messaggio tsunami"), NSLocalizedString(@"Valutazione cancellata", @"voce elenco messaggio tsunami"), NSLocalizedString(@"Allerta Tsunami", @"voce elenco messaggio tsunami"), NSLocalizedString(@"Supplemento di allerta", @"voce elenco messaggio tsunami"), NSLocalizedString(@"Allerta cancellata", @"voce elenco messaggio tsunami"), NSLocalizedString(@"Pericolo tsunami", @"voce elenco messaggio tsunami"), NSLocalizedString(@"Pericolo cessato", @"voce elenco messaggio tsunami")]; +} ++(NSArray *)arrayAreeInteresseTsunami{ + + return @[NSLocalizedString(@"Mar dei Caraibi", @"voce elenco aree tsunami"), NSLocalizedString(@"Oceano Pacifico", @"voce elenco aree tsunami"), NSLocalizedString(@"Isole Hawaii", @"voce elenco aree tsunami")]; + +} + ++(GADBannerView *)ottieniBannerWithController:(UIViewController *)controller position:(BOOL)isButton{ + + if([[NSUserDefaults standardUserDefaults] objectForKey:AQUISTO_PRO] || [[NSUserDefaults standardUserDefaults] objectForKey:AQUISTO_PRO_SCONTATO]){ + [[NSUserDefaults standardUserDefaults] setBool:TRUE forKey:EQN_ACQ_IN_APP]; + [[NSUserDefaults standardUserDefaults] synchronize]; + + return nil; + } + + GADBannerView *bannerView = [[GADBannerView alloc] + initWithAdSize:kGADAdSizeBanner]; + bannerView.adUnitID = EQN_ADMOB_ANNUNCIO_IDA; + bannerView.rootViewController = controller; + bannerView.backgroundColor = [UIColor whiteColor]; + [bannerView loadRequest:[GADRequest request]]; + [self addBannerViewToView:bannerView withController:controller position:isButton]; + + return bannerView; +} + ++ (void)addBannerViewToView:(UIView *)bannerView withController:(UIViewController *)controller position:(BOOL)isButton { + bannerView.translatesAutoresizingMaskIntoConstraints = NO; + [controller.view addSubview:bannerView]; + + + if (isButton){ + [controller.view addConstraints:@[ + [NSLayoutConstraint constraintWithItem:bannerView + attribute:NSLayoutAttributeBottom + relatedBy:NSLayoutRelationEqual + toItem:controller.bottomLayoutGuide + attribute:NSLayoutAttributeTop + multiplier:1 + constant:0], + [NSLayoutConstraint constraintWithItem:bannerView + attribute:NSLayoutAttributeCenterX + relatedBy:NSLayoutRelationEqual + toItem:controller.view + attribute:NSLayoutAttributeCenterX + multiplier:1 + constant:0] + ]]; + + + + }else{ + [controller.view addConstraints:@[ + [NSLayoutConstraint constraintWithItem:bannerView + attribute:NSLayoutAttributeTop + relatedBy:NSLayoutRelationEqual + toItem:controller.topLayoutGuide + attribute:NSLayoutAttributeTop + multiplier:1 + constant:0], + [NSLayoutConstraint constraintWithItem:bannerView + attribute:NSLayoutAttributeCenterX + relatedBy:NSLayoutRelationEqual + toItem:controller.view + attribute:NSLayoutAttributeCenterX + multiplier:1 + constant:0] + ]]; + } +} + ++(UIViewController *)shareFileWithPath:(id )path{ + + NSArray* dataToShare = @[path]; + UIActivityViewController* activityViewController =[[UIActivityViewController alloc] initWithActivityItems:dataToShare applicationActivities:nil]; + activityViewController.excludedActivityTypes = @[UIActivityTypeAirDrop]; + + return activityViewController; +} + +@end diff --git a/Sources/Earthquake Network/model/FiltroEnti.h b/Sources/Earthquake Network/model/FiltroEnti.h new file mode 100644 index 0000000..7e459f7 --- /dev/null +++ b/Sources/Earthquake Network/model/FiltroEnti.h @@ -0,0 +1,25 @@ +// +// FiltroEnti.h +// Earthquake Network +// +// Created by Luca Beretta on 09/03/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface FiltroEnti : NSObject + +@property (nonatomic, strong) NSString *magnitudoMinima; +@property (nonatomic, strong) NSString *distanzaMassima; +@property (nonatomic, strong) NSString *etaMassima; +@property (nonatomic, strong) NSString *sismiForti; + ++(FiltroEnti *)defaultFiltro; +-(void)saveFiltro; +-(NSPredicate *)getPredicateWithFilter; +@end + +NS_ASSUME_NONNULL_END diff --git a/Sources/Earthquake Network/model/FiltroEnti.m b/Sources/Earthquake Network/model/FiltroEnti.m new file mode 100644 index 0000000..2fd9b58 --- /dev/null +++ b/Sources/Earthquake Network/model/FiltroEnti.m @@ -0,0 +1,92 @@ +// +// FiltroEnti.m +// Earthquake Network +// +// Created by Luca Beretta on 09/03/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import "FiltroEnti.h" +#import "costanti.h" + +@implementation FiltroEnti + +static FiltroEnti *_sharedInstance = nil; + + ++(FiltroEnti *)defaultFiltro{ + + static FiltroEnti *instance = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + instance = [[self alloc]init]; + [instance initSingleton]; + }); + return instance; +} + +-(void)initSingleton{ + + self.magnitudoMinima = [[NSUserDefaults standardUserDefaults] objectForKey:EQN_MAGNITUDO_MINIMA]; + if (!self.magnitudoMinima) + self.magnitudoMinima = @"2.0"; + self.distanzaMassima = [[NSUserDefaults standardUserDefaults] objectForKey:EQN_DISTANZA_MASSIMA]; + if (!self.distanzaMassima) + self.distanzaMassima = NSLocalizedString(@"Qualsiasi distanza", @""); + self.etaMassima = [[NSUserDefaults standardUserDefaults] objectForKey:EQN_ETA_MASSIMA]; + if (!self.etaMassima) + self.etaMassima = NSLocalizedString(@"Un giorno", @""); + self.sismiForti = [[NSUserDefaults standardUserDefaults] objectForKey:EQN_SISMI_FORTI]; + if (!self.sismiForti) + self.sismiForti = @"5.5"; +} + +-(void)saveFiltro; +{ + [[NSUserDefaults standardUserDefaults] setObject:self.magnitudoMinima forKey:EQN_MAGNITUDO_MINIMA]; + [[NSUserDefaults standardUserDefaults] setObject:self.distanzaMassima forKey:EQN_DISTANZA_MASSIMA]; + [[NSUserDefaults standardUserDefaults] setObject:self.etaMassima forKey:EQN_ETA_MASSIMA]; + [[NSUserDefaults standardUserDefaults] setObject:self.sismiForti forKey:EQN_SISMI_FORTI]; +} + +-(NSPredicate *)getPredicateWithFilter{ + + NSString * predicateFormat = [NSString stringWithFormat:@"(SELF.magnitude.doubleValue >= %f)", self.magnitudoMinima.doubleValue]; + + if (![self.distanzaMassima isEqualToString:NSLocalizedString(@"Qualsiasi distanza", @"")]) { + + predicateFormat = [predicateFormat stringByAppendingString:[NSString stringWithFormat:@"&&(SELF.distanzaKM.doubleValue <= %f)", self.distanzaMassima.doubleValue]]; + } + if ([self.etaMassima isEqualToString:NSLocalizedString(@"Un giorno", @"")]) { + + predicateFormat = [predicateFormat stringByAppendingString:[NSString stringWithFormat:@"&&(SELF.differenza.doubleValue <= %f)", 24.0*60.0]]; + } + if ([self.etaMassima isEqualToString:NSLocalizedString(@"Dodici ore", @"")]) { + + predicateFormat = [predicateFormat stringByAppendingString:[NSString stringWithFormat:@"&&(SELF.differenza.doubleValue <= %f)", 12.0*60.0]]; + } + if ([self.etaMassima isEqualToString:NSLocalizedString(@"Sei ore", @"")]) { + + predicateFormat = [predicateFormat stringByAppendingString:[NSString stringWithFormat:@"&&(SELF.differenza.doubleValue <= %f)", 6.0*60.0]]; + } + if ([self.etaMassima isEqualToString:NSLocalizedString(@"Due ore", @"")]) { + + predicateFormat = [predicateFormat stringByAppendingString:[NSString stringWithFormat:@"&&(SELF.differenza.doubleValue <= %f)", 2*60.0]]; + } + if ([self.etaMassima isEqualToString:NSLocalizedString(@"Un ora", @"")]) { + + predicateFormat = [predicateFormat stringByAppendingString:[NSString stringWithFormat:@"&&(SELF.differenza.doubleValue <= %f)", 60.0]]; + } + if ([self.etaMassima isEqualToString:NSLocalizedString(@"Dieci minuti", @"")]) { + + predicateFormat = [predicateFormat stringByAppendingString:[NSString stringWithFormat:@"&&(SELF.differenza.doubleValue <= %f)", 10.0]]; + } + + predicateFormat = [predicateFormat stringByAppendingString:[NSString stringWithFormat:@"||(SELF.magnitude.doubleValue >= %f)", self.sismiForti.doubleValue]]; + + NSPredicate * magnitudo = [NSPredicate predicateWithFormat: predicateFormat]; + + return magnitudo; + +} +@end diff --git a/Sources/Earthquake Network/model/Tsunami.h b/Sources/Earthquake Network/model/Tsunami.h new file mode 100644 index 0000000..d157124 --- /dev/null +++ b/Sources/Earthquake Network/model/Tsunami.h @@ -0,0 +1,23 @@ +// +// Tsunami.h +// Earthquake Network +// +// Created by Luca Beretta on 12/11/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import + +@interface Tsunami : NSObject + +@property (nonatomic, strong) NSNumber *Id; +@property (nonatomic, strong) NSString *color; +@property (nonatomic, strong) NSString *date; +@property (nonatomic, strong) NSURL *link; +@property (nonatomic, strong) NSString *message; +@property (nonatomic, strong) NSString *receiver; +@property (nonatomic, strong) NSString *differenza; + +-(id)initWithInfo:(NSDictionary *)info; +-(void)setMessage:(NSString *)message; +@end diff --git a/Sources/Earthquake Network/model/Tsunami.m b/Sources/Earthquake Network/model/Tsunami.m new file mode 100644 index 0000000..5842cb9 --- /dev/null +++ b/Sources/Earthquake Network/model/Tsunami.m @@ -0,0 +1,144 @@ +// +// Tsunami.m +// Earthquake Network +// +// Created by Luca Beretta on 12/11/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "Tsunami.h" +#import "EQNUtility.h" + +@implementation Tsunami + +-(id)initWithInfo:(NSDictionary *)info{ + + self = [super init]; + if(self != nil) { + + _Id = info[@"ID"]; + _color = info[@"color"]; + // _date = [EQNUtility getDataFromString:info[@"date"]]; + NSDateFormatter *dataFormatter = [[NSDateFormatter alloc] init]; + [dataFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; + NSDate *dateServer = [EQNUtility getDataFromString:info[@"date"]]; + NSDateFormatter *dataFormatter2 = [[NSDateFormatter alloc] init]; + [dataFormatter2 setDateFormat:@"HH:mm:ss MMM-d"]; + _date = [dataFormatter2 stringFromDate:dateServer]; + + + _link = [NSURL URLWithString:info[@"link"]]; + [self setMessage:info[@"message_type"]]; + _receiver = info[@"receiver"]; + NSInteger minuti = [EQNUtility getDifferenceMinute:dateServer]; + if (minuti >= 1488) { + int giorni = (int)minuti/1488; + _differenza = [NSString stringWithFormat:@"%i %@", giorni, NSLocalizedString(@"giorni fa", @"")]; + + }else if(minuti >= 60){ + + int ore = (int)minuti/60; + + if (minuti == 60) + _differenza = [NSString stringWithFormat:@"%i %@", ore, NSLocalizedString(@"ora fa", @"")]; + else + _differenza = [NSString stringWithFormat:@"%i %@", ore, NSLocalizedString(@"ore fa", @"")]; + + }else{ + + if (minuti == 1) + _differenza = [NSString stringWithFormat:@"%li %@", (long)minuti, NSLocalizedString(@"minuto fa", @"")]; + else + _differenza = [NSString stringWithFormat:@"%li %@", (long)minuti, NSLocalizedString(@"minuti fa", @"")]; + } + } + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)encoder { + //Encode properties, other class variables, etc + [encoder encodeObject:self.Id forKey:@"Id"]; + [encoder encodeObject:self.color forKey:@"color"]; + [encoder encodeObject:self.date forKey:@"date"]; + [encoder encodeObject:self.link forKey:@"link"]; + [encoder encodeObject:self.message forKey:@"message"]; + [encoder encodeObject:self.receiver forKey:@"receiver"]; + [encoder encodeObject:self.differenza forKey:@"differenza"]; + +} + +- (id)initWithCoder:(NSCoder *)decoder { + if((self = [super init])) { + //decode properties, other class vars + self.Id = [decoder decodeObjectForKey:@"Id"]; + self.color = [decoder decodeObjectForKey:@"color"]; + self.date = [decoder decodeObjectForKey:@"date"]; + self.link = [decoder decodeObjectForKey:@"link"]; + self.message = [decoder decodeObjectForKey:@"message"]; + self.receiver = [decoder decodeObjectForKey:@"receiver"]; + self.differenza = [decoder decodeObjectForKey:@"differenza"]; + + } + return self; +} + + +-(void)setMessage:(NSString *)message{ + + BOOL warning = false; + BOOL watch = false; + BOOL threat = false; + BOOL threatFinal = false; + BOOL cancellation = false; + BOOL information = false; + BOOL supplement = false; + + + if ([message.lowercaseString containsString:@"warning"]) + warning = YES; + if ([message.lowercaseString containsString:@"watch"]) + watch = YES; + if ([message.lowercaseString containsString:@"threat"]) + threat = YES; + if ([message.lowercaseString containsString:@"final"]) + threatFinal = YES; + if ([message.lowercaseString containsString:@"cancellation"]) + cancellation = YES; + if ([message.lowercaseString containsString:@"information"]) + information = YES; + if ([message.lowercaseString containsString:@"supplement"]) + supplement = YES; + + if (warning){ + if (supplement) + _message = NSLocalizedString(@"Supplemento di allerta", @""); + else if(cancellation) + _message = NSLocalizedString(@"Allerta cancellata", @""); + else + _message = NSLocalizedString(@"Allerta Tsunami", @""); + } + else if (watch){ + if (supplement) + _message = NSLocalizedString(@"Supplemento di valutazione", @""); + else if(cancellation) + _message = NSLocalizedString(@"Valutazione cancellata", @""); + else + _message = NSLocalizedString(@"Valutazione Tsunami", @""); + } + + else if (threat){ + if (threatFinal) + _message = NSLocalizedString(@"Pericolo cessato", @""); + else + _message = NSLocalizedString(@"Pericolo tsunami", @""); + } + else if (information){ + _message = NSLocalizedString(@"Messaggio informativo", @""); + } + else if (supplement){ + _message = NSLocalizedString(@"Messaggio supplementare", @""); + } +} + +@end diff --git a/Sources/Earthquake Network/model/annotation/PastquakesAnnotation.h b/Sources/Earthquake Network/model/annotation/PastquakesAnnotation.h new file mode 100644 index 0000000..e32726f --- /dev/null +++ b/Sources/Earthquake Network/model/annotation/PastquakesAnnotation.h @@ -0,0 +1,23 @@ +// +// PastquakesAnnotation.h +// Earthquake Network +// +// Created by Luca Beretta on 04/11/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import +#import +#import "Costanti.h" + +@interface PastquakesAnnotation : NSObject + +@property (nonatomic, readonly) CLLocationCoordinate2D coordinate; +@property (nonatomic, copy) NSString *title; +@property (nonatomic, readonly) int intensita; + +-(id)initWithTitle:(NSString *)title location:(CLLocationCoordinate2D )coordinate intensita:(int)intensita; +-(MKAnnotationView *)annotationView ; + + +@end diff --git a/Sources/Earthquake Network/model/annotation/PastquakesAnnotation.m b/Sources/Earthquake Network/model/annotation/PastquakesAnnotation.m new file mode 100644 index 0000000..77434ab --- /dev/null +++ b/Sources/Earthquake Network/model/annotation/PastquakesAnnotation.m @@ -0,0 +1,51 @@ +// +// PastquakesAnnotation.m +// Earthquake Network +// +// Created by Luca Beretta on 04/11/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "PastquakesAnnotation.h" + +@implementation PastquakesAnnotation + +-(id)initWithTitle:(NSString *)title location:(CLLocationCoordinate2D )coordinate intensita:(int)intensita{ + + self = [super init]; + if (self) { + + _title = title; + _coordinate = coordinate; + _intensita = intensita; + } + return self; +} + +-(MKAnnotationView *)annotationView{ + + MKAnnotationView *annotationView = [[MKAnnotationView alloc] initWithAnnotation:self reuseIdentifier:IDENTIFIER_ANNOTATION_PASTQUAKES]; + annotationView.enabled = YES; + annotationView.canShowCallout = YES; + NSString *imageString; + switch (self.intensita) { + case 0: + imageString = @"star_white"; + break; + case 1: + imageString = @"star_lightblue"; + break; + case 2: + imageString = @"star_blue"; + break; + default: + imageString = @""; + break; + } + + annotationView.image = [UIImage imageNamed:imageString]; + annotationView.rightCalloutAccessoryView = [UIButton buttonWithType:UIButtonTypeDetailDisclosure]; + return annotationView; +} + +@end diff --git a/Sources/Earthquake Network/model/annotation/ReteSismicaAnnotation.h b/Sources/Earthquake Network/model/annotation/ReteSismicaAnnotation.h new file mode 100644 index 0000000..afef59d --- /dev/null +++ b/Sources/Earthquake Network/model/annotation/ReteSismicaAnnotation.h @@ -0,0 +1,22 @@ +// +// ReteSismicaAnnotation.h +// Earthquake Network +// +// Created by Luca Beretta on 01/11/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import +#import +#import "Costanti.h" + +@interface ReteSismicaAnnotation : NSObject + +@property (nonatomic, readonly) CLLocationCoordinate2D coordinate; +@property (nonatomic, copy) NSString *title; +@property (nonatomic, readonly) int magnitude; + +-(id)initWithTitle:(NSString *)title location:(CLLocationCoordinate2D )coordinate magnitudo:(int)magnitude; +-(MKAnnotationView *)annotationView ; + +@end diff --git a/Sources/Earthquake Network/model/annotation/ReteSismicaAnnotation.m b/Sources/Earthquake Network/model/annotation/ReteSismicaAnnotation.m new file mode 100644 index 0000000..dfc6362 --- /dev/null +++ b/Sources/Earthquake Network/model/annotation/ReteSismicaAnnotation.m @@ -0,0 +1,51 @@ +// +// ReteSismicaAnnotation.m +// Earthquake Network +// +// Created by Luca Beretta on 01/11/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "ReteSismicaAnnotation.h" +#import "Costanti.h" + +@implementation ReteSismicaAnnotation + +-(id)initWithTitle:(NSString *)title location:(CLLocationCoordinate2D )coordinate magnitudo:(int)magnitude{ + + self = [super init]; + if (self) { + + _title = title; + _coordinate = coordinate; + _magnitude = magnitude; + } + return self; +} + +-(MKAnnotationView *)annotationView{ + + MKAnnotationView *annotationView = [[MKAnnotationView alloc] initWithAnnotation:self reuseIdentifier:IDENTIFIER_ANNOTATION_RETESMARTPHONE]; + annotationView.enabled = YES; + annotationView.canShowCallout = YES; + NSString *imageString; + switch (self.magnitude) { + case 1: + imageString = @"star_green"; + break; + case 2: + imageString = @"star_yellow"; + break; + case 3: + imageString = @"star_red1"; + break; + default: + imageString = @""; + break; + } + + annotationView.image = [UIImage imageNamed:imageString]; + annotationView.rightCalloutAccessoryView = [UIButton buttonWithType:UIButtonTypeDetailDisclosure]; + return annotationView; +} +@end diff --git a/Sources/Earthquake Network/model/annotation/SismaAnnotation.h b/Sources/Earthquake Network/model/annotation/SismaAnnotation.h new file mode 100644 index 0000000..1107215 --- /dev/null +++ b/Sources/Earthquake Network/model/annotation/SismaAnnotation.h @@ -0,0 +1,22 @@ +// +// SismaAnnotation.h +// Earthquake Network +// +// Created by Luca Beretta on 08/11/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import +#import +#import "Costanti.h" + +@interface SismaAnnotation : NSObject + +@property (nonatomic, readonly) CLLocationCoordinate2D coordinate; +@property (nonatomic, copy) NSString *title; +@property (nonatomic, readonly) double magnitude; + +-(id)initWithTitle:(NSString *)title location:(CLLocationCoordinate2D )coordinate intensita:(double)magnitude; +-(MKAnnotationView *)annotationView ; + +@end diff --git a/Sources/Earthquake Network/model/annotation/SismaAnnotation.m b/Sources/Earthquake Network/model/annotation/SismaAnnotation.m new file mode 100644 index 0000000..f527a72 --- /dev/null +++ b/Sources/Earthquake Network/model/annotation/SismaAnnotation.m @@ -0,0 +1,50 @@ +// +// SismaAnnotation.m +// Earthquake Network +// +// Created by Luca Beretta on 08/11/18. +// Copyright © 2018 Luca Beretta. All rights reserved. +// + +#import "SismaAnnotation.h" + +@implementation SismaAnnotation + +-(id)initWithTitle:(NSString *)title location:(CLLocationCoordinate2D )coordinate intensita:(double)magnitude{ + + self = [super init]; + if (self) { + + _title = title; + _coordinate = coordinate; + _magnitude = magnitude; + } + return self; +} + +-(MKAnnotationView *)annotationView{ + + MKAnnotationView *annotationView = [[MKAnnotationView alloc] initWithAnnotation:self reuseIdentifier:IDENTIFIER_ANNOTATION_SISMI]; + annotationView.enabled = YES; + annotationView.canShowCallout = YES; + NSString *imageString; + + NSLog(@"magnitudo %f", self.magnitude); + + if(self.magnitude > 4.0){ + imageString = @"dyamond_red"; + + }else if (self.magnitude < 3.0){ + imageString = @"dyamond_green"; + + }else{ + imageString = @"dyamond_yellow"; + + } + + annotationView.image = [UIImage imageNamed:imageString]; + annotationView.rightCalloutAccessoryView = [UIButton buttonWithType:UIButtonTypeDetailDisclosure]; + return annotationView; +} + +@end diff --git a/Sources/Earthquake Network/model/impostazioni notifiche/EQNAllertaSismica.h b/Sources/Earthquake Network/model/impostazioni notifiche/EQNAllertaSismica.h new file mode 100644 index 0000000..cc2484c --- /dev/null +++ b/Sources/Earthquake Network/model/impostazioni notifiche/EQNAllertaSismica.h @@ -0,0 +1,35 @@ +// +// EQNAllertaSismica.h +// Earthquake Network +// +// Created by Luca Beretta on 15/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface EQNAllertaSismica : NSObject + +@property (nonatomic, assign) BOOL isAbilitato; +@property (nonatomic, assign) BOOL isSimiSenzaIntensita; +@property (nonatomic, assign) BOOL isintervalloAllarme; + +@property (nonatomic, strong) NSString *sismiDaNotificare; +@property (nonatomic, strong) NSString *raggioSismiLievi; +@property (nonatomic, strong) NSString *raggioSismiForti; +@property (nonatomic, strong) NSString *tonoAllarme; + +@property (nonatomic, strong) NSDate *oraioInizio; +@property (nonatomic, strong) NSDate *orarioFine; +@property (nonatomic, strong) NSArray *listaMessaggi; +@property (nonatomic, strong) NSArray *listaAreeInteresse; + ++(EQNAllertaSismica *)center; +-(void)saveUserInfo; +-(void)removeUser; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sources/Earthquake Network/model/impostazioni notifiche/EQNAllertaSismica.m b/Sources/Earthquake Network/model/impostazioni notifiche/EQNAllertaSismica.m new file mode 100644 index 0000000..5079fcc --- /dev/null +++ b/Sources/Earthquake Network/model/impostazioni notifiche/EQNAllertaSismica.m @@ -0,0 +1,62 @@ +// +// EQNAllertaSismica.m +// Earthquake Network +// +// Created by Luca Beretta on 15/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import "EQNAllertaSismica.h" +#import "Costanti.h" +@implementation EQNAllertaSismica + ++(EQNAllertaSismica *)center{ + + static EQNAllertaSismica *instance = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + instance = [[self alloc]init]; + [instance initSingleton]; + }); + return instance; +} + +-(void)initSingleton{ + + self.isAbilitato = [[NSUserDefaults standardUserDefaults] boolForKey:NOTIFICHE_ALLERA_SISMICA_ABILITATO]; + self.isSimiSenzaIntensita = [[NSUserDefaults standardUserDefaults] boolForKey:NOTIFICHE_ALLERA_SISMICA_SENZA_INTENSITA]; + self.sismiDaNotificare = [[NSUserDefaults standardUserDefaults] objectForKey:NOTIFICHE_ALLERA_SISMICA_SISMI_DA_NOTIFICARE]; + self.raggioSismiLievi = [[NSUserDefaults standardUserDefaults] objectForKey:NOTIFICHE_ALLERA_SISMICA_RAGGIO_SISMI_LIEVI]; + self.tonoAllarme = [[NSUserDefaults standardUserDefaults] objectForKey:NOTIFICHE_ALLERA_SISMICA_TONO_ALLARME]; + if (!self.tonoAllarme) + self.tonoAllarme = @"alert_star_trek.wav"; + + self.isintervalloAllarme = [[NSUserDefaults standardUserDefaults] boolForKey:NOTIFICHE_ALLERA_SISMICA_ABILITA_INTERVALLO]; + self.oraioInizio = [[NSUserDefaults standardUserDefaults] objectForKey:NOTIFICHE_ALLERA_SISMICA_ORA_INIZIO]; + self.orarioFine = [[NSUserDefaults standardUserDefaults] objectForKey:NOTIFICHE_ALLERA_SISMICA_ORA_FINE]; + + +} + +-(void)saveUserInfo{ + + [[NSUserDefaults standardUserDefaults] setBool:self.isAbilitato forKey:NOTIFICHE_ABILITATO_TSUNAMI]; + [[NSUserDefaults standardUserDefaults] setBool:self.isSimiSenzaIntensita forKey:NOTIFICHE_ALLERA_SISMICA_SENZA_INTENSITA]; + [[NSUserDefaults standardUserDefaults] setObject:self.sismiDaNotificare forKey:NOTIFICHE_ALLERA_SISMICA_SISMI_DA_NOTIFICARE]; + [[NSUserDefaults standardUserDefaults] setObject:self.raggioSismiLievi forKey:NOTIFICHE_ALLERA_SISMICA_RAGGIO_SISMI_LIEVI]; + [[NSUserDefaults standardUserDefaults] setObject:self.tonoAllarme forKey:NOTIFICHE_ALLERA_SISMICA_TONO_ALLARME]; + [[NSUserDefaults standardUserDefaults] setBool:self.isintervalloAllarme forKey:NOTIFICHE_ALLERA_SISMICA_ABILITA_INTERVALLO]; + [[NSUserDefaults standardUserDefaults] setObject:self.oraioInizio forKey:NOTIFICHE_ALLERA_SISMICA_ORA_INIZIO]; + [[NSUserDefaults standardUserDefaults] setObject:self.orarioFine forKey:NOTIFICHE_ALLERA_SISMICA_ORA_FINE]; + [[NSUserDefaults standardUserDefaults] synchronize]; + + +} + +-(void)removeUser{ + + + +} + +@end diff --git a/Sources/Earthquake Network/model/impostazioni notifiche/EQNImpostazioniNotifiche.h b/Sources/Earthquake Network/model/impostazioni notifiche/EQNImpostazioniNotifiche.h new file mode 100644 index 0000000..f4e7498 --- /dev/null +++ b/Sources/Earthquake Network/model/impostazioni notifiche/EQNImpostazioniNotifiche.h @@ -0,0 +1,28 @@ +// +// EQNImpostazioniNotifiche.h +// Earthquake Network +// +// Created by Luca Beretta on 09/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface EQNImpostazioniNotifiche : NSObject + +@property (nonatomic, assign) BOOL attivaIntervalloNotifica; + +@property (nonatomic, strong) NSDate *oraioInizio; +@property (nonatomic, strong) NSDate *orarioFine; + +@property (nonatomic, strong) NSString *distanzaRetiSismiche; + ++(EQNImpostazioniNotifiche *)center; +-(void)saveUserInfo; +-(void)removeUser; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sources/Earthquake Network/model/impostazioni notifiche/EQNImpostazioniNotifiche.m b/Sources/Earthquake Network/model/impostazioni notifiche/EQNImpostazioniNotifiche.m new file mode 100644 index 0000000..a13479c --- /dev/null +++ b/Sources/Earthquake Network/model/impostazioni notifiche/EQNImpostazioniNotifiche.m @@ -0,0 +1,51 @@ +// +// EQNImpostazioniNotifiche.m +// Earthquake Network +// +// Created by Luca Beretta on 09/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import "EQNImpostazioniNotifiche.h" +#import "Costanti.h" + +@implementation EQNImpostazioniNotifiche + ++(EQNImpostazioniNotifiche *)center{ + + static EQNImpostazioniNotifiche *instance = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + instance = [[self alloc]init]; + [instance initSingleton]; + }); + return instance; +} + +-(void)initSingleton{ + + self.oraioInizio = [[NSUserDefaults standardUserDefaults] objectForKey:NOTIFICHE_ORA_INIZIO]; + self.orarioFine = [[NSUserDefaults standardUserDefaults] objectForKey:NOTIFICHE_ORA_FINE]; + self.attivaIntervalloNotifica = [[NSUserDefaults standardUserDefaults] boolForKey:NOTIFICHE_ATTIVA_ORARIO]; + +} + +-(void)saveUserInfo{ + + [[NSUserDefaults standardUserDefaults] setObject:self.oraioInizio forKey:NOTIFICHE_ORA_INIZIO]; + [[NSUserDefaults standardUserDefaults] setObject:self.orarioFine forKey:NOTIFICHE_ORA_FINE]; + [[NSUserDefaults standardUserDefaults] setBool:self.attivaIntervalloNotifica forKey:NOTIFICHE_ATTIVA_ORARIO]; + [[NSUserDefaults standardUserDefaults] synchronize]; + +} + +-(void)removeUser{ + + [[NSUserDefaults standardUserDefaults] removeObjectForKey:NOTIFICHE_ORA_INIZIO]; + [[NSUserDefaults standardUserDefaults] removeObjectForKey:NOTIFICHE_ORA_FINE]; + [[NSUserDefaults standardUserDefaults] removeObjectForKey:NOTIFICHE_ATTIVA_ORARIO]; + [[NSUserDefaults standardUserDefaults] synchronize]; + +} + +@end diff --git a/Sources/Earthquake Network/model/impostazioni notifiche/EQNNotificeReteSismiche.h b/Sources/Earthquake Network/model/impostazioni notifiche/EQNNotificeReteSismiche.h new file mode 100644 index 0000000..10f6dd5 --- /dev/null +++ b/Sources/Earthquake Network/model/impostazioni notifiche/EQNNotificeReteSismiche.h @@ -0,0 +1,30 @@ +// +// EQNNotificeReteSismiche.h +// Earthquake Network +// +// Created by Luca Beretta on 10/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface EQNNotificeReteSismiche : NSObject + +@property (nonatomic, assign) BOOL isAbilitato; +@property (nonatomic, assign) BOOL isAbilitaVicini; +@property (nonatomic, assign) BOOL isTerremortiForti; +@property (nonatomic, strong) NSArray *listaEnti; +@property (nonatomic, strong) NSString *distanzaPosizione; +@property (nonatomic, strong) NSString *energiaSisma; +@property (nonatomic, strong) NSString *distanzaVicini; +@property (nonatomic, strong) NSString *energiaTerremotiForti; + ++(EQNNotificeReteSismiche *)center; +-(void)saveUserInfo; +-(void)removeUser; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sources/Earthquake Network/model/impostazioni notifiche/EQNNotificeReteSismiche.m b/Sources/Earthquake Network/model/impostazioni notifiche/EQNNotificeReteSismiche.m new file mode 100644 index 0000000..bc0ef3e --- /dev/null +++ b/Sources/Earthquake Network/model/impostazioni notifiche/EQNNotificeReteSismiche.m @@ -0,0 +1,73 @@ +// +// EQNNotificeReteSismiche.m +// Earthquake Network +// +// Created by Luca Beretta on 10/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import "EQNNotificeReteSismiche.h" +#import "Costanti.h" +#import "EQNUtility.h" +@implementation EQNNotificeReteSismiche + ++(EQNNotificeReteSismiche *)center{ + + static EQNNotificeReteSismiche *instance = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + instance = [[self alloc]init]; + [instance initSingleton]; + }); + return instance; +} + +-(void)initSingleton{ + + self.isAbilitato = [[NSUserDefaults standardUserDefaults] boolForKey:NOTIFICHE_ATTIVA_RETI_SISMICHE]; + self.isAbilitaVicini = [[NSUserDefaults standardUserDefaults] boolForKey:NOTIFICHE_ATTIVA_RETI_SISMICHE_VICINE]; + self.isTerremortiForti = [[NSUserDefaults standardUserDefaults] boolForKey:NOTIFICHE_ATTIVA_RETI_TERREMOTI_FORTI]; + + self.distanzaPosizione = [[NSUserDefaults standardUserDefaults] objectForKey:NOTIFICHE_DISTANZA_POSIZIONE_RETI_SISMICHE]; + + self.energiaSisma = [[NSUserDefaults standardUserDefaults] objectForKey:NOTIFICHE_ATTIVA_RETI_ENERGIA_SISMI]; + + self.distanzaVicini = [[NSUserDefaults standardUserDefaults] objectForKey:NOTIFICHE_ATTIVA_RETI_DISTANZA_VICINI]; + + self.energiaTerremotiForti = [[NSUserDefaults standardUserDefaults] objectForKey:NOTIFICHE_ATTIVA_RETI_ENERGIA_FORTI]; + + self.listaEnti = (NSArray *)[EQNUtility loadCustomObjectWithKey:NOTIFICHE_ATTIVA_RETI_LISTA_ENTI]; + + +} + +-(void)saveUserInfo{ + + [[NSUserDefaults standardUserDefaults] setObject:self.distanzaPosizione forKey:NOTIFICHE_DISTANZA_POSIZIONE_RETI_SISMICHE]; + + [[NSUserDefaults standardUserDefaults] setObject:self.energiaSisma forKey:NOTIFICHE_ATTIVA_RETI_ENERGIA_SISMI]; + + [[NSUserDefaults standardUserDefaults] setObject:self.distanzaVicini forKey:NOTIFICHE_ATTIVA_RETI_DISTANZA_VICINI]; + + [[NSUserDefaults standardUserDefaults] setObject:self.energiaTerremotiForti forKey:NOTIFICHE_ATTIVA_RETI_ENERGIA_FORTI]; + + [[NSUserDefaults standardUserDefaults] setBool:self.isAbilitato forKey:NOTIFICHE_ATTIVA_RETI_SISMICHE]; + + [[NSUserDefaults standardUserDefaults] setBool:self.isAbilitaVicini forKey:NOTIFICHE_ATTIVA_RETI_SISMICHE_VICINE]; + + [[NSUserDefaults standardUserDefaults] setBool:self.isTerremortiForti forKey:NOTIFICHE_ATTIVA_RETI_TERREMOTI_FORTI]; + + [EQNUtility saveCustomObject:self.listaEnti key:NOTIFICHE_ATTIVA_RETI_LISTA_ENTI]; + + [[NSUserDefaults standardUserDefaults] synchronize]; + +} + +-(void)removeUser{ + + + +} + + +@end diff --git a/Sources/Earthquake Network/model/impostazioni notifiche/EQNNotificheSegnalazioniUtente.h b/Sources/Earthquake Network/model/impostazioni notifiche/EQNNotificheSegnalazioniUtente.h new file mode 100644 index 0000000..214dcc8 --- /dev/null +++ b/Sources/Earthquake Network/model/impostazioni notifiche/EQNNotificheSegnalazioniUtente.h @@ -0,0 +1,25 @@ +// +// EQNNotificheSegnalazioniUtente.h +// Earthquake Network +// +// Created by Luca Beretta on 10/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface EQNNotificheSegnalazioniUtente : NSObject + +@property (nonatomic, assign) BOOL isAbilitato; +@property (nonatomic, strong) NSString *distanzaPosizione; + + ++(EQNNotificheSegnalazioniUtente *)center; +-(void)saveUserInfo; +-(void)removeUser; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sources/Earthquake Network/model/impostazioni notifiche/EQNNotificheSegnalazioniUtente.m b/Sources/Earthquake Network/model/impostazioni notifiche/EQNNotificheSegnalazioniUtente.m new file mode 100644 index 0000000..8a7f7a1 --- /dev/null +++ b/Sources/Earthquake Network/model/impostazioni notifiche/EQNNotificheSegnalazioniUtente.m @@ -0,0 +1,47 @@ +// +// EQNNotificheSegnalazioniUtente.m +// Earthquake Network +// +// Created by Luca Beretta on 10/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import "EQNNotificheSegnalazioniUtente.h" +#import "Costanti.h" + +@implementation EQNNotificheSegnalazioniUtente + ++(EQNNotificheSegnalazioniUtente *)center{ + + static EQNNotificheSegnalazioniUtente *instance = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + instance = [[self alloc]init]; + [instance initSingleton]; + }); + return instance; +} + +-(void)initSingleton{ + + self.isAbilitato = [[NSUserDefaults standardUserDefaults] boolForKey:NOTIFICHE_SU_ATTIVA_SEGNALAZIONE_UTENTE]; + self.distanzaPosizione = [[NSUserDefaults standardUserDefaults] objectForKey:NOTIFICHE_SU_DISTANZA_POSIZIONE]; + +} + +-(void)saveUserInfo{ + + [[NSUserDefaults standardUserDefaults] setObject:self.distanzaPosizione forKey:NOTIFICHE_SU_DISTANZA_POSIZIONE]; + [[NSUserDefaults standardUserDefaults] setBool:self.isAbilitato forKey:NOTIFICHE_SU_ATTIVA_SEGNALAZIONE_UTENTE]; + [[NSUserDefaults standardUserDefaults] synchronize]; + +} + +-(void)removeUser{ + + + +} + + +@end diff --git a/Sources/Earthquake Network/model/impostazioni notifiche/EQNNotificheTempoReale.h b/Sources/Earthquake Network/model/impostazioni notifiche/EQNNotificheTempoReale.h new file mode 100644 index 0000000..588bd48 --- /dev/null +++ b/Sources/Earthquake Network/model/impostazioni notifiche/EQNNotificheTempoReale.h @@ -0,0 +1,28 @@ +// +// EQNNotificheTempoReale.h +// Earthquake Network +// +// Created by Luca Beretta on 10/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface EQNNotificheTempoReale : NSObject + +@property (nonatomic, strong) NSString *distanzaTempoRealeLievi; +@property (nonatomic, strong) NSString *distanzaTempoRealeForti; + +@property (nonatomic, assign) BOOL attivaTempoReale; +@property (nonatomic, assign) BOOL attivaSismiSenzaIntensita; +@property (nonatomic, assign) BOOL isSismiForti; + ++(EQNNotificheTempoReale *)center; +-(void)saveUserInfo; +-(void)removeUser; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sources/Earthquake Network/model/impostazioni notifiche/EQNNotificheTempoReale.m b/Sources/Earthquake Network/model/impostazioni notifiche/EQNNotificheTempoReale.m new file mode 100644 index 0000000..dcbb988 --- /dev/null +++ b/Sources/Earthquake Network/model/impostazioni notifiche/EQNNotificheTempoReale.m @@ -0,0 +1,55 @@ +// +// EQNNotificheTempoReale.m +// Earthquake Network +// +// Created by Luca Beretta on 10/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import "EQNNotificheTempoReale.h" +#import "Costanti.h" +@implementation EQNNotificheTempoReale + + ++(EQNNotificheTempoReale *)center{ + + static EQNNotificheTempoReale *instance = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + instance = [[self alloc]init]; + [instance initSingleton]; + }); + return instance; +} + +-(void)initSingleton{ + + self.distanzaTempoRealeLievi = [[NSUserDefaults standardUserDefaults] objectForKey:NOTIFICHE_TR_DISTANZA_TEMPO_REALE_LIEVE]; + self.distanzaTempoRealeForti = [[NSUserDefaults standardUserDefaults] objectForKey:NOTIFICHE_TR_DISTANZA_TEMPO_REALE_FORTE]; + + self.attivaTempoReale = [[NSUserDefaults standardUserDefaults] boolForKey:NOTIFICHE_TR_ATTIVA_TEMPO_REALE]; + self.attivaSismiSenzaIntensita = [[NSUserDefaults standardUserDefaults] boolForKey:NOTIFICHE_TR_ATTIVA_SISMI_SENZA_INTENSITA]; + self.isSismiForti = [[NSUserDefaults standardUserDefaults] boolForKey:NOTIFICHE_TR_ATTIVA_SISMI_FORTI]; + +} + +-(void)saveUserInfo{ + + [[NSUserDefaults standardUserDefaults] setObject:self.distanzaTempoRealeLievi forKey:NOTIFICHE_TR_DISTANZA_TEMPO_REALE_LIEVE]; + [[NSUserDefaults standardUserDefaults] setObject:self.distanzaTempoRealeForti forKey:NOTIFICHE_TR_DISTANZA_TEMPO_REALE_FORTE]; + + [[NSUserDefaults standardUserDefaults] setBool:self.attivaTempoReale forKey:NOTIFICHE_TR_ATTIVA_TEMPO_REALE]; + [[NSUserDefaults standardUserDefaults] setBool:self.attivaSismiSenzaIntensita forKey:NOTIFICHE_TR_ATTIVA_SISMI_SENZA_INTENSITA]; + [[NSUserDefaults standardUserDefaults] setBool:self.isSismiForti forKey:NOTIFICHE_TR_ATTIVA_SISMI_FORTI]; + [[NSUserDefaults standardUserDefaults] synchronize]; + +} + +-(void)removeUser{ + + + +} + + +@end diff --git a/Sources/Earthquake Network/model/impostazioni notifiche/EQNNotificheTsunami.h b/Sources/Earthquake Network/model/impostazioni notifiche/EQNNotificheTsunami.h new file mode 100644 index 0000000..26d4278 --- /dev/null +++ b/Sources/Earthquake Network/model/impostazioni notifiche/EQNNotificheTsunami.h @@ -0,0 +1,27 @@ +// +// EQNNotificheTsunami.h +// Earthquake Network +// +// Created by Luca Beretta on 13/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface EQNNotificheTsunami : NSObject +@property (nonatomic, assign) BOOL isAbilitato; +@property (nonatomic, assign) BOOL isIntervalloNotifiche; +@property (nonatomic, strong) NSDate *oraioInizio; +@property (nonatomic, strong) NSDate *orarioFine; +@property (nonatomic, strong) NSArray *listaMessaggi; +@property (nonatomic, strong) NSArray *listaAreeInteresse; + ++(EQNNotificheTsunami *)center; +-(void)saveUserInfo; +-(void)removeUser; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sources/Earthquake Network/model/impostazioni notifiche/EQNNotificheTsunami.m b/Sources/Earthquake Network/model/impostazioni notifiche/EQNNotificheTsunami.m new file mode 100644 index 0000000..09b0340 --- /dev/null +++ b/Sources/Earthquake Network/model/impostazioni notifiche/EQNNotificheTsunami.m @@ -0,0 +1,62 @@ +// +// EQNNotificheTsunami.m +// Earthquake Network +// +// Created by Luca Beretta on 13/01/2019. +// Copyright © 2019 Luca Beretta. All rights reserved. +// + +#import "EQNNotificheTsunami.h" +#import "Costanti.h" +#import "EQNUtility.h" + +@implementation EQNNotificheTsunami + ++(EQNNotificheTsunami *)center{ + + static EQNNotificheTsunami *instance = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + instance = [[self alloc]init]; + [instance initSingleton]; + }); + return instance; +} + +-(void)initSingleton{ + + self.isAbilitato = [[NSUserDefaults standardUserDefaults] boolForKey:NOTIFICHE_ABILITATO_TSUNAMI]; + self.isIntervalloNotifiche = [[NSUserDefaults standardUserDefaults] boolForKey:NOTIFICHE_ABILITATO_ITERVALLO_TSUNAMI]; + + self.listaMessaggi = (NSArray *)[EQNUtility loadCustomObjectWithKey:NOTIFICHE_LISTA_MESSAGGI__TSUNAMI]; + self.listaAreeInteresse = (NSArray *)[EQNUtility loadCustomObjectWithKey:NOTIFICHE_LISTA_AREE_INTERESSE_TSUNAMI]; + + self.oraioInizio = [[NSUserDefaults standardUserDefaults] objectForKey:NOTIFICHE_ORA_INIZIO_TSUNAMI]; + self.orarioFine = [[NSUserDefaults standardUserDefaults] objectForKey:NOTIFICHE_ORA_FINE_TSUNAMI]; + +} + +-(void)saveUserInfo{ + + [[NSUserDefaults standardUserDefaults] setBool:self.isAbilitato forKey:NOTIFICHE_ABILITATO_TSUNAMI]; + + [[NSUserDefaults standardUserDefaults] setBool:self.isIntervalloNotifiche forKey:NOTIFICHE_ABILITATO_ITERVALLO_TSUNAMI]; + + [EQNUtility saveCustomObject:self.listaMessaggi key:NOTIFICHE_LISTA_MESSAGGI__TSUNAMI]; + [EQNUtility saveCustomObject:self.listaAreeInteresse key:NOTIFICHE_LISTA_AREE_INTERESSE_TSUNAMI]; + + [[NSUserDefaults standardUserDefaults] setObject:self.oraioInizio forKey:NOTIFICHE_ORA_INIZIO_TSUNAMI]; + [[NSUserDefaults standardUserDefaults] setObject:self.orarioFine forKey:NOTIFICHE_ORA_FINE_TSUNAMI]; + + [[NSUserDefaults standardUserDefaults] synchronize]; + + + +} + +-(void)removeUser{ + + + +} +@end diff --git a/Sources/Podfile b/Sources/Podfile new file mode 100644 index 0000000..0cc23ef --- /dev/null +++ b/Sources/Podfile @@ -0,0 +1,17 @@ +# Uncomment the next line to define a global platform for your project +# platform :ios, '9.0' + +target 'Earthquake Network' do + # Uncomment the next line if you're using Swift or would like to use dynamic frameworks + # use_frameworks! + + # Pods for Earthquake Network + +pod 'Firebase/Core' +pod 'Firebase/Messaging' +pod 'GoogleMaps' +pod 'GooglePlaces' +pod 'Google-Mobile-Ads-SDK' + + +end diff --git a/Sources/Podfile.lock b/Sources/Podfile.lock new file mode 100644 index 0000000..fed2636 --- /dev/null +++ b/Sources/Podfile.lock @@ -0,0 +1,79 @@ +PODS: + - Firebase/Core (4.10.1): + - FirebaseAnalytics (= 4.1.0) + - FirebaseCore (= 4.0.17) + - Firebase/Messaging (4.10.1): + - Firebase/Core + - FirebaseMessaging (= 2.1.1) + - FirebaseAnalytics (4.1.0): + - FirebaseCore (~> 4.0) + - FirebaseInstanceID (~> 2.0) + - "GoogleToolboxForMac/NSData+zlib (~> 2.1)" + - nanopb (~> 0.3) + - FirebaseCore (4.0.17): + - "GoogleToolboxForMac/NSData+zlib (~> 2.1)" + - FirebaseInstanceID (2.0.9): + - FirebaseCore (~> 4.0) + - FirebaseMessaging (2.1.1): + - FirebaseAnalytics (~> 4.1) + - FirebaseCore (~> 4.0) + - FirebaseInstanceID (~> 2.0) + - GoogleToolboxForMac/Logger (~> 2.1) + - Protobuf (~> 3.5) + - Google-Mobile-Ads-SDK (7.38.0) + - GoogleMaps (2.6.0): + - GoogleMaps/Maps (= 2.6.0) + - GoogleMaps/Base (2.6.0) + - GoogleMaps/Maps (2.6.0): + - GoogleMaps/Base + - GooglePlaces (2.6.0): + - GoogleMaps/Base (= 2.6.0) + - GoogleToolboxForMac/Defines (2.1.3) + - GoogleToolboxForMac/Logger (2.1.3): + - GoogleToolboxForMac/Defines (= 2.1.3) + - "GoogleToolboxForMac/NSData+zlib (2.1.3)": + - GoogleToolboxForMac/Defines (= 2.1.3) + - nanopb (0.3.8): + - nanopb/decode (= 0.3.8) + - nanopb/encode (= 0.3.8) + - nanopb/decode (0.3.8) + - nanopb/encode (0.3.8) + - Protobuf (3.5.0) + +DEPENDENCIES: + - Firebase/Core + - Firebase/Messaging + - Google-Mobile-Ads-SDK + - GoogleMaps + - GooglePlaces + +SPEC REPOS: + https://github.com/cocoapods/specs.git: + - Firebase + - FirebaseAnalytics + - FirebaseCore + - FirebaseInstanceID + - FirebaseMessaging + - Google-Mobile-Ads-SDK + - GoogleMaps + - GooglePlaces + - GoogleToolboxForMac + - nanopb + - Protobuf + +SPEC CHECKSUMS: + Firebase: 92c6ba593e32db0defde464a9adc981d5cb49f97 + FirebaseAnalytics: 3dfae28d4a5e06f86c4fae830efc2ad3fadb19bc + FirebaseCore: 872307b001bbefda1dfa0dbfffa50a6919023d4a + FirebaseInstanceID: d2058a35e9bebda1b6dd42486b84917bde552a9d + FirebaseMessaging: db0e01c52ef7e1f42846431273558107d084ede4 + Google-Mobile-Ads-SDK: fec4a72b71a81302d3fd75454df3417c03c50ed5 + GoogleMaps: 42f91c68b7fa2f84d5c86597b18ceb99f5414c7f + GooglePlaces: f6ddf33b75cef69e888907d9947c57198ed845f3 + GoogleToolboxForMac: 2501e2ad72a52eb3dfe7bd9aee7dad11b858bd20 + nanopb: 5601e6bca2dbf1ed831b519092ec110f66982ca3 + Protobuf: 8a9838fba8dae3389230e1b7f8c104aa32389c03 + +PODFILE CHECKSUM: e462e7716e401fdec1cafc22ed83b6eee0634f12 + +COCOAPODS: 1.5.3 diff --git a/Sources/en.lproj/InfoPlist.strings b/Sources/en.lproj/InfoPlist.strings new file mode 100644 index 0000000..a96db81 --- /dev/null +++ b/Sources/en.lproj/InfoPlist.strings @@ -0,0 +1,15 @@ +/* + InfoPlist.strings + Earthquake Network + + Created by Luca Beretta on 08/05/2019. + Copyright © 2019 Luca Beretta. All rights reserved. +*/ + +"NSLocationAlwaysAndWhenInUseUsageDescription" = "We need your location to send you real time seismic alerts"; + +"NSLocationAlwaysUsageDescription" = "We need your location to send you real time seismic alerts"; + +"NSLocationWhenInUseUsageDescription" = "We need your location to send you real time seismic alerts"; + +"CFBundleDisplayName" = "Earthquake Network"; diff --git a/Sources/es.lproj/InfoPlist.strings b/Sources/es.lproj/InfoPlist.strings new file mode 100644 index 0000000..9354ea1 --- /dev/null +++ b/Sources/es.lproj/InfoPlist.strings @@ -0,0 +1,15 @@ +/* + InfoPlist.strings + Earthquake Network + + Created by Luca Beretta on 08/05/2019. + Copyright © 2019 Luca Beretta. All rights reserved. +*/ + +"NSLocationAlwaysAndWhenInUseUsageDescription" = "Necesitamos tu ubicación para enviarte alertas sísmicas en tiempo real"; + +"NSLocationAlwaysUsageDescription" = "Necesitamos tu ubicación para enviarte alertas sísmicas en tiempo real"; + +"NSLocationWhenInUseUsageDescription" = "Necesitamos tu ubicación para enviarte alertas sísmicas en tiempo real"; + +"CFBundleDisplayName" = "Sismos Detector"; diff --git a/Sources/it.lproj/InfoPlist.strings b/Sources/it.lproj/InfoPlist.strings new file mode 100644 index 0000000..53322f4 --- /dev/null +++ b/Sources/it.lproj/InfoPlist.strings @@ -0,0 +1,16 @@ +/* + InfoPlist.strings + Earthquake Network + + Created by Luca Beretta on 08/05/2019. + Copyright © 2019 Luca Beretta. All rights reserved. +*/ + +"NSLocationAlwaysAndWhenInUseUsageDescription" = "La tua posizione è necessaria per ricevere le allerte sismiche in tempo reale"; + +"NSLocationAlwaysUsageDescription" = "La tua posizione è necessaria per ricevere le allerte sismiche in tempo reale"; + +"NSLocationWhenInUseUsageDescription" = "La tua posizione è necessaria per ricevere le allerte sismiche in tempo reale"; + +"CFBundleDisplayName" = "Rilevatore Terremoto"; +