Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20565] Hyperloop: iOS - CocoaPods assets only found when copied into project

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2016-10-27T13:48:16.000+0000
Affected Version/sRelease 5.2.0
Fix Version/sn/a
ComponentsHyperloop
Labelsassets, cocoapods, hyperloop
ReporterHans Knöchel
AssigneeJan Vennemann
Created2016-03-14T20:24:33.000+0000
Updated2017-01-24T00:33:23.000+0000

Description

If we use a CocoaPods dependency that uses bundle assets, those are not referenced correctly from the Pods directory. But if we copy them to the project's directory, it works correctly. Example Pod: https://github.com/nakiostudio/NKOColorPickerView (see the Assets directory) Example usage:
/**
 *  Constructor
 **/
(function constructor(args) {
    var NKOColorPickerView = require("NKOColorPickerView/NKOColorPickerView"),
        UIView = require('UIKit/UIView'),
        UIColor = require('UIKit/UIColor'),
        CGRectMake = require('CoreGraphics').CGRectMake;

    var frame = CGRectMake(0, 50, Ti.Platform.displayCaps.platformWidth, Ti.Platform.displayCaps.platformHeight - 120);
    var defaultColor = UIColor.redColor();

    var colorPickerView = NKOColorPickerView.alloc().initWithFrameColorAndDidChangeColorBlock(frame, defaultColor, function(color) {
        currentColorView.setBackgroundColor(color);
    });

    var currentColorView = new UIView();
    currentColorView.setFrame(CGRectMake(0,0,Ti.Platform.displayCaps.platformWidth,50));
    currentColorView.setBackgroundColor(defaultColor);

    $.container.add(colorPickerView);
    $.container.add(currentColorView);

})(arguments[0] || {});
The background images of the colorPickerView is not referenced correctly. If we copy the images from the Pod's Assets directory to the alloy project's app/assets, it works fine.

Comments

  1. Reymundo López 2016-07-20

    Same thing is happening if we use a .bundle file in the project.
  2. Hans Knöchel 2016-10-27

    I guess this is a duplicate of TIMOB-23780.
  3. Josh Longton 2017-01-24

    Closing as a duplicate of TIMOB-23780

JSON Source