kronenthaler / mod-pbxproj

A python module to manipulate XCode projects
MIT License
1.2k stars 294 forks source link

[FEAT] Can I change setting on Build Settings > Signing #328

Closed sewonist closed 1 year ago

sewonist commented 1 year ago

Hi

It's hard to make automation setting in xcode project. I want to all post setting for building Unity iOS project. pbxproj is most helpful for my pain. I've made automation script with it. Almost.. except one.

When I'm setting push notification, I would write custom entitlements file. I found this soultion from here. At the time, I have to setting this also.

In CODE_SIGN_ENTITLEMENTS, put your path:
$(SRCROOT)/ProjectName/PathToFolder/YourProject.entitlements
Here in Debug and Release you can choose different path.

Can I update Signing setting with pbxproj?? Please give any advices.

Thanks!

sewonist commented 1 year ago

I found solution. It work for me.

project = XcodeProject.load(projectPath)
project.set_flags('CODE_SIGN_ENTITLEMENTS', entitlementsPath, target, None)
project.save()

Thanks again 😘