Why can't I send out OSC messages from my iOS app?
Hi there!
I've have created an iOS app with unity. my goal is to send data from my iPhone to my laptop over OSC. at the moment I'm using extOSC. It all works fine in the unity editor but when I try to send values from my iPhone to my laptop over OSC it doesn't work.
.
Does anyone has experience with sending out data from the iPhone to the laptop?
.
this is the code that I use in unity:
/* Copyright (c) 2019 ExT (V.Sigalkin) */
using UnityEngine;
namespace extOSC.Examples
{
public class sendOSC : MonoBehaviour
{
private OSCTransmitter _transmitter;
private const string _oscAddress = "/example/7/"; // Also, you cam use mask in address: /example/*/
#region Unity Methods
protected virtual void Start()
{
// Creating a transmitter.
_transmitter = gameObject.AddComponent<OSCTransmitter>();
// Set remote host address.
_transmitter.RemoteHost = "192.168.178.24";
// Set remote port;
_transmitter.RemotePort = 7000;
}
protected virtual void Update()
{
if (_transmitter == null) return;
// Create message
var message = new OSCMessage(_oscAddress);
message.AddValue(OSCValue.String("Hello, world!"));
message.AddValue(OSCValue.Float(Random.Range(0f, 1f)));
ARDebugManager.Instance.LogInfo($"ip= {_transmitter.RemoteHost}");
ARDebugManager.Instance.LogInfo($"port= {_transmitter.RemotePort}");
ARDebugManager.Instance.LogInfo($"message= {message}");
// Send message
_transmitter.Send(message);
ARDebugManager.Instance.LogInfo($"message sent!!");
print("sent!!");
}
#endregion
}
}
.
this is the error that Xcode gives me: .
screenshot-2020-12-09-at-162352.png
(86.0 kB)
screenshot-2020-12-09-at-161950.png
(90.8 kB)
Comment