LoginSignup
5
4

More than 3 years have passed since last update.

XcodeGenでNotificationServiceExtensionを使う

Posted at

targetsにこんな感じで追加する

project.yml
  NotificationService:
    type: app-extension
    platform: iOS    
    sources: NotificationService
    settings:
      base:
        ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES: ${inherited}
        PRODUCT_NAME: NotificationService
        PRODUCT_BUNDLE_IDENTIFIER: {NotificationService用のBundle Identifier}
        INFOPLIST_FILE: NotificationService/info.plist
        CODE_SIGN_STYLE: Manual
        TARGETED_DEVICE_FAMILY: 1
        DEVELOPMENT_TEAM: {アプリに合わせる}
      configs:
        debug: 
          CODE_SIGN_IDENTITY: iPhone Developer
          PROVISIONING_PROFILE_SPECIFIER: {Debugビルド用のProvisioning Profile}
        release: 
          CODE_SIGN_IDENTITY: iPhone Distribution
          PROVISIONING_PROFILE_SPECIFIER: {Releaseビルド用のProvisioning Profile}

アプリターゲットのdependenciesに以下を追加

project.yml
- target: NotificationService
  codeSign: false
  embed: true
5
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
4