npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-template-app-basic

v1.0.0

Published

- Instalação e configuração de algumas dependências para estudos sobre realm.io, react-navigation, react-native-vector-icons, socket.io, styled-components e notificações. Eh necessário configurar as Notificações e Push Notificações conforme abaixo

Downloads

3

Readme

Pacote Basico Para Estudos de React Native.

  • Instalação e configuração de algumas dependências para estudos sobre realm.io, react-navigation, react-native-vector-icons, socket.io, styled-components e notificações. Eh necessário configurar as Notificações e Push Notificações conforme abaixo

Configurando as Notificações No Ambiente Android.

  • React Native Push Notifications title

    • Altere o arquivo AndroidManifest.xml abaixo das tags uses-permission
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <permission 
        android:name="${applicationId}.permission.C2D_MESSAGE"
        android:protectionLevel="signature" />
    <uses-permission android:name="${applicationId}.permission.C2D_MESSAGE" />
    
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
      
    • Altere o arquivo AndroidManifest.xml ao final da tag application
    <meta-data  android:name="com.dieam.reactnativepushnotification.notification_channel_name"
               android:value="YOUR NOTIFICATION CHANNEL NAME"/>
       <meta-data  android:name="com.dieam.reactnativepushnotification.notification_channel_description"
                   android:value="YOUR NOTIFICATION CHANNEL DESCRIPTION"/>
       <!-- Change the resource name to your App's accent color - or any other color you want -->
       <meta-data  android:name="com.dieam.reactnativepushnotification.notification_color"
                   android:resource="@android:color/white"/>
    
       <!-- < Only if you're using GCM or localNotificationSchedule() > -->
       <receiver
           android:name="com.google.android.gms.gcm.GcmReceiver"
           android:exported="true"
           android:permission="com.google.android.c2dm.permission.SEND" >
           <intent-filter>
               <action android:name="com.google.android.c2dm.intent.RECEIVE" />
               <category android:name="${applicationId}" />
           </intent-filter>
       </receiver>
       <!-- < Only if you're using GCM or localNotificationSchedule() > -->
    
       <receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationPublisher" />
       <receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationBootEventReceiver">
           <intent-filter>
               <action android:name="android.intent.action.BOOT_COMPLETED" />
           </intent-filter>
       </receiver>
       <service android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationRegistrationService"/>
    
       <!-- < Only if you're using GCM or localNotificationSchedule() > -->
       <service
           android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerServiceGcm"
           android:exported="false" >
           <intent-filter>
               <action android:name="com.google.android.c2dm.intent.RECEIVE" />
           </intent-filter>
       </service>
       <!-- </ Only if you're using GCM or localNotificationSchedule() > -->
    
       <!-- < Else > -->
       <service
           android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerService"
           android:exported="false" >
           <intent-filter>
               <action android:name="com.google.firebase.MESSAGING_EVENT" />
           </intent-filter>
       </service>

    ** Crie um arquivo em /android/android/app/src/main/res/values/colors.xml

    <resources>
       <color name="white">#FFF</color>
    </resources>

    ** Adicone a Importação abaixo em MainApplication.java

    import com.dieam.reactnativepushnotification.ReactNativePushNotificationPackage; 

Configurando as Notificações No Ambiente IOS.

  • @react-native-community/push-notification-ios
    • Altere o arquivo AppDelegate.m conforme abaixo

      - No topo

      #import <RNCPushNotificationIOS.h>

      - Ao Final

      // Required to register for notifications
      - (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings
      {
        [RNCPushNotificationIOS didRegisterUserNotificationSettings:notificationSettings];
      }
      // Required for the register event.
      - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
      {
        [RNCPushNotificationIOS didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
      }
      // Required for the notification event. You must call the completion handler after handling the remote notification.
      - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
      fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
      {
        [RNCPushNotificationIOS didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
      }
      // Required for the registrationError event.
      - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
      {
        [RNCPushNotificationIOS didFailToRegisterForRemoteNotificationsWithError:error];
      }
      // Required for the localNotification event.
      - (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
      {
        [RNCPushNotificationIOS didReceiveLocalNotification:notification];
      }

Configurando as Notificações somente no Ambiente IOS.

  • React Native Notifications

    • Altere o arquivo AppDelegate.m conforme abaixo

      - No topo

      #import "RNNotifications.h"

      - Localize o metodo e adicona as linhas conforme abaxio

      - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
      [RNNotifications startMonitorNotifications]; // -> Add this line
      
      return YES;
      }

      - Localize o metodo e adicona as linhas conforme abaxio

      - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
      [RNNotifications didRegisterForRemoteNotificationsWithDeviceToken:deviceToken]; // -> Add this line
      [RNCPushNotificationIOS didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
      }

      - Localize o metodo e adicona as linhas conforme abaxio

      - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error {
      [RNNotifications didFailToRegisterForRemoteNotificationsWithError:error]; // -> Add this line
      [RNCPushNotificationIOS didFailToRegisterForRemoteNotificationsWithError:error];
      }