Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25393] Adding Third-Party iOS Framework causes build error with 6.2.x

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2017-10-17T06:44:15.000+0000
Affected Version/sn/a
Fix Version/sRelease 6.3.0
ComponentsiOS
Labelsregression
ReporterJoe Falcone
AssigneeJan Vennemann
Created2017-10-14T20:40:00.000+0000
Updated2017-10-17T16:27:37.000+0000

Description

We're experimenting with integration of third-party libraries and frameworks with Hyperloop. We added the ContentfulAPI ObjC Framework to the app/platform/ios directory of the hyperloop_examples app. When we built the app with either SDK 6.2.1 or 6.2.2, we get this error late in the build process... 2017-10-14T20:24:55.215Z | ERROR | An uncaught exception was thrown! (buildSettings.LD_RUNPATH_SEARCH_PATHS || "").replace is not a function 2017-10-14T20:24:55.216Z | ERROR | (buildSettings.LD_RUNPATH_SEARCH_PATHS || "").replace is not a function When we remove the Framework, the build completes successfully. I've attached the log. This appears to be either a regression based on comments in other reports that this mechanism worked. Also, parenthetically, and the source of another JIRA report not yet filed - we did attempt to use the Contentful Pod and that also resulted in build errors. So at this point we're shall we say "stymied" with respect to integrating the Contentful SDK. We've also tried to do the same with the Flurry SDK and have also encountered problems.

Attachments

FileDateSize
log.rtf2017-10-14T20:32:32.000+0000798064

Comments

  1. Joe Falcone 2017-10-16

    The Contentful ObjC framework we added to the build was this one... http://static.contentful.com/downloads/iOS/ContentfulDeliveryAPI-1.10.4.zip
  2. Joe Falcone 2017-10-16

    OK, I think the paths conflict came from having a leftover appc.js file lying around. When I removed the appc.js and ran again, I did get a different error... [TRACE] : Undefined symbols for architecture x86_64: [TRACE] : "_OBJC_CLASS_$_NSManagedObject", referenced from: [TRACE] : _OBJC_CLASS_$_CDALocalizablePersistedEntry in ContentfulDeliveryAPI(CDALocalizablePersistedEntry.o) [TRACE] : "_OBJC_METACLASS_$_NSManagedObject", referenced from: [TRACE] : _OBJC_METACLASS_$_CDALocalizablePersistedEntry in ContentfulDeliveryAPI(CDALocalizablePersistedEntry.o) [TRACE] : ld: symbol(s) not found for architecture x86_64 [TRACE] : clang: error: linker command failed with exit code 1 (use -v to see invocation) [ERROR] : ** BUILD FAILED ** [ERROR] : The following build commands failed: [ERROR] : Ld build/Products/Debug-iphonesimulator/Hyperloop_Sample.app/Hyperloop_Sample normal x86_64 [ERROR] : (1 failure)
  3. Jan Vennemann 2017-10-16

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/9528 PR (6_3_X): https://github.com/appcelerator/titanium_mobile/pull/9529 There is another follow up fix needed for Hyperloop to make the Contentful SDK working. Will update the ticket as soon as that is ready.
  4. Jan Vennemann 2017-10-17

    [~jfalcone], i assume you are currently using Hyperloop 2.1.3, which is not yet capable of picking up frameworks from the platform folder as it was released before SDK 6.2.0 (where the new framework handling was introduced). Support for this will follow with Hyperloop 2.2.0. The reason you see the above error when you remove appc.js is because the initial issue you were seeing only occurred with other other third-party swift sources configured, which the hyperloop-examples project does in it's appc.js. By removing that file you worked around the issue. To resolve the error you are seeing now you have to explicitly pull in the Contentful SDK dependencies via appc.js configuration key hyperloop.ios.xcodebuild.frameworks and add SystemConfiguration, MobileCoreServices and CoreData. You can take a look at the appc.js file from hyperloop-examples project to see an example. However, there are still two follow up fixes required for Hyperloop to actually be able to use the Contentful SDK which are tracked in TIMOB-25402 and TIMOB-25403.
  5. Jan Vennemann 2017-10-17

    [~amukherjee], [~ewieber], test instructions with Hyperloop 2.1.3

    Follow the steps in this ticket by adding the framework to app/platform/ios

    Add the following system frameworks to the frameworks configuration option in appc.js

    #* SystemConfiguration #* MobileCoreServices #* CoreData

    Build and run the hyperloop-examples application

    *Expected behavior* The build is successful and the app loads without a crash. Note that it won't be possible to reference the Contentful SDK with Hyperloop 2.1.3 as this ticket focuses on the SDK fix to make the build work again.
  6. Eric Wieber 2017-10-17

    Verified in SDK builds 7.0.0.v20171017022901 & 6.3.0.v20171017063048

JSON Source