Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 35 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ jobs:
name: Build iOS
needs: prepare-release
runs-on: macos-14
env:
IOS_CERTIFICATE: ${{ secrets.IOS_CERTIFICATE }}
IOS_CERTIFICATE_PASSWORD: ${{ secrets.IOS_CERTIFICATE_PASSWORD }}
IOS_PROVISION_PROFILE: ${{ secrets.IOS_PROVISION_PROFILE }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -160,9 +164,39 @@ jobs:
- name: Install iOS Workload
run: dotnet workload install ios

- name: Build iOS
- name: Import Certificate and Provisioning Profile
if: env.IOS_CERTIFICATE != ''
run: |
# Create variables
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
PP_PATH=$RUNNER_TEMP/build_profile.mobileprovision
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db

# Import certificate and provisioning profile from secrets
echo -n "$IOS_CERTIFICATE" | base64 --decode -o $CERTIFICATE_PATH
echo -n "$IOS_PROVISION_PROFILE" | base64 --decode -o $PP_PATH

# Create temporary keychain
security create-keychain -p "" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "" $KEYCHAIN_PATH

# Import certificate to keychain
security import $CERTIFICATE_PATH -P "$IOS_CERTIFICATE_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH

# Apply provisioning profile
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles/

- name: Build iOS (Signed)
if: env.IOS_CERTIFICATE != ''
run: dotnet publish -c Release -r ios-arm64 osu.iOS/osu.iOS.csproj -p:ArchiveOnBuild=true -p:Version=${{ needs.prepare-release.outputs.version }}

- name: Build iOS (Unsigned)
if: env.IOS_CERTIFICATE == ''
run: dotnet publish -c Release -r ios-arm64 osu.iOS/osu.iOS.csproj -p:ArchiveOnBuild=false -p:Version=${{ needs.prepare-release.outputs.version }}

- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
Expand Down
4 changes: 3 additions & 1 deletion osu.Android/OsuGameActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,10 @@ await Task.WhenAll(uris.Select(async uri =>
return findSurfaceView(rootView)?.Holder?.Surface;
}

private global::Android.Views.SurfaceView? findSurfaceView(global::Android.Views.View view)
private global::Android.Views.SurfaceView? findSurfaceView(global::Android.Views.View? view)
{
if (view == null) return null;

if (view is global::Android.Views.SurfaceView sv) return sv;
if (view is global::Android.Views.ViewGroup vg)
{
Expand Down
Loading