Coder Social home page Coder Social logo

Comments (5)

minosvasilias avatar minosvasilias commented on July 19, 2024 1

Hey Alessandro, apologies for the delay in replying, i must've missed the e-mail notifying me of this. And thanks a lot for the super detailed reply, this all makes sense and it's extremely helpful to understand what exactly is happening. Appreciate the debug/release bug being fixed as well!

I was planning to do a bunch of builds tomorrow, so i will ty out the updated arm64 libs and let you know how it went. Thanks for getting these ready, i really appreciate that. Will respond here again once i have tested things.

from wwise-godot-integration.

minosvasilias avatar minosvasilias commented on July 19, 2024

I seem to have been able to resolve this for now. The steps followed were the following:

  • Edit addons/wwise/bin/wwise-gdnative.gdnlib to ensure release libraries are exported:
-iOS.armv7="res://addons/wwise/bin/iOS/debug/armv7/libWwiseGDNative.dylib"
-iOS.arm64="res://addons/wwise/bin/iOS/debug/arm64/libWwiseGDNative.dylib"
+iOS.armv7="res://addons/wwise/bin/iOS/release/armv7/libWwiseGDNative.dylib"
+iOS.arm64="res://addons/wwise/bin/iOS/release/arm64/libWwiseGDNative.dylib"
  • Export project
  • Edit dylibs/addons/wwise/bin/iOS/release/arm64/libWwiseGDNative.framework/Info.plist in exported Xcode project
<key>MinimumOSVersion</key>
-<string>10.0</string>
+<string>15.4</string>
  • Archive and test upload to App Store

15.4 is the absolute latest target OS version you could set at time of writing, and i do not wish to actually target it. As described in the OP however, even 15.0 appears to be too low. That being said, uploading to the App Store did not throw the usual warning about increasing the min OS version, and Testflight also displays the correct version specified for the project:

Screenshot 2022-06-05 at 19 37 37

So i'd consider this a viable workaround. Would still be great to fix the default value there and have some clarity on what the libWwiseGDNative framework's actual target OS version should be.

from wwise-godot-integration.

alessandrofama avatar alessandrofama commented on July 19, 2024

Thanks for the report and for the detailed info. I don't have too much experience with iOS, but let's see if we can solve the problem. A few notes:

  1. The Godot C++ bindings set the minimum deployment version for the static library we link to here in this build script to 10.0 (hardcoded):
    https://github.com/godotengine/godot-cpp/blob/f4f6fac4c784da8c973ade0dbc64a9d8400ee247/SConstruct#L222-L223

I don't know why it's not, but I think this value should be customizable by the user. My only guess is that since they are also targeting armv7, 10.0 would be the maximum deployment target for armv7 (that's what Clang tells me!) and they wanted to have maximum compatibility in general.

If you change this to 11.0, build and check with otool, the correct minimum version will be displayed:

% otool -l libgodot-cpp.ios.debug.arm64.a | grep -A4 VERSION

      cmd LC_VERSION_MIN_IPHONEOS
  cmdsize 16
  version 11.0
      sdk 15.4
Load command 2

  1. For libWwiseGDNative.dylib we also set the deployment version to 10.0 here:
    else:
    env['target_path'] += 'iOS/'
    sdk_name = 'iphoneos'
    env.Append(CCFLAGS=['-miphoneos-version-min=10.0'])

We simply copied the relevant iOS part from the build script of godot-cpp here. Strangely, checking with otool does not show the command LC_VERSION_MIN_IPHONEOS, but instead the command LC_BUILD_VERSION:

% otool -l libWwiseGDNative.dylib | grep -A4 VERSION

      cmd LC_BUILD_VERSION
  cmdsize 32
 platform 2
    minos 15.4
      sdk 15.4

See minos 15.4, which matches your observation ("15.4 is the absolute last target OS version you could set at the time of writing"). It seems that I forgot to set the minimum version in the link flags:

env.Append(LINKFLAGS=['-miphoneos-version-min=11.0'])

Doing this will correctly set the minimum version:

% otool -l libWwiseGDNative.dylib | grep -A4 VERSION

      cmd LC_VERSION_MIN_IPHONEOS
  cmdsize 16
  version 11.0
      sdk 15.4
  1. libWwiseGDNative.framework is generated by Godot when your export your project. Info.plist is generated here: https://github.com/godotengine/godot/blob/c02325ffda2258172385e70e160cd476fb19a004/platform/iphone/export/export.cpp#L1352-L1353
  • This value is hardcoded and can only be changed manually as you have done.
  1. About editing addons/wwise/bin/wwise-gdnative.gdnlib for exporting the release libs. This should already work if you uncheck Export with Debug when exporting the project. Our build export addon should take care of this. If this doesn`t work, there is another bug I need to fix :) EDIT: Yep, clearly a bug, sorry for that. Fixed here: 0fb355a

So how to proceed?

  • We can add a fix that allows users to choose the minimum deployment version for libWwiseGDNative.dylib when building the library. In your case (11.0), this would only work for the arm64 target and would require a manual build of the library.
  • We cannot change the Godot C++ bindings from hardcoding the 10.0 value. The workaround for this is manually editing the value in their build script (SConstruct) and to build the library yourself. We can try to report this as an issue in their repo.
  • We cannot fix Godot hardcoding the 10.0 value in Info.plist. Again, the workaround here is to manually changing the value after exporting. Writing an issue in the godotengine repo might be possible for a future fix.
  • I will provide updated arm64 libs below for you, targeting version 11.0. If you have time, please try to replace yours, export only for arm64, change the MinimumOSVersion value to 11.0 and check if it works.
    iOS.zip

from wwise-godot-integration.

minosvasilias avatar minosvasilias commented on July 19, 2024

Hey, happy to report that the updated library you provided did indeed work perfectly! No error on app submission, and no other issues either. Thanks again for that, very helpful.

I fully agree with your observations otherwise, would make sense to have the minimum deployment target not hard-coded, but customizable. Providing that option when building this library would certainly be good, and i suppose updating the value used for future releases would make sense as well.

Appreciate the work on this btw, this is has come in extremely useful for us and has been working a treat otherwise! 👍

from wwise-godot-integration.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.