File tree Expand file tree Collapse file tree 1 file changed +6
-22
lines changed
com.onesignal.unity.ios/Editor Expand file tree Collapse file tree 1 file changed +6
-22
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,12 @@ [Flags] private enum Entitlement {
91
91
92
92
private readonly PBXProject _project = new PBXProject ( ) ;
93
93
94
- public int callbackOrder => int . MaxValue ;
94
+ /// <summary>
95
+ /// must be between 40 and 50 to ensure that it's not overriden by Podfile generation (40) and that it's
96
+ /// added before "pod install" (50)
97
+ /// https://github.com/googlesamples/unity-jar-resolver#appending-text-to-generated-podfile
98
+ /// </summary>
99
+ public int callbackOrder => 45 ;
95
100
96
101
/// <summary>
97
102
/// Entry for the build post processing necessary to get the OneSignal SDK iOS up and running
@@ -279,27 +284,6 @@ private void ExtensionAddPodsToTarget() {
279
284
280
285
podfile += $ "target '{ ServiceExtensionTargetName } ' do\n pod 'OneSignalXCFramework', '~> 3.8.1'\n end\n ";
281
286
File . WriteAllText ( podfilePath , podfile ) ;
282
-
283
- var installResult = _runShellCommand ( $ "-c \" pod install --project-directory={ _outputPath } \" ") ;
284
- if ( ! installResult . Contains ( "Installing OneSignalXCFramework" ) )
285
- Debug . LogError ( $ "Could not detect install with Cocoapods. { ServiceExtensionFilename } may have errors.") ;
286
- }
287
-
288
- private static string _runShellCommand ( string command ) {
289
- var process = new Process {
290
- StartInfo = new ProcessStartInfo {
291
- FileName = "/bin/sh" ,
292
- Arguments = command ,
293
- RedirectStandardOutput = true ,
294
- UseShellExecute = false ,
295
- CreateNoWindow = true ,
296
- }
297
- } ;
298
-
299
- process . Start ( ) ;
300
- var ret = process . StandardOutput . ReadToEnd ( ) ;
301
- process . WaitForExit ( ) ;
302
- return ret ;
303
287
}
304
288
}
305
289
}
You can’t perform that action at this time.
0 commit comments