Hello!
I would like to know how to add push notification ON configuration in xcodegen

And where to find more information about how to configure this part.
Thank you beforehand for your support!
Hi @VictorUrielP
To answer questions like this, make the changes in a project that is tracked in git and then look at the diff. In this case there are actually quite a couple of changes.
Entitlement file
There is an entry added to your entitlement file. You can check the box in Xcode to edit your linked one or created a new one.
It will add the following content to your entitlements file.
<key>aps-environment</key>
<string>development</string>
To link an existing entitlements file you need to set the CODE_SIGN_ENTITLEMENTS build setting:
targets:
App:
settings:
CODE_SIGN_ENTITLEMENTS: path/to/Entitlements.entitlements
If you are instead generating an entitlements file you can define this in your target
targets:
App:
entitlements:
path: path/MyEntitlements.entitlements
properties:
aps-environment: development
Target attributes
It also seems Xcode adds the following attributes to a target.
SystemCapabilities = {
com.apple.Push = {
enabled = 1;
};
};
I'm not sure if this is required or not. If so you can set these like this:
targets:
App:
attributes:
SystemCapabilities:
com.apple.Push:
enabled: 1
I hope that helps you. Let me know if you have any more questions.
Thanks you for your answer. It took us a while to get this working. We figured out that we had to add other configuration in target Build Settings:
DEBUG_INFORMATION_FORMAT: dwarf-with-dsym
This line was overwritten by xcodegen to default property. Thanks again for your help. I will close this issue.
Most helpful comment
Hi @VictorUrielP
To answer questions like this, make the changes in a project that is tracked in git and then look at the diff. In this case there are actually quite a couple of changes.
Entitlement file
There is an entry added to your entitlement file. You can check the box in Xcode to edit your linked one or created a new one.
It will add the following content to your entitlements file.
To link an existing entitlements file you need to set the
CODE_SIGN_ENTITLEMENTSbuild setting:If you are instead generating an entitlements file you can define this in your target
Target attributes
It also seems Xcode adds the following attributes to a target.
I'm not sure if this is required or not. If so you can set these like this:
I hope that helps you. Let me know if you have any more questions.