Error: Could not load the "cm_photo_library_white" image referenced from a nib in the bundle with identifier "" - cosmicmind

I started getting this error recently, possibly after the recent update?
To test I created a new project, added to the storyboard a Tab Bar Controller with its 2 VCs. I set one of the pages tab bar items to any of the added icons from Material. Build/Run the app, when the tabbarcont tries to load I get the error:
Error: Could not load the "cm_photo_library_white" image referenced from a nib in the bundle with identifier...
Any Suggestions, others seeing this?
Just got into iOS development, and found Material. Plan to use it and Firebase on an app! Love what you've done with Material. Expect kickbacks once my app starts out int he wild :)

I have some error.
I select icon in StoryBoard with Xcode autocomplete.
StoryBoard
It can't work.
But button.setImage(Icon.cm.arrowBack, for: .normal) work :)

Related

WKWebView migration issues

Further to my earlier question
Migrating iOS Hybrid App from UIWebView to WKWebview
I have made good progress and only have a few loose ends to tidy up. The overall performance improvement over UIWebView is outstanding.
In UIWebView it was possible to set the focus on a text field programatically using
webView.keyboardDisplayRequiresUserAction = NO ;
However this is not available in WKWebView and ever since 2016 programmers have been developing an updating work arounds (swizzles) to overcome this.
I have tried implementing the latest of these I could find on Stack Overflow, which I found at https://stackoverflow.com/a/55344531/5948260
However as I am very inexperienced at coding in XCode please could someone tell me exactly how I add the above solution to my project. I have tried in vain to find examples of how exactly to do this i
on GitHub or elsewhere but to no avail.
So far I have tried copying the code provided in the above answer into a .m file and adding it to my project, but I got 20 or so errors, I then added an import statement for Foundation and most of these went away but XCode complained that it did not know what class WebViewInjection is. Also must there be a corresponding header file?. Must there be a corresponding interface statement? How does the method defined in the answer get invoked?
As I could not answer any of these, I also tried adding the method into my ViewController class. Whilst this was accepted with no errors, it had no effect on my app, ie. the keyboard did not come up automatically.
I would also want the webview to resize to appear above the keyboard and not to scroll to where the text field is as this seems a very messy solution to me.
All help very gratefully received.
I have now managed to get the keyboard displayed by adding
[self allowDisplayingKeyboardWithoutUserAction];
to viewDidLoad
I kept the allowDisplayingKeyboardWithoutUserAction method declaration inside my ViewController but changed the + infront of the method declaration to a - and this seems to have worked.
I still do not know how to resize the webview when the keyboard is displayed.

Error on TextView with detection phone number IOS 9

