I have been trying to push my app to Apple store.. But they keep rejecting saying my app is not compatible with ipv6, main code that is causing the issue are this:
connectivity.getConnectionType() === connectivity.connectionType.wifi
connectivity.getConnectionType() === connectivity.connectionType.mobile
Somehow for Apple these lines always return false, even if the Internet is on, wifi or mobile.. Looks like it is never able to detect the device is connected to the Internet.. And according with their response it's because the app is not compatible with IPV6
Hey @Milewski can you share the detailed logs that you are receiving from Apple when the app is rejected.
Is it possible you're using the Spotify plugin? This is not going to work at the moment because of this issue
this is the list of plugins i am using
"dependencies": {
"nativescript-dialog": "0.0.7",
"nativescript-geolocation": "^0.0.9",
"nativescript-loading-indicator": "^2.0.1",
"nativescript-local-notifications": "^1.0.2",
"nativescript-push-notifications": "^0.0.15",
"tns-core-modules": "^2.0.1",
},
Apple
Please run your app on a device to identify the issue(s), then revise and resubmit your app for review.
Apps are reviewed on an IPv6 network. Please ensure that your app supports IPv6 networks, as IPv6 compatibility is required.
For additional information about supporting IPv6 Networks, please refer to Supporting IPv6 DNS64/NAT64 Networks and Supporting IPv6-only Networks.
For a networking overview, see About Networking.
If we misunderstood the intended behavior of your app, please reply to this message in Resolution Center to provide information on how these features were intended to work.
For new apps, uninstall all previous versions of your app from a device, then install and follow the steps to reproduce the issue(s). For updates, install the new version as an update to the previous version, then follow the steps to reproduce the issue(s).
Resources
If you have difficulty reproducing a reported issue, please try testing the workflow described in Technical Q&A QA1764: How to reproduce bugs reported against App Store submissions.
If you have code-level questions after utilizing the above resources, you may wish to consult with Apple Developer Technical Support. When the DTS engineer follows up with you, please be ready to provide:
The screenshot provided is at a stage right after the app booting that does the internet checking.. and for them(apple) it always returns they never have internet connection
@Milewski
At WWDC 2015 Apple announced the transition to IPv6-only network services in iOS 9. Starting June 1, 2016 all apps submitted to the App Store must support IPv6-only networking. Most apps will not require any changes because IPv6 is already supported by NSURLSession and CFNetwork APIs.
If your app uses IPv4-specific APIs or hard-coded IP addresses, you will need to make some changes.
More informatioin about this ca be found at the following links:
http://www.brianjcoleman.com/tutorial-how-to-test-your-app-for-ipv6-compatibility/
https://stackoverflow.com/questions/37693256/required-ipv6-compatibility-ios-app-rejected-by-apple?rq=1
@NickIliev @Milewski @jlooper
I believe the official documentation should be referenced as well Supporting IPv6 DNS64/NAT64 Networks.
The issue here may be that the Connectivity module is used but it cannot correctly verify the reachability of the target host. It seems that the app cannot determine the connectivity and continue onward. The cause of the rejection, however, is not clear, the above is the default text which is included in such cases.
Reading in depth the document from Apple's docs reveals that the recommendation is to use SCNetworkReachabilityCreateWithName instead of SCNetworkReachabilityCreateWithAddress. More information is available in the referenced article above - see Connect Without Preflight.
To be able to do so this requires the connectivity module of NS to accept the host name in the getConnectionType or expose other means to use this as per the Apple's recommendations.
@AntonDobrev any work around this issue? or is it possible to extend the this core native script module within my own files? since apple is recommending to use SCNetworkReachabilityCreateWithName instead will nativescript adopt this in further on releases?
@Milewski
I have tested your issue but still was not able to reproduce it!
I have created a base appluication and added all the plugins used in your package.json as follows
"tns-android": {
"version": "2.2.0"
},
"tns-ios": {
"version": "2.2.0"
}
},
"dependencies": {
"nativescript-dialog": "0.0.7",
"nativescript-geolocation": "^0.0.9",
"nativescript-loading-indicator": "^2.0.1",
"nativescript-local-notifications": "^1.0.2",
"nativescript-push-notifications": "^0.0.15",
"tns-core-modules": "2.1.0"
},
Also added the connectivity module in app.ts
import connectivity = require("connectivity");
var connectionType = connectivity.getConnectionType();
switch (connectionType) {
case connectivity.connectionType.none:
console.log("No connection");
break;
case connectivity.connectionType.wifi:
console.log("WiFi connection");
break;
case connectivity.connectionType.mobile:
console.log("Mobile connection");
break;
}
And I was able to get my connectivity type with no problems. If it's possible , maybe you can share with us a sample project that is reproducing this issue!?
p.p. connectivity module in NativeScipt is already using SCNetworkReachabilityCreateWithName
https://github.com/NativeScript/NativeScript/blob/master/tns-core-modules/connectivity/connectivity.ios.ts#L7
That's the thing.. I at my local development it works perfectly.. There were no issues at local dev.. The problem is that I have already resend the app two times to Apple and they keeps saying the same.. Also replied their issue saying it might be a mistake or something.. But they still asks me to review and resubmit.. Reason app not compatible with ipv6 network
@Milewski we have created and published a base application which uses connectivity module and it was accepted by Apple. So, what you can do at this point is the follwing:
@Milewski
I'd also suggest that you always test the app on IPv6 network before submitting to Apple, in this case, for compatibility and further for any regressions.
In this case you may need to check two things at first:
@NickIliev Nick, I examined the code and it appears that in the way the _getConnectionType()_ method is exposed and used, the check will always fall into SCNetworkReachabilityCreateWithAddress because no _host_ parameter as a string is provided, is this right?
@AntonDobrev @NickIliev
In my case, we have an app that it's like a web browser so at the very first I need to check if there is network available or not. So the app stops if no connectivity is detected.
Using the way @Milewski says to check connectivity, if no connectivity detected, the app shows a message with 2 options:
1) Close the app.
2) Try again. (recursively behaviour till connectivity detected)
In local dev it works fine and connectivity is detected over IPv6 but when pushing to apple they reject it because they say: app not compatible with ipv6 network..
Any idea around why this can be happening?
@edujugon, @Milewski we are currently working on local testing under IPv6 network and will get back to you as soon as we have resolution on that matter.
@Edujugon, @Milewski we tested the issue by publishing two applications that use our connectivity module to the app store. We got green light from Apple. Internally we use the same code as used in Apple Reachability example. According to its readme file, this code is ipv6 compatible. Note that Apple recommends avoiding preflighting network reachability, you should gracefully handle failures instead. Connect without preflight.
That is why we are still in the dark regarding this issue and we need more details about the way you are using the connectivity module.
@Milewski, @Edujugon, any update?
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.