Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25436] Hyperloop: iOS - framework-parser should skip "Headers/" in framework if not exists

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-10-24T17:47:57.000+0000
Affected Version/sHyperloop 2.2.0
Fix Version/sHyperloop 2.2.1
ComponentsHyperloop, iOS
Labelsn/a
ReporterHans Knöchel
AssigneeHans Knöchel
Created2017-10-24T11:42:36.000+0000
Updated2017-10-25T23:01:44.000+0000

Description

There is a report on my Ti.Firebase repository on [Github](https://github.com/hansemannn/titanium-firebase-analytics/issues/2) reporting that with Hyperloop 2.2.0, his build fails because Hyperloop tries to generate wrappers for a framework that is referenced via a native module in modules/iphone/*. The real crash then happens, because it tries to loop through the framework's Header/ directory which sometimes does not exists, e.g. in the [FirebaseNanoPB.framework](https://github.com/hansemannn/titanium-firebase-core/tree/master/ios/platform/FirebaseNanoPB.framework). So there are two related fixes required here:

Do not process frameworks referenced via native modules, e.g. inside modules/ (same for Android, please confirm that this does not happen). A blacklist should help here.

Do not try to iterate through the Headers/ directory if it does not exist. A simple fs-guard should help here.

Attachments

FileDateSize
test_firebase.zip2017-10-24T16:30:42.000+00008658699

Comments

  1. Hans Knöchel 2017-10-24

    PR (master): https://github.com/appcelerator/hyperloop.next/pull/247 PR (2_2_X): https://github.com/appcelerator/hyperloop.next/pull/248 Test-case: * Run the attached app and ensure it does not crash during the build. * Also test with hyperloop-examples for a more advanced test-suite.
  2. Eric Wieber 2017-10-25

    Verified with Hyperloop 2.2.1Beta2. Able to build projects with modules that are referenced via native modules. Tested on iOS and Android using the provided sample project as well as other test projects that contain several modules.

JSON Source