App rejected due to an IPV6 Swift3 error. How do I fix it? - ios

A few days ago, Apple rejected my app, indicating that it didn't have IPV6 support, however I don't need that support since my app does not require internet access.
I asked the following:
Hi, my app does not need any internet connection yet.
So, why it's required to have support to IPV6?
They said:
Thank you for your response and for your question. In order to bring your app into compliance with Guideline 2.1 it would be appropriate for your app not to crash when logging in.
end
So, why do I need that Support?
If is necessarily, how do I can do it?
Please I need help

Test your app extensively and fix the crash. Enter wrong values, don't enter anything at all, intentionally try to break your app and get it to crash. Then you will find your error and you can fix.
EDIT BASED ON COMMENT BELOW
"My app don`t need conect with external database, because I got the information inside" - in this case, no, you do not need to add IPv6 support because you are not communicating with the internet for logging in purposes.
You can keep the login given it is only going to be 2 people using the app, just resolve the crash when logging in.
To test, enter a variety of incorrect passwords and usernames to ensure that there is no crash on incorrect entries, and confirm that correct entries do not crash the app.
Original Answer
Apple indicated that because there is a login feature, they think it is trying to communicate with an external database (ie a database that is not on the device). If there is no external database, just fix the crash is what they are asking.
Based on your question, you have eluded to the app not communicating externally for logging in. While some may find this odd, it is not uncommon. An example for those wondering would be a childrens app for iPad. The iPad might be shared amongst several children and as such each child might complete different sections or features of the app so an account local to the device is a good idea if there is no cloud support.
If there is external communication, you need to handle the case for no internet access. The question has been answered extensively, however this was the first result I found:
Detect Internet Connection and display UIAlertview Swift 3
Update: Why do I need to Support the case for no internet connection?
A use case:
John has just downloaded your app. He has just walked through the steps to create an account, but he has accidentally set his device to Aeroplane Mode.
John hits the "Create Now" button but nothing is happening. There is no error or success alert appearing, the screen has not changed, he can't see a loading icon. John is confused and getting frustrated because he's certain that he has completed everything in the form.
John doesn't understand that he needs internet connectivity to successfully submit a request to create an account. John decides to delete your app from his device and leaves a bad review.
John really could have used an alert saying "You need internet connection to sign up to this app. Please check you are connected and try again". This would have made John a whole lot happier and he probably would have continued to use your app with all of it's amazing features.
More information can be found in the guidelines that Apple mentioned, and further to this, the Apple Design Principles Guide is an invaluable resource.
I hope this makes sense.

Related

Is it possible to detect if any other certain app is Currently running or not in iOS?

