# Firebase foreign code

**URL:** <https://forums.fusetools.com/t/firebase-foreign-code/4170>\
**Category:** General\
**Created:** [May 5, 2016, 12:41pm UTC](https://forums.fusetools.com/t/firebase-foreign-code/4170 "2016-05-05T12:41:30Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_Kobo](https://avatars.discourse-cdn.com/v4/letter/_/f05b48/32.png) [@\_Kobo](https://forums.fusetools.com/u/_Kobo)\
**Post date:** [May 5, 2016, 12:41pm UTC](https://forums.fusetools.com/t/firebase-foreign-code/4170/1 "2016-05-05T12:41:30Z")

</div>

Hi guys , just wondering how we can import all the firebase library as an uno modules , any one already done this? i have done my app design and know i need to add the logic with firebase and geofire, but i know anything about native programming languages and don’t know how can i proceed.

---

<div class="post-metadata">

**Author:** ![Rene](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/rene/32/318_2.png) [@Rene](https://forums.fusetools.com/u/Rene)\
**Post date:** [July 16, 2016, 11:44am UTC](https://forums.fusetools.com/t/firebase-foreign-code/4170/2 "2016-07-16T11:44:42Z")

</div>

We need this as well. Some direction or a module would be great.

---

<div class="post-metadata">

**Author:** ![Anders\_Bondehagen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_bondehagen/32/98_2.png) [@Anders\_Bondehagen](https://forums.fusetools.com/u/Anders_Bondehagen)\
**Post date:** [July 18, 2016, 10:38am UTC](https://forums.fusetools.com/t/firebase-foreign-code/4170/3 "2016-07-18T10:38:18Z")

</div>

We are working on getting some code out on this, that people can contribute to.

---

<div class="post-metadata">

**Author:** ![Baggers](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/baggers/32/665_2.png) [@Baggers](https://forums.fusetools.com/u/Baggers)\
**Post date:** [July 19, 2016, 1:09pm UTC](https://forums.fusetools.com/t/firebase-foreign-code/4170/4 "2016-07-19T13:09:22Z")

</div>

@Rene @Prince Kobo,

As Anders said we are working on this right now. The thing that is making it tricky is that the api requires modification of what both the Android activity & the iOS AppDelegate inherit from. This hasnt exposed in Fuse yet so this would block you if you tried it.

Also we have recently added Cocopod support which is needed for iOS, but this has not shipped to the public yet.

Rest assured that it is on the way. We currently have email authentication on iOS and Android and Google auth on Android working. I’m currently working on Google authentication for iOS.

---

<div class="post-metadata">

**Author:** ![Ish\_Singh](https://avatars.discourse-cdn.com/v4/letter/i/4bbf92/32.png) [@Ish\_Singh](https://forums.fusetools.com/u/Ish_Singh)\
**Post date:** [July 21, 2016, 9:15am UTC](https://forums.fusetools.com/t/firebase-foreign-code/4170/5 "2016-07-21T09:15:35Z")

</div>

We need this as well. Will the implementation be available in source, so we can learn/adapt/contribute?

---

<div class="post-metadata">

**Author:** ![Baggers](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/baggers/32/665_2.png) [@Baggers](https://forums.fusetools.com/u/Baggers)\
**Post date:** [July 21, 2016, 9:18am UTC](https://forums.fusetools.com/t/firebase-foreign-code/4170/6 "2016-07-21T09:18:58Z")

</div>

Hi Ish, and yes it will!

---

<div class="post-metadata">

**Author:** ![medjessy](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/medjessy/32/329_2.png) [@medjessy](https://forums.fusetools.com/u/medjessy)\
**Post date:** [July 24, 2016, 7:02pm UTC](https://forums.fusetools.com/t/firebase-foreign-code/4170/7 "2016-07-24T19:02:13Z")

</div>

+1

---

<div class="post-metadata">

**Author:** ![iksnae](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/iksnae/32/139_2.png) [@iksnae](https://forums.fusetools.com/u/iksnae)\
**Post date:** [August 25, 2016, 7:48pm UTC](https://forums.fusetools.com/t/firebase-foreign-code/4170/8 "2016-08-25T19:48:48Z")

</div>

+1

---

<div class="post-metadata">

**Author:** ![Bent](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/bent/32/157_2.png) [@Bent](https://forums.fusetools.com/u/Bent)\
**Post date:** [August 25, 2016, 8:36pm UTC](https://forums.fusetools.com/t/firebase-foreign-code/4170/9 "2016-08-25T20:36:18Z")

</div>

Don’t worry guys, we’re working on it 🙂

---

<div class="post-metadata">

**Author:** ![Baggers](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/baggers/32/665_2.png) [@Baggers](https://forums.fusetools.com/u/Baggers)\
**Post date:** [August 26, 2016, 9:36am UTC](https://forums.fusetools.com/t/firebase-foreign-code/4170/10 "2016-08-26T09:36:38Z")

</div>

It has been mentioned in another thread but I forgot to paste it here.

See [this repo](https://github.com/cbaggers/Fuse.Firebase) for what will soon be the Fuse Firebase Authentication library.

I’m pushing code after the next release is out and I can do one more pass on testing on it. Documentation is there for what I have done and I hope it will be in a good enough state that we can all start hacking on it. This will be one of our first properly open projects so I’m pretty excited.

What is done is pretty basic but it’s a place to start

---

<div class="post-metadata">

**Author:** ![Baggers](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/baggers/32/665_2.png) [@Baggers](https://forums.fusetools.com/u/Baggers)\
**Post date:** [August 31, 2016, 2:27pm UTC](https://forums.fusetools.com/t/firebase-foreign-code/4170/11 "2016-08-31T14:27:59Z")

</div>

-_Cough_- they’re live -_Cough_-

> **[fuse-compound/Fuse.Firebase](https://github.com/fuse-compound/Fuse.Firebase)**
>
> Fuse.Firebase - The start of fuse bindings for Firebase

---

<div class="post-metadata">

**Author:** ![\_Kobo](https://avatars.discourse-cdn.com/v4/letter/_/f05b48/32.png) [@\_Kobo](https://forums.fusetools.com/u/_Kobo)\
**Post date:** [September 23, 2016, 11:52am UTC](https://forums.fusetools.com/t/firebase-foreign-code/4170/12 "2016-09-23T11:52:08Z")

</div>

Hi chris, i’m struggling to use this.  
cocoapods and gradle build don’t pass

---

<div class="post-metadata">

**Author:** ![Bent](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/bent/32/157_2.png) [@Bent](https://forums.fusetools.com/u/Bent)\
**Post date:** [September 23, 2016, 11:56am UTC](https://forums.fusetools.com/t/firebase-foreign-code/4170/13 "2016-09-23T11:56:41Z")

</div>

Unfortunately, it’s impossible to offer any assistance without more details on what happens, error logs or a reproduction case.

---

<div class="post-metadata">

**Author:** ![\_Kobo](https://avatars.discourse-cdn.com/v4/letter/_/f05b48/32.png) [@\_Kobo](https://forums.fusetools.com/u/_Kobo)\
**Post date:** [September 23, 2016, 12:17pm UTC](https://forums.fusetools.com/t/firebase-foreign-code/4170/14 "2016-09-23T12:17:00Z")

</div>

Hi excuse me.  
the for android fail with this in the logs:

```auto
Configuring
WARNING: .unoconfig: 'PackageSourcePaths' is deprecated -- use 'Packages.SourcePaths'
(1.3s)

Compiling syntax tree (2.7s)

Generating code and data (13.3s)

Building Android app
2/2: AuthExample.apk
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Dex: Error converting bytecode to dex:
Cause: com.android.dex.DexException: Multiple dex files define Landroid/support/annotation/AnimRes;
    UNEXPECTED TOP-LEVEL EXCEPTION:
    com.android.dex.DexException: Multiple dex files define Landroid/support/annotation/AnimRes;
    	at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
    	at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
    	at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
    	at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
    	at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
    	at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502)
    	at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
    	at com.android.dx.command.dexer.Main.run(Main.java:277)
    	at com.android.dx.command.dexer.Main.main(Main.java:245)
    	at com.android.dx.command.Main.main(Main.java:106)
    

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithDexForArm7Debug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
please apply google-services plugin at the bottom of the build file.
Incremental java compilation is an incubating feature.
:app:copyArmeabi-v7aDebugSharedLibraryStlSo UP-TO-DATE
:app:compileAuthExampleArmeabi-v7aDebugSharedLibraryAuthExampleMainCpp UP-TO-DATE
:app:linkAuthExampleArmeabi-v7aDebugSharedLibrary UP-TO-DATE
:app:AuthExampleArmeabi-v7aDebugSharedLibrary UP-TO-DATE
:app:stripSymbolsArmeabi-v7aDebugSharedLibrary UP-TO-DATE
:app:ndkBuildArmeabi-v7aDebugSharedLibrary UP-TO-DATE
:app:ndkBuildArmeabi-v7aDebugStaticLibrary UP-TO-DATE
:app:processAndroidArm7DebugMainJniLibs
:app:androidArm7Debug
:app:preBuild UP-TO-DATE
:app:preArm7DebugBuild UP-TO-DATE
:app:checkArm7DebugManifest
:app:preArm7ReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2420Library UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72420Library UP-TO-DATE
:app:prepareComAndroidSupportCardviewV72340Library UP-TO-DATE
:app:prepareComAndroidSupportCustomtabs2340Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2420Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72420Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCompat2420Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCoreUi2420Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCoreUtils2420Library UP-TO-DATE
:app:prepareComAndroidSupportSupportFragment2420Library UP-TO-DATE
:app:prepareComAndroidSupportSupportMediaCompat2420Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42420Library UP-TO-DATE
:app:prepareComAndroidSupportSupportVectorDrawable2420Library UP-TO-DATE
:app:prepareComFacebookAndroidFacebookAndroidSdk4150Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAuth920Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAuthBase920Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBase921Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBasement921Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesTasks921Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseAnalytics920Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseAnalyticsImpl920Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseAuth921Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseAuthCommon921Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseAuthModule921Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseCommon921Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseCore920Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseIid920Library UP-TO-DATE
:app:prepareArm7DebugDependencies
:app:compileArm7DebugAidl UP-TO-DATE
:app:compileArm7DebugRenderscript UP-TO-DATE
:app:generateArm7DebugBuildConfig UP-TO-DATE
:app:generateArm7DebugAssets UP-TO-DATE
:app:mergeArm7DebugAssets UP-TO-DATE
:app:generateArm7DebugResValues UP-TO-DATE
:app:generateArm7DebugResources UP-TO-DATE
:app:mergeArm7DebugResources UP-TO-DATE
:app:processArm7DebugManifest UP-TO-DATE
:app:processArm7DebugResources UP-TO-DATE
:app:generateArm7DebugSources UP-TO-DATE
:app:compileArm7DebugJavaWithJavac
:app:compileArm7DebugSources
:app:prePackageMarkerForArm7Debug
:app:transformClassesWithDexForArm7Debug FAILED

BUILD FAILED

Total time: 52.402 secs
(unknown): E0200: Android build failed
(53.6s)

Build completed in 70.94 seconds
    1 error

fuse: Errors were encountered while building the project

```

for iOS i cannot pass all the code its too big

```auto
Check dependencies
Signing for "AuthExample" requires a development team. Select a development team in the project editor.
Code signing is required for product type 'Application' in SDK 'iOS 10.0'
(46.3s)

```

the problem is signing profil are fine in my Xcode general settings tab

---

<div class="post-metadata">

**Author:** ![Olle\_Fredriksson](https://avatars.discourse-cdn.com/v4/letter/o/e95f7d/32.png) [@Olle\_Fredriksson](https://forums.fusetools.com/u/Olle_Fredriksson)\
**Post date:** [September 23, 2016, 2:50pm UTC](https://forums.fusetools.com/t/firebase-foreign-code/4170/15 "2016-09-23T14:50:30Z")

</div>

Hey Kobo,

I’ve seen that Android problem occur when you have several dependencies that include the Android support libraries (a quick search for the error message will give you more info). To fix that, I had to add an `exclude module` to the `Gradle.Dependency` attribute. See [here](https://github.com/fusetools/fuse-samples/blob/bd3488436a0815953692d12b9b6497192501e17c/Samples/NativeFacebookLogin/FacebookLogin/FacebookLogin.uno#L11) for an example.

For the iOS issue, this is a problem with the new Xcode 8. We’re working on a fix, and in the meantime you can build with `--debug` and set the development team in Xcode before building and running the Xcode project.

---

<div class="post-metadata">

**Author:** ![\_Kobo](https://avatars.discourse-cdn.com/v4/letter/_/f05b48/32.png) [@\_Kobo](https://forums.fusetools.com/u/_Kobo)\
**Post date:** [September 23, 2016, 7:02pm UTC](https://forums.fusetools.com/t/firebase-foreign-code/4170/16 "2016-09-23T19:02:54Z")

</div>

Many thanks @olle , have been able to get the iOS build working in debug mode , but nothing else , i will wait for an update on this , many thanks

---

<div class="post-metadata">

**Author:** ![Olle\_Fredriksson](https://avatars.discourse-cdn.com/v4/letter/o/e95f7d/32.png) [@Olle\_Fredriksson](https://forums.fusetools.com/u/Olle_Fredriksson)\
**Post date:** [September 26, 2016, 8:02am UTC](https://forums.fusetools.com/t/firebase-foreign-code/4170/17 "2016-09-26T08:02:35Z")

</div>

Good to hear that it’s working on iOS, Kobo. Do you get the same error message as before if you do what I suggested above on Android?

---

<div class="post-metadata">

**Author:** ![\_Kobo](https://avatars.discourse-cdn.com/v4/letter/_/f05b48/32.png) [@\_Kobo](https://forums.fusetools.com/u/_Kobo)\
**Post date:** [September 27, 2016, 12:55pm UTC](https://forums.fusetools.com/t/firebase-foreign-code/4170/18 "2016-09-27T12:55:05Z")

</div>

Didnt tested for android, i will wait for an update (as we cannot save data , or retrieve uid for example) for deeply testing no matters how much time it will take to have it, thanks
