Why IAP product count is empty? - testing

I added three inapp purchases to the app and they have "Ready to submit" status.
Can I test them before submitting the application on the simulator?
I'm asking it because
response.products
are empty, when I'm using this method.
func productsRequest(_ request: SKProductsRequest, didReceive response: SKProductsResponse) {
if response.products.count != 0 {
for product in response.products {
print(product.localizedTitle)
}
}
}

You also need to have the "Paid Applications Agreement" signed in App Store Connect before you can test products.
Also, the simulator is always sketchy for testing anything with StoreKit and I recommend testing on a physical device.

Related

WhatsApp Business Platform API using Test account doesn't send the message to Mobile

I have created a WhatsApp Business Platform Test account. I am able to send and receive the hello-world template message but when I send a test message without template(as specified by the api) it doesn't push it to the mobile phone. Strangely I get success response in both cases.
Url: https://graph.facebook.com/v15.0/11ZZZZZZZZZZZZZ/messages
Here are the jsons and their responses
{
"messaging_product":"whatsapp",
"to":"91ZZZZZZZZZZ",
"type":"template",
"template":{
"name":"hello_world",
"language":{
"code":"en_US"
}
}
}
{
"messaging_product":"whatsapp",
"contacts":[
{
"input":"91ZZZZZZZZZZ",
"wa_id":"91ZZZZZZZZZZ"
}
],
"messages":[
{
"id":"wamid.HBgMOTE3MjkwMDIxMzYwFQIAERgSMjZCRkQ3RDc0RjM0QkNEZZZZZZ=="
}
]
}
In these case I successfully receive message on the mobile
{
"messaging_product":"whatsapp",
"to":"91ZZZZZZZZZZ",
"type":"text",
"text":{
"preview_url":false,
"body":"Hello World Testing"
}
}
{
"messaging_product":"whatsapp",
"contacts":[
{
"input":"91ZZZZZZZZZZ",
"wa_id":"91ZZZZZZZZZZ"
}
],
"messages":[
{
"id":"wamid.HBgMOTE3MjkwMDIxMzYwFQIAERgSQUJERkM2RUE1RTEwQTExZZZZZZ=="
}
]
}
However I don't receive message on the mobile.
Is there anything I am missing in the second case?
I was strugging with the same problem, but I figured out that you need to reply back to your first template message with a 'hello' or any kind of reply. Once you reply, only then can you send a message through that watsapp api without a template, or you can inititate conversation through watsapp api.
Hope this answer helps you.

Push notifications stopped being received in iOS 13

I'm using Azure Notification Hub and have a cordova based application . Everything works fine for iOS < 13. For iOS 13 I started experiencing some strange behaviors.
- When using sandbox all is fine
- when using production only first few messages are received. Then the users don't get any notifications. If they relog to app then they can have notifications for some time.
Tried bodies with:
{ "aps": { "alert": "notification message" }}
or
{"aps": { "alert": { "title":"test", "body":"notification message" }}}
I'm adding headers:
{ "content-available", "0"},
{"apns-push-type", "alert" },
{ "apns-priority", "10" }
I had similar problem. Since introduction of iOS 13 I found that you have to make sure your push object is being registered each time you resume the app. The subscription is closed by iOS if it's not reinitialized when resuming the application.

Google Assistant - Account linking with Google Sign-In

I have an Express app which supports Google authentication and authorization via passport. I have begun integrating it with Google Assistant and things were going quite well but I am having trouble with the account linking as described at https://developers.google.com/actions/identity/google-sign-in#start_the_authentication_flow
Using the method in the docs at https://codelabs.developers.google.com/codelabs/actions-2/#4 I was able to get user details but when I try to modify to support
app.intent('Start Signin', conv => {
conv.ask(new SignIn('To get your account details'))
})
and
app.intent('Get Signin', (conv, params, signin) => { ...}
the dialogflow always falls back to my default fallback intent and I get an error in Express console
Error: Dialogflow IntentHandler not found for intent: Default Fallback Intent
My dialogflow intent is set to use webhook and other intents work fine (until I add these sign-in intents!)
Reading this thread Dialogflow IntentHandler not found for intent: myIntent (Dialogflow V2) it was suggested that the intent name rather than the action name is used so I check my Actions on Google simulator and the request contains:
"inputs": [
{
"intent": "actions.intent.SIGN_IN",
"rawInputs": [
{
"inputType": "KEYBOARD"
}
],
"arguments": [
{
"name": "SIGN_IN",
"extension": {
"#type": "type.googleapis.com/google.actions.v2.SignInValue",
"status": "OK"
}
}
]
}
],
so I tried updating my Dialogflow intent name to actions.intent.SIGN_IN and modifying the intent name in my Express app accordingly but it doesn't make any difference.
The simulator response includes:
"responseMetadata": {
"status": {
"code": 14,
"message": "Webhook error (206)"
},
but I'm not sure if that is just because for some reason the intent names are not matching up. Any help much appreciated!
As you speculate in the comments, the issue is that your "Get Signin" Intent isn't registered to get the event indicating that the user has signed in (or failed to). Since there is no such Intent setup, it ends up calling the Fallback Intent, which apparently doesn't have an Intent Handler registered in your webhook.
To make your "Get Signin" Intent get the sign-in event, set the "Event" field to actions_intent_SIGN_IN. (Note the similarity to the Intent name you saw in the simulator, but using underscores instead of dots.)
As an aside, the simulator was showing you what the communication between the Assistant and Dialogflow looks like, so it can be somewhat confusing to understand what Dialogflow is doing with it. It didn't have anything to do with the name of your Intent or anything else.
Finally, it often isn't necessary to do this check. You will know if the user is signed in because either the auth token has been set or the id token has been set (depending on your method of Account Linking).

How to get rid of default_intent in wit.ai

Following is the response for my simple application. I expected it to have an intent as open_screen but it shows the intent as default_intent. where did I made the error.
{
"entities":{
"screen_name":[
{
"confidence":0.9928150760384576,
"start":10,
"end":27,
"body":"inventory console",
"value":{
"value":"inventory console"
},
"entity":"screen_name"
}
]
},
"confidence":null,
"_text":"lets open inventory console",
"intent": "default_intent",
"intent_id": "57bb1f3b-3098-4a17-a0d1-8d41e0"
Thanks for sharing. Do you have a new app (with Stories) or an old app? In the new apps, intent are now trait entities. This is why you may see a "default_intent", but if you use the latest version of the app, it should disappear.

how to share on facebook within OSX app, without facebook Kit?

I'm looking for way to use Accounts information if they configured in OS X, to post to Facebook, without using facebook kit.
I found Social framework but all examples are related to iOS, my App instead should post message from OS X.
Using accounts is a good way to go, here's what I did:
import Accounts
static func post(text:String,completion:(Bool->Void)) {
let accountStore = ACAccountStore()
let accountType = accountStore.accountTypeWithAccountTypeIdentifier(ACAccountTypeIdentifierFacebook)
let options : [String:AnyObject] = [
"ACFacebookAppIdKey": "your app key here, from Facebook apps",
"ACFacebookPermissionsKey": ["publish_actions", "manage_pages", "publish_pages"],
"ACFacebookAudienceKey": "ACFacebookAudienceEveryone"
]
accountStore.requestAccessToAccountsWithType(accountType, options: options) {
granted, error in
if granted {
let fbAccounts = accountStore.accountsWithAccountType(accountType)
if fbAccounts != nil {
completion(true)
} else {
print("no accounts")
completion(false)
}
}
}
}