Let say If I want to check if the facebook or any other application is currently running on device ?
The answer is simply "No", this is absolutely not possible in iOS.
(Note that you can easily "open" another app - it's just like opening a web link - but you can not "check if it is already open".)
Simply your answer is NO
The reason behind this, in case of iOS, every app is running like on own sandbox. So there is no connection between one sandbox to another.
Update 2:
Decided to use Code-Level Support.
Included with your paid membership are two Technical Support Incidents
(TSIs) for code-level support from Apple support engineers.
Reply from Apple:
Automatic Assessment Configuration limits what features of the system
are available while in a testing environment. It locks the device to a
single app. It does not provide oversight, such as identifying which
apps are running.
Classroom is an app targeting K-12 classrooms. It provides teacher
oversight of student activities during lessons, including viewing
student screens.
https://www.apple.com/education/k12/teaching-tools/
https://support.apple.com/guide/classroom/welcome/ipados
I'm not aware of any functionality associated with either of these
that provides for notification of apps running in the background.
While I cannot say how any given app is implementing apparent
functionality, I'm pretty confident in saying that the app you mention
earlier is not using either Automatic Assessment Configuration or
integrating with Classroom.
You may want to contact the developer of the app in question.
Of course, it's also possible your colleague misunderstood and the app
is not in fact doing any such reporting.
I would also encourage you to file feedback requesting such a feature.
Please submit your suggestion via Feedback Assistant
https://feedbackassistant.apple.com. For more information on
Feedback Assistant, please visit
https://developer.apple.com/bug-reporting/.
While you were initially charged a technical support incident for this
request, we have assigned a replacement incident back to your Apple
Developer Program account.
Perhaps my colleague mistook Android version of the app for iOS.
Update:
After reading some more about this it could be related to Automatic Assessment Configuration and AEAssessmentSession.
This allows an app to:
Enter single-app mode and prevent students from accessing specific
system features while taking an exam.
and
A session provides protections by preventing access to desktop
elements like:
...
Other apps, except those that you selectively allow
https://developer.apple.com/documentation/automaticassessmentconfiguration
https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_automatic-assessment-configuration
https://developer.apple.com/documentation/automaticassessmentconfiguration/aeassessmentsession
Sample code here:
https://developer.apple.com/documentation/automaticassessmentconfiguration/build_an_educational_assessment_app
Original:
I agree with #AnkurLahiry and #Fattie that it should not be possible due to sandbox environment. According to Apple Developer Forums it is not possible either:
https://developer.apple.com/forums/thread/48374
However a colleague took his hunting degree and they used an app for examination. This app could detect other apps running in the background. For example one person had Teams app running and the examinators could then tell that he had that exact app running on his phone. Not just installed but running in the background.
https://apps.apple.com/se/app/teoriprov-f%C3%B6r-j%C3%A4garexamen/id1548547811
He took the test 2022-04-29 and was using the app version 1.0.8.
I'm not an iOS developer but I have done some experiments with disabling or bypassing SSL Pinning/Certificate Pinning on Android. In this case developers often used checks in the native layer as well as the Java layer to make it difficult to bypass. My guess is that they use low-level access to detect if a process is running or not.
https://security.stackexchange.com/questions/149325/disable-or-bypass-ssl-pinning-certificate-pinning-on-android-6-0-1
https://developer.apple.com/documentation/objectivec
Unfortunately I don't have more information than that. Next step could be contacting them and see if they are willing to share how they did it.
You could also read up on examination apps and classroom:
https://apps.apple.com/us/app/classroom/id1085319084
For Android you can check it like this:
https://stackoverflow.com/a/22503513/3850405

Apple keeps rejecting app with AdMob because of bluetooth notification string not correct

Since IOS 13 came to live old 3 party APIs stopped working, In my app i needed to fix few because of that so i needed to fit it to IOS 13.
Since then Apple keeps rejecting my app because of Bluetooth user notification is not correct.
I just don't know what to write there, It is so annoying. I have to add it because of AdMobs and there is nowhere to say what to write over there.
I don't user BT in my app, it is just the AdMobs beacons that needs it probably.
I've tried:
and
And i will probably will have the same issue with the calendar message also.
When i try to remove it they demand it and then not approving it.... I understand maybe the first one but what wrong with the the second one? why is that no clear enough for them?
10x
see apple docs below: https://developer.apple.com/design/human-interface-guidelines/ios/app-architecture/requesting-permission/
Explain why your app needs the information. Provide custom text (known
as a purpose string or usage description string) for display in the
system's permission request alert, and include an example. Keep the
text short and specific, use sentence case, and be polite so people
don't feel pressured. There’s no need to include your app name—the
system already identifies your app. For developer guidance, see
Protecting the User's Privacy.
you're not explaining exactly why you need access to bluetooth. you must be specific. saying, "XYZ app needs access to bluetooth to interact with beacons to serve you location based advertisements"
something like that should do. no cutting corners, no trying to put it off on Google, just say it like it is and you'll likely pass through app approval without a problem.

How to detect if user has turned off mobile data for specific iOS App

I've come across a scenario where I need to know if the user has turned off mobile data for the app I'm developing so I can display a warning saying: "You have turned off mobile data, data will be synced when you connect to wifi". I wanted to be clear that I only need the information about my own app, not others the user has installed.
The problem is, i only have a narrow lead on where to start. I've come across a post saying this is possible, but not how. The answer talks about a "telephony class" which will enable some way of accessing the data about the settings for mobile data of your app. I'm guessing this is a native iOS class.
Link to the article on SO can be found here - link to post
My question is, which class, if there even is one in swift, has such an api, that I can get this information?
I'm new in swift and therefore know little of native classes and permissions.
I can provide more information if needed. This was all I could think of.
PS. I'm not looking for the Reachability class where I can detect WWAN / WIFI connection, unless this has some capabilities I'm not aware of.
Kind regards Chris

Issues with NSURL and iPhone SDK 3.0 for placing phone calls

There is a newly introduced issue with iPhone 3.0 SDK and how it deals with the NSURL method for automatically making phone calls. It used to be that you could call a method (NSURL), pass in a string with a URL prefix (tel://, sms, etc...) and the iPhone OS would dispatch the message to the device, such as iTunes, App Store, Phone, SMS, Mail, Safari, etc... The code goes something like this:
[openURL:[NSURL URLWithString:#"tel://8005551212"]];
When the method was called the phone call would be placed automatically. With the iPhone OS 3.0 when the method is called the app pops up a dialogue box asking for confirm the phone call. This breaks several existing apps as well as one that we just pushed into the App Store for review.
Can anyone think of a fix to this issue? I'm currently at a loss for what to do and trying to decide what other ways to handle this new wrench in the works.
I blogged about this and suggested that people contact Apple and make them aware of this issue. I also recommend a fix that a friend and I were thinking about - and that is to use the same "authorization" that location aware apps have; an app knows it's location aware and asks the user if it's okay to use their location.
Again, if anyone has a fix for this issue (and that is within the realm of the iPhone SDK as to not be rejected by Apple) please let me know; I would be greatly appreciative.
Update: Julian Romero Nieto has a good description of the bug and cites the (updated) Apple documentation and shows the issue at hand. You can read his posting to Oper Radar here.
I believe this is included as a security feature - imagine an app that called a 900 number at 3am every day for 10 minutes. If you compare it to the new 'In-App Purchase' API - it's much the same.
The location API comparison is a bad example - getting the users location is a privacy concern, not a financial one.
You can't fix this issue as this is what is intended - anything you do to "fix" the issue will result in an app that won't be approved.
The user experience is considered not to be good when an app can choose to dial a number without the user's consent. It would be possible for software to dial "premium" numbers that cost the user a lot of money without them realising.
This is standard across all mobile software platforms and OS - if it just changed in OS 3.0 then this shows that it must have been an issue that initially Apple thought they could get around. However I think that Mobile Operators will have put pressure on Apple to introduce this as often then end up having to refund the user - but will have already paid out the money to the "premium" number.
I am not sure if "premium" numbers exist in the US as much as they do in Europe and that maybe the reason this is hard to understand.
The RFC for tel:// says to NOT allow autodialing of numbers via the tel: scheme.
So they have to chose between RFC compliance and breaking these few apps.
I hope the chose to ignore the RFC, at least to allow apps to keep dialing if they allow it.
I question whether this is intentional on Apple's part to push users to purchase a new iPhone if they want voice dialing - this problem breaks all of the 3rd party voice dialing apps, making them unsafe and basically useless.
Let's keep up the pressure on Apple to make this a user-configurable setting.
Perhaps you meant newly introduced feature instead of issue?
I don't think you will get Apple to remove the confirmation popup, especially if it is RFC compliance.
Lemmy quote Joel (http://www.joelonsoftware.com/items/2009/06/10c.html) regarding broken apps:
A good platform always has
opportunities for applications that
aren’t just gap-fillers. These are the
kind of application that the vendor is
unlikely ever to consider a core
feature, usually because it’s vertical
— it’s not something everyone is going
to want. There is exactly zero chance
that Apple is ever going to add a
feature to the iPhone for dentists.
Zero.
I would not want some application to make calls, send sms or even connect to internet (living in a country where unlimited mobile data plans are still far in the future) without my consent.
Certainly operator's headache when customers complain about unknown calls on bills.

iPhone SDK Internet connection detection

I'm working on an iPhone application that makes a few calls to web services. I posted this application on the Apple store but it got rejected (and rightly so) since there was no error message displayed to the user if no Internet connection is available. Since obviously the application would not work without it.
So I just wanted to know how to best achieve this? I'm guessing something needs to go in the viewDidLoad method that will throw an alert box saying something like "You need an Internet connection to use this application".
Any ideas would be appreciated.
If your application must have network access the easiest way is to add the following settings to your info.plist as boolean values.
SBUsesNetwork - Ensure the device has an active connection (Edit: not applicable, this seems to be a private API someone found at some point. It is not in Apple's developer documentation.)
UIRequiresPersistentWiFi - Ensures the device is connected via WiFi
If your choice is not true then the user will be presented with an appropriate message when starting your application. Best of all this message is from the OS and thus is localized.
If your application cannot download data from a website while running (loss of signal, site down) you should still warn the user though and not just spin indefinitely.
Apple Developer Connection has a sample application (Reachability) that uses the System Configuration framework to determine network status. It will tell you whether you have a WiFi, EDGE/3G or no Internet connection.
You would use portions of this code in your application to determine network state, and then provide interface cues if no connection is available, such as a UIAlertView.
Cautionary word: beware SBUsesNetwork. I would personally love to know where SBUsesNetwork originally came from, because it's not mentioned anywhere in Apple's docs that I can find. When I add the key to my app's plist (as a boolean) and set to true, it doesn't seem to affect the behaviour of my app -- I get no warning about airplane mode, whether starting app completely afresh, or foregrounding a previous launch that was backgrounded.
My app has UIRequiresPersistentWifi set to true, which appears to also do the job people claim SBUsesNetwork does (plus other things!).
(I'm running iOS4.2.1 on an iPhone 4, XCode 3.2.5 64 bit).

Resources