Linguistic schemes got removed from old devices - ios

I'm using NSLinguisticTagger for my application and it was working fine across all devices with iOS 11 and above. Recently, the 2 older devices (6s and iPad mini) stopped recognizing the tags, only returned "Other" tag.
On a different thread, someone said that "Somehow my phone felt I "didn't need" all the schemes and got rid of them one day. I uninstalled English then added it again and now it works". So I tried it and it worked on both devices. (I just switched from English U.K to English U.S) but I don't think that the chosen language itself matters.
I can't reproduce the issue anymore since it's fixed, but really want to know WHY that solution fixed that??

Related

Trouble compiling for iOS 11.1 with Xamarin (Visual Studio)

There is not much of a point in posting actual code here, because we're talking about 7 different apps.
All of these apps have been up on the Apple Store and running fine. Until the new iOS 11.1 came out. Now I am being forced to update all of those apps, and rearrange the screen to allow for the new layout of the iPhone X.
Now all of this seems mostly reasonable, if not ridiculous for them changing their own design standard. But the real problem is that I went through all of that. Upgraded Xamarin (Visual Studio), and packages, and Xcode, and the Simulators, AND my Mac system. Everything is up to speed. The apps compile and test fine on any simulator I install them on.
The only change to the code is moving stuff around on the screen. Well, that, and I now need to drop support for anything i386. It all has to be x86_64 now.
From what I can tell, that is a difference from 32-bit to 64-bit. And that change is a dropdown menu choice in the Project Options. In any case, there is no indication at all that there is anything wrong with these apps at all.
So with all of this, I submit my apps for approval, and every single one of them gets rejected because "The app crashes on startup." And they kindly attach a log file showing what went wrong.
Now, I know I can simply scour those logs, for all 7 apps... The log files need to be fed into some other program that can decipher them, because they are not human-readable. Which is just annoying...
What I'm hoping is that someone can save me some trouble and explain what they changed in their systems that is not being caught by the compilers or the simulators.
Any help would be hot.
I am posting my own answer because I have not seen one anywhere that addresses what I have found to have worked. So I am providing this information for the next small developer, like myself, can get some useful answers to questions where Apple and Xamarin are simply NO HELP at all.
Xamarin does provide a page that essentially says, "get your app ready for iOS 11." The most useful part of this is where it shows you how to remove any linkage to anything 32-bit.
Architecture changes
This is mostly helpful. And I thought that once that was done, I'd be all set. There are 2 other things they completely fail to mention:
- You must set your target device to 11.1. You cannot have it set for 9.0. That will make the app crash on an 11.1 system.
- You must make a change in the manual code editing (source) section of the info.plst file. Why this is not done automatically, I cannot say. You must add an entry to the "Required Device Capabilities" section for "arm64". You also must remove the one for arm7.
Failure to do these two things, even after making their suggested changes will cause the app to crash on iOS 11.1 devices.
If you think I'm having a bit of an attitude problem about this, yes, I am. And I will not apologize for it.
It is absurd for Apple to change their design specs, give us very little time to make changes, and then not provide the absolutely essential information to actually make the changes. I blame Xamarin too. For the exact same reasons.
It is also absurd to totally deprecate all the testing devices I have, and then ask, "why don't you test on an actual device?" Because I cannot afford a new $1000 phone for the sake of testing apps that barely make me any money anyway. That's why.
And people wonder why I think it's a pain in the bum to develop for iOS devices.
1) Some of the frameworks that your app use may use libraries, that does not work correctly on iPhone. The reason for that is that when you compile your project on the simulator, is still compile it for a PC architecture, not a mobile one. And if there are any differences, only a real device could tell you about them.
2) I would suggest you to use this method to symbolicate crash reports from Apple. That at least should give you some clue. In summary, what you need to do is after you compile your app, you need to save a few files (.dSYM and .ipa) Then when apple send you back a report, you would be able to symbolicate it into human readable. You can find more info on how to do it here: https://developer.xamarin.com/guides/ios/troubleshooting/questions/symbolicate-ios-crash/

Why is Remote Debugging for Safari Mobile so inconsistent?

I've been developing JavaScript for many years with OSX and Mobile Safari, and I've noticed Remote Debugging has ALWAYS been extremely inconsistent.
Currently, I am running Safari 10.0 on El Capitan 10.11.6, and iOS 10.0.2 (the latest), and I'm not getting it to work AT ALL. I actually hadn't attempted to use this feature for several months before recently, so not sure if maybe the feature is just completely broken now.
In the past, if you quit Safari Mobile, and quit Safari (desktop) both, then started them back up, sometimes it would begin working, and then sometimes continue to not work (shows "No Inspectable Applications", or device doesn't show in menu). I am NOT changing any settings between these steps, and I know they are what they should be according to documentation, and tips I've read.
Develop menu is on. Web Inspector is enabled. Fraudulent Website Warnings is off (someone suggested this has something to do with it). iOS is open, and on a web page.
I know other people who've encountered this exact problem again and again. It seems that it is clearly a bug that Apple needs to resolve. I know how to use weinre, and this is a great workaround; however, it is highly irritating to waste my time trying to get this to work several (many) times, and then have to give up, and go set up weinre every time (it happens a lot).
So! I've read through several StackOverflow topics on this (can't find them ATM), but none of them that I've seen specifically address the spottiness of this issue, or how to solve it once and for all.

