Before [Xamarin] using the "Customize Command" to handle the build, clean up after work

Environment: Xamarin Studio, Mac, iOS

Prior to the test when "push notification", you need to go info.plist new aps-environment settings.

To set a formal environment "production", the test to be set "development".

Each time the build, have to manually adjust it.

Is there an automatic way?


On a Mac you want to adjust the data plist, this command can be transmitted through plistbuddy,

So we can project options => Custom command , add "before build" things to do,

When configured as the Debug, internet plist adjustment data for Device and iPhoneSimulator as follows,

/usr/libexec/PlistBuddy -c "Set aps-environment development" info.plist

When the configuration is then cut to Release, internet plist adjustment data for Device and iPhoneSimulator as follows,

/usr/libexec/PlistBuddy -c "Set aps-environment production" info.plist

So before you build, you will first execute the command, as follows,

So you do not always have to manually adjust the info.plist. Ya ..

Note:

The test program in the past, and if you select "run in the external console" will Build Fail.

In addition, if you use sh file also can Oh! Just remember that after the establishment of good sh file to set its property to be executed Oh!

Original: Large column  before [Xamarin] using the "Customize Command" to handle the build, clean up after work


Guess you like

Origin www.cnblogs.com/chinatrump/p/11505499.html