Xcode iOS (from Unity) Build Errors

I’m trying to build project exported from Unity 6000.0.63f1 and when I build the Xcode project I get the following errors: (the CoreAudioTypes Framework error appears to be benign and the real issue is the missing symbols that Pulse is trying to use)

ld: warning: Could not find or use auto-linked framework ‘CoreAudioTypes’: framework ‘CoreAudioTypes’ not found

Undefined symbols for architecture arm64:

“_AdvanceTimeStep”, referenced from:

  \_PulseUnityEngine_AdvanceTimeStep_mB559E90ECCDC55402B15A7BA5EC5D2747B82EA49 in libGameAssembly.a\[548\](e9do299o2xwy.o)

  \_PulseUnityEngine_BaseAdvanceTimeStep_m3F4CEAA37CC51224EB58F8C97E6BCA668123D56D in libGameAssembly.a\[548\](e9do299o2xwy.o)

“_Allocate”, referenced from:

  \_PulseUnityEngine_Allocate_m76059BAD6D5D9D900DC071CEBDEB30643DA37B89 in libGameAssembly.a\[548\](e9do299o2xwy.o)

  \_PulseUnityEngine_BaseAllocate_mD8E271D62CC0E3DB325D4B1180EE01524217AEFE in libGameAssembly.a\[548\](e9do299o2xwy.o)

“_AreCompatibleUnits”, referenced from:

  \_PulseUnityEngine_AreCompatibleUnits_m5502E9C27BAB264EE80E82A01B5877C753B5CBBA in libGameAssembly.a\[548\](e9do299o2xwy.o)

“_ConvertValue”, referenced from:

  \_PulseUnityEngine_ConvertValue_mD8CB79714327BFB45C29369B3267D37D3B33E34B in libGameAssembly.a\[548\](e9do299o2xwy.o)

“_Deallocate”, referenced from:

  \_PulseUnityEngine_Deallocate_mE475467C18D4BD1EAC917A7CEB6ECA055BF778BF in libGameAssembly.a\[548\](e9do299o2xwy.o)

  \_PulseUnityEngine_BaseDeallocate_m9C615A440DD7091163803F257707580F69F61AAE in libGameAssembly.a\[548\](e9do299o2xwy.o)

“_ExecuteScenario”, referenced from:

  \_PulseUnityScenarioExec_ExecuteScenario_m5ECC4FA082367AC94C4ED52F7DE1929B2E6376BA in libGameAssembly.a\[548\](e9do299o2xwy.o)

  \_PulseUnityScenarioExec_BaseExecuteScenario_m28899C045E124F971A4E444DDFBBCF37C182F8FA in libGameAssembly.a\[548\](e9do299o2xwy.o)

“_GetConditions”, referenced from:

  \_PulseUnityEngine_GetConditions_mE67208BA18E87B7504477B9348723B1970A9F0A6 in libGameAssembly.a\[548\](e9do299o2xwy.o)

  \_PulseUnityEngine_BaseGetConditions_m5423192BD776903AA63B84CF62CEB45FBF2E6C11 in libGameAssembly.a\[548\](e9do299o2xwy.o)

“_GetInitialPatient”, referenced from:

  \_PulseUnityEngine_GetInitialPatient_m0D9D9AF305C15997CFA2EF4B0132BD0B85B569B9 in libGameAssembly.a\[548\](e9do299o2xwy.o)

  \_PulseUnityEngine_BaseGetInitialPatient_mB77C444AE5519FFF776DCA3859B3BFC8A31239BD in libGameAssembly.a\[548\](e9do299o2xwy.o)

“_GetPatientAssessment”, referenced from:

  \_PulseUnityEngine_GetPatientAssessment_m143DEECE0A2ACB7347C690E2046D48A3A9A7B047 in libGameAssembly.a\[548\](e9do299o2xwy.o)

  \_PulseUnityEngine_BaseGetPatientAssessment_m47C1609A89901B786FCF53D3BF911A69DF05E773 in libGameAssembly.a\[548\](e9do299o2xwy.o)

“_GetTimeStep”, referenced from:

  \_PulseUnityEngine_GetTimeStep_m1CFDECE0EAB61206EA1B098DEC027D4A254D6290 in libGameAssembly.a\[548\](e9do299o2xwy.o)

  \_PulseUnityEngine_BaseGetTimeStep_m017A6B36B7E57F77A68ACF30E76AEBC80451E8C9 in libGameAssembly.a\[548\](e9do299o2xwy.o)

