Browse Source

integrate DcCore into deltachat-ios, strip out message kit dependencies by creating a DcMsg extension

cyberta 5 năm trước cách đây
mục cha
commit
45c662b190
63 tập tin đã thay đổi với 355 bổ sung1277 xóa
  1. 4 82
      DcCore/DcCore.xcodeproj/project.pbxproj
  2. 168 235
      DcCore/DcCore/DC/Wrapper.swift
  3. 10 10
      DcCore/DcCore/DC/events.swift
  4. 3 2
      DcCore/DcCore/Extensions/UIImage+Extension.swift
  5. 0 69
      DcCore/DcCore/Helper/Colors.swift
  6. 3 22
      DcCore/DcCore/Helper/Constants.swift
  7. 0 110
      DcCore/DcCore/Helper/Utils.swift
  8. 0 83
      DcCore/DcCore/MessageKit/MessageKind.swift
  9. 0 42
      DcCore/DcCore/MessageKit/Protocols/AudioItem.swift
  10. 0 41
      DcCore/DcCore/MessageKit/Protocols/ContactItem.swift
  11. 0 37
      DcCore/DcCore/MessageKit/Protocols/LocationItem.swift
  12. 0 45
      DcCore/DcCore/MessageKit/Protocols/MediaItem.swift
  13. 0 43
      DcCore/DcCore/MessageKit/Protocols/MessageType.swift
  14. 0 38
      DcCore/DcCore/MessageKit/Protocols/SenderType.swift
  15. 0 57
      DcCore/DcCore/MessageKit/Sender.swift
  16. 0 19
      DcCore/DcCore/Model/Audio.swift
  17. 0 14
      DcCore/DcCore/Model/Location.swift
  18. 0 26
      DcCore/DcCore/Model/Media.swift
  19. 0 45
      DcCore/DcCore/Model/Message.swift
  20. 33 31
      deltachat-ios.xcodeproj/project.pbxproj
  21. 3 0
      deltachat-ios.xcworkspace/contents.xcworkspacedata
  22. 1 0
      deltachat-ios/AppDelegate.swift
  23. 1 0
      deltachat-ios/Controller/AccountSetup/CertificateCheckController.swift
  24. 1 0
      deltachat-ios/Controller/AccountSetup/SecuritySettingsController.swift
  25. 1 0
      deltachat-ios/Controller/AccountSetupController.swift
  26. 1 0
      deltachat-ios/Controller/ChatListController.swift
  27. 1 0
      deltachat-ios/Controller/ChatViewController.swift
  28. 1 0
      deltachat-ios/Controller/EditContactController.swift
  29. 1 0
      deltachat-ios/Controller/EditGroupViewController.swift
  30. 1 0
      deltachat-ios/Controller/EditSettingsController.swift
  31. 1 0
      deltachat-ios/Controller/GroupChatDetailViewController.swift
  32. 1 0
      deltachat-ios/Controller/GroupMembersViewController.swift
  33. 1 0
      deltachat-ios/Controller/MailboxViewController.swift
  34. 1 0
      deltachat-ios/Controller/MessageInfoViewController.swift
  35. 1 0
      deltachat-ios/Controller/NewChatViewController.swift
  36. 1 0
      deltachat-ios/Controller/NewContactController.swift
  37. 1 0
      deltachat-ios/Controller/NewGroupController.swift
  38. 1 0
      deltachat-ios/Controller/QrInviteViewController.swift
  39. 1 0
      deltachat-ios/Controller/QrViewController.swift
  40. 1 0
      deltachat-ios/Controller/SettingsAutodelOverviewController.swift
  41. 1 0
      deltachat-ios/Controller/SettingsAutodelSetController.swift
  42. 1 1
      deltachat-ios/Controller/SettingsClassicViewController.swift
  43. 1 0
      deltachat-ios/Controller/SettingsController.swift
  44. 1 0
      deltachat-ios/Controller/WelcomeViewController.swift
  45. 1 0
      deltachat-ios/Coordinator/AppCoordinator.swift
  46. 94 0
      deltachat-ios/DC/DcMsg+Extension.swift
  47. 0 191
      deltachat-ios/DC/events.swift
  48. 0 9
      deltachat-ios/DC/wrapper.c
  49. 0 18
      deltachat-ios/DC/wrapper.h
  50. 1 0
      deltachat-ios/Extensions/DcContact+Extension.swift
  51. 1 0
      deltachat-ios/Handler/DeviceContactsHandler.swift
  52. 1 0
      deltachat-ios/Handler/ProgressAlertHandler.swift
  53. 1 0
      deltachat-ios/Helper/AvatarHelper.swift
  54. 1 0
      deltachat-ios/Helper/LocationManager.swift
  55. 1 0
      deltachat-ios/Helper/RelayHelper.swift
  56. 1 0
      deltachat-ios/Helper/Utils.swift
  57. 1 0
      deltachat-ios/View/AvatarSelectionCell.swift
  58. 1 0
      deltachat-ios/View/Cell/ProfileCell.swift
  59. 1 0
      deltachat-ios/View/ContactCell.swift
  60. 1 0
      deltachat-ios/ViewModel/ChatListViewModel.swift
  61. 1 0
      deltachat-ios/ViewModel/ContactCellViewModel.swift
  62. 1 0
      deltachat-ios/ViewModel/ContactDetailViewModel.swift
  63. 0 7
      deltachat-ios/deltachat-ios-Bridging-Header.h

+ 4 - 82
DcCore/DcCore.xcodeproj/project.pbxproj

@@ -19,20 +19,6 @@
 		30421960243E257100516852 /* UIColor+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3042195F243E257100516852 /* UIColor+Extensions.swift */; };
 		30421962243E26C800516852 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30421961243E26C800516852 /* Logger.swift */; };
 		30421964243F0B8400516852 /* String+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30421963243F0B8400516852 /* String+Extensions.swift */; };
-		30421967243F165C00516852 /* SenderType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30421966243F165C00516852 /* SenderType.swift */; };
-		30421969243F168700516852 /* Sender.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30421968243F168700516852 /* Sender.swift */; };
-		3042196B243F169B00516852 /* MessageKind.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3042196A243F169B00516852 /* MessageKind.swift */; };
-		3042196D243F16E100516852 /* MessageType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3042196C243F16E100516852 /* MessageType.swift */; };
-		3042196F243F176B00516852 /* MediaItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3042196E243F176B00516852 /* MediaItem.swift */; };
-		30421971243F178800516852 /* AudioItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30421970243F178800516852 /* AudioItem.swift */; };
-		30421973243F179000516852 /* ContactItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30421972243F179000516852 /* ContactItem.swift */; };
-		30421975243F17F200516852 /* LocationItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30421974243F17F200516852 /* LocationItem.swift */; };
-		3042197D243F1CAA00516852 /* Audio.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30421979243F1CAA00516852 /* Audio.swift */; };
-		3042197E243F1CAA00516852 /* Media.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3042197A243F1CAA00516852 /* Media.swift */; };
-		3042197F243F1CAA00516852 /* Location.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3042197B243F1CAA00516852 /* Location.swift */; };
-		30421980243F1CAA00516852 /* Message.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3042197C243F1CAA00516852 /* Message.swift */; };
-		30421982243F1D5300516852 /* Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30421981243F1D5300516852 /* Colors.swift */; };
-		30421984243F1F0400516852 /* UIImage+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30421983243F1F0400516852 /* UIImage+Extension.swift */; };
 		30421986243F209E00516852 /* events.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30421985243F209E00516852 /* events.swift */; };
 		30421988243F23E500516852 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30421987243F23E500516852 /* Constants.swift */; };
 /* End PBXBuildFile section */
@@ -63,20 +49,6 @@
 		3042195F243E257100516852 /* UIColor+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+Extensions.swift"; sourceTree = "<group>"; };
 		30421961243E26C800516852 /* Logger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Logger.swift; path = ../../DcCore/DcCore/DC/Logger.swift; sourceTree = "<group>"; };
 		30421963243F0B8400516852 /* String+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Extensions.swift"; sourceTree = "<group>"; };
-		30421966243F165C00516852 /* SenderType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SenderType.swift; sourceTree = "<group>"; };
-		30421968243F168700516852 /* Sender.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Sender.swift; sourceTree = "<group>"; };
-		3042196A243F169B00516852 /* MessageKind.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageKind.swift; sourceTree = "<group>"; };
-		3042196C243F16E100516852 /* MessageType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageType.swift; sourceTree = "<group>"; };
-		3042196E243F176B00516852 /* MediaItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MediaItem.swift; sourceTree = "<group>"; };
-		30421970243F178800516852 /* AudioItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AudioItem.swift; sourceTree = "<group>"; };
-		30421972243F179000516852 /* ContactItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContactItem.swift; sourceTree = "<group>"; };
-		30421974243F17F200516852 /* LocationItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocationItem.swift; sourceTree = "<group>"; };
-		30421979243F1CAA00516852 /* Audio.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Audio.swift; sourceTree = "<group>"; };
-		3042197A243F1CAA00516852 /* Media.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Media.swift; sourceTree = "<group>"; };
-		3042197B243F1CAA00516852 /* Location.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Location.swift; sourceTree = "<group>"; };
-		3042197C243F1CAA00516852 /* Message.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Message.swift; sourceTree = "<group>"; };
-		30421981243F1D5300516852 /* Colors.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Colors.swift; sourceTree = "<group>"; };
-		30421983243F1F0400516852 /* UIImage+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIImage+Extension.swift"; sourceTree = "<group>"; };
 		30421985243F209E00516852 /* events.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = events.swift; path = ../../DcCore/DcCore/DC/events.swift; sourceTree = "<group>"; };
 		30421987243F23E500516852 /* Constants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; };
 /* End PBXFileReference section */
@@ -124,9 +96,7 @@
 		30421933243DE0F200516852 /* DcCore */ = {
 			isa = PBXGroup;
 			children = (
-				30421978243F1C9900516852 /* Model */,
 				30421977243F1AF400516852 /* Helper */,
-				30421965243F12E900516852 /* MessageKit */,
 				3042195E243E255000516852 /* Extensions */,
 				3042194B243DE15D00516852 /* DC */,
 				30421934243DE0F200516852 /* DcCore.h */,
@@ -170,55 +140,19 @@
 			children = (
 				3042195F243E257100516852 /* UIColor+Extensions.swift */,
 				30421963243F0B8400516852 /* String+Extensions.swift */,
-				30421983243F1F0400516852 /* UIImage+Extension.swift */,
 			);
 			path = Extensions;
 			sourceTree = "<group>";
 		};
-		30421965243F12E900516852 /* MessageKit */ = {
-			isa = PBXGroup;
-			children = (
-				3042196A243F169B00516852 /* MessageKind.swift */,
-				30421968243F168700516852 /* Sender.swift */,
-				30421976243F17FF00516852 /* Protocols */,
-			);
-			path = MessageKit;
-			sourceTree = "<group>";
-		};
-		30421976243F17FF00516852 /* Protocols */ = {
-			isa = PBXGroup;
-			children = (
-				30421970243F178800516852 /* AudioItem.swift */,
-				30421972243F179000516852 /* ContactItem.swift */,
-				30421974243F17F200516852 /* LocationItem.swift */,
-				3042196E243F176B00516852 /* MediaItem.swift */,
-				3042196C243F16E100516852 /* MessageType.swift */,
-				30421966243F165C00516852 /* SenderType.swift */,
-			);
-			path = Protocols;
-			sourceTree = "<group>";
-		};
 		30421977243F1AF400516852 /* Helper */ = {
 			isa = PBXGroup;
 			children = (
 				30421987243F23E500516852 /* Constants.swift */,
-				30421981243F1D5300516852 /* Colors.swift */,
 				3042195C243E23F100516852 /* Utils.swift */,
 			);
 			path = Helper;
 			sourceTree = "<group>";
 		};
-		30421978243F1C9900516852 /* Model */ = {
-			isa = PBXGroup;
-			children = (
-				30421979243F1CAA00516852 /* Audio.swift */,
-				3042197B243F1CAA00516852 /* Location.swift */,
-				3042197A243F1CAA00516852 /* Media.swift */,
-				3042197C243F1CAA00516852 /* Message.swift */,
-			);
-			path = Model;
-			sourceTree = "<group>";
-		};
 /* End PBXGroup section */
 
 /* Begin PBXHeadersBuildPhase section */
@@ -351,28 +285,14 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				30421969243F168700516852 /* Sender.swift in Sources */,
 				30421988243F23E500516852 /* Constants.swift in Sources */,
-				30421973243F179000516852 /* ContactItem.swift in Sources */,
 				30421962243E26C800516852 /* Logger.swift in Sources */,
 				30421986243F209E00516852 /* events.swift in Sources */,
-				30421980243F1CAA00516852 /* Message.swift in Sources */,
 				30421951243DE15D00516852 /* Wrapper.swift in Sources */,
-				30421971243F178800516852 /* AudioItem.swift in Sources */,
-				3042197F243F1CAA00516852 /* Location.swift in Sources */,
-				30421984243F1F0400516852 /* UIImage+Extension.swift in Sources */,
-				3042196D243F16E100516852 /* MessageType.swift in Sources */,
-				3042197E243F1CAA00516852 /* Media.swift in Sources */,
-				3042196B243F169B00516852 /* MessageKind.swift in Sources */,
 				30421952243DE15D00516852 /* wrapper.c in Sources */,
-				30421967243F165C00516852 /* SenderType.swift in Sources */,
-				30421982243F1D5300516852 /* Colors.swift in Sources */,
-				3042197D243F1CAA00516852 /* Audio.swift in Sources */,
 				3042195D243E23F100516852 /* Utils.swift in Sources */,
 				30421964243F0B8400516852 /* String+Extensions.swift in Sources */,
 				30421960243E257100516852 /* UIColor+Extensions.swift in Sources */,
-				3042196F243F176B00516852 /* MediaItem.swift in Sources */,
-				30421975243F17F200516852 /* LocationItem.swift in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -524,12 +444,14 @@
 				DYLIB_COMPATIBILITY_VERSION = 1;
 				DYLIB_CURRENT_VERSION = 1;
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
+				ENABLE_BITCODE = NO;
 				HEADER_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(PROJECT_DIR)/../deltachat-ios/libraries/deltachat-core-rust/deltachat-ffi",
 				);
 				INFOPLIST_FILE = DcCore/Info.plist;
 				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+				IPHONEOS_DEPLOYMENT_TARGET = 11.0;
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",
 					"@executable_path/Frameworks",
@@ -539,7 +461,6 @@
 					"$(inherited)",
 					"$(PROJECT_DIR)/../deltachat-ios/libraries/deltachat-core-rust/deltachat-ffi",
 					"$(PROJECT_DIR)/../deltachat-ios/libraries/deltachat-core-rust/target/universal/release",
-					"$(PROJECT_DIR)/../deltachat-ios/libraries/deltachat-core-rust/target/universal/debug",
 				);
 				PRODUCT_BUNDLE_IDENTIFIER = chat.delta.DcCore;
 				PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
@@ -559,12 +480,14 @@
 				DYLIB_COMPATIBILITY_VERSION = 1;
 				DYLIB_CURRENT_VERSION = 1;
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
+				ENABLE_BITCODE = NO;
 				HEADER_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(PROJECT_DIR)/../deltachat-ios/libraries/deltachat-core-rust/deltachat-ffi",
 				);
 				INFOPLIST_FILE = DcCore/Info.plist;
 				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+				IPHONEOS_DEPLOYMENT_TARGET = 11.0;
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",
 					"@executable_path/Frameworks",
@@ -574,7 +497,6 @@
 					"$(inherited)",
 					"$(PROJECT_DIR)/../deltachat-ios/libraries/deltachat-core-rust/deltachat-ffi",
 					"$(PROJECT_DIR)/../deltachat-ios/libraries/deltachat-core-rust/target/universal/release",
-					"$(PROJECT_DIR)/../deltachat-ios/libraries/deltachat-core-rust/target/universal/debug",
 				);
 				PRODUCT_BUNDLE_IDENTIFIER = chat.delta.DcCore;
 				PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 168 - 235
DcCore/DcCore/DC/Wrapper.swift


+ 10 - 10
DcCore/DcCore/DC/events.swift

@@ -1,16 +1,16 @@
 import UIKit
 import UserNotifications
 
-let dcNotificationChanged = Notification.Name(rawValue: "MrEventMsgsChanged")
-let dcNotificationIncoming = Notification.Name(rawValue: "MrEventIncomingMsg")
-let dcNotificationImexProgress = Notification.Name(rawValue: "dcNotificationImexProgress")
-let dcNotificationConfigureProgress = Notification.Name(rawValue: "MrEventConfigureProgress")
-let dcNotificationSecureJoinerProgress = Notification.Name(rawValue: "MrEventSecureJoinerProgress")
-let dcNotificationSecureInviterProgress = Notification.Name(rawValue: "MrEventSecureInviterProgress")
-let dcNotificationViewChat = Notification.Name(rawValue: "MrEventViewChat")
-let dcNotificationContactChanged = Notification.Name(rawValue: "MrEventContactsChanged")
-let dcNotificationChatModified = Notification.Name(rawValue: "dcNotificationChatModified")
-let dcNotificationChatDeletedInChatDetail = Notification.Name(rawValue: "ChatDeletedInChatDetail")
+public let dcNotificationChanged = Notification.Name(rawValue: "MrEventMsgsChanged")
+public let dcNotificationIncoming = Notification.Name(rawValue: "MrEventIncomingMsg")
+public let dcNotificationImexProgress = Notification.Name(rawValue: "dcNotificationImexProgress")
+public let dcNotificationConfigureProgress = Notification.Name(rawValue: "MrEventConfigureProgress")
+public let dcNotificationSecureJoinerProgress = Notification.Name(rawValue: "MrEventSecureJoinerProgress")
+public let dcNotificationSecureInviterProgress = Notification.Name(rawValue: "MrEventSecureInviterProgress")
+public let dcNotificationViewChat = Notification.Name(rawValue: "MrEventViewChat")
+public let dcNotificationContactChanged = Notification.Name(rawValue: "MrEventContactsChanged")
+public let dcNotificationChatModified = Notification.Name(rawValue: "dcNotificationChatModified")
+public let dcNotificationChatDeletedInChatDetail = Notification.Name(rawValue: "ChatDeletedInChatDetail")
 
 @_silgen_name("callbackSwift")
 

+ 3 - 2
DcCore/DcCore/Extensions/UIImage+Extension.swift

@@ -1,7 +1,8 @@
 import UIKit
 
 internal extension UIImage {
-    convenience init?(color: UIColor, size: CGSize = CGSize(width: 1, height: 1)) {
+
+ /*   convenience init?(color: UIColor, size: CGSize = CGSize(width: 1, height: 1)) {
         let rect = CGRect(origin: .zero, size: size)
         UIGraphicsBeginImageContextWithOptions(rect.size, false, 0.0)
         color.setFill()
@@ -11,5 +12,5 @@ internal extension UIImage {
 
         guard let cgImage = image?.cgImage else { return nil }
         self.init(cgImage: cgImage)
-    }
+    }*/
 }

+ 0 - 69
DcCore/DcCore/Helper/Colors.swift

