小编shr*_*ani的帖子

如何在ios 10中处理后台推送通知?

我不是在后台处理推送通知.

对于以下步骤中的处理推送通知: -

  1. 在功能 - >启用远程通知.
  2. 在功能 - >后台模式 - >启用远程通知.
  3. 在didFinishLaunchingWithOptions中给出了ios 10的所有权限.
  4. 用于推送通知UNUserNotificationCenter.
  5. App In Foreground然后推送通知工作正常并且在方法调用之下:

    userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler
    
    Run Code Online (Sandbox Code Playgroud)

但我的问题是app在后台然后没有调用任何方法.所以任何人有想法或解决方案的背景为ios 10处理推送通知然后请帮助我.

谢谢.

objective-c push-notification ios ios10

7
推荐指数
1
解决办法
7756
查看次数

Callkit 呼叫结束问题(错误域=com.apple.callkit.error.requesttransaction code=4)和呼叫接受后的音频问题

我制作了 VOIP 应用程序。为此,我将 PushKit 和 Callkit 与 pjsip 一起使用。

当后台应用程序收到呼叫通知时,我打开 callkit 屏幕,然后单击接受呼叫后使用 pjsip 连接。

1)调用结束问题

但是当调用hangout pjsip 成功调用hangout 但然后callkit 给我以下错误:

错误域=com.apple.callkit.error.request事务代码=4

为此,我检查了答案和结束呼叫 uuid 也相同,但又没有结束呼叫。我花了很多时间,但没有得到任何解决方案。

任何人有解决方案,请帮助我。

2) 接听电话后出现音频问题

接受呼叫音频后未配置。音频会话给我以下错误:

音频会话错误:错误域 = NSOSStatusErrorDomain 代码 = 561017449“(空)” [aurioc] 892:失败:'!pri'(启用 3,outf < 1 ch,44100 Hz,Int16> inf < 1 ch,44100 Hz,Int16 >)

对于上述错误,任何人都有解决方案,然后给我。

谢谢。

ios pushkit callkit

6
推荐指数
1
解决办法
8172
查看次数

UIWebView 仍然存在于 Google 移动广告中

我正在尝试为 IOS 构建,但在上传到 iTunesconnect 后我收到了这条消息。ITMS-90809:不推荐使用的 API 使用 - 不再接受使用 UIWebView 的新应用程序。相反,使用 WKWebView 来提高安全性和可靠性。了解更多 ( https://developer.apple.com/documentation/uikit/uiwebview )。

我知道这个问题已经存在。我使用此命令搜索了我的项目

grep -r "UIWebView"。

我有一场比赛

二进制文件 ./GoogleMobileAds.framework/GoogleMobileAds 匹配

请让我知道我该如何解决这个问题。

任何人都有解决方案,请帮助我。

谢谢你。

objective-c uiwebview swift wkwebview app-store-connect

4
推荐指数
1
解决办法
1455
查看次数

如何解决中止陷阱:6 错误 - xcode 12

我们在 Xcode 12 中遇到了“中止陷阱 6”的问题。由于这个原因,应用程序无法使用 Xcode 12 运行。我们正在使用 swift 5 版本和 jsqmessageviewcontroller 目标 c 库。进入 Xcode 12 时出现以下错误。

<unknown>:0: error: fatal error encountered while reading from module 'wwww'; please file a bug report with your project and the crash log
<unknown>:0: note: module 'wwww' full misc version is '5.3.2(5.3.2)/Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)'
top-level value not found
Cross-reference to module 'JSQMessagesViewController'
... JSQMessageMediaData
error: Abort trap: 6 (in target 'zapwww' from project 'zapwww')
Run Code Online (Sandbox Code Playgroud)

如果有人有解决方案,请帮助我们。

objective-c swift jsqmessagesviewcontroller xcode12

4
推荐指数
1
解决办法
7105
查看次数

sectionForSectionIndexTitle和sectionIndexTitlesForTableView未在swift 3中调用

我在项目中使用了联系人Book,所有数据显示为sectionWise.Tableview部分索引不显示该实现sectionForSectionIndexTitle和sectionIndexTitlesForTableView但不调用.

为此我使用了以下代码:

let arrIndexSection = ["A","B","C","D", "E", "F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
func tableView(_ tableView: UITableView, sectionForSectionIndexTitle title: String, at index: Int) -> Int
{

    return ([UITableViewIndexSearch] + UILocalizedIndexedCollation.current().sectionIndexTitles as NSArray).index(of: title) - 1
}
func sectionIndexTitlesForTableView(tableView: UITableView) -> [AnyObject]!
{
    return arrIndexSection as [AnyObject]
}
Run Code Online (Sandbox Code Playgroud)

任何人都有上述解决方案的想法或解决方案,请帮助我.

谢谢.

iphone ios swift swift3

1
推荐指数
1
解决办法
3004
查看次数

没有在swift 4中调用的NotificationCenter

我试图从appdelegate发布通知NotificationCenter并在另一个视图中接收通知但未收到通知.

发布通知: -

func xmppStream(_ sender: XMPPStream, didReceive message: XMPPMessage)
{
    print("did receive message  isss-->\(message)")

    NotificationCenter.default.post(name: Notification.Name("MessageReceived"), object: message)

}
Run Code Online (Sandbox Code Playgroud)

在viewdidload中收到通知: -

 NotificationCenter.default.addObserver(self, selector: #selector(self.messagereceived(notification:)), name: Notification.Name("MessageReceived"), object: nil)
Run Code Online (Sandbox Code Playgroud)

方法 :-

@objc func messagereceived(notification:Notification)
{
    let message = notification.object as? XMPPMessage
    print("chat conversion message is----->\(message)")
}
Run Code Online (Sandbox Code Playgroud)

我没有调用" messagereceived "方法.

所以任何人都有与此相关的解决方案然后请帮助我.

提前致谢.

notifications ios swift unusernotificationcenter

1
推荐指数
2
解决办法
4349
查看次数