Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28511] iOS: Build fails if module is missing Headers folder in xcframework

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2021-08-26T09:22:49.000+0000
Affected Version/sn/a
Fix Version/sRelease 10.1.0
ComponentsiOS
Labels9.3.1.GA, build, module, titanium, titanium-cli
ReporterCaio Perdona
AssigneeEwan Harris
Created2021-02-13T19:57:34.000+0000
Updated2021-08-26T09:22:49.000+0000

Description

Hi guys! We've been using Hans Knochel Firebase modules for both iOS and Android for a while now, working smooth. However, after SDK 9.3.1 bump (CLI version 5.3.0) we ran into a bug trying to use latest module releases. Ti (or Xcode) needs the Header folders inside .xcframework to be present in order to successfully build the app. It works fine if you download the zip locally and build, however, when pushing to github, where empty folders are not tracked, and then checking out, builds fail due to these non-present empty header folders. It happened with firebase.core 5.0.0, firebase.analytics 4.0.0 and firebase.cloudmessaging 5.0.0 I'm pretty sure it will happen to other modules as well.

Steps to reproduce

1. Download https://github.com/hansemannn/titanium-firebase-cloud-messaging/releases/tag/ios-6.0.0 and add it to your app 2. Remove the Headers directories underneath modules/firebase.cloudmessaging/6.0.0/firebase.cloudmessaging.xcframework/<arch> 3. Build the application

Actual

Build errors

Expected

No error

Comments

  1. Ewan Harris 2021-02-15

    [~vijaysingh] [~cwilliams], should the CLI generate something like a txt file in the headers directory during module build if there's no headers or maybe just make a headers folder if it doesn't exist during app build?
  2. Hans Knöchel 2021-02-16

    Yep, the CLI should ensure the folder is created. I'm wondering when that broke - maybe with the xcframework support, since static modules are not affected by this.
  3. Vijay Singh 2021-02-16

    Yes. In case of XCFramework there should be 'Headers' folder for every variant of library based (.a) XCFramework. e.g inside test.xcframework/ios-arm64_armv7/, test.xcframework/ios-arm64_x86_64-maccatalyst/, there should be 'Headers' folder. For framework based (.framework) XCframeworks it is already there.
  4. Ewan Harris 2021-08-03

    PR: https://github.com/appcelerator/titanium_mobile/pull/12996
  5. Hans Knöchel 2021-08-14

    That PR looks great! Hopefully it can land in master soon!

JSON Source