这是一个由两部分组成的问题。我有以下代码工作,它抓取当前显示表面并从表面创建一个视频(一切都发生在后台)。
for(int i=0;i<100;i++){
IOMobileFramebufferConnection connect;
kern_return_t result;
IOSurfaceRef screenSurface = NULL;
io_service_t framebufferService = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("AppleH1CLCD"));
if(!framebufferService)
framebufferService = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("AppleM2CLCD"));
if(!framebufferService)
framebufferService = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("AppleCLCD"));
result = IOMobileFramebufferOpen(framebufferService, mach_task_self(), 0, &connect);
result = IOMobileFramebufferGetLayerDefaultSurface(connect, 0, &screenSurface);
uint32_t aseed;
IOSurfaceLock(screenSurface, kIOSurfaceLockReadOnly, &aseed);
uint32_t width = IOSurfaceGetWidth(screenSurface);
uint32_t height = IOSurfaceGetHeight(screenSurface);
m_width = width;
m_height = height;
CFMutableDictionaryRef dict;
int pitch = width*4, size = width*height*4;
int bPE=4;
char pixelFormat[4] = {'A','R','G','B'};
dict = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
CFDictionarySetValue(dict, kIOSurfaceIsGlobal, kCFBooleanTrue); …Run Code Online (Sandbox Code Playgroud) 我们正在探索用于移动自动化测试的各种测试套件,并遇到了这家名为 Perfecto Mobile 的公司。让我震惊的功能之一是它们能够(无需越狱)在物理 iPad 上有效地执行“远程桌面”。
因此,iPad 的屏幕在 Web 应用程序中进行镜像,它可以在 Web 应用程序上注册触摸/滑动事件并在设备上执行它们。我掌握的唯一相关技术细节是,所有这些都是使用通过 USB 电缆发送的命令来执行的。
我真的很好奇这是如何实现的以及相关私有 API 的详细信息(如果有)。
谢谢,
泰贾
我即将完成我的第一个iPhone应用程序.
我听说有些应用程序因使用某些私有API而被拒绝.
我也在使用一些私有API,如ASIHTTPRequest,MBProgressViewHUD.
因此,请告诉我这些或任何其他私有API被拒绝,我应该确保不要现在或将来的应用程序使用它们.
您可以列出它们,或者只是说明如何在使用私有API时采取预防措施.
我需要打电话
[[MKLocationManager sharedLocationManager] _applyChinaLocationShift:newLocation]
Run Code Online (Sandbox Code Playgroud)
在我的iOS应用程序中.
我相信MKLocationManager是一个私有类,似乎没有MapKit/MKLocationManager.h文件.
我不是针对App Store.我有什么办法可以使用私有API吗?
更新于2011-6-23
我真的需要答案,还是我可以解开iOS SDK?
我的声誉几乎就是100.请帮我.
我想以编程方式获取设备电话号码(在iOS5和iOS6上).
这样做有非正式的方法吗?
是否有可以使用的私有核心电话API或IOKit API?
是的,我知道我的应用程序将不会被AppStore接受
我知道其他应用程序可以通过URL架构从您的应用程序调用.但并非所有应用程序都是注册的架构URL.那么我该如何启动该应用程序呢?我正在为iphone jaibroken开发.
有谁知道如何使用object_setInstanceVariable设置结构变量?它适用于参考类型:
object_setInstanceVariable(obj, "_variable", ref);
Run Code Online (Sandbox Code Playgroud)
但不适用于CGPoint等结构.尝试以下方式:
1. object_setInstanceVariable(obj, "_variable", point);
2. object_setInstanceVariable(obj, "_variable", &point);
3. object_setInstanceVariable(obj, "_variable", (void **)&point);
Run Code Online (Sandbox Code Playgroud)
我不确定我理解我在做什么(尤其是最后一步)......
提前谢谢你!!!
当网络活动从无到有(以及相反的方式)时,我想要为我的iOS应用程序进行事件/回调.类似于Android对onDataActivity()的处理方式.我不是在谈论可达性,而是在数据实际开始或停止传输时.
该应用程序不适用于App Store,也不适用于越狱.我有一个类似的功能,通过使用检测屏幕何时开启/关闭工作
CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), //center
NULL, // observer
displayStatusChanged, // callback
CFSTR("com.apple.iokit.hid.displayStatus"), // event name
NULL, // object
CFNotificationSuspensionBehaviorDeliverImmediately);
Run Code Online (Sandbox Code Playgroud)
以及其他事件
com.apple.springboard.hasBlankedScreen
com.apple.springboard.lockstate
Run Code Online (Sandbox Code Playgroud)
现在我想知道是否存在数据启动或停止传输的事件?或者,如果有人可以指出我可以通过上述方式监控的所有事件的完整列表的方向.
我正在尝试为iOS创建一个动态库并在运行时加载它.在看了这个问题和这个答案之后,我一直在使用iOSOpenDev并在我的iPhone上部署所有内容.dylib的xCode项目名为KDylibTwo,我修改的文件是:
KDylibTwo.h
#import <Foundation/Foundation.h>
@interface KDylibTwo : NSObject
-(void)run;
@end
Run Code Online (Sandbox Code Playgroud)
KDylibTwo.m
#import "KDylibTwo.h"
@implementation KDylibTwo
-(id)init
{
if ((self = [super init]))
{
}
return self;
}
-(void)run{
NSLog(@"KDylibTwo loadded.");
}
@end
Run Code Online (Sandbox Code Playgroud)
为了测试我的库是否有效,在构建它以进行性能分析后(iOSOpenDev在iPhone上部署它的方式),我可以找到它存储在我的设备上/usr/lib/libKDylibTwo.dylib并构建一个调整(再次使用iOSOpenDev),按如下方式挂接SpringBoard:
#include <dlfcn.h>
%hook SBApplicationIcon
-(void)launch{
NSLog(@"\n\n\n\n\n\n\nSBHook For libKDylibTwo.dylib");
void* dylibLink = dlopen("/usr/lib/libKDylibTwo.dylib", RTLD_NOW);
if(dylibLink == NULL) {
NSLog(@"Loading failed.");
} else {
NSLog(@"Dylib loaded.");
void (*function)(void);
*(void **)(&function) = dlsym(dylibLink, "run");
if (function) {
NSLog(@"Function found.");
(*function)();
} else {
NSLog(@"Function …Run Code Online (Sandbox Code Playgroud) GSSendEvent 对我不起作用了.
即使订阅回调函数GSEventRegisterEventCallBack也不会触发触摸事件,[UIEvent _gsEvent]返回NULL.
发生了什么?
ios ×8
iphone ×4
jailbreak ×3
objective-c ×2
app-store ×1
dylib ×1
ios4 ×1
ios7 ×1
springboard ×1
xcode ×1