Git Product home page Git Product logo

Comments (6)

sergio11 avatar sergio11 commented on June 13, 2024 1

yes, permissions are enabled

from pushnotificationplugin.

rdelrosario avatar rdelrosario commented on June 13, 2024

Can you send me your App Delegate class?

from pushnotificationplugin.

rdelrosario avatar rdelrosario commented on June 13, 2024

Also are you testing on a physical device?

from pushnotificationplugin.

sergio11 avatar sergio11 commented on June 13, 2024

Thanks for replying, all the tests have been on a physical device.

Here's the APPDelegate code, I've also tried the sample project and I've not even been able to get a token

using System;
using Bullytect.Core.OAuth.Models;
using CarouselView.FormsPlugin.iOS;
using FFImageLoading.Forms.Touch;
using Foundation;
using Lottie.Forms.iOS.Renderers;
using MvvmCross.Core.ViewModels;
using MvvmCross.Forms.iOS;
using MvvmCross.Platform;
using Plugin.PushNotification;
using Refractored.XamForms.PullToRefresh.iOS;
using UIKit;
using UXDivers.Artina.Shared;

namespace Bullytect.iOS
{
    [Register("AppDelegate")]
    public partial class AppDelegate : MvxFormsApplicationDelegate
    {
        public override UIWindow Window { get; set; }

		public override bool FinishedLaunching(UIApplication app, NSDictionary options)
		{
			Window = new UIWindow(UIScreen.MainScreen.Bounds);

            global::Xamarin.Forms.Forms.Init();
			CachedImageRenderer.Init(); // Initializing FFImageLoading
			AnimationViewRenderer.Init(); // Initializing Lottie
			PullToRefreshLayoutRenderer.Init();
			XFGloss.iOS.Library.Init();
            CarouselViewRenderer.Init();
			// Presenters Initialization
			global::Xamarin.Auth.Presenters.XamarinIOS.AuthenticationConfiguration.Init();

            GrialKit.Init(new ThemeColors(), "Bullytect.iOS.GrialLicense");
           
			FormsHelper.ForceLoadingAssemblyContainingType(typeof(UXDivers.Effects.Effects));
			FormsHelper.ForceLoadingAssemblyContainingType<UXDivers.Effects.iOS.CircleEffect>();

			var setup = new Setup(this, Window);
			setup.Initialize();

			var startup = Mvx.Resolve<IMvxAppStart>();
			startup.Start();

			LoadApplication(setup.FormsApplication);

			Window.MakeKeyAndVisible();

            PushNotificationManager.Initialize(options, true);

			return true;
		}


		public override void RegisteredForRemoteNotifications(UIApplication application, NSData deviceToken)
		{
			PushNotificationManager.DidRegisterRemoteNotifications(deviceToken);
		}

		public override void FailedToRegisterForRemoteNotifications(UIApplication application, NSError error)
		{
			PushNotificationManager.RemoteNotificationRegistrationFailed(error);

		}
		// To receive notifications in foregroung on iOS 9 and below.
		// To receive notifications in background in any iOS version
		public override void DidReceiveRemoteNotification(UIApplication application, NSDictionary userInfo, Action<UIBackgroundFetchResult> completionHandler)
		{

			PushNotificationManager.DidReceiveMessage(userInfo);
		}

		public override bool OpenUrl ( UIApplication application, NSUrl url, 
                                      string sourceApplication, NSObject annotation)
		{
            #if DEBUG
			System.Text.StringBuilder sb = new System.Text.StringBuilder();
			sb.AppendLine("OpenURL Called");
			sb.Append("     url         = ").AppendLine(url.AbsoluteUrl.ToString());
			sb.Append("     application = ").AppendLine(sourceApplication);
			sb.Append("     annotation  = ").AppendLine(annotation?.ToString());
			System.Diagnostics.Debug.WriteLine(sb.ToString());
            #endif

			// Convert iOS NSUrl to C#/netxf/BCL System.Uri - common API
			Uri uri_netfx = new Uri(url.AbsoluteString);

			// load redirect_url Page
			AuthenticationState.Authenticator.OnPageLoading(uri_netfx);

			return true;
		}
    }
}

from pushnotificationplugin.

rdelrosario avatar rdelrosario commented on June 13, 2024

Do you get the push notification permision request alert?

from pushnotificationplugin.

rdelrosario avatar rdelrosario commented on June 13, 2024

I see you are using FCM on iOS. Please use https://github.com/CrossGeeks/FirebasePushNotificationPlugin instead. Since you are using FCM on both platforms ios and android.

This one you are using is to work specifically with ios APS and android FCM. It has not FCM support on ios platform unless you provide it. so use the Firebase Push Notification plugin instead which already has FCM support for iOS and Android.

from pushnotificationplugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.