mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 05:13:58 +00:00
[ios] Allowed to use C++ editor methods directly from Swift
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
This commit is contained in:
committed by
Konstantin Pastbin
parent
13ba20aa25
commit
ef9618b3d6
6
editor/module.modulemap
Normal file
6
editor/module.modulemap
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
module OSMEditor {
|
||||||
|
header "osm_auth.hpp"
|
||||||
|
header "osm_editor.hpp"
|
||||||
|
header "server_api.hpp"
|
||||||
|
requires cplusplus
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
#import "MWMAlertViewController.h"
|
#import "MWMAlertViewController.h"
|
||||||
#import "MWMOsmAuthAlert.h"
|
#import "MWMOsmAuthAlert.h"
|
||||||
|
|
||||||
|
#include <string>
|
||||||
#include "editor/osm_auth.hpp"
|
#include "editor/osm_auth.hpp"
|
||||||
|
|
||||||
static NSString * const kMap2OsmLoginSegue = @"Map2OsmLogin";
|
static NSString * const kMap2OsmLoginSegue = @"Map2OsmLogin";
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#include <string>
|
||||||
#include "editor/osm_auth.hpp"
|
#include "editor/osm_auth.hpp"
|
||||||
|
|
||||||
namespace osm_auth_ios
|
namespace osm_auth_ios
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
#import <CoreApi/AppInfo.h>
|
#import <CoreApi/AppInfo.h>
|
||||||
#import "MWMAuthorizationCommon.h"
|
#import "MWMAuthorizationCommon.h"
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <map>
|
||||||
#include "editor/osm_editor.hpp"
|
#include "editor/osm_editor.hpp"
|
||||||
|
|
||||||
@implementation MWMEditorHelper
|
@implementation MWMEditorHelper
|
||||||
|
|||||||
@@ -5235,6 +5235,8 @@
|
|||||||
OTHER_SWIFT_FLAGS = "$(inherited)";
|
OTHER_SWIFT_FLAGS = "$(inherited)";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = app.comaps.debug;
|
PRODUCT_BUNDLE_IDENTIFIER = app.comaps.debug;
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
|
SWIFT_INCLUDE_PATHS = "$(OMIM_ROOT)/editor";
|
||||||
|
SWIFT_OBJC_INTEROP_MODE = objcxx;
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
@@ -5268,6 +5270,8 @@
|
|||||||
OTHER_SWIFT_FLAGS = "$(inherited)";
|
OTHER_SWIFT_FLAGS = "$(inherited)";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = app.comaps;
|
PRODUCT_BUNDLE_IDENTIFIER = app.comaps;
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
|
SWIFT_INCLUDE_PATHS = "$(OMIM_ROOT)/editor";
|
||||||
|
SWIFT_OBJC_INTEROP_MODE = objcxx;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
@@ -5391,12 +5395,13 @@
|
|||||||
"$(OTHER_CFLAGS)",
|
"$(OTHER_CFLAGS)",
|
||||||
"-fcxx-modules",
|
"-fcxx-modules",
|
||||||
);
|
);
|
||||||
OTHER_SWIFT_FLAGS = "$(inherited)";
|
OTHER_SWIFT_FLAGS = "$(inherited) -cxx-interoperability-mode=default";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_IDENTIFIER}";
|
PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_IDENTIFIER}";
|
||||||
PRODUCT_NAME = "CoMaps (Debug)";
|
PRODUCT_NAME = "CoMaps (Debug)";
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SKIP_INSTALL = NO;
|
SKIP_INSTALL = NO;
|
||||||
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
|
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
|
||||||
|
SWIFT_INCLUDE_PATHS = "$(OMIM_ROOT)/editor";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Bridging-Header.h";
|
||||||
SWIFT_OBJC_INTERFACE_HEADER_NAME = SwiftBridge.h;
|
SWIFT_OBJC_INTERFACE_HEADER_NAME = SwiftBridge.h;
|
||||||
SWIFT_PRECOMPILE_BRIDGING_HEADER = NO;
|
SWIFT_PRECOMPILE_BRIDGING_HEADER = NO;
|
||||||
@@ -5431,12 +5436,13 @@
|
|||||||
"$(OTHER_CFLAGS)",
|
"$(OTHER_CFLAGS)",
|
||||||
"-fcxx-modules",
|
"-fcxx-modules",
|
||||||
);
|
);
|
||||||
OTHER_SWIFT_FLAGS = "$(inherited)";
|
OTHER_SWIFT_FLAGS = "$(inherited) -cxx-interoperability-mode=default";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_IDENTIFIER}";
|
PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_IDENTIFIER}";
|
||||||
PRODUCT_NAME = CoMaps;
|
PRODUCT_NAME = CoMaps;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SKIP_INSTALL = NO;
|
SKIP_INSTALL = NO;
|
||||||
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
|
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
|
||||||
|
SWIFT_INCLUDE_PATHS = "$(OMIM_ROOT)/editor";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Bridging-Header.h";
|
||||||
SWIFT_OBJC_INTERFACE_HEADER_NAME = SwiftBridge.h;
|
SWIFT_OBJC_INTERFACE_HEADER_NAME = SwiftBridge.h;
|
||||||
SWIFT_PRECOMPILE_BRIDGING_HEADER = NO;
|
SWIFT_PRECOMPILE_BRIDGING_HEADER = NO;
|
||||||
|
|||||||
@@ -74,6 +74,7 @@
|
|||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
|
270C9C212E16AABF00ABA688 /* module.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; name = module.modulemap; path = ../../editor/module.modulemap; sourceTree = SOURCE_ROOT; };
|
||||||
340C20DC1C3E4DFD00111D22 /* osm_auth.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = osm_auth.cpp; sourceTree = "<group>"; };
|
340C20DC1C3E4DFD00111D22 /* osm_auth.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = osm_auth.cpp; sourceTree = "<group>"; };
|
||||||
340C20DD1C3E4DFD00111D22 /* osm_auth.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = osm_auth.hpp; sourceTree = "<group>"; };
|
340C20DD1C3E4DFD00111D22 /* osm_auth.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = osm_auth.hpp; sourceTree = "<group>"; };
|
||||||
340DC8271C4E71E500EAA2CC /* changeset_wrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = changeset_wrapper.cpp; sourceTree = "<group>"; };
|
340DC8271C4E71E500EAA2CC /* changeset_wrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = changeset_wrapper.cpp; sourceTree = "<group>"; };
|
||||||
@@ -196,6 +197,7 @@
|
|||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
3496AC041DC204B700C5DDBA /* editor.config */,
|
3496AC041DC204B700C5DDBA /* editor.config */,
|
||||||
|
270C9C212E16AABF00ABA688 /* module.modulemap */,
|
||||||
34F5586E1DBF49B200A4FC11 /* common-debug.xcconfig */,
|
34F5586E1DBF49B200A4FC11 /* common-debug.xcconfig */,
|
||||||
34F5586F1DBF49B200A4FC11 /* common-release.xcconfig */,
|
34F5586F1DBF49B200A4FC11 /* common-release.xcconfig */,
|
||||||
341138731C15AE02002E3B3E /* editor */,
|
341138731C15AE02002E3B3E /* editor */,
|
||||||
@@ -546,12 +548,12 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
CODE_SIGN_IDENTITY = "-";
|
CODE_SIGN_IDENTITY = "-";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = app.comaps.editor_tests;
|
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
||||||
HEADER_SEARCH_PATHS = (
|
HEADER_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(OMIM_ROOT)/3party/pugixml/pugixml/src",
|
"$(OMIM_ROOT)/3party/pugixml/pugixml/src",
|
||||||
);
|
);
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = app.comaps.editor_tests;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
@@ -559,12 +561,12 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
CODE_SIGN_IDENTITY = "-";
|
CODE_SIGN_IDENTITY = "-";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = app.comaps.editor_tests;
|
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
||||||
HEADER_SEARCH_PATHS = (
|
HEADER_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(OMIM_ROOT)/3party/pugixml/pugixml/src",
|
"$(OMIM_ROOT)/3party/pugixml/pugixml/src",
|
||||||
);
|
);
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = app.comaps.editor_tests;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user