Post

Replies

Boosts

Views

Activity

when data or notification is received inform server
I'm trying to achieve the functionality same like whatsapp, whenever message is delivered to the user the sender gets the double tick(Means message has been delivered). this works in all scenarios even if the app is killed. I'm sending push notification with extra data(notification id) which will be saved whenever notification is received. so I can save and inform server about the notification delivery status. for this I tried didReceiveRemoteNotification but it wont work always because once the app is killed (swiped from recent apps) than no more calls are going. Can I know the method how whatsapp is achieving this. Is there any method by which we can get the status of notification delivery even when app is killed.
1
0
580
Feb ’22
didReceiveRemoteNotification not called when app is killed
I'm trying to get notification data that whenever notification is received on Phone, it should update database that notification with this id is received. To achieve that i'm using didReceiveRemoteNotification call method which is working absolutely fine in foreground and background but once the app is removed(swiped) from recent apps section. I get message ("Terminated due to signal 9") and calls are not received on method didReceiveRemoteNotification How can I get this call to wakeup even when app is killed (swiped from recent apps). Or Is there any alternative way that I can use to get the notification received data with notification id with real time. func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { print("Remote call data is working") }
1
0
1.3k
Feb ’22
How to read string from printwriter from java server to swift client through stream
hi all  I am new in swift and i want read string from java server to swift client through stream but its giving me -1 here is my server code in java try { out = new PrintWriter(new BufferedWriter( new OutputStreamWriter(tempClientSocket.getOutputStream())), true); } catch (IOException e) { e.printStackTrace(); } out.println("hello world"); here is my client code in swift let dataCount = data.count let bytesWritten = data.withUnsafeBytes { (p: UnsafePointer<UInt8>) -> Int in return streams.outputStream.write(p, maxLength: dataCount) when i print stream delegate event code outputOpenCompleted: outputHasSpaceAvailable: is printing but no any printi9ng is coming for inputstream on inputStream.read meassage is like that ** SocketStream read error [0x28173c000]: 1 60** Please please help me as soon as possibloe
0
0
547
Aug ’21