Google DFP's performClickOnAssetWithKey:customClickHandler does not work with swift - swift

I want to use DFP with swift.
I'm trying to use performClickOnAssetWithKey:customClickHandler method for reporting click.
https://developers.google.com/mobile-ads-sdk/docs/dfp/ios/native
But, it doesn't work and the closure doesn't work as well.
Have anyone used this method?

Finally, I found the answer.
GADNativeCustomTemplateAd has variable name googleClickTrackingURLString. then we can get the value nativeCustomTemplateAd.valueForKey("googleClickTrackingURLString")
And after I accessed the url, clicking report counter ran correctly.
In conclusion, I didn't use performClickOnAssetWithKey:customClickHandler method.

Related

I'm using the https://pub.dev/packages/flutter_callkit_incoming. Nothing happens when I use the start call function. Is it something I'm doing wrong?

I have never used flutter_callkit_incoming dependency before and I seem to have problems.
Can I get help from anyone
This is the code that calls
I want to link it with fcm.
Try adding a seState({}); inside your function.

Do PayPal smart buttons require an intent?

I recently created some buttons and copied the code directly from their website. I copied and pasted exactly what they gave me. However, when I checked this morning I noticed that there was a warning in the console. When I checked their documentation I saw that leaving the "intent" parameter empty defaulted to "capture". Now, the buttons give me the following warning: "Expected intent=subscription to be passed to SDK, but got intent=capture". I don't see "subscription" as an intent value mentioned in their documentation. Has anyone experienced this problem?
Below is the warning given in the console:
smart_button_validation_error_expected_intent_subscription
Expected intent=subscription to be passed to SDK, but got intent=capture
The warning was added recently; that intent=subscription query string parameter will be required in some future time.
The future requirement hasn't made its way into the documentation yet, but I expect you'll see it there soon.
Basically, add intent=subscription to your SDK line now when using subscriptions for them to be future-proof.
This hardly seems like a future proofing... What about if I want to use both createOrder and createSubscription with the same sdk? Adding intent=subscription breaks createOrder. What would be a proper solution in this case?

error: <EXPR>:3:1: error: use of unresolved identifier

Ok, this variable named iap can't be viewed. I know it's possible. Can somebody explain how viewing variables works and why it is not showing in my condition? I'm looking for understanding how this works. I've already tried the approach of trying all the options in the posts on the stack overflow and the rest of the internet. So any solution without an explanation of why it works is useless.
If you put your breakpoint at the end, the breakpoint happens at the exit of the function, when all local variables of function are already destroyed. Add something at the end.

What should I use for i18n in Flutter: S.of(context) or S.current?

I'm using the i18n plugin for Flutter (I believe it's this one) that comes with Android Studio.
And in every example I see it says to use S.of(context).my_string to get the Strings but it always returns null.
If I use S.current.my_string, it seems to work.
So is S.current the right way to do it and every doc/tutorial out there is wrong, are they the same or what?
What I'm basically asking here, is what is the difference between them.
Seems like S.of(context) is initially available way to access localised string.
But sometimes you need to use it without Build Context (in ViewModel, for example). So S.current was added for these cases.
More info here

How can I check the embedded functions definitions in swift?

I am learning Swift by myself on MacOS. When following the tutorial and practicing the array function: <array_name>.sort(), I can get it executed but I always wonder how it works and what is the actual algorithm inside it.
So is there any way to check the certain function definitions?
If you want to check the declaration of the function/class, you can command-click on it. If you want the documentation, you can either option-click it or check it on the API reference page. If you want to see the implementation details of the Swift standard library, check the source code here at GitHub. If the implementation you are checking is in a non open-source APIs though, you can't quite check it.