Skip to content

Commit 57a9896

Browse files
committed
feat: compiling for ios ok but crash
1 parent c5543c1 commit 57a9896

19 files changed

+199
-19
lines changed

.DS_Store

2 KB
Binary file not shown.

Assets/.DS_Store

2 KB
Binary file not shown.

Assets/Dojo/.DS_Store

0 Bytes
Binary file not shown.
-1.14 KB
Binary file not shown.

Assets/Dojo/Plugins/Linux/libdojo_c.so.meta

Lines changed: 57 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:b3a0bf9852c12b00f5da6355e1fb4ea184023cc2a034a985cab0801e580f5a1f
3-
size 56730668
2+
oid sha256:8501fc0cdb24c3880507b398c80132e8cd239509c4e0bf16e4c8633ce24b275e
3+
size 56730745

Assets/Dojo/Plugins/Windows/libdojo_c.dll.meta

Lines changed: 57 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Dojo/Plugins/iOS/libdojo_c.a

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:ea302729331d5f3c3980d97afe2bedba738e7c071b03e51b547c1a19e7237b00
3-
size 287884432
2+
oid sha256:c3125a60ca599a0a2d243a34540641471f77c928a14f5e060b52edda81b899df
3+
size 275601768

Assets/Dojo/Plugins/iOS/libdojo_c.a.meta

Lines changed: 62 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
528 Bytes
Binary file not shown.

Assets/Dojo/Plugins/iOS/libdojo_c.dylib.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
15.8 KB
Binary file not shown.

Assets/Dojo/Runtime/Starknet/StarknetInterop.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if UNITY_WEBGL && !UNITY_EDITOR
12
using System;
23
using System.Diagnostics;
34
using System.Linq;
@@ -116,4 +117,5 @@ public static Task<bool> WaitForTransactionAsync(IntPtr provider, FieldElement t
116117
[DllImport("__Internal")]
117118
public static extern bool Verify(CString publicKey, CString hash, CString r, CString s);
118119
}
119-
}
120+
}
121+
#endif

Assets/Dojo/Runtime/Torii/ToriiClient.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
using System;
2-
using System.Collections;
32
using System.Collections.Generic;
43
using bottlenoselabs.C2CS.Runtime;
5-
using UnityEngine;
64
using dojo_bindings;
7-
using JetBrains.Annotations;
85
using Dojo.Starknet;
9-
using UnityEditor.AppleTV;
106
namespace Dojo.Torii
117
{
128
public unsafe class ToriiClient

Assets/Dojo/Runtime/Torii/ToriiWasmClient.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if UNITY_WEBGL && !UNITY_EDITOR
12
using System;
23
using System.Collections.Generic;
34
using System.Linq;
@@ -35,4 +36,5 @@ public async Task<List<Entity>> Entities(int limit, int offset)
3536
return entities;
3637
}
3738
}
38-
}
39+
}
40+
#endif

Assets/Dojo/Runtime/Torii/ToriiWasmInterop.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@
1414
namespace Dojo.Torii
1515
{
1616
[System.Serializable]
17-
public struct WasmValue {
17+
public struct WasmValue
18+
{
1819
public string type;
1920
public JToken value;
2021
}
2122

23+
#if UNITY_WEBGL && !UNITY_EDITOR
2224
public class ToriiWasmInterop : MonoBehaviour
2325
{
2426
// Creates a new client and returns the pointer to it
@@ -136,4 +138,5 @@ public static void OnEntityUpdated(IntPtr clientPtr, FieldElement[] ids)
136138
[DllImport("__Internal")]
137139
public static extern void OnSyncModelChange(IntPtr clientPtr, string model, string callbackObjectName, string callbackMethodName);
138140
}
141+
#endif
139142
}

Assets/Dojo/Runtime/WorldManager.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ public class WorldManager : MonoBehaviour
1717
public string worldAddress;
1818
public SynchronizationMaster synchronizationMaster;
1919
public ToriiClient toriiClient;
20+
#if UNITY_WEBGL && !UNITY_EDITOR
2021
public ToriiWasmClient wasmClient;
22+
#endif
2123

2224
async void Awake()
2325
{

Assets/Dojo/Runtime/bindings/client/dojo.gen.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ namespace dojo_bindings
2525

2626
public static unsafe partial class dojo
2727
{
28+
#if UNITY_IPHONE && !UNITY_EDITOR
29+
private const string LibraryName = "__Internal";
30+
#else
2831
private const string LibraryName = "dojo_c";
32+
#endif
2933

3034
#region API
3135

Scripts/libgen.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,5 @@ lipo -create -output "../../Assets/Dojo/Plugins/macOS/libdojo_c.bundle" \
4848

4949
# iOS
5050
mkdir -p "../../Assets/Dojo/Plugins/iOS"
51-
cp -f "target/aarch64-apple-ios/$build/libdojo_c.a" "../../Assets/Dojo/Plugins/iOS/libdojo_c.a"
51+
cp -f "target/aarch64-apple-ios/$build/libdojo_c.dylib" "../../Assets/Dojo/Plugins/iOS/libdojo_c.dylib"
52+
cp -f "target/aarch64-apple-ios/$build/libdojo_c.dylib" "../../Assets/Dojo/Plugins/iOS/libdojo_c.a"

0 commit comments

Comments
 (0)