Skip to content

Commit 166cb03

Browse files
committed
updated binaries
1 parent 5e9a56b commit 166cb03

File tree

10 files changed

+24
-10
lines changed

10 files changed

+24
-10
lines changed

dist/package-nofragment/Assets/Plugins/Editor/UnityWebViewPostprocessBuild.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#if UNITY_EDITOR
22
using System.Collections;
33
using System.IO;
4+
using System.Reflection;
45
using System.Text;
56
using System.Xml;
7+
using System;
68
using UnityEditor.Android;
79
using UnityEditor.Callbacks;
8-
using UnityEditor.iOS.Xcode;
910
using UnityEditor;
1011
using UnityEngine;
1112

@@ -93,7 +94,13 @@ public static void OnPostprocessBuild(BuildTarget buildTarget, string path) {
9394
#endif
9495
if (buildTarget == BuildTarget.iOS) {
9596
string projPath = path + "/Unity-iPhone.xcodeproj/project.pbxproj";
96-
PBXProject proj = new PBXProject();
97+
var type = Type.GetType("UnityEditor.iOS.Xcode.PBXProject, UnityEditor.iOS.Extensions.Xcode");
98+
if (type == null)
99+
{
100+
Debug.LogError("unitywebview: failed to get PBXProject. please install iOS build support.");
101+
return;
102+
}
103+
dynamic proj = type.GetConstructor(Type.EmptyTypes).Invoke(null);
97104
proj.ReadFromString(File.ReadAllText(projPath));
98105
#if UNITY_2019_3_OR_NEWER
99106
proj.AddFrameworkToProject(proj.GetUnityFrameworkTargetGuid(), "WebKit.framework", false);

dist/package-nofragment/Assets/Plugins/WebView.bundle/Contents/Info.plist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<key>DTCompiler</key>
3030
<string>com.apple.compilers.llvm.clang.1_0</string>
3131
<key>DTPlatformBuild</key>
32-
<string>12E262</string>
32+
<string>12E507</string>
3333
<key>DTPlatformName</key>
3434
<string>macosx</string>
3535
<key>DTPlatformVersion</key>
@@ -39,9 +39,9 @@
3939
<key>DTSDKName</key>
4040
<string>macosx11.3</string>
4141
<key>DTXcode</key>
42-
<string>1250</string>
42+
<string>1251</string>
4343
<key>DTXcodeBuild</key>
44-
<string>12E262</string>
44+
<string>12E507</string>
4545
<key>LSMinimumSystemVersion</key>
4646
<string>10.13</string>
4747
</dict>
Binary file not shown.

dist/package/Assets/Plugins/Editor/UnityWebViewPostprocessBuild.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#if UNITY_EDITOR
22
using System.Collections;
33
using System.IO;
4+
using System.Reflection;
45
using System.Text;
56
using System.Xml;
7+
using System;
68
using UnityEditor.Android;
79
using UnityEditor.Callbacks;
8-
using UnityEditor.iOS.Xcode;
910
using UnityEditor;
1011
using UnityEngine;
1112

@@ -93,7 +94,13 @@ public static void OnPostprocessBuild(BuildTarget buildTarget, string path) {
9394
#endif
9495
if (buildTarget == BuildTarget.iOS) {
9596
string projPath = path + "/Unity-iPhone.xcodeproj/project.pbxproj";
96-
PBXProject proj = new PBXProject();
97+
var type = Type.GetType("UnityEditor.iOS.Xcode.PBXProject, UnityEditor.iOS.Extensions.Xcode");
98+
if (type == null)
99+
{
100+
Debug.LogError("unitywebview: failed to get PBXProject. please install iOS build support.");
101+
return;
102+
}
103+
dynamic proj = type.GetConstructor(Type.EmptyTypes).Invoke(null);
97104
proj.ReadFromString(File.ReadAllText(projPath));
98105
#if UNITY_2019_3_OR_NEWER
99106
proj.AddFrameworkToProject(proj.GetUnityFrameworkTargetGuid(), "WebKit.framework", false);

dist/package/Assets/Plugins/WebView.bundle/Contents/Info.plist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<key>DTCompiler</key>
3030
<string>com.apple.compilers.llvm.clang.1_0</string>
3131
<key>DTPlatformBuild</key>
32-
<string>12E262</string>
32+
<string>12E507</string>
3333
<key>DTPlatformName</key>
3434
<string>macosx</string>
3535
<key>DTPlatformVersion</key>
@@ -39,9 +39,9 @@
3939
<key>DTSDKName</key>
4040
<string>macosx11.3</string>
4141
<key>DTXcode</key>
42-
<string>1250</string>
42+
<string>1251</string>
4343
<key>DTXcodeBuild</key>
44-
<string>12E262</string>
44+
<string>12E507</string>
4545
<key>LSMinimumSystemVersion</key>
4646
<string>10.13</string>
4747
</dict>
Binary file not shown.
108 Bytes
Binary file not shown.

dist/unity-webview-nofragment.zip

125 Bytes
Binary file not shown.

dist/unity-webview.unitypackage

86 Bytes
Binary file not shown.

dist/unity-webview.zip

125 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)