“_InitializeEngine”, referenced from:

  \_PulseUnityEngine_InitializeEngine_m834C1B18DCE16C4354A3628C399FB71040EFD4BD in libGameAssembly.a\[548\](e9do299o2xwy.o)

  \_PulseUnityEngine_BaseInitializeEngine_m4FE242B4ECC8DCF02527227679280AEB7767FB97 in libGameAssembly.a\[548\](e9do299o2xwy.o)

“_KeepEventChanges”, referenced from:

  \_PulseUnityEngine_KeepEventChanges_m76FA2E2C43805299206AD65AD246D2586E9BA4FD in libGameAssembly.a\[548\](e9do299o2xwy.o)

  \_PulseUnityEngine_BaseKeepEventChanges_m4C008A024C0A4918D64F940A39AE8116398AAA3B in libGameAssembly.a\[548\](e9do299o2xwy.o)

“_KeepLogMessages”, referenced from:

  \_PulseUnityEngine_KeepLogMessages_mDAFC88280A70DD78F2AE2C5E5141820D62D34BE5 in libGameAssembly.a\[548\](e9do299o2xwy.o)

  \_PulseUnityEngine_BaseKeepLogMessages_m50ACAB51B918B1003D36ADA7B0502D4E2170FA46 in libGameAssembly.a\[548\](e9do299o2xwy.o)

“_LogToConsole”, referenced from:

  \_PulseUnityEngine_LogToConsole_m088E590B3AA9E1D2E498A4F4303F4BB7511D5E04 in libGameAssembly.a\[548\](e9do299o2xwy.o)

  \_PulseUnityEngine_BaseLogToConsole_mA6BCD13B388C7A6610E79501B907379D69CE0DDE in libGameAssembly.a\[548\](e9do299o2xwy.o)

“_ProcessActions”, referenced from:

  \_PulseUnityEngine_ProcessActions_mD5612A7DD4A1D3E6D9161746C7300E59949FFF49 in libGameAssembly.a\[548\](e9do299o2xwy.o)

  \_PulseUnityEngine_BaseProcessActions_mBC4DC9ACA151DD56183F433470677933702A5E00 in libGameAssembly.a\[548\](e9do299o2xwy.o)

“_PullActiveActions”, referenced from:

  \_PulseUnityEngine_PullActiveActions_m5459F690A5F31FA3E2AF491D57EA926ADEDBD983 in libGameAssembly.a\[548\](e9do299o2xwy.o)

  \_PulseUnityEngine_BasePullActiveActions_m2762A92C3BD0AA0DBB2ECC893E03D45D6F65AFBE in libGameAssembly.a\[548\](e9do299o2xwy.o)

“_PullActiveEvents”, referenced from:

  \_PulseUnityEngine_PullActiveEvents_mB3CC32FCADCF68ED15A9F4030C2010154368B4D8 in libGameAssembly.a\[548\](e9do299o2xwy.o)

  \_PulseUnityEngine_BasePullActiveEvents_mE7D0C6C2D5380D1AE21B0DF034C2F0959D9BF99D in libGameAssembly.a\[548\](e9do299o2xwy.o)

“_PullData”, referenced from:

  \_PulseUnityEngine_PullData_mC71BF07915C49C3D9D8323B0A37E1F599CFB5C79 in libGameAssembly.a\[548\](e9do299o2xwy.o)

  \_PulseUnityEngine_BasePullData_m1FA678D024580A7ECDA1301380CBCA79F48717FB in libGameAssembly.a\[548\](e9do299o2xwy.o)

“_PullEvents”, referenced from:

  \_PulseUnityEngine_PullEvents_mFBBAC3D0EC246D2B066A29654495CEFA1BE6CFF1 in libGameAssembly.a\[548\](e9do299o2xwy.o)

  \_PulseUnityEngine_BasePullEvents_m296C8BC64CCD75B7580AA77D74CE710C603CD3D1 in libGameAssembly.a\[548\](e9do299o2xwy.o)

“_PullLogMessages”, referenced from:

  \_PulseUnityEngine_PullLogMessages_m2E6286DC4EE14BFBA1EADC4ECFFDF623FC7BA19D in libGameAssembly.a\[548\](e9do299o2xwy.o)

  \_PulseUnityEngine_BasePullLogMessages_m0D07AAC476B9B19674B6D254B472AA321E7AC00D in libGameAssembly.a\[548\](e9do299o2xwy.o)

