Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25227] iOS: Building app with module that contains a framework fails on 6.2.0

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-09-07T22:51:21.000+0000
Affected Version/sRelease 7.0.0, Release 6.2.0
Fix Version/sRelease 6.2.0
Componentsn/a
Labelsios, regression
ReporterHans Knöchel
AssigneeJan Vennemann
Created2017-09-05T10:27:52.000+0000
Updated2017-09-07T23:36:56.000+0000

Description

When building an app project (or CI build like in my case), the build fails on 6.2.0/master because of an error in the new framework-hook (TIMOB-20557). See the full build log in the [travis-build](https://travis-ci.org/hansemannn/titanium-google-maps) of my Ti.GoogleMaps module:
[ERROR] An error occurred during build after 758ms
[ERROR] Error: Unknown framework type:
[ERROR] Mach-O universal binary with 4 architectures: [i386: Mach-O object i386] [x86_64: Mach-O 64-bit object x86_64] [arm_v7: Mach-O object arm_v7] [arm64: Mach-O 64-bit object arm64]
[ERROR] /Users/travis/Library/Application Support/Titanium/modules/iphone/ti.googlemaps/3.9.0/platform/GooglePlacePicker.framework/GooglePlacePicker (for architecture i386):	Mach-O object i386
[ERROR] /Users/travis/Library/Application Support/Titanium/modules/iphone/ti.googlemaps/3.9.0/platform/GooglePlacePicker.framework/GooglePlacePicker (for architecture x86_64):	Mach-O 64-bit object x86_64
[ERROR] /Users/travis/Library/Application Support/Titanium/modules/iphone/ti.googlemaps/3.9.0/platform/GooglePlacePicker.framework/GooglePlacePicker (for architecture armv7):	Mach-O object arm_v7
[ERROR] /Users/travis/Library/Application Support/Titanium/modules/iphone/ti.googlemaps/3.9.0/platform/GooglePlacePicker.framework/GooglePlacePicker (for architecture arm64):	Mach-O 64-bit object arm64
It looks like the framework-hook does not pick up the "GooglePlacePicker" framework correctly. It was just added a day ago and might have a different structure than before. Google also warned developers who are manually integrating frameworks: {quote} Note: - The layout of the static frameworks has changed. There is no longer a Versions directory. The contents of Versions/A has been moved to the root directory of the framework. Developers who manually integrate frameworks with their project should take additional care during the upgrade. {quote} We should get this under control in 6.2.0.GA so people do not experience module-related crashes. Please note that this module still using the manual framework linking in the module.xcconfig (for backwards-compatibility with older SDK's). Investgating it more further, it turns out that the error is thrown by the following lines, not being able to detect the framework type:
if (stdout.indexOf('current ar archive') !== -1) {
    type = FRAMEWORK_TYPE_STATIC;
} else if (stdout.indexOf('dynamically linked shared library') !== -1) {
    type = FRAMEWORK_TYPE_DYNAMIC;
} else {
    return reject(new Error('Unknown framework type:\n' + stdout));
}
Which makes sense when you look into the type (Mach-O) that needs to be handled.

Comments

  1. Jan Vennemann 2017-09-05

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/9399 PR (6_2_X): https://github.com/appcelerator/titanium_mobile/pull/9400
  2. Eric Wieber 2017-09-07

    Review passed; merged.
  3. Eric Wieber 2017-09-07

    Verified in SDK builds 6.2.0.v20170907160102 & 7.0.0.v20170907160213

JSON Source