diff --git a/Settings.bundle/Root.plist b/Settings.bundle/Root.plist
index 36a2a8c..8d560c0 100644
--- a/Settings.bundle/Root.plist
+++ b/Settings.bundle/Root.plist
@@ -16,16 +16,6 @@
DefaultValue
-
- Type
- PSToggleSwitchSpecifier
- Title
- Mensa QR-Code-Scanner (Nur für Mitarbeiter)
- Key
- mensa
- DefaultValue
-
-
Type
PSGroupSpecifier
diff --git a/blista.xcodeproj/project.pbxproj b/blista.xcodeproj/project.pbxproj
index 4e61eed..b775537 100644
--- a/blista.xcodeproj/project.pbxproj
+++ b/blista.xcodeproj/project.pbxproj
@@ -14,7 +14,6 @@
2C280887211BC2FE0062E975 /* TwentysecondViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C280886211BC2FE0062E975 /* TwentysecondViewController.swift */; };
2C2B2FC8213DA67600973A86 /* TwentythirdViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C2B2FC6213DA67500973A86 /* TwentythirdViewController.swift */; };
2C2EC08D1FD3F6CF0094CC16 /* TwelfthViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C2EC08C1FD3F6CF0094CC16 /* TwelfthViewController.swift */; };
- 2C31F3A024035ADE00FB2CDB /* mensa.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 2C31F39F24035ADD00FB2CDB /* mensa.pdf */; };
2C3AC44922C56D5500BCE8AB /* TwentyfourthViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C3AC44822C56D5500BCE8AB /* TwentyfourthViewController.swift */; };
2C3B6AF120AAFF93002A3F5A /* EighteenthViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C3B6AF020AAFF93002A3F5A /* EighteenthViewController.swift */; };
2C3B6AF520AB0DF9002A3F5A /* links.html in Resources */ = {isa = PBXBuildFile; fileRef = 2C3B6AF420AB0DF9002A3F5A /* links.html */; };
@@ -82,7 +81,6 @@
2C280886211BC2FE0062E975 /* TwentysecondViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TwentysecondViewController.swift; sourceTree = ""; };
2C2B2FC6213DA67500973A86 /* TwentythirdViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TwentythirdViewController.swift; path = /Users/falk/Documents/Xcode/blista/blista/TwentythirdViewController.swift; sourceTree = ""; };
2C2EC08C1FD3F6CF0094CC16 /* TwelfthViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TwelfthViewController.swift; sourceTree = ""; };
- 2C31F39F24035ADD00FB2CDB /* mensa.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = mensa.pdf; sourceTree = ""; };
2C3AC44822C56D5500BCE8AB /* TwentyfourthViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TwentyfourthViewController.swift; sourceTree = ""; };
2C3B6AF020AAFF93002A3F5A /* EighteenthViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EighteenthViewController.swift; sourceTree = ""; };
2C3B6AF420AB0DF9002A3F5A /* links.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = links.html; sourceTree = ""; };
@@ -180,7 +178,6 @@
2C68E398231333990059B2CA /* terminplan.pdf */,
2C5FA11E22CE43D8009145AB /* wegbeschreibung.pdf */,
2C5FA12022CE4916009145AB /* intranet.pdf */,
- 2C31F39F24035ADD00FB2CDB /* mensa.pdf */,
2CE3EBC51FD64A2300DCE733 /* assets */,
2CE3EBC61FD64A2300DCE733 /* images */,
2CE3EBC71FD64A2300DCE733 /* index.html */,
@@ -324,7 +321,6 @@
2CA914CC1FDC402A00EC3B02 /* imprint.html in Resources */,
2CE3EBCA1FD64A2400DCE733 /* images in Resources */,
2C98347A1FF2E4F00099A977 /* faq.html in Resources */,
- 2C31F3A024035ADE00FB2CDB /* mensa.pdf in Resources */,
2C3B6AF720AB244C002A3F5A /* privacy.html in Resources */,
2C819163217FB66C0052E7C0 /* blista.png in Resources */,
2C6186321FD680A100C8FCF1 /* Settings.bundle in Resources */,
@@ -582,6 +578,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = blista/blista.entitlements;
+ CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
@@ -594,7 +591,7 @@
INFOPLIST_FILE = blista/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- MARKETING_VERSION = 1.19.0;
+ MARKETING_VERSION = 1.20.0;
PRODUCT_BUNDLE_IDENTIFIER = de.zitrotec.blista;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -612,6 +609,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = blista/blista.entitlements;
+ CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = CM9ECSAB4Y;
@@ -623,7 +621,7 @@
INFOPLIST_FILE = blista/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- MARKETING_VERSION = 1.19.0;
+ MARKETING_VERSION = 1.20.0;
PRODUCT_BUNDLE_IDENTIFIER = de.zitrotec.blista;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
diff --git a/blista/Assets.xcassets/ticket.imageset/Contents.json b/blista/Assets.xcassets/meet.imageset/Contents.json
similarity index 100%
rename from blista/Assets.xcassets/ticket.imageset/Contents.json
rename to blista/Assets.xcassets/meet.imageset/Contents.json
diff --git a/blista/Assets.xcassets/meet.imageset/image@1x.png b/blista/Assets.xcassets/meet.imageset/image@1x.png
new file mode 100644
index 0000000..81c561a
Binary files /dev/null and b/blista/Assets.xcassets/meet.imageset/image@1x.png differ
diff --git a/blista/Assets.xcassets/meet.imageset/image@2x.png b/blista/Assets.xcassets/meet.imageset/image@2x.png
new file mode 100644
index 0000000..1dc0356
Binary files /dev/null and b/blista/Assets.xcassets/meet.imageset/image@2x.png differ
diff --git a/blista/Assets.xcassets/meet.imageset/image@3x.png b/blista/Assets.xcassets/meet.imageset/image@3x.png
new file mode 100644
index 0000000..2e4d35f
Binary files /dev/null and b/blista/Assets.xcassets/meet.imageset/image@3x.png differ
diff --git a/blista/Assets.xcassets/ticket.imageset/image@1x.png b/blista/Assets.xcassets/ticket.imageset/image@1x.png
deleted file mode 100644
index 7424c85..0000000
Binary files a/blista/Assets.xcassets/ticket.imageset/image@1x.png and /dev/null differ
diff --git a/blista/Assets.xcassets/ticket.imageset/image@2x.png b/blista/Assets.xcassets/ticket.imageset/image@2x.png
deleted file mode 100644
index cd32832..0000000
Binary files a/blista/Assets.xcassets/ticket.imageset/image@2x.png and /dev/null differ
diff --git a/blista/Assets.xcassets/ticket.imageset/image@3x.png b/blista/Assets.xcassets/ticket.imageset/image@3x.png
deleted file mode 100644
index c6bb4ce..0000000
Binary files a/blista/Assets.xcassets/ticket.imageset/image@3x.png and /dev/null differ
diff --git a/blista/Base.lproj/Main.storyboard b/blista/Base.lproj/Main.storyboard
index 217352a..03be74c 100644
--- a/blista/Base.lproj/Main.storyboard
+++ b/blista/Base.lproj/Main.storyboard
@@ -1121,10 +1121,10 @@
-
+
-
+
@@ -1132,38 +1132,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -1227,6 +1198,7 @@
+
@@ -1236,7 +1208,6 @@
-
diff --git a/blista/TwentyfifthViewController.swift b/blista/TwentyfifthViewController.swift
index 8dbf14c..b0a493a 100644
--- a/blista/TwentyfifthViewController.swift
+++ b/blista/TwentyfifthViewController.swift
@@ -8,294 +8,124 @@
import UIKit
import Crashlytics
-import AVFoundation
-import QRCodeReader
-import AudioToolbox
-private var viewHasLoaded = false
-
-class TwentyfifthViewController: UIViewController, UIWebViewDelegate, QRCodeReaderViewControllerDelegate {
-
- @IBOutlet weak var webView25: UIWebView!
- @IBOutlet weak var activity: UIActivityIndicatorView!
-
+class TwentyfifthViewController: UIViewController {
+
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
-
- let userDefaults = UserDefaults.standard
- let mensasetting = userDefaults.bool(forKey: "mensa")
- if mensasetting == true
- {
- let rightBarButton = UIBarButtonItem(title: "Scannen", style: UIBarButtonItemStyle.plain, target: self, action: #selector(SixteenViewController.myRightSideBarButtonItemTapped(_:)))
- self.navigationItem.rightBarButtonItem = rightBarButton
-
- let urlpath = Bundle.main.path(forResource: "mensa", ofType: "pdf");
- let requesturl = URL(string: urlpath!)
- let request = URLRequest(url: requesturl!)
- webView25.loadRequest(request)
+
+ let reachability = Reachability()!
+
+ switch reachability.connection {
+ case .wifi:
- UIApplication.shared.isNetworkActivityIndicatorVisible = false
- activity.stopAnimating()
- let readerVC: QRCodeReaderViewController = {
- let builder = QRCodeReaderViewControllerBuilder {
- $0.reader = QRCodeReader(metadataObjectTypes: [.qr], captureDevicePosition: .back)
- $0.showTorchButton = false
- $0.showSwitchCameraButton = false
- $0.showCancelButton = true
- $0.showOverlayView = true
- }
- return QRCodeReaderViewController(builder: builder)
- }()
-
- readerVC.modalPresentationStyle = .formSheet
-
- let reachability = Reachability()!
+ Answers.logContentView(withName: "blistaMeet",
+ contentType: "blistaMeet",
+ contentId: "blistameet",
+ customAttributes: [:])
- switch reachability.connection {
- case .wifi:
- present(readerVC, animated: true, completion: nil)
- readerVC.delegate = self
- readerVC.completionBlock = { (result: QRCodeReaderResult?) in
- if let result = result {
- print("Completion with result: \(result.value)")
- if #available(iOS 9.0, *) {
- AudioServicesPlayAlertSoundWithCompletion(SystemSoundID(kSystemSoundID_Vibrate)) { }
- } else {
- AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate))
- }
- let urlString = result.value.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)
- let url = URL(string: urlString!)
- let request = URLRequest(url: url!)
- if (request.url!.host == "zitrotec.de") {
- self.webView25.loadRequest(request)
- } else {
- }
- }
- }
- case .cellular:
- present(readerVC, animated: true, completion: nil)
- readerVC.delegate = self
- readerVC.completionBlock = { (result: QRCodeReaderResult?) in
- if let result = result {
- print("Completion with result: \(result.value)")
- if #available(iOS 9.0, *) {
- AudioServicesPlayAlertSoundWithCompletion(SystemSoundID(kSystemSoundID_Vibrate)) { }
- } else {
- AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate))
- }
- let urlString = result.value.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)
- let url = URL(string: urlString!)
- let request = URLRequest(url: url!)
- if (request.url!.host == "zitrotec.de") {
- self.webView25.loadRequest(request)
- } else {
- }
- }
- }
- case .none:
- dismiss(animated: true, completion: nil)
- let alert = UIAlertView()
- alert.title = "Du bist Offline"
- alert.message = "Bitte stell eine Internetverbindung her, um diesen Inhalt anzuzeigen."
- alert.addButton(withTitle: "OK")
- alert.show()
- }
- }
- else {
- let reachability = Reachability()!
+ navigationController?.popViewController(animated: true)
+ dismiss(animated: true, completion: nil)
- switch reachability.connection {
- case .wifi:
-
- Answers.logContentView(withName: "Essen",
- contentType: "Essen",
- contentId: "essen",
- customAttributes: [:])
-
- webView25.loadRequest(URLRequest(url: URL(string: "https://zitrotec.de/it-service/blistar-essen-bestellen")!))
- case .cellular:
-
- Answers.logContentView(withName: "Essen",
- contentType: "Essen",
- contentId: "essen",
- customAttributes: [:])
-
- webView25.loadRequest(URLRequest(url: URL(string: "https://zitrotec.de/it-service/blistar-essen-bestellen")!))
- case .none:
- UIApplication.shared.isNetworkActivityIndicatorVisible = false
- activity.stopAnimating()
- navigationController?.popViewController(animated: true)
- dismiss(animated: true, completion: nil)
- let alert = UIAlertView()
- alert.title = "Du bist Offline"
- alert.message = "Bitte stell eine Internetverbindung her, um diesen Inhalt anzuzeigen."
- alert.addButton(withTitle: "OK")
- alert.show()
+ if let url = URL(string: "https://zitrotec.de/blista/meet.html") {
+ if #available(iOS 10.0, *) {
+ UIApplication.shared.open(url, options: [:], completionHandler: nil)
+ } else {
+ UIApplication.shared.openURL(url)
+ }
}
+
+ case .cellular:
+
+ Answers.logContentView(withName: "blistaMeet",
+ contentType: "blistaMeet",
+ contentId: "blistameet",
+ customAttributes: [:])
+
+ navigationController?.popViewController(animated: true)
+ dismiss(animated: true, completion: nil)
+
+ if let url = URL(string: "https://zitrotec.de/blista/meet.html") {
+ if #available(iOS 10.0, *) {
+ UIApplication.shared.open(url, options: [:], completionHandler: nil)
+ } else {
+ UIApplication.shared.openURL(url)
}
}
+
+ case .none:
- func reader(_ reader: QRCodeReaderViewController, didScanResult result: QRCodeReaderResult) {
- reader.stopScanning()
- dismiss(animated: true, completion: nil)
- }
-
- func readerDidCancel(_ reader: QRCodeReaderViewController) {
- reader.stopScanning()
- dismiss(animated: true, completion: nil)
+ navigationController?.popViewController(animated: true)
+ dismiss(animated: true, completion: nil)
+ let alert = UIAlertView()
+ alert.title = "Du bist Offline"
+ alert.message = "Bitte stell eine Internetverbindung her, um diesen Inhalt anzuzeigen."
+ alert.addButton(withTitle: "OK")
+ alert.show()
+
+ }
}
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
- let userDefaults = UserDefaults.standard
- let mensasetting = userDefaults.bool(forKey: "mensa")
- if mensasetting == true
- {
- UIApplication.shared.isNetworkActivityIndicatorVisible = false
- activity.stopAnimating()
- let reachability = Reachability()!
-
- switch reachability.connection {
- case .wifi:
- let urlpath = Bundle.main.path(forResource: "mensa", ofType: "pdf");
- let requesturl = URL(string: urlpath!)
- let request = URLRequest(url: requesturl!)
- webView25.loadRequest(request)
- case .cellular:
- let urlpath = Bundle.main.path(forResource: "mensa", ofType: "pdf");
- let requesturl = URL(string: urlpath!)
- let request = URLRequest(url: requesturl!)
- webView25.loadRequest(request)
- case .none:
- let urlpath = Bundle.main.path(forResource: "mensa", ofType: "pdf");
- let requesturl = URL(string: urlpath!)
- let request = URLRequest(url: requesturl!)
- webView25.loadRequest(request)
- }
+
+
+ let reachability = Reachability()!
+
+ switch reachability.connection {
+ case .wifi:
+
+ Answers.logContentView(withName: "blistaMeet",
+ contentType: "blistaMeet",
+ contentId: "blistameet",
+ customAttributes: [:])
+
+ navigationController?.popViewController(animated: true)
+ dismiss(animated: true, completion: nil)
+
+ if let url = URL(string: "https://zitrotec.de/blista/meet.html") {
+ if #available(iOS 10.0, *) {
+ UIApplication.shared.open(url, options: [:], completionHandler: nil)
+ } else {
+ UIApplication.shared.openURL(url)
}
- else {
- let reachability = Reachability()!
-
- switch reachability.connection {
- case .wifi:
-
- Answers.logContentView(withName: "Essen",
- contentType: "Essen",
- contentId: "essen",
- customAttributes: [:])
-
- webView25.loadRequest(URLRequest(url: URL(string: "https://zitrotec.de/it-service/blistar-essen-bestellen")!))
- case .cellular:
-
- Answers.logContentView(withName: "Essen",
- contentType: "Essen",
- contentId: "essen",
- customAttributes: [:])
-
- webView25.loadRequest(URLRequest(url: URL(string: "https://zitrotec.de/it-service/blistar-essen-bestellen")!))
- case .none:
- UIApplication.shared.isNetworkActivityIndicatorVisible = false
- activity.stopAnimating()
- navigationController?.popViewController(animated: true)
- dismiss(animated: true, completion: nil)
- let alert = UIAlertView()
- alert.title = "Du bist Offline"
- alert.message = "Bitte stell eine Internetverbindung her, um diesen Inhalt anzuzeigen."
- alert.addButton(withTitle: "OK")
- alert.show()
}
- }
+
+ case .cellular:
+
+ Answers.logContentView(withName: "blistaMeet",
+ contentType: "blistaMeet",
+ contentId: "blistameet",
+ customAttributes: [:])
+
+ navigationController?.popViewController(animated: true)
+ dismiss(animated: true, completion: nil)
+
+ if let url = URL(string: "https://zitrotec.de/blista/meet.html") {
+ if #available(iOS 10.0, *) {
+ UIApplication.shared.open(url, options: [:], completionHandler: nil)
+ } else {
+ UIApplication.shared.openURL(url)
+ }
}
-
- func webViewDidStartLoad(_ webView: UIWebView)
- {
- UIApplication.shared.isNetworkActivityIndicatorVisible = true
- activity.startAnimating()
- }
- func webViewDidFinishLoad(_ webView: UIWebView)
- {
- UIApplication.shared.isNetworkActivityIndicatorVisible = false
- activity.stopAnimating()
- viewHasLoaded = true
- }
-
- func webView(_ webView: UIWebView, didFailLoadWithError error: Error) {
- UIApplication.shared.isNetworkActivityIndicatorVisible = false
- activity.stopAnimating()
- }
-
- @objc func myRightSideBarButtonItemTapped(_ sender:UIBarButtonItem!)
- {
- let readerVC: QRCodeReaderViewController = {
- let builder = QRCodeReaderViewControllerBuilder {
- $0.reader = QRCodeReader(metadataObjectTypes: [.qr], captureDevicePosition: .back)
- $0.showTorchButton = false
- $0.showSwitchCameraButton = false
- $0.showCancelButton = true
- $0.showOverlayView = true
- }
- return QRCodeReaderViewController(builder: builder)
- }()
+
+ case .none:
- readerVC.modalPresentationStyle = .formSheet
-
- let reachability = Reachability()!
+ navigationController?.popViewController(animated: true)
+ dismiss(animated: true, completion: nil)
+ let alert = UIAlertView()
+ alert.title = "Du bist Offline"
+ alert.message = "Bitte stell eine Internetverbindung her, um diesen Inhalt anzuzeigen."
+ alert.addButton(withTitle: "OK")
+ alert.show()
+ }
+ }
- switch reachability.connection {
- case .wifi:
- present(readerVC, animated: true, completion: nil)
- readerVC.delegate = self
- readerVC.completionBlock = { (result: QRCodeReaderResult?) in
- if let result = result {
- print("Completion with result: \(result.value)")
- if #available(iOS 9.0, *) {
- AudioServicesPlayAlertSoundWithCompletion(SystemSoundID(kSystemSoundID_Vibrate)) { }
- } else {
- AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate))
- }
- let urlString = result.value.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)
- let url = URL(string: urlString!)
- let request = URLRequest(url: url!)
- if (request.url!.host == "zitrotec.de") {
- self.webView25.loadRequest(request)
- } else {
- }
- }
- }
- case .cellular:
- present(readerVC, animated: true, completion: nil)
- readerVC.delegate = self
- readerVC.completionBlock = { (result: QRCodeReaderResult?) in
- if let result = result {
- print("Completion with result: \(result.value)")
- if #available(iOS 9.0, *) {
- AudioServicesPlayAlertSoundWithCompletion(SystemSoundID(kSystemSoundID_Vibrate)) { }
- } else {
- AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate))
- }
- let urlString = result.value.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)
- let url = URL(string: urlString!)
- let request = URLRequest(url: url!)
- if (request.url!.host == "zitrotec.de") {
- self.webView25.loadRequest(request)
- } else {
- }
- }
- }
- case .none:
- dismiss(animated: true, completion: nil)
- let alert = UIAlertView()
- alert.title = "Du bist Offline"
- alert.message = "Bitte stell eine Internetverbindung her, um diesen Inhalt anzuzeigen."
- alert.addButton(withTitle: "OK")
- alert.show()
- }
- }
+ override func didReceiveMemoryWarning() {
+ super.didReceiveMemoryWarning()
+ // Dispose of any resources that can be recreated.
+ }
-override func didReceiveMemoryWarning() {
- super.didReceiveMemoryWarning()
- // Dispose of any resources that can be recreated.
-}
}
diff --git a/mensa.pdf b/mensa.pdf
deleted file mode 100644
index 8d7cbc5..0000000
Binary files a/mensa.pdf and /dev/null differ