[tests] Fix some configuration issues

This commit is contained in:
Chris Bianca 2018-03-22 14:55:02 +00:00
parent 53babb4cd9
commit 2891027f25
10 changed files with 156 additions and 25 deletions

View File

@ -168,9 +168,9 @@ public class RNFirebaseInvites extends ReactContextBaseJavaModule implements Act
String[] ids = AppInviteInvitation.getInvitationIds(resultCode, data);
mPromise.resolve(Arguments.fromList(Arrays.asList(ids)));
} else if (resultCode == Activity.RESULT_CANCELED) {
mPromise.reject("invites/invitation-cancelled", " The invitation was cancelled");
mPromise.reject("invites/invitation-cancelled", "Invitation cancelled");
} else {
mPromise.reject("invites/invitation-error", " The invitation failed to send");
mPromise.reject("invites/invitation-error", "Invitation failed to send");
}
// Clear the promise
mPromise = null;

2
lib/index.d.ts vendored
View File

@ -971,7 +971,7 @@ declare module "react-native-firebase" {
* @param senderId
* @param payload
*/
send(senderId: string, payload: RemoteMessage): any
sendMessage(senderId: string, payload: RemoteMessage): any
NOTIFICATION_TYPE: Object
REMOTE_NOTIFICATION_RESULT: Object

View File

@ -132,7 +132,7 @@ export default class Messaging extends ModuleBase {
`Messaging:sendMessage expects a 'RemoteMessage' but got type ${typeof remoteMessage}`
);
}
return getNativeModule(this).send(remoteMessage.build());
return getNativeModule(this).sendMessage(remoteMessage.build());
}
subscribeToTopic(topic: string): void {

View File

@ -7,34 +7,34 @@
<key>AD_UNIT_ID_FOR_INTERSTITIAL_TEST</key>
<string>ca-app-pub-3940256099942544/4411468910</string>
<key>CLIENT_ID</key>
<string>305229645282-22imndi01abc2p6esgtu1i1m9mqrd0ib.apps.googleusercontent.com</string>
<string>17067372085-siujfe334vool17t2mtrmjrsgl81nhd9.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.305229645282-22imndi01abc2p6esgtu1i1m9mqrd0ib</string>
<string>com.googleusercontent.apps.17067372085-siujfe334vool17t2mtrmjrsgl81nhd9</string>
<key>API_KEY</key>
<string>AIzaSyAcdVLG5dRzA1ck_fa_xd4Z0cY7cga7S5A</string>
<string>AIzaSyC8ZEruBCvS_6woF8_l07ILy1eXaD6J4vQ</string>
<key>GCM_SENDER_ID</key>
<string>305229645282</string>
<string>17067372085</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.invertase.ReactNativeFirebaseDemo</string>
<string>com.invertase.RNFirebaseTests</string>
<key>PROJECT_ID</key>
<string>rnfirebase-b9ad4</string>
<string>rnfirebase</string>
<key>STORAGE_BUCKET</key>
<string>rnfirebase-b9ad4.appspot.com</string>
<string>rnfirebase.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<true/>
<true></true>
<key>IS_ANALYTICS_ENABLED</key>
<false/>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<false/>
<false></false>
<key>IS_GCM_ENABLED</key>
<true/>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true/>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:305229645282:ios:7b45748cb1117d2d</string>
<string>1:17067372085:ios:d9ef660bd02cc2f1</string>
<key>DATABASE_URL</key>
<string>https://rnfirebase-b9ad4.firebaseio.com</string>
<string>https://rnfirebase-5579a.firebaseio.com</string>
</dict>
</plist>

View File

@ -26,6 +26,7 @@ target 'ReactNativeFirebaseDemo' do
pod 'Firebase/Database'
pod 'Firebase/DynamicLinks'
pod 'Firebase/Firestore'
pod 'Firebase/Invites'
pod 'Firebase/Messaging'
pod 'Firebase/RemoteConfig'
pod 'Firebase/Storage'

View File

@ -29,6 +29,9 @@ PODS:
- Firebase/Firestore (4.10.0):
- Firebase/Core
- FirebaseFirestore (= 0.10.2)
- Firebase/Invites (4.10.0):
- Firebase/Core
- FirebaseInvites (= 2.0.2)
- Firebase/Messaging (4.10.0):
- Firebase/Core
- FirebaseMessaging (= 2.1.1)
@ -75,6 +78,20 @@ PODS:
- Protobuf (~> 3.5)
- FirebaseInstanceID (2.0.9):
- FirebaseCore (~> 4.0)
- FirebaseInvites (2.0.2):
- FirebaseAnalytics (~> 4.0)
- FirebaseDynamicLinks (~> 2.2)
- GoogleAPIClientForREST (~> 1.0)
- GoogleSignIn (~> 4.1)
- GoogleToolboxForMac/Logger (~> 2.1)
- GoogleToolboxForMac/NSDictionary+URLArguments (~> 2.1)
- GoogleToolboxForMac/NSString+URLArguments (~> 2.1)
- GoogleToolboxForMac/StringEncoding (~> 2.1)
- GoogleToolboxForMac/URLBuilder (~> 2.1)
- GTMOAuth2 (~> 1.0)
- GTMSessionFetcher/Core (~> 1.1)
- GTMSessionFetcher/Full (~> 1.1)
- Protobuf (~> 3.1)
- FirebaseMessaging (2.1.1):
- FirebaseAnalytics (~> 4.1)
- FirebaseCore (~> 4.0)
@ -102,6 +119,18 @@ PODS:
- GTMSessionFetcher/Core (~> 1.1)
- FirebaseSwizzlingUtilities (1.0.0)
- Google-Mobile-Ads-SDK (7.29.0)
- GoogleAPIClientForREST (1.3.2):
- GoogleAPIClientForREST/Core (= 1.3.2)
- GTMSessionFetcher (>= 1.1.7)
- GoogleAPIClientForREST/Core (1.3.2):
- GTMSessionFetcher (>= 1.1.7)
- GoogleSignIn (4.1.2):
- GoogleToolboxForMac/NSDictionary+URLArguments (~> 2.1)
- GoogleToolboxForMac/NSString+URLArguments (~> 2.1)
- GTMOAuth2 (~> 1.0)
- GTMSessionFetcher/Core (~> 1.1)
- GoogleToolboxForMac/Core (2.1.3):
- GoogleToolboxForMac/Defines (= 2.1.3)
- GoogleToolboxForMac/DebugUtils (2.1.3):
- GoogleToolboxForMac/Defines (= 2.1.3)
- GoogleToolboxForMac/Defines (2.1.3)
@ -114,6 +143,13 @@ PODS:
- GoogleToolboxForMac/Defines (= 2.1.3)
- GoogleToolboxForMac/NSString+URLArguments (= 2.1.3)
- GoogleToolboxForMac/NSString+URLArguments (2.1.3)
- GoogleToolboxForMac/StringEncoding (2.1.3):
- GoogleToolboxForMac/Defines (= 2.1.3)
- GoogleToolboxForMac/URLBuilder (2.1.3):
- GoogleToolboxForMac/Core (= 2.1.3)
- GoogleToolboxForMac/Defines (= 2.1.3)
- GoogleToolboxForMac/NSDictionary+URLArguments (= 2.1.3)
- GoogleToolboxForMac/NSString+URLArguments (= 2.1.3)
- gRPC (1.10.0):
- gRPC-RxLibrary (= 1.10.0)
- gRPC/Main (= 1.10.0)
@ -133,7 +169,13 @@ PODS:
- gRPC/Main (1.10.0):
- gRPC-Core (= 1.10.0)
- gRPC-RxLibrary (= 1.10.0)
- GTMOAuth2 (1.1.6):
- GTMSessionFetcher (~> 1.1)
- GTMSessionFetcher (1.1.14):
- GTMSessionFetcher/Full (= 1.1.14)
- GTMSessionFetcher/Core (1.1.14)
- GTMSessionFetcher/Full (1.1.14):
- GTMSessionFetcher/Core (= 1.1.14)
- leveldb-library (1.20)
- nanopb (0.3.8):
- nanopb/decode (= 0.3.8)
@ -178,6 +220,7 @@ DEPENDENCIES:
- Firebase/Database
- Firebase/DynamicLinks
- Firebase/Firestore
- Firebase/Invites
- Firebase/Messaging
- Firebase/Performance
- Firebase/RemoteConfig
@ -212,17 +255,21 @@ SPEC CHECKSUMS:
FirebaseDynamicLinks: 38b68641d24e78d0277a9205d988ce22875d5a25
FirebaseFirestore: 9423ca756bbf77bfa3cd02fafc8027ae79da625a
FirebaseInstanceID: d2058a35e9bebda1b6dd42486b84917bde552a9d
FirebaseInvites: ae15e0636f9eb42bdf5c1ef4c8f7bd4a88f9878b
FirebaseMessaging: db0e01c52ef7e1f42846431273558107d084ede4
FirebasePerformance: 96c831a9eaf8d2ddf8bb37a4a6f6dd1b4bfe929f
FirebaseRemoteConfig: df64ce784a45e9b9d4988030a59da6baede8bdb0
FirebaseStorage: 9a863a2bb96c406958eeff7c2f1dfa9f44c44a13
FirebaseSwizzlingUtilities: f1c49a5a372ac852c853722a5891a0a5e2344a6c
Google-Mobile-Ads-SDK: 375bbb821b3df2106c37b74f6b0a97576ddc5f6b
GoogleAPIClientForREST: 4fa84fc61fdeea48dd7088de5c1a864ace18125b
GoogleSignIn: d9ef55b10f0aa401a5de2747f59b725e4b9732ac
GoogleToolboxForMac: 2501e2ad72a52eb3dfe7bd9aee7dad11b858bd20
gRPC: f54f0e6d603052b4562447da442ce2ff30bcdacc
gRPC-Core: a030b1678ded49c88ec5ba7c90ee8ee5f47ec6e1
gRPC-ProtoRPC: 22712b23eb1bda656a59715fa5c1da0ea1493ea4
gRPC-RxLibrary: a41a4652d220f230ba1c0491a94ce2ee04c6180a
GTMOAuth2: c77fe325e4acd453837e72d91e3b5f13116857b2
GTMSessionFetcher: 390ea358e5a0d0133153806f744662dad933d06b
leveldb-library: 08cba283675b7ed2d99629a4bc5fd052cd2bb6a5
nanopb: 5601e6bca2dbf1ed831b519092ec110f66982ca3
@ -231,6 +278,6 @@ SPEC CHECKSUMS:
RNFirebase: dff98ceb517ef0b5e1858deb59eca186acc6edb0
yoga: 55da126afc384965b96bff46652464373b330add
PODFILE CHECKSUM: d20e53c395f89ffcfe49e809a8fd7f54beca0700
PODFILE CHECKSUM: 98821556e9f752c7e43b1d6c5cf757cdaefcffa2
COCOAPODS: 1.4.0

View File

@ -223,6 +223,34 @@
remoteGlobalIDString = 58B5119B1A9E6C1200147676;
remoteInfo = RCTText;
};
83AAA0B52063E593007EC5F7 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = EBF21BDC1FC498900052F4D5;
remoteInfo = jsinspector;
};
83AAA0B72063E593007EC5F7 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = EBF21BFA1FC4989A0052F4D5;
remoteInfo = "jsinspector-tvOS";
};
83AAA0B92063E593007EC5F7 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 9936F3131F5F2E4B0010BF04;
remoteInfo = privatedata;
};
83AAA0BB2063E593007EC5F7 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 9936F32F1F5F2E5B0010BF04;
remoteInfo = "privatedata-tvOS";
};
8E7D4A501F83AF5200699FE4 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
@ -464,10 +492,14 @@
3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */,
3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */,
3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */,
83AAA0B62063E593007EC5F7 /* libjsinspector.a */,
83AAA0B82063E593007EC5F7 /* libjsinspector-tvOS.a */,
8EC7AC351F8397E50041B0FE /* libthird-party.a */,
8EC7AC371F8397E50041B0FE /* libthird-party.a */,
8EC7AC391F8397E50041B0FE /* libdouble-conversion.a */,
8EC7AC3B1F8397E50041B0FE /* libdouble-conversion.a */,
83AAA0BA2063E593007EC5F7 /* libprivatedata.a */,
83AAA0BC2063E593007EC5F7 /* libprivatedata-tvOS.a */,
);
name = Products;
sourceTree = "<group>";
@ -894,6 +926,34 @@
remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
83AAA0B62063E593007EC5F7 /* libjsinspector.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libjsinspector.a;
remoteRef = 83AAA0B52063E593007EC5F7 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
83AAA0B82063E593007EC5F7 /* libjsinspector-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libjsinspector-tvOS.a";
remoteRef = 83AAA0B72063E593007EC5F7 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
83AAA0BA2063E593007EC5F7 /* libprivatedata.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libprivatedata.a;
remoteRef = 83AAA0B92063E593007EC5F7 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
83AAA0BC2063E593007EC5F7 /* libprivatedata-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libprivatedata-tvOS.a";
remoteRef = 83AAA0BB2063E593007EC5F7 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
8E7D4A511F83AF5200699FE4 /* libfishhook.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
@ -1016,10 +1076,18 @@
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-ReactNativeFirebaseDemo/Pods-ReactNativeFirebaseDemo-resources.sh",
"${PODS_ROOT}/FirebaseInvites/Resources/GINInviteResources.bundle",
"${PODS_ROOT}/FirebaseInvites/Resources/GPPACLPickerResources.bundle",
"${PODS_ROOT}/GTMOAuth2/Source/Touch/GTMOAuth2ViewTouch.xib",
"${PODS_ROOT}/GoogleSignIn/Resources/GoogleSignIn.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/gRPC/gRPCCertificates.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GINInviteResources.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GPPACLPickerResources.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GTMOAuth2ViewTouch.nib",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleSignIn.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates.bundle",
);
runOnlyForDeploymentPostprocessing = 0;

View File

@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<string>com.invertase.RNFirebaseTests</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
@ -18,8 +18,21 @@
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.googleusercontent.apps.17067372085-siujfe334vool17t2mtrmjrsgl81nhd9</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSApplicationCategoryType</key>
<string></string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
@ -33,6 +46,8 @@
</dict>
</dict>
</dict>
<key>NSContactsUsageDescription</key>
<string>Needs access to your contacts to send invitations</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<key>UIAppFonts</key>

View File

@ -142,10 +142,10 @@ const android = {
const ios = {
clientId:
'305229645282-22imndi01abc2p6esgtu1i1m9mqrd0ib.apps.googleusercontent.com',
'305229645282-t29pn6o2t7se1f7rvrfsll4r0pvd6fb6.apps.googleusercontent.com',
androidClientId: android.clientId,
appId: '1:305229645282:ios:7b45748cb1117d2d',
apiKey: 'AIzaSyDnVqNhxU0Biit9nCo4RorAh5ulQQwko3E',
appId: '1:305229645282:ios:d9ef660bd02cc2f1',
apiKey: 'AIzaSyAcdVLG5dRzA1ck_fa_xd4Z0cY7cga7S5A',
databaseURL: 'https://rnfirebase-b9ad4.firebaseio.com',
storageBucket: 'rnfirebase-b9ad4.appspot.com',
messagingSenderId: '305229645282',

View File

@ -50,7 +50,7 @@ function messagingTests({ describe, it, firebase }) {
number: 123456,
});
firebase.native.messaging().send(remoteMessage);
firebase.native.messaging().sendMessage(remoteMessage);
return Promise.resolve();
});
@ -116,7 +116,7 @@ function messagingTests({ describe, it, firebase }) {
number: 123456,
});
firebase.native.messaging().send(remoteMessage);
firebase.native.messaging().sendMessage(remoteMessage);
return Promise.resolve();
});