@@ -1,69 +0,0 @@
-import UIKit
-
-struct DcColors {
-    static let primary = UIColor.systemBlue
-    static let colorDisabled = UIColor.themeColor(light: UIColor(white: 0.9, alpha: 1), dark: UIColor(white: 0.2, alpha: 1))
-    static let messagePrimaryColor = UIColor.themeColor(light: UIColor.rgb(red: 220, green: 248, blue: 198),
-                                                        dark: UIColor.init(hexString: "224508"))
-    static let messageSecondaryColor = UIColor.themeColor(light: UIColor.init(hexString: "ebebed"),
-                                                          dark: UIColor.init(hexString: "333333"))
-    static let contactCellBackgroundColor = UIColor.themeColor(light: .white, dark: .black)
-    static let defaultBackgroundColor = UIColor.themeColor(light: .white, dark: .black)
-    static let chatBackgroundColor = UIColor.themeColor(light: UIColor(red: 255, green: 255, blue: 255, alpha: 0), dark: .black)
-    static let checkmarkGreen = UIColor.themeColor(light: UIColor.rgb(red: 112, green: 177, blue: 92))
-    static let defaultTextColor = UIColor.themeColor(light: .darkText, dark: .white)
-    static let grayTextColor = UIColor.themeColor(light: .darkGray, dark: .lightGray)
-    static let grayDateColor = UIColor.themeColor(lightHex: "999999", darkHex: "bbbbbb") // slight variations of lightGray (#aaaaaa)
-    static let middleGray = UIColor(hexString: "848ba7")
-    static let secondaryTextColor = UIColor.themeColor(lightHex: "848ba7", darkHex: "a5abc0")
-    static let inputFieldColor =  UIColor.themeColor(light: UIColor(red: 245 / 255, green: 245 / 255, blue: 245 / 255, alpha: 1),
-                                                     dark: UIColor(red: 10 / 255, green: 10 / 255, blue: 10 / 255, alpha: 1))
-    static let placeholderColor = UIColor.themeColor(light: UIColor(red: 0.6, green: 0.6, blue: 0.6, alpha: 1),
-                                                     dark: UIColor(red: 0.4, green: 0.4, blue: 0.4, alpha: 1))
-    static let providerPreparationBackground = UIColor.themeColor(lightHex: "#fffdf7b2", darkHex: "##fffdf7b2")
-    static let providerBrokenBackground = UIColor.themeColor(light: SystemColor.red.uiColor, dark: SystemColor.red.uiColor)
-    static let systemMessageBackgroundColor = UIColor.themeColor(light: UIColor.rgb(red: 248, green: 248, blue: 248), dark: UIColor(white: 0.2, alpha: 0.5))
-    static let deaddropBackground = UIColor.themeColor(light: UIColor.init(hexString: "ebebec"), dark: UIColor.init(hexString: "1a1a1c"))
-}
-
-enum SystemColor {
-    case red
-    case orange
-    case yellow
-    case green
-    case tealBlue
-    case blue
-    case purple
-    case pink
-
-    var uiColor: UIColor {
-        switch self {
-        case .red:
-            return UIColor(red: 255 / 255, green: 59 / 255, blue: 48 / 255, alpha: 1)
-        case .orange:
-            return UIColor(red: 255 / 255, green: 149 / 255, blue: 0 / 255, alpha: 1)
-        case .yellow:
-            return UIColor(red: 255 / 255, green: 204 / 255, blue: 0 / 255, alpha: 1)
-        case .green:
-            return UIColor(red: 76 / 255, green: 217 / 255, blue: 100 / 255, alpha: 1)
-        case .tealBlue:
-            return UIColor(red: 90 / 255, green: 200 / 255, blue: 250 / 255, alpha: 1)
-        case .blue:
-            return UIColor(red: 0 / 255, green: 122 / 255, blue: 255 / 255, alpha: 1)
-        case .purple:
-            return UIColor(red: 88 / 255, green: 86 / 255, blue: 214 / 255, alpha: 1)
-        case .pink:
-            return UIColor(red: 255 / 255, green: 45 / 255, blue: 85 / 255, alpha: 1)
-        }
-    }
-}
-
-extension UIColor {
-    static func rgb(red: CGFloat, green: CGFloat, blue: CGFloat) -> UIColor {
-        return UIColor(red: red / 255, green: green / 255, blue: blue / 255, alpha: 1)
-    }
-
-    static var systemBlue: UIColor {
-        return UIButton(type: .system).tintColor
-    }
-}

+ 3 - 22
DcCore/DcCore/Helper/Constants.swift

@@ -1,30 +1,11 @@
 import UIKit
 
