navigationController pushViewController not working in iOS11 but works in iOS9.3 - ios11

The following piece of code works in iOS10 but not iOS11. Any idea why?
SiteSelectionViewController *sitesController;
sitesController = [[SiteSelectionViewController alloc] init];
[sitesController setConfData:self.confData];
[sitesController setConfInitData:self.confInitData];
[self.navigationController pushViewController:sitesController animated:YES];
[sitesController release];
I expect to see SiteSelectionViewController view to show but it didn't. I tried to change to "animated:NO" as some have suggested but it didn't work. Again the same code works in iOS 9.3 simulator. Thanks in advance.

Deleted the derived data folder, restarted XCODE and simulators and it started working all fine.
Seems to be a compiler / garbage issue. Restarting made all fine. Make sure to delete derive data and clean project to resolve this.

Related

Is there a more stable release of codename one than 6.5.1? or am I doing something wrong?

I am following the book I bought but then also found this pdf after which is way easier than reading on the kindle cloud reader for MAC.... https://www.codenameone.com/files/uber-book/Creating-an-Uber-Clone-In-7-Days-before-sketch.pdf
(I am using both books and haven't ran into any real differences that I saw yet). As I did the tutorial, it is definitely missing some code to get to this picture, but I just added a counter so each time the bottom left floating red + I add a different label. The action code from the tutorial therefore was modified to
private void addNewItem() {
String str;
if(counter == 0)
str = "First Item";
else if(counter == 1)
str = "Second Item";
else
str = "Third Item";
counter++;
TodoItem td = new TodoItem(str, false);
add(td);
revalidate();
td.edit();
}
What is very weird is every simulator seems screwed up in that they print First Item but then when clicking a second time, First Item is cleared. Here is a picture...
Is there a stable release to use where these simulators work? OR do others fine 6.5.1 is working just fine and perhaps my environment is somehow whacky. I have intellij version 2020.1.3. If anyone knows of a stable release combination, please let me know.
EDIT:
Here is a picture using eclipse and codenameone 6.0.0 with same exact code. It works fine in 6.0.0.
I tried downgrading in intellij but codenameone 6.5(not 6.5.1) is incompatible when I upload the plugin via zip with both intellij 2020.1 and 2020.1.2 and 2020.1.3 AND then I realized it says that. 6.5.1 claimed it was compatible with everything higher than 2016 which was weird so I suspect the issue is I need intellij 2019 actually even with 6.5.1. Perhaps that is the reason BUT not sure why the simulator would care and act very weird.
I don't understand how you reached that state. Did you finish the whole tutorial?
Just to be sure I placed the full code of that demo here: https://github.com/codenameone/TodoApp/ I think it should also be in the release source zip.
The above was missing java files for me so for anyone else, this is the begin of a todo app which is exactly what I needed to get me going.
https://github.com/deanhiller/codenameOneExamples

Backbone.Paginator : cannot read property 'requestPager' why?

I downloaded the Backbone.Paginator production version. I went through the example, copied and pasted everything exactly the way it appears, but I keep getting cannot read property 'requestPager'. What am I doing wrong? I already made the reference to the backbone.paginator.min.js, what else do I need to do?
Thanks
EDIT:
If I remove paginator, my application works fine. It displays data without any issue.
The problem was that I had referenced backbone.paginator after my collections. It's small things like these that I still have to get used to and be aware of.

Could not insert new outlet connection [duplicate]

This question already has answers here:
Xcode 4: Creating a UIView xib, not properly connecting
(33 answers)
Closed 9 years ago.
Could not insert new outlet connection: Could not find any information for the class and not showing any class named "ViewController"
Solutions I have done :
- Restarted XCode
- Restarted System
- Deleted the Deriveddata contents from /Library/developer/xcode
But nothing worked for me
Here is the screenshot for the error
I got the same problem as you today... I think this is a bug of Xcode, below is the way to fix the issue:
Close the project you are working on with.
Delete your project's【DerivedData】folder. (This folder may inside your project's folder, or inside ~/Library/Developer/Xcode/DerivedData/(your project)/ ) or somewhere else that was setup by you.
restart your project.
After these steps, the problem should be solved. And from my experience, these steps can solve many Xcode problems, so if you got some problem with Xcode again, try these steps first.
Removing(removing reference, not deleting) and then adding the appropriate file(the file of class you want to add the outlet to) is actually enough.
Edit 1 I found that after unchecking (in XCode 6.3.1) I had to wait a few seconds for the Indexing to appear and complete in the project name box. Same for the way backwards. This increased chances to fix the issue in almost all (but not all) cases.
Edit 2
Removing reference means that You do not delete the file completely but just remove it from the project (it still exist in the folder of your project, you add it later).
That's most often a problem of file indexing.
To fix it try to clean your target and if this doesn't work, go to your Derived Datafolder and delete your application there.
This will force xCode to reindex the files
Just got the same issue on Xcode 4.6.2.
Tried solutions presented in different answers/comments, but it still didn't work.
Then all I did was to just:
save all my work;
just quit Xcode & load it again;
then I was able to insert the new outlet connection successfully.
Hope this will save some time/frustration for somebody else.
Personally, I had the same problem: "could not insert new outlet connection" AND when I was starting typing something like "UI..." XCode wasn't doing anything.
I searched for answers, I tried several things... but it was just an unchecked box. When I was creating a new class, XCode unchecked the box linking the class to the project (I guess).
I can't post a screen shot because I don't have 10 reputations but when you create your class, XCode asks you where you want to save it. Down the finder window, you have 'Targets' and two boxes: 'YouProjectName' and 'YouProjectNameTests'. You should check the first one (at least).
Hope this will help. I saw different discussions about the subject.
I recently came across this problem. I soon realized that the cause had been my own doing. I had previously disabled XCode indexing (which used to take forever & eat up my RAM), using the below code in a terminal window:
defaults write com.apple.dt.XCode IDEIndexDisable 1
To revert XCode to its default state, i used the following line in a terminal window:
defaults write com.apple.dt.XCode IDEIndexDisable 0
Voila! All's well again..
If you've imported the Class into your Xcode Project you have to manually add the Class (.m file) to your 'Compile Sources'.
Select project icon > TARGETS > Build Phases > Compile Sources
Click the + button and add your *.m file.
Finally I did it by removing the xcode completely from my mac and reinstall the xocde.dmg file and then install MobileDevice.pkg and MobileDeviceDevelopment.pkg residing on /Applications/Xcode.app/Contents/Resources/Packages
make sure that your source have had been included in the "Build Phases" place.
This do fix my problem. But I think Xcode is still really buggy and annoying.

