Bug 31778 - Xamarin.iOS builds from the path /private/var are missing asset catalog images
Summary: Xamarin.iOS builds from the path /private/var are missing asset catalog images
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: XI 8.10
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2015-07-09 05:21 UTC by Prashant Cholachagudda
Modified: 2015-07-14 09:19 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Test case (29.75 KB, application/zip)
2015-07-09 05:21 UTC, Prashant Cholachagudda
Details
Build log (87.45 KB, application/zip)
2015-07-09 05:21 UTC, Prashant Cholachagudda
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Prashant Cholachagudda 2015-07-09 05:21:08 UTC
Created attachment 11953 [details]
Test case

Customer is searching for a solution to a problem with ad-hoc/app store builds
of their Xamarin iOS app.

When we build the app on our build server, the app is missing its icon
files, but when we build the same solution in other locations, the icons
are included in the app bundle. The icon files are in an Asset Catalog.

The attached sample project builds successfully reproduce the
problem. It only occurs when the solution directory is located in a
subdirectory of /private/var on the Mac filesystem. If we build exactly the same
source code in another location, such as within a user's home directory,
the problem does not occur.

They encountered this problem with Xamarin.iOS 8.10.0.267/Xamarin Studio
5.9.1 build 3 (and possibly with some earlier versions too). They're still have
the problem after updating to the latest stable releases of Xamarin.iOS and
Xamarin Studio (8.10.2.37 and 5.9.4 build 5). Xcode is at version 6.3.2.

# Attachments
TestIcon.zip: the sample Xamarin Studio solution I have used to reproduce
the problem. If you unzip this into, for example, your home directory, open
the solution in Xamarin Studio, and build and run, you will see that the
app is installed on the iOS simulator and the app icon is visible on the
home screen. If you copy this code to a subdirectory of /private/var
instead, and build and run, the app icon will not be visible on the
simulator home screen.

Build Results.zip: this zip file contains two subdirectories. "Build
Results home directory" contains the build log when building the project
from my home directory, and "Build Results private-var" contains the build
log when building from /private/var. You will note that the private/var
build log has some output with some odd looking relative paths (lots of
"../../") that the other build log does not have. Also, I included screen
shots from the iOS simulator showing the missing app icon, and a listing of
the contents of the .app file that shows the app icon PNG is not included
in the app built from private/var.
Comment 1 Prashant Cholachagudda 2015-07-09 05:21:34 UTC
Created attachment 11954 [details]
Build log
Comment 2 Rolf Bjarne Kvinge [MSFT] 2015-07-14 05:37:32 UTC
This doesn't look quite right:

>        SmartCopy Task
>          DestinationFiles:
>            bin/iPhoneSimulator/Debug/TestIcon.app/LaunchScreen.nib
>            bin/iPhoneSimulator/Debug/TestIcon.app/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib
>            bin/iPhoneSimulator/Debug/TestIcon.app/Main.storyboardc/Info.plist
>            bin/iPhoneSimulator/Debug/TestIcon.app/Main.storyboardc/UIViewController-BYZ-38-t0r.nib
>            bin/iPhoneSimulator/Debug/TestIcon.app/../../../../../../../var/TestIcon/obj/iPhoneSimulator/Debug/actool/AppIcons60x60@2x.png

@Jeff, can you have a look?
Comment 3 Jeffrey Stedfast 2015-07-14 08:07:28 UTC
Here's the problem: http://screencast.com/t/HFlXfBhZAps

The problem is that /private/var is a symlink to /var and so file-path matching doesn't work and thus calculating the relative path of the icon (/var/TestIcon/whatever) to the project path (/private/var/TestIcon) obviously results in a ../../../..... relative path.

This is already worked around in git master.

In the meantime, build somewhere else that isn't a symlinked path and the problem will go away.
Comment 4 mmertsock+xbug 2015-07-14 09:05:25 UTC
Yeah, I was pretty sure the symlink was causing the problem. We are building out of a different directory anyway for production builds, so for now we can live with the bug affecting only our dev builds.
Comment 5 Jeffrey Stedfast 2015-07-14 09:19:38 UTC
FWIW, Xamarin.iOS 8.12 will have a fix for this.