Closed oeleo1 closed 4 years ago
@akien-mga not sure what we can do about (1) other then compiling a copy of Godot with and one without ARKit support. Kind of the same issue as we're having with the other dependencies on iOS, you always have to include the frameworks for the bits code exists in Godot, even if you're not using it. It should definately be possible to keep the ARKit tickbox unticked while still including the framework as long as you untick it in the export settings. If you untick it in xcode, XCode tries to be too smart and removes the frameworks. Same as the other privileges btw, it gets really annoying.
I don't know what is causing the camera issues though, this one is weird. If the permission strings are omitted from the plist all together the whole camera code is skipped so why Apple is suddenly complaining about that I don't know. When the capabilities are enabled when Godot starts up it asks iOS for a list of available cameras, why that code is crashing all of a sudden I don't know, unless XCode again has removed the required frameworks because you've toggled switches inside of XCode.
not sure what we can do about (1) other then compiling a copy of Godot with and one without ARKit support. Kind of the same issue as we're having with the other dependencies on iOS, you always have to include the frameworks for the bits code exists in Godot, even if you're not using it. It should definately be possible to keep the ARKit tickbox unticked while still including the framework as long as you untick it in the export settings. If you untick it in xcode, XCode tries to be too smart and removes the frameworks.
Can we dynamically open (dlopen()
or similar) the ARKit framework when initializing Godot on iOS, instead of hardlinking it? Since it seems to be part of iOS itself, I guess we can locate and load it without risk that some users might lack it?
I have no idea, something to ask endragor maybe? Is he still around, haven’t seen him in awhile but he seems to have the most experience deploying iOS
On Thu, 7 Nov 2019 at 6:52 pm, Rémi Verschelde notifications@github.com wrote:
not sure what we can do about (1) other then compiling a copy of Godot with and one without ARKit support. Kind of the same issue as we're having with the other dependencies on iOS, you always have to include the frameworks for the bits code exists in Godot, even if you're not using it. It should definately be possible to keep the ARKit tickbox unticked while still including the framework as long as you untick it in the export settings. If you untick it in xcode, XCode tries to be too smart and removes the frameworks.
Can we dynamically open (dlopen() or similar) the ARKit framework when initializing Godot on iOS, instead of hardlinking it? Since it seems to be part of iOS itself, I guess we can locate and load it without risk that some users might lack it?
— You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub https://github.com/godotengine/godot/issues/33406?email_source=notifications&email_token=AAO262PBIDKXTBAJHS5VE7DQSPCNVA5CNFSM4JJ6Q64KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDLQ7GY#issuecomment-550965147, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAO262J7CMTUOMTJL254LFDQSPCNVANCNFSM4JJ6Q64A .
-- Kindest regards,
Bastiaan Olij
https://www.facebook.com/bastiaan.olij https://twitter.com/mux213 https://www.youtube.com/BastiaanOlij https://www.youtube.com/channel/UCrbLJYzJjDf2p-vJC011lYw https://github.com/BastiaanOlij
With some Obj-C indirection loading ARKit
dynamically should work, and AFAIK loading system libs/frameworks is OK (loading custom libs is prohibited):
Like replacing:
ar_session = [ARSession new];
with:
Class ARSessionClass = NSClassFromString(@"ARSession");
if (ARSessionClass == Nil) {
void *ARKitHandle = dlopen("/System/Library/Frameworks/ARKit.framework/ARKit", RTLD_NOW);
if (ARKitHandle) {
ARSessionClass = NSClassFromString(@"ARSession");
} else {
//FAIL
}
}
ar_session = [ARSessionClass new];
and so on (same for ARWorldTrackingConfiguration
).
@bruvzg that looks very promising :) I need to find some time to try that.
I think if we move the code for detecting ARSessionClass and ARWorldTrackingConfiguration (and any others we need) where we register the ARKit classes, then we simply never instantiate and register the ARKitInterface if that fails.
I'm getting the Arkit issue as well although my project does not use ArKit. Not sure if this is improper etiquette, just want to confirm this.
@bruvzg Would you be able to make a PR based on your findings?
@bruvzg Would you be able to make a PR based on your findings?
I have opened PR (#33759), but it's only tested with simulator.
Godot version: v3.2.beta.custom_build.500863859
OS/device including version: macOS Mojave, iOS 13.1, 13.2 / iPhone SE, iPad Pro Models A1673 (1st gen) and A1980 (3rd gen)
Issue description:
iOS project export : when the Arkit Capabilities option is unchecked, the export archive fails with unresolved symbols:
This effectively foces Arkit inclusion in the project export to succeed, which is not wanted.
When successfully exporting the project with the Arkit Capabilities option checked and deploying the game on a device, the game asks for Camera access permission on startup. Refusing access proceeds as expected. However, granting camera access crashes the game with invalid thread access in CameraIOS::update_feeds(), line 362 (AVCaptureDeviceDiscoverySession *session = ...)
Steps to reproduce:
Minimal reproduction project: