Selaa lähdekoodia

changed folder structure to folder references

nayooti 5 vuotta sitten
vanhempi
commit
b0a3ba966d

+ 8 - 88
deltachat-ios.xcodeproj/project.pbxproj

@@ -121,15 +121,9 @@
 		AE0D26FD1FB1FE88002FAFCE /* ChatListController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE0D26FC1FB1FE88002FAFCE /* ChatListController.swift */; };
 		AE0D26FD1FB1FE88002FAFCE /* ChatListController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE0D26FC1FB1FE88002FAFCE /* ChatListController.swift */; };
 		AE18F294228C602A0007B1BE /* SecuritySettingsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE18F293228C602A0007B1BE /* SecuritySettingsController.swift */; };
 		AE18F294228C602A0007B1BE /* SecuritySettingsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE18F293228C602A0007B1BE /* SecuritySettingsController.swift */; };
 		AE19887523EB264000B4CD5F /* HelpViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE19887423EB264000B4CD5F /* HelpViewController.swift */; };
 		AE19887523EB264000B4CD5F /* HelpViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE19887423EB264000B4CD5F /* HelpViewController.swift */; };
-		AE19889C23EB2D4900B4CD5F /* it_help.html in Resources */ = {isa = PBXBuildFile; fileRef = AE19888F23EB2D4800B4CD5F /* it_help.html */; };
-		AE19889D23EB2D4900B4CD5F /* delta-what-optim.png in Resources */ = {isa = PBXBuildFile; fileRef = AE19889023EB2D4800B4CD5F /* delta-what-optim.png */; };
-		AE19889E23EB2D4900B4CD5F /* de_help.html in Resources */ = {isa = PBXBuildFile; fileRef = AE19889223EB2D4800B4CD5F /* de_help.html */; };
-		AE19889F23EB2D4900B4CD5F /* help.html in Resources */ = {isa = PBXBuildFile; fileRef = AE19889423EB2D4800B4CD5F /* help.html */; };
-		AE1988A023EB2D4900B4CD5F /* nl_help.html in Resources */ = {isa = PBXBuildFile; fileRef = AE19889623EB2D4800B4CD5F /* nl_help.html */; };
-		AE1988A123EB2D4900B4CD5F /* en_help.html in Resources */ = {isa = PBXBuildFile; fileRef = AE19889823EB2D4900B4CD5F /* en_help.html */; };
-		AE1988A223EB2D4900B4CD5F /* sq_help.html in Resources */ = {isa = PBXBuildFile; fileRef = AE19889A23EB2D4900B4CD5F /* sq_help.html */; };
-		AE1988A323EB2D4900B4CD5F /* help.css in Resources */ = {isa = PBXBuildFile; fileRef = AE19889B23EB2D4900B4CD5F /* help.css */; };
 		AE1988A523EB2FBA00B4CD5F /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE1988A423EB2FBA00B4CD5F /* Errors.swift */; };
 		AE1988A523EB2FBA00B4CD5F /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE1988A423EB2FBA00B4CD5F /* Errors.swift */; };
+		AE1988A723EB382A00B4CD5F /* Help in Resources */ = {isa = PBXBuildFile; fileRef = AE1988A623EB382A00B4CD5F /* Help */; };
+		AE1988AB23EB3C7600B4CD5F /* Assets in Resources */ = {isa = PBXBuildFile; fileRef = AE1988AA23EB3C7600B4CD5F /* Assets */; };
 		AE25F09022807AD800CDEA66 /* AvatarSelectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE25F08F22807AD800CDEA66 /* AvatarSelectionCell.swift */; };
 		AE25F09022807AD800CDEA66 /* AvatarSelectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE25F08F22807AD800CDEA66 /* AvatarSelectionCell.swift */; };
 		AE38B31822672DFC00EC37A1 /* ActionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE38B31722672DFC00EC37A1 /* ActionCell.swift */; };
 		AE38B31822672DFC00EC37A1 /* ActionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE38B31722672DFC00EC37A1 /* ActionCell.swift */; };
 		AE38B31A2267328200EC37A1 /* Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE38B3192267328200EC37A1 /* Colors.swift */; };
 		AE38B31A2267328200EC37A1 /* Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE38B3192267328200EC37A1 /* Colors.swift */; };
