Posts

Post not yet marked as solved
4 Replies
someData must not be a NSData. It can NSDictionary/ NSArray. If someData will not produce valid JSON, an exception is thrown. This exception is thrown prior to parsing and represents a programming error, not an internal error. You should check whether the input will produce valid JSON before calling this method by using isValidJSONObject:Hope it helps.
Post not yet marked as solved
1 Replies
Since push notifications are handled by iOS and not your app you can't change the application badge on receiving a push notification.But you can send the badge number in the payload of the push notification, but then you will have to do the calculation server side.You should read Local and Push Notification Programming Guide and especially Notification Payload.The payload could look like this:{ "aps" : { "alert" : "You got your emails.", "badge" : 9 }}Now the app application badge icon will show 9.
Post not yet marked as solved
3 Replies
No way to disable the ability to take screenshots. We can detect in the app when a screenshot is taken and post the detection we can delete the last saved image.Not going in details but just giving some pointers..we can detect when a screenshot is taken sign the below code. Once the detection is done..we can either delete the last image in Potos or edit to obscure the content.Objective CNSOperationQueue *mainQueue = [NSOperationQueue mainQueue];[[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationUserDidTakeScreenshotNotification object:nil queue:mainQueue usingBlock:^(NSNotification *note) { // executes after screenshot/ //Write code here to delete/obscure the last image from photos }];SwiftNotificationCenter.default.addObserver( forName: UIApplication.userDidTakeScreenshotNotification, object: nil, queue: .main) { notification in // executes after screenshot //Write code here to delete/obscure the last image from photos}
Post not yet marked as solved
8 Replies
Not going in details but just giving some pointers..we can detect when a screenshot is taken sign the below code. Once the detection is done..we can either delete the last image in Potos or edit to obscure the content.Objective CNSOperationQueue *mainQueue = [NSOperationQueue mainQueue];[[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationUserDidTakeScreenshotNotification object:nil queue:mainQueue usingBlock:^(NSNotification *note) { // executes after screenshot/ //Write code here to delete/obscure the last image from photos }];SwiftNotificationCenter.default.addObserver( forName: UIApplication.userDidTakeScreenshotNotification, object: nil, queue: .main) { notification in // executes after screenshot //Write code here to delete/obscure the last image from photos}
Post not yet marked as solved
9 Replies
You can use PLCrashReporter. I have been using this for many years now and it does seem reliable. Here's the link if you want to explore:https://www.plcrashreporter.org.Hope it helps.