Exemple #1
0
        public IOSPushNotificationService(string p8key, string p8keyID, string teamID, string appBundleID)
        {
            tokenProvider = new TokenBasedAuthentication(p8key, p8keyID, teamID);
            var jwt = tokenProvider.GetJwt();

            if (!string.IsNullOrEmpty(jwt))
            {
                aPNsSender = new APNsSender(jwt, appBundleID);
            }
        }
Exemple #2
0
        public IOSPushNotificationService Build()
        {
            //產生JWT
            tokenProvider = new TokenBasedAuthentication(_p8key, _p8keyID, _teamID);
            var jwt = tokenProvider.GetJwt();

            //初始化推播類
            if (!string.IsNullOrEmpty(jwt))
            {
                aPNsSender = new APNsSender(jwt, _appBundleID);
            }
            return(this);
        }