@@ -352,15 +346,9 @@
 		AE0D26FC1FB1FE88002FAFCE /* ChatListController.swift */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.swift; path = ChatListController.swift; sourceTree = "<group>"; tabWidth = 4; };
 		AE0D26FC1FB1FE88002FAFCE /* ChatListController.swift */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.swift; path = ChatListController.swift; sourceTree = "<group>"; tabWidth = 4; };
 		AE18F293228C602A0007B1BE /* SecuritySettingsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecuritySettingsController.swift; sourceTree = "<group>"; };
 		AE18F293228C602A0007B1BE /* SecuritySettingsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecuritySettingsController.swift; sourceTree = "<group>"; };
 		AE19887423EB264000B4CD5F /* HelpViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HelpViewController.swift; sourceTree = "<group>"; };
 		AE19887423EB264000B4CD5F /* HelpViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HelpViewController.swift; sourceTree = "<group>"; };
-		AE19888F23EB2D4800B4CD5F /* it_help.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = it_help.html; sourceTree = "<group>"; };
-		AE19889023EB2D4800B4CD5F /* delta-what-optim.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "delta-what-optim.png"; sourceTree = "<group>"; };
-		AE19889223EB2D4800B4CD5F /* de_help.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = de_help.html; sourceTree = "<group>"; };
-		AE19889423EB2D4800B4CD5F /* help.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = help.html; sourceTree = "<group>"; };
-		AE19889623EB2D4800B4CD5F /* nl_help.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = nl_help.html; sourceTree = "<group>"; };
-		AE19889823EB2D4900B4CD5F /* en_help.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = en_help.html; sourceTree = "<group>"; };
-		AE19889A23EB2D4900B4CD5F /* sq_help.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = sq_help.html; sourceTree = "<group>"; };
-		AE19889B23EB2D4900B4CD5F /* help.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = help.css; sourceTree = "<group>"; };
 		AE1988A423EB2FBA00B4CD5F /* Errors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Errors.swift; sourceTree = "<group>"; };
 		AE1988A423EB2FBA00B4CD5F /* Errors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Errors.swift; sourceTree = "<group>"; };
+		AE1988A623EB382A00B4CD5F /* Help */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Help; sourceTree = "<group>"; };
+		AE1988AA23EB3C7600B4CD5F /* Assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Assets; path = ../../Desktop/Assets; sourceTree = "<group>"; };
 		AE25F08F22807AD800CDEA66 /* AvatarSelectionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AvatarSelectionCell.swift; sourceTree = "<group>"; };
 		AE25F08F22807AD800CDEA66 /* AvatarSelectionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AvatarSelectionCell.swift; sourceTree = "<group>"; };
 		AE38B31722672DFC00EC37A1 /* ActionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActionCell.swift; sourceTree = "<group>"; };
 		AE38B31722672DFC00EC37A1 /* ActionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActionCell.swift; sourceTree = "<group>"; };
 		AE38B3192267328200EC37A1 /* Colors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Colors.swift; sourceTree = "<group>"; };
 		AE38B3192267328200EC37A1 /* Colors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Colors.swift; sourceTree = "<group>"; };
@@ -624,6 +612,7 @@
 		7A9FB1421FB061E2001FEA36 /* deltachat-ios */ = {
 		7A9FB1421FB061E2001FEA36 /* deltachat-ios */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
+				AE1988AA23EB3C7600B4CD5F /* Assets */,
 				AE19887623EB2BDA00B4CD5F /* Assets */,
 				AE19887623EB2BDA00B4CD5F /* Assets */,
 				305961812346125000C80F33 /* Extensions */,
 				305961812346125000C80F33 /* Extensions */,
 				3059617E234610A800C80F33 /* MessageKit */,
 				3059617E234610A800C80F33 /* MessageKit */,
@@ -686,74 +675,11 @@
 		AE19887623EB2BDA00B4CD5F /* Assets */ = {
 		AE19887623EB2BDA00B4CD5F /* Assets */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
-				AE19887723EB2C0B00B4CD5F /* Help */,
+				AE1988A623EB382A00B4CD5F /* Help */,
 			);
 			);
 			path = Assets;
 			path = Assets;
 			sourceTree = "<group>";
 			sourceTree = "<group>";
 		};
 		};