-struct Constants {
-    struct Color {
-        static let bubble = UIColor(netHex: 0xEFFFDE)
-    }
+public struct Constants {
 
-    struct Keys {
+    public struct Keys {
         static let deltachatUserProvidedCredentialsKey = "__DELTACHAT_USER_PROVIDED_CREDENTIALS_KEY__"
         static let deltachatImapEmailKey = "__DELTACHAT_IMAP_EMAIL_KEY__"
         static let deltachatImapPasswordKey = "__DELTACHAT_IMAP_PASSWORD_KEY__"
     }
-
-    static let defaultShadow = UIImage(color: UIColor(hexString: "ff2b82"), size: CGSize(width: 1, height: 1))
-    static let onlineShadow = UIImage(color: UIColor(hexString: "3ed67e"), size: CGSize(width: 1, height: 1))
-
-    static let notificationIdentifier = "deltachat-ios-local-notifications"
-
-    static let defaultCellHeight: CGFloat = 48
-    static let defaultHeaderHeight: CGFloat = 20
-}
-
-struct Time {
-    static let twoMinutes = 2 * 60
-    static let fiveMinutes = 5 * 60
-    static let thirtyMinutes = 30 * 6
-    static let oneHour = 60 * 60
-    static let twoHours = 2 * 60 * 60
-    static let sixHours = 6 * 60 * 60
+    public static let notificationIdentifier = "deltachat-ios-local-notifications"
 }

+ 0 - 110
DcCore/DcCore/Helper/Utils.swift

@@ -4,14 +4,6 @@ import AVFoundation
 
 struct Utils {
 
-    static func getInitials(inputName: String) -> String {
-        if let firstLetter = inputName.first {
-            return firstLetter.uppercased()
-        } else {
-            return ""
-        }
-    }
-
     static func copyAndFreeArray(inputArray: OpaquePointer?) -> [Int] {
         var acc: [Int] = []
         let len = dc_array_get_cnt(inputArray)
@@ -60,82 +52,6 @@ struct Utils {
         return acc
     }
 
-/*    static func formatAddressForQuery(address: [String: String]) -> String {
-        // Open address in Apple Maps app.
-        var addressParts = [String]()
-        let addAddressPart: ((String?) -> Void) = { part in
-            guard let part = part else {
-                return
-            }
-            guard !part.isEmpty else {
-                return
-            }
-            addressParts.append(part)
-        }
-        addAddressPart(address["Street"])
-        addAddressPart(address["Neighborhood"])
-        addAddressPart(address["City"])
-        addAddressPart(address["Region"])
-        addAddressPart(address["Postcode"])
-        addAddressPart(address["Country"])
-        return addressParts.joined(separator: ", ")
-    }
-
-    // compression needs to be done before in UIImage.dcCompress()
-    static func saveImage(image: UIImage) -> String? {
-        guard let directory = try? FileManager.default.url(for: .documentDirectory, in: .userDomainMask,
-            appropriateFor: nil, create: false) as NSURL else {
-            return nil
-        }
-
-        guard let data = image.isTransparent() ? image.pngData() : image.jpegData(compressionQuality: 1.0) else {
-            return nil
-        }
-
-        do {
-            let timestamp = Double(Date().timeIntervalSince1970)
-            let path = directory.appendingPathComponent("\(timestamp).jpg")
-            try data.write(to: path!)
-            return path?.relativePath
-        } catch {
-            logger.info(error.localizedDescription)
-            return nil
-        }
-    }
-     */
-
-    static func hasAudioSuffix(url: URL) -> Bool {
-        ///TODO: add more file suffixes
-        return url.absoluteString.hasSuffix("wav")
-    }
-
-
-
-    static func generateThumbnailFromVideo(url: URL?) -> UIImage? {
-        guard let url = url else {
-            return nil
-        }
-        do {
-            let asset = AVURLAsset(url: url)
-            let imageGenerator = AVAssetImageGenerator(asset: asset)
-            imageGenerator.appliesPreferredTrackTransform = true
-            let cgImage = try imageGenerator.copyCGImage(at: .zero, actualTime: nil)
-            return UIImage(cgImage: cgImage)
-        } catch {
-            print(error.localizedDescription)
-            return nil
-        }
-    }
-
-    /*
-    static func getDeviceLanguage() -> String? {
-        // some device languages have suffixes (like en-aus etc.) so we want to cut suffixes off
-        guard let lang = Locale.preferredLanguages.first?.split(separator: "-").first else {
-            return nil
-        }
-        return String(lang)
-    }
-     */
 }
 
 class DateUtils {
@@ -188,30 +104,4 @@ class DateUtils {
         }
     }
 
-    static func getBriefRelativeTimeSpanString(timeStamp: Double) -> String {
-        let seconds = getRelativeTimeInSeconds(timeStamp: timeStamp)
-        let date = Date(timeIntervalSince1970: timeStamp)
-        let formatter = getLocalDateFormatter()
-
-        if seconds < DtU.minute {
-            return String.localized("now")	// under one minute
-        } else if seconds < DtU.hour {
-            let mins = seconds / DtU.minute
-            return String.localized(stringID: "n_minutes", count: Int(mins))
-        } else if seconds < DtU.day {
-            let hours = seconds / DtU.hour
-            return String.localized(stringID: "n_hours", count: Int(hours))
-        } else if seconds < DtU.day * 6 {
-            formatter.dateFormat = "EEE"
-            return formatter.string(from: date)
-        } else if seconds < DtU.year {
-            formatter.dateFormat = "MMM d"
-            return formatter.string(from: date)
-        } else {
-            formatter.dateFormat = "MMM d, yyyy"
-            let localDate = formatter.string(from: date)
-            return localDate
-        }
-    }
-
 }

+ 0 - 83
DcCore/DcCore/MessageKit/MessageKind.swift

@@ -1,83 +0,0 @@
-/*
- MIT License
- 
- Copyright (c) 2017-2019 MessageKit
- 
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- 
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-/// An enum representing the kind of message and its underlying kind.
-public enum MessageKind {
-
-    /// A standard text message.
-    ///
-    /// - Note: The font used for this message will be the value of the
-    /// `messageLabelFont` property in the `MessagesCollectionViewFlowLayout` object.
-    ///
-    /// Using `MessageKind.attributedText(NSAttributedString)` doesn't require you
-    /// to set this property and results in higher performance.
-    case text(String)
-
-    /// A message with attributed text.
-    case attributedText(NSAttributedString)
-
-    case info(NSAttributedString)
-
-    /// A photo message.
-    case photo(MediaItem)
-
-    /// A photo message with a textual description
-    case photoText(MediaItem)
-
-    /// A file message with an optional text
-    case fileText(MediaItem)
-
-    /// A video message.
-    case video(MediaItem)
-
-    /// A video message with a textual description
-    case videoText(MediaItem)
-
-    /// A location message.
-    case location(LocationItem)
-
-    /// An emoji message.
-    case emoji(String)
-
-    /// An audio message.
-    case audio(AudioItem)
-    
-    /// A contact message.
-    case contact(ContactItem)
-
-    /// A custom message.
-    /// - Note: Using this case requires that you implement the following methods and handle this case:
-    ///   - MessagesDataSource: customCell(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> UICollectionViewCell
-    ///   - MessagesLayoutDelegate: customCellSizeCalculator(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> CellSizeCalculator
-    case custom(Any?)
-
-    // MARK: - Not supported yet
-
-//    case system(String)
-//    
-//    case placeholder
-
-}

+ 0 - 42
DcCore/DcCore/MessageKit/Protocols/AudioItem.swift

@@ -1,42 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import class AVFoundation.AVAudioPlayer
-import UIKit
-
-/// A protocol used to represent the data for an audio message.
-public protocol AudioItem {
-
-    /// The url where the audio file is located.
-    var url: URL { get }
-
-    /// The audio file duration in seconds.
-    var duration: Float { get }
-
-    /// The size of the audio item.
-    var size: CGSize { get }
-
-    /// Additional text
-    var text: NSAttributedString? { get }
-}

+ 0 - 41
DcCore/DcCore/MessageKit/Protocols/ContactItem.swift

@@ -1,41 +0,0 @@
-/*
- MIT License
- 
- Copyright (c) 2017-2018 MessageKit
- 
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- 
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-/// A protocol used to represent the data for a contact message.
-public protocol ContactItem {
-    
-    /// contact displayed name
-    var displayName: String { get }
-    
-    /// initials from contact first and last name
-    var initials: String { get }
-    
-    /// contact phone numbers
-    var phoneNumbers: [String] { get }
-    
-    /// contact emails
-    var emails: [String] { get }
-}

+ 0 - 37
DcCore/DcCore/MessageKit/Protocols/LocationItem.swift

@@ -1,37 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import class CoreLocation.CLLocation
-import UIKit
-
-/// A protocol used to represent the data for a location message.
-public protocol LocationItem {
-
-    /// The location.
-    var location: CLLocation { get }
-
-    /// The size of the location item.
-    var size: CGSize { get }
-
-}

+ 0 - 45
DcCore/DcCore/MessageKit/Protocols/MediaItem.swift

@@ -1,45 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-import UIKit
-
-/// A protocol used to represent the data for a media message.
-public protocol MediaItem {
-
-    /// The url where the media is located.
-    var url: URL? { get }
-
-    /// The image.
-    var image: UIImage? { get }
-
-    /// A placeholder image for when the image is obtained asychronously.
-    var placeholderImage: UIImage { get }
-
-    /// The size of the media item.
-    var size: CGSize { get }
-
-    var text: NSAttributedString? { get }
-
-}

+ 0 - 43
DcCore/DcCore/MessageKit/Protocols/MessageType.swift

@@ -1,43 +0,0 @@
-/*
- MIT License
- 
- Copyright (c) 2017-2019 MessageKit
- 
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- 
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-/// A standard protocol representing a message.
-/// Use this protocol to create your own message object to be used by MessageKit.
-public protocol MessageType {
-
-    /// The sender of the message.
-    var sender: SenderType { get }
-
-    /// The unique identifier for the message.
-    var messageId: String { get }
-
-    /// The date the message was sent.
-    var sentDate: Date { get }
-
-    /// The kind of message and its underlying kind.
-    var kind: MessageKind { get }
-
-}

+ 0 - 38
DcCore/DcCore/MessageKit/Protocols/SenderType.swift

@@ -1,38 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-/// A standard protocol representing a sender.
-/// Use this protocol to adhere a object as the sender of a MessageType
-public protocol SenderType {
-
-    /// The unique String identifier for the sender.
-    ///
-    /// Note: This value must be unique across all senders.
-    var senderId: String { get }
-
-    /// The display name of a sender.
-    var displayName: String { get }
-}

+ 0 - 57
DcCore/DcCore/MessageKit/Sender.swift

@@ -1,57 +0,0 @@
-/*
- MIT License
- 
- Copyright (c) 2017-2019 MessageKit
- 
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- 
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-/// An object that groups the metadata of a messages sender.
-@available(*, deprecated: 3.0.0, message: "`Sender` has been replaced with the `SenderType` protocol in 3.0.0")
-public struct Sender: SenderType {
-
-    /// MARK: - Properties
-
-    /// The unique String identifier for the sender.
-    ///
-    /// Note: This value must be unique across all senders.
-    public let senderId: String
-
-    @available(*, deprecated: 3.0.0, message: "`id` has been renamed `senderId` as defined in the `SenderType` protocol")
-    public var id: String {
-        return senderId
-    }
-
-    /// The display name of a sender.
-    public let displayName: String
-
-    // MARK: - Intializers
-
-    public init(senderId: String, displayName: String) {
-        self.senderId = senderId
-        self.displayName = displayName
-    }
-
-    @available(*, deprecated: 3.0.0, message: "`id` has been renamed `senderId` as defined in the `SenderType` protocol")
-    public init(id: String, displayName: String) {
-        self.init(senderId: id, displayName: displayName)
-    }
-}

+ 0 - 19
DcCore/DcCore/Model/Audio.swift

@@ -1,19 +0,0 @@
-import CoreLocation
-import Foundation
-import UIKit
-
-struct Audio: AudioItem {
-    var size: CGSize = CGSize(width: 250, height: 50)
-
-    var url: URL
-
-    var duration: Float
-
-    var text: NSAttributedString?
-
-    init(url: URL, duration: Float, text: NSAttributedString? = nil) {
-        self.url = url
-        self.duration = duration
-        self.text = text
-    }
-}

+ 0 - 14
DcCore/DcCore/Model/Location.swift

@@ -1,14 +0,0 @@
-import CoreLocation
-import Foundation
-import UIKit
-
-struct Location: LocationItem {
-    var location: CLLocation
-
-    var size: CGSize
-
-    init(location: CLLocation, size: CGSize) {
-        self.location = location
-        self.size = size
-    }
-}

+ 0 - 26
DcCore/DcCore/Model/Media.swift

@@ -1,26 +0,0 @@
-import CoreLocation
-import Foundation
-import UIKit
-
-struct Media: MediaItem {
-    var url: URL?
-
-    var image: UIImage?
-
-    var placeholderImage: UIImage = UIImage(color: .gray, size: CGSize(width: 250, height: 100))!
-    var text: NSAttributedString?
-
-    var size: CGSize {
-        if let image = image {
-            return image.size
-        } else {
-            return placeholderImage.size
-        }
-    }
-
-    init(url: URL? = nil, image: UIImage? = nil, text: NSAttributedString? = nil) {
-        self.url = url
-        self.image = image
-        self.text = text
-    }
-}

+ 0 - 45
DcCore/DcCore/Model/Message.swift

@@ -1,45 +0,0 @@
-import CoreLocation
-import Foundation
-import UIKit
-
-struct Message: MessageType {
-    var messageId: String
-    var sender: SenderType
-    var sentDate: Date
-    var kind: MessageKind
-
-    init(kind: MessageKind, sender: Sender, messageId: String, date: Date) {
-        self.kind = kind
-        self.sender = sender
-        self.messageId = messageId
-        sentDate = date
-    }
-
-    init(text: String, sender: Sender, messageId: String, date: Date) {
-        self.init(kind: .text(text), sender: sender, messageId: messageId, date: date)
-    }
-
-    init(attributedText: NSAttributedString, sender: Sender, messageId: String, date: Date) {
-        self.init(kind: .attributedText(attributedText), sender: sender, messageId: messageId, date: date)
-    }
-
-    init(image: UIImage, sender: Sender, messageId: String, date: Date) {
-        let media = Media(image: image)
-        self.init(kind: .photo(media), sender: sender, messageId: messageId, date: date)
-    }
-
-    init(thumbnail: UIImage, sender: Sender, messageId: String, date: Date) {
-        let url = URL(fileURLWithPath: "")
-        let media = Media(url: url, image: thumbnail)
-        self.init(kind: .video(media), sender: sender, messageId: messageId, date: date)
-    }
-
-    init(location: CLLocation, sender: Sender, messageId: String, date: Date) {
-        let locationItem = Location(location: location, size: CGSize(width: 100, height: 50))
-        self.init(kind: .location(locationItem), sender: sender, messageId: messageId, date: date)
-    }
-
-    init(emoji: String, sender: Sender, messageId: String, date: Date) {
-        self.init(kind: .emoji(emoji), sender: sender, messageId: messageId, date: date)
-    }
-}

+ 33 - 31
deltachat-ios.xcodeproj/project.pbxproj

@@ -19,6 +19,8 @@
 		3040F45E234DFBC000FA34D5 /* Audio.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3040F45D234DFBC000FA34D5 /* Audio.swift */; };
 		3040F460234F419400FA34D5 /* BasicAudioController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3040F45F234F419300FA34D5 /* BasicAudioController.swift */; };
 		3040F462234F550300FA34D5 /* AudioPlayerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3040F461234F550300FA34D5 /* AudioPlayerView.swift */; };
