Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,25 @@ The `CocoaPods` are either:
The resolution strategy can be changed via the
`Assets > Play Services Resolver > iOS Resolver > Settings` menu.

### Appending text to generated Podfile
In order to modify the generated Podfile you can create a script like this:
```
using System.IO;
public class PostProcessIOS : MonoBehaviour {
[PostProcessBuildAttribute(45)]//must be between 40 and 50 to ensure that it's not overriden by Podfile generation (40) and that it's added before "pod install" (50)
private static void PostProcessBuild_iOS(BuildTarget target, string buildPath)
{
if (target == BuildTarget.iOS)
{

using (StreamWriter sw = File.AppendText(buildPath + "/Podfile"))
{
//in this example I'm adding an app extension
sw.WriteLine("\ntarget 'NSExtension' do\n pod 'Firebase/Messaging', '6.6.0'\nend");
}
}
}
```
# Version Handler Usage

The Version Handler component of this plugin manages:
Expand Down
12 changes: 6 additions & 6 deletions source/IOSResolver/src/IOSResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -388,12 +388,12 @@ protected override bool Read(string filename, Logger logger) {
new SortedDictionary<string, Pod>();

// Order of post processing operations.
private const int BUILD_ORDER_REFRESH_DEPENDENCIES = 1;
private const int BUILD_ORDER_CHECK_COCOAPODS_INSTALL = 2;
private const int BUILD_ORDER_PATCH_PROJECT = 3;
private const int BUILD_ORDER_GEN_PODFILE = 4;
private const int BUILD_ORDER_INSTALL_PODS = 5;
private const int BUILD_ORDER_UPDATE_DEPS = 6;
private const int BUILD_ORDER_REFRESH_DEPENDENCIES = 10;
private const int BUILD_ORDER_CHECK_COCOAPODS_INSTALL = 20;
private const int BUILD_ORDER_PATCH_PROJECT = 30;
private const int BUILD_ORDER_GEN_PODFILE = 40;
private const int BUILD_ORDER_INSTALL_PODS = 50;
private const int BUILD_ORDER_UPDATE_DEPS = 60;

// This is appended to the Podfile filename to store a backup of the original Podfile.
// ie. "Podfile_Unity".
Expand Down