AVSpeechSynthesizer voices on iOS 8

Is anyone else unable to use the AVSpeechSynthesizer with a voice other than "en-US"? The array that gets returned when I call AVSpeechSynthesisVoice speechVoices still returns the complete list that can be seen in iOS 7, but none of them actually work.
I tried looking through the known issues on the iOS 8 release notes, but didn't see anything about this. Hopefully this is something that will be fixed in the full version, as I have a couple apps that make use of multiple voices.
IMHO, this is a bug in iOS8, even for GM.
I was playing with this project: https://github.com/mattt/AVSpeechSynthesizer-Example
My findings are:
1) iOS 8 did not speak in any simulator (XCode 6GM, XCode 6.1b2). It did speak only on real device.
2 ) iOS 8 did speak in language of phone (Russian in my case) and English (en-US). When i did change Language of a phone to german, i can hear German and English TTS. Adding German as one of languages in preffered language list did not help, you should set language as phone language. For unknow reasons Russian did work even if it was not phone language, but not same for German - it was working only if it was set as a phone language. Maybe real location matters (I am in Russia). For sure: iOS8 did "optimize" TTS engines some way, so not all of them are ok to use.
3) some folks noticed another bug in iOS 8: first attempt to use AVSpeechSynthesizer produces silence. See workaround here.
This problem appears to have been fixed in iOS 8.1.

CocoonJS for iPhone (NOT iPad)

I've already spent two weeks trying to figure this out, and I'm unable to get it working... I made an HTML + Javascript game intended to work on both Android and iOS devices, so I used Ludei's CocoonJS (https://www.ludei.com/cocoonjs/) to compile the project and generate two projects: one for Android and one for iOS.
I've already successfully uploaded the Android project, which is available at the PlayStore and works well on different devices, but I'm heaving REALLY trouble with the iOS one. The problem is that, somehow, when I upload the project using XCode, it is understood as being a universal application, though it is only intended for iPhone devices. Due to this, Apple keeps rejecting it, as the game's screen doesn't adapts to the iPad screens.
As I don't want the game to fit iPads, the "only" thing I have to do is to upload the game specifying that it only is intended for iPhone devices... But such a trivial thing begins to seem impossible after days and days of fails.
What I've tried doing:
CocoonJS doesn't let you specify a device family, so it seems that the XCode project it compiles is intended to be universal. However, before uploading the app via XCode, you can change its "Build" attributes.
I've ensured one time and another that every option within the "Build" and the "Info" list points only at iPhone devices with iOS 7 (and not iPads nor universal).
I've tried creating multiple projects on iTunes Connect to ensure that the whole process doesn't get messed with a previous universal binary or some other bizarre things.
I'm only uploading screenshots for the 3.5 and 4 inches screens (iPhone 4 and iPhone 5).
What I'm ALWAYS getting:
An issue just when the project finsihes uploading saying that a localized screenshot is missing... I've searched over the net and it seems that this message may refer to various things, among them the fact that a supported device has no screenshot... Guess which one: iPad, I suppose!
The scariest part of everything is that when I open the details of the binary uploaded to iTunes Connect it shows a line:
Device family: iPhone / iPod, iPad
What the...!? What's the iPad doing here? I've tried almost everything and I'm not even to solve this... Maybe I'm missing something on the XCode "archiving" process, or I'm missing something on the iTunes project creation process... or maybe I'm missing something relating CocoonJS... I just don't know what else to do!
Anyone found something similar or can guess what can be happening?
Thanks in advance for your time and effort! :)
I faced the same issue recently while uploading a game created with CocoonJS. The problem is that CocoonJS uses the info.plist for most of the settings and configurations. So, while looking into the plist, I found the issue.
There's an entry in the plist called UIDeviceFamily which overwrites the device selection in build settings. It's an array containing two values, 1 and 2. 1 denotes iPhone and iPod while 2 denotes iPad. So just delete the second entry (2) from this array and you should be good to go. You can read more about it here.

JQM/Phonegap native app stuck at splash screen when run on Iphone simulator from xcode

This guy seems to have a similar problem, except mine doesn't work at all, not just on the first try. Today I installed xcode 4.2/ios simulator 5.0 hoping that would fix the problem, but it hasn't helped. The app has consistently run on actual devices, but all the developers who own Iphones are out of the office today and the company ipod is in use elsewhere.
I've tried closing both xcode and the ios simulator, changing between 5.0 and 4.3, changing between regular iphone and iphone retina, trying with simulator running first and trying with simulator closed first. It just sits there on the loading screen. As far as I know the simulator has never worked, I'm not the one who setup xcode or any of the devices (he doesnt work on Mondays and didn't know how to fix it on Friday anyway). Any help would be appreciated.
Turns out adding "localHosts" to ExternalHosts fixed the Simulator, but the simulator doesn't like the ajax call to our services site, so it still isn't working, but now at least we have an acceptable reason for it. (Devices work correctly, so it isn't that big of a deal) Hope this helps someone.
If anyone can think of a way for the simulator to work with the reference to external calls I'll transfer the answer to their answer :P.
Like Luke said in a comment to you: just use JSONP.
It's not the simulator's fault, that's just how browsers work. They don't allow cross-domain ajax requests. That's why there is a solution to this problem, namely JSONP. In essence, the response must be a regular JSON object that is enclosed in a function call, something like callback_function({json: 'object'}).

Resources