Problem configuring Flutter "sign_in_with_apple" for android - android

I am trying to set up the Flutter sign_in_with_apple package but run into problems with the android side.
What I have done so far, following the package README to the letter:
Set up the glitch.me server. The server is up and listening at https://MYSERVER.glitch.me/callbacks/sign_in_with_apple I've added a bit of console logging to make sure I know when the server is hit.
Set up appid and serviceid on the apple developer console. Service identifier is com.company.foobar.dev.signin
Added the glitch callback https://MYSERVER.glitch.me/callbacks/sign_in_with_apple as the return url on the service configuration.
Copied the activity block from the readme into my android manifest. NOTE: I didn't know what to set the name. Leave it referring to the package or change it to my app id? It's currently android:name="com.aboutyou.dart_packages.sign_in_with_apple.SignInWithAppleCallback"
Add this block to my flutter service:
"https://MYSERVER.glitch.me/callbacks/sign_in_with_apple";
final appleIdCredential = await SignInWithApple.getAppleIDCredential(
scopes: [
AppleIDAuthorizationScopes.email,
AppleIDAuthorizationScopes.fullName,
],
webAuthenticationOptions: WebAuthenticationOptions(
clientId: "com.company.foobar.dev.signin",
redirectUri: Uri.parse(redirectURL)));
Unfortunately, the call to SignInWithApple.getAppleIDCredential in step 5 throws an exception and I am seeing invalid_request invalid web redirect url. The glitch server is never even hit, which makes me think that even if I messed up at Step 4 (the intent name in the android manifest) the problem is more likely in the apple developer console setup. However, I am pretty sure I've followed the README and I am running out of ideas.

Hmmm, I threw away the apple developer console service setup for the dev package (with applicationIdSuffix '.dev' and bundleid 'com.company.foobar.dev') and set up the same for the production flavor. This one works as expected.
I am now wondering if apple doesn't even redirect the request to the glitch server for android unless the package has as playstore presence. Comments?

Related

How to run AppsFlyer SDK Integration Test for a Unity project?

I'm working with AppsFlyer in Unity based on the following documentation: https://support.appsflyer.com/hc/en-us/articles/213766183-Unity-plugin-V4-integration-guide-for-developers
I followed the necessary steps but when it came to running the integration test, it just stayed stuck in this screen:
https://imgur.com/a/taXW909
Are there any potential things that I might be missing that could cause this issue? As far as I understand, I need to whitelist my Android device, select it in the SDK Integration Test, scan the QR Code, install my project's .apk file and the AppsFlyer should start detecting something.
Additional details
Here's the script for initializing AppsFlyer:
public class AppsFlyerObject : MonoBehaviour
{
private const string AppsFlyerKey = /* MY DEV KEY */;
private void Start()
{
AppsFlyer.setAppsFlyerKey(AppsFlyerKey);
AppsFlyer.init(AppsFlyerKey, "AppsFlyerTrackerCallbacks");
}
}
Regarding the AppsFlyer app, here're the settings I selected:
https://imgur.com/a/7PxEnlW
I want to test an APK file that is not present on any kind of a store.
Have you tried testing a non-organic install with this link?
https://support.appsflyer.com/hc/en-us/articles/207032126#integration-43-simulating-a-nonorganic-install
If everything implemented correctly, but you are still stuck on this screen - it's very likely you have 'zero plan' on your AppsFlyer account. You cannot pass this test on free plan for some reason.
I've found it after two days by connecting device via logcat and recieving 403 error. You can do same to be sure its your reason too.

branch.io deep-linked URL not passing data in App from Facebook Ads

We are using branch.io to pass custom data to App. For that we are following this steps in branch dashboard.
1) Ads -> Partner Management -> Facebook -> Create Facebook Link
2) Set data in Key/Value under "Deep Linking" Section (data which we need in our app)
3) We set Play/App Store URL in Android/iOs respectively Or set Default Redirects under "Redirects" section
That's it!!!
Now Go to Facebook Ads Manager and select App Install Campaign.
1) Select Play/App Store under App Section.
2) Set above generated URL under "deffered deep link"
You can read more here : https://docs.branch.io/pages/deep-linked-ads/facebook-app-install-ads/
Now Our Problem is :
When user clicked on any branch link with deep link params it able to receive data in both case when user fresh install the application and if user has already app installed.
When we clicked on Facebook ads with same url we are unable to get branch data if user has not installed application (Mostly in case when user redirect from App Store/play store) . But user has installed the app we can able to receive all branch data from same url.
So Question is:
1) Do we need any permission from Facebook or missing any configuration on Branch or Facebook?
2) The same thing will work with both (e.g. Android and iOs) devices?
Thanks
Unfortunately the branch.io documentation for setting this is up is pretty incomplete - we just spent about a week testing and debugging the SDK to figure out how to get it to work. The necessary changes itself are actually quite simple.
On Android:
Integrate the Facebook SDK if you haven't done so already
Ensure that the facebook_app_id string resource you added as part of (1) is not prefixed with "fb"
If you are using ProGuard, add rules to keep the relevant parts of the Facebook SDK
Call enableFacebookAppLinkCheck() on your Branch instance right after initializing it
On iOS:
Integrate the Facebook SDK if you haven't done so already
Call registerFacebookDeepLinkingClass(FBSDKAppLinkUtility.self) on your Branch instance right after initializing it
I had this exact same problem, but in a React Native project, so I'm using react-native-branch. #henning-dodenhof 's answer helped me a lot (thanks for figuring this out!), but I needed a couple of further adaptations, so I add this answer in case it's useful for someone else since this post was the main thing I found regarding this issue:
For iOS:
The FB SDK registration needs to happen before initializing Branch, not after as the above answer suggests. So, before this line that you add as part of the normal library setup:
[RNBranch initSessionWithLaunchOptions:launchOptions isReferrable:YES];
You need get the Branch instance from RNBranch and then register this FB SDK class:
[[RNBranch branch] registerFacebookDeepLinkingClass:[FBSDKAppLinkUtility class]];
Adding this new line before the initialization is critical, doesn't work if it's done after.
For Android:
Here the setup code already gets an instance with Branch.getAutoInstance(this), so we can just chain the registration:
Branch.getAutoInstance(this).enableFacebookAppLinkCheck();
It looks like the getAutoInstance above doesn't actually fully initializes the instance, so you can call enableFacebookAppLinkCheck right after, and the instance gets fully initialized after the first use.