+		304219D3243F588500516852 /* DcCore.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 304219D1243F588500516852 /* DcCore.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+		304219D92440734A00516852 /* DcMsg+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 304219D82440734A00516852 /* DcMsg+Extension.swift */; };
 		305961CC2346125100C80F33 /* UIView+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 305961822346125000C80F33 /* UIView+Extensions.swift */; };
 		305961CD2346125100C80F33 /* UIEdgeInsets+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 305961832346125000C80F33 /* UIEdgeInsets+Extensions.swift */; };
 		305961CF2346125100C80F33 /* UIColor+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 305961852346125000C80F33 /* UIColor+Extensions.swift */; };
@@ -100,7 +102,6 @@
 		70B8882E2091B8550074812E /* ContactCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70B8882D2091B8550074812E /* ContactCell.swift */; };
 		7837B64021E54DC600CDE126 /* .swiftlint.yml in Resources */ = {isa = PBXBuildFile; fileRef = 7837B63F21E54DC600CDE126 /* .swiftlint.yml */; };
 		785BE16821E247F1003BE98C /* MessageInfoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 785BE16721E247F1003BE98C /* MessageInfoViewController.swift */; };
-		787D669A229F2237000A7A9D /* libdeltachat.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 787D6699229F2237000A7A9D /* libdeltachat.a */; };
 		789E879621D6CB58003ED1C5 /* QrCodeReaderController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 789E879521D6CB58003ED1C5 /* QrCodeReaderController.swift */; };
 		789E879D21D6DF86003ED1C5 /* ProgressHud.swift in Sources */ = {isa = PBXBuildFile; fileRef = 789E879C21D6DF86003ED1C5 /* ProgressHud.swift */; };
 		78E45E3A21D3CFBC00D4B15E /* SettingsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78E45E3921D3CFBC00D4B15E /* SettingsController.swift */; };
@@ -108,12 +109,9 @@
 		78E45E4421D3F14A00D4B15E /* UIImage+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78E45E4321D3F14A00D4B15E /* UIImage+Extension.swift */; };
 		78E45E4C21D404AE00D4B15E /* InfoMessageCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78E45E4B21D404AE00D4B15E /* InfoMessageCell.swift */; };
 		78ED838321D5379000243125 /* TextFieldCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78ED838221D5379000243125 /* TextFieldCell.swift */; };
-		78ED838D21D577D000243125 /* events.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78ED838C21D577D000243125 /* events.swift */; };
 		78ED839421D5AF8A00243125 /* QrCodeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78ED839321D5AF8A00243125 /* QrCodeView.swift */; };
 		7A0052C81FBE6CB40048C3BF /* NewContactController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A0052C71FBE6CB40048C3BF /* NewContactController.swift */; };
-		7A451D941FB1B1DB00177250 /* wrapper.c in Sources */ = {isa = PBXBuildFile; fileRef = 7A451D921FB1B1DB00177250 /* wrapper.c */; };
 		7A451DB01FB1F84900177250 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A451DAF1FB1F84900177250 /* AppCoordinator.swift */; };
-		7A451DBE1FB4AD0700177250 /* Wrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A451DBD1FB4AD0700177250 /* Wrapper.swift */; };
 		7A9FB1441FB061E2001FEA36 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A9FB1431FB061E2001FEA36 /* AppDelegate.swift */; };
 		7A9FB14B1FB061E2001FEA36 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7A9FB14A1FB061E2001FEA36 /* Assets.xcassets */; };
 		7A9FB14E1FB061E2001FEA36 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7A9FB14C1FB061E2001FEA36 /* LaunchScreen.storyboard */; };
@@ -176,6 +174,20 @@
 		};
 /* End PBXContainerItemProxy section */
 
+/* Begin PBXCopyFilesBuildPhase section */
+		304219D4243F588600516852 /* Embed Frameworks */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 2147483647;
+			dstPath = "";
+			dstSubfolderSpec = 10;
+			files = (
+				304219D3243F588500516852 /* DcCore.framework in Embed Frameworks */,
+			);
+			name = "Embed Frameworks";
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXCopyFilesBuildPhase section */
+
 /* Begin PBXFileReference section */
 		21EE28844E7A690D73BF5285 /* Pods-deltachat-iosTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-deltachat-iosTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-deltachat-iosTests/Pods-deltachat-iosTests.debug.xcconfig"; sourceTree = "<group>"; };
 		2F7009234DB9408201A6CDCB /* Pods_deltachat_iosTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_deltachat_iosTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -209,6 +221,9 @@
 		3040F45D234DFBC000FA34D5 /* Audio.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Audio.swift; sourceTree = "<group>"; };
 		3040F45F234F419300FA34D5 /* BasicAudioController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BasicAudioController.swift; sourceTree = "<group>"; };
 		3040F461234F550300FA34D5 /* AudioPlayerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioPlayerView.swift; sourceTree = "<group>"; };
+		304219D1243F588500516852 /* DcCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = DcCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+		304219D5243F58DD00516852 /* DcCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = DcCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+		304219D82440734A00516852 /* DcMsg+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "DcMsg+Extension.swift"; sourceTree = "<group>"; };
 		305961822346125000C80F33 /* UIView+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+Extensions.swift"; sourceTree = "<group>"; };
 		305961832346125000C80F33 /* UIEdgeInsets+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIEdgeInsets+Extensions.swift"; sourceTree = "<group>"; };
 		305961852346125000C80F33 /* UIColor+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColor+Extensions.swift"; sourceTree = "<group>"; };
@@ -334,25 +349,19 @@
 		789E879521D6CB58003ED1C5 /* QrCodeReaderController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QrCodeReaderController.swift; sourceTree = "<group>"; };
 		789E879C21D6DF86003ED1C5 /* ProgressHud.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProgressHud.swift; sourceTree = "<group>"; };
 		78C7036A21D46752005D4525 /* deltachat-ios.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "deltachat-ios.entitlements"; sourceTree = "<group>"; };
-		78E45E2121D1768900D4B15E /* src */ = {isa = PBXFileReference; lastKnownFileType = folder; name = src; path = "deltachat-ios/libraries/deltachat-core/src"; sourceTree = "<group>"; };
 		78E45E3921D3CFBC00D4B15E /* SettingsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsController.swift; sourceTree = "<group>"; };
 		78E45E3B21D3D03700D4B15E /* TextFieldTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextFieldTableViewCell.swift; sourceTree = "<group>"; };
 		78E45E4321D3F14A00D4B15E /* UIImage+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIImage+Extension.swift"; sourceTree = "<group>"; };
 		78E45E4B21D404AE00D4B15E /* InfoMessageCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InfoMessageCell.swift; sourceTree = "<group>"; };
 		78ED838221D5379000243125 /* TextFieldCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextFieldCell.swift; sourceTree = "<group>"; };
-		78ED838C21D577D000243125 /* events.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = events.swift; sourceTree = "<group>"; };
 		78ED839321D5AF8A00243125 /* QrCodeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QrCodeView.swift; sourceTree = "<group>"; };
 		7A0052C71FBE6CB40048C3BF /* NewContactController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewContactController.swift; sourceTree = "<group>"; };
-		7A451D921FB1B1DB00177250 /* wrapper.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = wrapper.c; sourceTree = "<group>"; };
-		7A451D931FB1B1DB00177250 /* wrapper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = wrapper.h; sourceTree = "<group>"; };
 		7A451DAF1FB1F84900177250 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = "<group>"; };
-		7A451DBD1FB4AD0700177250 /* Wrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Wrapper.swift; sourceTree = "<group>"; };
 		7A9FB1401FB061E2001FEA36 /* deltachat-ios.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "deltachat-ios.app"; sourceTree = BUILT_PRODUCTS_DIR; };
 		7A9FB1431FB061E2001FEA36 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
 		7A9FB14A1FB061E2001FEA36 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
 		7A9FB14D1FB061E2001FEA36 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
 		7A9FB14F1FB061E2001FEA36 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
-		7A9FB1561FB06540001FEA36 /* deltachat-ios-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "deltachat-ios-Bridging-Header.h"; sourceTree = "<group>"; };
 		7AE0A5481FC42F65005ECB4B /* NewChatViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewChatViewController.swift; sourceTree = "<group>"; };
 		8DE110C607A0E4485C43B5FA /* Pods-deltachat-ios.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-deltachat-ios.debug.xcconfig"; path = "Pods/Target Support Files/Pods-deltachat-ios/Pods-deltachat-ios.debug.xcconfig"; sourceTree = "<group>"; };
 		A8615D4600859851E53CAA9C /* Pods-deltachat-ios.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-deltachat-ios.release.xcconfig"; path = "Pods/Target Support Files/Pods-deltachat-ios/Pods-deltachat-ios.release.xcconfig"; sourceTree = "<group>"; };
@@ -447,7 +456,6 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				787D669A229F2237000A7A9D /* libdeltachat.a in Frameworks */,
 				8B6D425BC604F7C43B65D436 /* Pods_deltachat_ios.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -463,6 +471,14 @@
 /* End PBXFrameworksBuildPhase section */
 
 /* Begin PBXGroup section */
