Display contacts in Blackberry Application - blackberry

I had retrieved the contacts from the phone book and displayed the contacts in pop up of Blackberry Simulator. It runs well in simulator, but not running in Blackberry Device. I stuck on this. Please help me.
Thank you.

There is a difference between simulator environment and actual device environment: permissions
On simulator you can access any device resources/data without setting relevant permissions. But on actual devices you need the relevant permissions set, before accessing device resources.
Use ApplicationPermissionsManager and ApplicationPermissions classes to invoke "Permissions request" screen on your app startup.
You need at least ApplicationPermissions.PERMISSION_ORGANIZER_DATA permission allowed for your application.

Related

App does not appear in iPad Settings list when iPad connected to Mac as external device

I am developing an iPhone/iPad photo processing app on a Mac using Swift in XCode 13.4. When I connect an iPhone running iOS 15.6 as an external device, the app appear in the Settings list and I can allow it to have access to Photos. When I connect to an iPad running iOS 15.5 as an external device the program runs but fails when trying to access photos using info[UIImagePickerController.InfoKey.phAsset.rawValue]. This is commonly because permission to access photos has not been given to the app. When I tried to set this I found that the app did not appear in the Settings list. The app does appear in the iPhone settings list even though it has never been installed from the App Store.
Okay, so it turns out that you mean you're running from Xcode on the device. Good! But that is irrelevant to the question, as it turns out.
The question is why it is that, on the iPad, there is no entry for your app in the Settings app, is that right? So that would be because on the iPad you've never done anything that causes the app to request permission (such as photos).
The point is, you cannot initiate the granting of permissions from Settings; the app itself must first request permission from the user (using the correct PHPhotoLibrary call). Only after that happens will the app acquire a place in Settings where the user can modify the initial permissions.
Adding a programmatic definition of photo access options as suggested by Matt in main form viewWillAppear solved the problem as per https://developer.apple.com/documentation/photokit/delivering_an_enhanced_privacy_experience_in_your_photos_app. However, iOS 14 or newer is required.

Unable to access HealthKit permissions for my app in Settings

I recently published an app to the App Store that reads several metrics from HealthKit. It all seems to be working correctly in the app (permissions screen loads fine and data is being read okay) but when I go to Settings > Privacy > Health > MY APP, there is just a blank screen with no data.
I've seen this bug with other apps (MyFitnessPal, Balance) and a forum recommended deleting and reinstalling, which fixed it for them. But it doesn't fix my app at all.
Can anyone think of something I might have missed that's creating this issue?
Thanks
This should be addressed in iOS 15.4 Beta 1. Can you try there?
You should also be able to access your apps authorizations from within Health App. Go to Profile View and navigate to your app under the Apps view.

Where do print statements in a published iOS app go?

I obviously know where they go when I'm testing the app in Xcode.
But if I were to release an app to the App Store that contained print statements, would they be logged in the user's device somewhere or would they just be ignored?
They get logged to the user's device in a way that they're accessible from Xcode. Apple explains the behavior here.
There is an internal "console" for each app. They are not necessarily logged anywhere except in this internal console. When you test your app in Xcode, it connects to this internal console and copies any print statements from the the device to Xcode for developers to see.

Can an iOS app determine the other apps that are on the iphone and what permissions they have?

I'm wondering if an app has access to the info that shows the other apps on the phone and what permissions they have (i.e. access to your location, contacts, etc).
Could I create an iOS app with a feature that displays other apps and their permissions? I know the user can view this info via settings, but I'm wondering if it can be organized and displayed by an app.
a similar question was asked here:
How an app to know what other apps have been installed in the device
but the solution method (iHasApp) only works for about 50% of apps, and doesn't address seeing the permissions of those apps.
Thanks!
No you can't access apps data due to sandbox structure upto iOs7.

Make a non-jailbroken iPad only usable for a single app

It may seem a bad and useless idea to an iPad user, but suppose the iPad belongs to a restaurant and it wants to show it's menu to the customer on iPad for god knows what marketing reasons.
The restaurant's goal is that the user can only use the app which shows the menu and nothing else. He shouldn't be able to close the app without shutting down the device because the restaurant is afraid that the user may change some settings, e.g. uninstall the app. Also, if he or the personel do shut down the iPad, the app should autostart right after the device boots.
From what I found, it is not possible on a non-jailbroken device, see e.g.:
Make iPad Single App Device (or startup lock?)
shutdown iOS programmatically
Am I right here? Is it really NOT possible on a non-jailbroken device?
The restaurant of course doesn't plan to publish the app anywhere, so Apple's approval is not the factor here. The restaurant just doesn't wish to do the additional effort for jailbreaking many devices (it's unreliable, voids warranty etc). The restaurant also doesn't want to let the user install the app on his own device, the app should be only on the restaurant's device.
Even if this would work, a question arises how the tech support would uninstall or update such an app, since it's locking the device completely. From the app itself?
Thanks!
If that iPad is belonging to some restaurant they should encase the device in some sort of casing wich should cover the home and power buton. Problem solved! :P
A way to do it manually:
Make the following selection Settings->General->Accessiblity->Guided
access and enable it and set the password
Open the app to be locked
Triple click the home button continuously that's it its the app gets
locked
To unlock triple click the home button continuously give the
password While it asks that's it app is unlocked
Note:
This solution works from iOS 6 only.

Resources