Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24376] Hyperloop: iOS - third party libraries are not getting added to build

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionDuplicate
Resolution Date2017-03-03T14:48:32.000+0000
Affected Version/sRelease 6.0.0, Release 6.0.1
Fix Version/sn/a
ComponentsiOS
Labelshyperloop-documentation
ReporterNeeraj Mishra
AssigneeNeeraj Mishra
Created2017-02-07T00:10:23.000+0000
Updated2017-03-22T22:22:13.000+0000

Description

Problem Description:

Facing Issue while accessing third party lib localytics and call its native APIs on iOS using hyper loop.

Steps to Reproduce:

1. Added the podfile (attached) 2. Importing the library like below : var localytics = require('Localytics') Unable to reproduce exact customer issue. When we use podfile provided by customer and sample code at our end, it builds fine but as soon as the app launches, app is crashing.

The customer reported error:

Script Error Couldn't find module: /hyperloop/localytics/localytics for architecture: x86_64

Our results:

Crash report attached. There is no error message in console except crash file path.

Attachments

FileDateSize
Podfile2017-02-07T00:08:46.000+0000128
sampleiOS_2017-02-06-160710_ITEM-AX12345.crash2017-02-07T00:16:02.000+00003491

Comments

  1. Jan Vennemann 2017-02-07

    The Localytics SDK is a dynamic framework which is not supported by Hyperloop yet. We will be adding support for dynamic frameworks in an upcoming version of Hyperloop. In the meantime I would suggest to use the static library which is available via CocoaPods: pod 'LocalyticsStaticFramework', '~> 4.2'. Unfortunately this is currently also affected by TIMOB-24009 so they would need to wait for Hyperloop 2.0.1 to use the Localytics SDK.
  2. Neeraj Mishra 2017-02-07

    [~jvennemann]: Thanks for the comment. Quick question: Would the same applicable for android as well while using localytics jar? customer sees issue there as well, though it is a different.
  3. Jan Vennemann 2017-02-07

    Android is completely different so i'd say to open a different issue for that with complete logs and error description.
  4. Hans Knöchel 2017-03-03

    Resolving as Duplicate of TIMOB-23570 which will fix this as well. As a workaround, refer to the static library of the SDK which already is supported for this specific use-case. Thx!
  5. Jan Vennemann 2017-03-09

    [~nmishra], correct, Hyperloop 2.0.1 (which includes TIMOB-24009) is required to use the Localytics static framework. Also note that the method is called autoIntegrateLaunchOptions:
       var TiApp = require('Titanium/TiApp');
       var Localytics = require("Localytics");
       Localytics.autoIntegrateLaunchOptions("APP_KEY_HERE", TiApp.app.launchOptions);
       
  6. Neeraj Mishra 2017-03-09

    Thanks for confirming [~jvennemann]. But in Localytics documentation I do not find the above method "autoIntegrateLaunchOptions", I only find autoIntegrate at https://docs.localytics.com/dev/ios.html#initialize-sdk-ios
  7. Jan Vennemann 2017-03-09

    The example shows:
       [Localytics autoIntegrate:@"YOUR-LOCALYTICS-APP-KEY" launchOptions:launchOptions];
       
    Javascript does not have the concept of named parameters, which is why the method name translates to the following with Hyperloop:
       Localytics.autoIntegrateLaunchOptions("YOUR-LOCALYTICS-APP-KEY", launchOptions);
       
    The parameter names will be concatenated using camel case resulting in the JS method name.
  8. Neeraj Mishra 2017-03-10

    [~jvennemann]: Thanks for clarification. We will suggest to customer to use it this way once Hyperloop 2.0.1 is out because I guess even this one won't work until we use Hyperloop 2.0.1
  9. Lee Morris 2017-03-22

    Closing ticket as duplicate and links to the related ticket have been provided above.

JSON Source