To use libAPAppView, copy libAPAppView.h to $THEOS/include and libAPAppView.dylib to $THEOS/lib. Then you can add XXX_LIBRARIES = APAppView to your Makefile and #import <libAPAppView.h> into any source files you want to use it in. Then add Depends: com.rpgfarm.libapappview to your control file.
@interface APAppView
-(UIView *)viewForBundleID:(NSString *)bundleID;
-(void)stopAppView;
@endAPAppView *appView = [[APAppView alloc] init];
[yourView addSubview:[appView viewForBundleID:@"com.apple.calculator"]];
--- when viewwilldisappear ---
[appView stopAppView];