Skip to content

Commit

Permalink
kmm: ios: rust lib works
Browse files Browse the repository at this point in the history
  • Loading branch information
LLIo6oH committed Feb 12, 2024
1 parent b55a1e7 commit 29d4790
Show file tree
Hide file tree
Showing 5 changed files with 144 additions and 141 deletions.
32 changes: 16 additions & 16 deletions MetaSecret.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
BFF1C9C720925ABB4F14697D /* Pods_MetaSecret.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 045A0CD96388A8B380C24279 /* Pods_MetaSecret.framework */; };
E5061CE728CD116700E2787B /* Colors.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E5061CE628CD116700E2787B /* Colors.xcassets */; };
E5061CEB28CD197400E2787B /* BottomInfoSheetViewScene.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5061CE928CD197400E2787B /* BottomInfoSheetViewScene.swift */; };
E5061CEC28CD197400E2787B /* BottomInfoSheetViewScene.xib in Resources */ = {isa = PBXBuildFile; fileRef = E5061CEA28CD197400E2787B /* BottomInfoSheetViewScene.xib */; };
Expand Down Expand Up @@ -109,7 +110,6 @@
E5F0C41028A9958100902310 /* UD.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5F0C40F28A9958100902310 /* UD.swift */; };
E5FF621D28B5957F00A794F3 /* ClusterDeviceCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5FF621B28B5957F00A794F3 /* ClusterDeviceCell.swift */; };
E5FF621E28B5957F00A794F3 /* ClusterDeviceCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E5FF621C28B5957F00A794F3 /* ClusterDeviceCell.xib */; };
EC75F75ACB3C41DDC986EF8F /* Pods_MetaSecret.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D8DC036E2AEF96AF9402A29 /* Pods_MetaSecret.framework */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -123,8 +123,9 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
2D8DC036E2AEF96AF9402A29 /* Pods_MetaSecret.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MetaSecret.framework; sourceTree = BUILT_PRODUCTS_DIR; };
661A42FDDF38EBE81840D342 /* Pods-MetaSecret.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MetaSecret.debug.xcconfig"; path = "Target Support Files/Pods-MetaSecret/Pods-MetaSecret.debug.xcconfig"; sourceTree = "<group>"; };
045A0CD96388A8B380C24279 /* Pods_MetaSecret.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MetaSecret.framework; sourceTree = BUILT_PRODUCTS_DIR; };
A5F37D81BE3204E7D711EFAE /* Pods-MetaSecret.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MetaSecret.release.xcconfig"; path = "Target Support Files/Pods-MetaSecret/Pods-MetaSecret.release.xcconfig"; sourceTree = "<group>"; };
C7DD87440BC36558E68DD57C /* Pods-MetaSecret.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MetaSecret.debug.xcconfig"; path = "Target Support Files/Pods-MetaSecret/Pods-MetaSecret.debug.xcconfig"; sourceTree = "<group>"; };
E5061CE628CD116700E2787B /* Colors.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Colors.xcassets; sourceTree = "<group>"; };
E5061CE928CD197400E2787B /* BottomInfoSheetViewScene.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BottomInfoSheetViewScene.swift; sourceTree = "<group>"; };
E5061CEA28CD197400E2787B /* BottomInfoSheetViewScene.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BottomInfoSheetViewScene.xib; sourceTree = "<group>"; };
Expand Down Expand Up @@ -231,7 +232,6 @@
E5F0C40F28A9958100902310 /* UD.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UD.swift; sourceTree = "<group>"; };
E5FF621B28B5957F00A794F3 /* ClusterDeviceCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClusterDeviceCell.swift; sourceTree = "<group>"; };
E5FF621C28B5957F00A794F3 /* ClusterDeviceCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ClusterDeviceCell.xib; sourceTree = "<group>"; };
F718EE19A5066D4F057922FB /* Pods-MetaSecret.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MetaSecret.release.xcconfig"; path = "Target Support Files/Pods-MetaSecret/Pods-MetaSecret.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -246,26 +246,26 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
EC75F75ACB3C41DDC986EF8F /* Pods_MetaSecret.framework in Frameworks */,
BFF1C9C720925ABB4F14697D /* Pods_MetaSecret.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
454DE68BBC6E3D4ECE2D3D4F /* Frameworks */ = {
2C5F5D9AD517805C6A4432EB /* Frameworks */ = {
isa = PBXGroup;
children = (
2D8DC036E2AEF96AF9402A29 /* Pods_MetaSecret.framework */,
045A0CD96388A8B380C24279 /* Pods_MetaSecret.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
CD6B3CFB716953A3749C61D0 /* Pods */ = {
isa = PBXGroup;
children = (
661A42FDDF38EBE81840D342 /* Pods-MetaSecret.debug.xcconfig */,
F718EE19A5066D4F057922FB /* Pods-MetaSecret.release.xcconfig */,
C7DD87440BC36558E68DD57C /* Pods-MetaSecret.debug.xcconfig */,
A5F37D81BE3204E7D711EFAE /* Pods-MetaSecret.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
Expand Down Expand Up @@ -463,7 +463,7 @@
E558ED9528F5FD9F0018F045 /* MetaSecretTests */,
E5800027288CA4D000E1135C /* Products */,
CD6B3CFB716953A3749C61D0 /* Pods */,
454DE68BBC6E3D4ECE2D3D4F /* Frameworks */,
2C5F5D9AD517805C6A4432EB /* Frameworks */,
);
sourceTree = "<group>";
};
Expand Down Expand Up @@ -614,11 +614,11 @@
isa = PBXNativeTarget;
buildConfigurationList = E5800050288CA4D300E1135C /* Build configuration list for PBXNativeTarget "MetaSecret" */;
buildPhases = (
A96E69A33516B06EBB45536B /* [CP] Check Pods Manifest.lock */,
A0B410CE705DEEE1F1806EFD /* [CP] Check Pods Manifest.lock */,
E5800022288CA4D000E1135C /* Sources */,
E5800023288CA4D000E1135C /* Frameworks */,
E5800024288CA4D000E1135C /* Resources */,
90C3FCBFDC2585EC3BCA9EDB /* [CP] Embed Pods Frameworks */,
1891DD4E88F094A01D5ECD07 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -704,7 +704,7 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
90C3FCBFDC2585EC3BCA9EDB /* [CP] Embed Pods Frameworks */ = {
1891DD4E88F094A01D5ECD07 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
Expand All @@ -721,7 +721,7 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-MetaSecret/Pods-MetaSecret-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
A96E69A33516B06EBB45536B /* [CP] Check Pods Manifest.lock */ = {
A0B410CE705DEEE1F1806EFD /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
Expand Down Expand Up @@ -1066,7 +1066,7 @@
};
E5800051288CA4D300E1135C /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 661A42FDDF38EBE81840D342 /* Pods-MetaSecret.debug.xcconfig */;
baseConfigurationReference = C7DD87440BC36558E68DD57C /* Pods-MetaSecret.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
Expand Down Expand Up @@ -1107,7 +1107,7 @@
};
E5800052288CA4D300E1135C /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = F718EE19A5066D4F057922FB /* Pods-MetaSecret.release.xcconfig */;
baseConfigurationReference = A5F37D81BE3204E7D711EFAE /* Pods-MetaSecret.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
Expand Down

This file was deleted.

4 changes: 2 additions & 2 deletions MetaSecret/Utils/MetaSecretCoreWrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ final class RustTransporterManager: NSObject, RustProtocol {

func generate(for name: String) -> UserSecurityBox? {
let jsonData = jsonSerializeManager.jsonU8Generation(string: name)
guard let libResult = generate_signed_user(jsonData, jsonData.count) else { return nil}
let count = jsonData.count
guard let libResult = generate_signed_user(jsonData, count) else { return nil}
let jsonString = String(cString: libResult)
rust_string_free(libResult)

let userBox: UserSecurityBox? = try? jsonSerializeManager.objectGeneration(from: jsonString)
return userBox
}
Expand Down
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'
platform :ios, '14.0'

# ignore all warnings from all pods
inhibit_all_warnings!
Expand Down
Loading

0 comments on commit 29d4790

Please sign in to comment.