nsinternalinconsistencyexception could not load nib in bundle xamarin - ios

I have a solution with a Xamarin.Ios library containing views and nibfiles. Furthermore the solution have a iphone app project(duh) with a reference to the library.
Earlier when compiled and executed the nibfiles where copied correctly into the application. If I found the app in the simulator and pushed show contents the nibfiles would be there.
However after updating to the newest 8.6 from xamarin the nibfiles are no longer copied, which results in the lovely nsinternalinconsistencyexception could not load nib in bundle error. The nibfiles are set as interfacedefinition and copy are set to "do not copy".
Do anyone have a suggestion to where to look?
Any help is highly appreciated
Update:
I added the fix as mentioned in the answer at it fixed half of my issue however for now i need to link view files from my library for them to be included in the app.

This is a know issue (been reported in Xamarin's bugzilla system). In XI 8.6.0 there are some conditions where the new, msbuild-based, build forgets to copy some files in the application bundle.
A workaround (or most cases) is to edit a .target file like described here.
The upcoming service release (8.6.1) is fixing this issue.

Related

What is the simplest way to copy project folder to new Mac with updated IOS and Xcode?

I recently acquired a newer MacBook to run the most recent iOS and Xcode versions. I copied a project folder to the new Mac and opened it with Xcode 11.4 (was 10.1 on old Mac). I get 14 errors all related to "Failed to render and update auto layout status for ..VeiwController". The simulator runs fine, but the main storyboard doesn't render the button icons properly. I can add new constraints to the buttons to show them properly but the errors don't go away. I assume I have lost some info/files related to autolayout when I copied folders. I have read about similar issues. Most talk about using Github or some other 3rd party for maintaining files. Is there any other way to get this done? It seems like updates computers/software should be simpler.
Since reporting this, I have used the same process of copying folders of all other projects and have had no problems. But one project, the largest and most complex continues to have 14 rendering errors and always the displayed err message "An internal error occurred. Editing functionality may be limited." The strange thing is going in and out of viewing Main.storyboard several times gets rid of the errors eventually. Unfortunately, the errors always come back when I open the project. And sometimes they go away, then come back randomly in the same session.
So the answer to "whats the simplest way to copy a project folder to new computer is just that - Copy the project folder! But thats the wrong question for this problem.

The alerts in my Xcode project doesn't disappear

I'm working with the Google's Ios SDK, and recently i updated the file that contained the SDK. The problem is that i get these errors saying that the files doesn't exists, but they actually exist and works fine.
These are some of the errors (there is about 80 alerts)
So, what can i do?
Thanks!
This what i tried for the last error, but the alert doesn't disappear
If you're using XCode with source control integration ensure you have added those files to the repository. Once you have the files in question added/tracked in git/svn these warnings should disappear.
Also, it never hurts to Command-Option-Shift-K (clean) the project and re-open after you've tracked those files.
See this SO post for possible approaches.

Reference to xml_****_**** is ambiguous

I have updated my Xcode to the latest version of 8.0
After the update, I am facing a new build error preventing me to run the project on the simulator.
The error is the below in DDXMLNode.m:
reference to 'XML_DOCUMENT_NODE' is ambiguous
I am using the XMPP framework as pods (pod 'XMPPFramework') so I still can't figure out a way to solve this.
Note that the project is working normally on the device and was working on both Device and Simulator with the previous Xcode Version.
I have tried to search the internet but I still didn't find any solution for this.
I tried to clean the project and delete everything in the DerivedData folder as well, but it didn't solve the issue.
Appreciate any help.
Actually I am posting this answer in case it may help someone in the future.
After searching a lot without finding any answer, I discovered the following:
There is a file called module.modulemap that contains 2 methods.
module libxml [system] {
header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/libxml2/libxml/tree.h"
export *
}
module libxmlSimu [system] {
header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/libxml2/libxml/tree.h"
export *
}
The first one is used for real devices, the other one for the simulator.
However, when building the app on the simulator, and for a reason that I didnt figure it out, tree.h is being duplicated and causing all these issue.
So what I made to be able to run the project on the simulator was to comment the first method so the app can build successfully.
NB: Don't forget to uncomment the method once you want to run the project again on the real device.
Hope this will help anyone who will face the same issue.
i have tried some way.
I search the word XML_DOCUMENT_NODE with a result here:
then replace every error with the left symbol. It turns out to be OK for me now.

app delegate not being called, project.pbxproj corrupt

Hi guys I have a very weird issue and I really need help.
I was trying to commit from Xcode and opened source tree (I use sourceTree to merge changes from branches) while the commit was being performed in Xcode. SourceTree is another git manager, Xcode went crazy when SourceTree asked for my credentials and I entered wrong password. Suddenly Xcode 7 crashed and when I reopened, my project was not there, it had dissapeared. I managed to recuperate files and code, but the configuration file project.pbxproj was missing. Not even present in github.
I managed to recuperate an old version of this file.
When I reopened the project, I had to add some files again that were there in the project but weren't detected. I finally managed to compile, but now when I launch my app, my App delegate is not being called. The app freezes at splash screen. I think it is probably because of this file.
Does somebody know how to fix this problem?
Least effort is probably to create a new project and migrate the code and such to the new project. Might be save you time/money?
I know you fixed it, a suggestion for future problems like this one.
Check if the main.m file is imported and if it's calling the app delegate.
Take a look at this https://github.com/appsquickly/XcodeEditor
And this https://github.com/CocoaPods/Xcodeproj

Extension project templates not appearing in Xcode 6

I'm not sure if I am the only one experiencing this program, but I have tried searching and have not been able to find anyone in my current situation. I downloaded Xcode 6 beta and was interested in Extension programming for iOS 8. However, I have been unable to locate the extensions in my project templates when creating a new project in Xcode, I saw a YouTube video (unrelated to extension programming) but I did notice that the option was not there for the said video. Now, I have had a look through the contents of the Xcode 6 beta package and have been able to locate the actual templates themselves, so I have no doubt they are present, it just seems that they are not actually being loaded.
For the record, I also downloaded some example custom keyboard code from GitHub in order to see whether Xcode will recognise it and it does, going as far as actually displaying the 'E' icon beside the build target. I should also mention that I do have a build of Xcode 5 also present on my machine.
Is anyone else experiencing this issue, or does anyone know how to overcome it?
Thanks
You create a extension by creating a new target in an existing project.
Check this link for more information
I had the same problem. The solution was to not try to add the extension in File/new/File... menu but in File/new/Target... menu.
You can add extension to any existing project.

Resources