How to Handle iOS Settings if App Uses the Network? - objective-c

I have an app, in which the user can initiate a short, asynchronous download to access data on the internet, and then the app displays that data. The app is not yet released, but I have tested it on both simulator and several physical devices. On none of them, however, I can locate the app inside the settings menu where I could, for instance, restrict its network access to WiFi only, etc.
I assumed that if my app accesses the internet, it would automatically appear in the settings menu, but apparently it is not so. Am I doing something wrong? What is the process to allow the user to access such basic settings?
I use XCode 10.3, and probram in Objective-C.

If the problem is that there's not a settings entry for your app, please keep in mind that sometimes, in order for an app to be registered, you may need to close your app and the settings app and try opening it again.
If the problem is that you don't see the standard settings for location services, cellular data etc, then you may find maddy's answer here to be helpful: Why is my iOS app forcing a Settings Bundle might be helpful.
Copying the relevant part from this answer:
The iOS 8+ settings page appears […] if the app does any of the
following:
Attempts to access data via a cellular network
Various privacy data
Camera
Microphone
Photo library
Contacts
Location
Notifications
Background data fetch
A settings page may not appear for an app if none of these conditions
have yet been met.

Related

Handling Mojave permissions ( camera, mic & accessibility) for two instances of app in same machine

My Use case :
I have an automation framework for Mac that launches 2 instances of the same app ( same bundle id) available at different locations to simulate two endpoint cases for media calls. With introduction of Mojave permissions, when I grant permission( camera , mic & accessibility) for one instance of the app, the other instance doesn't have the same permissions.
Since the bundle id is same, is it not that providing permission for the app is carried over to both instances?
I tried pushing a system profile to provide permissions but that doesn't seem to work
Also added an apple script to continuously check for permission pop-up and click ok to it. This works for mic and camera but not for accessibility. Also when each instance is launched the permission would be asked again.
Is there a way to by default provide all access to the application by default without asking for any permission pop-ups?
Or is there any way to tweak something at the OS level to not ask for permissions at all ( behave same as <10.14) .. I tried disabling system integrity but that doesn't seems solve this issue
You need to code-sign all versions/copies of the app using the same identity.
When an app is not code-signed and the system needs to record its identity (as for permissions), it generates an ad hoc code signature. That signature, though, only matches that exact build of the app. Another copy of the app that is different in any code-signature-relevant way is not considered to have the same identity. In fact, it's likely to be considered "malicious" as it appears to have been tampered with.
If you code-sign your app with appropriate designated requirements, that enables the system to understand that two different versions of an app have the same identity and should share permissions. This is key to an app maintaining permissions through an upgrade to a new version, for example.

Buildfire: How to use the Barcode Scanner

I have gotten to the point where I can launch the barcode mock mode.
I am trying to figure out how I can start scanning test codes in development.
Or would an app that I am trying to test this on, need to have camera permissions on the app?
In that case, how do you overcome the use of the Camera Hardware on the PWA?
Or is there a way that I can scan QR-Codes using a different javascript API that would work in all cases?
Also, I had to move the camera and barcode service Javascript files into my Widget folder because when I was trying to reference them as you do on the instructions, the files wouldn't load.
Yes when you are in web it will mock the functionality because you're not on a device. There are HTML5 Camera API's see (https://www.html5rocks.com/en/tutorials/getusermedia/intro/)
You can use the BuildFire Previewer App (contact customer support if you havent downloaded it yet)
While you can take a copy of the services into your plugin it is risky. If we issue any updates or bug fixes you will not receive them. Also if it breaks compatibility at any time (rare but possible) your plugin stop working

How to program a sandboxed application in Yosemite

I was trying to program a simple TODO app for Yosemite with sandboxing. Apple has its tutorials for the same but they are not very elaborate. I wanted to know sandbox APIs like sandbox_init() and APIs for console logs (heard sandboxed apps use some special APIs). Could someone please point me to some open source app with sandboxing on Yosemite, so that I could see the APIs that it is using.
You don't need to use sandbox_init() etc. in order to create a sandboxed app.
Roughly, you need to understand:
Use the APIs to find well known directories and don't assume that /Users/username/Documents is the Documents folder, for example.
The app has no access to user files and must gain access via NSOpenPanel.
If the app wants to retain access it has already gained then it needs to create and store bookmark URLs, which can be reloaded during a later invocation.
If the sandboxed app spawns a child process, then that child process needs it's own set of entitlements.
Once you understand that it's normally just a case of setting Use Sandbox in the app capabilities and you're off.

WP push files to device over company app

With a company App configured on a Windows phone there is the posibiltiy to push the installation of an App. When the user starts the pushed App some configuration data must be introduced. I would like to save the user this step but I still don't know how. Isn't it possible to push files over the company App/Exchange, as it is on a Windows machine? So I could read the configuration out of this file.
your use case does raise many questions (probably just terminology)
The only way to push an APP to a device is through the Windows Phone store or website.
If you want to push configuration to a device for an app then the app must be run at least once to enable that ability and you could then use a background task to periodically check for new configuration and download it.
The other thing you can investigate is push notifications but they are not really meant for pushing data, you can sent simple objects or data to the device as a raw push but the app must be running first.
The most common way to achieve what you describe is to have the app load config at launch, locally first and then update it from a web call (if web is available, as these are mobile devices you can not guarantee connectivity). We do something very similar with AdRotator where we try to download config at start and if that fails use a locally cached version.
As of WP 8.0 there isn't the possibility to push Apps or Files through the company App.

How to programmatically lock an iPad app into one single application?

we are doing a product display iPad app and don't want customers to be able to quit the app pressing the home button. We're planning to use only UIGesture to let the admin users to quit. How to programmatically lock an iPad app into one single application without install any third party app or profile?
There is a feature for this added in iOS 6 Beta 2 called Guided Access, see http://www.idownloadblog.com/2012/06/26/ios-6-guided-access/
Install the iPhone Configuration Utility: http://support.apple.com/kb/DL1465?viewlocale=en_US&locale=en_US
Make a .mobileconfig with the SBStoreDemoAppLock property set to true
Install the mobile config on the device.
Installation of the mobile config can be done using either the iPCU app or by opening the file with Safari on the device.
Now the device is in kiosk mode and the home button is disabled.
Remove the .mobileconfig file (again using the iPCU app) and reboot the device to re-enable the home button.
I believe that the common solution to this problem is a case that covers the home and power buttons. In practice, you'll want something that is fairly robust to prevent theft of the iPad, and that neatly covers access to the dock connector whilst providing power.
A quick google search of iPad kiosk case turns up plenty of options. Use of iPads as PoS displays in stores and at trade shows is incredibly popular.