-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
iOS export capabilities for non paid Apple dev accounts #19996
Comments
Ran into this today as well. I'm going to try to find some time to dive into these. These should be tickboxes in the iOS export imho. |
Ok, something we'll eventually need to add in the docs. When you enable options in the export that your account hasn't got access too, they are hidden in XCode stopping you from building your game even if you don't need them. When you do have access to them and you disable them in XCode, XCode will also remove the associated frameworks which will result in your project failing to compile because Godot still links to the code. We need to thus make sure our documentation is clear on this, if you disable game center, in app purchases or push notification in XCode you won't be able to link the project because XCode removes the frameworks. So I'm currently looking at adding the most common capabilities and selecting/deselecting them in the export window but leaving the associated frameworks in place. The question is whether iOS will allow us building them and deploying them when those frameworks are in place. We'll see. I'll do some more work around this over the weekend :) |
Thanks |
At least manually specifying the StoreKit and GameKit frameworks in the Target -> Build Phases -> Link Binary with Libraries section, after disabling all Capabilities, results in successfully building, deploying and running on a device. |
@alcroito thanks for confirming that, I had made a start on changing the export logic but been a bit snowed under with ARKit. I noticed that in xcode unticking capabilities would also remove the related libraries and lead to compile issues as the code is still in the executable, even if it sits unused. Especially for gamekit I think this will need a little more work because even when you turn gamekit off in the capabilities the app will still attempt to initialize gamekit. This also highlights its best to ensure that we have the capabilities as checkboxes in the export (or at least the ones most likely to be involved in a Godot project) to ensure the correct libraries are still linked even if the tickboxes are off. Along with a warning in the docs that if you change the capabilities in XCode you have to be careful and ensure the libraries are still there. Anyway, I hope to finish the work soon. |
I agree that adding the capabilities as checkboxes to the export settings makes sense. I didn't have to disable ARKit presumably because I have an older XCode (9.2) and an older iOS SDK (11.2). I noticed as well that linking against GameKit with the capability disabled also led to its initialization (I get the sliding-out-popout when I start the app (Welcome back, xxx). But I don't think it's that big of a deal during development. Presumably if you publish to the App Store, you'll buy a dev account anyway, and thus be able to enable the capability. I would also check if it's possible to either always, or with another checkbox in the export settings, force usage of automatic manage code signing and provisioning. Currently I have to enable it manually, otherwise I can't select a provisioning profile (you can't seem to manually create those with a free account). |
I'm looking into it, I did a full comparison between the files that Godot currently produces and the files that are properly setup in XCode, they seem to be relatively minor changes for the parts we currently need. Some of the capabilities are more complex but we're not using them (say homekit) so I'll be ignoring them. The automatic provisioning I think is just a switch so I might just turn that on. The one I had more problems with are some of the older settings in the plists and all the question strings. There are many and the Apple documentation isn't very well structured, they really are all over the place. But I guess if we make a start with the more prominent ones we set a precedent for other developers to expand upon. |
#25851 adds the required options, it would be good if someone could confirm they can now test without needing a paid developer account. To me it looks like its happy to accept that GameKit and such are compiled into the binary without them being used and privileges being turned off. Do heed the warning that turning capabilities on/off in xcode will add/remove the required libraries and potentially break your export. |
Hi, I just tested with beta6, given that your PR got in, so thanks. Here are the issues I saw:
Of course the app doesn't run then, because it's not signed. The workaround for me was to explicitly specify "iPhone Developer" in the Godot export parameter.
|
I'd like to take on the work to improve the current iOS export from it's current form. Here are my thoughts on these points.
Xcode does a "good enough" job these days with automatic provisioning profile and certificate selection based on the bundle id. The "fix issue" button it provides can generate missing / new profiles and certificates on behalf of the developer. I agree that we should set the Signing Certificate and Provisioning Profile to "Automatic"
I think enabling APNS and push notifications should be an export option since not all games will need them and having a paid account is a requirement.
I believe I have a PR in flight (or possibly merged) that bumps the minimum to iOS 10. This should cover 98% of active devices in reality.
Agree we should ensure the process is well documented, it's easier than it was a few months ago and once the process is smoother we can focus on ensuring the process is well documented. |
Regarding (1), my point is that there is no "fix issue" button, there's a bug. Regarding (2) I disagree that a paid account should be mandatory. |
To clarify on point 2. This is not an opinion. I’m saying use of these features requires paying Apple. |
I'm addressing most of these issues now: I plan to open a PR soon. All of your issues above (except point 4) should be addressed. |
Is this fixed? It's weird to popup a Game Center login window if your game do not use this feature. |
Recent changes in Godot's GameCenter also added a |
Also with |
So I think this can be closed as fixed already. Thanks! |
Godot version:
3.0.4
OS/device including version:
macOS 10.13.5 - Xcode 9.4.1
Issue description:
when exporting from Godot to an iOS Xcode project the capabilities of the project are default to support "In-App purchases" and "push notifications". These capabilities are not allowed in a non paid dev account and trying to disable them in Xcode is near impossible resulting in the user having to manually edit the "project.pbxproj" file with the project closed and even after editing this doesn't always apply the settings.
SystemCapabilities = { com.apple.GameCenter = { enabled = 1; }; com.apple.InAppPurchase = { enabled = 1; }; com.apple.Push = { enabled = 1; };
change to
SystemCapabilities = { com.apple.GameCenter = { enabled = 1; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.Push = { enabled = 0; };
Is it possible to have these disabled as default and then if a user with a paid account wants them included they can simply tick the in the capabilities settings?
The text was updated successfully, but these errors were encountered: