Hamas Hassan
Hamas Hassan

Reputation: 941

How to call function from one target to another target ios swift xcode

In my app, I have two targets.

  1. Target 1 -> Main App
  2. Target 2 -> Siri Intent Extention.

I have a function in my Target 1 (Main app) which I want to call from Target 2 (Intent Extention)

Upvotes: 0

Views: 1282

Answers (1)

Yonathan Goriachnick
Yonathan Goriachnick

Reputation: 201

There's no difference between sharing code with any extension and a Siri Intent extension.

You should just add the files you need to the extension target like in this solution in this post

I've done the same with a Share extension.

Upvotes: 1

Related Questions