You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
{FIX-SOLUTION}
Ti.UI.imageView throwing messages like this when running the generated build with Xcode:
[framework] CUICatalog: Invalid asset name supplied: '(null)'
in TiUIImageView.m ->
instead (actual code):
//remove suffixes.
imageArg = [imageArg stringByReplacingOccurrencesOfString:@"@3x" withString:@""];
imageArg = [imageArg stringByReplacingOccurrencesOfString:@"@2x" withString:@""];
imageArg = [imageArg stringByReplacingOccurrencesOfString:@"~iphone" withString:@""];
imageArg = [imageArg stringByReplacingOccurrencesOfString:@"~ipad" withString:@""];
image = [UIImage imageNamed:imageArg];
if (image == nil) {
image = [UIImage imageWithContentsOfFile:[img path]];
}
this fixes the debug message... and it makes sense....!!!!
//remove suffixes.
imageArg = [imageArg stringByReplacingOccurrencesOfString:@"@3x" withString:@""];
imageArg = [imageArg stringByReplacingOccurrencesOfString:@"@2x" withString:@""];
imageArg = [imageArg stringByReplacingOccurrencesOfString:@"~iphone" withString:@""];
imageArg = [imageArg stringByReplacingOccurrencesOfString:@"~ipad" withString:@""];
if (imageArg!=nil) {
image = [UIImage imageNamed:imageArg];
}
else {
image = [UIImage imageWithContentsOfFile:[img path]];
}
because loading an imageNamed when the imageURL is nil, makes no sense!!!
Beta Was this translation helpful? Give feedback.
All reactions