This is Part 5 of our tutorial on how to have your AIR app be shown in the iOS 8 Share Menu.
Time
5-7 minutes
Wait, have you done this first?
To do this part of the tutorial you will need an iOS Extension created in Xcode. If you don’t have one, the previous parts of this tutorial will show you how to create it (the meat is in Part 2):
- Part 1: What are iOS Extensions?
- Part 2: How to list an AIR app in the iOS Share Menu
- Part 3: How to launch your AIR app from the iOS 8 Share Menu
- Part 4: Sharing files between an AIR app and an iOS Extension
Alternatively, you can download the source code for the tutorial here.
Step 1: Got a native app?
Remember how in Part 2 of this tutorial you first had to create a native app project in Xcode, in order to be able to add an iOS Extension target?
I found it helpful to first test things out with that app, before replicating functionality in my AIR app. You can run the app on your iOS device directly from Xcode: make sure your device is selected in the top-right and then click the Play button:
Step 2: Attach the debugger to your extension process
You may not need to run the app first before you can debug your extension, but keep it in mind, in case the next option is disabled in the Debug menu.
Back in Xcode select Debug > Attach to Process > By Process Identifier (PID) or Name…
In the dialog that appears put your iOS Extension name as the Process Name:
When you click Attach, you will see this message at the very top bar of Xcode: it’s waiting for your iOS extension to start:
If you are debugging a Share Extension such as the one we created in the previous parts of this tutorial, you can start it by selecting to share a photo with your app on your iOS device:
The debugger should detect your extension and the message at the top should now read: Running… :
You can now set breakpoints in your Xcode project and see what’s going on:
Buy any Easy Native Extensions 2nd Edition package and get our $99 iOS + Android ANE Template completely free before the end of June 2015.
- step-by-step guide to making your iOS extension in under an hour
- library for data conversion between ActionScript and native code
- tutorials
- infographics
- code included
Leave a Reply