iphone-privateapi

How to detect & avoid the use of private APIs in third party libraries

依然范特西╮ 提交于 2019-11-29 01:34:49
问题 Now that Apple is running some kind of static analysis to automatically check for private API use, a number of people have been caught because of the Three20 library. I use another third-party library (which I compile myself from code) and I would like to automatically audit it for private API use before I submit to Apple, so I can eliminate/re-write those parts. If I run nm on my application executable, I get a list of symbols, and I am seeing symbols in there that I don't use. For example I

Simulating System Wide Touch Events on iOS

南笙酒味 提交于 2019-11-29 00:28:08
I need to programmatically add touch events to iOS devices system wide without using a jailbreak; how do I do this? Preferably I'd like to use a private API to do this running in an app in the background. I am aware that doing this prevents my app's availability on the app store; this is however a private app so it isn't a problem. What you need to do is first create the events you want, and then send them to SpringBoard over the "purple port" eg. mach port. To make them system wide you must forward them to each application over the port. That means you need to actually do what the

Is there any private api to monitor network traffic on iPhone?

落爺英雄遲暮 提交于 2019-11-28 21:40:46
问题 I need to implement an app that monitors inbound/outbound connections by different apps on iPhone. my app is going to run in background using apple's background multitasking feature for voip and navigators. I can use private api as my client doesn't need this app on appstore. Thanks. 回答1: I got through this. I didn't need any private Api to get information of inbound/outbound active connections. Its just you need to know basic C programming and some patience. I wrote to apple dev forums

Get CellID, LAC, … on iOS 8.3

只愿长相守 提交于 2019-11-28 21:29:18
问题 Since iOS 5.X, I used to get radio information with these methods : Get CellID, MCC, MNC, LAC, and Network in iOS 5.1 But with the iOS 8.3 beta (and 8.3 GM), this private API _CTServerConnectionCellMonitorCopyCellInfo doesn't work anymore. 回答1: Apple was informed about weakness in their CoreTelephony, so now calls to CoreTelephony fail. They are checking if the caller is sandboxed, so after debug you can see: Caller not allowed to perform action: TelephonyApiTest.240, action = sandboxed

Does anybody know a way to add entitlement to iOS application for non jailbroken device?

走远了吗. 提交于 2019-11-28 20:24:20
Some background iOS operation system has a "entitlement" notion . Generally speaking, it's a permission which is granted to an application. Other system services and apps can check for this permission to allow/deny execution of some functionality. These entitlements should be specified in a provisioning profile. System applications have a lot of different entitlements. User application are limited to just couple of entitlements (like access to iCloud or something like that which can be configured on developer portal). The question is: Does anybody know a way to add entitlements to user

Access Private UIKit Function Without Using Bridging Header

人盡茶涼 提交于 2019-11-28 19:44:39
Consider the private C function _UICreateScreenUIImage , which returns a UIImage snapshot of the current device screen: OBJC_EXTERN UIImage *_UICreateScreenUIImage(void) NS_RETURNS_RETAINED; I can put this in a bridging header and access it in Swift like so: MyApp-Bridging-Header.h @import UIKit; UIImage *_UICreateScreenUIImage(void) NS_RETURNS_RETAINED; MyClass.swift let image = _UICreateScreenUIImage() print(image) // <UIImage: 0x7fc4ba6081c0>, {375, 667} Is there a way I can access _UICreateScreenUIImage in pure Swift without using a bridging header? An initial thought was to create an

IOSurfaces - Artefacts in video and unable to grab video surfaces

萝らか妹 提交于 2019-11-28 19:02:11
This is a 2-part Question. I have the following code working which grabs the current display surface and creates a video out of the surfaces (everything happens in the background). 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 =

IOSurface - IOS Private API - Capture screenshot in background

爱⌒轻易说出口 提交于 2019-11-28 18:29:17
I want to capture a screenshot from a background service. Private API is just fine as I don't need to submit to app store. I have already tried UIGetScreenImage and it does not work from background app. I am using following code which I got from SO. IOSurfaceCreate returns null to me. Any help appreciated. 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

iPhone private API compiling

拟墨画扇 提交于 2019-11-28 18:03:23
I'm searching through the whole internet since a few hours now, and I just can't find the informations I'm looking for. I would like to mess around with the private apis, see whats possible, etc., but I can't even compile something. So I've got a few pretty basic questions: Do I have to dump the headers? Because I downloaded a sample, where the API is loaded with char *framework = "/System/Library/PrivateFrameworks/..."; dlopen(...); I would like to use the objc-syntax (if possible) rather than using C (as mentioned above), if there are any opportunities. How do I make Xcode compile, if I

Inject system wide touch events on iOS7

青春壹個敷衍的年華 提交于 2019-11-28 15:57:42
问题 Prior to iOS7 it was possible to inject touch events with the GSSendSystemEvent and GSSendEvent private API calls, eg: GSSendEvent - Inject Touch Event iOS Simulating System Wide Touch Events on iOS System-wide tap simulation on iOS Send a global touch event on iOS 6 On iOS7 these calls seem to silently fail though. An alternative has been suggested in Simulating system-wide touches in iOS 7 but it only works on jailbroken devices. https://github.com/kif-framework/KIF looks like another