Git Product home page Git Product logo

Comments (8)

Husseinhj avatar Husseinhj commented on August 30, 2024

pushClientManagerDidReceivedMessage is only fired when realtime parameter in your configuration file is true.

image

from chabok-client-ios.

FarshidRoohi avatar FarshidRoohi commented on August 30, 2024

@Husseinhj realtime is active

Screen Shot 2020-09-29 at 2 14 43 PM

from chabok-client-ios.

Husseinhj avatar Husseinhj commented on August 30, 2024

Try uninstalling & installing again. If it didn't work, set PushClientManager.default()?.logLevel to ChabokLogLevelVerbose and send output log for us.

from chabok-client-ios.

FarshidRoohi avatar FarshidRoohi commented on August 30, 2024
20-09-29 14:30:37.725987+0330 MyZarinPal-v4-iOS[10782:3770522] (CHABOK) debug: didChangeAuthorizationStatus
2020-09-29 14:30:37.727394+0330 MyZarinPal-v4-iOS[10782:3770522] (CHABOK) debug: Location services autorization status is (Not Determined)
2020-09-29 14:30:37.831504+0330 MyZarinPal-v4-iOS[10782:3770522] (CHABOK) debug: [-[PushClientManager applicationWillEnterForeground:]] Calling pending registration & connectToServer
2020-09-29 14:30:37.831596+0330 MyZarinPal-v4-iOS[10782:3770522] (CHABOK) debug: App became foreground
2020-09-29 14:30:37.831818+0330 MyZarinPal-v4-iOS[10782:3770522] (CHABOK) debug: [-[PushClientManager connectToServer]]: Connecting to server @Connecting
2020-09-29 14:30:37.835033+0330 MyZarinPal-v4-iOS[10782:3770522] (CHABOK) debug: App became foreground
2020-09-29 14:30:37.873183+0330 MyZarinPal-v4-iOS[10782:3770522] (CHABOK) debug: Start calling registerForRemoteNotifications in UI thread.
2020-09-29 14:30:37.890422+0330 MyZarinPal-v4-iOS[10782:3770522] (CHABOK) debug: didRegisterForRemoteNotificationsWithDeviceToken called inside of SDK. <MyZarinPal_v4_iOS.AppDelegate: 0x281d574e0>
2020-09-29 14:30:37.890673+0330 MyZarinPal-v4-iOS[10782:3770522] (CHABOK) verbose: didRegisterForRemoteNotificationsWithDeviceToken called in SDK with deviceToken = {length = 32, bytes = 0x08405324 80674f4e 5c40eace e4df247a ... ac1c2df6 dfc70374 }
2020-09-29 14:30:37.894547+0330 MyZarinPal-v4-iOS[10782:3770522] (CHABOK) debug: [-[PushClientManager application:didRegisterForRemoteNotificationsWithDeviceToken:]]: registerDeviceToServer
2020-09-29 14:30:37.894606+0330 MyZarinPal-v4-iOS[10782:3770522] (CHABOK) debug: registerDeviceToServer
2020-09-29 14:30:37.895057+0330 MyZarinPal-v4-iOS[10782:3770717] (CHABOK) debug: [-[PushClientManager registerDeviceToServer]_block_invoke]: registerDeviceWithAdapter2
2020-09-29 14:30:37.897911+0330 MyZarinPal-v4-iOS[10782:3770717] SCNetworkReachabilityScheduleWithRunLoop Success
2020-09-29 14:30:39.873029+0330 MyZarinPal-v4-iOS[10782:3770522] (CHABOK) debug: LBInstallation: Successfully saved <LBInstallation {
    adIdEnabled = 0;
    appBundleId = "***";
    appId = ***;
    appVersion = "2.2.0";
    badge = 0;
    buildExpire = 1632744182000;
    clientVersion = "***";
    connection = Wifi;
    developerAccountInfo =     {
        teamIdentifier = ***;
        teamName = "***";
    };
    deviceId = "***";
    deviceModel = "iPhone 8 Plus";
    deviceToken = ***;
    deviceType = ios;
    id = ***;
    installDate = 1601369056898;
    isGuest = 0;
    isLoggedIn = 0;
    isProduction = 0;
    lastLaunchTime = 1601375239346;
    launchCount = 32;
    launchTime = 1601377237614;
    launched = 1;
    locale = "en_US";
    locationAuthorization = 0;
    manufacturerId = 622ca24a78e0efa65a39f1b0d8479f22;

    newInstall = 0;
    osBuild = 18A373;
    osVersion = "14.0";
    realtime = 1;
    registerTs = 1601370483197;
    releaseMode = 1;
    screenResolution = 1080x1920;
    status = Active;
    subscriptions =     (
        default
    );
    timeZone = "Asia/Tehran";
    tokenStatus = ALLOWED;
    uniqueId = "***";
    userId = ***;
}>
2020-09-29 14:30:39.874404+0330 MyZarinPal-v4-iOS[10782:3770522] (CHABOK) verbose: Register user successfully
2020-09-29 14:30:39.874703+0330 MyZarinPal-v4-iOS[10782:3770522] (CHABOK) debug: No registrationHandler for success
2020-09-29 14:30:39.875067+0330 MyZarinPal-v4-iOS[10782:3770522] (CHABOK) debug: [-[PushClientManager handleRegistrationSuccess]]: Calling connectToServer
2020-09-29 14:30:39.876380+0330 MyZarinPal-v4-iOS[10782:3770522] (CHABOK) debug: [-[PushClientManager connectToServer]]: Ignore connecting to server Connecting
2020-09-29 14:30:40.150655+0330 MyZarinPal-v4-iOS[10782:3770522] (CHABOK) debug: -- Connected to server. Check storage to publish dirty event data.
2020-09-29 14:30:40.151268+0330 MyZarinPal-v4-iOS[10782:3770522] (CHABOK) debug: -- Connected to server. Check storage to publish dirty event data.
2020-09-29 14:30:40.325773+0330 MyZarinPal-v4-iOS[10782:3770522] (CHABOK) debug: registerDeviceToServer
2020-09-29 14:30:40.326145+0330 MyZarinPal-v4-iOS[10782:3770714] (CHABOK) debug: [-[PushClientManager registerDeviceToServer]_block_invoke]: registerDeviceWithAdapter2
2020-09-29 14:30:40.326676+0330 MyZarinPal-v4-iOS[10782:3770714] SCNetworkReachabilityScheduleWithRunLoop Success
2020-09-29 14:30:41.635023+0330 MyZarinPal-v4-iOS[10782:3770522] (CHABOK) debug: LBInstallation: Successfully saved <LBInstallation {
    adIdEnabled = 0;
    appBundleId = "***";
    appId = ***;
    appVersion = "2.2.0";
    badge = 0;
    buildExpire = 1632744182000;
    clientVersion = "4.0.2.2";
    connection = Wifi;
    developerAccountInfo =     {
        teamIdentifier = ***;
        teamName = "***";
    };
    deviceId = "***";
    deviceModel = "iPhone 8 Plus";
    deviceToken = ***;
    deviceType = ios;
    id = ***;
    installDate = 1601369056898;
    isGuest = 0;
    isLoggedIn = 0;
    isProduction = 0;
    lastLaunchTime = 1601375239346;
    launchCount = 32;
    launchTime = 1601377237614;
    launched = 0;
    locale = "en_US";
    locationAuthorization = 0;
    manufacturerId = ***;

    newInstall = 0;
    osBuild = 18A373;
    osVersion = "14.0";
    realtime = 1;
    registerTs = 1601370483197;
    releaseMode = 1;
    screenResolution = 1080x1920;
    status = Active;
    subscriptions =     (
        default
    );
    timeZone = "Asia/Tehran";
    tokenStatus = ALLOWED;
    uniqueId = "***";
    userId = ***;
}>
2020-09-29 14:30:41.635707+0330 MyZarinPal-v4-iOS[10782:3770522] (CHABOK) verbose: Register user successfully
2020-09-29 14:30:41.635789+0330 MyZarinPal-v4-iOS[10782:3770522] (CHABOK) debug: No registrationHandler for success
2020-09-29 14:30:41.635874+0330 MyZarinPal-v4-iOS[10782:3770522] (CHABOK) debug: [-[PushClientManager handleRegistrationSuccess]]: Calling connectToServer
2020-09-29 14:30:41.636162+0330 MyZarinPal-v4-iOS[10782:3770522] (CHABOK) debug: [-[PushClientManager connectToServer]]: Ignore connecting to server Connected

