yonaskolb / XcodeGen

A Swift command line tool for generating your Xcode project
MIT License
6.88k stars 809 forks source link

How to make a target extension via xcodegen ? #1431

Closed Simimi-dot closed 3 months ago

Simimi-dot commented 6 months ago

My question is as follows. How can I create an extension target through xcodegen? I need to create a Notification Service Extension target, but I don't quite understand how this can be done correctly through xcodegen, since when I create this target through Xcode itself, a folder with the NotificationService.swift and info.plist files for this target is automatically created. And this does not happen through xcodegen. Since there is no such target yet, I cannot specify a source for it. I can separately create a folder in which info.plist and entitelements were created using xcodegen, but the NotificationService.swift file will not be created. Does anyone know how to do this?

tejuamirthi commented 5 months ago

Example:

targets:
    NotificationService:
      type: app-extension

Please don't forget to mention type: app-extension. Refer section Product Type from docs

yonaskolb commented 3 months ago

Thanks @tejuamirthi, closing this for now