I recently updated my instance of Visual Studio 2017 to version 15.3.5 and in the process updated Xamarin.iOS to version 11.0.0.0.
Since updating, several of the resources in my project have stopped working. When deploying to a device, the app icon is not displayed (instead blank icon is shown), and Bundle Resources like a custom font file (.tff) is no longer loading. There has been no code changes to the stable branch of our build, but just updating appears to have broken multiple resources.
Has anyone else encountered this? Does the Xamarin team know about this (I'm looking at you Xamarin folks who said to post my questions in SO)?
EDIT:
Here is the guide for updating an app (doesn't appear to apply to the issue I'm seeing): Xamarin Update to iOS11.
Here's a specific example of code that has suddenly stopped working despite no code changes:
UIFont customFont = UIFont.FromName("streamline-24px", (float)this.IconButton.IconSize);
The .tff file is the same, but FromName() yields a null value now.
I figured it out, hopefully this helps anyone with the same configuration that upgrades their Xamarin.Forms or Xamarin.iOS project from Xamarin.iOS release 10 to 11. I was lucky to happen upon it after reading Kevin Mullins answer at Xamarin saying that you should:
Ensure that all of you icon files are in place (either via the info.pst file or an Image asset).
My Info.plist > Visual Assets looked like this (which worked prior to the update)
Selecting Use Asset Catalog and selecting a value resolved the issue.
Related
I have a xamarin forms project that started behaving strangely... It started randomly replacing images with different images from the resource folder. It seems to only be happening in the Android project, iOS is behaving correctly. I've removed the recently added images and readded them, clean, rebuild, nothing sees to be helping. The images that are getting changed are not being overwritten, and the code references the correct file.
Has anyone run into a similar issue before? Thoughts on how to possibly fix this?
It is a common behaviour, What I usually do is:
Restart Xamarin Studio
Go to your project Android location and Delete the bin/Obj folders.
Do a full clean, rebuild of your project
Delete the Android app from the device
This is the my day to day script. Hope it helps!
All of a sudden this morning I am unable to drag png files into my drawable folders in Android Studio. I get the message "Refactoring cannot be performed - the file is read-only". I have confirmed that these files are not read only and have tried this with numerous image files in different locations on my Mac. Any ideas as to how this can be fixed please?
PS - This is occurring in all my Android Studio projects. I am running Android Studio 0.5.9 on OS X 10.9.3
I managed to solve it somehow. Just copy and paste the *.png you need in your drawable folder instead of dragging it. Turns out there's a problem with moving it
Later edit: holding ALT whilst dragging the files should also do the job. Thanks #RunLoop
Right click the file you're attempting to add to, go to "Show in explorer" and then drag the files there. Worked for me!
Update to the most recent JDK here. The currently accepted answer by user DDsix worked for me, but that is a workaround. Updating the JDK will bring full functionality back.
I believe this is related to the following issue on the AOSP bug tracker.
Cannot run on the selected destination
The selected destination does not support the architecture for which the selected software is built. Switch to a destination that supports that architecture in order to run the selected software.
I am using the Facebook-iOS-SDK from GitHub: https://github.com/facebook/facebook-ios-sdk
tested latest commit (2a030e795aed343e7614e149a5ebdfa78b223a72) and sdk-version-3.0.8 tag, both having the same problem. Tested the Hackbook, Scrumptious, FriendPickerSample on both iDevices and iSimulator.
It was working before (on older version of XCode), so it could be the xcode upgrade, but my other projects work fine. I've tried multiple solutions on this site which works for others but not on mine, does anyone encounter this before with Facebook-SDK specifically? Thanks in advance!
EDIT: I have found the issue, if you install the FacebookSDK and you add the resources folder to get the facebook image buttons there is a Info.plist file. XCodes goes weird with this info.plist file. I have deleted it, made a clean and now it works perfect :)
OLD:
The same behavior here. On another projects it runs perfectly but in this one I have always the same problem. After some XCode restarts sometimes it runs ok, sometimes I "click" on run and then nothings happens, sometimes it runs...
The best option is to move the project to other path. Adding and removing the libsql3.0 from lib dependencies sometimes works too.
Sadly, it seems like this is a bug on XCode, it will build and run fine for once every couple of restarts and with the entire project directory moved to other path. This is very sad because apple always make good products for consumer but all their developer software are crappy compared to big M's
I ran into this problem. It seemed to start right after XCode hung and I had to force quit. This was a day before the 4.6 update. I hoped that that update might fix the problem. And I did get one successful build before I started getting that message (actually in 4.6 there are two different but similar messages that seem to alternate.
I solve the problem by letting XCode update the project settings. I first noticed this possibility when I made a duplicate copy of my project and open that, but it is clear that this option is also available in the original. Here is what I did
In the Issues Navigator just under my project "MyProject project" I had a message MyProject.xcode
Validate Project Settings
Update to recommended settings.
I click on that and I was presented with a dialog box with 4 checkboxes some explanatory text and the option to perform changes. I just let Xcode make those changes and everything has been fine since.
Remove info.plist from Facebook Resources folder. Changed the location of XCode project and Reset the iPhone simulator...now it is working :) Buggy XCode !!
I am new to using PhoneGap for windows phone 7.
I'm not entirely sure what the problem is - when I try to add an existing image, it's not added to the CordovaSourceDictionary.xml file, but if I manually add the image to CordovaSourceDictionary.xml, it is deleted when I build. How should I fix this problem?
Here is a tutorial by Daniel Egan. Also I have some other links for you
Tutorial: how to create HTML5 applications on Windows Phone thanks to PhoneGap.
Getting Started with Windows Phone.
Getting Started with Windows 8.
Apache Cordova Documentation.
Hope this will help you.
Check image Build Action property (Solution explorer, item Properties view). It must be set to Content, (when you add image, by default this property value is Resource)
CordovaSourceDictionary.xml is updated by the build process which relies on the way Visual Studio works. You need to trigger a file update, you know, like Right click on the Solution > Add > Add new folder / Existing item etc.
What I do is drag the file from Windows Explorer into the Visual Studio project and drop it in the images folder. NOW Visual Studio knows you have add a new file and when you run the project CordovaSourceDictionary.xml gets automagically updated with your changes.
Keep up the good fight!
This probably isn't what is breaking your system, but the JS framework I use adds a url query to each image when in a debugging mode (in order to force browsers to reload image, instead of using cached). So, my image "image/background.jpg" would be accessed as "image/background.jpg?d=34342233". But, when running on phoneGAP for Windows Phone, it won't recognize the image, and thus it shows up as broken. So, I had to turn off debugging for the framework I use, and suddenly the images showed up. Don't forget to set the Build Action to "Content" as mentioned earlier.
I've made an update to my existing Mac app and went to archive it.
In Organizer it came up as a new entry and not under the previous releases I had. This new entry appears generic, ie. no app icon, no version or identifier info, just the name of the app came through. What happened? How do I troubleshoot?
In the update I added a UTI and also copied a plug-in into my bundle. Could those things have something to do with it?
Got it. My problem was related to dependency targets. Here's the solution:
http://www.weston-fl.com/blog/?p=2429
(Excerpt added 2012-12-18; see blog post for screenshots and background info)
… Select dependent project(s) in the Project Navigator
Find “Skip Install” and set to YES.
If you have more dependent project, repeat these steps for all of them (i.e. at static library projects).
The app is expected to be deployed so do not change the Skip Install’s No to YES there. Change at the dependent projects only.