“_PulseHash”, referenced from:

  \_PulseUnityEngine_PulseHash_m37A675F65F586B711B3634632E176400D23B09B3 in libGameAssembly.a\[548\](e9do299o2xwy.o)

  \_PulseUnityEngine_Hash_m0A4654F11BFEAA3B85AC8215E19CE265FED64590 in libGameAssembly.a\[548\](e9do299o2xwy.o)

“_PulseVersion”, referenced from:

  \_PulseUnityEngine_PulseVersion_m3AC575C1FBA8C36E5B09CFAF046320CD34018F91 in libGameAssembly.a\[548\](e9do299o2xwy.o)

  \_PulseUnityEngine_Version_m0DF24DD3173373AD0DBCE94A7E5698B87660E4C0 in libGameAssembly.a\[548\](e9do299o2xwy.o)

“_SerializeFromFile”, referenced from:

  \_PulseUnityEngine_SerializeFromFile_m91251D956FCC478FD3B896C19D8025FC147C1CA4 in libGameAssembly.a\[548\](e9do299o2xwy.o)

  \_PulseUnityEngine_BaseSerializeFromFile_mAD743B08E07875CA55EF4C1EE4EC3706588D6775 in libGameAssembly.a\[548\](e9do299o2xwy.o)

“_SerializeFromString”, referenced from:

  \_PulseUnityEngine_SerializeFromString_mB0BF2355301C39DB09CDA81B129592ED3403F82D in libGameAssembly.a\[548\](e9do299o2xwy.o)

  \_PulseUnityEngine_BaseSerializeFromString_mC9407BB69F1A32BAEF303FA4B99B0529F9CF433A in libGameAssembly.a\[548\](e9do299o2xwy.o)

“_SerializeToFile”, referenced from:

  \_PulseUnityEngine_SerializeToFile_m87D71810F2D92EF173FA56F38DEE178003E76F53 in libGameAssembly.a\[548\](e9do299o2xwy.o)

  \_PulseUnityEngine_BaseSerializeToFile_mAECAAA0030FB1B1212074878703403412040A685 in libGameAssembly.a\[548\](e9do299o2xwy.o)

“_SerializeToString”, referenced from:

  \_PulseUnityEngine_SerializeToString_m270125B5478E3B5835DB2B29891372762BAB95D3 in libGameAssembly.a\[548\](e9do299o2xwy.o)

  \_PulseUnityEngine_BaseSerializeToString_m57880AF3BE6ACB2C52F5CD6F07FFBC4665838A31 in libGameAssembly.a\[548\](e9do299o2xwy.o)

“_SetLogFilename”, referenced from:

  \_PulseUnityEngine_SetLogFilename_m31042F331FCF2805839BD2E511BF595EE0D9FCBA in libGameAssembly.a\[548\](e9do299o2xwy.o)

  \_PulseUnityEngine_BaseSetLogFilename_m87531F734BBB7D2F417B3B125C7B4A87F339F431 in libGameAssembly.a\[548\](e9do299o2xwy.o)

ld: symbol(s) not found for architecture arm64

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

You are building on a MacOS silicon machine targeting the MacOS silicon operating system?

Does the Pulse Vitals Monitor scene run inside of the Unity 6 project?

I am not sure where libGameAssembly.a comes into play… Pulse is in a dylib for silicon targets, so maybe XCode is not being told to use that library to resolve references?

I am not sure what you mean by an exported project built with XCode…

They are all .a files for iOS in my version of the plugin, maybe I have a version that isn’t compatible with silicon? It works in the editor, but I’m pretty sure that is using the macOS libraries and not the iOS, though I do have the iOS build target loaded.

The build errors are in iOS not Mac Silicon.

Ok, so you are on a MacOS silicon machine and you are trying to build your Unity app (in Unity) with the iOS target, and you get those errors in Unity in the console build window?

I guess its possible that the iOS provided *.a files are only x86 compatible libraries

Non-fat file: /Users/-/git/-/-/Packages/caffeine/3RD/PulsePhysiologyEngine/Plugins/iOS/libPulse.a is architecture: arm64

So far spot checking a few they all say arm64, though there are 94 of them haha maybe just one is not. I’m not sure how to track down what .a file the error(s) would be originating from to test that specific binary

Also, no I don’t get that in the unity build window, I get that in the Xcode project that it exports when I try to build it for my phone or tablet.

The *.a files are marked properly in your application right?

Yes, they are marked exactly like your screenshot.

for f in *.a; do lipo -info “$f”; done

Non-fat file: libabsl_bad_any_cast_impl.a is architecture: arm64

Non-fat file: libabsl_bad_optional_access.a is architecture: arm64

Non-fat file: libabsl_bad_variant_access.a is architecture: arm64

Non-fat file: libabsl_base.a is architecture: arm64

Non-fat file: libabsl_city.a is architecture: arm64

Non-fat file: libabsl_civil_time.a is architecture: arm64

Non-fat file: libabsl_cord_internal.a is architecture: arm64

Non-fat file: libabsl_cord.a is architecture: arm64

Non-fat file: libabsl_cordz_functions.a is architecture: arm64

Non-fat file: libabsl_cordz_handle.a is architecture: arm64

Non-fat file: libabsl_cordz_info.a is architecture: arm64

Non-fat file: libabsl_cordz_sample_token.a is architecture: arm64

Non-fat file: libabsl_crc_cord_state.a is architecture: arm64

Non-fat file: libabsl_crc_cpu_detect.a is architecture: arm64

Non-fat file: libabsl_crc_internal.a is architecture: arm64

Non-fat file: libabsl_crc32c.a is architecture: arm64

Non-fat file: libabsl_debugging_internal.a is architecture: arm64

Non-fat file: libabsl_decode_rust_punycode.a is architecture: arm64

Non-fat file: libabsl_demangle_internal.a is architecture: arm64

Non-fat file: libabsl_demangle_rust.a is architecture: arm64

Non-fat file: libabsl_die_if_null.a is architecture: arm64

Non-fat file: libabsl_examine_stack.a is architecture: arm64

Non-fat file: libabsl_exponential_biased.a is architecture: arm64

Non-fat file: libabsl_failure_signal_handler.a is architecture: arm64

Non-fat file: libabsl_flags_commandlineflag_internal.a is architecture: arm64

Non-fat file: libabsl_flags_commandlineflag.a is architecture: arm64

Non-fat file: libabsl_flags_config.a is architecture: arm64

Non-fat file: libabsl_flags_internal.a is architecture: arm64

Non-fat file: libabsl_flags_marshalling.a is architecture: arm64

Non-fat file: libabsl_flags_parse.a is architecture: arm64

Non-fat file: libabsl_flags_private_handle_accessor.a is architecture: arm64

Non-fat file: libabsl_flags_program_name.a is architecture: arm64

Non-fat file: libabsl_flags_reflection.a is architecture: arm64

Non-fat file: libabsl_flags_usage_internal.a is architecture: arm64

Non-fat file: libabsl_flags_usage.a is architecture: arm64

Non-fat file: libabsl_graphcycles_internal.a is architecture: arm64

Non-fat file: libabsl_hash.a is architecture: arm64

Non-fat file: libabsl_hashtablez_sampler.a is architecture: arm64

Non-fat file: libabsl_int128.a is architecture: arm64

Non-fat file: libabsl_kernel_timeout_internal.a is architecture: arm64

Non-fat file: libabsl_leak_check.a is architecture: arm64

Non-fat file: libabsl_log_entry.a is architecture: arm64

Non-fat file: libabsl_log_flags.a is architecture: arm64

Non-fat file: libabsl_log_globals.a is architecture: arm64

Non-fat file: libabsl_log_initialize.a is architecture: arm64

Non-fat file: libabsl_log_internal_check_op.a is architecture: arm64

Non-fat file: libabsl_log_internal_conditions.a is architecture: arm64

Non-fat file: libabsl_log_internal_fnmatch.a is architecture: arm64

Non-fat file: libabsl_log_internal_format.a is architecture: arm64

Non-fat file: libabsl_log_internal_globals.a is architecture: arm64

Non-fat file: libabsl_log_internal_log_sink_set.a is architecture: arm64

Non-fat file: libabsl_log_internal_message.a is architecture: arm64

Non-fat file: libabsl_log_internal_nullguard.a is architecture: arm64

Non-fat file: libabsl_log_internal_proto.a is architecture: arm64

Non-fat file: libabsl_log_severity.a is architecture: arm64

Non-fat file: libabsl_log_sink.a is architecture: arm64

Non-fat file: libabsl_low_level_hash.a is architecture: arm64

Non-fat file: libabsl_malloc_internal.a is architecture: arm64

Non-fat file: libabsl_periodic_sampler.a is architecture: arm64

Non-fat file: libabsl_poison.a is architecture: arm64

Non-fat file: libabsl_random_distributions.a is architecture: arm64

Non-fat file: libabsl_random_internal_distribution_test_util.a is architecture: arm64

Non-fat file: libabsl_random_internal_platform.a is architecture: arm64

Non-fat file: libabsl_random_internal_pool_urbg.a is architecture: arm64

Non-fat file: libabsl_random_internal_randen_hwaes_impl.a is architecture: arm64

Non-fat file: libabsl_random_internal_randen_hwaes.a is architecture: arm64

Non-fat file: libabsl_random_internal_randen_slow.a is architecture: arm64

Non-fat file: libabsl_random_internal_randen.a is architecture: arm64

Non-fat file: libabsl_random_internal_seed_material.a is architecture: arm64

Non-fat file: libabsl_random_seed_gen_exception.a is architecture: arm64

Non-fat file: libabsl_random_seed_sequences.a is architecture: arm64

Non-fat file: libabsl_raw_hash_set.a is architecture: arm64

Non-fat file: libabsl_raw_logging_internal.a is architecture: arm64

Non-fat file: libabsl_scoped_set_env.a is architecture: arm64

Non-fat file: libabsl_spinlock_wait.a is architecture: arm64

Non-fat file: libabsl_stacktrace.a is architecture: arm64

Non-fat file: libabsl_status.a is architecture: arm64

Non-fat file: libabsl_statusor.a is architecture: arm64

Non-fat file: libabsl_str_format_internal.a is architecture: arm64

Non-fat file: libabsl_strerror.a is architecture: arm64

Non-fat file: libabsl_string_view.a is architecture: arm64

Non-fat file: libabsl_strings_internal.a is architecture: arm64

Non-fat file: libabsl_strings.a is architecture: arm64

Non-fat file: libabsl_symbolize.a is architecture: arm64

Non-fat file: libabsl_synchronization.a is architecture: arm64

Non-fat file: libabsl_throw_delegate.a is architecture: arm64

Non-fat file: libabsl_time_zone.a is architecture: arm64

Non-fat file: libabsl_time.a is architecture: arm64

Non-fat file: libabsl_utf8_for_code_point.a is architecture: arm64

Non-fat file: libabsl_vlog_config_internal.a is architecture: arm64

Non-fat file: libprotobuf.a is architecture: arm64

Non-fat file: libPulse.a is architecture: arm64

Non-fat file: libutf8_range.a is architecture: arm64

Non-fat file: libutf8_validity.a is architecture: arm64

I’m in 6000.0.63f1 (and we’re stuck here because of some bug fixes that unity released recently)

I just noticed that I don’t have libPulseC (I see that in your screenshot), I only have the libPulse, do you think the missing symbols could be in that file?

I don’t think PulseC is needed for iOS build

The linker errors are coming from this file

You can see that we use PulseC when we want to use dynamic library linking, and __Internal when we want to link with static libraries…

But for some reason this method of connecting C# to a external definition seems to not be working in Unity 6… You could try building the PulseVitalsMonitor scene for iOS and see if you get the same thing… If you have a pre Unity 6 version installed, maybe try building for iOS in that older Unity version to see if maybe Unity 6 has a new way to connect C# to external libraries… I will poke around the documentation…

Hmm… maybe it is that PulseC is missing

That is where the methods that C# file refers to are defined

So why would PulseC not be getting added to the XCode project?

because the pulsec file is missing from the unity project, I double checked re-installing it from the unity asset store and that file isn’t in the package. Are you by chance able to share the pulsec for iOS that would match the latest version on the asset store? We dug around in the git repo and it isn’t clear enough which version would line up with the one on the unity asset store and if they don’t match then things won’t work right. we are using 4.3.1, I am only seeing 4.3.2 in the git

Well nuts… that would do it

The difference between 4.3.1. and 4.3.2 is pretty minimal
Try the libPulseC.a from the repo

Thanks, I’m going to try it now. I know the difference shouldn’t be big but we are trying to keep them all in sync and I remember there being an issue with data not serialized in the exact same versions.

Well. the PulseC is just a single file that passes through to the Pulse library… :crossed_fingers:

Is the file date from the repo the same as the asset?

Keep me posted

It’s worth a try, I’'ll let you know in a little bit if it works or not. I am sure it will build I just wondered if the states will load or not as the typically don’t seem to be forward compatible with versions. So we’ll do some testing to make sure they work, as you mentioned it is not a big change so hopefully there won’t be any issues.

Duplicate response from email took a while to get posted in the forum

This seems to have fixed things, so far no issues loading states. Thanks for your help! This will also serve as a good note for anyone that downloads this from the asset store until your team updates that package.