Facebook Analytics not working with ios device - ios

I had added app analytic for such events in my application which
perfectly works with iOS Simulator, but not with iOS device
When I run it on iOS Simulator, it gives me below log
Events: [
{
"event" : {
"_eventName" : "XXX",
"_logTime" : 1446626494,
"User ID" : "159",
},
"isImplicit" : false
}
]
Flush Result : Success
When I run it on iOS device, it gives me below log
Events: [
{
"event" : {
"_eventName" : "XXX",
"_logTime" : 1446626494,
"User ID" : "159",
},
"isImplicit" : false
}
]
Flush Result : No Connectivity
Please help me if anyone know issue.

Make sure that you are logged in with Developer Facebook ID in that
iOS device from which you had generated Facebook App ID.

Related

iOS Push notification service extension (didReceive) is not called

I've set up the push notification service extension in xCode.
I've set target Deployment version to 13.0 (app is 13.0 as well)
Info.plist of an extension has correct NSExtensionPrincipalClass
To test, I'm running extension target and selecting app
I'm testing everything on a device that's running iOS 14.2
I've tried following payload:
{
"gcm.message_id" : "XXXXX",
"type" : "XXXXX",
"url" : "XXXXX",
"body" : "XXXX",
"title" : "XXX",
"google.c.a.e" : "XX",
"aps" : {
"mutable-content" : 1,
"alert" : {
"title" : "Test",
"body" : "Test"
},
"category" : "XXXX",
"content-available" : 1
},
"channel_id" : "XXXX"
}
I also tried excluding mutable-content but service extension still didn't get called.
I also tried with simpler payload like this:
{
"aps" : {
"mutable-content" : 1,
"alert" : {
"title" : "Test",
"body" : "Test"
},
"category" : "XXXX",
"content-available" : 1
}
}
No luck here either, both with and without mutable-content
I can always see a push notification as a result of testing but the breakpoint in extension `didReceive` method is not triggered. Also the payload is not modified in any way.
Methods like restating device, restarting macbook and deleting derived data didn't work as well
I managed to solve this buy deselecting Copy only when installing in app target -> Build Phases -> Embed App Extensions

Flutter IOS firebase_message only work in firebase console

i've developed crossplatform app using flutter with firebase_message plugin.
it works well in android system but push notification does not work in IOS partially
when i try to send push notification from firebase console web to all of IOS devices, it works well
but if i try to send using POST method with
<header start>
Authorization : <Firebase server key>
<header end>
{
"collapse_key" : "type_a",
"priority" : "high",
"notification" : {
"body" : "bd",
"title": "tt",
"android_channel_id": "noti_push_NEW_PLAY"
"sound": "NEW_MESSAGE.wav"
},
"data" : {
"click_action": "FLUTTER_NOTIFICATION_CLICK"
"type": "NEW_MESSAGE",
},
"apns": {
"payload": {
"aps": {
"sound": "NEW_MESSAGE.wav",
}
}
},
"to" : <token>,
}
push notificaion does not works in IOS with error NotRegistered
{
"multicast_id": <returned id>,
"success": 0,
"failure": 1,
"canonical_ids": 0,
"results": [
{
"error": "NotRegistered"
}
]
}
i don't think it is related with settings, because i can send push message to all IOS devices from firebase web console. but if i try to send it tor specific device, i can't.
i followed all step firebase setup, APN certificate, Apple id, Adding Xcode push notification capablity, etc...
what's the problem???
thanks
I've just resolved it to add
FirebaseAppDelegateProxyEnabled = YES
in info.plist
Not Receiving push notifications from firebase

Internal server error. No devices found exception

