diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eba5db7..807f012 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -72,6 +72,30 @@ jobs: ${{github.workspace}}/build/OpenAL32.dll ${{github.workspace}}/build/libz.dll + build-ios: + # credit to pengubow from deepfriedwaffles repo + name: Build iOS + runs-on:macos-latest + + steps: + - name: Checkout + uses: actions/checkout@main + + - name: Build + run: | + cd project/iosproj + xcodebuild -scheme minecraftpe -derivedDataPath build -destination 'generic/platform=iOS' CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO + mkdir -p Payload + cp -R build/Build/Products/Debug-iphoneos/minecraftpe.app Payload/ + zip -r minecraftpe.ipa Payload + rm -rf Payload + + - name: Upload artifact + uses: actions/upload-artifact@main + with: + name: minecraftpe-ios + path: project/iosproj/minecraftpe.ipa + build-linux: name: Build Linux runs-on: ubuntu-latest @@ -340,4 +364,4 @@ jobs: ./minecraftpe-server-${{ steps.ref.outputs.hash }}.zip ./minecraftpe-${{ steps.ref.outputs.hash }}-android-arm64-v8a.zip ./minecraftpe-${{ steps.ref.outputs.hash }}-android-armeabi-v7a.zip - ./minecraftpe-${{ steps.ref.outputs.hash }}-web.zip \ No newline at end of file + ./minecraftpe-${{ steps.ref.outputs.hash }}-web.zip diff --git a/src/client/Minecraft.cpp b/src/client/Minecraft.cpp index a19dbaf..4fa0a23 100755 --- a/src/client/Minecraft.cpp +++ b/src/client/Minecraft.cpp @@ -1105,7 +1105,9 @@ void Minecraft::releaseMouse() } bool Minecraft::useTouchscreen() { -#ifdef RPI +#if TARGET_OS_IPHONE + return true; +#elif RPI return false; #endif return options.getBooleanValue(OPTIONS_USE_TOUCHSCREEN) && !_supportsNonTouchscreen;