Localizing Xib brings strange troubles - objective-c

I have an app (iPhone) with 2 Xibs that I would like to localize, but only for one Nib that has some labels to translate directly in IB. This seemed really easy until I built.
-1) The simulator suddenly did not load any of my backgrounds (UIImageViews, the same for both xib's, and programmatically modified at runtime). I did NOT change anything around this! tried delete/clean/add again, nothing changed. (debugger says it could not load the image referenced from a nib, though i changed no references an as i will say, it works on the real device)
-2) Simulator crashes (every time) and sends a report to Apple as I try to relaunch the app after modifying languages in the settings panel. As I re-build, the app runs again, the correct xibs are loaded. [edit: this happens no more if I stop tasks in Xcode, so is probably not really a bug]
-3) In the device, no crash, images are OK on background, but the english xib is loaded only.
I just can't make my way through this inconsistent behavior. Bumping my head on the wall did not solve the problem...

Tired of not finding any solution. It has to be an Xcode bug. I copied my code and recreated the app in a new project. Everything works fine but nothing changed in the content, not even a single space!
Thxs for those who took the time.

Related

UICollectionView and SDWebImage, crash when scrolling through lot of images

We have an app built on the iOS 10 SDK. It is presenting images in a UICollectionView and the images are loaded using the SDWebImage framework. It works well, but users have reported that the app suddenly crashes from time to time when scrolling back and forward through the images in the UICollectionView.
We have at last been able to reproduce the error on an iPhone 6 device with the mobile data connection slowed down to 3G.
What happens:
While scrolling quickly up and down through the images, quicker than they can be loaded from the server, suddenly the app crashes back to the iOS desktop. This could happen quickly, after a while, or sometimes it does not happen at all - very inconsistent.
What we have done so far:
Used instruments to check for leaks, the memory consumption is stable and lies constantly around 200Mb.
There are no calls to didReceiveMemoryWarning
We use CrashLytics to detect crashes and exceptions, nothing is logged.
The console or the debugger does not indicate any errors and no exceptions, Xcode just reports that it lost the connection to the phone when the app crashes.
Could anyone suggest an approach for further troubleshooting to nail this?
Stefan
I had a similar issue with SDWebImage. For me, it was because I let SDWebImage keep loading too many images at once. After adding
- (void)prepareForReuse
{
[self.imageView sd_cancelCurrentImageLoad];
}
the issue disappeared.

WatchKit crash due to accepted event even if not everything is loaded

I have made an extension with a storyboard and some table view. In the simulator all is running ok, but when I try the app on Apple Watch I have some troubles. Since the Apple Watch is slower than the simulator it takes about one second to display the table views. During this time in the place of the table view is displayed nothing. If the user press the empty area that will be filled by the table view, as soon as the table view become visible it will be processed the event associated to the table view. I do not know why but this causes the app crash!!! I think everything would be solved if I do like in the other applications on my Apple Watch that while loading the view shows the rotating circle and not the elements of the view that are already in the storyboard (like buttons and labels) added at compile time.
I have to say that maybe the crashed are due to an use of NSTimer that modify some variables modified by the app, maybe I should use a mutex. But I do not figure how in the Apple Watch the application crashes (or it appears the rotating circle and keep rotating) but in the simulator is ALL OK. What can I do? Do you need additional information? Thanks!

UI in in IOS simulator doesn't show

I have a question I am trying to create a database from a tutorial that I have posted on here. The problem that I keep having is that when I build the project the project is built successfully. However when the IOS simulator pulls up to show me the UI I have a black screen. I have doubled checked that my connections to my storyboards are correct. and still my UI still not displaying. I have made sure that I had my sqlite library connected within the project and it is. This is a single view application for an IPAD. I have searched ways of finding issues within my code and I have done breakpoints to see where my application breaks. and This is what I have found.
this is where my application breaks because is the first screen that it pops after I have started the IOS simulator. I do not know how to fix this.
this screen basically tells me that there is something wrong with the UIwindow alloc. For some reason is breaking here and I do not know why.
This last screen shot is not that great to interpret especially if its in numbers.
Please help. I will be posting more screen shots if needed at this point I need all the help that I can get. I did not think that it would be difficult to create and link a db.
If you are using storyboards you need to remove all the code in didFinishLaunchingWithOptions and just return YES. Also set your main storyboard file appropriately in the plist file.

cocos2d mac application how to add splash screen when launching (Default.png)

i am migrating my iOS app onto mac. the loading time is a bit long (around 5 seconds) thus i need a splash loading screen (Just like Default.png image for iOS) but the project made from cocos2d template just shows a white screen. not sure about other apps. so is there anyway to set it?
I know that the screen size is not fixed on a mac app. but i have set a default size. and use auto scale in case of full screen mode.
EDIT:
I have tried a light weight loading scene as well but failed since the MainScene itself is light weight as well. I think the major loading time is due to the cocos2d environment set up.
In OS X a window appears when the application launches, it's not designed to use splash screens.You might want to reconsider that choice.
But if the window is still to slow to load or to display its contents, you can still do that but manually, it isn't easy like in iOS.You need to display another view inside the window until it loads.
EDIT
A little more of context: for example you can set in your xib file an image view containing the image do display.
Then you make start another thread that loads all the content that you need.After this, run a selector on the main thread that updates the window.
Based on my tests in Cocos2d 1.0.1 & 2.0 the basic Cocos2d OS X app launches really quickly.
This makes it seem pretty likely that it's something about your first scene that is taking a long time to load, or something else. Instruments can help you gather information about what your app is doing.
I suggest you make an initial lightweight cocos2d scene that will load quickly at startup and then load your second scene and transition to it. Ideally the loading of the assets for your second scene would be asynchronous (at least the ones that are slow). There are numerous blog posts on how to do this. (search for "cocos2d asynchronous loading" and you'll find many, such as this one: How to preload your game assets in a loading scene, though something more recent might be preferable).

Black screen when loading iPad Storyboard.

So I am working on an app https://github.com/Kronusdark/PerlinNoiseKit and I had a (crappy) iPhone UI going, but I decided to make it run on my iPad. The problem is that when it loads the iPad storyboard, I get a black screen. I have checked my project summary and it is pointing to the correct storyboard file. The outlets all appear to be set correctly, and it will actually run code in my viewController on my iPad. I just get no UI. I have pushed my most recent changes to my repo if anyone wants to try to run it, any advice would be helpful.
Eureka! It turns out one of my sub-views were not working properly. After I removed the offending view my storyboard loaded no problem. I believe it was due to a rogue drawRect:.