I get the following error for iOS when I tried to send push notification via MFP console
{
"code": "FPWSE0009E",
"message": "Internal server error. No devices found.",
"productVersion": "8.0.0.00-20170220-1900"
}
The device is active . The is the result from the "Devices" API
{
"productVersion": "8.0.0.00-20170220-1900",
"totalListSize": 4,
"items": [
{
"id": "0AC11F77-A89A-4616-9085-4F6009329F3",
"lastAccessed": "2017-07-12T16:13:56.985Z",
"status": "ACTIVE",
"deviceOs": "ios 10.2.1",
"deviceModel": "iPhone",
"applicationDeviceAssociations": [
{
"appName": "RandstadJobsiOS",
"appId": "com.randstadusa.randstadjobs$ios$2.0.1",
"certSerialNumber": "",
"deviceId": "0AC11F77-A89A-4616-9085-4F6009329F3",
"status": "ENABLED",
"deviceStatus": "ACTIVE"
}
]
},
..
Push is working for android.
The iOS push certification is valid and will expire in 2018. I used the same cert in prod and receive push notification
Additionally,I tried to debug in Xcode and it does the following
MFPPush.isPushSupported -- return true
MFPPush.initialize - return success
However, it does not execute the MFPPush.registerDevice in the code
** Update
#Vivin
When the the Subscription API is executed I get the result
{
"code": "FPWSE0001E",
"message": "Not Found - The target resource 'PushDevice' does not exist. Check the '0AC11F77-A89A-4616-9085-4F6009329F3' parameter.",
"productVersion": "8.0.0.00-20170220-1900"
}
Please let me know how to debug this issue

Getting notification in console but not in notification center

Coding iOS app in react-native (0.35.0) and using iPad mini (9.3.5) as a test device. Already made Android app with successfully implementing react-native-fcm module for notifications.
Problem I'm facing now in iOS development is that I do receive notification while app is in background but I do not get it in notif center (I can just catch it in console). I have no idea why is it happening.
This is the module I'm using react-native-fcm . I've followed all the instructions in Cocoapods and in manual integration but I can't make it work. I get no errors what so ever. Tried by directly pushing app to device trough xCode and by archiving it (thought that it might be bundling problem).
Any help would be highly appreciated (even though if someone hasn't worked in react-native but ran into this problem in for example swift). If needed I can provide more information.
Best regards,
Bepo.
EDIT:
I'm sending this JSON:
{
"notification" : {
"body" : "Notif body",
"title" : "notif",
"icon" : "myicon",
"sound" : "default",
"vibrate": "default",
"extra" : "Some extra I need"
},
"data" :{
"redirectUrl" : "Url that I need to redirect person after it clicks on notif"
},
"to" : "token that I've gotten",
"content_available": true,
"priority" : "high",
"show_in_foreground": true
}
with headers:
Content-Type:application/json
Authorization:key= my Api key on firebase
FCM response:
{
"multicast_id": ***************45844,
"success": 1,
"failure": 0,
"canonical_ids": 0,
"results": [
{
"message_id": "0:********************a1027b"
}
]
}
Notification i'm catching in console:
{ notification:
{ title: 'notif',
sound: 'default',
vibrate: 'default',
icon: 'myicon',
extra: 'Some extra I need',
sound2: 'default',
e: '1',
body: 'Notif body' },
redirectUrl: 'Url that I need to redirect person after it clicks on notif',
collapse_key: 'My app id',
opened_from_tray: 0,
from: '*********' }

get device uuid ionic ios app

In my app i want to get the device uuid or udid so that i can save it in my database.
for my android app when i run this code in my js file
.factory('Service', function($state) {
var service = {
login: function(user, new_device_status) {
if(window.cordova) {
var params = {
organization: user.orgCode.$modelValue,
email: user.email.$modelValue,
password: user.password.$modelValue,
device_uuid: window.device.platform == 'Android' ? window.device.uuid : window.device.udid,
new_device: new_device_status
};
}
}
}
})
it works and returns the uuid of the device but in my ios app when i try this it doesnt work or when i try
window.device.udid
it still doesnt work in my ios simulator. what can i do?
Solution 1 :
Add device plugin :
cordova plugin add org.apache.cordova.device
In your controller :
module.controller('MyCtrl', function($scope, $cordovaDevice) {
var uuid = $cordovaDevice.getUUID();
});
Answer from : How to get the device UUID in ionic framework
Solution 2 :
Use IDFVPlugin :
cordova plugin add https://github.com/jcesarmobile/IDFVPlugin.git
In your controller :
window.IDFVPlugin.getIdentifier(function(result){
alert(result);
},function(error){
alert(error);
});
Sources :
https://github.com/jcesarmobile/IDFVPlugin
http://forum.ionicframework.com/t/how-to-get-iphone-unique-id-udid-in-ionic-framework-script/9575
I hope it will help you.
but be aware, the UUID is not the same thing as the UDID.
Differences between UDID and UUID
the UUID is the app specific id that changes when you remove the app or update it sometimes even, and the UDID is the unique id from the phone itself.

Resources