Dev and Production apps for iOS (with Facebook SDK) - ios

I'm building an app which uses Facebook SDK. Since it's already in production I wanted to install two versions on my device (the App Store Version and the Development version).
I followed this instructions and successfully installed two versions of the app, but when trying to Log in using Facebook I got a problem because the development version bundleID (com.company.app.dev) does not matches the registered one on my Facebook App (com.company.app).
This guide shows how to share the same facebook appID between apps. The guide is quite confusing to me. I registered the two bundle ids (com.company.app.dev and com.company.app) and one URL scheme suffix (dev), and modified mi App.plist file to include the FacebookUrlSchemeSuffix key.
That lead me into another problem, when I logged into the production app, the callback was opening the development app, because both apps had the same URL callbacks registered (fbxxxx and fbxxxxdev, where xxxx is my facebook app id).
I solved it registering a user-defined build setting that adds the FacebookUrlSchemeSuffix when in Build mode and not in Release mode, and also modifying the URL schemes in the App.plist file to append the suffix in the same case.
But this solution seems a bit hacky since it does now follow the Facebook guides. Is there any better solution to this? I think I'm not following the Facebook guide correctly.

What you're doing is fine. You should have fbxxxx registered as a scheme in your production app, and fbxxxxdev in your dev app, and also add the suffix in your dev app.

Related

Authentication failed for iOS app-specific password, but what do I do with my app-specific password? Where does it go?

Got a new SSD for my mac (so it is like starting over), and am trying to set it up for Xamarin iOS development (again). After much fun with Apple procedures I am ready to upload to the App store, but get this message:
This message pops up when I am after the Archive is built, after I select Upload (after Sign and Distribute). It seems the important part is Authentication failed Sign in with the app-specific password you generated.
Sign in? Sign in to what? I have my app specific password, but what do I do with it?
There certainly seems to be a lot of web pages trying to push me to appcenter.ms, but I should not be forced to use a Microsoft service to distribute my app and do not wish to go that route at this time.
Below are some hints to help others who like me are not full time iOS app developers and are tired of massive web pages explaining the process.
Important things to know/remember for Xamarin/iOS development (obviously you need a Apple developer account, need to install XCode, VS, Xamarin):
you need to tell XCode your Apple developer credentials
you need to tell VS your Apple developer credentials
you need to tell Apple the UID of your build box, test devices
you need a developer certificate and distribution certificate from Apple
you need to create two provisioning profiles, one for development and one for distribution
somehow building a Xamarin iOS demonstration project in VS on my Mac made the iOS simulators available to other projects
you may need a special Apple intermediate certificate (AppleWWDRCAG3.cer) and install it, even though various webpages said that was only necessary if your XCode was an old version (I had the latest XCode and still had to find/install it)

Firebase Dynamic link is not opening IOS application

I have followed all the steps from the Firebase Dynamic links documentation:
Added Team Id to firebase console
Added custom domain
Enabled Associated domains
Added to Info URL Schemes
However, when I click on dynamic link it always redirect to AppStore not to the app. I have tried to unistall app, restart phone and install again. How to make this deep link work?
P.S: my app is not published to AppStore yet.
In my case the problem was that I made a typo in Associated domains in Xcode, instead of applinks, I typed 'applink'.

Universal Links Keep Redirecting to App Store

We are trying to integrate Universal Links feature in our app.
We have an associated domain and put AASA file to server. However, when we install the app on iOS device and navigate to the url we are being redirected to the app store instead of opening our iOS app.
So the question is: Should the app be published in the AppStore to utilize Universal Links or is there some issue on our side?
You should be able to test universal links with an unpublished app. Since you're ending in the App Store, my guess is that it's an App ID mismatch.
An AASA ties paths on a domain to a particular App ID. The App ID has this format:
{TEAM_IDENTIFIER}.{BUNDLE_ID}
Is it possible you changed the Team in Xcode to something else? You'd still see the same Bundle ID but the resulting App ID would be different.

iOS IAP Sandbox - is it possible to test on a different bundle ID

This is basically the same as this question: Test iPhone in-app purchases on a different bundle? from 2010 - which never had an accepted answer and for which both unaccepted answers are more conjecture than canonical.
Working on an app using React native and Firebase. We use Crashlytics beta to send out beta test versions, which work via a slightly different bundle ID - eg: com.companyname.appname for the production app and com.companyname.appname.dev for the beta. In xCode this is handled with two different build targets, and these also have different Google Info plists associated with them (in order to use the prod/dev firestore databases).
Now we are working on adding in app purchases, and I hit the problem that in order to properly test them before release, it appears that the bundle ID needs to match perfectly (no wildcards).
I'd prefer not to use the production build for testing because it means pointing the testers to the production database, but it feels like Apple have designed a system that enforces that. It feels like there must be a better way that I am missing. How are others handling IAP testing for iOS apps?
You need to use the same Bundle Identifier for the same App to test IAP.
If your app contains the DEV Mobile Provisioning Profile then it is automatically linked to SandBox Mode. You just need to create Sandbox Testers to https://itunesconnect.apple.com
If you require to test Auto Renew IAP there is also way to do this. Apple provides the Sandbox & Production URLs to communicate for All Previously purchased IAP returned to App. For Auto Renew please check this link.
I was able to get it to work by simply creating another App Store Connect record with the dev bundle id (com.companyname.appname.dev) and then creating the same IAP configuration in both records. It's not pretty but it's better than having the same bundle id for multiple environments.

iOS Facebook Authentication PhoneGap on TestFlight

I'm currently testing my app on my iPhone that I built using Phonegap's Adobe Build with Apple's TestFlight application. My app contains Facebook authentication and when I click the authentication button I am presented with the following error:
Given URL is not allowed by the Application configuration: One or
more of the given URLs is not allowed by the App's settings.
It must match the Website URL or Canvas URL, or the domain must
be a subdomain of one of the App's domains.
I did a bit of research online and I added the iOS Platform along with my Bundle ID in the respective field on facebook's developer panel but that did not appear to fix things.

Resources