NEHotspotConfiguration is a special Entitlement required? - ios

I'm hoping someone can answer a few questions I have, since Apple's documentation does not provide an answer. I'm simply just wanting to connect to a Wi-Fi and disconnect from my app using these methods from the NEHotspotConfigurationManager:
-applyConfiguration:
-removeConfigurationForSSID:
-getConfiguredSSIDsWithCompletionHandler:
-fetchCurrentWithCompletionHandler:
From this documentation, nothing mentions needing a special entitlement :https://developer.apple.com/documentation/networkextension/wi-fi_configuration?language=objc
-Can someone please tell me if I need one for using just those methods above?
-What 'Capabilities' do I need to add in Xcode for those items above and to add to my profile? Right now I have 'Access Wi-Fi Information' and 'Hotspot' but I'm unsure if I need Hotspot, since I'm not creating a VPN or my own hotspot, I'm just connecting to a specific Wi-Fi from the app. Half of the comments here say conflicting thing.
This article mentions the Capability
'Network Extension' but not sure if needed? NEHotspotConfiguration is not working in ios 11
I am only using this auto-connect feature so users do not have to go to settings to connect to a specific wifi to retrieve information and then bounce to settings again to disconnect in order to submit the information if that makes sense, just a smoother process.
Thank you!

After several responses from here, completely removing all Capabilities and manually adding them back in, and updating to the latest Xcode (13.3 from 13.2) the issue seems to be resolved. Accessing Wi-Fi and Hotspot Configuration do not need a special Entitlement requested from Apple, just a generic one directly in the app. Thank you!

Related

How to programmatically turn on/off WiFi in iOS? [Swift]

NOTE: I am aware that such a thing violates user's privacy and would be rejected by Apple. However, this specific component is purely for automated testing of buffering behavior when the user's connection is poor/nonexistent. It will NOT be publicly released.
With that said, does anyone know of a way to programmatically turn on/off WiFi in iOS?
I have not been able to find anything up-to-date. Pretty much every answer has to do with this being a violation of privacy and cautioning that they shouldn't do it. Doesn't apply in my case.
Closest I could find was using something like DeviceFarm to simulate it https://docs.aws.amazon.com/devicefarm/latest/developerguide/how-to-simulate-network-connections-and-conditions.html
However, in my case I want these tests to run entirely within the app (private test build). Setting up DeviceFarm for this purpose alone isn't worth it imo.
There is no provision provided by apple to change automate changing its settings because of apple's privacy rule. So you can't achieve by any way.
You can’t. Apple does not allow 3rd party apps to change global system settings like that.
There is no API available to control cellular data,wi-fi,bluetooth within in an app , User have to go to settings to enable or disable cellular data,wi-fi and bluetooth.
This is not possible in iOS unless you jailbroke your device. Apple is not allowing any apps developer to access wifi/bluetooth. You can only check wifi/tooth is connected or not.
You can’t do that using the iOS application. Apple not allowing it.
Legally there is no way to do it. Even somehow if you are manage to do it, Apple will reject your app while submitting to AppStore.

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).

MobileGestalt no access to InverseDeviceID

