我看到了一些其他问题,它说平台/ios/res/raw/
但在我的Ionic 4应用程序中,我没有res/raw/文件夹
platforms/ios/res/raw/不在您的ionic应用程序中,它在构建后位于ios目录中,因此在您的config.xml中:
<platform name="ios">
<resource-file src="resources/music/mp3 file name.mp3" target="res/raw/mp3 file name.mp3" />
</platform>
请注意,在resources文件夹中,您创建了一个名为music的文件夹,并在其中添加mp3 notification声音,它将包含在我提到的资源文件中。
同样,对于android,你会在android内发布资源文件,但你会指定通知将放在android内的位置。