Giter Site home page Giter Site logo

400: DeviceTokenNotForTopic about knuff HOT 12 CLOSED

knuffapp avatar knuffapp commented on July 18, 2024
400: DeviceTokenNotForTopic

from knuff.

Comments (12)

bigParis avatar bigParis commented on July 18, 2024

In addition, I git your code, but still not work, <Fragaria/Fragaria.h> is not found. I have pod update successfully with this note:
Analyzing dependencies
Downloading dependencies
Installing KVOController (1.0.3)
Installing Mantle (2.0.6)
Installing pop (1.0.8)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 3 dependencies from the Podfile and 3 total pods installed.
How to use Knuff?

from knuff.

blommegard avatar blommegard commented on July 18, 2024

You can get an explanation for the error codes here.

What are you trying to do? Do you try to send push messages to the Knuff iOS app or an app you are developing yourself?

from knuff.

bigParis avatar bigParis commented on July 18, 2024

@blommegard I try to push messages to an app developed by myself.

from knuff.

bigParis avatar bigParis commented on July 18, 2024

@blommegard The Knuff client is install on my macbook.Will this work?

from knuff.

blommegard avatar blommegard commented on July 18, 2024

Running the binary downloaded from releases should work just fine, you don't have to clone and build it yourself.

How do you get the device token, is the certificate matching the app-id, tried both sandbox and production?

from knuff.

bigParis avatar bigParis commented on July 18, 2024

@blommegard I get the device token from Apple Sever callback didRegisterForRemoteNotificationsWithDeviceToken, and my device token is c91ea1071e33a075f3364b7afb786ae4e759480d3b773630d9650c5f78570a42

the code is:

  • (void)application:(UIApplication )application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
    {
    NSString
    token = [NSString stringWithFormat:@"%@",deviceToken];

    std::string strToken([token UTF8String], [token length]);
    GameLogic::getInstance()->getPushLogic()->handlePushToken(strToken);

    MFAppLogInfo(@"didRegisterForRemoteNotificationsWithDeviceToken:%s",strToken.c_str());

    [self clearRemotePushNotifications];
    }

handlePushToken will do something myself relative to token

from knuff.

blommegard avatar blommegard commented on July 18, 2024

So with "custom" selected and the correct certificate selected, you still get "BadDeviceToken"?

from knuff.

bigParis avatar bigParis commented on July 18, 2024

The truth is I send messages on mac, and I want to get a push on my iphone which has already installed the app developed by myself, I still need certificate? In "Knuff IOS" tab there is no way to add a certificate. I should use "custom" and add a certificate? But com.madebybowtie.Knuff-iOS is the only certificate I can choose

from knuff.

blommegard avatar blommegard commented on July 18, 2024

Yes, you need the certificate generated for your app, that is the one your server uses to send notifications to your users.

from knuff.

bigParis avatar bigParis commented on July 18, 2024

The procedure is my server sends messages to Apple push center(or something like this), and Apple push center pass it to me, I work for an organization, I could't get the certificate from my company. The certificate is used to publish app? In other words how can I get the right certificate?

from knuff.

blommegard avatar blommegard commented on July 18, 2024

You need to get the certificate from your company or generate a new one for your app at the Apple Developer Portal.

from knuff.

bigParis avatar bigParis commented on July 18, 2024

Thank you for your reply, I use your Knuff client on macbook to push message to Knuff IOS on iphone, it is OK. Probably because I use your push certificate, so I must replace it to my push certificate if I want to push on my app on iphone.

from knuff.

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.