Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running shoutem configure more than once breaks the app #19

Open
seblau opened this issue Aug 7, 2017 · 0 comments
Open

Running shoutem configure more than once breaks the app #19

seblau opened this issue Aug 7, 2017 · 0 comments
Labels

Comments

@seblau
Copy link

seblau commented Aug 7, 2017

Running shoutem configure more than once for the same app, breaks the app. It seems that for a few files, changes are appended and not replaced when running shoutem configure.
Below I posted all the duplicates (git diff between the first shoutem configure and the second shoutem configure)

android/app/src/main/AndroidManifest.xml

--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -5,9 +5,15 @@
         <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
     <uses-permission android:name="android.permission.VIBRATE" />
 <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
+    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
+        <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
+    <uses-permission android:name="android.permission.VIBRATE" />
+<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
     <uses-permission android:name="android.permission.INTERNET" />
 <uses-permission android:name="android.permission.BLUETOOTH"/>
 
+<uses-permission android:name="android.permission.BLUETOOTH"/>
+
     <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
 
     <application tools:replace="android:label"
@@ -37,6 +43,27 @@
           <category android:name="android.intent.category.DEFAULT" />
       </intent-filter>
   </receiver>
+
+  <service android:name="com.evollu.react.fcm.MessagingService">
+      <intent-filter>
+          <action android:name="com.google.firebase.MESSAGING_EVENT"/>
+      </intent-filter>
+  </service>
+
+  <service android:name="com.evollu.react.fcm.InstanceIdService" android:exported="false">
+      <intent-filter>
+          <action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
+      </intent-filter>
+  </service>
+  <receiver android:name="com.evollu.react.fcm.FIRLocalMessagingPublisher"/>
+  <receiver android:enabled="true" android:exported="true"  android:name="com.evollu.react.fcm.FIRSystemBootEventReceiver">
+      <intent-filter>
+          <action android:name="android.intent.action.BOOT_COMPLETED"/>
+          <action android:name="android.intent.action.QUICKBOOT_POWERON"/>
+          <action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/>
+          <category android:name="android.intent.category.DEFAULT" />
+      </intent-filter>
+  </receiver>
 <activity
         android:name=".MainActivity"
         android:label="${appName}"

ios/ShoutemApp/Info.plist

--- a/ios/ShoutemApp/Info.plist
+++ b/ios/ShoutemApp/Info.plist
@@ -38,6 +38,18 @@
           <string>fb103490536871601</string>
         </array>
       </dict>
+      <dict>
+        <key>CFBundleURLSchemes</key>
+        <array>
+          <string>fb103490536871601</string>
+        </array>
+      </dict>
+      <dict>
+        <key>CFBundleURLSchemes</key>
+        <array>
+          <string>fb103490536871601</string>
+        </array>
+      </dict>
     </array>
     <key>CFBundleVersion</key>
     <string>1</string>

android/settings.gradle

--- a/android/settings.gradle
+++ b/android/settings.gradle
@@ -1,6 +1,8 @@
 rootProject.name = 'ShoutemApp'
 include ':react-native-fcm'
 project(':react-native-fcm').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fcm/android')
+include ':react-native-fcm'
+project(':react-native-fcm').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fcm/android')
 include ':react-native-device-info'
 project(':react-native-device-info').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-device-info/android')
 include ':react-native-camera'

android/app/src/main/java/com/shoutemapp/MainApplication.java

--- a/android/app/src/main/java/com/shoutemapp/MainApplication.java
+++ b/android/app/src/main/java/com/shoutemapp/MainApplication.java
@@ -4,6 +4,7 @@ import android.support.multidex.MultiDexApplication;
 
 import com.facebook.react.ReactApplication;
 import com.evollu.react.fcm.FIRMessagingPackage;
+import com.evollu.react.fcm.FIRMessagingPackage;
 import com.learnium.RNDeviceInfo.RNDeviceInfo;
 import com.lwansbrough.RCTCamera.RCTCameraPackage;
 import com.brentvatne.react.ReactVideoPackage;
@@ -49,6 +50,7 @@ public class MainApplication extends MultiDexApplication implements ReactApplica
       return Arrays.<ReactPackage>asList(
           new MainReactPackage(),
             new FIRMessagingPackage(),
+            new FIRMessagingPackage(),
             new RNDeviceInfo(),
             new RCTCameraPackage(),
             new ReactVideoPackage(),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants