Stop the UnityAds Cookie permission seeking - ios

I've just added UnityAds to my app and whilst testing production I noticed instead of an ad, it popped up a request to place cookies on the users device.
The SDK integration was fine but is an absolute deal breaker for me. Is there any way to turn on a setting where it doesn't do this? I turned off the seek personalised ads request in the iOS app, I don't want my users interrupted like this. I'd like to reject all on their behalf before they see it.

Yes, you can do that. Use my following code to pass the consent flag to Unity Ads SDK. And make the Unity Ads SDK not request cookie permissions for your users by setting this flag to false
MetaData gdprMetaData = new MetaData("gdpr");
gdprMetaData.Set("consent", "false");
Advertisement.SetMetaData(gdprMetaData);
// then Setup Unity ads
For people who is using Ironsource Mediation and have Unity Ads in waterfall but having the same problem.
IronSource.Agent.setConsent(false);
Warrning: but if you do that, all ads will not be personalized. The best way I recommend to you is:
On first opening, You need to show ATT (Application Tracking Transparency) popup. Then if the user clicks Allow then you set the consent to true if the user clicks Don't allow (Require apps not to track) then you set the consent false.
by the way:
If you don't want to show ATT in the first time. You need to set consent as false until ATT shows
*** Edit *** Ok found it in Swift, posting the code for posterity - Magoo
let meta = UADSMetaData()
meta.setRaw("gdpr.consent", value: false)
meta.commit()

Related

Xamarin forms how to log in with Apple account

