Compare commits
65 Commits
v2.0
...
stable/v2.2.x
| Author | SHA1 | Date | |
|---|---|---|---|
| a871f7b27b | |||
| b88a1e197f | |||
| d4986ac610 | |||
| 4a77692e23 | |||
| d6b6d6883f | |||
| 5528756aad | |||
| 1970cc21ec | |||
| bb54e78278 | |||
| 5cef7215df | |||
| ffa63352b2 | |||
| c6ee123eee | |||
| e9846cc75d | |||
| 1792f4b4bb | |||
| 7e7747efcb | |||
| 0d5bf272c1 | |||
| 8201ece916 | |||
| 0148ac65f7 | |||
| 8d0439f7f8 | |||
| 31f928fed9 | |||
| 93f72cddb7 | |||
| fe8f9f46fd | |||
| 33f2d45cb9 | |||
| 4b457286dd | |||
| 6b2d690491 | |||
| b02d3dbb8e | |||
| b8feb2fa70 | |||
| b1b7ddd8c1 | |||
| 84ee7b7958 | |||
| 4fbbb8e4fc | |||
| 6e1a982188 | |||
| de1167fcad | |||
| 031b731e30 | |||
| ccc74f6b39 | |||
| 0a5902c5f1 | |||
| e494109a72 | |||
| 530ce3d56f | |||
| 1c0a449c05 | |||
| b70bd95a6d | |||
| 87becee4fb | |||
| 9344eae39a | |||
| bed5198bbc | |||
| c416a12c1b | |||
| 6ebc4d319a | |||
| e93ddc91d6 | |||
| aa765d7bac | |||
| 388fbfd2e5 | |||
| e0661c138b | |||
| 9c7f9eaaf0 | |||
| 984c18e435 | |||
| 2f5e0f0492 | |||
| eadba2b1e7 | |||
| ed236371ed | |||
| b1772d7712 | |||
| 4672549f2d | |||
| 08a493d0a3 | |||
| 6a056ec8d1 | |||
| 0636ea65da | |||
| 7f9543309a | |||
| 8440c70fb2 | |||
| ac553df6c6 | |||
| 803843598c | |||
| 11884cd897 | |||
| 050b4467d6 | |||
| 2b01ffe621 | |||
| 78abc28a7e |
@@ -1,20 +1,68 @@
|
||||
# Changelog
|
||||
|
||||
## Versione 2.2.1
|
||||
|
||||
### Build (24)
|
||||
- Corretto problema in salvataggio impostazione allerte in tempo reale
|
||||
|
||||
## Versione 2.2
|
||||
|
||||
### Build (19)
|
||||
- Semplificate alcune voci nel menu Impostazioni
|
||||
|
||||
### Build (18)
|
||||
- Impostazioni occupa ora un tab di navigazione
|
||||
- Rimosso menu laterale e spostati link in sezione Impostazioni
|
||||
- Rimossi riferimenti a CoraData inutilizzati
|
||||
- Aggiornata icona app
|
||||
- Aggiornati messaggi per permesso localizzatione (stato Consenti Sempre)
|
||||
|
||||
## Versione 2.1
|
||||
|
||||
### Build (17)
|
||||
- Utilizzo nuove icone interne all'app
|
||||
|
||||
### Build (16)
|
||||
- Correzioni varie a menu impostazioni
|
||||
|
||||
### Build (15)
|
||||
- Completamento restyling sezione Impostazioni
|
||||
- Correzioni varie in impostazioni (issue #11)
|
||||
|
||||
### Build (14)
|
||||
- Inizio restyling sezione Impostazioni (Notifiche sismi con nuovo layout)
|
||||
|
||||
### Build (13)
|
||||
- Aggiornate dipendenze (GMA SDK compatibile con iOS 14)
|
||||
- Risolti warning Xcode 11.5
|
||||
|
||||
### Build (12)
|
||||
- Migliorata gestione layout banner in sezioni principali (se banner è nascosto, tabella occupa tutto lo spazio disponibile)
|
||||
- Corretta gesture per aprire menu laterale
|
||||
- Aggiornate icone con nuova versione
|
||||
|
||||
### Build (11)
|
||||
- Corretto crash in invio segnalazione sisma
|
||||
|
||||
### Build (10)
|
||||
- Utilizzo tab bar nativa per gestione sezioni app
|
||||
- Rimossa sezione Tsunami
|
||||
|
||||
## Versione 2.0
|
||||
|
||||
## Build (9)
|
||||
### Build (9)
|
||||
- Aggiunta integrazione con Crashlytics
|
||||
- Risolto problema con mappa segnalazioni
|
||||
|
||||
## Build (8)
|
||||
### Build (8)
|
||||
- Aggiunti loader durante caricamenti prodotti
|
||||
- Gestiti messaggi di conferma restore acquisti
|
||||
|
||||
## Build (7)
|
||||
### Build (7)
|
||||
- Abbonamenti annuali sbloccano versione pro
|
||||
- Rivisto codice per gestione versione pro e rimosso codice duplicato
|
||||
|
||||
## Build (6)
|
||||
### Build (6)
|
||||
- Rifatti controller per versione Pro e abbonamenti
|
||||
- Allineati comportamenti acquisti in-app con versione Android
|
||||
- Fix crash alla prima installazione
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XPC!</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.0</string>
|
||||
<string>$(MARKETING_VERSION)</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XPC!</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.0</string>
|
||||
<string>$(MARKETING_VERSION)</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
|
||||
@@ -12,10 +12,8 @@
|
||||
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 */; };
|
||||
8C14113121ED3E5B00A59729 /* SettingsRealTimeAlertsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C14113021ED3E5B00A59729 /* SettingsRealTimeAlertsViewController.m */; };
|
||||
8C14113721EE502800A59729 /* EQNAllertaSismica.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C14113621EE502800A59729 /* EQNAllertaSismica.m */; };
|
||||
8C149FA321E54E85002C44FD /* NotificheSismiTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C149FA221E54E85002C44FD /* NotificheSismiTableViewController.m */; };
|
||||
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 */; };
|
||||
@@ -46,7 +44,6 @@
|
||||
8C4E344B2152EE5B008B0D2A /* EQNGeneratoreURLServer.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C4E344A2152EE5B008B0D2A /* EQNGeneratoreURLServer.m */; };
|
||||
8C593E8A217BA2470008B260 /* EQNSegnalazione.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C593E89217BA2470008B260 /* EQNSegnalazione.m */; };
|
||||
8C5EA22D21763103002DC156 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C5EA22C21763102002DC156 /* MapKit.framework */; };
|
||||
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 */; };
|
||||
@@ -55,7 +52,6 @@
|
||||
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 */; };
|
||||
@@ -67,28 +63,22 @@
|
||||
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 */; };
|
||||
8CCE165521EA378800173CD9 /* SettingsUserReportAlertsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CCE165421EA378800173CD9 /* SettingsUserReportAlertsViewController.m */; };
|
||||
8CCE165821EB1E0000173CD9 /* SettingsSeismicNetworkAlertsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CCE165721EB1E0000173CD9 /* SettingsSeismicNetworkAlertsViewController.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 */; };
|
||||
8CEAE4D92163E23E001A42B9 /* SWRevealViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CEAE4D82163E23D001A42B9 /* SWRevealViewController.m */; };
|
||||
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 */; };
|
||||
@@ -109,15 +99,23 @@
|
||||
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 */; };
|
||||
C89115902FEA7A0A31514912 /* Pods_Earthquake_Network.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 25A8BFFE29D46740E8A8A7A3 /* Pods_Earthquake_Network.framework */; };
|
||||
DC08803F24F5A89000186D97 /* SettingEnableTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC08803E24F5A89000186D97 /* SettingEnableTableViewCell.swift */; };
|
||||
DC08804124F5B41400186D97 /* SettingSliderTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC08804024F5B41400186D97 /* SettingSliderTableViewCell.swift */; };
|
||||
DC0E551324F8063300D54270 /* SettingSegmentedTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC0E551224F8063300D54270 /* SettingSegmentedTableViewCell.swift */; };
|
||||
DC11ABE824E6700E00D866A8 /* UIColor+EQN.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC11ABE724E6700E00D866A8 /* UIColor+EQN.swift */; };
|
||||
DC27EB2F24F6EBE000ACBFE0 /* SettingsSeismicNetworksViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC27EB2E24F6EBE000ACBFE0 /* SettingsSeismicNetworksViewController.swift */; };
|
||||
DC3ADD3924CB2F3D00737919 /* alert_star_trek.wav in Resources */ = {isa = PBXBuildFile; fileRef = 8CF12CC721DE43A400613AC5 /* alert_star_trek.wav */; };
|
||||
DC3BA11124D1A9C90062EE7F /* SubscriptionsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC3BA11024D1A9C90062EE7F /* SubscriptionsViewController.swift */; };
|
||||
DCAB01E324CEBFE800E8B54C /* MenuViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCAB01E224CEBFE800E8B54C /* MenuViewController.swift */; };
|
||||
DCAB01E524CEC12E00E8B54C /* MenuHeaderTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCAB01E424CEC12E00E8B54C /* MenuHeaderTableViewCell.swift */; };
|
||||
DCAB01E724CEC22100E8B54C /* MenuItemTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCAB01E624CEC22100E8B54C /* MenuItemTableViewCell.swift */; };
|
||||
DC52B8A224FC145500ABEBA6 /* SettingsBaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DC52B8A124FC145500ABEBA6 /* SettingsBaseViewController.m */; };
|
||||
DC52B8A524FCCD6900ABEBA6 /* AppTheme.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC52B8A424FCCD6900ABEBA6 /* AppTheme.swift */; };
|
||||
DC886A5D24E92D5500F7A5D3 /* EQNBaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DC886A5C24E92D5500F7A5D3 /* EQNBaseViewController.m */; };
|
||||
DC99A50324E66E270071BC9F /* EQNCommandProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC99A50224E66E270071BC9F /* EQNCommandProtocol.swift */; };
|
||||
DC99A50524E66E430071BC9F /* EQNAppearanceCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC99A50424E66E430071BC9F /* EQNAppearanceCommand.swift */; };
|
||||
DC99A50724E66E5F0071BC9F /* EQNStartupCommandsBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC99A50624E66E5F0071BC9F /* EQNStartupCommandsBuilder.swift */; };
|
||||
DCAA913F24F68A1D00145A3D /* SettingMultivaluesTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCAA913E24F68A1D00145A3D /* SettingMultivaluesTableViewCell.swift */; };
|
||||
DCB28CEE24FB8400001F557E /* SettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCB28CED24FB8400001F557E /* SettingsViewController.swift */; };
|
||||
DCB6FBEC24D0B40600ED23B8 /* Colors.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DCB6FBEB24D0B40600ED23B8 /* Colors.xcassets */; };
|
||||
DCBB267A24D1E7F500F04559 /* SubscriptionsHeaderTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCBB267924D1E7F500F04559 /* SubscriptionsHeaderTableViewCell.swift */; };
|
||||
DCBB267C24D1E98300F04559 /* EQNBaseTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCBB267B24D1E98300F04559 /* EQNBaseTableViewCell.swift */; };
|
||||
@@ -126,8 +124,16 @@
|
||||
DCC23DEC24D281CE003A2404 /* SubscriptionsActiveTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCC23DEB24D281CE003A2404 /* SubscriptionsActiveTableViewCell.swift */; };
|
||||
DCC23DEF24D28F58003A2404 /* EQNEdgeInsetLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCC23DEE24D28F58003A2404 /* EQNEdgeInsetLabel.swift */; };
|
||||
DCD3E3C024D15576007C78D4 /* PurchaseProVersionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCD3E3BF24D15576007C78D4 /* PurchaseProVersionViewController.swift */; };
|
||||
DCD4571C24F6CF0D00B58304 /* EQNGenericValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCD4571B24F6CF0D00B58304 /* EQNGenericValue.swift */; };
|
||||
DCDE0BD924E58CCE00209778 /* EQNMainTabBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = DCDE0BD824E58CCE00209778 /* EQNMainTabBarController.m */; };
|
||||
DCEFF21324F5821E009D3FE1 /* SettingDetailTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCEFF21224F5821E009D3FE1 /* SettingDetailTableViewCell.swift */; };
|
||||
DCEFF21724F58569009D3FE1 /* SettingSectionHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCEFF21624F58569009D3FE1 /* SettingSectionHeaderView.swift */; };
|
||||
DCEFF21A24F587E3009D3FE1 /* SettingItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCEFF21924F587E3009D3FE1 /* SettingItem.swift */; };
|
||||
DCF10DC624D2B8C7009F34C3 /* EQNPurchaseUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCF10DC524D2B8C7009F34C3 /* EQNPurchaseUtility.swift */; };
|
||||
DCF10DCD24D2C935009F34C3 /* EQNPurchaseAvailability.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCF10DCC24D2C935009F34C3 /* EQNPurchaseAvailability.swift */; };
|
||||
DCF4A54524F8DB8300B17326 /* SettingDateTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCF4A54424F8DB8300B17326 /* SettingDateTableViewCell.swift */; };
|
||||
DCF9E14D24F6D1AA002B6B1D /* EQNData.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCF9E14C24F6D1AA002B6B1D /* EQNData.swift */; };
|
||||
DCF9E14F24F6EA07002B6B1D /* EQNSeismicNetwork.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCF9E14E24F6EA07002B6B1D /* EQNSeismicNetwork.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
@@ -179,14 +185,10 @@
|
||||
8C13E84A220B2E7E0009CFE4 /* MenuSelezioneEntiViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MenuSelezioneEntiViewController.m; sourceTree = "<group>"; };
|
||||
8C13E84D220B89360009CFE4 /* ElencoFiltroEntiTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ElencoFiltroEntiTableViewController.h; sourceTree = "<group>"; };
|
||||
8C13E84E220B89360009CFE4 /* ElencoFiltroEntiTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ElencoFiltroEntiTableViewController.m; sourceTree = "<group>"; };
|
||||
8C14112C21ED2FA300A59729 /* AreaInteresseTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AreaInteresseTableViewController.h; sourceTree = "<group>"; };
|
||||
8C14112D21ED2FA300A59729 /* AreaInteresseTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AreaInteresseTableViewController.m; sourceTree = "<group>"; };
|
||||
8C14112F21ED3E5B00A59729 /* AllertaSismiTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AllertaSismiTableViewController.h; sourceTree = "<group>"; };
|
||||
8C14113021ED3E5B00A59729 /* AllertaSismiTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AllertaSismiTableViewController.m; sourceTree = "<group>"; };
|
||||
8C14112F21ED3E5B00A59729 /* SettingsRealTimeAlertsViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SettingsRealTimeAlertsViewController.h; sourceTree = "<group>"; };
|
||||
8C14113021ED3E5B00A59729 /* SettingsRealTimeAlertsViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SettingsRealTimeAlertsViewController.m; sourceTree = "<group>"; };
|
||||
8C14113521EE502800A59729 /* EQNAllertaSismica.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNAllertaSismica.h; sourceTree = "<group>"; };
|
||||
8C14113621EE502800A59729 /* EQNAllertaSismica.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNAllertaSismica.m; sourceTree = "<group>"; };
|
||||
8C149FA121E54E85002C44FD /* NotificheSismiTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NotificheSismiTableViewController.h; sourceTree = "<group>"; };
|
||||
8C149FA221E54E85002C44FD /* NotificheSismiTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NotificheSismiTableViewController.m; sourceTree = "<group>"; };
|
||||
8C2B250F21938BFD00E0E25E /* SegnalazioniUtenteDettagliMappa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SegnalazioniUtenteDettagliMappa.h; sourceTree = "<group>"; };
|
||||
8C2B251021938BFD00E0E25E /* SegnalazioniUtenteDettagliMappa.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SegnalazioniUtenteDettagliMappa.m; sourceTree = "<group>"; };
|
||||
8C2B25122193927E00E0E25E /* ReteSismiDettagliMappa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ReteSismiDettagliMappa.h; sourceTree = "<group>"; };
|
||||
@@ -218,8 +220,6 @@
|
||||
8C593E88217BA2470008B260 /* EQNSegnalazione.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNSegnalazione.h; sourceTree = "<group>"; };
|
||||
8C593E89217BA2470008B260 /* EQNSegnalazione.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNSegnalazione.m; sourceTree = "<group>"; };
|
||||
8C5EA22C21763102002DC156 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; };
|
||||
8C5EA2382177B3ED002DC156 /* MasterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MasterViewController.h; sourceTree = "<group>"; };
|
||||
8C5EA2392177B3ED002DC156 /* MasterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MasterViewController.m; sourceTree = "<group>"; };
|
||||
8C5EA23B2177B51C002DC156 /* SegnalazioniViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SegnalazioniViewController.h; sourceTree = "<group>"; };
|
||||
8C5EA23C2177B51C002DC156 /* SegnalazioniViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SegnalazioniViewController.m; sourceTree = "<group>"; };
|
||||
8C602244218D9DB200C799C2 /* PastquakesDettagliMappa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PastquakesDettagliMappa.h; sourceTree = "<group>"; };
|
||||
@@ -229,8 +229,6 @@
|
||||
8C6CBAE421597E79005C426A /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
|
||||
8C7A3B64225A5EA30045B266 /* NSDictionary+BVJSONString.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+BVJSONString.m"; sourceTree = "<group>"; };
|
||||
8C7A3B65225A5EA40045B266 /* NSDictionary+BVJSONString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+BVJSONString.h"; sourceTree = "<group>"; };
|
||||
8C7E945821E548A600B0B770 /* DettadliMenuTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DettadliMenuTableViewController.h; sourceTree = "<group>"; };
|
||||
8C7E945921E548A600B0B770 /* DettadliMenuTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DettadliMenuTableViewController.m; sourceTree = "<group>"; };
|
||||
8C8EBBA521540039002784BA /* EQNUser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNUser.h; sourceTree = "<group>"; };
|
||||
8C8EBBA621540039002784BA /* EQNUser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNUser.m; sourceTree = "<group>"; };
|
||||
8C9B755A2233A25100F8FDEE /* MenuFiltroEntiViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MenuFiltroEntiViewController.h; sourceTree = "<group>"; };
|
||||
@@ -253,7 +251,6 @@
|
||||
8CBD3DC82149B9AD0070C963 /* ReteSmartphone.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ReteSmartphone.h; sourceTree = "<group>"; };
|
||||
8CBD3DC92149B9AD0070C963 /* ReteSmartphone.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ReteSmartphone.m; sourceTree = "<group>"; };
|
||||
8CBD3DCC2149B9AD0070C963 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
8CBD3DCF2149B9AD0070C963 /* Earthquake_Network.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Earthquake_Network.xcdatamodel; sourceTree = "<group>"; };
|
||||
8CBD3DD12149B9AD0070C963 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
8CBD3DD42149B9AD0070C963 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
8CBD3DD72149B9AD0070C963 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
@@ -263,26 +260,18 @@
|
||||
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 = "<group>"; };
|
||||
8CCE164321E67F1300173CD9 /* EQNImpostazioniNotifiche.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNImpostazioniNotifiche.m; sourceTree = "<group>"; };
|
||||
8CCE164621E69AEC00173CD9 /* TempoRealeTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TempoRealeTableViewController.h; sourceTree = "<group>"; };
|
||||
8CCE164721E69AEC00173CD9 /* TempoRealeTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TempoRealeTableViewController.m; sourceTree = "<group>"; };
|
||||
8CCE164921E7BAB200173CD9 /* EQNNotificheTempoReale.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNNotificheTempoReale.h; sourceTree = "<group>"; };
|
||||
8CCE164A21E7BAB200173CD9 /* EQNNotificheTempoReale.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNNotificheTempoReale.m; sourceTree = "<group>"; };
|
||||
8CCE164C21E7BACE00173CD9 /* EQNNotificheSegnalazioniUtente.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNNotificheSegnalazioniUtente.h; sourceTree = "<group>"; };
|
||||
8CCE164D21E7BACE00173CD9 /* EQNNotificheSegnalazioniUtente.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNNotificheSegnalazioniUtente.m; sourceTree = "<group>"; };
|
||||
8CCE164F21E7BAEC00173CD9 /* EQNNotificeReteSismiche.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNNotificeReteSismiche.h; sourceTree = "<group>"; };
|
||||
8CCE165021E7BAEC00173CD9 /* EQNNotificeReteSismiche.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNNotificeReteSismiche.m; sourceTree = "<group>"; };
|
||||
8CCE165321EA378800173CD9 /* SegnalazioniUtentiTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SegnalazioniUtentiTableViewController.h; sourceTree = "<group>"; };
|
||||
8CCE165421EA378800173CD9 /* SegnalazioniUtentiTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SegnalazioniUtentiTableViewController.m; sourceTree = "<group>"; };
|
||||
8CCE165621EB1E0000173CD9 /* RetiSismicheTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RetiSismicheTableViewController.h; sourceTree = "<group>"; };
|
||||
8CCE165721EB1E0000173CD9 /* RetiSismicheTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RetiSismicheTableViewController.m; sourceTree = "<group>"; };
|
||||
8CCE165921EB7AD800173CD9 /* ListaEntiTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ListaEntiTableViewController.h; sourceTree = "<group>"; };
|
||||
8CCE165A21EB7AD800173CD9 /* ListaEntiTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ListaEntiTableViewController.m; sourceTree = "<group>"; };
|
||||
8CCE165C21EB9F2400173CD9 /* NotificheTsunamiTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NotificheTsunamiTableViewController.h; sourceTree = "<group>"; };
|
||||
8CCE165D21EB9F2400173CD9 /* NotificheTsunamiTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NotificheTsunamiTableViewController.m; sourceTree = "<group>"; };
|
||||
8CCE165321EA378800173CD9 /* SettingsUserReportAlertsViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SettingsUserReportAlertsViewController.h; sourceTree = "<group>"; };
|
||||
8CCE165421EA378800173CD9 /* SettingsUserReportAlertsViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SettingsUserReportAlertsViewController.m; sourceTree = "<group>"; };
|
||||
8CCE165621EB1E0000173CD9 /* SettingsSeismicNetworkAlertsViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SettingsSeismicNetworkAlertsViewController.h; sourceTree = "<group>"; };
|
||||
8CCE165721EB1E0000173CD9 /* SettingsSeismicNetworkAlertsViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SettingsSeismicNetworkAlertsViewController.m; sourceTree = "<group>"; };
|
||||
8CCE165F21EBA37500173CD9 /* EQNNotificheTsunami.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNNotificheTsunami.h; sourceTree = "<group>"; };
|
||||
8CCE166021EBA37500173CD9 /* EQNNotificheTsunami.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNNotificheTsunami.m; sourceTree = "<group>"; };
|
||||
8CCE166221EBEFBD00173CD9 /* MessaggioInformativoTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessaggioInformativoTableViewController.h; sourceTree = "<group>"; };
|
||||
8CCE166321EBEFBD00173CD9 /* MessaggioInformativoTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MessaggioInformativoTableViewController.m; sourceTree = "<group>"; };
|
||||
8CD0862C218A41930000CB5E /* CellDettagliMappaTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CellDettagliMappaTableViewCell.h; sourceTree = "<group>"; };
|
||||
8CD0862D218A41930000CB5E /* CellDettagliMappaTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CellDettagliMappaTableViewCell.m; sourceTree = "<group>"; };
|
||||
8CD0862F218ADFCA0000CB5E /* Cell_Reti_sismicheTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Cell_Reti_sismicheTableViewCell.h; sourceTree = "<group>"; };
|
||||
@@ -291,8 +280,6 @@
|
||||
8CD08634218AF6030000CB5E /* Cell_Meteo_TableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Cell_Meteo_TableViewCell.m; sourceTree = "<group>"; };
|
||||
8CD08636218B3BEE0000CB5E /* ReteSismicaAnnotation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ReteSismicaAnnotation.h; sourceTree = "<group>"; };
|
||||
8CD08637218B3BEE0000CB5E /* ReteSismicaAnnotation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ReteSismicaAnnotation.m; sourceTree = "<group>"; };
|
||||
8CEAE4D72163E23D001A42B9 /* SWRevealViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SWRevealViewController.h; sourceTree = "<group>"; };
|
||||
8CEAE4D82163E23D001A42B9 /* SWRevealViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SWRevealViewController.m; sourceTree = "<group>"; };
|
||||
8CF05B4B218C41F90055012B /* PickerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PickerViewController.m; sourceTree = "<group>"; };
|
||||
8CF05B4C218C41F90055012B /* TBDInputViewControllerData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TBDInputViewControllerData.h; sourceTree = "<group>"; };
|
||||
8CF05B4D218C41FA0055012B /* PickerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PickerViewController.h; sourceTree = "<group>"; };
|
||||
@@ -328,18 +315,26 @@
|
||||
8CF66055214C566A009F4314 /* ServerRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ServerRequest.m; sourceTree = "<group>"; };
|
||||
8CF66056214C566A009F4314 /* Reachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Reachability.m; sourceTree = "<group>"; };
|
||||
8CF66057214C566B009F4314 /* ServerRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ServerRequest.h; sourceTree = "<group>"; };
|
||||
8CFA631E2197F9C10099EB0E /* TsunamiViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TsunamiViewController.h; sourceTree = "<group>"; };
|
||||
8CFA631F2197F9C10099EB0E /* TsunamiViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TsunamiViewController.m; sourceTree = "<group>"; };
|
||||
8CFA6321219A2C610099EB0E /* Tsunami.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Tsunami.h; sourceTree = "<group>"; };
|
||||
8CFA6322219A2C610099EB0E /* Tsunami.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tsunami.m; sourceTree = "<group>"; };
|
||||
8CFA6324219A41590099EB0E /* DettagliTsunamiViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DettagliTsunamiViewController.h; sourceTree = "<group>"; };
|
||||
8CFA6325219A41590099EB0E /* DettagliTsunamiViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DettagliTsunamiViewController.m; sourceTree = "<group>"; };
|
||||
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 = "<group>"; };
|
||||
DC08803E24F5A89000186D97 /* SettingEnableTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingEnableTableViewCell.swift; sourceTree = "<group>"; };
|
||||
DC08804024F5B41400186D97 /* SettingSliderTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingSliderTableViewCell.swift; sourceTree = "<group>"; };
|
||||
DC0E551224F8063300D54270 /* SettingSegmentedTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingSegmentedTableViewCell.swift; sourceTree = "<group>"; };
|
||||
DC11ABE724E6700E00D866A8 /* UIColor+EQN.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+EQN.swift"; sourceTree = "<group>"; };
|
||||
DC27EB2E24F6EBE000ACBFE0 /* SettingsSeismicNetworksViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsSeismicNetworksViewController.swift; sourceTree = "<group>"; };
|
||||
DC3BA11024D1A9C90062EE7F /* SubscriptionsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriptionsViewController.swift; sourceTree = "<group>"; };
|
||||
DC414C0024CDA09A008D9AE4 /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = CHANGELOG.md; path = ../CHANGELOG.md; sourceTree = "<group>"; };
|
||||
DCAB01E224CEBFE800E8B54C /* MenuViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuViewController.swift; sourceTree = "<group>"; };
|
||||
DCAB01E424CEC12E00E8B54C /* MenuHeaderTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuHeaderTableViewCell.swift; sourceTree = "<group>"; };
|
||||
DCAB01E624CEC22100E8B54C /* MenuItemTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemTableViewCell.swift; sourceTree = "<group>"; };
|
||||
DC52B8A024FC145500ABEBA6 /* SettingsBaseViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SettingsBaseViewController.h; sourceTree = "<group>"; };
|
||||
DC52B8A124FC145500ABEBA6 /* SettingsBaseViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SettingsBaseViewController.m; sourceTree = "<group>"; };
|
||||
DC52B8A424FCCD6900ABEBA6 /* AppTheme.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppTheme.swift; sourceTree = "<group>"; };
|
||||
DC886A5B24E92D5500F7A5D3 /* EQNBaseViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNBaseViewController.h; sourceTree = "<group>"; };
|
||||
DC886A5C24E92D5500F7A5D3 /* EQNBaseViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNBaseViewController.m; sourceTree = "<group>"; };
|
||||
DC99A50224E66E270071BC9F /* EQNCommandProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EQNCommandProtocol.swift; sourceTree = "<group>"; };
|
||||
DC99A50424E66E430071BC9F /* EQNAppearanceCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EQNAppearanceCommand.swift; sourceTree = "<group>"; };
|
||||
DC99A50624E66E5F0071BC9F /* EQNStartupCommandsBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EQNStartupCommandsBuilder.swift; sourceTree = "<group>"; };
|
||||
DCAA913E24F68A1D00145A3D /* SettingMultivaluesTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingMultivaluesTableViewCell.swift; sourceTree = "<group>"; };
|
||||
DCB28CED24FB8400001F557E /* SettingsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsViewController.swift; sourceTree = "<group>"; };
|
||||
DCB6FBEB24D0B40600ED23B8 /* Colors.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Colors.xcassets; sourceTree = "<group>"; };
|
||||
DCBB267924D1E7F500F04559 /* SubscriptionsHeaderTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriptionsHeaderTableViewCell.swift; sourceTree = "<group>"; };
|
||||
DCBB267B24D1E98300F04559 /* EQNBaseTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EQNBaseTableViewCell.swift; sourceTree = "<group>"; };
|
||||
@@ -348,9 +343,18 @@
|
||||
DCC23DEB24D281CE003A2404 /* SubscriptionsActiveTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriptionsActiveTableViewCell.swift; sourceTree = "<group>"; };
|
||||
DCC23DEE24D28F58003A2404 /* EQNEdgeInsetLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EQNEdgeInsetLabel.swift; sourceTree = "<group>"; };
|
||||
DCD3E3BF24D15576007C78D4 /* PurchaseProVersionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PurchaseProVersionViewController.swift; sourceTree = "<group>"; };
|
||||
DCD4571B24F6CF0D00B58304 /* EQNGenericValue.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EQNGenericValue.swift; sourceTree = "<group>"; };
|
||||
DCDE0BD724E58CCE00209778 /* EQNMainTabBarController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQNMainTabBarController.h; sourceTree = "<group>"; };
|
||||
DCDE0BD824E58CCE00209778 /* EQNMainTabBarController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQNMainTabBarController.m; sourceTree = "<group>"; };
|
||||
DCEFF21224F5821E009D3FE1 /* SettingDetailTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingDetailTableViewCell.swift; sourceTree = "<group>"; };
|
||||
DCEFF21624F58569009D3FE1 /* SettingSectionHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingSectionHeaderView.swift; sourceTree = "<group>"; };
|
||||
DCEFF21924F587E3009D3FE1 /* SettingItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingItem.swift; sourceTree = "<group>"; };
|
||||
DCF10DC524D2B8C7009F34C3 /* EQNPurchaseUtility.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EQNPurchaseUtility.swift; sourceTree = "<group>"; };
|
||||
DCF10DCC24D2C935009F34C3 /* EQNPurchaseAvailability.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EQNPurchaseAvailability.swift; sourceTree = "<group>"; };
|
||||
DCF10DDB24D2E7BE009F34C3 /* Earthquake Network-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Earthquake Network-Prefix.pch"; sourceTree = "<group>"; };
|
||||
DCF4A54424F8DB8300B17326 /* SettingDateTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingDateTableViewCell.swift; sourceTree = "<group>"; };
|
||||
DCF9E14C24F6D1AA002B6B1D /* EQNData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EQNData.swift; sourceTree = "<group>"; };
|
||||
DCF9E14E24F6EA07002B6B1D /* EQNSeismicNetwork.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EQNSeismicNetwork.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -414,28 +418,19 @@
|
||||
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 */,
|
||||
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 */,
|
||||
@@ -510,7 +505,6 @@
|
||||
8CBD3DC52149B9AD0070C963 /* AppDelegate.h */,
|
||||
8CBD3DC62149B9AD0070C963 /* AppDelegate.m */,
|
||||
8C483CB021FDA8C700259FD2 /* Earthquake Network-Bridging-Header.h */,
|
||||
8CBD3DCE2149B9AD0070C963 /* Earthquake_Network.xcdatamodeld */,
|
||||
DCB6FBEA24D0B11300ED23B8 /* Controllers */,
|
||||
DCB6FBE924D0B0DF00ED23B8 /* Models */,
|
||||
DCC23DED24D28F41003A2404 /* UI */,
|
||||
@@ -536,33 +530,6 @@
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8CCE164521E69A9300173CD9 /* impostazioniNotifiche */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
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 = "<group>";
|
||||
};
|
||||
8CCE165221EA370200173CD9 /* impostazioni notifiche */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -670,6 +637,14 @@
|
||||
name = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DC11ABE924E6707900D866A8 /* Extensions */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DC11ABE724E6700E00D866A8 /* UIColor+EQN.swift */,
|
||||
);
|
||||
path = Extensions;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DC3ADD2A24CB1E6600737919 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -724,23 +699,29 @@
|
||||
path = Storyboards;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DCAB01E124CEBFD500E8B54C /* Menu */ = {
|
||||
DC99A50124E66DFB0071BC9F /* Commands */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DCAB01E224CEBFE800E8B54C /* MenuViewController.swift */,
|
||||
DCAB01E424CEC12E00E8B54C /* MenuHeaderTableViewCell.swift */,
|
||||
DCAB01E624CEC22100E8B54C /* MenuItemTableViewCell.swift */,
|
||||
DC99A50224E66E270071BC9F /* EQNCommandProtocol.swift */,
|
||||
DC99A50624E66E5F0071BC9F /* EQNStartupCommandsBuilder.swift */,
|
||||
DC99A50424E66E430071BC9F /* EQNAppearanceCommand.swift */,
|
||||
);
|
||||
path = Menu;
|
||||
path = Commands;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DCB6FBE924D0B0DF00ED23B8 /* Models */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DCF9E15024F6EA0B002B6B1D /* Networks */,
|
||||
DC11ABE924E6707900D866A8 /* Extensions */,
|
||||
DC99A50124E66DFB0071BC9F /* Commands */,
|
||||
DCEFF21824F587CC009D3FE1 /* Settings */,
|
||||
8C483CBB21FDACE500259FD2 /* VersioneProProducts.swift */,
|
||||
8C483CB721FDACD300259FD2 /* IAPHelper.swift */,
|
||||
DCF10DC524D2B8C7009F34C3 /* EQNPurchaseUtility.swift */,
|
||||
DCF10DCC24D2C935009F34C3 /* EQNPurchaseAvailability.swift */,
|
||||
DCD4571B24F6CF0D00B58304 /* EQNGenericValue.swift */,
|
||||
DCF9E14C24F6D1AA002B6B1D /* EQNData.swift */,
|
||||
);
|
||||
path = Models;
|
||||
sourceTree = "<group>";
|
||||
@@ -748,8 +729,12 @@
|
||||
DCB6FBEA24D0B11300ED23B8 /* Controllers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DCDE0BD724E58CCE00209778 /* EQNMainTabBarController.h */,
|
||||
DCDE0BD824E58CCE00209778 /* EQNMainTabBarController.m */,
|
||||
DC886A5B24E92D5500F7A5D3 /* EQNBaseViewController.h */,
|
||||
DC886A5C24E92D5500F7A5D3 /* EQNBaseViewController.m */,
|
||||
DCD3E3BE24D1555F007C78D4 /* InApp */,
|
||||
DCAB01E124CEBFD500E8B54C /* Menu */,
|
||||
DCEFF21024F57163009D3FE1 /* Settings */,
|
||||
);
|
||||
path = Controllers;
|
||||
sourceTree = "<group>";
|
||||
@@ -758,6 +743,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DCC23DEE24D28F58003A2404 /* EQNEdgeInsetLabel.swift */,
|
||||
DC52B8A424FCCD6900ABEBA6 /* AppTheme.swift */,
|
||||
);
|
||||
path = UI;
|
||||
sourceTree = "<group>";
|
||||
@@ -776,6 +762,54 @@
|
||||
path = InApp;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DCEFF21024F57163009D3FE1 /* Settings */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DCEFF21124F581F9009D3FE1 /* Cells */,
|
||||
DCB28CED24FB8400001F557E /* SettingsViewController.swift */,
|
||||
DC52B8A024FC145500ABEBA6 /* SettingsBaseViewController.h */,
|
||||
DC52B8A124FC145500ABEBA6 /* SettingsBaseViewController.m */,
|
||||
8CCE165321EA378800173CD9 /* SettingsUserReportAlertsViewController.h */,
|
||||
8CCE165421EA378800173CD9 /* SettingsUserReportAlertsViewController.m */,
|
||||
8CCE165621EB1E0000173CD9 /* SettingsSeismicNetworkAlertsViewController.h */,
|
||||
8CCE165721EB1E0000173CD9 /* SettingsSeismicNetworkAlertsViewController.m */,
|
||||
DC27EB2E24F6EBE000ACBFE0 /* SettingsSeismicNetworksViewController.swift */,
|
||||
8C14112F21ED3E5B00A59729 /* SettingsRealTimeAlertsViewController.h */,
|
||||
8C14113021ED3E5B00A59729 /* SettingsRealTimeAlertsViewController.m */,
|
||||
);
|
||||
path = Settings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DCEFF21124F581F9009D3FE1 /* Cells */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DCEFF21624F58569009D3FE1 /* SettingSectionHeaderView.swift */,
|
||||
DCEFF21224F5821E009D3FE1 /* SettingDetailTableViewCell.swift */,
|
||||
DC08803E24F5A89000186D97 /* SettingEnableTableViewCell.swift */,
|
||||
DC08804024F5B41400186D97 /* SettingSliderTableViewCell.swift */,
|
||||
DCAA913E24F68A1D00145A3D /* SettingMultivaluesTableViewCell.swift */,
|
||||
DC0E551224F8063300D54270 /* SettingSegmentedTableViewCell.swift */,
|
||||
DCF4A54424F8DB8300B17326 /* SettingDateTableViewCell.swift */,
|
||||
);
|
||||
path = Cells;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DCEFF21824F587CC009D3FE1 /* Settings */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DCEFF21924F587E3009D3FE1 /* SettingItem.swift */,
|
||||
);
|
||||
path = Settings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DCF9E15024F6EA0B002B6B1D /* Networks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DCF9E14E24F6EA07002B6B1D /* EQNSeismicNetwork.swift */,
|
||||
);
|
||||
path = Networks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
@@ -1044,68 +1078,74 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
DCEFF21324F5821E009D3FE1 /* SettingDetailTableViewCell.swift in Sources */,
|
||||
8CF05B54218C41FB0055012B /* TBDInputViewControllerData.m in Sources */,
|
||||
8CCE166121EBA37500173CD9 /* EQNNotificheTsunami.m in Sources */,
|
||||
DCC23DEF24D28F58003A2404 /* EQNEdgeInsetLabel.swift in Sources */,
|
||||
DCAB01E524CEC12E00E8B54C /* MenuHeaderTableViewCell.swift in Sources */,
|
||||
8CCE165121E7BAEC00173CD9 /* EQNNotificeReteSismiche.m in Sources */,
|
||||
8C13E84B220B2E7E0009CFE4 /* MenuSelezioneEntiViewController.m in Sources */,
|
||||
DC52B8A224FC145500ABEBA6 /* SettingsBaseViewController.m in Sources */,
|
||||
8CF4F4DB216D44930057110B /* EQNPastquakes.m in Sources */,
|
||||
8CCE165821EB1E0000173CD9 /* RetiSismicheTableViewController.m in Sources */,
|
||||
8CCE165521EA378800173CD9 /* SegnalazioniUtentiTableViewController.m in Sources */,
|
||||
8CCE165821EB1E0000173CD9 /* SettingsSeismicNetworkAlertsViewController.m in Sources */,
|
||||
8CCE165521EA378800173CD9 /* SettingsUserReportAlertsViewController.m in Sources */,
|
||||
DCBB268024D1ECE200F04559 /* SubscriptionDetailViewController.swift in Sources */,
|
||||
DCBB267E24D1EA2000F04559 /* SubscriptionProductTableViewCell.swift in Sources */,
|
||||
8CFA6323219A2C610099EB0E /* Tsunami.m in Sources */,
|
||||
DC99A50524E66E430071BC9F /* EQNAppearanceCommand.swift in Sources */,
|
||||
8CCE164E21E7BACE00173CD9 /* EQNNotificheSegnalazioniUtente.m in Sources */,
|
||||
DCD4571C24F6CF0D00B58304 /* EQNGenericValue.swift 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 */,
|
||||
DCAA913F24F68A1D00145A3D /* SettingMultivaluesTableViewCell.swift in Sources */,
|
||||
DCF9E14F24F6EA07002B6B1D /* EQNSeismicNetwork.swift in Sources */,
|
||||
8CCE164421E67F1300173CD9 /* EQNImpostazioniNotifiche.m in Sources */,
|
||||
8C14113721EE502800A59729 /* EQNAllertaSismica.m in Sources */,
|
||||
8C483CBC21FDACE500259FD2 /* VersioneProProducts.swift in Sources */,
|
||||
8C483CB821FDACD300259FD2 /* IAPHelper.swift in Sources */,
|
||||
DCDE0BD924E58CCE00209778 /* EQNMainTabBarController.m in Sources */,
|
||||
8C4E344B2152EE5B008B0D2A /* EQNGeneratoreURLServer.m in Sources */,
|
||||
8CCE164821E69AEC00173CD9 /* TempoRealeTableViewController.m in Sources */,
|
||||
DC99A50724E66E5F0071BC9F /* EQNStartupCommandsBuilder.swift 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 */,
|
||||
DCF9E14D24F6D1AA002B6B1D /* EQNData.swift in Sources */,
|
||||
8C9B755F2233BFDE00F8FDEE /* FiltroEnti.m in Sources */,
|
||||
DCAB01E724CEC22100E8B54C /* MenuItemTableViewCell.swift in Sources */,
|
||||
DC52B8A524FCCD6900ABEBA6 /* AppTheme.swift in Sources */,
|
||||
DC27EB2F24F6EBE000ACBFE0 /* SettingsSeismicNetworksViewController.swift in Sources */,
|
||||
8CF66059214C566B009F4314 /* Reachability.m in Sources */,
|
||||
DC886A5D24E92D5500F7A5D3 /* EQNBaseViewController.m in Sources */,
|
||||
8C593E8A217BA2470008B260 /* EQNSegnalazione.m in Sources */,
|
||||
8C14112E21ED2FA300A59729 /* AreaInteresseTableViewController.m in Sources */,
|
||||
DCBB267C24D1E98300F04559 /* EQNBaseTableViewCell.swift in Sources */,
|
||||
8CBD3DCA2149B9AD0070C963 /* ReteSmartphone.m in Sources */,
|
||||
DCF10DCD24D2C935009F34C3 /* EQNPurchaseAvailability.swift in Sources */,
|
||||
8C13E84F220B89360009CFE4 /* ElencoFiltroEntiTableViewController.m in Sources */,
|
||||
8CFA6326219A41590099EB0E /* DettagliTsunamiViewController.m in Sources */,
|
||||
DC08803F24F5A89000186D97 /* SettingEnableTableViewCell.swift in Sources */,
|
||||
8CAFD7C521825E4A00F8BD29 /* EQNSisma.m in Sources */,
|
||||
DCC23DEC24D281CE003A2404 /* SubscriptionsActiveTableViewCell.swift in Sources */,
|
||||
8CF6604F214C0E58009F4314 /* EQNCalibrazione.m in Sources */,
|
||||
DCD3E3C024D15576007C78D4 /* PurchaseProVersionViewController.swift in Sources */,
|
||||
8C2B25142193927E00E0E25E /* ReteSismiDettagliMappa.m in Sources */,
|
||||
8CF05B51218C41FB0055012B /* PickerViewController.m in Sources */,
|
||||
DC99A50324E66E270071BC9F /* EQNCommandProtocol.swift 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 */,
|
||||
DCF10DC624D2B8C7009F34C3 /* EQNPurchaseUtility.swift in Sources */,
|
||||
8C2B251121938BFD00E0E25E /* SegnalazioniUtenteDettagliMappa.m in Sources */,
|
||||
8C5EA23A2177B3ED002DC156 /* MasterViewController.m in Sources */,
|
||||
8C14113121ED3E5B00A59729 /* AllertaSismiTableViewController.m in Sources */,
|
||||
DC0E551324F8063300D54270 /* SettingSegmentedTableViewCell.swift in Sources */,
|
||||
DCEFF21724F58569009D3FE1 /* SettingSectionHeaderView.swift in Sources */,
|
||||
8C14113121ED3E5B00A59729 /* SettingsRealTimeAlertsViewController.m in Sources */,
|
||||
8CCE164B21E7BAB200173CD9 /* EQNNotificheTempoReale.m in Sources */,
|
||||
DCBB267A24D1E7F500F04559 /* SubscriptionsHeaderTableViewCell.swift in Sources */,
|
||||
8CEAE4D92163E23E001A42B9 /* SWRevealViewController.m in Sources */,
|
||||
8CF4F4D2216D2C780057110B /* EQNReteSmartphone.m in Sources */,
|
||||
DC08804124F5B41400186D97 /* SettingSliderTableViewCell.swift 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 */,
|
||||
DCF4A54524F8DB8300B17326 /* SettingDateTableViewCell.swift in Sources */,
|
||||
8C60224A218EDBE200C799C2 /* PastquakesAnnotation.m in Sources */,
|
||||
8CC1B15A217CB09100F22178 /* DettagliMappaViewController.m in Sources */,
|
||||
8C5EA23D2177B51C002DC156 /* SegnalazioniViewController.m in Sources */,
|
||||
@@ -1113,14 +1153,14 @@
|
||||
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 */,
|
||||
DCB28CEE24FB8400001F557E /* SettingsViewController.swift in Sources */,
|
||||
8C602246218D9DB200C799C2 /* PastquakesDettagliMappa.m in Sources */,
|
||||
8CAFD7C82182648600F8BD29 /* EQNRetiSismiViewController.m in Sources */,
|
||||
DCAB01E324CEBFE800E8B54C /* MenuViewController.swift in Sources */,
|
||||
DCEFF21A24F587E3009D3FE1 /* SettingItem.swift in Sources */,
|
||||
8C8EBBA721540039002784BA /* EQNUser.m in Sources */,
|
||||
8CADAA9421B2627D0044E256 /* LogViewController.m in Sources */,
|
||||
8CCE166421EBEFBD00173CD9 /* MessaggioInformativoTableViewController.m in Sources */,
|
||||
DC11ABE824E6700E00D866A8 /* UIColor+EQN.swift in Sources */,
|
||||
DC3BA11124D1A9C90062EE7F /* SubscriptionsViewController.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@@ -1210,11 +1250,12 @@
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = 9;
|
||||
CURRENT_PROJECT_VERSION = 24;
|
||||
DEVELOPMENT_TEAM = WJA4MR4CPC;
|
||||
INFOPLIST_FILE = EQNNotificationService/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
|
||||
MARKETING_VERSION = 2.2.1;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.finazzi.distquake.EQNNotificationService;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "Earthquake Network Extensions - Development";
|
||||
@@ -1231,11 +1272,12 @@
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = 9;
|
||||
CURRENT_PROJECT_VERSION = 24;
|
||||
DEVELOPMENT_TEAM = WJA4MR4CPC;
|
||||
INFOPLIST_FILE = EQNNotificationService/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
|
||||
MARKETING_VERSION = 2.2.1;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.finazzi.distquake.EQNNotificationService;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "Earthquake Network Extensions - Development";
|
||||
@@ -1366,13 +1408,14 @@
|
||||
CODE_SIGN_ENTITLEMENTS = "Earthquake Network/Earthquake Network.entitlements";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = 9;
|
||||
CURRENT_PROJECT_VERSION = 24;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = WJA4MR4CPC;
|
||||
GCC_PREFIX_HEADER = "Earthquake Network/Earthquake Network-Prefix.pch";
|
||||
INFOPLIST_FILE = "Earthquake Network/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
MARKETING_VERSION = 2.2.1;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.finazzi.distquake;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE = "";
|
||||
@@ -1393,12 +1436,13 @@
|
||||
CODE_SIGN_ENTITLEMENTS = "Earthquake Network/Earthquake Network.entitlements";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = 9;
|
||||
CURRENT_PROJECT_VERSION = 24;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = WJA4MR4CPC;
|
||||
GCC_PREFIX_HEADER = "Earthquake Network/Earthquake Network-Prefix.pch";
|
||||
INFOPLIST_FILE = "Earthquake Network/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
MARKETING_VERSION = 2.2.1;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.finazzi.distquake;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE = "";
|
||||
@@ -1414,11 +1458,12 @@
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = 9;
|
||||
CURRENT_PROJECT_VERSION = 24;
|
||||
DEVELOPMENT_TEAM = WJA4MR4CPC;
|
||||
INFOPLIST_FILE = EQNNotificationContent/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
|
||||
MARKETING_VERSION = 2.2.1;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.finazzi.distquake.EQNNotificationContent;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "Earthquake Network Extensions - Development";
|
||||
@@ -1435,11 +1480,12 @@
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = 9;
|
||||
CURRENT_PROJECT_VERSION = 24;
|
||||
DEVELOPMENT_TEAM = WJA4MR4CPC;
|
||||
INFOPLIST_FILE = EQNNotificationContent/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
|
||||
MARKETING_VERSION = 2.2.1;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.finazzi.distquake.EQNNotificationContent;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "Earthquake Network Extensions - Development";
|
||||
@@ -1490,19 +1536,6 @@
|
||||
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 = "<group>";
|
||||
versionGroupType = wrapper.xcdatamodel;
|
||||
};
|
||||
/* End XCVersionGroup section */
|
||||
};
|
||||
rootObject = 8CBD3DBA2149B9AD0070C963 /* Project object */;
|
||||
}
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Termogea.ipa</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>architectures</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>certificate</key>
|
||||
<dict>
|
||||
<key>SHA1</key>
|
||||
<string></string>
|
||||
<key>dateExpires</key>
|
||||
<string></string>
|
||||
<key>type</key>
|
||||
<string>Unknown</string>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>Telegea.app</string>
|
||||
<key>team</key>
|
||||
<dict>
|
||||
<key>id</key>
|
||||
<string>4E74YD2Y2V</string>
|
||||
<key>name</key>
|
||||
<string>DEK Italia S.R.L</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>compileBitcode</key>
|
||||
<true/>
|
||||
<key>destination</key>
|
||||
<string>export</string>
|
||||
<key>method</key>
|
||||
<string>ad-hoc</string>
|
||||
<key>signingStyle</key>
|
||||
<string>automatic</string>
|
||||
<key>stripSwiftSymbols</key>
|
||||
<true/>
|
||||
<key>teamID</key>
|
||||
<string>4E74YD2Y2V</string>
|
||||
<key>thinning</key>
|
||||
<string><none></string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -7,18 +7,15 @@
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <CoreData/CoreData.h>
|
||||
#import "MasterViewController.h"
|
||||
#import "ReteSmartphone.h"
|
||||
|
||||
@class EQNMainTabBarController;
|
||||
@class ReteSmartphone;
|
||||
|
||||
@interface AppDelegate : UIResponder <UIApplicationDelegate>
|
||||
|
||||
@property (strong, nonatomic) UIWindow *window;
|
||||
@property (strong, nonatomic) MasterViewController *masterViewController;
|
||||
@property (strong, nonatomic) ReteSmartphone *reteSmartphone;
|
||||
@property (readonly, strong) NSPersistentContainer *persistentContainer;
|
||||
|
||||
- (void)saveContext;
|
||||
|
||||
@property (weak, nonatomic) EQNMainTabBarController *mainTabBarController;
|
||||
@property (weak, nonatomic) ReteSmartphone *reteSmartphone;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -7,16 +7,16 @@
|
||||
//
|
||||
|
||||
#import "AppDelegate.h"
|
||||
#import "EQNUser.h"
|
||||
#import "Costanti.h"
|
||||
#import "EQNUser.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 "EQNMainTabBarController.h"
|
||||
|
||||
@import GoogleMaps;
|
||||
@import Firebase;
|
||||
@@ -24,7 +24,7 @@
|
||||
@import GoogleMobileAds;
|
||||
|
||||
@interface AppDelegate () <FIRMessagingDelegate, UNUserNotificationCenterDelegate>
|
||||
|
||||
@property (strong, nonatomic) NSArray<id<EQNCommandProtocol>> *commands;
|
||||
@end
|
||||
|
||||
@implementation AppDelegate
|
||||
@@ -42,6 +42,11 @@
|
||||
[FIRApp configure];
|
||||
[FIRMessaging messaging].delegate = self;
|
||||
|
||||
// execute commands
|
||||
EQNStartupCommandsBuilder *builder = [[EQNStartupCommandsBuilder alloc] init];
|
||||
self.commands = [builder build];
|
||||
[builder executeWithCommands:self.commands];
|
||||
|
||||
[UNUserNotificationCenter currentNotificationCenter].delegate = self;
|
||||
UNAuthorizationOptions authOptions = UNAuthorizationOptionAlert | UNAuthorizationOptionSound | UNAuthorizationOptionBadge;
|
||||
[[UNUserNotificationCenter currentNotificationCenter]
|
||||
@@ -97,7 +102,6 @@
|
||||
- (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 didReceiveRemoteNotification:(NSDictionary *)userInfo
|
||||
@@ -154,8 +158,7 @@ fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
|
||||
else if([userInfo[@"type"] isEqualToString:@"tsunami"])
|
||||
indexPath = [NSIndexPath indexPathForRow:3 inSection:0];
|
||||
|
||||
// [self.masterViewController selezionaItem:indexPath];
|
||||
[self.masterViewController sincronizza];
|
||||
[self.mainTabBarController sincronizza];
|
||||
|
||||
|
||||
// Change this to your preferred presentation option
|
||||
@@ -171,83 +174,39 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response
|
||||
|
||||
// response.notification.request.content.sound = [UNNotificationSound soundNamed:[EQNAllertaSismica center].tonoAllarme];
|
||||
NSDictionary *userInfo = response.notification.request.content.userInfo;
|
||||
NSIndexPath *indexPath;
|
||||
EQNTabBarSection section = EQNTabBarSectionAllerte;
|
||||
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];
|
||||
section = EQNTabBarSectionAllerte;
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
} else if([userInfo[@"type"] isEqualToString:@"manual"]) {
|
||||
section = EQNTabBarSectionSegnalazioni;
|
||||
} else if([userInfo[@"type"] isEqualToString:@"official"]) {
|
||||
section = EQNTabBarSectionRetiSismiche;
|
||||
} else if([userInfo[@"type"] isEqualToString:@"tsunami"]) {
|
||||
// not handled
|
||||
}
|
||||
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];
|
||||
|
||||
[self.mainTabBarController sincronizza];
|
||||
[self.mainTabBarController selectSection:section];
|
||||
|
||||
// Print full message.
|
||||
completionHandler();
|
||||
}
|
||||
|
||||
-(void)application:(UIApplication *)application performFetchWithCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler{
|
||||
- (void)application:(UIApplication *)application performFetchWithCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler{
|
||||
|
||||
[self.masterViewController fetchNewDataWithCompletionHandler:^(UIBackgroundFetchResult result) {
|
||||
[self.mainTabBarController 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();
|
||||
}
|
||||
}
|
||||
#pragma mark - FIRMessagingDelegate
|
||||
|
||||
- (void)messaging:(FIRMessaging *)messaging didReceiveRegistrationToken:(NSString *)fcmToken {
|
||||
|
||||
@@ -262,7 +221,6 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response
|
||||
[EQNAllertaSismica center].raggioSismiLievi = @"300";
|
||||
[EQNAllertaSismica center].raggioSismiForti = @"600";
|
||||
[EQNAllertaSismica center].sismiDaNotificare = @"0";
|
||||
[EQNAllertaSismica center].isSimiSenzaIntensita = YES;;
|
||||
[[EQNAllertaSismica center] saveUserInfo];
|
||||
|
||||
[EQNNotificheSegnalazioniUtente center].isAbilitato = YES;
|
||||
@@ -271,7 +229,6 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response
|
||||
|
||||
[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";
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
@@ -18,11 +16,11 @@
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="distquake_app_wave" translatesAutoresizingMaskIntoConstraints="NO" id="Dzo-29-2FJ">
|
||||
<rect key="frame" x="163.5" y="309.5" width="48" height="48"/>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="eq_icon" translatesAutoresizingMaskIntoConstraints="NO" id="Dzo-29-2FJ">
|
||||
<rect key="frame" x="104.5" y="250.5" width="166" height="166"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="48" id="LX1-1B-H0W"/>
|
||||
<constraint firstAttribute="height" constant="48" id="UPu-Jc-qjT"/>
|
||||
<constraint firstAttribute="width" constant="166" id="LX1-1B-H0W"/>
|
||||
<constraint firstAttribute="height" constant="166" id="UPu-Jc-qjT"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
@@ -40,6 +38,6 @@
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="distquake_app_wave" width="34.909091949462891" height="34.909091949462891"/>
|
||||
<image name="eq_icon" width="166" height="166"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// EQNBaseViewController.h
|
||||
// Earthquake Network
|
||||
//
|
||||
// Created by Busi Andrea on 16/08/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface EQNBaseViewController : UIViewController
|
||||
|
||||
- (void)refreshUI;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,82 @@
|
||||
//
|
||||
// EQNBaseViewController.m
|
||||
// Earthquake Network
|
||||
//
|
||||
// Created by Busi Andrea on 16/08/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
#import "EQNBaseViewController.h"
|
||||
#import "EQNUtility.h"
|
||||
@import GoogleMobileAds;
|
||||
|
||||
@interface EQNBaseViewController ()
|
||||
@property (weak, nonatomic) IBOutlet UIView *bannerContainerView;
|
||||
@property (strong, nonatomic) GADBannerView *bannerView;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *bannerContainerHeightConstraint;
|
||||
@end
|
||||
|
||||
@implementation EQNBaseViewController
|
||||
|
||||
#pragma mark - View Lifecycle
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
|
||||
[self addBannerView];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(didReceiveInAppNotification:)
|
||||
name:IAPHelperPurchaseNotification object:nil];
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - Public
|
||||
|
||||
- (void)refreshUI
|
||||
{
|
||||
// nope
|
||||
}
|
||||
|
||||
#pragma mark - Notification
|
||||
|
||||
- (void)didReceiveInAppNotification:(NSNotification *)notification
|
||||
{
|
||||
[self.bannerView removeFromSuperview];
|
||||
self.bannerView = nil;
|
||||
self.bannerContainerHeightConstraint.constant = 0;
|
||||
}
|
||||
|
||||
#pragma mark - Private
|
||||
|
||||
- (void)addBannerView
|
||||
{
|
||||
self.bannerView = [self createBannerView];
|
||||
if (self.bannerView == nil) {
|
||||
self.bannerContainerHeightConstraint.constant = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
self.bannerView.translatesAutoresizingMaskIntoConstraints = NO;
|
||||
[self.view addSubview:self.bannerView];
|
||||
|
||||
[[self.bannerView.centerXAnchor constraintEqualToAnchor:self.bannerContainerView.centerXAnchor] setActive:YES];
|
||||
[[self.bannerView.bottomAnchor constraintEqualToAnchor:self.bannerContainerView.safeAreaLayoutGuide.bottomAnchor] setActive:YES];
|
||||
}
|
||||
|
||||
- (GADBannerView *)createBannerView
|
||||
{
|
||||
if ([EQNPurchaseUtility isProVersionEnabled]) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
GADBannerView *bannerView = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner];
|
||||
bannerView.adUnitID = EQN_ADMOB_ANNUNCIO_IDA;
|
||||
bannerView.rootViewController = self;
|
||||
bannerView.backgroundColor = [UIColor whiteColor];
|
||||
[bannerView loadRequest:[GADRequest request]];
|
||||
return bannerView;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// EQNMainTabBarController.h
|
||||
// Earthquake Network
|
||||
//
|
||||
// Created by Busi Andrea on 13/08/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/// Sections inside the app
|
||||
typedef NS_ENUM(NSInteger, EQNTabBarSection) {
|
||||
EQNTabBarSectionAllerte = 0,
|
||||
EQNTabBarSectionSegnalazioni,
|
||||
EQNTabBarSectionRetiSismiche,
|
||||
EQNTabBarSectionImpostazioni
|
||||
};
|
||||
|
||||
@interface EQNMainTabBarController : UITabBarController
|
||||
|
||||
- (void)sincronizza;
|
||||
- (void)fetchNewDataWithCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler;
|
||||
- (void)selectSection:(EQNTabBarSection)section;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,138 @@
|
||||
//
|
||||
// EQNMainTabBarController.m
|
||||
// Earthquake Network
|
||||
//
|
||||
// Created by Busi Andrea on 13/08/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
#import "EQNMainTabBarController.h"
|
||||
#import "AppDelegate.h"
|
||||
#import "EQNBaseViewController.h"
|
||||
|
||||
#import "EQNUtility.h"
|
||||
#import "EQNManager.h"
|
||||
#import "EQNGeneratoreURLServer.h"
|
||||
#import "ServerRequest.h"
|
||||
|
||||
@interface EQNMainTabBarController () <UITabBarControllerDelegate>
|
||||
@property (nonatomic, strong) IBOutlet UIBarButtonItem *sidebarButton;
|
||||
@end
|
||||
|
||||
@implementation EQNMainTabBarController
|
||||
|
||||
static NSString * const SegueIdentifierInitialLoading = @"ShowInitialLoading";
|
||||
static NSString * const SegueIdentifierSettings = @"ShowSettings";
|
||||
static NSString * const SegueIdentifierLogs = @"ShowLogs";
|
||||
|
||||
#pragma mark - View Lifecycle
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
|
||||
self.delegate = self;
|
||||
|
||||
AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
|
||||
appDelegate.mainTabBarController = self;
|
||||
|
||||
[self sincronizza];
|
||||
|
||||
// check for an AppStore receipt
|
||||
NSURL *receiptURL = [[NSBundle mainBundle] appStoreReceiptURL];
|
||||
NSData *receipt = [NSData dataWithContentsOfURL:receiptURL];
|
||||
if (receipt) {
|
||||
[[ServerRequest defaultServerConnectionSingleton] inviaRicevuta:receipt success:^(id result) {
|
||||
// nope
|
||||
} failure:^(NSError *error) {
|
||||
// nope
|
||||
}];
|
||||
}
|
||||
|
||||
// show loader controller during initial data download
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[self performSegueWithIdentifier:SegueIdentifierInitialLoading sender:self];
|
||||
});
|
||||
}
|
||||
|
||||
#pragma mark - Public
|
||||
|
||||
- (void)sincronizza
|
||||
{
|
||||
[[EQNManager defaultManager] sincronizza];
|
||||
}
|
||||
|
||||
- (void)fetchNewDataWithCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
|
||||
{
|
||||
NSURL *url = [EQNGeneratoreURLServer urlPosizione];
|
||||
[[ServerRequest defaultServerConnectionSingleton] inviaInformazioniAlServerWithURL:url richiesta:posizione success:^(id result) {
|
||||
completionHandler(UIBackgroundFetchResultNewData);
|
||||
} failure:^(NSError *error) {
|
||||
completionHandler(UIBackgroundFetchResultFailed);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)selectSection:(EQNTabBarSection)section
|
||||
{
|
||||
NSInteger index = 0;
|
||||
switch (section) {
|
||||
case EQNTabBarSectionAllerte: index = 0; break;
|
||||
case EQNTabBarSectionSegnalazioni: index = 1; break;
|
||||
case EQNTabBarSectionRetiSismiche: index = 2; break;
|
||||
case EQNTabBarSectionImpostazioni: index = 3; break;
|
||||
}
|
||||
|
||||
self.selectedIndex = index;
|
||||
}
|
||||
|
||||
#pragma mark - Private
|
||||
|
||||
- (void)saveSettings
|
||||
{
|
||||
[[ServerRequest defaultServerConnectionSingleton] inviaInformazioniAlServerWithURL:[EQNGeneratoreURLServer urlInvioImpostazioniNotifiche] richiesta:impostazioniNotifiche success:^(id result){
|
||||
NSLog(@"Settings saved successfully");
|
||||
} failure:^(NSError *error){
|
||||
NSLog(@"Settings saved failed. Error: %@", error.localizedDescription);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Helpers
|
||||
|
||||
- (UIViewController *)getTopControllerFromController:(UIViewController *)viewController
|
||||
{
|
||||
// check if the given controller is a UINavigationController
|
||||
// and, if yes, returns the top view controller
|
||||
UIViewController *topController = viewController;
|
||||
if ([viewController isKindOfClass:[UINavigationController class]]) {
|
||||
UINavigationController *navController = (UINavigationController *)viewController;
|
||||
topController = navController.viewControllers.firstObject;
|
||||
}
|
||||
|
||||
return topController;
|
||||
}
|
||||
|
||||
#pragma mark - UITabBarControllerDelegate
|
||||
|
||||
- (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController
|
||||
{
|
||||
// if user switch from settings page, we need to force a settings save
|
||||
UIViewController *controller = [self getTopControllerFromController:tabBarController.selectedViewController];
|
||||
if ([controller isKindOfClass:[SettingsViewController class]]) {
|
||||
[self saveSettings];
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController
|
||||
{
|
||||
UIViewController *controller = [self getTopControllerFromController:viewController];
|
||||
|
||||
// force a UI refresh when tab is changed
|
||||
if ([controller isKindOfClass:[EQNBaseViewController class]]) {
|
||||
EQNBaseViewController *baseController = (EQNBaseViewController *)controller;
|
||||
[baseController refreshUI];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,40 +0,0 @@
|
||||
//
|
||||
// MenuHeaderTableViewCell.swift
|
||||
// Earthquake Network
|
||||
//
|
||||
// Created by Busi Andrea on 27/07/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class MenuHeaderTableViewCell: UITableViewCell {
|
||||
|
||||
@IBOutlet weak var appVersionLabel: UILabel!
|
||||
@IBOutlet weak var appIdLabel: UILabel!
|
||||
|
||||
// MARK: - View Lifecycle
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
|
||||
// add a gradient for the background
|
||||
let gradient = CAGradientLayer()
|
||||
let blueColor = UIColor(red: 0.47, green: 0.72, blue: 0.98, alpha: 1.0)
|
||||
gradient.frame = bounds
|
||||
gradient.colors = [ blueColor.cgColor, UIColor.white.cgColor ]
|
||||
layer.insertSublayer(gradient, at: 0)
|
||||
}
|
||||
|
||||
// MARK: - Public
|
||||
|
||||
func updateUI() {
|
||||
if let appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String {
|
||||
let version = NSLocalizedString("Versione", comment: "etichetta versione app")
|
||||
appVersionLabel.text = "\(version): \(appVersion)"
|
||||
}
|
||||
|
||||
let userId = EQNUser.default().user_ID ?? "n.d."
|
||||
appIdLabel.text = "ID: \(userId)"
|
||||
}
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
//
|
||||
// MenuItemTableViewCell.swift
|
||||
// Earthquake Network
|
||||
//
|
||||
// Created by Busi Andrea on 27/07/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class MenuItemTableViewCell: UITableViewCell {
|
||||
|
||||
@IBOutlet private weak var itemIconImageView: UIImageView!
|
||||
@IBOutlet private weak var itemTitleLabel: UILabel!
|
||||
|
||||
var item: MenuViewController.MenuItem? {
|
||||
didSet {
|
||||
updateUI()
|
||||
}
|
||||
}
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
override func setSelected(_ selected: Bool, animated: Bool) {
|
||||
super.setSelected(selected, animated: animated)
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
private func updateUI() {
|
||||
guard let item = item else { return }
|
||||
|
||||
if let iconName = item.icon {
|
||||
itemIconImageView.tintColor = .darkGray
|
||||
itemIconImageView.image = UIImage(named: iconName)
|
||||
}
|
||||
itemTitleLabel.textColor = .darkGray
|
||||
itemTitleLabel.text = item.title
|
||||
}
|
||||
}
|
||||
@@ -1,125 +0,0 @@
|
||||
//
|
||||
// MenuViewController.swift
|
||||
// Earthquake Network
|
||||
//
|
||||
// Created by Busi Andrea on 27/07/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import SafariServices
|
||||
|
||||
|
||||
class MenuViewController: UITableViewController {
|
||||
|
||||
enum MenuItem: CaseIterable {
|
||||
case header
|
||||
case settings
|
||||
case informations
|
||||
case faq
|
||||
case help
|
||||
case author
|
||||
case sponsors
|
||||
case disclaimer
|
||||
case privacy
|
||||
|
||||
var title: String {
|
||||
switch self {
|
||||
case .header: return ""
|
||||
case .settings: return NSLocalizedString("Impostazioni", comment: "voce menu")
|
||||
case .informations: return NSLocalizedString("Informazioni", comment: "voce menu")
|
||||
case .faq: return NSLocalizedString("F.A.Q.", comment: "voce menu")
|
||||
case .help: return NSLocalizedString("Help", comment: "voce menu")
|
||||
case .author: return NSLocalizedString("Autore", comment: "voce menu")
|
||||
case .sponsors: return NSLocalizedString("Patrocinatori", comment: "voce menu")
|
||||
case .disclaimer: return NSLocalizedString("Disclaimer", comment: "voce menu")
|
||||
case .privacy: return NSLocalizedString("Privacy", comment: "voce menu")
|
||||
}
|
||||
}
|
||||
|
||||
var icon: String? {
|
||||
switch self {
|
||||
case .header: return nil
|
||||
case .settings: return "menu-icon-settings"
|
||||
case .informations: return "menu-icon-info"
|
||||
case .faq: return "menu-icon-faq"
|
||||
case .help: return "menu-icon-help"
|
||||
case .author: return "menu-icon-author"
|
||||
case .sponsors: return "menu-icon-sponsors"
|
||||
case .disclaimer: return "menu-icon-terms"
|
||||
case .privacy: return "menu-icon-privacy"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private let items = MenuItem.allCases
|
||||
private static let CellIdentifierHeader = "HeaderCell"
|
||||
private static let CellIdentifierItem = "MenuItemCell"
|
||||
|
||||
// MARK: - View Lifecycle
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
}
|
||||
|
||||
// MARK: - Table view data source
|
||||
|
||||
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
items.count
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
|
||||
let item = items[indexPath.row]
|
||||
if item == .header {
|
||||
return 160
|
||||
}
|
||||
return 60
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||
let item = items[indexPath.row]
|
||||
if item == .header {
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: Self.CellIdentifierHeader, for: indexPath) as! MenuHeaderTableViewCell
|
||||
cell.updateUI()
|
||||
return cell
|
||||
}
|
||||
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: Self.CellIdentifierItem, for: indexPath) as! MenuItemTableViewCell
|
||||
cell.item = item
|
||||
return cell
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||
self.revealViewController()?.revealToggle(animated: true)
|
||||
|
||||
let item = items[indexPath.row]
|
||||
switch item {
|
||||
case .header:
|
||||
break
|
||||
case .settings:
|
||||
NotificationCenter.default.post(name: NSNotification.Name(rawValue: NOTIFICHE_SISMI), object: nil)
|
||||
default:
|
||||
// open url if available
|
||||
if let url = externalUrl(for: item) {
|
||||
let controller = SFSafariViewController(url: url)
|
||||
present(controller, animated: true, completion: nil)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
private func externalUrl(for item: MenuItem) -> URL? {
|
||||
let baseUrl = EQNWebsiteAddress
|
||||
switch item {
|
||||
case .informations: return URL(string: "\(baseUrl)")
|
||||
case .faq: return URL(string: "\(baseUrl)/f-a-q/")
|
||||
case .help: return URL(string: "\(baseUrl)/help/")
|
||||
case .author: return URL(string: "\(baseUrl)/contact/")
|
||||
case .sponsors: return URL(string: "\(baseUrl)/sponsors/")
|
||||
case .disclaimer: return URL(string: "\(baseUrl)/terms-conditions/")
|
||||
case .privacy: return URL(string: "\(baseUrl)/privacy/")
|
||||
default: return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
//
|
||||
// SettingDateTableViewCell.swift
|
||||
// Earthquake Network
|
||||
//
|
||||
// Created by Busi Andrea on 28/08/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
class SettingDateTableViewCell: UITableViewCell {
|
||||
|
||||
@objc static let Identifier = "DateCell"
|
||||
|
||||
@objc var isDisabled: Bool = false {
|
||||
didSet {
|
||||
updateUI()
|
||||
}
|
||||
}
|
||||
|
||||
@objc var isPickerVisible: Bool = false {
|
||||
didSet {
|
||||
if oldValue != isPickerVisible {
|
||||
updateUI()
|
||||
}
|
||||
}
|
||||
}
|
||||
@objc private(set) var date = Date()
|
||||
@objc var valueChanged: ((Date) -> Void)?
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
@objc lazy var titleLabel: UILabel = {
|
||||
let label = UILabel()
|
||||
label.translatesAutoresizingMaskIntoConstraints = false
|
||||
label.numberOfLines = 0
|
||||
label.font = UIFont.preferredFont(forTextStyle: .body)
|
||||
label.textColor = AppTheme.shared.textColor
|
||||
return label
|
||||
}()
|
||||
|
||||
@objc lazy var valuesLabel: UILabel = {
|
||||
let label = UILabel()
|
||||
label.translatesAutoresizingMaskIntoConstraints = false
|
||||
label.numberOfLines = 0
|
||||
label.font = UIFont.preferredFont(forTextStyle: .subheadline)
|
||||
label.textColor = AppTheme.shared.valueColor
|
||||
return label
|
||||
}()
|
||||
|
||||
@objc lazy var datePicker: UIDatePicker = {
|
||||
let picker = UIDatePicker()
|
||||
picker.translatesAutoresizingMaskIntoConstraints = false
|
||||
picker.datePickerMode = .time
|
||||
picker.date = self.date
|
||||
picker.addTarget(self, action: #selector(datePickerChanged(_:)), for: .valueChanged)
|
||||
return picker
|
||||
}()
|
||||
|
||||
@objc lazy var stackView: UIStackView = {
|
||||
let stackView = UIStackView()
|
||||
stackView.translatesAutoresizingMaskIntoConstraints = false
|
||||
stackView.axis = .vertical
|
||||
stackView.distribution = .equalSpacing
|
||||
stackView.spacing = 8
|
||||
return stackView
|
||||
}()
|
||||
|
||||
// MARK: - Init
|
||||
|
||||
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
||||
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
||||
setupUI()
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
super.init(coder: coder)
|
||||
setupUI()
|
||||
}
|
||||
|
||||
// MARK: - Public
|
||||
|
||||
@objc public func updateDate(_ date: Date) {
|
||||
self.date = date
|
||||
datePicker.setDate(date, animated: true)
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
private func setupUI() {
|
||||
translatesAutoresizingMaskIntoConstraints = false
|
||||
|
||||
stackView.addArrangedSubview(titleLabel)
|
||||
stackView.addArrangedSubview(valuesLabel)
|
||||
|
||||
contentView.addSubview(stackView)
|
||||
|
||||
stackView.topAnchor.constraint(equalTo: contentView.layoutMarginsGuide.topAnchor).isActive = true
|
||||
stackView.trailingAnchor.constraint(equalTo: contentView.layoutMarginsGuide.trailingAnchor).isActive = true
|
||||
stackView.leadingAnchor.constraint(equalTo: contentView.layoutMarginsGuide.leadingAnchor).isActive = true
|
||||
stackView.bottomAnchor.constraint(equalTo: contentView.layoutMarginsGuide.bottomAnchor).isActive = true
|
||||
}
|
||||
|
||||
private func updateUI() {
|
||||
let theme = AppTheme.shared
|
||||
titleLabel.textColor = isDisabled ? theme.textDisabledColor : theme.textColor
|
||||
valuesLabel.textColor = isDisabled ? theme.textDisabledColor : theme.textColor
|
||||
|
||||
if isPickerVisible && !stackView.arrangedSubviews.contains(datePicker) {
|
||||
stackView.addArrangedSubview(datePicker)
|
||||
} else if !isPickerVisible && stackView.arrangedSubviews.contains(datePicker) {
|
||||
stackView.removeArrangedSubview(datePicker)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Actions
|
||||
|
||||
@objc func datePickerChanged(_ sender: UIDatePicker) {
|
||||
date = sender.date
|
||||
valueChanged?(sender.date)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// SettingDetailTableViewCell.swift
|
||||
// Earthquake Network
|
||||
//
|
||||
// Created by Busi Andrea on 25/08/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class SettingDetailTableViewCell: UITableViewCell {
|
||||
|
||||
@objc static let Identifier = "DetailCell"
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
override func setSelected(_ selected: Bool, animated: Bool) {
|
||||
super.setSelected(selected, animated: animated)
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
//
|
||||
// SettingEnableTableViewCell.swift
|
||||
// Earthquake Network
|
||||
//
|
||||
// Created by Busi Andrea on 25/08/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class SettingEnableTableViewCell: UITableViewCell {
|
||||
|
||||
@objc static let Identifier = "EnableCell"
|
||||
|
||||
@objc var valueChanged: ((Bool) -> Void)?
|
||||
@objc var isDisabled: Bool = false {
|
||||
didSet {
|
||||
updateUI()
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
@objc lazy var titleLabel: UILabel = {
|
||||
let label = UILabel()
|
||||
label.translatesAutoresizingMaskIntoConstraints = false
|
||||
label.numberOfLines = 0
|
||||
label.font = UIFont.preferredFont(forTextStyle: .body)
|
||||
return label
|
||||
}()
|
||||
|
||||
@objc lazy var descriptionLabel: UILabel = {
|
||||
let label = UILabel()
|
||||
label.translatesAutoresizingMaskIntoConstraints = false
|
||||
label.numberOfLines = 0
|
||||
label.font = UIFont.preferredFont(forTextStyle: .subheadline)
|
||||
return label
|
||||
}()
|
||||
|
||||
@objc lazy var toggleSwitch: UISwitch = {
|
||||
let toggle = UISwitch()
|
||||
toggle.setContentHuggingPriority(.required, for: .horizontal)
|
||||
toggle.setContentCompressionResistancePriority(.required, for: .horizontal)
|
||||
toggle.addTarget(self, action: #selector(toggleChanged(_:)), for: .valueChanged)
|
||||
return toggle
|
||||
}()
|
||||
|
||||
|
||||
// MARK: - Init
|
||||
|
||||
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
||||
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
||||
setupUI()
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
super.init(coder: coder)
|
||||
setupUI()
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
private func setupUI() {
|
||||
selectionStyle = .none
|
||||
translatesAutoresizingMaskIntoConstraints = false
|
||||
|
||||
let stackView = UIStackView()
|
||||
stackView.translatesAutoresizingMaskIntoConstraints = false
|
||||
stackView.axis = .horizontal
|
||||
stackView.distribution = .fill
|
||||
stackView.alignment = .center
|
||||
stackView.spacing = 8
|
||||
|
||||
stackView.addArrangedSubview(titleLabel)
|
||||
stackView.addArrangedSubview(toggleSwitch)
|
||||
|
||||
contentView.addSubview(stackView)
|
||||
contentView.addSubview(descriptionLabel)
|
||||
|
||||
stackView.topAnchor.constraint(equalTo: contentView.layoutMarginsGuide.topAnchor).isActive = true
|
||||
stackView.trailingAnchor.constraint(equalTo: contentView.layoutMarginsGuide.trailingAnchor).isActive = true
|
||||
stackView.leadingAnchor.constraint(equalTo: contentView.layoutMarginsGuide.leadingAnchor).isActive = true
|
||||
|
||||
descriptionLabel.topAnchor.constraint(equalTo: stackView.bottomAnchor, constant: 8).isActive = true
|
||||
descriptionLabel.trailingAnchor.constraint(equalTo: stackView.trailingAnchor).isActive = true
|
||||
descriptionLabel.leadingAnchor.constraint(equalTo: stackView.leadingAnchor).isActive = true
|
||||
descriptionLabel.bottomAnchor.constraint(equalTo: contentView.layoutMarginsGuide.bottomAnchor).isActive = true
|
||||
}
|
||||
|
||||
private func updateUI() {
|
||||
toggleSwitch.isEnabled = !isDisabled
|
||||
titleLabel.textColor = isDisabled ? .lightGray : .black
|
||||
descriptionLabel.textColor = isDisabled ? .lightGray : .black
|
||||
}
|
||||
|
||||
// MARK: - Action
|
||||
|
||||
@objc private func toggleChanged(_ sender: UISwitch) {
|
||||
valueChanged?(sender.isOn)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
//
|
||||
// SettingMultivaluesTableViewCell.swift
|
||||
// Earthquake Network
|
||||
//
|
||||
// Created by Busi Andrea on 26/08/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
class SettingMultivaluesTableViewCell: UITableViewCell {
|
||||
|
||||
@objc static let Identifier = "MultivaluesCell"
|
||||
|
||||
@objc var isDisabled: Bool = false {
|
||||
didSet {
|
||||
updateUI()
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
@objc lazy var titleLabel: UILabel = {
|
||||
let label = UILabel()
|
||||
label.translatesAutoresizingMaskIntoConstraints = false
|
||||
label.numberOfLines = 0
|
||||
label.font = UIFont.preferredFont(forTextStyle: .body)
|
||||
label.textColor = AppTheme.shared.textColor
|
||||
return label
|
||||
}()
|
||||
|
||||
@objc lazy var valuesLabel: UILabel = {
|
||||
let label = UILabel()
|
||||
label.translatesAutoresizingMaskIntoConstraints = false
|
||||
label.numberOfLines = 0
|
||||
label.font = UIFont.preferredFont(forTextStyle: .subheadline)
|
||||
label.textColor = AppTheme.shared.valueColor
|
||||
return label
|
||||
}()
|
||||
|
||||
// MARK: - Init
|
||||
|
||||
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
||||
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
||||
setupUI()
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
super.init(coder: coder)
|
||||
setupUI()
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
private func setupUI() {
|
||||
translatesAutoresizingMaskIntoConstraints = false
|
||||
|
||||
let stackView = UIStackView()
|
||||
stackView.translatesAutoresizingMaskIntoConstraints = false
|
||||
stackView.axis = .vertical
|
||||
stackView.distribution = .equalSpacing
|
||||
stackView.spacing = 8
|
||||
|
||||
stackView.addArrangedSubview(titleLabel)
|
||||
stackView.addArrangedSubview(valuesLabel)
|
||||
|
||||
contentView.addSubview(stackView)
|
||||
|
||||
stackView.topAnchor.constraint(equalTo: contentView.layoutMarginsGuide.topAnchor).isActive = true
|
||||
stackView.trailingAnchor.constraint(equalTo: contentView.layoutMarginsGuide.trailingAnchor).isActive = true
|
||||
stackView.leadingAnchor.constraint(equalTo: contentView.layoutMarginsGuide.leadingAnchor).isActive = true
|
||||
stackView.bottomAnchor.constraint(equalTo: contentView.layoutMarginsGuide.bottomAnchor).isActive = true
|
||||
}
|
||||
|
||||
private func updateUI() {
|
||||
let theme = AppTheme.shared
|
||||
titleLabel.textColor = isDisabled ? theme.textDisabledColor : theme.textColor
|
||||
valuesLabel.textColor = isDisabled ? theme.textDisabledColor : theme.valueColor
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
//
|
||||
// SettingSectionHeaderView.swift
|
||||
// Earthquake Network
|
||||
//
|
||||
// Created by Busi Andrea on 25/08/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class SettingSectionHeaderView: UITableViewHeaderFooterView {
|
||||
|
||||
@objc static let Identifier = "SectionHeaderView"
|
||||
@objc static let Height = 50.0
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
@objc lazy var titleLabel: UILabel = {
|
||||
let titleLabel = UILabel()
|
||||
titleLabel.font = UIFont.preferredFont(forTextStyle: .headline)
|
||||
titleLabel.textColor = UIColor(named: "Light blue")
|
||||
return titleLabel
|
||||
}()
|
||||
|
||||
|
||||
// MARK: - Init
|
||||
|
||||
override init(reuseIdentifier: String?) {
|
||||
super.init(reuseIdentifier: reuseIdentifier)
|
||||
setupUI()
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
super.init(coder: coder)
|
||||
setupUI()
|
||||
}
|
||||
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
private func setupUI() {
|
||||
contentView.addSubview(titleLabel)
|
||||
|
||||
titleLabel.translatesAutoresizingMaskIntoConstraints = false
|
||||
titleLabel.centerYAnchor.constraint(equalTo: contentView.centerYAnchor).isActive = true
|
||||
titleLabel.trailingAnchor.constraint(equalTo: contentView.trailingAnchor).isActive = true
|
||||
titleLabel.leadingAnchor.constraint(equalTo: contentView.leadingAnchor).isActive = true
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
//
|
||||
// SettingSegmentedTableViewCell.swift
|
||||
// Earthquake Network
|
||||
//
|
||||
// Created by Busi Andrea on 27/08/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
class SettingSegmentedTableViewCell: UITableViewCell {
|
||||
|
||||
@objc static let Identifier = "SegmentedCell"
|
||||
|
||||
@objc var isDisabled: Bool = false {
|
||||
didSet {
|
||||
updateUI()
|
||||
}
|
||||
}
|
||||
@objc var valueChanged: ((EQNGenericValue) -> Void)?
|
||||
private var items = [EQNGenericValue]()
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
@objc lazy var titleLabel: UILabel = {
|
||||
let label = UILabel()
|
||||
label.translatesAutoresizingMaskIntoConstraints = false
|
||||
label.numberOfLines = 0
|
||||
label.font = UIFont.preferredFont(forTextStyle: .body)
|
||||
label.textColor = AppTheme.shared.textColor
|
||||
return label
|
||||
}()
|
||||
|
||||
@objc lazy var segmentedControl: UISegmentedControl = {
|
||||
let segmented = UISegmentedControl()
|
||||
segmented.translatesAutoresizingMaskIntoConstraints = false
|
||||
segmented.addTarget(self, action: #selector(segmentedControlChanged(_:)), for: .valueChanged)
|
||||
return segmented
|
||||
}()
|
||||
|
||||
// MARK: - Init
|
||||
|
||||
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
||||
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
||||
setupUI()
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
super.init(coder: coder)
|
||||
setupUI()
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
private func setupUI() {
|
||||
selectionStyle = .none
|
||||
translatesAutoresizingMaskIntoConstraints = false
|
||||
|
||||
let stackView = UIStackView()
|
||||
stackView.translatesAutoresizingMaskIntoConstraints = false
|
||||
stackView.axis = .vertical
|
||||
stackView.distribution = .equalSpacing
|
||||
stackView.spacing = 8
|
||||
|
||||
stackView.addArrangedSubview(titleLabel)
|
||||
stackView.addArrangedSubview(segmentedControl)
|
||||
|
||||
contentView.addSubview(stackView)
|
||||
|
||||
stackView.topAnchor.constraint(equalTo: contentView.layoutMarginsGuide.topAnchor).isActive = true
|
||||
stackView.trailingAnchor.constraint(equalTo: contentView.layoutMarginsGuide.trailingAnchor).isActive = true
|
||||
stackView.leadingAnchor.constraint(equalTo: contentView.layoutMarginsGuide.leadingAnchor).isActive = true
|
||||
stackView.bottomAnchor.constraint(equalTo: contentView.layoutMarginsGuide.bottomAnchor).isActive = true
|
||||
}
|
||||
|
||||
private func updateUI() {
|
||||
let theme = AppTheme.shared
|
||||
titleLabel.textColor = isDisabled ? theme.textDisabledColor : theme.textColor
|
||||
segmentedControl.isEnabled = !isDisabled
|
||||
}
|
||||
|
||||
// MARK: - Actions
|
||||
|
||||
@objc private func segmentedControlChanged(_ sender: UISegmentedControl) {
|
||||
let item = items[sender.selectedSegmentIndex]
|
||||
valueChanged?(item)
|
||||
}
|
||||
|
||||
// MARK: - Public
|
||||
|
||||
@objc func configureControl(with items: [EQNGenericValue], current: EQNGenericValue) {
|
||||
self.items = items
|
||||
|
||||
segmentedControl.removeAllSegments()
|
||||
items.enumerated().forEach { (index, value) in
|
||||
segmentedControl.insertSegment(withTitle: value.display, at: index, animated: false)
|
||||
}
|
||||
|
||||
if let index = items.firstIndex(of: current) {
|
||||
segmentedControl.selectedSegmentIndex = index
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
//
|
||||
// SettingSliderTableViewCell.swift
|
||||
// Earthquake Network
|
||||
//
|
||||
// Created by Busi Andrea on 25/08/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class SettingSliderTableViewCell: UITableViewCell {
|
||||
|
||||
@objc static let Identifier = "SliderCell"
|
||||
|
||||
@objc var isDisabled: Bool = false {
|
||||
didSet {
|
||||
updateUI()
|
||||
}
|
||||
}
|
||||
@objc var valueChanged: ((EQNGenericValue) -> Void)?
|
||||
private var items = [EQNGenericValue]()
|
||||
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
@objc lazy var titleLabel: UILabel = {
|
||||
let label = UILabel()
|
||||
label.translatesAutoresizingMaskIntoConstraints = false
|
||||
label.numberOfLines = 0
|
||||
label.font = UIFont.preferredFont(forTextStyle: .body)
|
||||
label.textColor = AppTheme.shared.textColor
|
||||
return label
|
||||
}()
|
||||
|
||||
@objc lazy var valueLabel: UILabel = {
|
||||
let label = UILabel()
|
||||
label.translatesAutoresizingMaskIntoConstraints = false
|
||||
label.numberOfLines = 0
|
||||
label.font = UIFont.preferredFont(forTextStyle: .subheadline)
|
||||
label.textColor = AppTheme.shared.valueColor
|
||||
return label
|
||||
}()
|
||||
|
||||
@objc lazy var slider: UISlider = {
|
||||
let slider = UISlider()
|
||||
slider.isContinuous = true
|
||||
slider.addTarget(self, action: #selector(sliderChanged(_:)), for: .valueChanged)
|
||||
return slider
|
||||
}()
|
||||
|
||||
// MARK: - Init
|
||||
|
||||
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
||||
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
||||
setupUI()
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
super.init(coder: coder)
|
||||
setupUI()
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
private func setupUI() {
|
||||
selectionStyle = .none
|
||||
translatesAutoresizingMaskIntoConstraints = false
|
||||
|
||||
let stackView = UIStackView()
|
||||
stackView.translatesAutoresizingMaskIntoConstraints = false
|
||||
stackView.axis = .vertical
|
||||
stackView.distribution = .equalSpacing
|
||||
stackView.spacing = 8
|
||||
|
||||
stackView.addArrangedSubview(titleLabel)
|
||||
stackView.addArrangedSubview(valueLabel)
|
||||
stackView.addArrangedSubview(slider)
|
||||
|
||||
contentView.addSubview(stackView)
|
||||
|
||||
stackView.topAnchor.constraint(equalTo: contentView.layoutMarginsGuide.topAnchor).isActive = true
|
||||
stackView.trailingAnchor.constraint(equalTo: contentView.layoutMarginsGuide.trailingAnchor).isActive = true
|
||||
stackView.leadingAnchor.constraint(equalTo: contentView.layoutMarginsGuide.leadingAnchor).isActive = true
|
||||
stackView.bottomAnchor.constraint(equalTo: contentView.layoutMarginsGuide.bottomAnchor).isActive = true
|
||||
}
|
||||
|
||||
private func updateUI() {
|
||||
let theme = AppTheme.shared
|
||||
titleLabel.textColor = isDisabled ? theme.textDisabledColor : theme.textColor
|
||||
valueLabel.textColor = isDisabled ? theme.textDisabledColor : theme.valueColor
|
||||
slider.isEnabled = !isDisabled
|
||||
}
|
||||
|
||||
// MARK: - Actions
|
||||
|
||||
@objc private func sliderChanged(_ sender: UISlider) {
|
||||
let index = Int(sender.value)
|
||||
let item = items[index]
|
||||
|
||||
valueLabel.text = item.display
|
||||
valueChanged?(item)
|
||||
}
|
||||
|
||||
// MARK: - Public
|
||||
|
||||
@objc func configureSlider(with items: [EQNGenericValue], current: EQNGenericValue) {
|
||||
self.items = items
|
||||
|
||||
slider.minimumValue = 0
|
||||
slider.maximumValue = Float(items.count - 1)
|
||||
if let index = items.firstIndex(of: current) {
|
||||
slider.value = Float(index)
|
||||
valueLabel.text = current.display
|
||||
} else {
|
||||
slider.value = 0
|
||||
valueLabel.text = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// SettingsBaseViewController.h
|
||||
// Earthquake Network
|
||||
//
|
||||
// Created by Busi Andrea on 30/08/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface SettingsBaseViewController : UITableViewController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,42 @@
|
||||
//
|
||||
// SettingsBaseViewController.m
|
||||
// Earthquake Network
|
||||
//
|
||||
// Created by Busi Andrea on 30/08/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SettingsBaseViewController.h"
|
||||
#import "ServerRequest.h"
|
||||
#import "EQNGeneratoreURLServer.h"
|
||||
|
||||
@interface SettingsBaseViewController ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation SettingsBaseViewController
|
||||
|
||||
#pragma mark - View Lifecycle
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated
|
||||
{
|
||||
[super viewWillDisappear:animated];
|
||||
|
||||
// when controller is dismissed, save settings
|
||||
if (self.isMovingFromParentViewController) {
|
||||
[self saveSettings];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Private
|
||||
|
||||
- (void)saveSettings
|
||||
{
|
||||
[[ServerRequest defaultServerConnectionSingleton] inviaInformazioniAlServerWithURL:[EQNGeneratoreURLServer urlInvioImpostazioniNotifiche] richiesta:impostazioniNotifiche success:^(id result){
|
||||
NSLog(@"Settings saved successfully");
|
||||
} failure:^(NSError *error){
|
||||
NSLog(@"Settings saved failed. Error: %@", error.localizedDescription);
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// AletaSismiTableViewController.h
|
||||
// Earthquake Network
|
||||
//
|
||||
// Refactored by Andrea Busi 25/08/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "SettingsBaseViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface SettingsRealTimeAlertsViewController : SettingsBaseViewController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,286 @@
|
||||
//
|
||||
// AletaSismiTableViewController.m
|
||||
// Earthquake Network
|
||||
//
|
||||
// Refactored by Andrea Busi 25/08/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SettingsRealTimeAlertsViewController.h"
|
||||
#import "EQNAllertaSismica.h"
|
||||
|
||||
@interface SettingsRealTimeAlertsViewController () <UITextFieldDelegate>
|
||||
|
||||
@property (nonatomic, strong) NSArray<SettingItem *> *settings;
|
||||
|
||||
@property (strong, nonatomic) NSArray<EQNGenericValue *> *dataSourceSismi;
|
||||
@property (nonatomic, strong) NSArray<EQNGenericValue *> *dataSourceRaggioSisma;
|
||||
|
||||
@property (nonatomic, strong) EQNGenericValue *currentSeismicToNotify;
|
||||
@property (strong, nonatomic) EQNGenericValue *currentLowSeismicRadius;
|
||||
@property (strong, nonatomic) EQNGenericValue *currentStrongSeismicRadius;
|
||||
@property (strong, nonatomic) NSDate *currentStartTime;
|
||||
@property (nonatomic) BOOL isStartTimeExpanded;
|
||||
@property (strong, nonatomic) NSDate *currentEndTime;
|
||||
@property (nonatomic) BOOL isEndTimeExpanded;
|
||||
|
||||
@property (nonatomic, strong) NSDateFormatter *dateFormatter;
|
||||
|
||||
@property (nonatomic, assign) BOOL notificationEnabled;
|
||||
@property (nonatomic, assign) BOOL doNotDisturbEnabled;
|
||||
@end
|
||||
|
||||
@implementation SettingsRealTimeAlertsViewController
|
||||
|
||||
typedef NS_ENUM(NSInteger, RowIdentifier) {
|
||||
RowIdentifierAbilitaNotifiche = 0,
|
||||
RowIdentifierSismiDaNotificare,
|
||||
RowIdentifierRaggioSismiLievi,
|
||||
RowIndntifierRaggioSismiForti,
|
||||
RowIdentifierNonDisturbare,
|
||||
RowIdentifierNonDisturbareOraInizio,
|
||||
RowIdentifierNonDisturbareOraFine
|
||||
};
|
||||
|
||||
#pragma mark - Accessories
|
||||
|
||||
- (NSDateFormatter *)dateFormatter
|
||||
{
|
||||
if (!_dateFormatter) {
|
||||
_dateFormatter = [[NSDateFormatter alloc] init];
|
||||
[_dateFormatter setDateFormat:@"HH:mm"];
|
||||
}
|
||||
return _dateFormatter;
|
||||
}
|
||||
|
||||
#pragma mark - View Lifecycle
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
|
||||
[self setupUI];
|
||||
|
||||
self.settings = @[
|
||||
[[SettingItem alloc] initWithType:SettingTypeEnable title:NSLocalizedString(@"Suona un allarme quando un sisma è rilevato dalla rete smartphone", @"")],
|
||||
[[SettingItem alloc] initWithType:SettingTypeSegmented title:NSLocalizedString(@"Sismi da notificare", @"") subtitle:NSLocalizedString(@"", @"")],
|
||||
[[SettingItem alloc] initWithType:SettingTypeSlider title:NSLocalizedString(@"Raggio sismi lievi", @"")],
|
||||
[[SettingItem alloc] initWithType:SettingTypeSlider title:NSLocalizedString(@"Raggio sismi forti", @"")]
|
||||
];
|
||||
|
||||
// these settings are disabled because on iOS app are not handled
|
||||
/*
|
||||
[[SettingItem alloc] initWithType:SettingTypeEnable title:NSLocalizedString(@"Intervallo allarme", @"") subtitle:NSLocalizedString(@"Non attivare allarmi o notifiche in questo lasso di tempo", @"") icon:nil segue:nil],
|
||||
[[SettingItem alloc] initWithType:SettingTypeDate title:NSLocalizedString(@"Ora di inizio", @"") subtitle:nil icon:nil segue:nil],
|
||||
[[SettingItem alloc] initWithType:SettingTypeDate title:NSLocalizedString(@"Ora di fine", @"") subtitle:nil icon:nil segue:nil]
|
||||
*/
|
||||
|
||||
self.dataSourceSismi = [EQNData seismicToNotify];
|
||||
self.dataSourceRaggioSisma = [EQNData raggioSismi];
|
||||
|
||||
[self updateUI];
|
||||
}
|
||||
|
||||
#pragma mark - Private
|
||||
|
||||
- (void)setupUI
|
||||
{
|
||||
self.navigationItem.largeTitleDisplayMode = UINavigationItemLargeTitleDisplayModeNever;
|
||||
|
||||
self.tableView.estimatedRowHeight = 200.0;
|
||||
self.tableView.rowHeight = UITableViewAutomaticDimension;
|
||||
[self.tableView registerClass:[SettingSectionHeaderView class] forHeaderFooterViewReuseIdentifier:SettingSectionHeaderView.Identifier];
|
||||
[self.tableView registerClass:[SettingEnableTableViewCell class] forCellReuseIdentifier:SettingEnableTableViewCell.Identifier];
|
||||
[self.tableView registerClass:[SettingSliderTableViewCell class] forCellReuseIdentifier:SettingSliderTableViewCell.Identifier];
|
||||
[self.tableView registerClass:[SettingMultivaluesTableViewCell class] forCellReuseIdentifier:SettingMultivaluesTableViewCell.Identifier];
|
||||
[self.tableView registerClass:[SettingSegmentedTableViewCell class] forCellReuseIdentifier:SettingSegmentedTableViewCell.Identifier];
|
||||
[self.tableView registerClass:[SettingDateTableViewCell class] forCellReuseIdentifier:SettingDateTableViewCell.Identifier];
|
||||
}
|
||||
|
||||
- (void)updateUI
|
||||
{
|
||||
self.notificationEnabled = [EQNAllertaSismica center].isAbilitato;
|
||||
self.doNotDisturbEnabled = [EQNAllertaSismica center].isintervalloAllarme;
|
||||
|
||||
// sismi da notificare
|
||||
EQNGenericValue *sismiDaNotificare = [EQNData seismicToNotifyFor:[EQNAllertaSismica center].sismiDaNotificare];
|
||||
self.currentSeismicToNotify = sismiDaNotificare;
|
||||
|
||||
// raggio sismi lievi
|
||||
EQNGenericValue *raggioSismiLievi = [EQNData raggioSismaFor:[EQNAllertaSismica center].raggioSismiLievi];
|
||||
self.currentLowSeismicRadius = raggioSismiLievi;
|
||||
|
||||
// raggio sismi forti
|
||||
EQNGenericValue *raggioSismiForti = [EQNData raggioSismaFor:[EQNAllertaSismica center].raggioSismiForti];
|
||||
self.currentStrongSeismicRadius = raggioSismiForti;
|
||||
|
||||
// non disturbare, orari
|
||||
NSDate *startTime = [EQNData doNotDisturbEndDateFrom:[EQNAllertaSismica center].oraioInizio];
|
||||
self.currentStartTime = startTime;
|
||||
|
||||
NSDate *endTime = [EQNData doNotDisturbEndDateFrom:[EQNAllertaSismica center].orarioFine];
|
||||
self.currentEndTime = endTime;
|
||||
|
||||
[[EQNAllertaSismica center] saveUserInfo];
|
||||
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Table view data source
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
return self.settings.count;
|
||||
}
|
||||
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
|
||||
{
|
||||
SettingSectionHeaderView *headerView = [tableView dequeueReusableHeaderFooterViewWithIdentifier:SettingSectionHeaderView.Identifier];
|
||||
headerView.titleLabel.text = NSLocalizedString(@"Alerta sismica", @"titolo impostazioni notifiche");
|
||||
return headerView;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
|
||||
{
|
||||
return SettingSectionHeaderView.Height;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
SettingItem *setting = self.settings[indexPath.row];
|
||||
|
||||
if (setting.type == SettingTypeEnable) {
|
||||
SettingEnableTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:SettingEnableTableViewCell.Identifier forIndexPath:indexPath];
|
||||
cell.titleLabel.text = setting.displayTitle;
|
||||
cell.descriptionLabel.text = setting.subtitle;
|
||||
|
||||
if (indexPath.row == RowIdentifierAbilitaNotifiche) {
|
||||
cell.toggleSwitch.on = self.notificationEnabled;
|
||||
cell.valueChanged = ^(BOOL enabled) {
|
||||
self.notificationEnabled = enabled;
|
||||
[EQNAllertaSismica center].isAbilitato = self.notificationEnabled;
|
||||
[[EQNAllertaSismica center] saveUserInfo];
|
||||
[self.tableView reloadData];
|
||||
};
|
||||
} else if (indexPath.row == RowIdentifierNonDisturbare) {
|
||||
cell.toggleSwitch.on = self.doNotDisturbEnabled;
|
||||
cell.isDisabled = !self.notificationEnabled;
|
||||
cell.valueChanged = ^(BOOL enabled) {
|
||||
self.doNotDisturbEnabled = enabled;
|
||||
[EQNAllertaSismica center].isintervalloAllarme = self.doNotDisturbEnabled;
|
||||
[[EQNAllertaSismica center] saveUserInfo];
|
||||
[self.tableView reloadData];
|
||||
};
|
||||
}
|
||||
|
||||
return cell;
|
||||
} else if (setting.type == SettingTypeSegmented) {
|
||||
SettingSegmentedTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:SettingSegmentedTableViewCell.Identifier forIndexPath:indexPath];
|
||||
cell.titleLabel.text = setting.displayTitle;
|
||||
|
||||
if (indexPath.row == RowIdentifierSismiDaNotificare) {
|
||||
cell.isDisabled = !self.notificationEnabled;
|
||||
[cell configureControlWith:self.dataSourceSismi current:self.currentSeismicToNotify];
|
||||
cell.valueChanged = ^(EQNGenericValue *item) {
|
||||
[self updateSismicToNotify:item];
|
||||
};
|
||||
}
|
||||
|
||||
return cell;
|
||||
} else if (setting.type == SettingTypeSlider) {
|
||||
SettingSliderTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:SettingSliderTableViewCell.Identifier forIndexPath:indexPath];
|
||||
cell.titleLabel.text = setting.displayTitle;
|
||||
|
||||
if (indexPath.row == RowIdentifierRaggioSismiLievi) {
|
||||
cell.isDisabled = !self.notificationEnabled;
|
||||
[cell configureSliderWith:self.dataSourceRaggioSisma current:self.currentLowSeismicRadius];
|
||||
cell.valueChanged = ^(EQNGenericValue *item) {
|
||||
[self updateLowSeismicRadius:item];
|
||||
};
|
||||
} else if (indexPath.row == RowIndntifierRaggioSismiForti) {
|
||||
cell.isDisabled = !self.notificationEnabled;
|
||||
[cell configureSliderWith:self.dataSourceRaggioSisma current:self.currentStrongSeismicRadius];
|
||||
cell.valueChanged = ^(EQNGenericValue *item) {
|
||||
[self updateStrongSeismicRadius:item];
|
||||
};
|
||||
}
|
||||
|
||||
return cell;
|
||||
} else if (setting.type == SettingTypeDate) {
|
||||
SettingDateTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:SettingDateTableViewCell.Identifier forIndexPath:indexPath];
|
||||
cell.isDisabled = !self.doNotDisturbEnabled || !self.notificationEnabled;
|
||||
cell.userInteractionEnabled = self.doNotDisturbEnabled && self.notificationEnabled;
|
||||
cell.titleLabel.text = setting.title;
|
||||
|
||||
if (indexPath.row == RowIdentifierNonDisturbareOraInizio) {
|
||||
cell.isPickerVisible = self.isStartTimeExpanded;
|
||||
[cell updateDate:self.currentStartTime];
|
||||
cell.valuesLabel.text = [self.dateFormatter stringFromDate:self.currentStartTime];
|
||||
cell.valueChanged = ^(NSDate *date) {
|
||||
[self updateStartTime:date];
|
||||
};
|
||||
} else if (indexPath.row == RowIdentifierNonDisturbareOraFine) {
|
||||
cell.isPickerVisible = self.isEndTimeExpanded;
|
||||
[cell updateDate:self.currentEndTime];
|
||||
cell.valuesLabel.text = [self.dateFormatter stringFromDate:self.currentEndTime];
|
||||
cell.valueChanged = ^(NSDate *date) {
|
||||
[self updateEndTime:date];
|
||||
};
|
||||
}
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
if (indexPath.row == RowIdentifierNonDisturbareOraInizio) {
|
||||
self.isStartTimeExpanded = !self.isStartTimeExpanded;
|
||||
} else if (indexPath.row == RowIdentifierNonDisturbareOraFine) {
|
||||
self.isEndTimeExpanded = !self.isEndTimeExpanded;
|
||||
}
|
||||
|
||||
[tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic];
|
||||
}
|
||||
|
||||
#pragma mark - Private
|
||||
|
||||
- (void)updateSismicToNotify:(EQNGenericValue *)seismic
|
||||
{
|
||||
[EQNAllertaSismica center].sismiDaNotificare = seismic.value;
|
||||
[[EQNAllertaSismica center] saveUserInfo];
|
||||
[self updateUI];
|
||||
}
|
||||
|
||||
- (void)updateLowSeismicRadius:(EQNGenericValue *)radius
|
||||
{
|
||||
[EQNAllertaSismica center].raggioSismiLievi = radius.value;
|
||||
[[EQNAllertaSismica center] saveUserInfo];
|
||||
[self updateUI];
|
||||
}
|
||||
|
||||
- (void)updateStrongSeismicRadius:(EQNGenericValue *)radius
|
||||
{
|
||||
[EQNAllertaSismica center].raggioSismiForti = radius.value;
|
||||
[[EQNAllertaSismica center] saveUserInfo];
|
||||
[self updateUI];
|
||||
}
|
||||
|
||||
- (void)updateStartTime:(NSDate *)date
|
||||
{
|
||||
[EQNAllertaSismica center].oraioInizio = date;
|
||||
[[EQNAllertaSismica center] saveUserInfo];
|
||||
[self updateUI];
|
||||
}
|
||||
|
||||
- (void)updateEndTime:(NSDate *)date
|
||||
{
|
||||
[EQNAllertaSismica center].orarioFine = date;
|
||||
[[EQNAllertaSismica center] saveUserInfo];
|
||||
[self updateUI];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// SettingsSeismicNetworkAlertsViewController.h
|
||||
// Earthquake Network
|
||||
//
|
||||
// Refactored by Andrea Busi 25/08/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "SettingsBaseViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface SettingsSeismicNetworkAlertsViewController : SettingsBaseViewController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,262 @@
|
||||
//
|
||||
// SettingsSeismicNetworkAlertsViewController.m
|
||||
// Earthquake Network
|
||||
//
|
||||
// Refactored by Andrea Busi 25/08/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SettingsSeismicNetworkAlertsViewController.h"
|
||||
#import "EQNNotificeReteSismiche.h"
|
||||
|
||||
@interface SettingsSeismicNetworkAlertsViewController ()
|
||||
|
||||
@property (nonatomic, strong) NSArray<SettingItem *> *settings;
|
||||
@property (nonatomic, strong) NSArray<EQNGenericValue *> *dataSourceRaggioSisma;
|
||||
@property (nonatomic, strong) NSArray<EQNGenericValue *> *dataSourceMagnitudoDeboli;
|
||||
@property (nonatomic, strong) NSArray<EQNGenericValue *> *dataSourceMagnitudoForti;
|
||||
|
||||
@property (nonatomic, assign) BOOL notificationEnabled;
|
||||
@property (nonatomic, assign) BOOL notificationNearEarthquakeEnabled;
|
||||
@property (nonatomic, assign) BOOL notificationStrongEarthquakeEnabled;
|
||||
|
||||
@property (nonatomic, strong) EQNGenericValue *currentUserPositionRadius;
|
||||
@property (nonatomic, strong) EQNGenericValue *currentSeismicEnergy;
|
||||
@property (nonatomic, strong) EQNGenericValue *currentNearEarthquakeDistance;
|
||||
@property (nonatomic, strong) EQNGenericValue *currentStrongEarthquakeDistance;
|
||||
@end
|
||||
|
||||
@implementation SettingsSeismicNetworkAlertsViewController
|
||||
|
||||
static NSString * const SegueIdentifierListaEnti = @"ShowListaEnti";
|
||||
|
||||
|
||||
typedef NS_ENUM(NSInteger, RowIdentifier) {
|
||||
RowIdentifierAbilitaNotifiche = 0,
|
||||
RowIdentifierRetiSismiche,
|
||||
RowIdentifierRaggioPosizione,
|
||||
RowIdentifierEnergiaSisma,
|
||||
RowIdentifierTerremotiVicini,
|
||||
RowIdentifierTerremotiForti,
|
||||
RowIdentifierTerremotiFortiDistanza
|
||||
};
|
||||
|
||||
#pragma mark - View Lifecycle
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
|
||||
[self setupUI];
|
||||
|
||||
self.settings = @[
|
||||
[[SettingItem alloc] initWithType:SettingTypeEnable title:NSLocalizedString(@"Ricevi le notifiche dei sismi rilevati dalle agenzie nazionalie internazionali", @"")],
|
||||
[[SettingItem alloc] initWithType:SettingTypeMultiValues title:NSLocalizedString(@"Reti sismiche", @"") segue:SegueIdentifierListaEnti],
|
||||
[[SettingItem alloc] initWithType:SettingTypeSlider title:NSLocalizedString(@"Raggio dalla tua posizione", @"")],
|
||||
[[SettingItem alloc] initWithType:SettingTypeSlider title:NSLocalizedString(@"Energia sisma", @"")],
|
||||
[[SettingItem alloc] initWithType:SettingTypeEnable title:NSLocalizedString(@"Terremoti vicini", @"") subtitle:NSLocalizedString(@"Notifica sismi di qualsiasi magnitudo se la distanza è inferiore a 50 km", @"")],
|
||||
[[SettingItem alloc] initWithType:SettingTypeEnable title:NSLocalizedString(@"Terremoti forti", @"") subtitle:NSLocalizedString(@"Notifica sismi forti a qualsiasi distanza se la magnitudo è maggiore a", @"")],
|
||||
[[SettingItem alloc] initWithType:SettingTypeSlider title:NSLocalizedString(@"Magnitudo", @"")]
|
||||
];
|
||||
|
||||
self.dataSourceMagnitudoDeboli = [EQNData magitudoDeboli];
|
||||
self.dataSourceRaggioSisma = [EQNData raggioSismi];
|
||||
self.dataSourceMagnitudoForti = [EQNData magitudoForti];
|
||||
|
||||
[self updateUI];
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated
|
||||
{
|
||||
[super viewWillAppear:animated];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
#pragma mark - Private
|
||||
|
||||
- (void)setupUI
|
||||
{
|
||||
self.navigationItem.largeTitleDisplayMode = UINavigationItemLargeTitleDisplayModeNever;
|
||||
|
||||
self.tableView.estimatedRowHeight = 200.0;
|
||||
self.tableView.rowHeight = UITableViewAutomaticDimension;
|
||||
[self.tableView registerClass:[SettingSectionHeaderView class] forHeaderFooterViewReuseIdentifier:SettingSectionHeaderView.Identifier];
|
||||
[self.tableView registerClass:[SettingEnableTableViewCell class] forCellReuseIdentifier:SettingEnableTableViewCell.Identifier];
|
||||
[self.tableView registerClass:[SettingSliderTableViewCell class] forCellReuseIdentifier:SettingSliderTableViewCell.Identifier];
|
||||
[self.tableView registerClass:[SettingMultivaluesTableViewCell class] forCellReuseIdentifier:SettingMultivaluesTableViewCell.Identifier];
|
||||
}
|
||||
|
||||
- (void)updateUI
|
||||
{
|
||||
self.notificationEnabled = [EQNNotificeReteSismiche center].isAbilitato;
|
||||
self.notificationNearEarthquakeEnabled = [EQNNotificeReteSismiche center].isAbilitaVicini;
|
||||
self.notificationStrongEarthquakeEnabled = [EQNNotificeReteSismiche center].isTerremortiForti;
|
||||
|
||||
// raggio dalla tua posizione
|
||||
EQNGenericValue *raggioSisma = [EQNData raggioSismaFor:[EQNNotificeReteSismiche center].distanzaPosizione];
|
||||
self.currentUserPositionRadius = raggioSisma;
|
||||
|
||||
// energia sisma
|
||||
EQNGenericValue *energiaSisma = [EQNData magitudoDeboleFor:[EQNNotificeReteSismiche center].energiaSisma];
|
||||
self.currentSeismicEnergy = energiaSisma;
|
||||
|
||||
// terremoti vicini
|
||||
EQNGenericValue *terremotiVicini = [EQNData raggioSismaFor:[EQNNotificeReteSismiche center].distanzaVicini];
|
||||
self.currentNearEarthquakeDistance = terremotiVicini;
|
||||
|
||||
// terremoti forti
|
||||
EQNGenericValue *terremotiForti = [EQNData magitudoForteFor:[EQNNotificeReteSismiche center].energiaTerremotiForti];
|
||||
self.currentStrongEarthquakeDistance = terremotiForti;
|
||||
|
||||
// enti
|
||||
if (![EQNNotificeReteSismiche center].listaEnti) {
|
||||
[EQNNotificeReteSismiche center].listaEnti = [EQNData.seismicNetworkAcronyms copy];
|
||||
}
|
||||
|
||||
[[EQNNotificeReteSismiche center] saveUserInfo];
|
||||
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Table view data source
|
||||
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
|
||||
{
|
||||
SettingSectionHeaderView *headerView = [tableView dequeueReusableHeaderFooterViewWithIdentifier:SettingSectionHeaderView.Identifier];
|
||||
headerView.titleLabel.text = NSLocalizedString(@"Notifiche da reti sismiche", @"titolo impostazioni notifiche");
|
||||
return headerView;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
|
||||
{
|
||||
return SettingSectionHeaderView.Height;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
return self.settings.count;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
SettingItem *setting = self.settings[indexPath.row];
|
||||
|
||||
if (setting.type == SettingTypeEnable) {
|
||||
SettingEnableTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:SettingEnableTableViewCell.Identifier forIndexPath:indexPath];
|
||||
cell.titleLabel.text = setting.displayTitle;
|
||||
cell.descriptionLabel.text = setting.subtitle;
|
||||
|
||||
if (indexPath.row == RowIdentifierAbilitaNotifiche) {
|
||||
cell.toggleSwitch.on = self.notificationEnabled;
|
||||
cell.valueChanged = ^(BOOL enabled) {
|
||||
self.notificationEnabled = enabled;
|
||||
[EQNNotificeReteSismiche center].isAbilitato = self.notificationEnabled;
|
||||
[[EQNNotificeReteSismiche center] saveUserInfo];
|
||||
[self.tableView reloadData];
|
||||
};
|
||||
} else if (indexPath.row == RowIdentifierTerremotiVicini) {
|
||||
cell.toggleSwitch.on = self.notificationNearEarthquakeEnabled;
|
||||
cell.isDisabled = !self.notificationEnabled;
|
||||
cell.valueChanged = ^(BOOL enabled) {
|
||||
self.notificationNearEarthquakeEnabled = enabled;
|
||||
[EQNNotificeReteSismiche center].isAbilitaVicini = self.notificationNearEarthquakeEnabled;
|
||||
[[EQNNotificeReteSismiche center] saveUserInfo];
|
||||
[self.tableView reloadData];
|
||||
};
|
||||
} else if (indexPath.row == RowIdentifierTerremotiForti) {
|
||||
cell.toggleSwitch.on = self.notificationStrongEarthquakeEnabled;
|
||||
cell.isDisabled = !self.notificationEnabled;
|
||||
cell.valueChanged = ^(BOOL enabled) {
|
||||
self.notificationStrongEarthquakeEnabled = enabled;
|
||||
[EQNNotificeReteSismiche center].isTerremortiForti = self.notificationStrongEarthquakeEnabled;
|
||||
[[EQNNotificeReteSismiche center] saveUserInfo];
|
||||
[self.tableView reloadData];
|
||||
};
|
||||
}
|
||||
|
||||
return cell;
|
||||
} else if (setting.type == SettingTypeMultiValues) {
|
||||
SettingMultivaluesTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:SettingMultivaluesTableViewCell.Identifier forIndexPath:indexPath];
|
||||
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
|
||||
cell.isDisabled = !self.notificationEnabled;
|
||||
cell.userInteractionEnabled = self.notificationEnabled;
|
||||
cell.titleLabel.text = setting.title;
|
||||
|
||||
if (indexPath.row == RowIdentifierRetiSismiche) {
|
||||
cell.valuesLabel.text = [self stringOfSelectedNetworks];
|
||||
}
|
||||
|
||||
return cell;
|
||||
} else if (setting.type == SettingTypeSlider) {
|
||||
SettingSliderTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:SettingSliderTableViewCell.Identifier forIndexPath:indexPath];
|
||||
cell.titleLabel.text = setting.displayTitle;
|
||||
|
||||
if (indexPath.row == RowIdentifierRaggioPosizione) {
|
||||
cell.isDisabled = !self.notificationEnabled;
|
||||
[cell configureSliderWith:self.dataSourceRaggioSisma current:self.currentUserPositionRadius];
|
||||
cell.valueChanged = ^(EQNGenericValue *item) {
|
||||
[self updateUserPositionRadius:item];
|
||||
};
|
||||
} else if (indexPath.row == RowIdentifierEnergiaSisma) {
|
||||
cell.isDisabled = !self.notificationEnabled;
|
||||
[cell configureSliderWith:self.dataSourceMagnitudoDeboli current:self.currentSeismicEnergy];
|
||||
cell.valueChanged = ^(EQNGenericValue *item) {
|
||||
[self updateSeismicEnergy:item];
|
||||
};
|
||||
} else if (indexPath.row == RowIdentifierTerremotiFortiDistanza) {
|
||||
cell.isDisabled = !self.notificationEnabled || !self.notificationStrongEarthquakeEnabled;
|
||||
[cell configureSliderWith:self.dataSourceMagnitudoForti current:self.currentStrongEarthquakeDistance];
|
||||
cell.valueChanged = ^(EQNGenericValue *item) {
|
||||
[self updateStrongEarthquakeEnergy:item];
|
||||
};
|
||||
}
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
SettingItem *setting = self.settings[indexPath.row];
|
||||
if (setting.segue != nil) {
|
||||
[self performSegueWithIdentifier:setting.segue sender:nil];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Private
|
||||
|
||||
- (void)updateUserPositionRadius:(EQNGenericValue *)radius
|
||||
{
|
||||
[EQNNotificeReteSismiche center].distanzaPosizione = radius.value;
|
||||
[[EQNNotificeReteSismiche center] saveUserInfo];
|
||||
|
||||
[self updateUI];
|
||||
}
|
||||
|
||||
- (void)updateSeismicEnergy:(EQNGenericValue *)energy
|
||||
{
|
||||
[EQNNotificeReteSismiche center].energiaSisma = energy.value;
|
||||
[[EQNNotificeReteSismiche center] saveUserInfo];
|
||||
|
||||
[self updateUI];
|
||||
}
|
||||
|
||||
- (void)updateStrongEarthquakeEnergy:(EQNGenericValue *)energy
|
||||
{
|
||||
[EQNNotificeReteSismiche center].energiaTerremotiForti = energy.value;
|
||||
[[EQNNotificeReteSismiche center] saveUserInfo];
|
||||
|
||||
[self updateUI];
|
||||
}
|
||||
|
||||
- (NSString *)stringOfSelectedNetworks
|
||||
{
|
||||
NSArray *networks = [EQNNotificeReteSismiche center].listaEnti;
|
||||
networks = [networks sortedArrayUsingSelector:@selector(localizedCaseInsensitiveCompare:)];
|
||||
return [networks componentsJoinedByString:@", "];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,72 @@
|
||||
//
|
||||
// SettingsSeismicNetworksViewController.swift
|
||||
// Earthquake Network
|
||||
//
|
||||
// Created by Busi Andrea on 26/08/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class SettingsSeismicNetworksViewController: UITableViewController {
|
||||
|
||||
var networks = [EQNSeismicNetwork]()
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
tableView.register(SettingDetailTableViewCell.self, forCellReuseIdentifier: SettingDetailTableViewCell.Identifier)
|
||||
tableView.register(SettingSectionHeaderView.self, forHeaderFooterViewReuseIdentifier: SettingSectionHeaderView.Identifier)
|
||||
|
||||
networks = EQNData.seismicNetworks().sorted(by: { $0.acronym < $1.acronym })
|
||||
}
|
||||
|
||||
// MARK: - Table view data source
|
||||
|
||||
override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
|
||||
let headerView = tableView.dequeueReusableHeaderFooterView(withIdentifier: SettingSectionHeaderView.Identifier) as! SettingSectionHeaderView
|
||||
headerView.titleLabel.text = NSLocalizedString("Reti sismiche", comment: "");
|
||||
return headerView
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
|
||||
CGFloat(SettingSectionHeaderView.Height)
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
networks.count
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||
let network = networks[indexPath.row]
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: SettingDetailTableViewCell.Identifier, for: indexPath) as! SettingDetailTableViewCell
|
||||
cell.textLabel?.text = "\(network.acronym) (\(network.country))"
|
||||
cell.detailTextLabel?.text = "Prova"
|
||||
|
||||
if EQNNotificeReteSismiche.center().listaEnti.contains(network.acronym) {
|
||||
cell.accessoryType = .checkmark
|
||||
} else {
|
||||
cell.accessoryType = .none
|
||||
}
|
||||
|
||||
return cell
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||
tableView.deselectRow(at: indexPath, animated: true)
|
||||
|
||||
let network = networks[indexPath.row]
|
||||
|
||||
var savedNetworks = EQNNotificeReteSismiche.center().listaEnti
|
||||
if let index = savedNetworks.firstIndex(where: { $0 == network.acronym }) {
|
||||
savedNetworks.remove(at: index)
|
||||
} else {
|
||||
savedNetworks.append(network.acronym)
|
||||
}
|
||||
|
||||
EQNNotificeReteSismiche.center().listaEnti = savedNetworks
|
||||
EQNNotificeReteSismiche.center().saveUserInfo()
|
||||
|
||||
tableView.reloadData()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// SettingsUserReportAlertsViewController.h
|
||||
// Earthquake Network
|
||||
//
|
||||
// Refactored by Andrea Busi 25/08/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "SettingsBaseViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface SettingsUserReportAlertsViewController : SettingsBaseViewController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,120 @@
|
||||
//
|
||||
// SettingsUserReportAlertsViewController.m
|
||||
// Earthquake Network
|
||||
//
|
||||
// Refactored by Andrea Busi 25/08/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SettingsUserReportAlertsViewController.h"
|
||||
#import "EQNNotificheSegnalazioniUtente.h"
|
||||
#import "EQNUtility.h"
|
||||
|
||||
@interface SettingsUserReportAlertsViewController ()
|
||||
|
||||
@property (nonatomic, strong) NSArray<SettingItem *> *settings;
|
||||
@property (nonatomic, assign) BOOL notificationsEnabled;
|
||||
@property (nonatomic, strong) EQNGenericValue *currentRadius;
|
||||
@end
|
||||
|
||||
@implementation SettingsUserReportAlertsViewController
|
||||
|
||||
#pragma mark - View Lifecycle
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
|
||||
[self setupUI];
|
||||
|
||||
self.settings = @[
|
||||
[[SettingItem alloc] initWithType:SettingTypeEnable title:NSLocalizedString(@"Ricevi le notifiche dei sismi segnalati manualmente dagli utenti", @"")],
|
||||
[[SettingItem alloc] initWithType:SettingTypeSlider title:NSLocalizedString(@"Raggio dalla tua posizione", @"")]
|
||||
];
|
||||
|
||||
[self updateUI];
|
||||
}
|
||||
|
||||
#pragma mark - Private
|
||||
|
||||
- (void)setupUI
|
||||
{
|
||||
self.navigationItem.largeTitleDisplayMode = UINavigationItemLargeTitleDisplayModeNever;
|
||||
|
||||
self.tableView.estimatedRowHeight = 100.0;
|
||||
self.tableView.rowHeight = UITableViewAutomaticDimension;
|
||||
[self.tableView registerClass:[SettingSectionHeaderView class] forHeaderFooterViewReuseIdentifier:SettingSectionHeaderView.Identifier];
|
||||
[self.tableView registerClass:[SettingEnableTableViewCell class] forCellReuseIdentifier:SettingEnableTableViewCell.Identifier];
|
||||
[self.tableView registerClass:[SettingSliderTableViewCell class] forCellReuseIdentifier:SettingSliderTableViewCell.Identifier];
|
||||
}
|
||||
|
||||
- (void)updateUI
|
||||
{
|
||||
self.notificationsEnabled = [EQNNotificheSegnalazioniUtente center].isAbilitato;
|
||||
|
||||
EQNGenericValue *distanzaPosizione = [EQNData raggioSismaFor:[EQNNotificheSegnalazioniUtente center].distanzaPosizione];
|
||||
self.currentRadius = distanzaPosizione;
|
||||
[[EQNNotificheSegnalazioniUtente center] saveUserInfo];
|
||||
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
- (void)updateRadius:(EQNGenericValue *)radius
|
||||
{
|
||||
self.currentRadius = radius;
|
||||
[EQNNotificheSegnalazioniUtente center].distanzaPosizione = radius.value;
|
||||
[[EQNNotificheSegnalazioniUtente center] saveUserInfo];
|
||||
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
#pragma mark - Table view data source
|
||||
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
|
||||
{
|
||||
SettingSectionHeaderView *headerView = [tableView dequeueReusableHeaderFooterViewWithIdentifier:SettingSectionHeaderView.Identifier];
|
||||
headerView.titleLabel.text = NSLocalizedString(@"Notifiche segnalazioni utente", @"titolo impostazioni notifiche");
|
||||
return headerView;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
|
||||
{
|
||||
return SettingSectionHeaderView.Height;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
return self.settings.count;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
SettingItem *setting = self.settings[indexPath.row];
|
||||
|
||||
if (setting.type == SettingTypeEnable) {
|
||||
SettingEnableTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:SettingEnableTableViewCell.Identifier forIndexPath:indexPath];
|
||||
cell.toggleSwitch.on = self.notificationsEnabled;
|
||||
cell.titleLabel.text = setting.displayTitle;
|
||||
cell.descriptionLabel.text = setting.subtitle;
|
||||
cell.valueChanged = ^(BOOL enabled) {
|
||||
self.notificationsEnabled = enabled;
|
||||
[EQNNotificheSegnalazioniUtente center].isAbilitato = self.notificationsEnabled;
|
||||
[[EQNNotificheSegnalazioniUtente center] saveUserInfo];
|
||||
[self.tableView reloadData];
|
||||
};
|
||||
return cell;
|
||||
} else if (setting.type == SettingTypeSlider) {
|
||||
SettingSliderTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:SettingSliderTableViewCell.Identifier forIndexPath:indexPath];
|
||||
cell.isDisabled = !self.notificationsEnabled;
|
||||
cell.titleLabel.text = setting.displayTitle;
|
||||
[cell configureSliderWith:[EQNData raggioSismi] current:self.currentRadius];
|
||||
cell.valueChanged = ^(EQNGenericValue *item) {
|
||||
[self updateRadius:item];
|
||||
};
|
||||
return cell;
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,128 @@
|
||||
//
|
||||
// SettingsViewController.swift
|
||||
// Earthquake Network
|
||||
//
|
||||
// Created by Busi Andrea on 30/08/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import SafariServices
|
||||
|
||||
class SettingsViewController: UITableViewController {
|
||||
|
||||
private static let SegueIdentifierAllertaSismica = "ShowAllertaSismica"
|
||||
private static let SegueIdentifierNotificheSegnalazioniUtente = "ShowNotificheSegnalazioniUtente"
|
||||
private static let SegueIdentifierNotificheRetiSismiche = "ShowNotificheRetiSismiche"
|
||||
private static let SegueIdentifierSafari = "ShowSafari"
|
||||
|
||||
private enum InfoItem: Int {
|
||||
case informations
|
||||
case faq
|
||||
case help
|
||||
case author
|
||||
case sponsors
|
||||
case disclaimer
|
||||
case privacy
|
||||
|
||||
var externalUrl: URL? {
|
||||
let baseUrl = EQNWebsiteAddress
|
||||
switch self {
|
||||
case .informations: return URL(string: "\(baseUrl)")
|
||||
case .faq: return URL(string: "\(baseUrl)/f-a-q/")
|
||||
case .help: return URL(string: "\(baseUrl)/help/")
|
||||
case .author: return URL(string: "\(baseUrl)/contact/")
|
||||
case .sponsors: return URL(string: "\(baseUrl)/sponsors/")
|
||||
case .disclaimer: return URL(string: "\(baseUrl)/terms-conditions/")
|
||||
case .privacy: return URL(string: "\(baseUrl)/privacy/")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var settings: [[SettingItem]] = [
|
||||
[
|
||||
SettingItem(type: .detail, title: NSLocalizedString("Allerta in tempo reale", comment: ""), segue: SegueIdentifierAllertaSismica, emoji: "🚨"),
|
||||
SettingItem(type: .detail, title: NSLocalizedString("Notifiche da reti sismiche", comment: ""), segue: SegueIdentifierNotificheRetiSismiche, emoji: "🔔"),
|
||||
SettingItem(type: .detail, title: NSLocalizedString("Notifiche segnalazioni utente", comment: ""), segue: SegueIdentifierNotificheSegnalazioniUtente, emoji: "🔔")
|
||||
],
|
||||
[
|
||||
SettingItem(type: .detail, title: NSLocalizedString("Informazioni", comment: ""), segue: SegueIdentifierSafari, icon: "menu-icon-info"),
|
||||
SettingItem(type: .detail, title: NSLocalizedString("F.A.Q.", comment: ""), segue: SegueIdentifierSafari, icon: "menu-icon-faq"),
|
||||
SettingItem(type: .detail, title: NSLocalizedString("Help", comment: ""), segue: SegueIdentifierSafari, icon: "menu-icon-help"),
|
||||
SettingItem(type: .detail, title: NSLocalizedString("Autore", comment: ""), segue: SegueIdentifierSafari, icon: "menu-icon-author"),
|
||||
SettingItem(type: .detail, title: NSLocalizedString("Patrocinatori", comment: ""), segue: SegueIdentifierSafari, icon: "menu-icon-sponsors"),
|
||||
SettingItem(type: .detail, title: NSLocalizedString("Disclaimer", comment: ""), segue: SegueIdentifierSafari, icon: "menu-icon-terms"),
|
||||
SettingItem(type: .detail, title: NSLocalizedString("Privacy", comment: ""), segue: SegueIdentifierSafari, icon: "menu-icon-privacy")
|
||||
]
|
||||
]
|
||||
|
||||
// MARK: - View Lifecycle
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
title = NSLocalizedString("Impostazioni", comment: "")
|
||||
setupUI()
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
private func setupUI() {
|
||||
tableView.register(SettingDetailTableViewCell.self, forCellReuseIdentifier: SettingDetailTableViewCell.Identifier)
|
||||
tableView.contentInset = UIEdgeInsets(top: 20.0, left: 0.0, bottom: 0.0, right: 0.0)
|
||||
}
|
||||
|
||||
// MARK: - Table view data source
|
||||
|
||||
override func numberOfSections(in tableView: UITableView) -> Int {
|
||||
settings.count
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, titleForFooterInSection section: Int) -> String? {
|
||||
if section == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
var title = ""
|
||||
if let appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String {
|
||||
let version = NSLocalizedString("Versione", comment: "etichetta versione app")
|
||||
title = "\(version): \(appVersion)"
|
||||
}
|
||||
|
||||
let userId = EQNUser.default().user_ID ?? "n.d."
|
||||
title = "\(title) - User id: \(userId)"
|
||||
|
||||
return title
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
let aSection = settings[section]
|
||||
return aSection.count
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||
let setting = settings[indexPath.section][indexPath.row]
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: SettingDetailTableViewCell.Identifier, for: indexPath) as! SettingDetailTableViewCell
|
||||
cell.textLabel?.text = setting.displayTitle
|
||||
if let icon = setting.icon {
|
||||
cell.imageView?.tintColor = .darkGray
|
||||
cell.imageView?.image = UIImage(named: icon)
|
||||
}
|
||||
cell.accessoryType = .disclosureIndicator
|
||||
return cell
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||
tableView.deselectRow(at: indexPath, animated: true)
|
||||
let setting = settings[indexPath.section][indexPath.row]
|
||||
if let segue = setting.segue {
|
||||
if segue == Self.SegueIdentifierSafari, let item = InfoItem(rawValue: indexPath.row), let url = item.externalUrl {
|
||||
// show Safari with the given URL
|
||||
let controller = SFSafariViewController(url: url)
|
||||
present(controller, animated: true, completion: nil)
|
||||
} else {
|
||||
performSegue(withIdentifier: segue, sender: nil)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -115,15 +115,6 @@ typedef enum : NSInteger {
|
||||
|
||||
} EQNTipoDettagliMappa;
|
||||
|
||||
typedef enum : NSInteger {
|
||||
reteSmartphoneController = 0,
|
||||
reteSismicaController,
|
||||
segnalazioneUtentiController,
|
||||
tsunamiControler
|
||||
|
||||
} EQNController;
|
||||
|
||||
|
||||
// IMPOSTAZIONI NAZIONE RETE SISMICA
|
||||
|
||||
typedef enum : NSInteger {
|
||||
@@ -249,7 +240,6 @@ typedef enum : NSInteger {
|
||||
|
||||
/////////////////////////////////// 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"
|
||||
@@ -272,7 +262,6 @@ typedef enum : NSInteger {
|
||||
#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"
|
||||
|
||||
@@ -293,7 +282,6 @@ typedef enum : NSInteger {
|
||||
/////////////////// 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"
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
#import "EQNUtility.h"
|
||||
#import "Costanti.h"
|
||||
#import "EQNUser.h"
|
||||
#import "SWRevealViewController.h"
|
||||
#import "EQNManager.h"
|
||||
#import "EQNNotificeReteSismiche.h"
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>_XCCurrentVersionName</key>
|
||||
<string>Earthquake_Network.xcdatamodel</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="1" systemVersion="11A491" minimumToolsVersion="Automatic" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier="">
|
||||
<elements/>
|
||||
</model>
|
||||
@@ -17,7 +17,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.0</string>
|
||||
<string>$(MARKETING_VERSION)</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>GADApplicationIdentifier</key>
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
//
|
||||
// EQNAppearanceCommand.swift
|
||||
// Earthquake Network
|
||||
//
|
||||
// Created by Busi Andrea on 14/08/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
public class EQNAppearanceCommand: EQNCommandProtocol {
|
||||
|
||||
|
||||
// MARK: - Public
|
||||
|
||||
func execute() {
|
||||
print("EQNAppearanceCommand: start execute")
|
||||
|
||||
applyAppearance()
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
private func applyAppearance() {
|
||||
// UINavigationBar
|
||||
let proxyNavBar = UINavigationBar.appearance(whenContainedInInstancesOf: [UINavigationController.self])
|
||||
if #available(iOS 13.0, *) {
|
||||
let navAppearance = UINavigationBarAppearance()
|
||||
navAppearance.configureWithOpaqueBackground()
|
||||
navAppearance.titleTextAttributes = [
|
||||
NSAttributedString.Key.foregroundColor: UIColor.darkGray
|
||||
]
|
||||
navAppearance.largeTitleTextAttributes = [
|
||||
NSAttributedString.Key.foregroundColor: UIColor.darkGray
|
||||
]
|
||||
navAppearance.backgroundColor = UIColor.eqn_primary
|
||||
navAppearance.shadowColor = UIColor.clear
|
||||
|
||||
proxyNavBar.isTranslucent = false
|
||||
proxyNavBar.tintColor = UIColor.darkGray
|
||||
proxyNavBar.standardAppearance = navAppearance
|
||||
proxyNavBar.scrollEdgeAppearance = navAppearance
|
||||
} else {
|
||||
proxyNavBar.tintColor = UIColor.darkGray
|
||||
proxyNavBar.isTranslucent = false
|
||||
proxyNavBar.barTintColor = UIColor.eqn_primary
|
||||
proxyNavBar.titleTextAttributes = [
|
||||
NSAttributedString.Key.foregroundColor: UIColor.white
|
||||
]
|
||||
}
|
||||
|
||||
let proxyTabBar = UITabBar.appearance()
|
||||
proxyTabBar.tintColor = UIColor(named: "Red")!
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// EQNCommandProtocol.swift
|
||||
// Earthquake Network
|
||||
//
|
||||
// Created by Busi Andrea on 14/08/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
@objc
|
||||
protocol EQNCommandProtocol: class {
|
||||
@objc func execute()
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// EQNStartupCommandsBuilder.swift
|
||||
// Earthquake Network
|
||||
//
|
||||
// Created by Busi Andrea on 14/08/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
@objc
|
||||
public class EQNStartupCommandsBuilder: NSObject {
|
||||
|
||||
// MARK: - Public
|
||||
|
||||
@objc
|
||||
func build() -> [EQNCommandProtocol] {
|
||||
return [
|
||||
EQNAppearanceCommand()
|
||||
]
|
||||
}
|
||||
|
||||
@objc
|
||||
func execute(commands: [EQNCommandProtocol]) {
|
||||
print("EQNStartupCommandsBuilder: start execute commands")
|
||||
|
||||
commands.forEach { (command) in
|
||||
command.execute()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,164 @@
|
||||
//
|
||||
// EQNData.swift
|
||||
// Earthquake Network
|
||||
//
|
||||
// Created by Busi Andrea on 26/08/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
@objc class EQNData: NSObject {
|
||||
|
||||
private static let DefaultRaggioSisma = EQNGenericValue(value:"100000", display:"Qualsiasi distanza")
|
||||
private static let DefaultMagitudoDebole = EQNGenericValue(value:"2.0", display:"Magnitudo >= 2.0")
|
||||
private static let DefaultMagitudoForte = EQNGenericValue(value:"5.5", display:"Magnitudo >= 5.5")
|
||||
private static let DefaultSeismicToNotify = EQNGenericValue(value: "0", display: "Qualsiasi intensità")
|
||||
private static let DefaultDoNotDisturbStartTime = 8
|
||||
private static let DefaultDoNotDisturbEndTime = 22
|
||||
|
||||
// MARK: - Public
|
||||
|
||||
@objc class func raggioSismi() -> [EQNGenericValue] {
|
||||
[
|
||||
EQNGenericValue(value:"50", display:"50 km"),
|
||||
EQNGenericValue(value:"100", display:"100 km"),
|
||||
EQNGenericValue(value:"200", display:"200 km"),
|
||||
EQNGenericValue(value:"300", display:"300 km"),
|
||||
EQNGenericValue(value:"400", display:"400 km"),
|
||||
EQNGenericValue(value:"500", display:"500 km"),
|
||||
EQNGenericValue(value:"600", display:"600 km"),
|
||||
EQNGenericValue(value:"800", display:"800 km"),
|
||||
EQNGenericValue(value:"1000", display:"1000 km"),
|
||||
EQNGenericValue(value:"2000", display:"2000 km"),
|
||||
EQNGenericValue(value:"4000", display:"4000 km"),
|
||||
EQNGenericValue(value:"100000", display:"Qualsiasi distanza"),
|
||||
]
|
||||
}
|
||||
|
||||
/// Returns the EQNGenericValue for the given value, or the default one
|
||||
/// - Parameter value: Sisma value to search
|
||||
/// - Returns: Found value or default
|
||||
@objc class func raggioSisma(for value: String?) -> EQNGenericValue {
|
||||
if let value = value, let genericValue = Self.raggioSismi().first(where: { $0.value == value }) {
|
||||
return genericValue
|
||||
}
|
||||
return Self.DefaultRaggioSisma
|
||||
}
|
||||
|
||||
@objc class func magitudoDeboli() -> [EQNGenericValue] {
|
||||
[
|
||||
EQNGenericValue(value:"0.5", display:"Magnitudo >= 0.5"),
|
||||
EQNGenericValue(value:"1.0", display:"Magnitudo >= 1.0"),
|
||||
EQNGenericValue(value:"1.5", display:"Magnitudo >= 1.5"),
|
||||
EQNGenericValue(value:"2.0", display:"Magnitudo >= 2.0"),
|
||||
EQNGenericValue(value:"2.5", display:"Magnitudo >= 2.5"),
|
||||
EQNGenericValue(value:"3.0", display:"Magnitudo >= 3.0"),
|
||||
EQNGenericValue(value:"3.5", display:"Magnitudo >= 3.5"),
|
||||
EQNGenericValue(value:"4.0", display:"Magnitudo >= 4.0"),
|
||||
EQNGenericValue(value:"4.5", display:"Magnitudo >= 4.5"),
|
||||
EQNGenericValue(value:"5.0", display:"Magnitudo >= 5.0"),
|
||||
EQNGenericValue(value:"5.5", display:"Magnitudo >= 5.5")
|
||||
]
|
||||
}
|
||||
|
||||
/// Returns the EQNGenericValue for the given value, or the default one
|
||||
/// - Parameter value: Magnitudo value to search
|
||||
/// - Returns: Found value or default
|
||||
@objc class func magitudoDebole(for value: String?) -> EQNGenericValue {
|
||||
if let value = value, let genericValue = Self.magitudoDeboli().first(where: { $0.value == value }) {
|
||||
return genericValue
|
||||
}
|
||||
return Self.DefaultMagitudoDebole
|
||||
}
|
||||
|
||||
@objc class func magitudoForti() -> [EQNGenericValue] {
|
||||
[
|
||||
EQNGenericValue(value:"5.5", display:"Magnitudo >= 5.5"),
|
||||
EQNGenericValue(value:"6.0", display:"Magnitudo >= 6.0"),
|
||||
EQNGenericValue(value:"6.5", display:"Magnitudo >= 6.5"),
|
||||
EQNGenericValue(value:"7.0", display:"Magnitudo >= 7.0"),
|
||||
EQNGenericValue(value:"7.5", display:"Magnitudo >= 7.5")
|
||||
]
|
||||
}
|
||||
|
||||
/// Returns the EQNGenericValue for the given value, or the default one
|
||||
/// - Parameter value: Magnitudo value to search
|
||||
/// - Returns: Found value or default
|
||||
@objc class func magitudoForte(for value: String?) -> EQNGenericValue {
|
||||
if let value = value, let genericValue = Self.magitudoForti().first(where: { $0.value == value }) {
|
||||
return genericValue
|
||||
}
|
||||
return Self.DefaultMagitudoForte
|
||||
}
|
||||
|
||||
@objc class func seismicNetworks() -> [EQNSeismicNetwork] {
|
||||
[
|
||||
EQNSeismicNetwork(acronym: "USGS", country: NSLocalizedString("Globale", comment: ""), extended: ""),
|
||||
EQNSeismicNetwork(acronym: "INGV", country: NSLocalizedString("Italia", comment: ""), extended: ""),
|
||||
EQNSeismicNetwork(acronym: "IGN", country: NSLocalizedString("Spagna", comment: ""), extended: ""),
|
||||
EQNSeismicNetwork(acronym: "CSI", country: NSLocalizedString("Cina", comment: ""), extended: ""),
|
||||
EQNSeismicNetwork(acronym: "JMA", country: NSLocalizedString("Giappone", comment: ""), extended: ""),
|
||||
EQNSeismicNetwork(acronym: "Ineter", country: NSLocalizedString("Nicaragua", comment: ""), extended: ""),
|
||||
EQNSeismicNetwork(acronym: "SSN", country: NSLocalizedString("Messico", comment: ""), extended: ""),
|
||||
EQNSeismicNetwork(acronym: "SGC", country: NSLocalizedString("Colombia", comment: ""), extended: ""),
|
||||
EQNSeismicNetwork(acronym: "RSN", country: NSLocalizedString("Costa Rica", comment: ""), extended: ""),
|
||||
EQNSeismicNetwork(acronym: "CSN", country: NSLocalizedString("Cile", comment: ""), extended: ""),
|
||||
EQNSeismicNetwork(acronym: "FUNVISIS", country: NSLocalizedString("Venezuela", comment: ""), extended: ""),
|
||||
EQNSeismicNetwork(acronym: "GeoNet", country: NSLocalizedString("Nuova Zelanda", comment: ""), extended: ""),
|
||||
EQNSeismicNetwork(acronym: "INPRES", country: NSLocalizedString("Argentina", comment: ""), extended: ""),
|
||||
EQNSeismicNetwork(acronym: "IGEPN", country: NSLocalizedString("Ecuador", comment: ""), extended: ""),
|
||||
EQNSeismicNetwork(acronym: "IGP", country: NSLocalizedString("Perù", comment: ""), extended: ""),
|
||||
EQNSeismicNetwork(acronym: "UASD", country: NSLocalizedString("Repubblica Dominicana", comment: ""), extended: ""),
|
||||
EQNSeismicNetwork(acronym: "EMSC", country: NSLocalizedString("Globale", comment: ""), extended: "")
|
||||
]
|
||||
}
|
||||
|
||||
@objc class func seismicNetworkAcronyms() -> [String] {
|
||||
Self.seismicNetworks().map { $0.acronym }
|
||||
}
|
||||
|
||||
@objc class func seismicToNotify() -> [EQNGenericValue] {
|
||||
[
|
||||
EQNGenericValue(value:"0", display:"Qualsiasi intensità"),
|
||||
EQNGenericValue(value:"1", display:"Solo sismi forti")
|
||||
]
|
||||
}
|
||||
|
||||
@objc class func seismicToNotify(for value: String?) -> EQNGenericValue {
|
||||
if let value = value, let genericValue = Self.seismicToNotify().first(where: { $0.value == value }) {
|
||||
return genericValue
|
||||
}
|
||||
return Self.DefaultSeismicToNotify
|
||||
}
|
||||
|
||||
@objc class func doNotDisturbStartDate(from date: Date?) -> Date {
|
||||
if let date = date {
|
||||
return date
|
||||
}
|
||||
|
||||
// return default
|
||||
let calendar = Calendar(identifier: .gregorian)
|
||||
let units: Set<Calendar.Component> = [.year, .month, .day, .hour, .minute]
|
||||
var components = calendar.dateComponents(units, from: Date())
|
||||
components.hour = Self.DefaultDoNotDisturbStartTime
|
||||
components.minute = 00
|
||||
return calendar.date(from: components)!
|
||||
}
|
||||
|
||||
|
||||
@objc class func doNotDisturbEndDate(from date: Date?) -> Date {
|
||||
if let date = date {
|
||||
return date
|
||||
}
|
||||
|
||||
// return default
|
||||
let calendar = Calendar(identifier: .gregorian)
|
||||
let units: Set<Calendar.Component> = [.year, .month, .day, .hour, .minute]
|
||||
var components = calendar.dateComponents(units, from: Date())
|
||||
components.hour = Self.DefaultDoNotDisturbEndTime
|
||||
components.minute = 00
|
||||
return calendar.date(from: components)!
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// EQNGenericValue.swift
|
||||
// Earthquake Network
|
||||
//
|
||||
// Created by Busi Andrea on 26/08/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
@objcMembers
|
||||
class EQNGenericValue: NSObject {
|
||||
/// Value of the element
|
||||
public let value: String
|
||||
/// Display text
|
||||
public let display: String
|
||||
|
||||
// MARK: - Init
|
||||
|
||||
init(value: String, display: String) {
|
||||
self.value = value
|
||||
self.display = NSLocalizedString(display, comment: "")
|
||||
}
|
||||
|
||||
// MARK: - Equal
|
||||
|
||||
override func isEqual(_ object: Any?) -> Bool {
|
||||
if let aValue = object as? EQNGenericValue {
|
||||
return aValue.value == self.value
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// UIColor+EQN.swift
|
||||
// Earthquake Network
|
||||
//
|
||||
// Created by Busi Andrea on 14/08/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
extension UIColor {
|
||||
|
||||
@objc(eqn_primaryColor)
|
||||
class var eqn_primary: UIColor {
|
||||
UIColor(red: 198.0/255.0, green: 213.0/255.0, blue: 247.0/255.0, alpha: 1.0)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// EQNSeismicNetwork.swift
|
||||
// Earthquake Network
|
||||
//
|
||||
// Created by Busi Andrea on 26/08/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
@objcMembers
|
||||
class EQNSeismicNetwork: NSObject {
|
||||
let acronym: String
|
||||
let country: String
|
||||
let extended: String
|
||||
|
||||
// MARK: - Init
|
||||
|
||||
init(acronym: String, country: String, extended: String) {
|
||||
self.acronym = acronym
|
||||
self.country = country
|
||||
self.extended = extended
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
//
|
||||
// SettingItem.swift
|
||||
// Earthquake Network
|
||||
//
|
||||
// Created by Busi Andrea on 25/08/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
@objc enum SettingType: Int {
|
||||
case detail
|
||||
case enable
|
||||
case slider
|
||||
case segmented
|
||||
case date
|
||||
case multiValues
|
||||
}
|
||||
|
||||
@objcMembers
|
||||
class SettingItem: NSObject {
|
||||
let title: String
|
||||
let subtitle: String?
|
||||
let segue: String?
|
||||
let icon: String?
|
||||
let emoji: String?
|
||||
let type: SettingType
|
||||
|
||||
var displayTitle: String {
|
||||
if let emoji = emoji {
|
||||
return "\(emoji) \(title)"
|
||||
}
|
||||
return title
|
||||
}
|
||||
|
||||
// MARK: - Init
|
||||
|
||||
convenience init(type: SettingType, title: String) {
|
||||
self.init(type: type, title: title, subtitle: nil, segue: nil, icon: nil, emoji: nil)
|
||||
}
|
||||
|
||||
convenience init(type: SettingType, title: String, subtitle: String) {
|
||||
self.init(type: type, title: title, subtitle: subtitle, segue: nil, icon: nil, emoji: nil)
|
||||
}
|
||||
|
||||
convenience init(type: SettingType, title: String, segue: String) {
|
||||
self.init(type: type, title: title, subtitle: nil, segue: segue, icon: nil, emoji: nil)
|
||||
}
|
||||
|
||||
convenience init(type: SettingType, title: String, segue: String, icon: String) {
|
||||
self.init(type: type, title: title, subtitle: nil, segue: segue, icon: icon, emoji: nil)
|
||||
}
|
||||
|
||||
convenience init(type: SettingType, title: String, segue: String, emoji: String) {
|
||||
self.init(type: type, title: title, subtitle: nil, segue: segue, icon: nil, emoji: emoji)
|
||||
}
|
||||
|
||||
init(type: SettingType, title: String, subtitle: String? = nil, segue: String? = nil, icon: String? = nil, emoji: String? = nil) {
|
||||
self.type = type
|
||||
self.title = title
|
||||
self.subtitle = subtitle
|
||||
self.segue = segue
|
||||
self.icon = icon
|
||||
self.emoji = emoji
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -1,23 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "eq_icon.png",
|
||||
"idiom" : "universal",
|
||||
"filename" : "menu.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "eq_icon@2x.png",
|
||||
"idiom" : "universal",
|
||||
"filename" : "menu@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "eq_icon@3x.png",
|
||||
"idiom" : "universal",
|
||||
"filename" : "menu@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 111 KiB |
|
After Width: | Height: | Size: 209 KiB |
@@ -1,23 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "eq_icon_pro.png",
|
||||
"idiom" : "universal",
|
||||
"filename" : "distquake_app_pro.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "eq_icon_pro@2x.png",
|
||||
"idiom" : "universal",
|
||||
"filename" : "distquake_app_pro-1.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "eq_icon_pro@3x.png",
|
||||
"idiom" : "universal",
|
||||
"filename" : "distquake_app_pro-2.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 114 KiB |
|
After Width: | Height: | Size: 211 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 34 KiB |
@@ -1,116 +1,116 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "20x20",
|
||||
"filename" : "Icon20@2x.png",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "20@2x.png",
|
||||
"scale" : "2x"
|
||||
"scale" : "2x",
|
||||
"size" : "20x20"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"filename" : "Icon20@3x.png",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "20@3x.png",
|
||||
"scale" : "3x"
|
||||
"scale" : "3x",
|
||||
"size" : "20x20"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"filename" : "Icon29@2x.png",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "29@2x.png",
|
||||
"scale" : "2x"
|
||||
"scale" : "2x",
|
||||
"size" : "29x29"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"filename" : "Icon29@3x.png",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "29@3x.png",
|
||||
"scale" : "3x"
|
||||
"scale" : "3x",
|
||||
"size" : "29x29"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"filename" : "Icon40@2x.png",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "40@2x.png",
|
||||
"scale" : "2x"
|
||||
"scale" : "2x",
|
||||
"size" : "40x40"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"filename" : "Icon40@3x.png",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "40@3x.png",
|
||||
"scale" : "3x"
|
||||
"scale" : "3x",
|
||||
"size" : "40x40"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"filename" : "Icon60@2x.png",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "40@3x-1.png",
|
||||
"scale" : "2x"
|
||||
"scale" : "2x",
|
||||
"size" : "60x60"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"filename" : "Icon60@3x.png",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "60@3x.png",
|
||||
"scale" : "3x"
|
||||
"scale" : "3x",
|
||||
"size" : "60x60"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"filename" : "Icon20.png",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "20.png",
|
||||
"scale" : "1x"
|
||||
"scale" : "1x",
|
||||
"size" : "20x20"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"filename" : "Icon20@2x-1.png",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "20@2x-1.png",
|
||||
"scale" : "2x"
|
||||
"scale" : "2x",
|
||||
"size" : "20x20"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"filename" : "Icon29.png",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "29.png",
|
||||
"scale" : "1x"
|
||||
"scale" : "1x",
|
||||
"size" : "29x29"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"filename" : "Icon29@2x-1.png",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "29@2x-1.png",
|
||||
"scale" : "2x"
|
||||
"scale" : "2x",
|
||||
"size" : "29x29"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"filename" : "Icon40.png",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "20@2x-2.png",
|
||||
"scale" : "1x"
|
||||
"scale" : "1x",
|
||||
"size" : "40x40"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"filename" : "Icon40@2x-1.png",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "40@2x-1.png",
|
||||
"scale" : "2x"
|
||||
"scale" : "2x",
|
||||
"size" : "40x40"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"filename" : "Icon76.png",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "76.png",
|
||||
"scale" : "1x"
|
||||
"scale" : "1x",
|
||||
"size" : "76x76"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"filename" : "Icon76@2x.png",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "76@2x.png",
|
||||
"scale" : "2x"
|
||||
"scale" : "2x",
|
||||
"size" : "76x76"
|
||||
},
|
||||
{
|
||||
"size" : "83.5x83.5",
|
||||
"filename" : "Icon83@2x.png",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "83.5.png",
|
||||
"scale" : "2x"
|
||||
"scale" : "2x",
|
||||
"size" : "83.5x83.5"
|
||||
},
|
||||
{
|
||||
"size" : "1024x1024",
|
||||
"filename" : "Icon1024.png",
|
||||
"idiom" : "ios-marketing",
|
||||
"filename" : "iOS_icon.png",
|
||||
"scale" : "1x"
|
||||
"scale" : "1x",
|
||||
"size" : "1024x1024"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 323 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 413 KiB |
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -1,23 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "navbar-icon-filters.png",
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_action_settings.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "navbar-icon-filters@2x.png",
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_action_settings @2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "navbar-icon-filters@3x.png",
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_action_settings @3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 177 B |
|
After Width: | Height: | Size: 306 B |
|
After Width: | Height: | Size: 369 B |
@@ -1,23 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "navbar-icon-menu.png",
|
||||
"idiom" : "universal",
|
||||
"filename" : "distquake_app_wave.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "navbar-icon-menu@2x.png",
|
||||
"idiom" : "universal",
|
||||
"filename" : "distquake_app_wave-1.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "navbar-icon-menu@3x.png",
|
||||
"idiom" : "universal",
|
||||
"filename" : "distquake_app_wave-2.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
}
|
||||