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

Cannot build plugin for iOS #1

Closed
kyadalu1 opened this issue Dec 13, 2023 · 9 comments
Closed

Cannot build plugin for iOS #1

kyadalu1 opened this issue Dec 13, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@kyadalu1
Copy link

Godot version

4.2

Plugin version

v1.0.1

Phone information

iPhoneX iOS 17.0

Issue description

I get following error

clang: error: linker command failed with exit code 1 (use -v to see invocation)

** ARCHIVE FAILED **


The following build commands failed:
	Ld /Users/transformhub/Library/Developer/Xcode/DerivedData/export-ewxahmnyzxwkqmgbrpqrhmsoucar/Build/Intermediates.noindex/ArchiveIntermediates/export/InstallationBuildProductsLocation/Applications/export.app/export normal (in target 'export' from project 'export')
(1 failure)

Steps to reproduce

I downloaded the flashlight iOS plugin. I downloaded it for Godot 4.1 given that there was no 4.2. Here is the sample project

I created iOS folder & inside that created plugins folder and copy pasted flashlight.debug.a, flashlight.gdip & flashlight.release.a

I opened my iOS simulator and ran the project via Godot engine's Remote Debug button. I also added the iOS template and enabled the FlashLight plugin and added App store Team Id & bundle identifier

I am trying to run on iOS simulator. Of course i won't be able to test Flashlight on iOS simulator but at least i expected the app to build and run on simulator.

Additional context

No response

@kyadalu1 kyadalu1 added the bug Something isn't working label Dec 13, 2023
@kyadalu1
Copy link
Author

When i export the Project from Godot and open it in xcode and try to run it on a simulator i get issue saying

In /Users/transformhub/Downloads/ok/MyNewGodotgameTwo/ios/plugins/flashlight.a(flashlight.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/transformhub/Downloads/ok/MyNewGodotgameTwo/ios/plugins/flashlight.a' for architecture arm64

Linker command failed with exit code 1 (use -v to see invocation)

@kyadalu1
Copy link
Author

If i try to include arm64 from Excluded Architectures i get following error

/Users/transformhub/Library/Developer/Xcode/DerivedData/MyNewGodotgameTwo-eygaxnqvxucroggmaskdskponnzp/Build/Products/Debug-iphonesimulator/MyNewGodotgameTwo.app is not a valid path to an executable file.

@kyoz
Copy link
Owner

kyoz commented Dec 13, 2023

To be able to run on simulator, make sure you have check "Export with Debug" when exporting. Also it's somehow pretty annoying when testing Godot App on ios Simulator, there still some problem:

godotengine/godot#44681

I think you should try add excluded Architect, i'm usually use i386 arm64 and it work.

@kyadalu1
Copy link
Author

In Architecture i had to choose Standard Architecture instead of ARM64 and Excluded Architecture I just added arm64. This is how the xcode project build successfully for me.

But i get below errror on simulator and i have zero knowledge in graphics and drivers

simulator_screenshot_2DDBF4B9-6E88-4976-9CF5-E273B656D28A

I am just assuming i need a real iOS device for this

This is how my xcode Build settings looks like
Screenshot 2023-12-14 at 8 50 12 AM

@kyoz
Copy link
Owner

kyoz commented Dec 14, 2023

Are you using Godot 3 or 4. No, it can run fine on simulator, but with some config.

@kyadalu1
Copy link
Author

Godot 4.2

@kyoz
Copy link
Owner

kyoz commented Dec 14, 2023

Oops. I'm not using Godot 4 for mobile project for now cause it still have lots of problem, can you try open the project with Godot 3.5, export and try again on Xcode.

@kyadalu1
Copy link
Author

Actually the game developer whom i work with relies heavily on Godot 4 features. My background is of native mobile app developer, i have very little knowledge in Godot and i am there to help them build native mobile functionality in their game. So currently facing challenges for iOS specifically. Also i have used swift for ios development and not objective-c or C++ so that's another issue.

Do you have list of issues that are related to Godot 4 targeting iOS apart from the one which you already specified?

@kyoz
Copy link
Owner

kyoz commented Dec 14, 2023

godotengine/godot#74227

There are lots of issue of Godot 4 on mobile, especially on iOS. You can see em in main godot issue page

Although you can try to solve them in someway, recompile the iOS export template...but i don't have time to do that so i keep my games in Godot 3 for the current moment.

You can try read these, i think you will find a way to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants