You did not send your web request. You have to use SendWebRequest and yield the result of that method.
yield return www.SetWebRequest();
Also you used the constructor of the UnityWebRequest manually. So you have to setup the whole request yourself. You did not specify the request method (GET / POST / …) and you also did not specify a download handler. In most cases you don’t want to use the constructor manually. Instead use one of the static utility methods which create a request for a certain method. In most cases you just want to use Get. See the example in the documentation.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.IO;
using UnityEngine.Networking;
public class Share : MonoBehaviour
{
public string mFileName = "001.mp3";
public void ClichkShare()
{
StartCoroutine(ShareFileUsingShareSheetCo());
}
private IEnumerator ShareFileUsingShareSheetCo()
{
UnityWebRequest www = new UnityWebRequest(Application.streamingAssetsPath + "/" + mFileName);
yield return www;
string filePath = Path.Combine(Application.temporaryCachePath, mFileName);
File.WriteAllBytes(filePath, www.bytes);
new NativeShare().AddFile(filePath).Share();
}
}