Whether the SDK can contain App Extensions ,Help me please

I'm sorry, my English is poor, but I really need your help, thank you

I would like to ask whether the framework I made can include the functions of the APP Extension?

I'm a novice to the App Extension

I have developed an app for vpn traffic interception, which uses the Network Extension and can currently achieve the functions I want

However, I also need to provide an sdk for others to use, so I need to include the relevant functions of the Network Extension in the sdk. I wonder if it can be implemented?

I would like to ask whether the framework I made can include the functions of the app extension?

No. An app extension must be placed directly in the container app. You can’t place it within your framework.

Even if you could, this wouldn’t work because the appex’s bundle ID must be a immediate ‘child’ of the container app’s bundle ID. So, for example, if the app’s bundle ID is com.example.myapp, the appex’s one must be something like com.example.myapp.myappex.

Standard practice here is to put your appex’s core logic within a framework and then supply appex samplecode to your clients showing how their appex can call into your framework.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I thought nobody would reply to me, thank you very very much Sorry to bother you, but I would like to ask you another question For example: There is an app whose bundle id is com.example, I create a framework and add an App Extension(Network Extension) target to the framework Then give the bundle id of the network extension com.example.tunnel If the framework is integrated in the app(com.example), will the Network Extension work?

will the Network Extension work?

Sure. AFAICT you’re describing this structure:

MyApp.app/
  … stuff …
  PlugIns/
    MyTunnel.appex/
      … stuff …
  Frameworks/
    MyFramework.framework/
      … stuff …

where the app has a bundle ID of com.example, the appex has a bundle ID of com.example.tunnel, and the framework has some unrelated bundle ID.

Note I’m using the iOS layout here. The structure is slightly different on macOS. See Placing Content in a Bundle for the details.

If so, that’s definitely supported. In fact, it’s a structure that’s commonly used because it allows the app and appex to share code.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Whether the SDK can contain App Extensions ,Help me please
 
 
Q