This happens with every app when I try to use OpenGLES on my iPhone7+ with iOS10.3. But it works without any problems on my iPhone7 iOS10.1.
This is the message I get:
libMobileGestalt MobileGestaltSupport.m:153: pid 304 (OpenGLES_Ch4_1) does not have sandbox access for ... and IS NOT appropriately entitled
libMobileGestalt MobileGestalt.c:549: no access to InverseDeviceID
Does anyone have an idea about these messages?
I wonder if it is bugs or something else in iOS10.3? Because when I run the app on iPhone5s iOS10.2, those messages did not shown on the screen. While I upgraded the phone to iOS10.3.1, the massages shown again.
The reason why I ask this question is that some animation effects perform quite stuck on my iPhone7+, but it is completely smooth on iPhone5s. But now it seems it is no relationship between the message above and the stuck, and I have to check my iPhone7+...
I had the same issue. It turns out to be multiple thread accessing the same OpenGLES related resource, EAGLContext to be specific. I guess it is possible that OpenGLES related codes are not thread-safe, and it behaves differently in different OS versions / iPhone 7 / 7+, sometimes it messes up the memory.
After making sure data accesses are synchronised across threads, the problem is gone.
For those of you who are maybe using Ionic and getting this error, please just make sure that in case you've cloned a new fresh copy of the project from your repository that you did both npm install and bower install.
I was missing bower install and this was torturing me for like two days, so hope this helps someone. Sad thing is that I'm by all means not a beginner with Ionic (top #3 answerer on SO) but was still able to miss this fact so I hope that in case someone else runs into this problem it will help you.
Google Map display and functionality works fine with this warning
Check my answer here:
https://stackoverflow.com/a/44970665/3378076
I can see where the setting up of a sandbox account might do the trick, but if the device you are using is also connected to your normal icloud account, you can't create a sandbox with the same AppleID.
You then have to log out of your existing icloud account, and log in with the new icloud (sandbox) useid. Which screws up your existing icloud device settings.
So you are unable to use your Developer ID, only your Sandbox ID.
This worked for me:
Create a new sandbox user in iTunesConnect. YES, you have to create a new iCloud user with a new email.
Log OUT your current iCloud user on your mac AND on the device you are testing on.
Log IN with your new iCloud user on your mac AND on the device you are testing on.
Run your app on your device again. This time it should work.
Hopefully Apple will come around and simplify this issue since this is a real pain in the ...
I had the same issue, and this point me in the right direction:
I've managed to solve the same problem for MKMapView. Apparently, that happens when your app's current permissions state doesn't correspond to entitled (declared in Info.plist) one. That effecively means that you need to call APIs to gather user's permissions explicitly and preemptively. (E.g. LocationManager.requestWhenInUseAuthorization before displaying a map with user location on it)
Source: rdar://problem/11744455
I had same issue. My rendering program was written to support 3 version of openglES(1, 2 and 3). On my case I was accidentally supplying EAGLRenderingAPI.openGLES1 or kEAGLRenderingAPIOpenGLES1 to my renderer class based on openGLES2.
I just had this issue when trying to use in-app-purchases.
Not sure if yours is the same issue, but I realised that you HAVE to create a Sandbox User in iTunes Connect, then log into iCloud on an iOS device with that user to enable the app to work.
I got this console warning message because of issues with multiple Apple Developer accounts. Evidently you cannot have a sandbox account with an existing Apple Developer account. I didn't try to create a sandbox account but it seems to check my default account, which is also an old Apple Developer account that I don't use and hence is no longer entitled. This issue has been reported to Apple many times by other people and I have not yet seen a solution.
My workaround to suppress this warning was to set the OS_ACTIVITY_MODE environment variable to disable in my scheme settings. You can click on the app name and then click Edit Scheme... or from the top menu you can click Product->Scheme->Edit Scheme... :
Then you edit the "Run" settings and add the environment variable OS_ACTIVITY_MODE and set it to disable:
NOTE: Be sure to set this environment variable to enable before you submit your app so that you can see if there are other warnings. There may be other warnings you should fix before you submit your app to the App Store.

app rejection due to IPv6 issue

I recently got an iOS app rejected due to lack of IPv6 compatibility.
After browsing the internet to investigate on the subject, I decided to view those two videos:
https://developer.apple.com/videos/play/wwdc2015/719/
https://developer.apple.com/videos/play/wwdc2016/714/
Now back to debugging the app, I am trying to follow what I can read here:
http://www.brianjcoleman.com/tutorial-how-to-test-your-app-for-ipv6-compatibility/
At one point in the document we can read:
14. Once sharing is active, you should see a green status light and a label that says Internet Sharing: On. In the Wi-Fi menu, you will also see a small, faint arrow pointing up, indicating that Internet Sharing is enabled. You now have an IPv6 NAT64 network and can connect to it from other devices in order to test your app.
This is where I hit a problem. In my case I can indeed see:
"a green status light and a label that says Internet Sharing: On"
But I do not see in the Wi-Fi menu:
"a small, faint arrow pointing up, indicating that Internet Sharing is enabled".
So my guess is that I must have either done something the wrong way or have a configuration not matching what is expected by this document.
I have also tried several choice for Share your connection from: but to no avail. In the same way, looking at my iPhone does not show any sign of new access point.
Any suggestion coming from an expert on the subject or someone with some experience would be very much appreciated.
I also recently encountered this issue when uploaded my previous apps to appstore.
The solution is used is - I recorded a video of app functioning while connected to ipv6 network i.e. connected to any mobile hotspot. You just need to record this video and upload it on internet(generally i use google drive) and make public link from it.
Then in itunes, prepare for submission link, there is a section called add notes. In this section, you need to tell apple that your app is functioning properly under ipv6 network and tell them to check you video link.
For sure, after doing these things as defined, Your app will be approved within 14 hours.
I now do these steps everytime i upload my new app.
Thanks

iCloud Entitlement to app?

So, I've registered for Apple's Developer program just yesterday and I've added my details in Xcode.
I'm just playing around with it and following this tutorial as a learning curve if you wish (as I haven't really played much with libraries like CloudKit, Location Manager and so on):
https://thinkster.io/swift-ios-app/#saving-our-data-using-cloudkit-enabling-cloud-kit-in-our-app
If you scroll a bit, you will see that it requires to sign in with your developer's account in order to activate iCloud.
That's cool, but I get 2 errors that I can't figure out how to solve (and where to solve it):
I'm new to this and I tried google-ing it (of course), but I couldn't figure out how to solve it.
Click Capabilities to view app services you can add to your app. From there, turn on the iCloud service:
Read more about this here
Edit: You may need to enable iCloud in Member center too
I solved the issue. I can't really tell how, but I've connected my iPhone to Xcode and clicked on "Fix issues" again it worked this time. Not sure why or how...

Resources