@@ -87,7 +87,8 @@ public static void OnPostprocessBuild (BuildTarget buildTarget, string path)
87
87
File . WriteAllText ( projectPath , tempProject . WriteToString ( ) ) ;
88
88
}
89
89
90
- static void AddEntitlements ( PBXProject project , string path , string targetId ) {
90
+ static void AddEntitlements ( object projectObj , string path , string targetId ) {
91
+ var project = ( PBXProject ) projectObj ;
91
92
string [ ] entitlements = AssetDatabase . FindAssets ( "dev" )
92
93
. Select ( AssetDatabase . GUIDToAssetPath )
93
94
. Where ( p => p . Contains ( "dev.entitlements" ) )
@@ -112,20 +113,23 @@ static void AddEntitlements(PBXProject project, string path, string targetId){
112
113
Debug . Log ( "Added entitlement to xcode project." ) ;
113
114
}
114
115
115
- static void MakeChangesForMessaging ( PBXProject project , string path , string targetId ) {
116
+ static void MakeChangesForMessaging ( object projectObj , string path , string targetId ) {
117
+ var project = ( PBXProject ) projectObj ;
116
118
Debug . Log ( "Messaging testapp detected." ) ;
117
119
AddFramework ( project , targetId , "UserNotifications.framework" ) ;
118
120
EnableRemoteNotification ( project , path , targetId ) ;
119
121
Debug . Log ( "Finished making messaging-specific changes." ) ;
120
122
}
121
123
122
- static void MakeChangesForAuth ( PBXProject project , string path , string targetId ) {
124
+ static void MakeChangesForAuth ( object projectObj , string path , string targetId ) {
125
+ var project = ( PBXProject ) projectObj ;
123
126
Debug . Log ( "Auth testapp detected." ) ;
124
127
AddFramework ( project , targetId , "UserNotifications.framework" ) ;
125
128
Debug . Log ( "Finished making auth-specific changes." ) ;
126
129
}
127
130
128
- static void EnableRemoteNotification ( PBXProject project , string path , string targetId ) {
131
+ static void EnableRemoteNotification ( object projectObj , string path , string targetId ) {
132
+ var project = ( PBXProject ) projectObj ;
129
133
Debug . Log ( "Adding remote-notification to UIBackgroundModes" ) ;
130
134
var plist = new PlistDocument ( ) ;
131
135
string plistPath = path + "/Info.plist" ;
@@ -137,13 +141,15 @@ static void EnableRemoteNotification(PBXProject project, string path, string tar
137
141
Debug . Log ( "Finished adding remote-notification." ) ;
138
142
}
139
143
140
- static void AddFramework ( PBXProject project , string targetId , string framework ) {
144
+ static void AddFramework ( object projectObj , string targetId , string framework ) {
145
+ var project = ( PBXProject ) projectObj ;
141
146
Debug . LogFormat ( "Adding framework to xcode project: {0}." , framework ) ;
142
147
project . AddFrameworkToProject ( targetId , framework , false ) ;
143
148
Debug . Log ( "Finished adding framework." ) ;
144
149
}
145
150
146
- static string GetMainTargetGUID ( PBXProject pbxProject ) {
151
+ static string GetMainTargetGUID ( object pbxProjectObj ) {
152
+ var pbxProject = ( PBXProject ) pbxProjectObj ;
147
153
// In 2019.3 Unity changed this API without an automated update path via the api-updater.
148
154
// There doesn't seem to be a clean version-independent way to handle this logic.
149
155
#if UNITY_2019_3_OR_NEWER
0 commit comments