[AC-541] Share extension integration
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2015-12-17T10:47:10.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | n/a |
Reporter | Ivan Skugor |
Assignee | Sharif AbuDarda |
Created | 2015-12-15T17:02:54.000+0000 |
Updated | 2015-12-17T11:07:12.000+0000 |
Description
Hello.
I'm trying to integrate Share extension in Titanium app.
I initially created new app id ("com.foo.share") in Apple developer portal and enabled group capability. Then I created new XCode project
* open XCode, then File -> New -> Project, select Single View Application and type Product Name, for example "share" so bundle identifier is "com.foo.share"
Then I added new Target
* File -> New -> Target -> Share extension and type Product Name, for example "Ext" so bundle identifier is "com.foo.share.Ext"
Setup Code signing identities for both app and extension to the same identity and optionally add App Groups under "Capabilities". In XCode, change extension's Info.plist change Bundle identifier to "com.foo.share.Ext" (this is required for Ti app to sign app correctly).
Run app from XCode to make sure extension works. Check that app icon is present in Photos app when you click on share icon.
Now, add extension to ti app. Create new ti app with "com.foo.share", add extension to tiapp.xml under "ios" tag:
<extensions>
<extension projectPath="ABSOLUTE_PATH_TO_XCODE_PROJECT">
<target name="Ext">
<provisioning-profiles>
<device>PROVISION_PROFILE</device>
<dist-appstore/>
<dist-adhoc/>
</provisioning-profiles>
</target>
</extension>
</extensions>
Set "ABSOLUTE_PATH_TO_XCODE_PROJECT" to XCode project path and "PROVISION_PROFILE" to provision profile created for extension app id.
Run app on device and sign it with same signing identity as extension. App should run without a problem on device, but the problem is there's no app icon when share icon is pressed in Photos app. There's extension added in generated XCode project but for some reason it just doesn't work (also, if generated project is run from XCode it doesn't run, but if I try to add new extension to that project, it works fine).
If you need more info (or sample project), please let me know. :)
Thanks.
Thanks :)