Skip to content

Commit

Permalink
Merge pull request apple#15 from jared-marsau/gk_viewcontroller_fx
Browse files Browse the repository at this point in the history
Bug fixes for the GameKit plug-in.
  • Loading branch information
jared-marsau authored and GitHub Enterprise committed Dec 22, 2022
2 parents 8dc2a55 + a4b5d74 commit 72a6b1f
Show file tree
Hide file tree
Showing 8 changed files with 169 additions and 62 deletions.

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

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-6450165528288752212
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe2e2f0820ab4779ac857f0e06bac5fb, type: 3}
m_Name: AppleUserManagementBuildStep
m_EditorClassIdentifier:
IsEnabled: 0
AllowGetCurrentUser: 0
AllowRunsAsCurrentUser: 0
--- !u!114 &-2574758401583084156
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 88a319fb99484804b632ce9bbec4cf6d, type: 3}
m_Name: AppleSecurityBuildStep
m_EditorClassIdentifier:
IsEnabled: 1
AppSandboxEntitlement: 1
AllowNetworkServer: 0
AllowNetworkClient: 0
AllowCamera: 0
AllowMicrophone: 0
AllowUsb: 0
AllowPrint: 0
AllowBluetooth: 0
AllowAddressBook: 0
AllowLocation: 0
AllowCalendars: 0
AllowUserSelectedReadOnly: 0
AllowUserSelectedReadWrite: 0
AllowDownloadsReadOnly: 0
AllowDownloadsReadWrite: 0
AllowPicturesReadOnly: 0
AllowPicturesReadWrite: 0
AllowMusicReadOnly: 0
AllowMusicReadWrite: 0
AllowMoviesReadOnly: 0
AllowMoviesReadWrite: 0
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6b2797781d18e4c5987f2acb206f9e7b, type: 3}
m_Name: DefaultAppleBuildProfile
m_EditorClassIdentifier:
AutomateInfoPlist: 1
DefaultInfoPlist: {fileID: 0}
MinimumOSVersion_iOS:
MinimumOSVersion_tvOS:
MinimumOSVersion_macOS:
AppUsesNonExemptEncryption: 0
AutomateEntitlements: 1
DefaultEntitlements: {fileID: 0}
--- !u!114 &3595795138729071060
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 24e6011bb95664520aa4858e4c359e06, type: 3}
m_Name: AppleGameKitBuildStep
m_EditorClassIdentifier:
IsEnabled: 1
--- !u!114 &5727258473835731888
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c6b8a8fe473224decaaecc9264d56e95, type: 3}
m_Name: AppleCoreBuildStep
m_EditorClassIdentifier:
IsEnabled: 1

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

Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# CHANGELOG
All notable changes to this project will be documented in this file.

## [1.0.4] - 2022-12-21
### Changed
- Post build script phase of native library project was failing to correctly copy libraries; updated to use Xcode's built in 'copy files' phase.
### Fixed
- Fixed an issue in which app would freeze/become unresponsible after viewing and closing leaderboards.

## [1.0.3] - 2022-11-29
### Changed
- Disabled bitcode generation in all native library project build targets.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "com.apple.unityplugin.gamekit",
"displayName": "Apple.GameKit",
"description": "Exposes Apple's GameKit.framework to Unity developers via C# script API",
"version": "1.0.3",
"version": "1.0.4",
"unity": "2019.4",
"dependencies": {
"com.apple.unityplugin.core": "1.0.2"
Expand Down
101 changes: 40 additions & 61 deletions plug-ins/Apple.GameKit/Native/GameKitWrapper.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 54;
objectVersion = 50;
objects = {

/* Begin PBXAggregateTarget section */
Expand All @@ -23,6 +23,9 @@
/* End PBXAggregateTarget section */

/* Begin PBXBuildFile section */
249884252953BCD6003E9DB7 /* GameKitWrapper.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 7A9B815324A4FC3800FB2FE8 /* GameKitWrapper.framework */; };
249884272953C081003E9DB7 /* GameKitWrapper.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 7AE5BBA22502C0DD00BDBEDA /* GameKitWrapper.framework */; };
249884292953C09D003E9DB7 /* GameKitWrapper.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 7A7E439624B508D40086FB7A /* GameKitWrapper.bundle */; };
7A3E81F726F27BD800B102BB /* GKNotificationBanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A3E81F626F27BD800B102BB /* GKNotificationBanner.swift */; };
7A3E81F826F27BD800B102BB /* GKNotificationBanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A3E81F626F27BD800B102BB /* GKNotificationBanner.swift */; };
7A3E81F926F27BD800B102BB /* GKNotificationBanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A3E81F626F27BD800B102BB /* GKNotificationBanner.swift */; };
Expand Down Expand Up @@ -163,6 +166,39 @@
};
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
249884242953BCA5003E9DB7 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "$(PROJECT_DIR)/../Apple.GameKit_Unity/Assets/Apple.GameKit/Plugins/iOS";
dstSubfolderSpec = 0;
files = (
249884252953BCD6003E9DB7 /* GameKitWrapper.framework in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
249884262953C066003E9DB7 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "$(PROJECT_DIR)/../Apple.GameKit_Unity/Assets/Apple.GameKit/Plugins/tvOS";
dstSubfolderSpec = 0;
files = (
249884272953C081003E9DB7 /* GameKitWrapper.framework in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
249884282953C08D003E9DB7 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "$(PROJECT_DIR)/../Apple.GameKit_Unity/Assets/Apple.GameKit/Plugins/macOS";
dstSubfolderSpec = 0;
files = (
249884292953C09D003E9DB7 /* GameKitWrapper.bundle in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
46531AD89A1A23DEFB9D6429 /* libPods-GameKitWrapperUnitTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-GameKitWrapperUnitTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
7A3E81F626F27BD800B102BB /* GKNotificationBanner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GKNotificationBanner.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -353,7 +389,7 @@
7A7E439224B508D40086FB7A /* Sources */,
7A7E439324B508D40086FB7A /* Frameworks */,
7A7E439424B508D40086FB7A /* Resources */,
7AB16546256D803900582D43 /* ShellScript */,
249884282953C08D003E9DB7 /* CopyFiles */,
);
buildRules = (
);
Expand All @@ -372,7 +408,7 @@
7A9B814F24A4FC3800FB2FE8 /* Sources */,
7A9B815024A4FC3800FB2FE8 /* Frameworks */,
7A9B815124A4FC3800FB2FE8 /* Resources */,
7AB1653B256D7FB500582D43 /* ShellScript */,
249884242953BCA5003E9DB7 /* CopyFiles */,
);
buildRules = (
);
Expand All @@ -391,7 +427,7 @@
7AE5BB8C2502C0DD00BDBEDA /* Sources */,
7AE5BB9D2502C0DD00BDBEDA /* Frameworks */,
7AE5BB9E2502C0DD00BDBEDA /* Resources */,
7AB16542256D802200582D43 /* ShellScript */,
249884262953C066003E9DB7 /* CopyFiles */,
);
buildRules = (
);
Expand Down Expand Up @@ -469,63 +505,6 @@
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
7AB1653B256D7FB500582D43 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Remove and copy fresh build...\nrm -rf \"${PROJECT_DIR}/../Apple.GameKit_Unity/Assets/Apple.GameKit/Plugins/iOS/GameKitWrapper.framework\"\ncp -f -R \"${BUILT_PRODUCTS_DIR}/${APPLICATION_NAME}/GameKitWrapper.framework\" \"${PROJECT_DIR}/../Apple.GameKit_Unity/Assets/Apple.GameKit/Plugins/iOS/\"\n";
};
7AB16542256D802200582D43 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Remove and copy fresh build...\nrm -rf \"${PROJECT_DIR}/../Apple.GameKit_Unity/Assets/Apple.GameKit/Plugins/tvOS/GameKitWrapper.framework\"\ncp -f -R \"${BUILT_PRODUCTS_DIR}/${APPLICATION_NAME}/GameKitWrapper.framework\" \"${PROJECT_DIR}/../Apple.GameKit_Unity/Assets/Apple.GameKit/Plugins/tvOS/\"\n";
};
7AB16546256D803900582D43 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Remove and copy fresh build...\nrm -rf \"${PROJECT_DIR}/../Apple.GameKit_Unity/Assets/Apple.GameKit/Plugins/macOS/GameKitWrapper.bundle\"\ncp -f -R \"${BUILT_PRODUCTS_DIR}/${APPLICATION_NAME}/GameKitWrapper.bundle\" \"${PROJECT_DIR}/../Apple.GameKit_Unity/Assets/Apple.GameKit/Plugins/macOS/\"\n";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
7A7E439224B508D40086FB7A /* Sources */ = {
isa = PBXSourcesBuildPhase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public func GKGameCenterViewController_Present
{
let target = Unmanaged<GKGameCenterViewController>.fromOpaque(pointer).takeUnretainedValue();
_currentPresentingGameCenterDelegate = GameKitUIDelegateHandler(taskId: taskId, onSuccess: onSuccess);
target.gameCenterDelegate = _currentPresentingGameCenterDelegate;

#if os(iOS) || os(tvOS)
let viewController = UIApplication.shared.windows.first!.rootViewController;
Expand Down

0 comments on commit 72a6b1f

Please sign in to comment.