0
我目前使用Xtify進行簡單的推送通知。我沒有設置收件箱能夠存儲這些消息,也沒有查看Rich Notifications。設置簡單通知的文檔是驚人的。需要添加每行代碼的簡單分步指南。但是,當您進入高級設置時,它缺乏一點。它只是簡單介紹一下你可以做什麼,但是缺少一個簡單的逐步指導來獲取一個收件箱。我使用IB來構建我的應用程序,並且想要添加豐富的通知和收件箱,但我不確定如何去做。以下是本指南所說的內容:使用IB添加豐富的通知收件箱對於Xtify
Follow these steps to integrate option 1 above.
The XtifyLib folder now includes sample code to create Custom Inbox. Classes are included in the Sample project file in XtifyLib > CustomInbox > AppInclude
Use the classes provided in AppInclude as your starting point
Classes overview:
CompanyCustomInbox - a wrapper around Xtify rich notification retrieval calls. i.e. getting a single rich notification and getting pending notifications. You will need to modify these methods if you choose a different behavior.
- (void) handleRichPush:(NSString *)msgId;
- (void) getPending:(id)notifyObject;
AppDelegate
Add the following to your init method:
[[CompanyCustomInboxget] setCallbackSelectors:@selector(successfullyGotRichMessage:) failSelector:@selector(failedToGetRichMessage:) andDelegate:self];
Implement in your AppDelegate the following methods:
- (void) successfullyGotRichMessage:(XLRichJsonMessage *)inputMsg // Get notified on success
- (void) failedToGetRichMessage:(CiErrorType)errorType - // Get notified on failure
XRInboxDbInterface - Internal Xtify SDK class to handle the following functions: access to Xtify payload, unread messages, data storage access. Some of the methods provided by the XRInboxDbInterface class:
有些事情可以作爲指導,但其他人只是說明該班可以做什麼。我只需要一個簡單的方法來添加收件箱,這樣當通知被點擊時,會直接進入詳細信息視圖,或者如果在應用程序中,我可以通過一個按鈕連接IBAction來推動導航控制器進入視野。該指南指出,你可以用IB做到這一點,但所有的示例代碼寫出來,如果你所做的一切編程
我試過,但它墜毀,給予我這個錯誤: ''應用程序試圖在模態上呈現一個活動控制器。'' –
user717452
使用編輯後的代碼在您的答案中得到修復。 – user717452
我可以將收件箱拉起來,但是當我提供豐富通知時,表格視圖中不會顯示任何內容。 – user717452