@@ -87,7 +87,8 @@ public static void OnPostprocessBuild (BuildTarget buildTarget, string path)
8787 File . WriteAllText ( projectPath , tempProject . WriteToString ( ) ) ;
8888 }
8989
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 ;
9192 string [ ] entitlements = AssetDatabase . FindAssets ( "dev" )
9293 . Select ( AssetDatabase . GUIDToAssetPath )
9394 . Where ( p => p . Contains ( "dev.entitlements" ) )
@@ -112,20 +113,23 @@ static void AddEntitlements(PBXProject project, string path, string targetId){
112113 Debug . Log ( "Added entitlement to xcode project." ) ;
113114 }
114115
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 ;
116118 Debug . Log ( "Messaging testapp detected." ) ;
117119 AddFramework ( project , targetId , "UserNotifications.framework" ) ;
118120 EnableRemoteNotification ( project , path , targetId ) ;
119121 Debug . Log ( "Finished making messaging-specific changes." ) ;
120122 }
121123
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 ;
123126 Debug . Log ( "Auth testapp detected." ) ;
124127 AddFramework ( project , targetId , "UserNotifications.framework" ) ;
125128 Debug . Log ( "Finished making auth-specific changes." ) ;
126129 }
127130
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 ;
129133 Debug . Log ( "Adding remote-notification to UIBackgroundModes" ) ;
130134 var plist = new PlistDocument ( ) ;
131135 string plistPath = path + "/Info.plist" ;
@@ -137,13 +141,15 @@ static void EnableRemoteNotification(PBXProject project, string path, string tar
137141 Debug . Log ( "Finished adding remote-notification." ) ;
138142 }
139143
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 ;
141146 Debug . LogFormat ( "Adding framework to xcode project: {0}." , framework ) ;
142147 project . AddFrameworkToProject ( targetId , framework , false ) ;
143148 Debug . Log ( "Finished adding framework." ) ;
144149 }
145150
146- static string GetMainTargetGUID ( PBXProject pbxProject ) {
151+ static string GetMainTargetGUID ( object pbxProjectObj ) {
152+ var pbxProject = ( PBXProject ) pbxProjectObj ;
147153 // In 2019.3 Unity changed this API without an automated update path via the api-updater.
148154 // There doesn't seem to be a clean version-independent way to handle this logic.
149155 #if UNITY_2019_3_OR_NEWER
0 commit comments