Android, Bluemix Error 401 : You are not authorized

I downloaded the sdk from here, created an application but when i run the app the logcat notifies:
Error 401, Failure: You are not authorized.
I tested the Bluemix app with the sample code you can find here, obviously switching the default parameters with my app's ones.
Solved.
I downloaded the April jars, the most recent ones. That worked.
A 401 error sounds as if the Mobile Application Security (MAS) is not set up correctly. Could you try going to your mobile back end on Bluemix, clicking the MAS service, turning the "Enable Client List" switch to on, and then adding your bundle id under iOS? Additionally, confirm that you've copied the client-id & client secret correctly into the properties file for the application.

500 Server Error using Python

Please bear with me as I am a complete noob and trying to create a database for my app using App Inventor.
According to Google App Launcher, I have successfully created my app. However, when I load mcdougaltextspeak.appspot.com into my browser, I get the following message:
Error: Server Error
The server encountered an error and could not complete your request.
If the problem persists, please report your problem and mention this error message and the query that caused it.
I am following the directions provided on http://appinventorapi.com/program-an-api-python/ and I'm sure my issue is because I am not correctly modifying the default app.ymal file
Here's what I have according to the directions:
application: textspeakedtech597
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /images
static_dir: images
- url: .*
script: main.py
I initially just changed myapp to mcdougaltextspeak, however I got a message that I needed to modify the code for python 2.7 according to this site:
https://developers.google.com/appengine/docs/python/python25/migrate27
This site also included modifications for other things, so I am wondering if my error stems from this. The directions do not make note of modifying any other code. Do I need to modify/add the code that appears on the migrate to python 2.7 page (see above link) and if so where does it go.
My app is stuck without a location to hold data.
Any advice on how to proceed is greatly appreciated.
Have you actually created an app on https://appengine.google.com?! You need to do that first, then your app.yaml should contain the appid that you have created i.e. application: mcdougaltextspeak & not what it is in the tutorial.
After you've edited the app as you want, you must then deploy the app to the Google App Engine Servers (refer to the GUI deploy). You would get detailed logs when deploying, which would tell if the deployment was successful or not.
After deploying, you can then goto https://mcdougaltextspeak.appspot.com & play around with your online app. If you still get errors, check https://appengine.google.com/dashboard?&app_id=mcdougaltextspeak for the logs & report them here.

unable to cast to personal whitelisted receiver app

I have successfully used the Android TicTacToe app to cast to the TicTacToe receiver app (AppID "TicTacToe"), using unmodified code from the TicTacToe example on github.
Next, I tried to use my personal receiver app. I got the email a couple of hours letting me know that my device was whitelisted and providing the AppID. I put the AppID in line 90 on GameActivity.java (not line 91, as stated in the instructions), and I also put it in line 35 of tictactoe.html (this step was missing from the instructions, but I assume it is needed). I also followed all steps in the Common Errors section of the instructions.
When I click the Start button in the Android app, the Tic-Tac-Toe board appears in the Android app, but the Chromecast device does not noticeably react.
Here is the LogCat:
07-28 00:13:47.776: W/StartSessionTask(10892): StartApplicationRequest failed with status: -4
07-28 00:13:47.826: E/ApplicationSession(10892): StartSessionTask failed with error: failed to start application: request failed
07-28 00:13:47.826: D/GameActivity(10892): start session failed: failed to start application: request failed
Try checking the box that says "Send this Chromecast's serial number when checking for updates".
Mine didn't work at first, after doing this and restarting mine seemed to pick up the whitelisted appID.
As mentioned by the author of question: Make sure to do from ChromeOS, Windows or Mac OSX client until they fix the issue from Android app.
Clients can be downloaded here: https://cast.google.com/chromecast/setup
This was fixed for me after I restarted the chromecast by removing power.
I tried Aaron's answer several times (was finally able to get the setting to stick using the Chromecast Mac app) but it still was giving this same error.
Then, I discovered I actually uploaded the receiver file to the wrong url. So double check which url was actually whitelisted!
Though even after fixing the url it still was broken. So I think I must have entered the wrong serial number when I made the whitelist request. I resent the whitelist request and the new app ids are working properly.
I solved same problem by using HTTP instead of HTTPS for my local hosted receiver, it seems Chromecast looks for valid certificate.

Categories

Resources