I'm trying to publish my first xamarin forms app on IOS. I barred the issue of login with the Apple account.
I have 4 questions, please.
1- If I implement Sign in with Apple only for IOS 13+ will it be accepted? :(
2- I'm trying to use Xamarin Essentials to log in to IOS 13+ as shown in this article:
Xamarin Essentials
// Use Native Apple Sign In API's
r = await AppleSignInAuthenticator.AuthenticateAsync();
But I only get back the idToken. AccessToken, name and mail return null. Am I missing something?
3 - And finally I tried to use the plugin.firebaseAuth version 4.0.0-pre01:
Link plugin
// For iOS
var credential = CrossFirebaseAuth.Current.OAuthProvider.GetCredential("apple.com", idToken, rawNonce: rawNonce);
var result = await CrossFirebaseAuth.Current.Instance.SignInWithCredentialAsync(credential);
// For Android
var provider = new OAuthProvider("apple.com");
var result = await CrossFirebaseAuth.Current.Instance.SignInWithProviderAsync(provider);
It provides an example using prism to deal with this, but when I install the plugin in this version the application is no more than a splash screen and closes, without showing an error in the output. What am I doing wrong? :(
The first link seems promising for iOS less than 13 and Android using Asp.NET. However in the application I use only the Firebase ClouFirestone and Firebase Hosting for the Administrative Panel. Is it possible for me to sign in Apple without the services of a different backend?
I am very grateful for any light on the path I must follow
1- If I implement Sign in with Apple only for IOS 13+ will it be accepted?
It depends, if they don't find any other issues or violation, it will get accepted.
2- I'm trying to use Xamarin Essentials to log in to IOS 13+ as shown in this article: But I only get back the idToken.
Apple will only provide you the requested details on the first authentication. After that first authentication, you will only get the User Id so be sure to store the details that first time in case you need them.
This feature needs to be tested on a physical device running iOS 13. The simulator is not reliable, it doesn’t always work properly.
Should follow the design guidelines when implementing Apple Sign In. You can find it here: https://developer.apple.com/design/human-interface-guidelines/sign-in-with-apple/overview/

Does Facebook Deferred Deep Linking on iOS work, and how to test it before publishing the app on Store?

I have a problem with Facebook Deferred Deep Linking on iOS. DEEP LINKING WORKS, BUT DEFERRED DEEP LINKING DOESN'T WORK. I have read a lot about this problem and still cannot find the solution.
I have set up deep linking and it works. When I also try to test deep linking on App Ads Helper and click on "Test deep link", enter deep link and click on "Send notification", I receive a notification on Facebook which opens my app, and this deep linking works. But, when I click "Select Deferred", I don't receive anything. I try to delete app and reinstall it, but [FBSDKAppLinkUtility fetchDeferredAppLink:...]; method doesn't get any deferred deep link after new install.
[FBSDKAppLinkUtility fetchDeferredAppLink:^(NSURL *url, NSError *error) {
if (error) {
NSLog(#"Received error while fetching deferred app link %#", error);
}
if (url) {
[[UIApplication sharedApplication] openURL:url options:#{} completionHandler:^(BOOL success) {
}];
}
}];
In this example, url is always nil.
Note: I still don't have app on Store, so I entered a Apple Id of another application. Even if I had my own app on Store, how could I test deferred deep linking without publishing app on Store?
Also, I have read on Facebook documentation that:
Beginning with iOS 10, iOS doesn't support deferred deep linking, so you can't open content other than the starting screen once people have installed the app. (Source)
So, I am not sure if this is even possible.
Also, I have read another articles on Stackoverflow, but there are not answer that I am looking for, i.e. they look incomplete, or I just don;t see the answer between the lines:
How to use facebook deferred deep linking feature for new installs
and to test the same before publishing iOS App to appStore? -> Answers to this question aren't what I am looking for:
If you want to verify deferred links then check 'Send Deferred' in the dialog.
So, after doing this you need to uninstall the app(if already present) and then install again from the app store. The device in which you will be testing this should have facebook app installed and logged in with the account from which you had sent the "deferred deep link request" from app-ads helper.
Now when you open your app, you should bee able to see your deferred deep link functionality working.
This doesn't work, so that's why I am asking this question.
Also, I have found that I could use Tune SDK for deferred deep linking:
...this is not a problem with the iOS 10 operating system itself. Deferred deep linking works just fine for iOS 10 using the TUNE SDK. (Source)
Also, I have found that I could use Branch.io for deferred deep linking:
With Branch, you get all the basic routing of a Universal Link plus the deferred deep linking and install attribution for the new user acquisition flow. (Source)
I haven't tried Tune and Branch.io. I would like to use Facebook ads and perform deferred deep linking without third party solutions. Is it possible with Facebook, and how to test deferred deep linking for Facebook on iOS?
It worked for us after resetting advertising identifier. Maybe internally they are preventing attribution in the same app twice if it is the same advertising identifier. So go to settings and reset your advertising identifier before testing. Also make sure the phone has not opted out of tracking.
For me, the answer was in my iPhone settings. I had "Limit Ad Tracking" enabled. I don't have much documentation proof that this was causing the issue but after changing it, it is now working. It's worth testing it yourself.
On your iPhone go to: Settings -> Privacy -> Advertising (at the bottom of the page)
There you should ensure that "Limit Ad Tracking" is set to off.
You should then recieve a URL if you have your app URL Scheme correctly set (see here if not) code which for swift should look like this:
AppLinkUtility.fetchDeferredAppLink { [weak self] (url, error) in
guard let self = self else {return}
if (url != nil) {
} else if error != nil {
print("Error: \(error!.localizedDescription)")
}
}
To test the deferred links, you can go here.
A bit late, but per your comment on the previous answer: Once you receive the message:
The link has been queued and is pending you doing a first app launch on your device. This means you need to delete the app, then re-install and open your app. Please first verify your app can handle deferred deep linking by checking the iOS and Android setup information located above.
Delete the application from your device
Open Facebook notifications from your device, you should have a deeplink notification
Selecting the deeplink notification should direct you to the appropriate app store to install the application again
Once installed, launching the application should trigger the intended 'Deferred' deep link
For deferred deep link to work, you also need to be logged in on the Facebook app. The ads helper tool: https://developers.facebook.com/tools/app-ads-helper/ knows your logged in user id on facebook.com. Facebook then uses this info to match your id, the app and the device information and returns an appLink back to your app if so.
Unfortunately, that's not possible on simulator given the limitation to install other apps like Facebook.
Your only option is to use a real device and build your XCode project on it. Make sure you have Facebook installed and that you are logged in with the same user as on your desktop web browser.
If you are running Facebook ads with Deep linking enabled, you can test deferred deep linking setup here: https://developers.facebook.com/tools/app-ads-helper/
You will need to select your app, then you should be able to access the deep-link tester at the bottom of the page (in which you can also select deferred)
Additional info:
So you need to deploy the app to the store? – locoboy Aug 7 '15 at 16:38
For testing Deep Link or Deferred Deep Link as they said before me:
deploy to store not required, use FB Ads panel for testing
check just in case statistic for app installs (not equal zero) - may be AppEvents (automatically logged) doesn't work correct (keep in mind, in the calculation of statistics, there may also be a delay)
Install Facebook application for your device, auth in using the same profile that you use to send notifications (run FB app in background)
Select both 'Send Notification' and 'Send Deferred' check marks (or check only 'Send Deferred' - results will available after manual app reinstall, and don't forgot trigger FBSDKAppEvents activateApp)
Example after successful sending
The main objective - after sending the message you will see it in Facebook! app notifications, with logo + text "Tap to launch your deep link"
Tap on notification

iOS Facebook Account kit - Persist user token when app is opened 2nd time after successful login

My doubt is after successful login using Facebook account kit for the first time, I am reopening the app for the 2nd time. When I open how can I detect and use the existing user Access Token?
I tried by fetching Accountkit.currentAccessToken in appdelegate as a condition to show login page or welcome page. But currentAccessToken returns me null.
I have also enabled "Enable Client Access Token Flow" in app settings.
Kindly help to understand if my approach is right.
self.accountKit = AKFAccountKit (responseType: AKFResponseType.accessToken)
if(self.accountKit.currentAccessToken != nil)
{
//SHOW WELCOME PAGE
}else{
//SHOW LOGIN PAGE
}
I am facing the same issue in Android (not in iOS) but I think the problem is same, since in the document says it so.
this is my code for configuring the login using Email (kotlin, use let to change the val).
val configurationBuilder = AccountKitConfiguration.AccountKitConfigurationBuilder(
LoginType.EMAIL,
AccountKitActivity.ResponseType.CODE)
notice that the response type is AccountKitActivity.ResponseType.CODE
In the document says:
If you began the login session with AccountKitActivity.ResponseType.TOKEN, a logout option is available to remove the stored AccessToken from the device.
So the problem is on the Response type that I use, need to be changed into AccountKitActivity.ResponseType.TOKEN in order to make the token stored on devices.
I have seen some issues with Xcode8 / iOS 10 Simulators and keychain save/retrieval. See https://forums.developer.apple.com/thread/60617
AccountKit stores the accessToken securely in the keychain but there is an intermittent bug on Xcode8 / iOS 10 Simulators that makes read/write from keychain fail.
Can you test if this is also happening on a Device?
Apparently the problem goes away if you add the Shared Keychain Entitlement to your App, but this is still a bug on Apple.

How to accept the google permission prompt by default while using appium

I'm trying to automate the app , but suddenly in middle the google permissions window for permission like phone , location etc pops up , is there any way that I can make sure always permission pop ups are allowed
Try to set desired capabilities:
autoAcceptAlerts = true
Since you said google permissions, I am assuming you are dealing in Android. Also since there is no language tag, I am sticking to Java, you can frame the logic in any language you are using.
Well, its sad to inform you that currently there seems to be no such capability added for android. Though iOS has few similar capabilities.
So, for android what you can do is logically -
If these pop-ups are device dependent, change the device settings that these pop-ups are not allowed.
If these pop-ups are relevant to application permissions, then you must know when they would occur. Just keep a check -
List<WebElement> popUp = driver.findElement(<find the pop up using your locator strategy>);
if(popUp.size()!=0) {
WebElement accept/dismiss = driver.findElement(<find the button accordingly>);
accept/dismiss.click();
}

"Login cancelled by player" callback in facebook api for Unity IOS (only if you have facebook app in device)

I am using unity facebook api 4.3.6 for ios. Its working perfectly fine if I don't have #facebookapp in my device. Once I download it and try login, it takes me to #facebookapp and redirect again to my game with callback
FB Login callback : {"is_logged_in":false, "user_id":"", "access_token":""}
Login cancelled by player
This happens only if I have facebook app downloaded! I think its some how cache issue but not sure exactly what is it. Any luck?
I believe this is not connected with Unity.
Here is few reasons I faced
You need to ask read and write permissions separately. Wait until you get read permissions than send request for write permission.
Make sure your app is allowed to login ( if you have FB app installed on your device )
Make sure you have your app bundle identifier added to developer.facebook.com
Here is what helped me fixed that problem with Unity Facebook-Android.
setting the sandbox mode ON:
Go to https://developers.facebook.com/apps
Select the respective app from the drop down.
Go to 'Status & Review' from the table in the left side of the page.
Do you want to make this app and all its live features available to the general public? - Select switch to set YES/NO value.
if the ON/OFF button is disable, please go back to Settings and enter a valid email address.
I understood why when the device is installed a facebook app, my app can't login facebook.
First : software OpenSSL create keyhass wrong. I have downloaded OpenSSL from here : http://code.google.com/p/openssl-for-windows/downloads/list , and it creates keyhash wrong.
I have used other OpenSSL sofware, you can download it here : https://www.dropbox.com/sh/t6tt44dc2nm6vza/6mp1W74GiZ , it is create keshash right.
Second: In class FacebookAndroidUtil.cs , line 62, you add System.Environment.GetEnvironmentVariable("HOMEDRIVE") before System.Environment.GetEnvironmentVariable("HOMEPATH"). Facebook SDK requires a file debug.keystore in : C:\Users\UserName.android\debug.keystore.
If the Unity Editor, Edit Setting Facebook has yet to create android debug hash key. Then use the Eclipse Software, create and run onr any project. Eclipse will generate a debug.keystore. If it is't create in folfer : C:\Users\UserName.android\debug.keystore , then find it, coppy and paste into C:\Users\UserName.android\debug.keystore
Third: publish your app in Facebook, so be sure it is:"This app is public and available to all users".

Resources