Natural Pleistocene Monsters

    @tuofeng/react-native-change-app-icon

    0.1.1 • Public • Published

    react-native-tuofeng-changeAppIcon

    Dynamic change App Icon for iOS and Android

    Installation

    yarn add git+ssh://git@git.dev.tuofeng.cn:10022/zuojianjun/react-native-tuofeng-changeAppIcon.git

    Link

    react-native link react-native-tuofeng-changeAppIcon
    

    AndroidManifest.xml

    <application>
      <activity-alias
            android:name=".MainActivity1"
            android:enabled="false"
            android:icon="@mipmap/icon_1"
            android:label="@string/app_name"
            android:targetActivity=".MainActivity">
            <intent-filter>
              <action android:name="android.intent.action.MAIN"/>
    
              <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
      </activity-alias>
    
    </application>
    

    Usage

    ES6

    The module uses ES6 style export statement, simply use import to load the module.

    import changeAppIcon from 'react-native-tuofeng-changeAppIcon'

    ES5

    If you're using ES5 require statement to load the module, please add default. See here for more detail.

    var changeAppIcon = require('react-native-tuofeng-changeAppIcon').default
    

    example:

    // iconName: the AppIcon name of change  
    // alert: show an alert after change
    changeAppIcon({ iconName: 'icon name', alert: false }, (callback) => {
      console.log(callback)
    })
    

    Changelog

    0.0.3

    • changeAppIcon操作与其他操作的冲突
      在iOS系统中changeAppIcon操作成功后会默认弹出一个修改成功的提示,react-native-tuofeng-changeAppIcon组件将默认弹出修改成默认不弹出,然后由传入参数进行控制; 但是修改成不弹出后与其他操作冲突,其他操作的alert也不会弹出了;

    0.0.1

    • the first version

    Install

    npm i @tuofeng/react-native-change-app-icon

    DownloadsWeekly Downloads

    16

    Version

    0.1.1

    License

    none

    Unpacked Size

    22.9 kB

    Total Files

    15

    Last publish

    Collaborators

    • iwater