【发布时间】:2020-03-31 01:59:19
【问题描述】:
我看到了一些其他问题,上面写着platforms/ios/res/raw/
但在我的 Ionic 4 应用程序中,我没有文件夹 res/raw/
【问题讨论】:
标签: android ios ionic-framework ionic4
我看到了一些其他问题,上面写着platforms/ios/res/raw/
但在我的 Ionic 4 应用程序中,我没有文件夹 res/raw/
【问题讨论】:
标签: android ios ionic-framework ionic4
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>
这里请注意,在资源文件夹中,您创建一个名为 music 的文件夹,并在其中添加 mp3 通知声音,并将包含在我提到的资源文件中。
对于 android 也是如此,您将在 android 中广告资源文件,但您将指定通知将在 android 中放置通知的位置。
【讨论】: