Skip to content

Commit

Permalink
updated binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
KojiNakamaru committed Jul 8, 2021
1 parent 5e9a56b commit 166cb03
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#if UNITY_EDITOR
using System.Collections;
using System.IO;
using System.Reflection;
using System.Text;
using System.Xml;
using System;
using UnityEditor.Android;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;
using UnityEditor;
using UnityEngine;

Expand Down Expand Up @@ -93,7 +94,13 @@ public static void OnPostprocessBuild(BuildTarget buildTarget, string path) {
#endif
if (buildTarget == BuildTarget.iOS) {
string projPath = path + "/Unity-iPhone.xcodeproj/project.pbxproj";
PBXProject proj = new PBXProject();
var type = Type.GetType("UnityEditor.iOS.Xcode.PBXProject, UnityEditor.iOS.Extensions.Xcode");
if (type == null)
{
Debug.LogError("unitywebview: failed to get PBXProject. please install iOS build support.");
return;
}
dynamic proj = type.GetConstructor(Type.EmptyTypes).Invoke(null);
proj.ReadFromString(File.ReadAllText(projPath));
#if UNITY_2019_3_OR_NEWER
proj.AddFrameworkToProject(proj.GetUnityFrameworkTargetGuid(), "WebKit.framework", false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>12E262</string>
<string>12E507</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
Expand All @@ -39,9 +39,9 @@
<key>DTSDKName</key>
<string>macosx11.3</string>
<key>DTXcode</key>
<string>1250</string>
<string>1251</string>
<key>DTXcodeBuild</key>
<string>12E262</string>
<string>12E507</string>
<key>LSMinimumSystemVersion</key>
<string>10.13</string>
</dict>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#if UNITY_EDITOR
using System.Collections;
using System.IO;
using System.Reflection;
using System.Text;
using System.Xml;
using System;
using UnityEditor.Android;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;
using UnityEditor;
using UnityEngine;

Expand Down Expand Up @@ -93,7 +94,13 @@ public static void OnPostprocessBuild(BuildTarget buildTarget, string path) {
#endif
if (buildTarget == BuildTarget.iOS) {
string projPath = path + "/Unity-iPhone.xcodeproj/project.pbxproj";
PBXProject proj = new PBXProject();
var type = Type.GetType("UnityEditor.iOS.Xcode.PBXProject, UnityEditor.iOS.Extensions.Xcode");
if (type == null)
{
Debug.LogError("unitywebview: failed to get PBXProject. please install iOS build support.");
return;
}
dynamic proj = type.GetConstructor(Type.EmptyTypes).Invoke(null);
proj.ReadFromString(File.ReadAllText(projPath));
#if UNITY_2019_3_OR_NEWER
proj.AddFrameworkToProject(proj.GetUnityFrameworkTargetGuid(), "WebKit.framework", false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>12E262</string>
<string>12E507</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
Expand All @@ -39,9 +39,9 @@
<key>DTSDKName</key>
<string>macosx11.3</string>
<key>DTXcode</key>
<string>1250</string>
<string>1251</string>
<key>DTXcodeBuild</key>
<string>12E262</string>
<string>12E507</string>
<key>LSMinimumSystemVersion</key>
<string>10.13</string>
</dict>
Expand Down
Binary file not shown.
Binary file modified dist/unity-webview-nofragment.unitypackage
Binary file not shown.
Binary file modified dist/unity-webview-nofragment.zip
Binary file not shown.
Binary file modified dist/unity-webview.unitypackage
Binary file not shown.
Binary file modified dist/unity-webview.zip
Binary file not shown.

0 comments on commit 166cb03

Please sign in to comment.