IPAD must-haves. And fun-to-haves.

Brighten your iPad with a colorful cover, stream to your TV, download pictures from your digital camera, and more. There’s already so much you can do with iPad and iPad mini

Apple Wireless Keyboard

The incredibly thin Apple Wireless Keyboard uses Bluetooth technology, which makes it compatible with iPad

Apple unveils iPad mini: ‘Thin as a pencil, light as paper’

iPad inspires creativity and hands-on learning with features you won’t find in any other educational tool

Lightning connector and FaceTime HD camera

Apple announces 4th generation iPad packing an A6X CPU

Pages

Showing posts with label Print. Show all posts
Showing posts with label Print. Show all posts

Friday, April 12, 2013

Can you run an XPC service inside a plugin? (e.g. a Print Dialog Extension plugin)

I am creating a Print Dialog Extension (PDE) plugin. This plugin is called and displayed when a user Prints from different apps, e.g. TextEdit, Preview, Xcode, etc. Note that the plugin runs on top of the app that called the Print Plugin (for example, TextEdit).

Inside the plugin, I need to run an XPC service. I need an XPC service since the entitlements on the main app might not be sufficient for my needs, e.g. I need to connect to the network, and TextEdit does not have the required entitlements for network connection.

The problem is, I can't create an XPC connection. The handler always fire with XPC_ERROR_CONNECTION_INVALID.

1.) Is this because the PDE Plugin is not inside the main bundle/main app, e.g. Text Edit?
2.) If yes, how can I still run an XPC service within a PDE Plugin?
3.) If no, then why can't I successfully create an XPC connection?


View the original article here

Thursday, April 11, 2013

Can you run an XPC service inside a plugin? (e.g. a Print Dialog Extension plugin)

I am creating a Print Dialog Extension (PDE) plugin. This plugin is called and displayed when a user Prints from different apps, e.g. TextEdit, Preview, Xcode, etc. Note that the plugin runs on top of the app that called the Print Plugin (for example, TextEdit).

Inside the plugin, I need to run an XPC service. I need an XPC service since the entitlements on the main app might not be sufficient for my needs, e.g. I need to connect to the network, and TextEdit does not have the required entitlements for network connection.

The problem is, I can't create an XPC connection. The handler always fire with XPC_ERROR_CONNECTION_INVALID.

1.) Is this because the PDE Plugin is not inside the main bundle/main app, e.g. Text Edit?
2.) If yes, how can I still run an XPC service within a PDE Plugin?
3.) If no, then why can't I successfully create an XPC connection?


View the original article here

Print Dialog Extension - Connecting to Network when running the PDE on a sandboxed app

I am creating a Print Dialog Extension (PDE) for Mac OSX. In that PDE, I need to connect to the network for authentication.

 

 

However, due to sandboxing, when I tried the PDE in TextEdit, I cannot connect to LDAP. From the console, it says sandboxd denied network-outbound for TextEdit. Apparently, the sandboxed TextEdit does not allow network connections.

 

 

I just like to ask, what is the best way to fix this?

How can I enable network connection in my PDE, even if the app it runs on does not allow it?

Can I also extend the sandbox profile of an app using my PDE (to add network connection entitlements)?

 

 

Any help or tips will be greatly appreciated.


View the original article here