-		AE19887723EB2C0B00B4CD5F /* Help */ = {
-			isa = PBXGroup;
-			children = (
-				AE19889123EB2D4800B4CD5F /* de */,
-				AE19889023EB2D4800B4CD5F /* delta-what-optim.png */,
-				AE19889723EB2D4900B4CD5F /* en */,
-				AE19889323EB2D4800B4CD5F /* es */,
-				AE19889B23EB2D4900B4CD5F /* help.css */,
-				AE19888E23EB2D4800B4CD5F /* it */,
-				AE19889523EB2D4800B4CD5F /* nl */,
-				AE19889923EB2D4900B4CD5F /* sq */,
-			);
-			path = Help;
-			sourceTree = "<group>";
-		};
-		AE19888E23EB2D4800B4CD5F /* it */ = {
-			isa = PBXGroup;
-			children = (
-				AE19888F23EB2D4800B4CD5F /* it_help.html */,
-			);
-			path = it;
-			sourceTree = "<group>";
-		};
-		AE19889123EB2D4800B4CD5F /* de */ = {
-			isa = PBXGroup;
-			children = (
-				AE19889223EB2D4800B4CD5F /* de_help.html */,
-			);
-			path = de;
-			sourceTree = "<group>";
-		};
-		AE19889323EB2D4800B4CD5F /* es */ = {
-			isa = PBXGroup;
-			children = (
-				AE19889423EB2D4800B4CD5F /* help.html */,
-			);
-			path = es;
-			sourceTree = "<group>";
-		};
-		AE19889523EB2D4800B4CD5F /* nl */ = {
-			isa = PBXGroup;
-			children = (
-				AE19889623EB2D4800B4CD5F /* nl_help.html */,
-			);
-			path = nl;
-			sourceTree = "<group>";
-		};
-		AE19889723EB2D4900B4CD5F /* en */ = {
-			isa = PBXGroup;
-			children = (
-				AE19889823EB2D4900B4CD5F /* en_help.html */,
-			);
-			path = en;
-			sourceTree = "<group>";
-		};
-		AE19889923EB2D4900B4CD5F /* sq */ = {
-			isa = PBXGroup;
-			children = (
-				AE19889A23EB2D4900B4CD5F /* sq_help.html */,
-			);
-			path = sq;
-			sourceTree = "<group>";
-		};
 		AE851A02227AECDE00ED86F0 /* deltachat-iosTests */ = {
 		AE851A02227AECDE00ED86F0 /* deltachat-iosTests */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
@@ -1003,16 +929,10 @@
 			isa = PBXResourcesBuildPhase;
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			buildActionMask = 2147483647;
 			files = (
 			files = (
-				AE19889D23EB2D4900B4CD5F /* delta-what-optim.png in Resources */,
-				AE1988A123EB2D4900B4CD5F /* en_help.html in Resources */,
-				AE1988A023EB2D4900B4CD5F /* nl_help.html in Resources */,
-				AE19889F23EB2D4900B4CD5F /* help.html in Resources */,
-				AE19889E23EB2D4900B4CD5F /* de_help.html in Resources */,
-				AE1988A223EB2D4900B4CD5F /* sq_help.html in Resources */,
 				7837B64021E54DC600CDE126 /* .swiftlint.yml in Resources */,
 				7837B64021E54DC600CDE126 /* .swiftlint.yml in Resources */,
-				AE19889C23EB2D4900B4CD5F /* it_help.html in Resources */,
-				AE1988A323EB2D4900B4CD5F /* help.css in Resources */,
+				AE1988AB23EB3C7600B4CD5F /* Assets in Resources */,
 				3022E6BE22E8768800763272 /* InfoPlist.strings in Resources */,
 				3022E6BE22E8768800763272 /* InfoPlist.strings in Resources */,
+				AE1988A723EB382A00B4CD5F /* Help in Resources */,
 				3060119C22DDE24000C1CE6F /* Localizable.strings in Resources */,
 				3060119C22DDE24000C1CE6F /* Localizable.strings in Resources */,
 				7A9FB14E1FB061E2001FEA36 /* LaunchScreen.storyboard in Resources */,
 				7A9FB14E1FB061E2001FEA36 /* LaunchScreen.storyboard in Resources */,
 				306011B622E5E7FB00C1CE6F /* Localizable.stringsdict in Resources */,
 				306011B622E5E7FB00C1CE6F /* Localizable.stringsdict in Resources */,

+ 20 - 1
deltachat-ios/Controller/HelpViewController.swift

@@ -41,10 +41,29 @@ class HelpViewController: UIViewController {
 
 
     private func loadHtmlContent() {
     private func loadHtmlContent() {
         let lang = "de"
         let lang = "de"
-        guard let url = Bundle.main.url(forResource: "de_help", withExtension: "html") else {
+
+        if let url = Bundle.main.url(forResource: "de_help", withExtension: "html", subdirectory: "Assets/Help")  {
+            safe_fatalError("Failed to load resource from bundle")
+            return
+        }
+
+
+        if let url = Bundle.main.url(forResource: "de_help", withExtension: "html", subdirectory: "Help")  {
             safe_fatalError("Failed to load resource from bundle")
             safe_fatalError("Failed to load resource from bundle")
             return
             return
         }
         }
+
+        if let url = Bundle.main.path(forResource: "de_help", ofType: "html")  {
+            safe_fatalError("Failed to load resource from bundle")
+            return
+        }
+
+        guard let url = Bundle.main.url(forResource: "de_help", withExtension: "html", subdirectory: "Assets/Help/de")  else {
+                        safe_fatalError("Failed to load resource from bundle")
+                        return
+                    }
+
+        webView.loadFileURL(url, allowingReadAccessTo: url)
         let request = URLRequest(url: url)
         let request = URLRequest(url: url)
         webView.load(request)
         webView.load(request)