[TIMOB-20565] Hyperloop: iOS - CocoaPods assets only found when copied into project
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2016-10-27T13:48:16.000+0000 |
Affected Version/s | Release 5.2.0 |
Fix Version/s | n/a |
Components | Hyperloop |
Labels | assets, cocoapods, hyperloop |
Reporter | Hans Knöchel |
Assignee | Jan Vennemann |
Created | 2016-03-14T20:24:33.000+0000 |
Updated | 2017-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.
Same thing is happening if we use a
.bundle
file in the project.I guess this is a duplicate of TIMOB-23780.
Closing as a duplicate of TIMOB-23780