Why does my iOS app show it needs "Local Network" permission? - ios

In the iOS Settings app, my app has a list of permissions it needs. It also has one that it doesn't - Local Network.
I disabled that and it runs fine, so I know it really doesn't need it (besides the fact that I never use it).
So how did iOS get the idea that my app needs it?
(The app is built with Xamarin.iOS if that makes a difference.)

With no related change to the project, that disappeared.
I assume it was something in Xamarin.iOS and was removed with some update.
So if you're facing the same issue, perhaps the latest update might help you.

Assuming that you know your code and that there is nothing relevant there, then you have used some package that causes this. There is no third possibility.

Related

How to let iOS/macOS update our app while its NetworkExtension is running?

We have an app that registers and runs a NetworkExtension (specifically NEPacketTunnelProvider) on both iOS and macOS. This works fine (although not in the iOS simulator, of course, known limitation). However, when the network extension is running, the App Store on macOS/iOS, and TestFlight on iOS, fail to update the app. It looks like they're waiting for the NetworkExtension to terminate, but not actually asking the VPN to disconnect.
We don't want our users to have to think about killing our VPN (which should stay connected whenever possible), but we don't want them to have to think about updates either - they should happen automatically.
Are we missing something? Is there an event we should be listening on to detect that the store is trying to install an app update? Conditions when we should arrange for the VPN to terminate, safe in the knowledge that it will be restarted again after being updated?
Apple had bugs regarding this issue. It was supposed to be ok since iOS 11 (and macOS 10.13 or 10.14), but then users reported that the problem still exists. Several bugs regarding this are still probably open at Apple's bugs reports, but we can't check their status.
You can ask again at their forum, and open another bug regarding this issue.
Probably there's nothing else you can do.
Those are only some of the reports related to this issue:
https://forums.developer.apple.com/message/174708#174708
https://forums.developer.apple.com/thread/92603
https://forums.developer.apple.com/thread/126471
https://forums.developer.apple.com/message/149563#149563
https://forums.developer.apple.com/message/183927#183927
Edit: Someone just posted a question regarding this at Apple's forum. It might be you who posted to question, but maybe it's someone else, so there's another reference:
https://forums.developer.apple.com/thread/128894

IOS 12 Unwanted communication Reporting Extension Working on Phone but not on Messages app

I have been trying to make the new iOS extension Unwanted Communication Reporting work. Currently I couldn't find any good walk-through tutorial or code-sample to make it work. Above that by just firing up a new project with this extension and building it shows me the option of reporting in the Phone App but not on the Messages app, Moreover, the option to enable it only appears in phone app but it says "sms/phone" so I think this should work for both of them.
I know its in beta right now but just want to know if anyone had any luck with it. Also, There is no code to share as its just the boiler plate that comes with the new project.
This might have been a personal issue. I reset the whole phone and now I can see the options to report message. Apple might have fixed it in their latest iOS build or it might have just been my device issue.
Apple's developer site specifies ”SMS and call spam reporting," which is an app extension that you will have the option of turning on or off.
You may enable an Unwanted Communication extension in the Settings app. I am not sure if Apple will utilize this but i know for android - screen turns red when such spam calls come in, also caller id notes that but currently apple seems to have found a middle ground.
The following worked for me, you can try:
Remove command definition for this in Plist file.
Delete the Target in project (you can delete code folder).

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/

iPhone App Close immediately after launching

I have an iPhone app and working fine . But some of(2 or 3) my customers arises a complaint that they are having issue opening the app in the iPhone . They have installed the app and when open the app it just closes out right away. Also tried restarting phone but it still does this.Also tried to delete the app and then reinstall it but this still happens.
Is this any thing i can do in my app to prevent this ? Or how they can solve this problem ?
Is there any more information you could give regarding the nature of the crash? Have you recreated this scenario in Xcode and gotten an error message?
The best I can think to tell you is to look in the app delegate. That is where your app looks first, so there is some kind of uncaught error happening.
Maybe the app is trying to use some piece of data right at launch and it's not there. Maybe you are trying to use something before it is initialized.
Is your app using any 3rd party frameworks right at launch? If so, maybe something changed with the library.
If it is happening on some iPhones and not others, perhaps you are using some framework or function that is not compatible with an older version of iOS.
Perhaps there is something in common among the kind of devices the app crashes on.
Another thought, does your app ask for any permissions? Such as using the user's location. If it does, and there is a spot in your code where you assume you have permission and you don't perhaps that could cause a crash.
Hope this helps.
P.S. just read the comments to your question. They have some good advice. I would try what they are suggesting.

Is it possible to "Debug View Hierarchy" in Xcode for an app extension?

I'm trying to debug the view hierarchy in an app extension, but I don't get anything useful.
Are there any limitations to using this feature with extensions?
If not, what could I possibly be doing wrong?
I have the feeling there might be since the app is actually running inside a third party's UI. Would this be to keep people from "looking inside someone else's app"?
No, it seems not possible at this time. On Xcode8 iOS10, it shows nothing for keyboard extension.
An alternative choice is Reveal. On latest version, it supports App Extension. Actually it is what I am using right now.

Resources