The docs for UIUserNotificationSettings is here.
Previously, I added a category to the UIMutableUserNotificationCategory and was able to get custom actions/buttons in the system notifications for iOS 8. Now, I want to remove them. I removed that code but when I tested the push notification with that category, the custom action still shows up.
My guess is that the notification settings is saved the the UIUserNotificationSettings which I don't have control over. Uninstalling and reinstalling the app does not seem to reset the notification settings for my app.
How do I get the app to stop responding to custom actions triggered by a category?
Thanks!
PS: An example payload that I used for the push notification which still works after I removed the code from the app:
{ "alert": "asdf", "sound": "default", "category": "AN_ACTION" }
Related
I'm developing a teams app (tab). Use manifest like this (the app is available in a team, chat, and in a meeting)
"configurableTabs": [
{
"configurationUrl": "https://.....",
"canUpdateConfiguration": true,
"scopes": [
"team",
"groupchat"
],
"context":[
"channelTab",
"privateChatTab",
"meetingSidePanel",
"meetingStage"
]
}
],
The problem is, when I add a tab to a MEETING, it disappears after a few seconds after being added (!!!) o_O. That is, I add the tab; the tab stays visible in the meeting for something like 5 seconds, and then it just disappears, and then the default meeting tab is activated.
Also, the app is not shown in the "add an app", but displayed in the generic list:
Is there some setting I'm missing? Should the application be published to behave normally in the meeting? When I add the same app to a chat, or to a team, everything works as expected. Any help is appreciated.
Like suggested above by #Meghana-MSFT, adding meetingChatTab solved the issue.
Found related note here:
https://blog.thoughtstuff.co.uk/2021/01/how-to-turn-a-teams-tab-into-a-in-meeting-side-bar/
Gotcha! – There seems to be a bug at the moment, where an application needs to have the “meetingChatTab” context added, otherwise it won’t show up in the final Add a tab dialog. So, even if you don’t want your application to interact via the chat tab, it looks like you have to add it for now. This feels like a bug so I would also keep an eye on this as I would expect this requirement to be removed in the future.
I have add fcm in my application and all things but i can see notification body in my xcode console but in device its not showing also try in foreground mode not working.
I add FirebaseDelegateProxyEnabled in my info.plist
I have added background mode and push notification
Even i have added APNs Authentication Key But still is not working. I don't know what is remaining i can see my notification in console but why its not showing in device i even i try to minimize the app
Here is my console its showing notification data
2021-07-08 17:21:54.566047+0500 Runner[30106:10113438] flutter: on message {from: 110426208872, collapse_key: com.igidrive, notification: {e: 1, body: test again 123}}
I had this issue a week ago
I don't see your code here for the app delegate.
You can please verify did you add the below code in your AppDelegate.swift if not then please add.
if (#available(iOS 10.0, *)) {
[UNUserNotificationCenter currentNotificationCenter].delegate = (id<UNUserNotificationCenterDelegate>) self;
}
Also, make sure you are asking user permission
myFirebaseMessagingService.requestNotificationPermissions(
const IosNotificationSettings(
sound: true, badge: true, alert: true, provisional: false));
Change this line in your info.plist
FirebaseAppDelegateProxyEnabled: false
If everything is good then uninstall the app and try again installing this works some time.
I am trying to add push notification service (Remote) to my OSX app. I send the following payload and was able to get notification in my desktop. But the issue is with buttons.
{
"aps": {
"alert": {
"title": "Game Request",
"body": "Bob wants to play poker",
"action-loc-key": "PLAY"
},
"badge": 5
},
"acme1": "bar",
"acme2": ["bang", "whiz"]
}
I am able to get the notification, but the button "Play" will show
up only if I hover over the notification. Any thoughts on this behavior?
Also, Can I add multiple buttons as part of remote push notification
?
I found some samples on iOS, but no concrete samples regarding OSx. Any help or guidance really appreciated.
By default "Notification style" is banner on OSx. Only for "Alert" style It will show buttons. So changing to "Alert" it starts showing buttons.
I have successfully set up push notification using firebase and linked it up Azure notification hub using this guide from the Microsoft docs:
https://learn.microsoft.com/en-us/azure/notification-hubs/xamarin-notification-hubs-push-notifications-android-gcm
However I am now trying to push notification to specific devices using tags. There isn't currently a xamarin c# document. I have done some research around the area and found people solving what seems to be the same problem using dependency injection (which feels a little complex?). I have also found these two questions/answers:
How to push notification to specific users in Xamarin.Forms Android?
https://forums.xamarin.com/discussion/85935/how-to-push-notification-to-specific-users-in-xamarin-forms-android
Both of which point to the method "OnRegistered" which i don't seem to have? i've had another look through the documentation I followed to set up notifications in the first place and I seem to have followed it correctly?
I have the following code for android:
private void SendRegistrationToServer(string token)
{
// Register with Notification Hubs
hub = new NotificationHub(ApplicationConstants.NotificationHubName,
ApplicationConstants.ListenConnectionString, this);
var tags = new List<string>() { };
var regID = hub.Register(token, tags.ToArray()).RegistrationId;
}
I can obviously set the tags manually there, however how do i 'call' this Method again if the tags need to be changed?
So bottom line, my question is how do i set up push notification to specific devices on xamarin.forms android/ios?
Thanks.
I encountered a facebook login problem. I installed FB SDK 3.0 and sample projects seemly run well --- not quite sure though. When I create a button in my own project and try to log in to Facebook, I always get FBSessionStateClosedLoginFailed from sessionStateChanged method, although I apparently get the page "You have already authorized this app. Press Okay to continue". I also tried log out through Simulator Safari facebook page, and re-launched my project and I got new username/password page and I then logged in, but I still get FBSessionStateClosedLoginFailed!
A few more observations.
1, I got FBSessionStateClosedLoginFailed thru NSLog, the log comes up right after I clicked Okay button on the Facebook page "You have already authorized this app.
2, I tried clean xcode project cache, but no help.
Kind of frustrated. I wonder if any of you can help on this problem. Appreciated!
-Tony
Addition:
I did a bit more research, and I found what I have is probably a typical problem, as Facebook highlight here ("Pro-tip 3: Complete all iOS App Settings" section in page http://developers.facebook.com/docs/howtos/login-with-facebook-using-ios-sdk/). The image with a big red cross over iPhone is exactly what I have. From xcode project, I click my login button, and I'm directed to this page, and every time I have to click "Okay" on this page (let me call it Okay_page) to go back to my app in Simulator, however with login status as FBSessionStateClosedLoginFailed. I checked bundle ID, I have it correct. I don't have a 'YOUR_IPHONE_APP_STORE_ID' yet, which I believe I need pay Apple to get and I will do it later but not while I'm still working on it.
Now get a couple of questions:
1, Do I have to have YOUR_IPHONE_APP_STORE_ID to skip this Okay_page?
2, Does this (not automatically re-directed back to my app from this Okay_page) have anything to do with that I always get a login status of FBSessionStateClosedLoginFailed when I manually click Okay in this Okay_page and return to my app in Simulator? In another word, is (that I have to manually click Okay to get back to my app in Simulator) (the reason I got a status of FBSessionStateClosedLoginFailed)?
Did you have set this function in AppDelegate?
-(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
return [FBSession.activeSession handleOpenURL:url];
}
I had the same issue:
We created the facebook app (developer.facebook.com) setting our
bundle id (ex. com.MyCompany.MyApp)
Off course, created our iOS app with the same bundle id
After delivered our app to the client, he changed the bundle id
without notify us.
Obviously he started to get FBSessionStateClosedLoginFailed errors!
So, you probably have different bundle id's between your iOS project and your Facebook App.
I had this error and couldn't resolve it for quite some time. It turns out that if you are using the native iOS Facebook account in settings and choose "no" for allow Facebook for this app, the app is blocked by the OS. You will always get the FBSessionStateClosedLoginFailed error and there is nothing you can do inside the code to fix this (99% sure). The best you can do is alert the user to check out the settings.
i am typing wrong line in given below method. self.session was nil
return [self.session handleOpenURL:url];
it should be
return [[FBSession activeSession] handleOpenURL:url];
Use Following Method.
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation {
// attempt to extract a token from the url
return [[FBSession activeSession] handleOpenURL:url];
// return [self.session handleOpenURL:url];
}
I fixed this problem after I reset the simulator. iOS Simulator - Reset Content and Settings..., hope to help.
I had this issue because I was calling [FBSession.activeSession close] in my applicationDidEnterBackground: app delegate callback. This closed the session so that when the redirect brought the app back up to open the session, it failed because it had been put into the closed state.
Make sure that you're not closing the session anywhere before you get to the Okay page.
go to Facebook.com. Open your application on the left panel -> Status & Review -> there is a toggle with text "Do you want to make this app and all its live features available to the general public?". Turn it on
well. I followed FBLoginCustomUISample somewhere on github.com and it was a working example of facebook login implementation from facebook itself. You can also read my workaround while creating facebook login feature in a iOS app. Here is a link form me:
Native iOS Facebook SSO won't return to app