我需要实现一个应用程序来监控iPhone上不同应用程序的入站/出站连接.我的应用程序将在后台使用苹果的背景多任务功能为voip和导航器运行.我可以使用私有api,因为我的客户端在appstore上不需要这个应用程序.
谢谢.
我想在iPhone中注入触摸事件.我通过网络套接字获取触摸事件的坐标.GSSendEvent似乎是不错的选择.但是,它需要GSEventRecord作为输入之一.
有谁知道如何准备GSEventRecord?我根据一些例子准备了它,但是在GSSendEvent调用之后应用程序崩溃了.
感谢任何帮助.
-(void) handleMouseEventAtPoint:(CGPoint) point
{
static mach_port_t port_;
// structure of touch GSEvent
struct GSTouchEvent {
GSEventRecord record;
GSHandInfo handInfo;
} ;
struct GSTouchEvent *touchEvent = (struct GSTouchEvent *) malloc(sizeof(struct GSTouchEvent));
bzero(touchEvent, sizeof(touchEvent));
// set up GSEvent
touchEvent->record.type = kGSEventHand;
touchEvent->record.windowLocation = point;
touchEvent->record.timestamp = GSCurrentEventTimestamp();
touchEvent->record.infoSize = sizeof(GSHandInfo) + sizeof(GSPathInfo);
touchEvent->handInfo.type = getHandInfoType(0, 1);
touchEvent->handInfo.pathInfosCount = 1;
bzero(&touchEvent->handInfo.pathInfos[0], sizeof(GSPathInfo));
touchEvent->handInfo.pathInfos[0].pathIndex = 1;
touchEvent->handInfo.pathInfos[0].pathIdentity = 2;
touchEvent->handInfo.pathInfos[0].pathProximity = 1 ? 0x03 : 0x00;
touchEvent->handInfo.pathInfos[0].pathLocation = point;
port_ = …
Run Code Online (Sandbox Code Playgroud) 我想从后台服务捕获屏幕截图.私有API很好,因为我不需要提交到应用商店.我已经尝试过UIGetScreenImage,它无法在后台应用程序中运行.
我正在使用以下来自SO的代码.IOSurfaceCreate给我返回null.任何帮助赞赏.
CFMutableDictionaryRef dict;
IOSurfaceRef screenSurface = NULL;
char pixelFormat[4] = {'A','R','G','B'};
dict = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
uint32_t width ;
uint32_t height;
void *pitch;
void *bPE;
void *size;
CFDictionarySetValue(dict, kIOSurfaceIsGlobal, kCFBooleanTrue);
CFDictionarySetValue(dict, kIOSurfaceBytesPerRow, CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &pitch));
CFDictionarySetValue(dict, kIOSurfaceBytesPerElement, CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &bPE));
CFDictionarySetValue(dict, kIOSurfaceWidth, CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &width));
CFDictionarySetValue(dict, kIOSurfaceHeight, CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &height));
CFDictionarySetValue(dict, kIOSurfacePixelFormat, CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, pixelFormat));
CFDictionarySetValue(dict, kIOSurfaceAllocSize, CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &size));
IOSurfaceRef destSurf = IOSurfaceCreate(dict);
IOSurfaceAcceleratorRef outAcc;
IOSurfaceAcceleratorCreate(NULL, 0, &outAcc);
CFDictionaryRef ed = (__bridge CFDictionaryRef)[NSDictionary dictionaryWithObjectsAndKeys: nil];
IOSurfaceAcceleratorTransferSurface(outAcc, screenSurface, …
Run Code Online (Sandbox Code Playgroud) 这个问题遵循Nate在此链接上提供的答案: 如何更改iOS应用程序的权利?
似乎所描述的程序将应用于越狱设备.
我有兴趣通过我的iOS应用程序关闭屏幕.以前的答案指向这样做:
void (*BKSDisplayServicesSetScreenBlanked)(BOOL blanked) = (void (*)(BOOL blanked))dlsym(RTLD_DEFAULT, "BKSDisplayServicesSetScreenBlanked");
Run Code Online (Sandbox Code Playgroud)
然后
BKSDisplayServicesSetScreenBlanked(1); // 1 to dim, 0 to undim
Run Code Online (Sandbox Code Playgroud)
我读到该应用程序还需要com.apple.backboard.client权利.这是我的知识停止的地方.
如果应用程序仅用于通过Apple的MDM平台控制的业务环境中,如何在我的应用程序中使用此功能?
我不想越狱设备.
在我们使用的企业iOS应用程序中
CTCallRef CTCallDial(CFStringRef number);
Run Code Online (Sandbox Code Playgroud)
从应用程序进行调用(并能够隐藏调用者ID
它似乎在iOS 7中不起作用.那里的API有变化吗?
(我完全知道这是一个私有的API调用,它可以随时更改,但我仍然希望找到一个替代方案.可悲的是,我不够精明,不知道如何找到所有可用的私有API)
我知道在真正的应用程序中不允许这样做有利于用户的隐私和安全.但是出于纯粹的学术目的,我试图发送消息而不像这样呈现MessageComposer UI.
MFMessageComposeViewController *picker = [[MFMessageComposeViewController alloc] init];
if([MFMessageComposeViewController canSendText]) {
picker.recipients = [NSArray arrayWithObject:@"1234"];
picker.body = @"Hello";
[picker performSelector:@selector(smsComposeControllerSendStarted:) withObject:[UIButton buttonWithType:UIButtonTypeCustom]];
}
Run Code Online (Sandbox Code Playgroud)
结果没有任何结果.甚至在控制台上都没有失败异常.我都没有在短信应用上看到消息.我发送邮件的人也没有得到它.
可以在这里找到iMars和MFMessageComposeViewController方法的列表.
我编写了一个快速代码来验证这些是否是MFMessageComposeViewController中实际存在的项目.
uint varCount = 0;
Class cls= [MFMessageComposeViewController class];
Ivar *vars = class_copyIvarList(cls, &varCount);
for (uint i = 0; i < varCount; i++) {
Ivar var = vars[i];
const char* name = ivar_getName(var);
const char* typeEncoding = ivar_getTypeEncoding(var);
printf("iVar%i------------> %s\n",i+1,name);
}
free(vars);
Method *imps = class_copyMethodList(cls, &varCount);
for (uint i = 0; i < …
Run Code Online (Sandbox Code Playgroud) 我知道有很多关于方法调配的资源.但是,是否可以从私有API中调用方法?问题是没有头文件.我想在PrivateFramework中调用私有类中的方法,例如(随机示例)Message.framework方法
这是个人测试,我知道它会被Apple拒绝遗忘.
我的应用程序用于测量Wifi信号强度.为此我在iOS7中使用了私有API
libHandle = dlopen("/System/Library/SystemConfiguration/IPConfiguration.bundle/IPConfiguration", RTLD_LAZY);
Run Code Online (Sandbox Code Playgroud)
但现在看来Apple已将其移至iOS8中的其他位置.因为我无法找到这些方法.
apple80211Open = dlsym(libHandle, "Apple80211Open");
apple80211Bind = dlsym(libHandle, "Apple80211BindToInterface");
apple80211Close = dlsym(libHandle, "Apple80211Close");
apple80211GetInfoCopy = dlsym(libHandle, "Apple80211GetInfoCopy");
Run Code Online (Sandbox Code Playgroud)
那么任何人都知道它可能被删除/替换的地方.
有没有其他方法来衡量Wifi强度.(值类似于: - 47)
早先的apple80211GetInfoCopy用于返回
"AUTH_TYPE" = {
"AUTH_LOWER" = 1;
"AUTH_UPPER" = 8;
};
BSSID = "74:XX:XX:60:1b:XX”; // Value changed for security.
CHANNEL = {
CHANNEL = 149;
"CHANNEL_FLAGS" = 20;
};
NOISE = {
"NOISE_CTL_AGR" = "-85";
"NOISE_UNIT" = 0;
};
"OP_MODE" = 1;
POWER = (
1
);
POWERSAVE = 1;
RATE = 135;
RSSI …
Run Code Online (Sandbox Code Playgroud) 我一直在使用私有API(不在App Store上供个人使用)来阻止传入呼叫使用此Stackoverflow帖子中列出的步骤如何使用私有API来阻止iOS应用程序中的传入呼叫?
我最近升级到iOS 7,发现它不再起作用了.收到来电时,我仍然收到"kCTCallIdentificationChangeNotification"通知,但是当我调用CTCallDisconnect函数时,它什么也没做.
当我在CoreTelephony库上执行"nm"命令时,它仍会列出CTCallDisconnect函数,因此它看起来仍然存在于iOS 7中.
在iOS 7中拒绝接听来电有没有运气?
谢谢!
我几个小时后在整个互联网上搜索,我找不到我正在寻找的信息.我想搞乱私人api,看看什么可能,等等,但我甚至无法编译.
所以我有几个非常基本的问题:
char *framework = "/System/Library/PrivateFrameworks/...";
dlopen(...);
Run Code Online (Sandbox Code Playgroud)
如果有任何机会,我想使用objc语法(如果可能)而不是使用C(如上所述).
最后,我读到了有关权利(在iOS 7中似乎是新的).我如何使用这些权利以及何时使用它们?
有人可以请输入几行作为例子吗?