block incoming alerts on iphone springboard - springboard

I am trying to intercept incoming SMS in iOS 5 and the code is
HOOK(CKSMSService,_receivedMessage$replace$postInternalNotification$,void,CKSMSRecordRef arg,BOOL arg2,BOOL arg3){
//NSLog(#"received message %#", message);
CALL_ORIG(CKSMSService,_receivedMessage$replace$postInternalNotification$,arg,arg2,arg3);
}
this code works but a Notification Popup still come , so how can i block this popup to appear.

Related

DEPRECATED USE in libdispatch client on Mojave and Xcode 10.1

This error constantly appearing in the system.log:
DEPRECATED USE in libdispatch client: dispatch source activated with no event handler set; set a breakpoint on _dispatch_bug_deprecated to debug
The code in question is given bellow:
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
[self doItInTheBackground];
dispatch_async(dispatch_get_main_queue(), ^{
[self.loadingSpinner stopAnimation:self];
[self.loadingPanel close];
});
});
EDIT:
Any program using GCD library seems to be getting this error, including systems apps like Terminal, Console, AppStore, etc.
EDIT 2:
As of 10.14.4, I can see several other messages as well, e.g.:
DEPRECATED USE in libdispatch client: Setting timer interval to 0 requests a 1ns timer, did you mean FOREVER (a one-shot timer)?; set a breakpoint on _dispatch_bug_deprecated to debug
And
BUG in libdispatch client: mach_recv, monitored resource vanished before the source cancel handler was invoked { 0xXXXXXXXXXXXX[source], ident: XX / 0xXX, handler: 0xXXXXXXXXXXXX }

How to allow app to send push notification UWP?

My app shows notification to notify the user of some status. But these notifications doesn't show up when "Get notifications from apps and other senders" is turned off in the settings.
Is there a way for my UWP app to ask the user to allow the app to send push notification or to turn on push notification? Or maybe redirect the user to the settings where they can turn it on?
But these notifications doesn't show up when "Get notifications from apps and other senders" is turned off in the settings
If notifications are prevented by this setting that is disabled by user, you should be able get this disabled reason from Setting property of ToastNotifier class. The reason should be DisabledForUser. And then you can redirect the user to the Notifications setting page as you thought by Launcher to promote the user to change the settings.
For example:
private async void btnlaunch_Click(object sender, RoutedEventArgs e)
{
var notifier = Windows.UI.Notifications.ToastNotificationManager.CreateToastNotifier();
if (notifier.Setting != Windows.UI.Notifications.NotificationSetting.Enabled)
{
await Launcher.LaunchUriAsync(new Uri("ms-settings:notifications"));
}
}
More details please reference Launch the Windows Settings app.

How do I deregister device in MFP

I am sending push notification via an external script and capturing the response that is return from MobileFirst. The response is always 200 and a messageId is in the response JSON object
How can I simulate a error condition?
I used the MFP API to remove the subscription, removing the device from the device tab in the MFP console. However, I can still send and receive push notification for that deviceID .
Unsubscribing from the tag subscription (which you have subscribed in the code) does not clear all subscriptions. A default Push.ALL tag subscription stays in the DB. This is why you are able to still send notifications.
You can remove the device registration either using the SDK ( as mentioned by Gaurab) or use the REST API call to do this.
Details here: Push Device Registration Delete
I assume that you are using IBM MobileFirst v8.0.
You need to implement these API in client side to unregister the device or unsubscribe from tags.
Unregister the device from push notification service instance.
MFPPush.unregisterDevice(
function(successResponse) {
alert("Unregistered successfully");
},
function() {
alert("Failed to unregister");
}
);
Unsubscribe from tags.
var tags = ['sample-tag1','sample-tag2'];
MFPPush.unsubscribe(
tags,
function(tags) {
alert("Unsubscribed successfully");
},
function() {
alert("Failed to unsubscribe");
}
);

Apple Push Notifications not arriving on iOS device from Microsoft Azure Notification Hub

I have followed-up the tutorial Microsoft Azure Notification Hub for iOS apps till the end and successfully registered device for push notifications. When I send a test notification from Debug option in Azure Classic Portal the Result shown with options Registration ID (XXXXXX12345), Platforms (apple) and Outcome says "The Notification was successfully sent to the Push Notification System" but my device is not receiving any Notifications. I have uploaded a valid .p12 certificate into Azure Portal as well. I am using azuresdk-iOS-v1.2.4 framework with iOS 9. Please help me on it.
SBNotificationHub* hub = [[SBNotificationHub alloc] initWithConnectionString:HUBLISTENACCESS notificationHubPath:HUBNAME];
[hub registerNativeWithDeviceToken:deviceToken tags:nil completion:^(NSError* error) {
if (error != nil) {
NSLog(#"Error registering for notifications: %#", error);
}
else {
[self MessageBox:#"Registration Status" message:#"Registered"];
}
}];
Do I need to covert deviceToken into Hexadecimal? right now am passing deviceToken as it is what am getting in didRegisterForRemoteNotificationsWithDeviceToken method.

Get location using wifi or mobile network Tizen Web app Smartwatch

Currently i am creating an application for the samsung gear s smartwatch using tizen web application (javascript). My widget/app needs to get location data (it's a safety application) everywhere. The basic GPS location works fine as you can see in my code below. The problem is that GPS only works outside, since my app is a safety app i need to get location everywhere. On phones you are able to use Wifi and mobile network to get location. My question is is it possible to get location data using wifi or mobile network on a smartwatch (the samsung gear s has mobile network and wifi connection so you would think that it is possible)? and if it's possible how.
My code for the basic GPS location using HTML 5 geolocation:
function getBestGPSLocation(){
//GPS
navigator.geolocation.getCurrentPosition(success, error, {maximumAge:60000, timeout:5000});
//Wifi
//Mobile Network
}
function error(error) {
// just some error codes they work either
switch(error.code) {
case error.PERMISSION_DENIED:
console.log("permission denied");
break;
case error.POSITION_UNAVAILABLE:
console.log("your position is unavailable");
break;
case error.TIMEOUT:
console.log("a timeout occured");
break;
case error.UNKNOWN_ERROR:
console.log("an unknow error occured");
break;
}
}
function success(position) {
// this works i get all the data
alert(position);
alert(position.coords.latitude);
}