from chabok-client-ios.

Husseinhj avatar Husseinhj commented on August 30, 2024

Which policy did you use for sending your message? Inbox (صندوق پیام) or Push (پوش نوتیفیکیشن)?

from chabok-client-ios.

FarshidRoohi avatar FarshidRoohi commented on August 30, 2024

I am implementing the sandbox
And I send Push in two ways :
1- Sending a test
2- Sending push through the campaign for test users

from chabok-client-ios.

FarshidRoohi avatar FarshidRoohi commented on August 30, 2024
//
//  AppDelegate.swift
//  MyZarinPal-v4-iOS
//
//  Created by Farshid Roohi on 2/23/20.
//  Copyright © 2020 Farshid Roohi. All rights reserved.
//

import UIKit
import AdpPushClient

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate,PushClientManagerDelegate {
        
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        // Override point for customization after application launch.
        
        PushClientManager.resetBadge()
        PushClientManager.default()?.addDelegate(self)
        PushClientManager.default()?.configureEnvironment(.Sandbox)
      
        PushClientManager.default()?.logLevel = ChabokLogLevel(rawValue: ChabokLogLevelVerbose.rawValue)
        
        return true
    }
    
    // MARK: UISceneSession Lifecycle
    
    func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
        // Called when a new scene session is being created.
        // Use this method to select a configuration to create the new scene with.
        return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
    }
    
    func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
        // Called when the user discards a scene session.
        // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
        // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
    }


    
    func pushClientManagerDidReceivedMessage(_ message: PushClientMessage!) {
        print("message  : \(String(describing: message))")
    }
    
    func pushClientManagerDidReceivedEventMessage(_ eventMessage: EventMessage!) {
        print("eventMessage  : \(String(describing: eventMessage))")
    }
    func pushClientManagerDidDeliveredMessage(_ message: PushClientMessage!) {
        print("PushClientMessage  : \(String(describing: message))")
        
    }
    func pushClientManagerUILocalNotificationDidReceivedMessage(_ message: PushClientMessage) {
      print("pushClientManagerUILocalNotificationDidReceivedMessage : \(message)")
    }

}

and send this way :
Screen Shot 2020-09-29 at 4 05 01 PM

from chabok-client-ios.

Husseinhj avatar Husseinhj commented on August 30, 2024

این گزینه اقدام به ارسال پوش‌نوتیفیکیشن تستی در اپلیکیشن می‌کند و با قابلیت صندوق پیام (پیام چابک) متفاوت هست. دقت بفرمایید گزینه صندوق پیام در پنل شما غیرفعال است.

برای دریافت پیام در متد pushClientManagerDidReceivedMessage از قابلیت صندوق پیام در صفحه ایجاد کمپین استفاده کنید. همانند تصویر زیر: image

جهت دریافت دیتا پوش‌نوتیفیکیشن این بخش از مستندات رو مطالعه بفرمایید

from chabok-client-ios.

Related Issues (3)

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.