diff --git a/enzevalos_iphone.xcodeproj/project.pbxproj b/enzevalos_iphone.xcodeproj/project.pbxproj index b76db87e050dceae7885d32ed911f4467de28a61..5cf2b396c2a850739611d30610dcceccf2fcdc8a 100644 --- a/enzevalos_iphone.xcodeproj/project.pbxproj +++ b/enzevalos_iphone.xcodeproj/project.pbxproj @@ -44,6 +44,7 @@ 474054982244D7A9007CF83B /* MailServerConfigurationTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 474054972244D7A9007CF83B /* MailServerConfigurationTest.swift */; }; 474994022261E4E6000F8DA5 /* SimpleSendIcon.swift in Sources */ = {isa = PBXBuildFile; fileRef = 474994012261E4E6000F8DA5 /* SimpleSendIcon.swift */; }; 4751C6EE233CA583006B2A4D /* DateExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4751C6ED233CA583006B2A4D /* DateExtension.swift */; }; + 4751C6F82343B37C006B2A4D /* Onboarding.Video.Click.Eng.m4v in Resources */ = {isa = PBXBuildFile; fileRef = 4751C6F72343B377006B2A4D /* Onboarding.Video.Click.Eng.m4v */; }; 4756DE0E20402F8E00452288 /* invitationTextCensor.html in Resources */ = {isa = PBXBuildFile; fileRef = 4756DE0D20402F8E00452288 /* invitationTextCensor.html */; }; 475B00331F7B9565006CDD41 /* SwiftPGP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 475B00301F7B9565006CDD41 /* SwiftPGP.swift */; }; 475B00341F7B9565006CDD41 /* Cryptography.swift in Sources */ = {isa = PBXBuildFile; fileRef = 475B00311F7B9565006CDD41 /* Cryptography.swift */; }; @@ -290,6 +291,7 @@ 474994012261E4E6000F8DA5 /* SimpleSendIcon.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SimpleSendIcon.swift; sourceTree = "<group>"; }; 4751C6ED233CA583006B2A4D /* DateExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DateExtension.swift; sourceTree = "<group>"; }; 4751C6F0233CE1E4006B2A4D /* enzevalos_iphone 7.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "enzevalos_iphone 7.xcdatamodel"; sourceTree = "<group>"; }; + 4751C6F72343B377006B2A4D /* Onboarding.Video.Click.Eng.m4v */ = {isa = PBXFileReference; lastKnownFileType = file; path = Onboarding.Video.Click.Eng.m4v; sourceTree = "<group>"; }; 4756DE0D20402F8E00452288 /* invitationTextCensor.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = invitationTextCensor.html; path = Invitation/invitationTextCensor.html; sourceTree = "<group>"; }; 475B00301F7B9565006CDD41 /* SwiftPGP.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftPGP.swift; sourceTree = "<group>"; }; 475B00311F7B9565006CDD41 /* Cryptography.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Cryptography.swift; sourceTree = "<group>"; }; @@ -992,6 +994,7 @@ 479C649821F45DAF00A01071 /* HideShowPasswordTextField.swift */, 479C649921F45DAF00A01071 /* PasswordToggleVisibilityView.swift */, A1083A531E8BFEA6003666B7 /* Onboarding.swift */, + 4751C6F72343B377006B2A4D /* Onboarding.Video.Click.Eng.m4v */, A102AA891EDDB4E80024B457 /* videoOnboarding2.m4v */, A1C62E992018F716000E5273 /* OnboardingValueState.swift */, ); @@ -1281,6 +1284,7 @@ F12D8DBB2069422A0068788E /* About.storyboard in Resources */, 477670C4228453FB00043604 /* ButtonCell.xib in Resources */, 47E7377022845F3A00972401 /* KeyViews.storyboard in Resources */, + 4751C6F82343B37C006B2A4D /* Onboarding.Video.Click.Eng.m4v in Resources */, A1E5960E1FCC871F003791E9 /* researchteam.asc in Resources */, A1123E6A1DA682850069551C /* Localizable.strings in Resources */, A1F992291DA7C9100073BF1B /* Main.storyboard in Resources */, diff --git a/enzevalos_iphone/Base.lproj/Main.storyboard b/enzevalos_iphone/Base.lproj/Main.storyboard index 60f8db2dbba092e3dd9cc27469fd1d846d86bafd..1a2954811c4a8def965c430090a7eeab048f042b 100644 --- a/enzevalos_iphone/Base.lproj/Main.storyboard +++ b/enzevalos_iphone/Base.lproj/Main.storyboard @@ -16,7 +16,7 @@ <objects> <tableViewController storyboardIdentifier="UITableViewController-Ouw-WD-EV6" id="Ouw-WD-EV6" customClass="ReadViewController" customModule="enzevalos_iphone" customModuleProvider="target" sceneMemberID="viewController"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" allowsSelection="NO" rowHeight="44" sectionHeaderHeight="8" sectionFooterHeight="1" id="oZT-OA-Re5"> - <rect key="frame" x="0.0" y="0.0" width="320" height="504"/> + <rect key="frame" x="0.0" y="0.0" width="320" height="568"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <sections> @@ -182,7 +182,7 @@ </constraints> </view> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qTi-rO-CH3"> - <rect key="frame" x="148" y="5.5" width="140" height="33"/> + <rect key="frame" x="148" y="0.0" width="140" height="44"/> <constraints> <constraint firstAttribute="height" constant="44" id="voC-CF-ncN"/> </constraints> @@ -636,6 +636,7 @@ <barButtonItem style="plain" systemItem="flexibleSpace" id="LhP-ZB-o4i"/> </toolbarItems> <navigationItem key="navigationItem" id="qTG-y6-efi"> + <barButtonItem key="leftBarButtonItem" title="General" id="yw6-dD-zxn"/> <barButtonItem key="rightBarButtonItem" title="Über uns" id="vnz-ap-Ddb"> <connections> <segue destination="FKr-2d-hqd" kind="showDetail" id="g52-46-pxE"/> @@ -662,7 +663,7 @@ <objects> <tableViewController storyboardIdentifier="UITableViewController-ooe-0X-glz" id="ooe-0X-glz" customClass="ListViewController" customModule="enzevalos_iphone" customModuleProvider="target" sceneMemberID="viewController"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="ipK-4X-lVA"> - <rect key="frame" x="0.0" y="0.0" width="320" height="504"/> + <rect key="frame" x="0.0" y="0.0" width="320" height="568"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <prototypes> @@ -748,7 +749,7 @@ <objects> <tableViewController storyboardIdentifier="UITableViewController-8Di-x2-cWQ" id="8Di-x2-cWQ" customClass="ContactViewController" customModule="enzevalos_iphone" customModuleProvider="target" sceneMemberID="viewController"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="lK7-ug-OyQ"> - <rect key="frame" x="0.0" y="0.0" width="320" height="504"/> + <rect key="frame" x="0.0" y="0.0" width="320" height="568"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> <prototypes> @@ -1002,14 +1003,14 @@ <autoresizingMask key="autoresizingMask"/> <subviews> <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="iln-tB-cUf"> - <rect key="frame" x="15" y="12" width="33.5" height="20.5"/> + <rect key="frame" x="16" y="12" width="33.5" height="20.5"/> <autoresizingMask key="autoresizingMask"/> <fontDescription key="fontDescription" type="system" pointSize="17"/> <nil key="textColor"/> <nil key="highlightedColor"/> </label> <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Detail" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="LXh-0V-sEL"> - <rect key="frame" x="261" y="12" width="44" height="20.5"/> + <rect key="frame" x="260" y="12" width="44" height="20.5"/> <autoresizingMask key="autoresizingMask"/> <fontDescription key="fontDescription" type="system" pointSize="17"/> <nil key="textColor"/> @@ -1026,7 +1027,7 @@ <autoresizingMask key="autoresizingMask"/> <subviews> <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Title1" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="0j5-Ji-UQu"> - <rect key="frame" x="15" y="0.0" width="290" height="43.5"/> + <rect key="frame" x="16" y="0.0" width="288" height="43.5"/> <autoresizingMask key="autoresizingMask"/> <fontDescription key="fontDescription" type="system" pointSize="17"/> <nil key="textColor"/> @@ -1193,7 +1194,7 @@ <objects> <viewController id="jYD-fk-aIP" customClass="KeyViewController" customModule="enzevalos_iphone" customModuleProvider="target" sceneMemberID="viewController"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="ZAH-bZ-S6n"> - <rect key="frame" x="0.0" y="0.0" width="320" height="504"/> + <rect key="frame" x="0.0" y="0.0" width="320" height="568"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES"/> <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> <edgeInsets key="layoutMargins" top="10" left="20" bottom="10" right="20"/> @@ -1376,7 +1377,7 @@ <objects> <tableViewController storyboardIdentifier="exportInfoViewController" id="7Pd-d5-0wz" customClass="ExportInfoViewController" customModule="enzevalos_iphone" customModuleProvider="target" sceneMemberID="viewController"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" dataMode="prototypes" style="grouped" separatorStyle="default" sectionIndexMinimumDisplayRowCount="1" rowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" id="2Uv-bd-pB1"> - <rect key="frame" x="0.0" y="0.0" width="320" height="504"/> + <rect key="frame" x="0.0" y="0.0" width="320" height="568"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> <prototypes> @@ -1573,7 +1574,7 @@ Um deine sicheren E-Mails auch auf einem anderen Gerät lesen zu können, muss d <nil key="textColor"/> <nil key="highlightedColor"/> </label> - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="3456-7890-1234-" textAlignment="center" lineBreakMode="characterWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QaR-WZ-20E"> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="3456-7890-1234-" textAlignment="center" lineBreakMode="characterWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QaR-WZ-20E"> <rect key="frame" x="85.5" y="173.5" width="153" height="17.5"/> <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/> <nil key="textColor"/> @@ -1949,7 +1950,7 @@ Um deine sicheren E-Mails auch auf einem anderen Gerät lesen zu können, muss d <segue reference="QXm-7K-984"/> <segue reference="hSn-Um-hji"/> <segue reference="DcR-GX-scc"/> - <segue reference="TgN-rB-esa"/> - <segue reference="PxQ-Nb-6Fq"/> + <segue reference="NPH-pL-mw2"/> + <segue reference="6Ug-AV-lba"/> </inferredMetricsTieBreakers> </document> diff --git a/enzevalos_iphone/KeyViews.storyboard b/enzevalos_iphone/KeyViews.storyboard index d79070c65596a14e58770ea810b183a17ad36066..5a06670196e0c93ff61ca4f68e5b8e9245a1fbc7 100644 --- a/enzevalos_iphone/KeyViews.storyboard +++ b/enzevalos_iphone/KeyViews.storyboard @@ -1,11 +1,11 @@ <?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" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <device id="retina4_7" orientation="portrait"> <adaptation id="fullscreen"/> </device> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <scenes> diff --git a/enzevalos_iphone/Logger.swift b/enzevalos_iphone/Logger.swift index f77d83f7c1d0a8a51a84993cda5e3c2047e41c23..06612c2cef55baee1f58528582f81c66a3e63680 100644 --- a/enzevalos_iphone/Logger.swift +++ b/enzevalos_iphone/Logger.swift @@ -11,7 +11,7 @@ import Foundation class Logger{ static var logging = StudySettings.studyMode - static let loggingInterval = 21600 //60*60*6 seconds = 6 hours + static let loggingInterval = 86400 // 21600 = 60*60*6 seconds = 6 hours static let resendInterval = 5 * 60 static let logReceiver = LOGGING_MAIL_ADR @@ -21,11 +21,12 @@ class Logger{ static fileprivate func sendCheck() { if nextDeadline <= Date() && AppDelegate.getAppDelegate().currentReachabilityStatus != .notReachable && UserManager.loadUserValue(Attribute.accountname) != nil && UserDefaults.standard.bool(forKey: "launchedBefore"){ //Do not send duplicate mails - let tmpNextDeadline = Date(timeIntervalSinceNow: TimeInterval(resendInterval)) + let tmpNextDeadline = Date(timeIntervalSinceNow: TimeInterval(loggingInterval)) nextDeadline = tmpNextDeadline UserManager.storeUserValue(nextDeadline as AnyObject?, attribute: Attribute.nextDeadline) sendLog() } + } static func log(setupStudy studypara: [StudyParameterProtocol.Type], alreadyRegistered: Bool) { @@ -297,10 +298,6 @@ class Logger{ guard error == nil else { return } - - let tmpNextDeadline = Date(timeIntervalSinceNow: TimeInterval(loggingInterval)) - nextDeadline = tmpNextDeadline - UserManager.storeUserValue(nextDeadline as AnyObject?, attribute: Attribute.nextDeadline) } static func log(warning: LogData.WarningType) { LogData.warning(type: warning) @@ -346,6 +343,8 @@ public class LogInUserDefaults { for (key, value) in logger.dictionaryRepresentation() { if let _ = value as? Int { logger.set(0, forKey: key) + } else { + logger.set(nil, forKey: key) } } logger.set(Date(), forKey: "\(prefix).\(startDateName)") @@ -356,7 +355,8 @@ public class LogInUserDefaults { let nameMean = "|mean" let nameSqD = "|sqD" // squared distance from the mean // load values - let n = logger.integer(forKey: "\(prefix).\(eventName)") // we assume that event was logged before! + // we assume that event was logged before! + let n = logger.integer(forKey: "\(prefix).\(eventName)") var mean = logger.double(forKey: "\(prefix).\(eventName+nameMean)") var sqD = logger.double(forKey: "\(prefix).\(eventName+nameSqD)") diff --git a/enzevalos_iphone/Onboarding.Video.Click.Eng.m4v b/enzevalos_iphone/Onboarding.Video.Click.Eng.m4v new file mode 100644 index 0000000000000000000000000000000000000000..585f4270ef7013a7788b0aa53e8b36f9f457fb32 Binary files /dev/null and b/enzevalos_iphone/Onboarding.Video.Click.Eng.m4v differ diff --git a/enzevalos_iphone/Onboarding.swift b/enzevalos_iphone/Onboarding.swift index ab86ca68378a46367aacb6b666338c75aa5e88a2..fbb1282b476b8e6f3232b5178cdb773e4dd510b9 100644 --- a/enzevalos_iphone/Onboarding.swift +++ b/enzevalos_iphone/Onboarding.swift @@ -106,7 +106,7 @@ class Onboarding: NSObject { //Introduction let intro0 = OnboardingContentViewController.content(withTitle: NSLocalizedString("Welcome", comment: "Welcome"), body: NSLocalizedString("ReadFollowingPages", comment: ""), image: nil, buttonText: nil, action: nil) - let intro1 = OnboardingContentViewController.content(withTitle: NSLocalizedString("Letter", comment: ""), body: NSLocalizedString("LetterDescription", comment: "describe the letter"), image: nil, buttonText: nil, action: nil) + let intro1 = OnboardingContentViewController.content(withTitle: NSLocalizedString("Letter", comment: ""), body: NSLocalizedString("Onboarding.ConfMail.Description", comment: "describe the letter"), image: nil, buttonText: nil, action: nil) intro1.iconHeight = 70 intro1.iconWidth = 100 @@ -120,7 +120,7 @@ class Onboarding: NSObject { UIGraphicsEndImageContext() intro1.bodyLabel.textAlignment = NSTextAlignment.left - let intro2 = OnboardingContentViewController.content(withTitle: NSLocalizedString("Postcard", comment: ""), body: NSLocalizedString("PostcardDescription", comment: "describe the postcard"), image: StudySettings.securityIndicator.imageOfInsecureIndicator(background: true), buttonText: nil, action: nil) + let intro2 = OnboardingContentViewController.content(withTitle: NSLocalizedString("Postcard", comment: ""), body: NSLocalizedString("Onboarding.InsecureMail.Description", comment: "describe the postcard"), image: StudySettings.securityIndicator.imageOfInsecureIndicator(background: true), buttonText: nil, action: nil) intro2.iconHeight = 70 intro2.iconWidth = 100 @@ -140,10 +140,10 @@ class Onboarding: NSObject { } - let path = Bundle.main.path(forResource: "videoOnboarding2", ofType: "m4v") + let path = Bundle.main.path(forResource: "Onboarding.Video.Click.Eng", ofType: "m4v") let url = URL.init(fileURLWithPath: path!) - let videoView = UIView.init(frame: CGRect.init(x: 40, y: (AppDelegate.getAppDelegate().window?.frame.height)!*0.5, width: (AppDelegate.getAppDelegate().window?.frame.width)! - 80, height: 1.779*((AppDelegate.getAppDelegate().window?.frame.width)! - 80))) + let videoView = UIView.init(frame: CGRect.init(x: 40, y: (AppDelegate.getAppDelegate().window?.frame.height)!*0.4, width: (AppDelegate.getAppDelegate().window?.frame.width)! - 80, height: 1.779*((AppDelegate.getAppDelegate().window?.frame.width)! - 80))) let intro3 = OnboardingContentViewController.content(withTitle: nil, body: NSLocalizedString("GetHelp", comment: ""), videoURL: url, inputView: videoView, buttonText: nil, actionBlock: nil)