0

I'm creating an iOS application using trigger IO, and I would like to add my application's shortcut icon to the list of available editors for certain file types. Like in this article, can this be done using trigger io?

My app inside iMessage UIActivityViewController

I've added the build_steps.json to the ios custom module. I can't get the correct syntax. I get an error from the forge build procress.

[  ERROR] 2013-11-29 22:29:56,654 -- set_in_info_plist() got an unexpected keyword argument 'UTImportedTypeDeclarations'

Here is my build_steps.json:

[
{
    "do": {
        "set_in_info_plist": {
            "UTImportedTypeDeclarations":
            [
                {
                    "UTTypeConformsTo":
                    [
                        "public.image"
                    ],
                    "UTTypeIdentifier": "public.png",
                    "UTTypeTagSpecification":
                    {
                        "com.apple.ostype": "PNG",
                        "public.filename-extension":
                        [
                            "png"
                        ],
                        "public.mime-type": "image/png"
                    }
                },
                {
                    "UTTypeConformsTo":
                    [
                        "public.image"
                    ],
                    "UTTypeIdentifier": "public.jpeg",
                    "UTTypeTagSpecification":
                    {
                        "com.apple.ostype": "JPEG",
                        "public.filename-extension":
                        [
                            "jpg"
                        ],
                        "public.mime-type": "image/jpeg"
                    }
                }
            ]
        }
    }
}   

]

Can anyone tell me what is wrong with this file?

Community
  • 1
  • 1
Joel
  • 1,309
  • 2
  • 10
  • 20
  • The structure is slightly different to what you have, you need to split the contents of `set_in_info_plist` to be `"key"` and `"value"`, something like https://gist.github.com/Connorhd/7825679 – Connorhd Dec 06 '13 at 14:32

1 Answers1

1

This isn't possible with Trigger's built in functionality, but should be possible by writing your own native module.

See https://trigger.io/docs/current/api/native_modules/index.html and in particular https://trigger.io/docs/current/api/native_modules/native_build_steps.html#set_in_info_plist for updating the Info.plist for an app.

Connorhd
  • 2,476
  • 14
  • 15
  • Perfect I'll give that a shot. – Joel Nov 28 '13 at 22:04
  • I've got a follow up question. Lets assume the build_steps.json works. Next problem will be to setup the app delegate function and deal with the data being sent to your app. How would one do this with in Trigger.io. Thanks in advance. – Joel Nov 29 '13 at 05:13
  • 1
    You can intercept what Trigger calls "native events" to do that, see https://trigger.io/docs/current/api/native_modules/native_events.html#ios for details. – Connorhd Nov 29 '13 at 09:57