Link two Facebook apps to a single Firebase project - ios

We have two different iOS apps. They are connected to two Facebook applications for users to be able to login.
We would like to use those two apps with our single firebase project. But we were unable to bind two Facebook apps to Firebase - there is only an input for a single one.
Are there any ways or workarounds to add two Facebook apps to a Firebase project or to somehow solve this issue?

The short answer is no. A Facebook "app" is a Firebase "project", and one Firebase "project" can be linked to at most one Facebook "app".
Typically this is because all Firebase apps within a Firebase project share the same resources (Database, Storage, and Auth), the exception being Analytics and Crash Reporting, which definitely make sense on a per-app basis.
For multiple apps using different resources (like in test, staging, etc.), we recommend using different Firebase projects, which could then link to different Facebook Apps (or could use the same Facebook App, and add two bundle IDs).
Do you have a use case outside of this general framework?

Related

Firebase dynamic link not opening correct app when multiple flavors are installed on iOS

We developed a flutter app for Android and iOS, with different flavors: dev, test and prod, so we have 6 apps in total. To on-board the user, we send a firebase dynamic link via Email (with a deep link inside it) to navigate the user to a specific screen when it is tapped.
The expected behavior is that when the user taps on a dynamic link of - say - the dev app, it opens a screen in the dev app. Similar for the other flavors.
Now this works just fine on Android.
On iOS it works fine if only one app is installed, but if for example the dev and the test apps are installed, then tapping on the dynamic links always opens the test app. This is also true when dev, test and prod are installed: test is opened.
This is a development issue and not relevant for production as the user will never have the test or dev app installed, but it is annoying us as we have to uninstall and reinstall flavors all the time.
Our dynamic links have the following format (values in '<>' are placeholders):
Dev: https://<app_id>.page.link/?link=http://dev.<mydomain>.com/reset?token=token1&apn=<mypackage>.dev&isi=<isiNumber1>&ibi=<mypackage>.dev
Test: https://<app_id>.page.link/?link=http://test.<mydomain>.com/reset?token=token2&apn=<mypackage>.test&isi=<isiNumber2>&ibi=<mypackage>.test
Prod: https://<app_id>.page.link/?link=http://<mydomain>.com/reset?token=token3&apn=<mypackage>&isi=<isiNumber3>&ibi=<mypackage>
The behavior is the same for all iOS versions I could get my hands on on real devices, i.e. iOS 11, 12 and 13.
We're using Flutter 1.9.1-hotfix6 and firebase_dynamic_links 0.5.0+1
Any ideas what this might be caused by?
Firebase Dynamic Links do not support using the same URL prefix for multiple iOS apps/targets contained in the same Firebase project.
You can workaround this in multiple ways though:
Using multiple (sub)domains (as already suggested by Janmenjaya)
Use a custom domain
Using multiple Firebase projects (as already suggested by Aleksandr)
On Android it works out of the box, because you are in charge of matching paths with particular apps within the Manifest file. On iOS it doesn't work, because Firebase is in charge of such matches within the hosted apple-app-site-association file.
For further information, I've written an extensive answer here.
Do not use one project in the firebase console, it is better to split and use different url in <key>com.apple.developer.associated-domains</key>
In Firebase under dynamic link, we can create multiple url domain. And these url domain we need to add in the associated domain of different target.
Steps
Let’s assume I have two target test and production.
I created two domain link like “test.page.link” and production.page.link
In test target in Xcode under Signing & Capabilities -> Associated Domain, use the “test.page.link”
And for production target set the production.page.link

Xcode - Sharing extensions and app groups among targets with different developer accounts

I have an iOS app in Xcode which has 5 targets (meaning, they're different applications with different developer accounts, just using the same codebase).
I have added a Notification Content Extension and I want all other targets to use it.
The thing is, this extension also uses a certain App Group to share data between it and parent targets. But, because the other targets all have different developer accounts, I cannot set a global App Group to all apps. Is there a way around it? what's the best practice?
Thanks :)
No , it's not possible app groups for targets with the same developer account you may upload your logic to server and share it with apis , you may use UIPasteboard as a workaround but it's not recommended from Apple Docs

Firebase dynamic links for multiple iOS apps in project

I have a firebase project with two iOS apps and two Android apps.
These apps needs to share databases and users so this design seems natural.
Regarding dynamic links, Android works like a breeze but I’m struggling with the iOS part.
Basic dynamic links setup is easy, the difficult (impossible?) part is to make dynamic link that routes toward the proper app, based on bundleID.
Firebase auto-generates the apple-app-site-association files but the paths components for all apps is always the same : ["/*"]
{"applinks":
{"apps":[],
"details":[
{"appID":"XXXXX.com.test.app1","paths":["/*"]},
{"appID":"XXXXX.com.test.app2","paths":["/*"]}]
}
}
As a consequence, the first app app1 always match and all deep links are directed towards this app.
At this point, i'm unable to open a dynamic link to app2.
The documentation is inexistant for this configuration, even if this fully functional on Android apps.
Am i missing something here ?
Firebase Dynamic Links has limited support for multiple iOS Apps in the same project. We are planning to improve this support, but no ETA on the dates, likely Q1 2018.
Here is one of the most typical example of Firebase Dynamic Links setup for several iOS App in one project: https://photos.app.goo.gl/apple-app-site-association
You still should be able to open app2, if app1 is not installed on iOS device.
I believe you can change order of the Apps in apple-app-site-association by deleting app1 and re-adding app1 to the project.
We do receive more requests on allowing to re-order priority of the App in apple-app-site-association file. For example, developers have free and paid App, so they actually want for dynamic link to work in both Apps.
As a workaround, you may be able to use customURL scheme to re-open correct app2, if app1 was opened when this was not desired. This would be not the best user experience.
Let me know if you have more questions, feel free to open Firebase support ticket to share private information.
As Oleksiy Ivanov has already pointed out, this boils down to the problem, that Firebase Dynamic Links doesn't support using the same URL prefix for multiple iOS apps/targets contained in the same Firebase project.
There are multiple workarounds though:
Using multiple (sub)domains
Use a custom domain
Using multiple Firebase projects
On Android it works out of the box, because you are in charge of matching paths with particular apps within the Manifest file. On iOS it doesn't work, because Firebase is in charge of such matches within the hosted apple-app-site-association file (as you've already pointed out in your question).
For further information, I've written an extensive answer here.

Xamarin iOS: What is different between Document Provider and Importing Document

I am new on iOS. In my application, I need to get files on the phone e.g. pdf, words etc in the phone. I know iOS application has their own sandbox to work with, they have no idea of other applications.
I have read some of the extension : Document Provider and a older post importing document through this link : https://mobiforge.com/design-development/importing-exporting-documents-ios
Is there any different between the two setup in my requirement? Sorry this is my first time working on iOS.
Unfortunately, iOS does not allows to share files storage between apps from two different developers.
If you own both apps, you can use App Groups to share data and files between apps. You can read more about App Groups, and how to use the APIs here https://developer.xamarin.com/guides/ios/watch/working-with/app-groups/

Bundled iOS app using two IPAs

I am exploring into the possibility of creating a bundled app out of TWO of my apps (app1.ipa & app2.ipa). Is it possible to create a shell app (bundle.ipa) which would load app1 or app2 using their respective ipa’s (app1.ipa or app2.ipa) based on user selection? Or Do I have to merge the source codes and assets on both apps to create a bundled app? Basically, is it possible to load an ipa with-in an ipa?
No. It's not possible to create apps with more then one binary.
Instead of trying to have more than one .ipa - which I'm pretty sure isn't possible - creating a class by which the app can introspect whether or not the person has paid for the app. So if they have, the feature is available, and if not... its not available.
Use Facebook's SDK integration as a reference of how this works: before an app can retrieve items from the user's Facebook, the app must make sure that the user has signed in with Facebook.
I wish I knew of a more precise example, but honestly, this should give you the gist of it all.

Resources