Skip to content

Commit d4296db

Browse files
authored
Merge pull request #182 from lupidan/canary
v1.4.3 Release
2 parents e39981b + f2c6630 commit d4296db

11 files changed

Lines changed: 48 additions & 26 deletions

File tree

AppleAuth/AppleAuthManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class AppleAuthManager : IAppleAuthManager
1212
{
1313
static AppleAuthManager()
1414
{
15-
const string versionMessage = "Using Sign in with Apple Unity Plugin - v1.4.2";
15+
const string versionMessage = "Using Sign in with Apple Unity Plugin - v1.4.3";
1616
#if APPLE_AUTH_MANAGER_NATIVE_IMPLEMENTATION_AVAILABLE
1717
PInvoke.AppleAuth_LogMessage(versionMessage);
1818
#else

AppleAuth/Editor/ProjectCapabilityManagerExtension.cs

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public static class ProjectCapabilityManagerExtension
1212
private const string DefaultAccessLevel = "Default";
1313
private const string AuthenticationServicesFramework = "AuthenticationServices.framework";
1414
private const BindingFlags NonPublicInstanceBinding = BindingFlags.NonPublic | BindingFlags.Instance;
15+
private const BindingFlags PublicInstanceBinding = BindingFlags.Public | BindingFlags.Instance;
1516

1617
/// <summary>
1718
/// Extension method for ProjectCapabilityManager to add the Sign In With Apple capability in compatibility mode.
@@ -23,17 +24,15 @@ public static class ProjectCapabilityManagerExtension
2324
public static void AddSignInWithAppleWithCompatibility(this ProjectCapabilityManager manager, string unityFrameworkTargetGuid = null)
2425
{
2526
var managerType = typeof(ProjectCapabilityManager);
26-
var capabilityTypeType = typeof(PBXCapabilityType);
2727

2828
var projectField = managerType.GetField("project", NonPublicInstanceBinding);
2929
var targetGuidField = managerType.GetField("m_TargetGuid", NonPublicInstanceBinding);
3030
var entitlementFilePathField = managerType.GetField("m_EntitlementFilePath", NonPublicInstanceBinding);
3131
var getOrCreateEntitlementDocMethod = managerType.GetMethod("GetOrCreateEntitlementDoc", NonPublicInstanceBinding);
32-
var constructorInfo = capabilityTypeType.GetConstructor(
33-
NonPublicInstanceBinding,
34-
null,
35-
new[] {typeof(string), typeof(bool), typeof(string), typeof(bool)},
36-
null);
32+
33+
// in old unity versions PBXCapabilityType had internal ctor; that was changed to public afterwards - try both
34+
var constructorInfo = GetPBXCapabilityTypeConstructor(PublicInstanceBinding) ??
35+
GetPBXCapabilityTypeConstructor(NonPublicInstanceBinding);
3736

3837
if (projectField == null || targetGuidField == null || entitlementFilePathField == null ||
3938
getOrCreateEntitlementDocMethod == null || constructorInfo == null)
@@ -64,6 +63,15 @@ public static void AddSignInWithAppleWithCompatibility(this ProjectCapabilityMan
6463
project.AddCapability(mainTargetGuid, capabilityType, entitlementFilePath, false);
6564
}
6665
}
66+
67+
private static ConstructorInfo GetPBXCapabilityTypeConstructor(BindingFlags flags)
68+
{
69+
return typeof(PBXCapabilityType).GetConstructor(
70+
flags,
71+
null,
72+
new[] {typeof(string), typeof(bool), typeof(string), typeof(bool)},
73+
null);
74+
}
6775
}
6876
}
6977

AppleAuth/Native/AppleError.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,10 @@ public void OnAfterDeserialize()
3232

3333
SerializationTools.FixSerializationForArray(ref this._localizedRecoveryOptions);
3434
}
35+
36+
public override string ToString()
37+
{
38+
return $"Domain={_domain} Code={_code} Description={_localizedDescription}";
39+
}
3540
}
3641
}

AppleAuth/Native/macOS/MacOSAppleAuthManager.bundle/Contents/Info.plist

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<plist version="1.0">
44
<dict>
55
<key>BuildMachineOSBuild</key>
6-
<string>20F71</string>
6+
<string>22G120</string>
77
<key>CFBundleDevelopmentRegion</key>
88
<string>en</string>
99
<key>CFBundleExecutable</key>
@@ -17,7 +17,7 @@
1717
<key>CFBundlePackageType</key>
1818
<string>BNDL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>1.4.2</string>
20+
<string>1.4.3</string>
2121
<key>CFBundleSupportedPlatforms</key>
2222
<array>
2323
<string>MacOSX</string>
@@ -27,21 +27,21 @@
2727
<key>DTCompiler</key>
2828
<string>com.apple.compilers.llvm.clang.1_0</string>
2929
<key>DTPlatformBuild</key>
30-
<string>12E507</string>
30+
<string></string>
3131
<key>DTPlatformName</key>
3232
<string>macosx</string>
3333
<key>DTPlatformVersion</key>
34-
<string>11.3</string>
34+
<string>14.0</string>
3535
<key>DTSDKBuild</key>
36-
<string>20E214</string>
36+
<string>23A334</string>
3737
<key>DTSDKName</key>
38-
<string>macosx11.3</string>
38+
<string>macosx14.0</string>
3939
<key>DTXcode</key>
40-
<string>1251</string>
40+
<string>1500</string>
4141
<key>DTXcodeBuild</key>
42-
<string>12E507</string>
42+
<string>15A240d</string>
4343
<key>LSMinimumSystemVersion</key>
44-
<string>10.9</string>
44+
<string>10.13</string>
4545
<key>NSHumanReadableCopyright</key>
4646
<string>Copyright © 2020 Daniel Lupiañez Casares. All rights reserved.</string>
4747
</dict>
Binary file not shown.