I'm testing my app on an iPod Touch running iOS 9 (on iOS 8.4 it was working for other functions: FaceTime, copy to contacts, etc.). I have a textview with phone number detection and I receive the following error:
Warning: Attempt to present <_UIRotatingAlertController: 0x16250e00> on whose view is not in the window hierarchy!
Assertion failure in -[UITextView startInteractionWithLinkAtPoint:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3505.16/UITextView_LinkInteraction.m:377
Any fix to this?
Not a perfect solution but very simple and may help a desperate developer:
- (BOOL)textView:(UITextView *)textView shouldInteractWithURL:(NSURL *)URL inRange:(NSRange)characterRange {
[[UIApplication sharedApplication] openURL:URL];
return NO;
}
You will lose the Copy, Open URL, Cancel popover on long press but you SHOULD at least be able to open url same as you would previously. In iOS 9, this still opens a browser window inside your app for standard URLs (which is nice).
This seems like an Apple bug (posted to radar already).
We were seeing very similar error when trying to open links in a modal view since Apple is trying to display a new modal alert view. Outside of modal view data detection worked just fine in iOS 9 for us.
This looks quite similar to a bug we recently had to fix for PSPDFKit where presenting sheets did not work when the rootViewController was already presenting another controller. (Is your rootViewController maybe not set?)
You can read the source code here. This might help you to figure out where the issue is for you:
https://gist.github.com/steipete/b00fc02aa9f1c66c11d0f996b1ba1265
And please dupe rdar://26295020 so this will get hopefully fixed in time for iOS 10. (The bug exists since iOS 8 and was first reported on iOS 8b5.)

Deleting splash screen gets strange error VS 2013

I had a project with a splash screen. It was giving me trouble so I removed my application framework.
I.e. I did:
-Created a module to be the sub main
-In module create new() splash screen instance and main window instance to run application
-Went to project properties and disabled application framework
This worked without a problem. So I wanted to change my splash screen image, so I replaced the background image. When I did that I got this error:
"Two output file names resolved to the same output file path \obj\debug\.ACFSplashscreen.resources"
Which was weird. So I deleted that splash screen class, and decided to start clean. I still have that error. So I went into my file system and deleted that resources file. Now I have a new error saying it's unable to open it!
How can I find out what is looking for that file and fix it? Nothing in my code calls it anymore.
So as to have an "answer to your question";
Sometimes, if you delete a resource, it requires a simple clean of your project, followed by a build. This has been explained below:
From Microsoft
delete any intermediate and output files. With only the project and
component files left, new instances of the intermediate and output
files can then be built.
Hence, allowing you to 'fix' your error.

Adding UIWebView to second (not first) Storyboard view controller

Getting started with xCode 4.6.3 and I'm running into a hiccup.
I've built a simple app using the UIWebView to display a local HTML file and it's contents. I used that to debug any issues with the HTML and/or image displays and I'm all set.
Now I need to recreate that within a larger project I've built with storyboards for all my navigations between multiple view controllers. My issue comes when I'm trying to control-click drag from the WebView into the ViewController.h code below the #interface like many tutorials show, and that worked fine within my smaller single view controller app. It won't do it. I know I'm missing something obvious here. Am I going to have the set up these screens (I have multiple ones to do this same way) as separate xib files and add them into my main project?
Thanks for any help and clarification.
-Chris
You can create a class called for example myWebViewController and in Interface builder add a UIWebView to it. The control+drag to the header file will work.
Every time you want a UIViewController that has a browser in it, define its class as myWebViewController in Interface Builder.
Try not to repeat code. If you see UIViewControllers or any other UIView...that do the same thing, you can group them into a class that you use over and over.

Error opening nib in xcode: Error updating Objective-C type information. Multiple types...registered with the same Objective-C name: AppDelegate

Just getting started with xamarin studio and iOS development... I'm trying to set up my development projects. When setting all this up, I had initially created a project called 'MyProject.iOS'. I later decided that I didn't want the 'p' in MyProject to be capitalized. I deleted the existing project (using finder), removed it from my existing solution, and created a new one named 'Myproject.iOS'.
Now, when I try to open the Myproject_iOSViewController.xib file to edit in xCode, I get the following error:
Error updating Objective-C type information. Multiple types (MyProject.iOS.AppDelegate and Myproject.iOS.AppDelegate) registered with the same Objective-C name: AppDelegate
Seems like something is stuck in xCode from my original project that had the same name w/ different casing. I looked in Finder and confirmed that all the old files are gone.
I believe I am experiencing the same issue that was reported here (not sure why this issue is marked as resolved): https://bugzilla.xamarin.com/show_bug.cgi?id=7550
The last commenter has a great repo and reports this solution that worked for him:
1. Close XS
2. Delete ~/Library/Caches/XamarinStudio-4.0 folder
3. Open XS : voilĂ  everything works again now !
My issue at this point is that I cannot find the ~/Library/Caches/XamarinStudio-4.0 to delete. I found a ~Library/Caches/ folder but it did not have a XamarinStudio-4.0 sub-folder in there. How can I resolve this?
I am using 4.0.9 (Build 12) of Xamarin studio.
Here is the full stack trace from the error message box that shows up when I double click the xib file:
System.ArgumentException: Multiple types (MyProject.iOS.AppDelegate and Myproject.iOS.AppDelegate) registered with the same Objective-C name: AppDelegate
at MonoDevelop.MacDev.ObjCIntegration.NSObjectProjectInfo.Update () [0x00118] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.9-branch/f9c5c24e/source/md-addins/MonoDevelop.MacDev/MonoDevelop.MacDev/ObjCIntegration/NSObjectProjectInfo.cs:98
at MonoDevelop.MacDev.ObjCIntegration.NSObjectProjectInfo.Update (Boolean force) [0x0000c] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.9-branch/f9c5c24e/source/md-addins/MonoDevelop.MacDev/MonoDevelop.MacDev/ObjCIntegration/NSObjectProjectInfo.cs:72
at MonoDevelop.MacDev.XcodeSyncing.XcodeProjectTracker.UpdateTypes (IProgressMonitor monitor) [0x0003c] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.9-branch/f9c5c24e/source/md-addins/MonoDevelop.MacDev/MonoDevelop.MacDev/XcodeSyncing/XcodeProjectTracker.cs:476
I just had this problem. I used that post to solve it. At first I could not find the folder that is referenced. This is how I found it.
Go into finder on the Mac.
Under Favorites on the left of the screen, select the primary volume. For me that was labeled Macintosh HD.
Select Go/Go to Folder from the toolbar.
In the Go to the Folder screen that pops up type in ~/Library.
From there you can navigate to the proper directory and delete it.
Hope that helps. Best of luck.

Resources