diff --git a/packages/core/src/protocol.c b/packages/chat/src/protocol.c similarity index 72% rename from packages/core/src/protocol.c rename to packages/chat/src/protocol.c index 696c645cf7..d6c0aa46d3 100644 --- a/packages/core/src/protocol.c +++ b/packages/chat/src/protocol.c @@ -1,8 +1,4 @@ - -struct Message { - char* message; - long date; -} +#include "protocol.h" extern void commandSend(Message m) { diff --git a/packages/chat/src/protocol.h b/packages/chat/src/protocol.h new file mode 100644 index 0000000000..8fc093f825 --- /dev/null +++ b/packages/chat/src/protocol.h @@ -0,0 +1,9 @@ + +struct Message { + char* message; + long date; +} + +void commandSend(Message m); + +Message getMessage(); diff --git a/packages/core/src/protocol.h b/packages/core/src/protocol.h deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/ios/SimpleX Chat.xcodeproj/project.pbxproj b/packages/ios/SimpleX Chat.xcodeproj/project.pbxproj index 9c99a53a19..5676eb78c3 100644 --- a/packages/ios/SimpleX Chat.xcodeproj/project.pbxproj +++ b/packages/ios/SimpleX Chat.xcodeproj/project.pbxproj @@ -14,6 +14,8 @@ 5CBF96BA272D9CAA0021E76D /* SimpleX_ChatTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5CBF96B9272D9CAA0021E76D /* SimpleX_ChatTests.swift */; }; 5CBF96C4272D9CAA0021E76D /* SimpleX_ChatUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5CBF96C3272D9CAA0021E76D /* SimpleX_ChatUITests.swift */; }; 5CBF96C6272D9CAA0021E76D /* SimpleX_ChatUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5CBF96C5272D9CAA0021E76D /* SimpleX_ChatUITestsLaunchTests.swift */; }; + 5CBF96D3272DA0520021E76D /* Messages.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5CBF96D2272DA0520021E76D /* Messages.swift */; }; + 5CBF96D9272DA0CD0021E76D /* protocol.c in Sources */ = {isa = PBXBuildFile; fileRef = 5CBF96D8272DA0CD0021E76D /* protocol.c */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -44,6 +46,9 @@ 5CBF96BF272D9CAA0021E76D /* SimpleX ChatUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SimpleX ChatUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 5CBF96C3272D9CAA0021E76D /* SimpleX_ChatUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SimpleX_ChatUITests.swift; sourceTree = ""; }; 5CBF96C5272D9CAA0021E76D /* SimpleX_ChatUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SimpleX_ChatUITestsLaunchTests.swift; sourceTree = ""; }; + 5CBF96D2272DA0520021E76D /* Messages.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Messages.swift; sourceTree = ""; }; + 5CBF96D7272DA0CD0021E76D /* protocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = protocol.h; sourceTree = ""; }; + 5CBF96D8272DA0CD0021E76D /* protocol.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = protocol.c; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -98,6 +103,8 @@ 5CBF96AA272D9CA60021E76D /* ContentView.swift */, 5CBF96AC272D9CA90021E76D /* Assets.xcassets */, 5CBF96AE272D9CA90021E76D /* Preview Content */, + 5CBF96D2272DA0520021E76D /* Messages.swift */, + 5CBF96D4272DA0CD0021E76D /* chat */, ); path = "SimpleX Chat"; sourceTree = ""; @@ -127,6 +134,32 @@ path = "SimpleX ChatUITests"; sourceTree = ""; }; + 5CBF96D4272DA0CD0021E76D /* chat */ = { + isa = PBXGroup; + children = ( + 5CBF96D5272DA0CD0021E76D /* tests */, + 5CBF96D6272DA0CD0021E76D /* src */, + ); + name = chat; + path = ../../chat; + sourceTree = ""; + }; + 5CBF96D5272DA0CD0021E76D /* tests */ = { + isa = PBXGroup; + children = ( + ); + path = tests; + sourceTree = ""; + }; + 5CBF96D6272DA0CD0021E76D /* src */ = { + isa = PBXGroup; + children = ( + 5CBF96D7272DA0CD0021E76D /* protocol.h */, + 5CBF96D8272DA0CD0021E76D /* protocol.c */, + ); + path = src; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -258,6 +291,8 @@ buildActionMask = 2147483647; files = ( 5CBF96AB272D9CA60021E76D /* ContentView.swift in Sources */, + 5CBF96D9272DA0CD0021E76D /* protocol.c in Sources */, + 5CBF96D3272DA0520021E76D /* Messages.swift in Sources */, 5CBF96A9272D9CA60021E76D /* SimpleX_ChatApp.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/packages/ios/SimpleX Chat.xcodeproj/project.xcworkspace/xcuserdata/evgeny.xcuserdatad/UserInterfaceState.xcuserstate b/packages/ios/SimpleX Chat.xcodeproj/project.xcworkspace/xcuserdata/evgeny.xcuserdatad/UserInterfaceState.xcuserstate index 26b0881735..599c995104 100644 Binary files a/packages/ios/SimpleX Chat.xcodeproj/project.xcworkspace/xcuserdata/evgeny.xcuserdatad/UserInterfaceState.xcuserstate and b/packages/ios/SimpleX Chat.xcodeproj/project.xcworkspace/xcuserdata/evgeny.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/packages/ios/SimpleX Chat/Messages.swift b/packages/ios/SimpleX Chat/Messages.swift new file mode 100644 index 0000000000..2d6595738b --- /dev/null +++ b/packages/ios/SimpleX Chat/Messages.swift @@ -0,0 +1,20 @@ +// +// Messages.swift +// SimpleX Chat +// +// Created by Evgeny on 30/10/2021. +// + +import SwiftUI + +struct Messages: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +struct Messages_Previews: PreviewProvider { + static var previews: some View { + Messages() + } +}