Skip to content

Commit

Permalink
Merge branch 'hotfix/v2.1.1' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
HarrisonHough committed Jan 9, 2024
2 parents 33f4bd1 + a797a93 commit 7a92517
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/latest.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ This release adds support for handling account linking and asset unlock events c

## Changelog

- scripting define symbol `RPM_DISABLE_WEBVIEW_PERMISSIONS` can now be used to disable Android permissions override @harrisonhough in [#26](https://github.com/readyplayerme/rpm-unity-sdk-webview/pull/26)

- fixed a flaw in the logic for disabling android build processor
- an error causing android builds to fail
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [2.1.0] - 2024.04.01
## [2.1.1] - 2024.09.01

### Fixed
- fixed a flaw in the logic for disabling android build processor
- an error causing android builds to fail

## [2.1.0] - 2024.08.01

### Added
- scripting define symbol `RPM_DISABLE_WEBVIEW_PERMISSIONS` can now be used to disable Android permissions override @harrisonhough in [#26](https://github.com/readyplayerme/rpm-unity-sdk-webview/pull/26)
Expand Down
4 changes: 2 additions & 2 deletions Editor/AndroidBuildProcessor.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#if UNITY_EDITOR && !RPM_DISABLE_WEBVIEW_PERMISSIONS
#if UNITY_ANDROID && !RPM_DISABLE_WEBVIEW_PERMISSIONS
using System.IO;
using System.Xml;
using UnityEditor;
using System.Text;
using UnityEditor.Android;
using UnityEditor.Callbacks;

namespace ReadyPlayerMe.WebView
namespace ReadyPlayerMe.WebView.Editor
{
/// <summary>
/// Receives a callback after the Android Gradle project is generated,
Expand Down
23 changes: 23 additions & 0 deletions Editor/IOSBuildProcessor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#if UNITY_IOS
using System.IO;
using UnityEditor;
using UnityEngine;
using UnityEditor.Callbacks;

namespace ReadyPlayerMe.WebView.Editor
{
public class IOSBuildProcessor
{
[PostProcessBuildAttribute(100)]
public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject)
{
if (BuildTarget.iOS != target) return;
var projectPath = $"{pathToBuiltProject}/Unity-iPhone.xcodeproj/project.pbxproj";
PBXProject proj = new PBXProject();
proj.ReadFromString(File.ReadAllText(projectPath));
proj.AddFrameworkToProject(proj.TargetGuidByName("Unity-iPhone"), "WebKit.framework", false);
File.WriteAllText(projectPath, proj.WriteToString());
}
}
}
#endif
11 changes: 11 additions & 0 deletions Editor/IOSBuildProcessor.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions Editor/ReadyPlayerMe.WebView.Editor.asmdef
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "ReadyPlayerMe.WebView.Editor",
"rootNamespace": "",
"references": [],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
7 changes: 7 additions & 0 deletions Editor/ReadyPlayerMe.WebView.Editor.asmdef.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions Editor/WebViewEditor.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#if UNITY_EDITOR
using UnityEditor;
using UnityEngine;

namespace ReadyPlayerMe.WebView
namespace ReadyPlayerMe.WebView.Editor
{
public class WebViewEditor : Editor
public class WebViewEditor : UnityEditor.Editor
{
private const string WEB_VIEW_CANVAS_FILE_NAME = "WebView Canvas";

Expand All @@ -22,4 +21,3 @@ private static void LoadWebViewCanvas()
}
}
}
#endif
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.readyplayerme.webview",
"version": "2.1.0",
"version": "2.1.1",
"displayName": "Ready Player Me WebView",
"description": "Ready Player Me WebView helps you display an in-engine browser that helps you load RPM website where you can create avatars and receive avatar URL at the end of the process.\nWebView is mobile only and works in Android and IOS builds.",
"category": "tool",
Expand Down

0 comments on commit 7a92517

Please sign in to comment.