NSLocalization on xCode 4.5 and iOS 6

Is there any way to use Localizable.strings with NSLocalizedString(#"KEY", #"") in xCode 4.5 for iOS6 like in older iOS5?
Here is my sample code:
In Localizable.strings
"KEY" = "Hello World!";
In .m script
NSString *tempString = NSLocalizedString(#"KEY", NULL);
NSLog(#"My String is: %#", tempString);
The log for iOS5.1 is: "My String is: Hello World!"
The log for iOS6 is: "My String is: KEY"
...I'm really going to become crazy! Where is my error?
Thanks a lot!!!
Their is no need to create a new project and copy, just delete the localizable files, create it once again and you will be fine.
The localized strings in my current app still work in iO6. I typically just use NSLocalizedString(#"KEY", NULL); Are you sure yours is working properly for 5.1?
Look at answer for post: IOS String Localization stops working when adding additional localization
It works for me. Clean build + remove from simulator (or phone) fix the error.
The only solution I have found is:
restart with a new project from xCode template
enable Localization for at least 2 languages
drag inside all old files from corrupted project
copy the contend of old storyboards into new ones
do frequent snapshots just in case of necessity
I really don't know where was the problem, but now all works again well as usual.
Change the language settings of simulator.
I was missing a semi-colon at the end of a line in one of my string-files. The compiler didn't report it even when I cleaned the project at built it again. First after restarting XCode the error was reported and I could find it and fix it.

Receiving SIGABRT error when launching TTPhotoviewController in iPhone

Well I'm creating an iPhone application which contains some features like Cycle routes and a Photoviewer.
For these Cycle routes im useing the Cloudmade api, and for the PhotoViewer im useing Three20's TTPhotoviewcontroller.
These Cycle routes map works perfect but i think it has todo something with the errors im getting.
I will describe 2 cases down here about what I tried and what problem I received.
Case 1:
Compiling goes wrong and receiving following error:
duplicate symbol _aatan2 in /Users/wesleycoppens/Documents/MooiWest/libs/Proj4/Device/libProj4.a(aasincos.o) and /Users/wesleycoppens/Documents/MooiWest/libs/route-me/Device/libMapView.a(aasincos.o)
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
I am getting this error when i am trying to add to the Other linker flags the flag -all_load.
See the image below here how my Other linker flags currently look like.
see link for image:
Case 2:
Compiling goes fine, app runs in simulator perfectly but receiving SIGABRT with device.
In this case I removed the flag -all_load in my Other linker flags. Now I am not receiving any compiling error, but I'm receiving a SIGABRT when tapping the tablerow which links to the photoviewer app.
I aint sure if I do link correctly to the Photoviewer to, so here is the part where I push the other photoview.
PhotoTest2Controller *photoViewController = [[PhotoTest2Controller alloc] init];
[self.navigationController pushViewController:photoViewController animated:YES];
[photoViewController release];
Also here another screenshot of the linker flags how they are defined in this case:
see link for image:
finally I found a solution for this. Instead of using "-all_load" tag you can use "-force_load path_to_library/libXXX.a" in all the libraries you need except the one you get the duplicate error. It worked for me! Hope it helps.

Resources