是否有可能跨进程更改shareExtension获取到的_hostBundleId?

iOS ShareExtension开发中,被打开extension的App可以通过读取parentViewController的私有属性_hostBundleId,来知道是被哪个App所吊起。但反过来,是否有办法在吊起方,修改某些值,使得被吊起方获取到被篡改的bundleId?

@implementation ShareViewController

  • (void)willMoveToParentViewController:(UIViewController *)parent
    {
    // parent: _UIViewServiceViewControllerOperator
    NSLog(@"%@", [parent valueForKey:@"_hostBundleId"]);
    }

吊起方的UIActivityViewController 持有一个 _UIRemoteViewController实例,然后通过XPC进行跨进程通信传递数据,但没有找到方式可以更改另一个进程所接收到的bundleId,怀疑bundleId不是传过去的而是通过进程id找到的。

求解是否有什么办法可以解决这个问题?在吊起方篡改接收方取到的_hostBundleId?

不越狱是不可能的 是系统内核传过去的

1 个赞