+		304219D7244072E600516852 /* DC */ = {
+			isa = PBXGroup;
+			children = (
+				304219D82440734A00516852 /* DcMsg+Extension.swift */,
+			);
+			path = DC;
+			sourceTree = "<group>";
+		};
 		3059617E234610A800C80F33 /* MessageKit */ = {
 			isa = PBXGroup;
 			children = (
@@ -622,7 +638,6 @@
 				3060119E22DDE24000C1CE6F /* Localizable.strings */,
 				306011B422E5E7FB00C1CE6F /* Localizable.stringsdict */,
 				7837B63F21E54DC600CDE126 /* .swiftlint.yml */,
-				78E45E2121D1768900D4B15E /* src */,
 				7A9FB1421FB061E2001FEA36 /* deltachat-ios */,
 				AE851A02227AECDE00ED86F0 /* deltachat-iosTests */,
 				7A9FB1411FB061E2001FEA36 /* Products */,
@@ -646,13 +661,13 @@
 		7A9FB1421FB061E2001FEA36 /* deltachat-ios */ = {
 			isa = PBXGroup;
 			children = (
+				304219D7244072E600516852 /* DC */,
 				AE1988AA23EB3C7600B4CD5F /* Assets */,
 				AE19887623EB2BDA00B4CD5F /* Assets */,
 				AE77838B23E32EAA0093EABD /* ViewModel */,
 				305961812346125000C80F33 /* Extensions */,
 				3059617E234610A800C80F33 /* MessageKit */,
 				7A9FB1431FB061E2001FEA36 /* AppDelegate.swift */,
-				AE851ACA227C79CF00ED86F0 /* DC */,
 				AE851AC3227C695900ED86F0 /* View */,
 				AE851AC2227C695000ED86F0 /* Helper */,
 				AE851AC1227C694300ED86F0 /* Coordinator */,
@@ -660,7 +675,6 @@
 				AE851ABA227C692600ED86F0 /* Model */,
 				AE851ACB227C7A5000ED86F0 /* Handler */,
 				7A9FB15B1FB07364001FEA36 /* libraries */,
-				7A9FB1561FB06540001FEA36 /* deltachat-ios-Bridging-Header.h */,
 				78C7036A21D46752005D4525 /* deltachat-ios.entitlements */,
 				7A9FB14A1FB061E2001FEA36 /* Assets.xcassets */,
 				7A9FB14C1FB061E2001FEA36 /* LaunchScreen.storyboard */,
@@ -680,6 +694,8 @@
 		7A9FB4F81FB084E6001FEA36 /* Frameworks */ = {
 			isa = PBXGroup;
 			children = (
+				304219D5243F58DD00516852 /* DcCore.framework */,
+				304219D1243F588500516852 /* DcCore.framework */,
 				787D6699229F2237000A7A9D /* libdeltachat.a */,
 				6241BE1534A653E79AD5D01D /* Pods_deltachat_ios.framework */,
 				2F7009234DB9408201A6CDCB /* Pods_deltachat_iosTests.framework */,
@@ -836,17 +852,6 @@
 			path = View;
 			sourceTree = "<group>";
 		};
-		AE851ACA227C79CF00ED86F0 /* DC */ = {
-			isa = PBXGroup;
-			children = (
-				7A451D931FB1B1DB00177250 /* wrapper.h */,
-				7A451DBD1FB4AD0700177250 /* Wrapper.swift */,
-				78ED838C21D577D000243125 /* events.swift */,
-				7A451D921FB1B1DB00177250 /* wrapper.c */,
-			);
-			path = DC;
-			sourceTree = "<group>";
-		};
 		AE851ACB227C7A5000ED86F0 /* Handler */ = {
 			isa = PBXGroup;
 			children = (
@@ -873,6 +878,7 @@
 				30C8FE37A924BE7AFF9661C1 /* [CP] Embed Pods Frameworks */,
 				7837B63821E54CB400CDE126 /* Run Script */,
 				7837B64621E5532B00CDE126 /* ShellScript */,
+				304219D4243F588600516852 /* Embed Frameworks */,
 			);
 			buildRules = (
 			);
@@ -1136,7 +1142,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "# The $PATH used by XCode likely won't contain Cargo, fix that.\n# This assumes a default `rustup` setup.\nexport PATH=\"$HOME/.cargo/bin:$PATH\"\n\nexport CFLAGS_x86_64_apple_darwin=\"-I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include\"\n\n# ensure all targets are installed\nrustup target add aarch64-apple-ios x86_64-apple-ios --toolchain `cat deltachat-ios/libraries/deltachat-core-rust/rust-toolchain`\n\n# --xcode-integ determines --release and --targets from XCode's env vars.\n# Depending your setup, specify the rustup toolchain explicitly.\ncargo +`cat deltachat-ios/libraries/deltachat-core-rust/rust-toolchain` lipo --release --manifest-path deltachat-ios/libraries/deltachat-core-rust/deltachat-ffi/Cargo.toml --no-default-features --features nightly\n";
+			shellScript = "# The $PATH used by XCode likely won't contain Cargo, fix that.\n# This assumes a default `rustup` setup.\n export PATH=\"$HOME/.cargo/bin:$PATH\"\n\n export CFLAGS_x86_64_apple_darwin=\"-I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include\"\n\n# ensure all targets are installed\n rustup target add aarch64-apple-ios x86_64-apple-ios --toolchain `cat deltachat-ios/libraries/deltachat-core-rust/rust-toolchain`\n\n# --xcode-integ determines --release and --targets from XCode's env vars.\n# Depending your setup, specify the rustup toolchain explicitly.\n cargo +`cat deltachat-ios/libraries/deltachat-core-rust/rust-toolchain` lipo --release --manifest-path deltachat-ios/libraries/deltachat-core-rust/deltachat-ffi/Cargo.toml --no-default-features --features nightly\n";
 		};
 /* End PBXShellScriptBuildPhase section */
 
@@ -1159,6 +1165,7 @@
 				7070FB9B2101ECBB000DC258 /* NewGroupController.swift in Sources */,
 				305961EA2346125100C80F33 /* MessageStyle.swift in Sources */,
 				305961F92346125100C80F33 /* MessageLabel.swift in Sources */,
+				304219D92440734A00516852 /* DcMsg+Extension.swift in Sources */,
 				305961FA2346125100C80F33 /* MessageReusableView.swift in Sources */,
 				3040F462234F550300FA34D5 /* AudioPlayerView.swift in Sources */,
 				AE52EA19229EB53C00C586C9 /* ContactDetailHeader.swift in Sources */,
@@ -1168,7 +1175,6 @@
 				AE52EA20229EB9F000C586C9 /* EditGroupViewController.swift in Sources */,
 				70B08FCD21073B910097D3EA /* NewGroupMemberChoiceController.swift in Sources */,
 				AE18F294228C602A0007B1BE /* SecuritySettingsController.swift in Sources */,
-				78ED838D21D577D000243125 /* events.swift in Sources */,
 				305961FD2346125100C80F33 /* TypingBubble.swift in Sources */,
 				305961D72346125100C80F33 /* MessageKit+Availability.swift in Sources */,
 				3040F45E234DFBC000FA34D5 /* Audio.swift in Sources */,
@@ -1255,7 +1261,6 @@
 				305961D22346125100C80F33 /* CGRect+Extensions.swift in Sources */,
 				305961E12346125100C80F33 /* LocationItem.swift in Sources */,
 				305961E72346125100C80F33 /* AccessoryPosition.swift in Sources */,
-				7A451DBE1FB4AD0700177250 /* Wrapper.swift in Sources */,
 				30260CA7238F02F700D8D52C /* MultilineTextFieldCell.swift in Sources */,
 				305961DE2346125100C80F33 /* MessageType.swift in Sources */,
 				AE851ACE227CA54400ED86F0 /* InitialsBadge.swift in Sources */,
@@ -1263,7 +1268,6 @@
 				305961EB2346125100C80F33 /* MessageKitError.swift in Sources */,
 				70B8882E2091B8550074812E /* ContactCell.swift in Sources */,
 				305961F82346125100C80F33 /* AudioMessageCell.swift in Sources */,
-				7A451D941FB1B1DB00177250 /* wrapper.c in Sources */,
 				305961EC2346125100C80F33 /* Avatar.swift in Sources */,
 				305961CD2346125100C80F33 /* UIEdgeInsets+Extensions.swift in Sources */,
 				305962032346125100C80F33 /* CellSizeCalculator.swift in Sources */,
@@ -1623,7 +1627,6 @@
 				PRODUCT_BUNDLE_IDENTIFIER = chat.delta;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";
-				SWIFT_OBJC_BRIDGING_HEADER = "deltachat-ios/deltachat-ios-Bridging-Header.h";
 				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
 				SWIFT_VERSION = 4.2;
 				TARGETED_DEVICE_FAMILY = "1,2";
@@ -1697,7 +1700,6 @@
 				PRODUCT_BUNDLE_IDENTIFIER = chat.delta;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";
-				SWIFT_OBJC_BRIDGING_HEADER = "deltachat-ios/deltachat-ios-Bridging-Header.h";
 				SWIFT_VERSION = 4.2;
 				TARGETED_DEVICE_FAMILY = "1,2";
 			};

+ 3 - 0
deltachat-ios.xcworkspace/contents.xcworkspacedata

@@ -1,6 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Workspace
    version = "1.0">
+   <FileRef
+      location = "group:DcCore/DcCore.xcodeproj">
+   </FileRef>
    <FileRef
       location = "group:deltachat-ios.xcodeproj">
    </FileRef>

+ 1 - 0
deltachat-ios/AppDelegate.swift

@@ -4,6 +4,7 @@ import Reachability
 import SwiftyBeaver
 import UIKit
 import UserNotifications
+import DcCore
 
 let logger = SwiftyBeaver.self
 

+ 1 - 0
deltachat-ios/Controller/AccountSetup/CertificateCheckController.swift

@@ -1,4 +1,5 @@
 import UIKit
+import DcCore
 
 class CertificateCheckController: UITableViewController {
 

+ 1 - 0
deltachat-ios/Controller/AccountSetup/SecuritySettingsController.swift

@@ -1,4 +1,5 @@
 import UIKit
+import DcCore
 
 class SecuritySettingsController: UITableViewController {
 

+ 1 - 0
deltachat-ios/Controller/AccountSetupController.swift

@@ -1,5 +1,6 @@
 import SafariServices
 import UIKit
+import DcCore
 
 class AccountSetupController: UITableViewController, ProgressAlertHandler {
 

+ 1 - 0
deltachat-ios/Controller/ChatListController.swift

@@ -1,4 +1,5 @@
 import UIKit
+import DcCore
 
 class ChatListController: UITableViewController {
     weak var coordinator: ChatListCoordinator?

+ 1 - 0
deltachat-ios/Controller/ChatViewController.swift

@@ -3,6 +3,7 @@ import QuickLook
 import UIKit
 import InputBarAccessoryView
 import AVFoundation
+import DcCore
 
 protocol MediaSendHandler {
     func onSuccess()

+ 1 - 0
deltachat-ios/Controller/EditContactController.swift

@@ -1,4 +1,5 @@
 import UIKit
+import DcCore
 
 class EditContactController: NewContactController {
 

+ 1 - 0
deltachat-ios/Controller/EditGroupViewController.swift

@@ -1,4 +1,5 @@
 import UIKit
+import DcCore
 
 class EditGroupViewController: UITableViewController, MediaPickerDelegate {
 

+ 1 - 0
deltachat-ios/Controller/EditSettingsController.swift

@@ -1,4 +1,5 @@
 import UIKit
+import DcCore
 
 class EditSettingsController: UITableViewController, MediaPickerDelegate {
 

+ 1 - 0
deltachat-ios/Controller/GroupChatDetailViewController.swift

@@ -1,4 +1,5 @@
 import UIKit
+import DcCore
 
 class GroupChatDetailViewController: UIViewController {
 

+ 1 - 0
deltachat-ios/Controller/GroupMembersViewController.swift

@@ -1,4 +1,5 @@
 import UIKit
+import DcCore
 
 class NewGroupAddMembersViewController: GroupMembersViewController {
     weak var coordinator: NewGroupAddMembersCoordinator?

+ 1 - 0
deltachat-ios/Controller/MailboxViewController.swift

@@ -1,4 +1,5 @@
 import UIKit
+import DcCore
 
 class MailboxViewController: ChatViewController {
 

+ 1 - 0
deltachat-ios/Controller/MessageInfoViewController.swift

@@ -1,4 +1,5 @@
 import UIKit
+import DcCore
 
 class MessageInfoViewController: UITableViewController {
     var dcContext: DcContext

+ 1 - 0
deltachat-ios/Controller/NewChatViewController.swift

@@ -1,6 +1,7 @@
 import ALCameraViewController
 import Contacts
 import UIKit
+import DcCore
 
 class NewChatViewController: UITableViewController {
     weak var coordinator: NewChatCoordinator?

+ 1 - 0
deltachat-ios/Controller/NewContactController.swift

@@ -1,4 +1,5 @@
 import UIKit
+import DcCore
 
 class NewContactController: UITableViewController {
 

+ 1 - 0
deltachat-ios/Controller/NewGroupController.swift

@@ -1,4 +1,5 @@
 import UIKit
+import DcCore
 
 class NewGroupController: UITableViewController, MediaPickerDelegate {
 

+ 1 - 0
deltachat-ios/Controller/QrInviteViewController.swift

@@ -1,5 +1,6 @@
 import Foundation
 import UIKit
+import DcCore
 
 class QrInviteViewController: UITableViewController {
     private let rowQRCode = 0

+ 1 - 0
deltachat-ios/Controller/QrViewController.swift

@@ -1,5 +1,6 @@
 import Foundation
 import UIKit
+import DcCore
 
 class QrViewController: UITableViewController {
     private let rowQRCode = 0

+ 1 - 0
deltachat-ios/Controller/SettingsAutodelOverviewController.swift

@@ -1,4 +1,5 @@
 import UIKit
+import DcCore
 
 class SettingsAutodelOverviewController: UITableViewController {
 

+ 1 - 0
deltachat-ios/Controller/SettingsAutodelSetController.swift

@@ -1,4 +1,5 @@
 import UIKit
+import DcCore
 
 class SettingsAutodelSetController: UITableViewController {
 

+ 1 - 1
deltachat-ios/Controller/SettingsClassicViewController.swift

@@ -1,5 +1,5 @@
 import UIKit
-
+import DcCore
 class SettingsClassicViewController: UITableViewController {
 
     var dcContext: DcContext

+ 1 - 0
deltachat-ios/Controller/SettingsController.swift

@@ -1,5 +1,6 @@
 import JGProgressHUD
 import UIKit
+import DcCore
 
 internal final class SettingsViewController: UITableViewController {
 

+ 1 - 0
deltachat-ios/Controller/WelcomeViewController.swift

@@ -1,4 +1,5 @@
 import UIKit
+import DcCore
 
 class WelcomeViewController: UIViewController, ProgressAlertHandler {
 

+ 1 - 0
deltachat-ios/Coordinator/AppCoordinator.swift

@@ -2,6 +2,7 @@ import UIKit
 import ALCameraViewController
 import Photos
 import MobileCoreServices
+import DcCore
 
 class AppCoordinator: NSObject, Coordinator {
 

+ 94 - 0
deltachat-ios/DC/DcMsg+Extension.swift

@@ -0,0 +1,94 @@
+import Foundation
+import DcCore
+import UIKit
+import AVFoundation
+
+extension DcMsg: MessageType {
+    
+    public var sender: SenderType {
+        return Sender(id: "\(fromContactId)", displayName: fromContact.displayName)
+    }
+
+    public var kind: MessageKind {
+        if isInfo {
+            let text = NSAttributedString(string: self.text ?? "", attributes: [
+                NSAttributedString.Key.font: UIFont.boldSystemFont(ofSize: 12),
+                NSAttributedString.Key.foregroundColor: DcColors.grayTextColor,
+                ])
+            return MessageKind.info(text)
+        } else if isSetupMessage {
+            return MessageKind.text(String.localized("autocrypt_asm_click_body"))
+        }
+
+        let text = self.text ?? ""
+
+        if self.viewtype == nil {
+            return MessageKind.text(text)
+        }
+
+        switch self.viewtype! {
+        case .image:
+            return createImageMessage(text: text)
+        case .video:
+            return createVideoMessage(text: text)
+        case .voice, .audio:
+            return createAudioMessage(text: text)
+        default:
+            // TODO: custom views for audio, etc
+            if let filename = self.filename {
+                if Utils.hasAudioSuffix(url: fileURL!) {
+                   return createAudioMessage(text: text)
+                }
+                return createFileMessage(text: text)
+            }
+            return MessageKind.text(text)
+        }
+    }
+
+    internal func createVideoMessage(text: String) -> MessageKind {
+        let thumbnail = Utils.generateThumbnailFromVideo(url: fileURL)
+        if text.isEmpty {
+            return MessageKind.video(Media(url: fileURL, image: thumbnail))
+        }
+        let attributedString = NSAttributedString(string: text, attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16.0),
+                                                                             NSAttributedString.Key.foregroundColor: DcColors.defaultTextColor])
+        return MessageKind.videoText(Media(url: fileURL, image: thumbnail, text: attributedString))
+    }
+
+    internal func createImageMessage(text: String) -> MessageKind {
+        if text.isEmpty {
+            return MessageKind.photo(Media(image: image))
+        }
+        let attributedString = NSAttributedString(string: text, attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16.0),
+                                                                             NSAttributedString.Key.foregroundColor: DcColors.defaultTextColor])
+        return MessageKind.photoText(Media(image: image, text: attributedString))
+    }
+
+    internal func createAudioMessage(text: String) -> MessageKind {
+        let audioAsset = AVURLAsset(url: fileURL!)
+        let seconds = Float(CMTimeGetSeconds(audioAsset.duration))
+        if !text.isEmpty {
+            let attributedString = NSAttributedString(string: text, attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16.0),
+                                                                                 NSAttributedString.Key.foregroundColor: DcColors.defaultTextColor])
+            return MessageKind.audio(Audio(url: audioAsset.url, duration: seconds, text: attributedString))
+        }
+        return MessageKind.audio(Audio(url: fileURL!, duration: seconds))
+    }
+
+    internal func createFileMessage(text: String) -> MessageKind {
+        let fileString = "\(self.filename ?? "???") (\(self.filesize / 1024) kB)"
+        let attributedFileString = NSMutableAttributedString(string: fileString,
+                                                             attributes: [NSAttributedString.Key.font: UIFont.italicSystemFont(ofSize: 13.0),
+                                                                          NSAttributedString.Key.foregroundColor: DcColors.defaultTextColor])
+        if !text.isEmpty {
+            attributedFileString.append(NSAttributedString(string: "\n\n",
+                                                           attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 7.0)]))
+            attributedFileString.append(NSAttributedString(string: text,
+                                                           attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16.0),
+                                                                        NSAttributedString.Key.foregroundColor: DcColors.defaultTextColor]))
+        }
+        return MessageKind.fileText(Media(text: attributedFileString))
+    }
+
+    
+}

+ 0 - 191
deltachat-ios/DC/events.swift

@@ -1,191 +0,0 @@
-import UIKit
-import UserNotifications
-
-let dcNotificationChanged = Notification.Name(rawValue: "MrEventMsgsChanged")
-let dcNotificationIncoming = Notification.Name(rawValue: "MrEventIncomingMsg")
-let dcNotificationImexProgress = Notification.Name(rawValue: "dcNotificationImexProgress")
-let dcNotificationConfigureProgress = Notification.Name(rawValue: "MrEventConfigureProgress")
-let dcNotificationSecureJoinerProgress = Notification.Name(rawValue: "MrEventSecureJoinerProgress")
-let dcNotificationSecureInviterProgress = Notification.Name(rawValue: "MrEventSecureInviterProgress")
-let dcNotificationViewChat = Notification.Name(rawValue: "MrEventViewChat")
-let dcNotificationContactChanged = Notification.Name(rawValue: "MrEventContactsChanged")
-let dcNotificationChatModified = Notification.Name(rawValue: "dcNotificationChatModified")
-let dcNotificationChatDeletedInChatDetail = Notification.Name(rawValue: "ChatDeletedInChatDetail")
-
-@_silgen_name("callbackSwift")
-
-public func callbackSwift(event: CInt, data1: CUnsignedLong, data2: CUnsignedLong, data1String: UnsafePointer<Int8>, data2String: UnsafePointer<Int8>) {
-    if event >= DC_EVENT_ERROR && event <= 499 {
-        let s = String(cString: data2String)
-        AppDelegate.lastErrorString = s
-        logger.error("event: \(s)")
-        return
-    }
-
-    switch event {
-
-    case DC_EVENT_INFO:
-        let s = String(cString: data2String)
-        logger.info("event: \(s)")
-
-    case DC_EVENT_WARNING:
-        let s = String(cString: data2String)
-        logger.warning("event: \(s)")
-
-    case DC_EVENT_CONFIGURE_PROGRESS:
-        logger.info("configure progress: \(Int(data1)) \(Int(data2))")
-        let nc = NotificationCenter.default
-        DispatchQueue.main.async {
-            let done = Int(data1) == 1000
-
-            nc.post(
-                name: dcNotificationConfigureProgress,
-                object: nil,
-                userInfo: [
-                    "progress": Int(data1),
-                    "error": Int(data1) == 0,
-                    "done": done,
-                    "errorMessage": AppDelegate.lastErrorString as Any,
-                ]
-            )
-
-            if done {
-                UserDefaults.standard.set(true, forKey: Constants.Keys.deltachatUserProvidedCredentialsKey)
-                UserDefaults.standard.synchronize()
-                AppDelegate.lastErrorString = nil
-            }
-        }
-
-    case DC_EVENT_IMEX_PROGRESS:
-        let nc = NotificationCenter.default
-        DispatchQueue.main.async {
-            nc.post(
-                name: dcNotificationImexProgress,
-                object: nil,
-                userInfo: [
-                    "progress": Int(data1),
-                    "error": Int(data1) == 0,
-                    "done": Int(data1) == 1000,
-                    "errorMessage": AppDelegate.lastErrorString as Any,
-                ]
-            )
-        }
-
-    case DC_EVENT_IMAP_CONNECTED, DC_EVENT_SMTP_CONNECTED:
-        logger.warning("network: \(String(cString: data2String))")
-
-    case DC_EVENT_MSGS_CHANGED, DC_EVENT_MSG_READ, DC_EVENT_MSG_DELIVERED, DC_EVENT_MSG_FAILED:
-        logger.info("change: \(event)")
-
-        let nc = NotificationCenter.default
-
-        DispatchQueue.main.async {
-            nc.post(
-                name: dcNotificationChanged,
-                object: nil,
-                userInfo: [
-                    "message_id": Int(data2),
-                    "chat_id": Int(data1),
-                    "date": Date(),
-                ]
-            )
-        }
-
-    case DC_EVENT_CHAT_MODIFIED:
-        logger.info("chat modified: \(event)")
-        let nc = NotificationCenter.default
-        DispatchQueue.main.async {
-            nc.post(
-                name: dcNotificationChatModified,
-                object: nil,
-                userInfo: [
-                    "chat_id": Int(data1),
-                ]
-            )
-        }
-
-    case DC_EVENT_INCOMING_MSG:
-        let nc = NotificationCenter.default
-        let userInfo = [
-            "message_id": Int(data2),
-            "chat_id": Int(data1),
-        ]
-
-        DispatchQueue.main.async {
-            nc.post(name: dcNotificationIncoming,
-                    object: nil,
-                    userInfo: userInfo)
-
-            if !UserDefaults.standard.bool(forKey: "notifications_disabled") {
-                let content = UNMutableNotificationContent()
-                let msg = DcMsg(id: Int(data2))
-                content.title = msg.fromContact.displayName
-                content.body = msg.summary(chars: 40) ?? ""
-                content.userInfo = userInfo
-                content.sound = .default
-
-                let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 0.1, repeats: false)
-
-                let request = UNNotificationRequest(identifier: Constants.notificationIdentifier, content: content, trigger: trigger)
-                UNUserNotificationCenter.current().add(request, withCompletionHandler: nil)
-                logger.info("notifications: added \(content)")
-            }
-
-            let array = DcContext.shared.getFreshMessages()
-            UIApplication.shared.applicationIconBadgeNumber = array.count
-        }
-
-    case DC_EVENT_SMTP_MESSAGE_SENT:
-        logger.info("network: \(String(cString: data2String))")
-
-    case DC_EVENT_MSG_DELIVERED:
-        logger.info("message delivered: \(data1)-\(data2)")
-
-    case DC_EVENT_SECUREJOIN_INVITER_PROGRESS:
-        logger.info("securejoin inviter progress \(data1)")
-
-        let nc = NotificationCenter.default
-        DispatchQueue.main.async {
-            nc.post(
-                name: dcNotificationSecureInviterProgress,
-                object: nil,
-                userInfo: [
-                    "progress": Int(data2),
-                    "error": Int(data2) == 0,
-                    "done": Int(data2) == 1000,
-                ]
-            )
-        }
-
-    case DC_EVENT_SECUREJOIN_JOINER_PROGRESS:
-        logger.info("securejoin joiner progress \(data1)")
-        let nc = NotificationCenter.default
-        DispatchQueue.main.async {
-            nc.post(
-                name: dcNotificationSecureJoinerProgress,
-                object: nil,
-                userInfo: [
-                    "contact_id": Int(data1),
-                    "progress": Int(data2),
-                    "error": Int(data2) == 0,
-                    "done": Int(data2) == 1000,
-                ]
-            )
-        }
-    case DC_EVENT_CONTACTS_CHANGED:
-        logger.info("contact changed: \(data1)")
-        let nc = NotificationCenter.default
-        DispatchQueue.main.async {
-            nc.post(
-                name: dcNotificationContactChanged,
-                object: nil,
-                userInfo: [
-                    "contact_id": Int(data1)
-                ]
-            )
-        }
-
-    default:
-        logger.warning("unknown event: \(event)")
-    }
-}

+ 0 - 9
deltachat-ios/DC/wrapper.c

@@ -1,9 +0,0 @@
-#include "wrapper.h"
-
-void callbackSwift(int, long, long, const char*, const char*);
-
-uintptr_t callback_ios(dc_context_t* mailbox, int event, uintptr_t data1, uintptr_t data2)
-{
-    callbackSwift(event, data1, data2, data1? (const char*)data1 : "", data2? (const char*)data2 : "");
-    return 0;
-}

+ 0 - 18
deltachat-ios/DC/wrapper.h

@@ -1,18 +0,0 @@
-#ifndef wrapper_h
-#define wrapper_h
-
-#include <stdio.h>
-#include "deltachat.h"
-
-// redeclare, so swift understands they are opaque types
-typedef dc_context_t dc_context_t;
-typedef dc_contact_t dc_contact_t;
-typedef dc_chat_t dc_chat_t;
-typedef dc_msg_t dc_msg_t;
-typedef dc_lot_t dc_lot_t;
-typedef dc_array_t dc_array_t;
-typedef dc_chatlist_t dc_chatlist_t;
-
-uintptr_t callback_ios(dc_context_t* mailbox, int event, uintptr_t data1, uintptr_t data2);
-
-#endif /* wrapper_h */

+ 1 - 0
deltachat-ios/Extensions/DcContact+Extension.swift

@@ -1,4 +1,5 @@
 import Foundation
+import DcCore
 
 extension DcContact {
     func contains(searchText text: String) -> [ContactHighlights] {

+ 1 - 0
deltachat-ios/Handler/DeviceContactsHandler.swift

@@ -1,5 +1,6 @@
 import Contacts
 import UIKit
+import DcCore
 
 class DeviceContactsHandler {
     private let store = CNContactStore()

+ 1 - 0
deltachat-ios/Handler/ProgressAlertHandler.swift

@@ -1,4 +1,5 @@
 import UIKit
+import DcCore
 
 protocol ProgressAlertHandler: UIViewController {
     var progressAlert: UIAlertController { get }

+ 1 - 0
deltachat-ios/Helper/AvatarHelper.swift

@@ -1,5 +1,6 @@
 import Foundation
 import UIKit
+import DcCore
 
 class AvatarHelper {
     static let tmpFile = "tempAvatar.jpg"

+ 1 - 0
deltachat-ios/Helper/LocationManager.swift

@@ -1,5 +1,6 @@
 import Foundation
 import CoreLocation
+import DcCore
 
 class LocationManager: NSObject, CLLocationManagerDelegate {
 

+ 1 - 0
deltachat-ios/Helper/RelayHelper.swift

@@ -1,4 +1,5 @@
 import Foundation
+import DcCore
 
 class RelayHelper {
     static var sharedInstance: RelayHelper = RelayHelper()

+ 1 - 0
deltachat-ios/Helper/Utils.swift

@@ -1,6 +1,7 @@
 import Foundation
 import UIKit
 import AVFoundation
+import DcCore
 
 struct Utils {
 

+ 1 - 0
deltachat-ios/View/AvatarSelectionCell.swift

@@ -1,4 +1,5 @@
 import UIKit
+import DcCore
 
 class AvatarSelectionCell: UITableViewCell {
     let badgeSize: CGFloat = 72

+ 1 - 0
deltachat-ios/View/Cell/ProfileCell.swift

@@ -1,4 +1,5 @@
 import UIKit
+import DcCore
 
 class ProfileCell: UITableViewCell {
 

+ 1 - 0
deltachat-ios/View/ContactCell.swift

@@ -1,4 +1,5 @@
 import UIKit
+import DcCore
 
 protocol ContactCellDelegate: class {
     func onAvatarTapped(at index: Int)

+ 1 - 0
deltachat-ios/ViewModel/ChatListViewModel.swift

@@ -1,4 +1,5 @@
 import UIKit
+import DcCore
 
 // MARK: - ChatListViewModelProtocol
 protocol ChatListViewModelProtocol: class, UISearchResultsUpdating {

+ 1 - 0
deltachat-ios/ViewModel/ContactCellViewModel.swift

@@ -1,4 +1,5 @@
 import Foundation
+import DcCore
 
 protocol AvatarCellViewModel {
     var type: CellModel { get }

+ 1 - 0
deltachat-ios/ViewModel/ContactDetailViewModel.swift

@@ -1,4 +1,5 @@
 import UIKit
+import DcCore
 
 protocol ContactDetailViewModelProtocol {
     var context: DcContext { get }

+ 0 - 7
deltachat-ios/deltachat-ios-Bridging-Header.h

@@ -1,7 +0,0 @@
-//
-//  Use this file to import your target's public headers that you would like to expose to Swift.
-//
-
-#include "deltachat.h"
-#include "wrapper.h"
-	

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác