Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement iOS one-click deploy. #70662

Merged
merged 1 commit into from
Jul 12, 2023
Merged

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Dec 28, 2022

Updated and improved version of #33086

Implements godotengine/godot-proposals#3506, one click deploy and remote debug for iOS devices and simulator.

Screenshot 2022-12-28 at 09 08 50

To use:

  • Full Xcode (not command line tools) should be installed.
  • ios-deploy should be installed and path added to the editor settings (Export ⇾ iOS ⇾ iOSDeploy).
    • Simulator should be running.
    • Device should be in developer mode, have developer account added to trusted on a device (Settings ⇾ General ⇾ VPN & Device Management), and screen unlocked.
    • For remote debugging on a real device, make sure the device is on the same network and a correct network interface is selected in the editor settings (Network ⇾ Debug ⇾ Remote Host). By default, the editor is listening for localhost connections only.

Note: official export templates do not include arm64 simulator binary due to OSXCross limitations, so to use simulator on Apple Silicon Macs a custom build should be used (build flags platform=ios ios_simulator=yes arch=arm64).

@bruvzg bruvzg added this to the 4.x milestone Dec 28, 2022
@bruvzg bruvzg force-pushed the one_click_ios_v2 branch 2 times, most recently from 27f3874 to 664541a Compare December 28, 2022 08:06
@bruvzg bruvzg marked this pull request as ready for review December 28, 2022 12:33
@bruvzg bruvzg requested review from a team as code owners December 28, 2022 12:33
@fire
Copy link
Member

fire commented Feb 12, 2023

@punto- You mentioned this in a chat. Feel free to test it.

@bruvzg bruvzg force-pushed the one_click_ios_v2 branch 2 times, most recently from 2f418f7 to 2905745 Compare May 15, 2023 16:45
@gianmichelemariani
Copy link

Is this making it into official builds anytime soon? 4.1 ?

@Calinou
Copy link
Member

Calinou commented Jun 6, 2023

Is this making it into official builds anytime soon? 4.1 ?

4.1 is in feature freeze, so this won't be merged until after 4.1. This PR also needs to be tested – you can help 🙂

@YuriSizov YuriSizov modified the milestones: 4.x, 4.2 Jun 6, 2023
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me from a cursory check, though TIWAGOS, I'm not an expert.
Should be good to merge after 4.1 is released, so we can document it and test it throughly for 4.2.

platform/ios/export/export.cpp Outdated Show resolved Hide resolved
@YuriSizov
Copy link
Contributor

@bruvzg Needs a rebase and addressing Akien's comment.

@bruvzg bruvzg force-pushed the one_click_ios_v2 branch from 2905745 to 43610f9 Compare July 12, 2023 13:22
@bruvzg bruvzg force-pushed the one_click_ios_v2 branch from 43610f9 to 7b7f6d4 Compare July 12, 2023 13:25
@YuriSizov YuriSizov merged commit 515f25e into godotengine:master Jul 12, 2023
@YuriSizov
Copy link
Contributor

Thanks!

@shafnaz
Copy link

shafnaz commented Jul 20, 2023

Nice!

@vanoak
Copy link

vanoak commented Dec 1, 2023

First, this works great! A huge timesaver! (Godot v4.2.stable - macOS 14.1.0 - GLES3 (Compatibility) - ANGLE (Apple, ANGLE Metal Renderer: Apple M1 Pro, Version 14.1 (Build 23B74)) - Apple M1 Pro (10 Threads))

The issue is that even in GLES3 (Compatibility) the "ALERT! Your GPU (Apple A9 GPU) does not support the following issues which are required to use Vulkan-based renderers in Godot" shows up which is unexpected because I thought that GLES3 was not Vulkan based.

EDIT: I'm using Xcode 15.0.1, deploying to iOS 15.8

@Calinou
Copy link
Member

Calinou commented Dec 1, 2023

The issue is that even in GLES3 (Compatibility) the "ALERT! Your GPU (Apple A9 GPU) does not support the following issues which are required to use Vulkan-based renderers in Godot" shows up which is unexpected because I thought that GLES3 was not Vulkan based.

