ios - 如何在 IOS(React Native)中进行两个类似 android 的活动?
问题描述
我想制作一个应用程序,该应用程序将在 IOS(React Native)中具有两个具有不同应用程序启动图标的活动。
我在 Android 上做了这个。代码如下。
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".NotifierActivity"
android:label="SOS"
android:icon="@mipmap/ic_launcher_sos"
android:roundIcon="@mipmap/ic_launcher_sos_round"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
我是初学者。所以,我非常需要你的帮助。
解决方案
mainfest 的一个示例,如果您正在寻求更多帮助,请告诉我。您需要在 app/AndroidManifest.xml 中添加它
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xxx">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:allowBackup="false"
android:theme="@style/AppTheme"
android:hardwareAccelerated="true"
android:largeHeap="true"
android:usesCleartextTraffic="true"
>
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".NotifierActivity"
android:label="SOS"
android:icon="@mipmap/ic_launcher_sos"
android:roundIcon="@mipmap/ic_launcher_sos_round"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
推荐阅读
- c - 将副本释放到分配的内存(通过 getline() 函数)
- flutter - For 循环添加数字并在 Flutter 中的 Text Widget 内获取平均值
- java - 过滤第三个字符后的项目列表
- python - QDialog中的中心确定按钮
- vim - 如何在 vim 的终端模拟器中打开文件
- python - 信号处理程序中的 exit(1) 只是被捕获为 SystemExit,因为它没有任何内容
- python - 如何在 tkinter 上使用填充圆角按钮
- excel - ADO 连接到打开的 Excel 工作簿
- html - 在Vue中输入文本字段时光标跳出
- tableau-api - 使用 REST API 将 PLM 工具连接到 Tableau