[TIMOB-28511] iOS: Build fails if module is missing Headers folder in xcframework
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2021-08-26T09:22:49.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 10.1.0 |
Components | iOS |
Labels | 9.3.1.GA, build, module, titanium, titanium-cli |
Reporter | Caio Perdona |
Assignee | Ewan Harris |
Created | 2021-02-13T19:57:34.000+0000 |
Updated | 2021-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 underneathmodules/firebase.cloudmessaging/6.0.0/firebase.cloudmessaging.xcframework/<arch>
3. Build the application
[~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?
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.
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.
PR: https://github.com/appcelerator/titanium_mobile/pull/12996
That PR looks great! Hopefully it can land in master soon!