Skip to content

Commit

Permalink
Merge pull request lupidan#112 from lupidan/canary
Browse files Browse the repository at this point in the history
v1.4.2 Release
  • Loading branch information
lupidan authored Jul 17, 2021
2 parents 1bac913 + 4db7e2e commit e39981b
Show file tree
Hide file tree
Showing 14 changed files with 46 additions and 34 deletions.
2 changes: 1 addition & 1 deletion AppleAuth/AppleAuthManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class AppleAuthManager : IAppleAuthManager
{
static AppleAuthManager()
{
const string versionMessage = "Using Sign in with Apple Unity Plugin - v1.4.1";
const string versionMessage = "Using Sign in with Apple Unity Plugin - v1.4.2";
#if APPLE_AUTH_MANAGER_NATIVE_IMPLEMENTATION_AVAILABLE
PInvoke.AppleAuth_LogMessage(versionMessage);
#else
Expand Down
2 changes: 0 additions & 2 deletions AppleAuth/Native/AppleIDCredential.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ public void OnAfterDeserialize()
SerializationTools.FixSerializationForArray(ref this._authorizedScopes);

SerializationTools.FixSerializationForObject(ref this._fullName, this._hasFullName);

SerializationTools.FixSerializationForFullPersonName(ref this._fullName);

this._identityToken = SerializationTools.GetBytesFromBase64String(this._base64IdentityToken, "_identityToken");
this._authorizationCode = SerializationTools.GetBytesFromBase64String(this._base64AuthorizationCode, "_authorizationCode");
Expand Down
13 changes: 0 additions & 13 deletions AppleAuth/Native/SerializationTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,6 @@ internal static void FixSerializationForObject<T>(ref T originalObject, bool has
if (!hasOriginalObject)
originalObject = default(T);
}

internal static void FixSerializationForFullPersonName(ref FullPersonName originalFullPersonName)
{
if (string.IsNullOrEmpty(originalFullPersonName._namePrefix) &&
string.IsNullOrEmpty(originalFullPersonName._givenName) &&
string.IsNullOrEmpty(originalFullPersonName._middleName) &&
string.IsNullOrEmpty(originalFullPersonName._familyName) &&
string.IsNullOrEmpty(originalFullPersonName._nameSuffix) &&
string.IsNullOrEmpty(originalFullPersonName._nickname))
{
originalFullPersonName = default(FullPersonName);
}
}

internal static byte[] GetBytesFromBase64String(string base64String, string fieldName)
{
Expand Down
12 changes: 12 additions & 0 deletions AppleAuth/Native/iOS/AppleAuthSerializer.m
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,18 @@ + (NSDictionary *) dictionaryForNSPersonNameComponents:(NSPersonNameComponents *
if (!nameComponents)
return nil;

// Sometimes, when not requesting a name in the ASAuthorizationAppleIDRequest scopes,
// Apple will just send an empty NSPersonNameComponents instance...
// This should be treated as a nil person name components
if ([nameComponents namePrefix] == nil &&
[nameComponents givenName] == nil &&
[nameComponents middleName] == nil &&
[nameComponents familyName] == nil &&
[nameComponents nameSuffix] == nil &&
[nameComponents nickname] == nil &&
[nameComponents phoneticRepresentation] == nil)
return nil;

NSMutableDictionary *result = [NSMutableDictionary dictionary];
[result setValue:[nameComponents namePrefix] forKey:@"_namePrefix"];
[result setValue:[nameComponents givenName] forKey:@"_givenName"];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>19H15</string>
<string>20F71</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
Expand All @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.4.1</string>
<string>1.4.2</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
Expand All @@ -27,19 +27,19 @@
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>12B45b</string>
<string>12E507</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>11.0</string>
<string>11.3</string>
<key>DTSDKBuild</key>
<string>20A2408</string>
<string>20E214</string>
<key>DTSDKName</key>
<string>macosx11.0</string>
<string>macosx11.3</string>
<key>DTXcode</key>
<string>1220</string>
<string>1251</string>
<key>DTXcodeBuild</key>
<string>12B45b</string>
<string>12E507</string>
<key>LSMinimumSystemVersion</key>
<string>10.9</string>
<key>NSHumanReadableCopyright</key>
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion AppleAuth/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.lupidan.apple-signin-unity-src",
"displayName": "Sign in with Apple [Local Source]",
"version": "1.4.1",
"version": "1.4.2",
"unity": "2018.3",
"description": "[Local Source]\nProvides a Unity bridge to use the native Sign In With Apple method on iOS/iPadOS/tvOS/macOS devices",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion AppleAuthSampleProject/Packages/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"dependencies": {
"com.lupidan.apple-signin-unity-src": "file:../../AppleAuth",
"com.unity.package-manager-ui": "2.0.7",
"com.unity.package-manager-ui": "2.0.13",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.animation": "1.0.0",
"com.unity.modules.assetbundle": "1.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ PlayerSettings:
16:10: 1
16:9: 1
Others: 1
bundleVersion: 1.4.1
bundleVersion: 1.4.2
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0
Expand Down
2 changes: 1 addition & 1 deletion AppleAuthSampleProject/ProjectSettings/ProjectVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
m_EditorVersion: 2018.3.14f1
m_EditorVersion: 2018.4.36f1
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [1.4.2] - 2020-07-17
### Changed
- Handles empty `NSPersonNameComponents` sent by Apple when not requesting a name, to be `nil` natively.
- Updated `MacOSAppleAuthManager.bundle` with the updated native code

### Removed
- Removes `FixSerializationForFullPersonName` and any usage of it when deserializing to avoid NRE

## [1.4.1] - 2020-11-28
### Added
- Updates plugin's main `MacOSAppleAuthManager.bundle` to support Apple Silicon `arm64` architecture
Expand Down Expand Up @@ -93,7 +101,8 @@
- Added support to listen to Revoked Credentials notifications
- 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.

[Unreleased]: https://github.com/lupidan/apple-signin-unity/compare/v1.4.1...HEAD
[Unreleased]: https://github.com/lupidan/apple-signin-unity/compare/v1.4.2...HEAD
[1.4.2]: https://github.com/lupidan/apple-signin-unity/compare/v1.4.1...v1.4.2
[1.4.1]: https://github.com/lupidan/apple-signin-unity/compare/v1.4.0...v1.4.1
[1.4.0]: https://github.com/lupidan/apple-signin-unity/compare/v1.3.0...v1.4.0
[1.3.0]: https://github.com/lupidan/apple-signin-unity/compare/v1.2.0...v1.3.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,15 +284,18 @@
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD)";
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = MacOSAppleAuthManager/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
MACOSX_DEPLOYMENT_TARGET = 10.9;
MARKETING_VERSION = 1.4.1;
MARKETING_VERSION = 1.4.2;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.lupidan.MacOSAppleAuthManager;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
WRAPPER_EXTENSION = bundle;
};
Expand All @@ -302,14 +305,17 @@
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD)";
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = MacOSAppleAuthManager/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
MACOSX_DEPLOYMENT_TARGET = 10.9;
MARKETING_VERSION = 1.4.1;
MARKETING_VERSION = 1.4.2;
PRODUCT_BUNDLE_IDENTIFIER = com.lupidan.MacOSAppleAuthManager;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
WRAPPER_EXTENSION = bundle;
};
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Sign in with Apple in order to get approved for the App Store, making it **manda

## Installation

> Current stable version is v1.4.1
> Current stable version is v1.4.2
There are two options available to install this plugin. Either using the Unity Package Manager, or the traditional `.unitypackage` file.

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

```json
"dependencies": {
"com.lupidan.apple-signin-unity": "https://github.com/lupidan/apple-signin-unity.git#v1.4.1",
"com.lupidan.apple-signin-unity": "https://github.com/lupidan/apple-signin-unity.git#v1.4.2",
}
```

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.lupidan.apple-signin-unity",
"displayName": "Sign in with Apple",
"version": "1.4.1",
"version": "1.4.2",
"unity": "2018.3",
"description": "Provides a Unity bridge to use the native Sign In With Apple method on iOS/iPadOS/tvOS/macOS devices",
"author": {
Expand Down

0 comments on commit e39981b

Please sign in to comment.