AppleAuth/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "com.lupidan.apple-signin-unity-src",
33
"displayName": "Sign in with Apple [Local Source]",
4-
"version": "1.4.2",
4+
"version": "1.4.3",
55
"unity": "2018.3",
66
"description": "[Local Source]\nProvides a Unity bridge to use the native Sign In With Apple method on iOS/iPadOS/tvOS/macOS devices",
77
"author": {

AppleAuthSampleProject/ProjectSettings/ProjectSettings.asset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ PlayerSettings:
118118
16:10: 1
119119
16:9: 1
120120
Others: 1
121-
bundleVersion: 1.4.2
121+
bundleVersion: 1.4.3
122122
preloadedAssets: []
123123
metroInputSource: 0
124124
wsaTransparentSwapchain: 0

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## [1.4.3] - 2023-09-30
4+
### Changed
5+
- Updates `AddSignInWithAppleWithCompatibility` to support new public constructor for `PBXCapabilityType` introduced in Unity 2022.3.10
6+
- Increases minimum target for the macOS bundle to 10.13
7+
8+
### Added
9+
- Add `ToString` override to `AppleError`
10+
311
## [1.4.2] - 2020-07-17
412
### Changed
513
- Handles empty `NSPersonNameComponents` sent by Apple when not requesting a name, to be `nil` natively.
@@ -101,7 +109,8 @@
101109
- Added support to listen to Revoked Credentials notifications
102110
- Solved possible crashes that could happen when trying to execute a callback in the Native Message Handler, if the callback was to throw an exception, the application would crash.
103111

104-
[Unreleased]: https://github.com/lupidan/apple-signin-unity/compare/v1.4.2...HEAD
112+
[Unreleased]: https://github.com/lupidan/apple-signin-unity/compare/v1.4.3...HEAD
113+
[1.4.3]: https://github.com/lupidan/apple-signin-unity/compare/v1.4.2...v1.4.3
105114
[1.4.2]: https://github.com/lupidan/apple-signin-unity/compare/v1.4.1...v1.4.2
106115
[1.4.1]: https://github.com/lupidan/apple-signin-unity/compare/v1.4.0...v1.4.1
107116
[1.4.0]: https://github.com/lupidan/apple-signin-unity/compare/v1.3.0...v1.4.0

MacOSAppleAuthManager/MacOSAppleAuthManager.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,8 @@
290290
DEVELOPMENT_TEAM = "";
291291
INFOPLIST_FILE = MacOSAppleAuthManager/Info.plist;
292292
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
293-
MACOSX_DEPLOYMENT_TARGET = 10.9;
294-
MARKETING_VERSION = 1.4.2;
293+
MACOSX_DEPLOYMENT_TARGET = 10.13;
294+
MARKETING_VERSION = 1.4.3;
295295
ONLY_ACTIVE_ARCH = NO;
296296
PRODUCT_BUNDLE_IDENTIFIER = com.lupidan.MacOSAppleAuthManager;
297297
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -311,8 +311,8 @@
311311
DEVELOPMENT_TEAM = "";
312312
INFOPLIST_FILE = MacOSAppleAuthManager/Info.plist;
313313
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
314-
MACOSX_DEPLOYMENT_TARGET = 10.9;
315-
MARKETING_VERSION = 1.4.2;
314+
MACOSX_DEPLOYMENT_TARGET = 10.13;
315+
MARKETING_VERSION = 1.4.3;
316316
PRODUCT_BUNDLE_IDENTIFIER = com.lupidan.MacOSAppleAuthManager;
317317
PRODUCT_NAME = "$(TARGET_NAME)";
318318
PROVISIONING_PROFILE_SPECIFIER = "";

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Sign in with Apple in order to get approved for the App Store, making it **manda
9595

9696
## Installation
9797

98-
> Current stable version is v1.4.2
98+
> Current stable version is v1.4.3
9999
100100
There are two options available to install this plugin. Either using the Unity Package Manager, or the traditional `.unitypackage` file.
101101

@@ -109,7 +109,7 @@ Just add this line to the `Packages/manifest.json` file of your Unity Project:
109109

110110
```json
111111
"dependencies": {
112-
"com.lupidan.apple-signin-unity": "https://github.com/lupidan/apple-signin-unity.git#v1.4.2",
112+
"com.lupidan.apple-signin-unity": "https://github.com/lupidan/apple-signin-unity.git#v1.4.3",
113113
}
114114
```
115115

0 commit comments

Comments
 (0)