Make sure your mobile rendering method override in the Project Settings is also changed to Compatibility, as the dropdown in the top-right corner of the editor doesn't do that: #72461

@vanoak
Copy link

vanoak commented Dec 1, 2023

Fixed. Thanks @Calinou.

@mellowminx
Copy link

mellowminx commented Dec 7, 2023

Super excited when I heard about the new one-click deploy to iOS feature in 4.2 but does anyone have step-by-step instructions for how to use it / troubleshooting? I tried it but can't get it to work. The button for it is still grayed out and says "No Remote Debug export presets configured".

I've set up the iOS export preset and set it to "Runnable"
My iPhone is attached to my laptop using USB-C to USB-C cable
My iPhone has "developer mode" enabled, screen is unlocked
I've reloaded the project, restarted Godot, unplugged and reconnected the USB-C cable

I'm using:
Godot 4.2
Xcode 14.2
MacOS 12.7.1 (Monterey)
Macbook Pro 16-inch M1 Pro, year 2021
iPhone 15 Pro, year 2023, iOS 17.1.2

Side note:
I do not have an Apple Developer account. So far I've just been able to export this project to iOS and test it on Xcode 14.2's iPhone 14 simulator following the "exclude arm64" instructions in this thread - #62929 and also following the steps by https://www.reddit.com/r/godot/comments/jg1zt3/export_your_game_to_iphoneios_without_apple/ for exporting to iOS without a developer account.

Screen_Shot_2023-12-05_at_1 24 05_PM

@bruvzg
Copy link
Member Author

bruvzg commented Dec 7, 2023

iOS 17+ require a new interface (introduced in Xcode 15), which was not included in 4.2 (implemented in #85546).

@mellowminx
Copy link

@bruvzg Ok thank you for the note! I'm using Xcode 14.2, so I'll try it with another device using an older iOS version and report back :)

@mellowminx
Copy link

Following up on my previous comment #70662 (comment) --

I tried with my older iPad, but still haven't been able to get one-click-deploy to iOS to work. The button for it is still grayed out and says "No Remote Debug export presets configured".

I'm using:
Godot 4.2
Xcode 14.2
MacOS 12.7.1 (Monterey)
Macbook Pro 16-inch M1 Pro, year 2021
iPad Pro 12.9 inch Model A1652, year 2015, iOS 14.8

I've set up the iOS export preset and set it to "Runnable"
My iPad is attached to my laptop using USB-C adaptor to USB-A to lightning cable
My iPad has "developer mode" enabled, screen is unlocked
I've reloaded the project, restarted Godot, unplugged and reconnected the USB-C cable
I've double-checked that my Macbook and iPad are both using the same wifi network

@feelingsonice
Copy link

Are there more instructions on this using the simulator on Apple silicon? Perhaps this is the wrong post but I'm finding my builds in Xcode for simulators fail with this:
Screenshot 2023-12-18 at 7 41 04 PM

@Calinou
Copy link
Member

Calinou commented Dec 19, 2023

Are there more instructions on this using the simulator on Apple silicon? Perhaps this is the wrong post but I'm finding my builds in Xcode for simulators fail with this: Screenshot 2023-12-18 at 7 41 04 PM

Follow the instructions in #62929.

@ztc0611
Copy link
Contributor

ztc0611 commented Dec 19, 2023

Information about this should really be added to the one click deploy docs page.

@feelingsonice
Copy link

I'm still trying to figure out how to get this working but why exclude the simulator builds from the official template? Because of size? If so, why not have different versions of it? imo if I'm exporting my project I'd much rather opt for convenience, which means having the official templates include all platforms.

@bruvzg
Copy link
Member Author

bruvzg commented Dec 19, 2023

why exclude the simulator builds from the official template?

OSXcross used to build official templates (on Linux) can't build it.

@leoyanis
Copy link

Quick question guys, why does the remote debug not work if i do the one click deploy on iOS? The debug console does not print anything and if i do changes in the scene it does on update on the phone, it does work on Android via cable though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.