NSBluetoothPeripheralUsageDescription missing, but present - bluetooth

After successful upload I get:
This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSBluetoothPeripheralUsageDescription key with a string value explaining to the user how the app uses this data.
This is in the .plist:
NSBluetoothPeripheralUsageDescription 'MyApp' would
like to use Bluetooth
What is here wrong? In other App's it was working.

The problem was, that there were two .plist files in the project directory.
The used .plist file is defined here: "TARGETS", "Build settings", "Packaging", "INFOPLIST_FILE".

find the info.plist file of your project and add the NSBluetoothPeripheralUsageDescription key the value it is string whatever you like. this feature is request on iOS 10.enter image description here

Related

cannot read property 'client_secret' of undefined

I have tried to create a sample program using Node.js, following instructions from https://developers.google.com/google-apps/activity/v1/quickstart/nodejs
I throws an error saying cannot read property 'client_secret' of undefined when trying to run it.
Looking for your valuable suggestions.
Thanks in advance.
var clientSecret = credentials.installed.client_secret;
In this line credentials is pointing to client_secret.json so the first key has to be "installed". In my case the key was "web" and that was causing the error. I just renamed the key "web" to "installed".
Since there is no key named "installed", it's parsing it to be undefined.
In credentials.json change the key "web" to "installed". Probably the docs need to change from Google's side.
Before
After
It seems you have missed Step 1: Turn on the Google Apps Activity API.
After creating the Credentials:
f. Click the file_download (Download JSON) button to the right of the
client ID.
g. Move this file to your working directory and rename it
client_secret.json. Put it in your project folder.
Your client_secret.json file needs to have the line below:
"redirect_uris": ["urn:ietf:wg:oauth:2.0:oob", "http://localhost"]
instead of the lines like below:
"javascript_origins":
[
"http://localhost:8080",
"http://localhost:1453",
"http://127.0.0.1:1453",
"http://localhost"
]
Also you may want to change chain head in client_secret.json from web to installed, or vise versa.
I had this problem, but I had the wrong type of credentials file. I initially used "Web Server (Nodejs)...", and it had the "web" heading instead of the "installed", but when I did it again, and selected "Windows UI (cmd line)", I got the file with the correct format.
Try selecting the application type "Other".
Select the "Help me choose" option and there you can chose other application type.
That way your client_secret.json will have the variable named "installed".
The recent version of Google Drive API will have a Desktop client option while creating OAuth API Key. Do select that, it will have all required information to access Google drive from Script.

Cannot open URL in UIWebView in ios 9.0

I get the following message when i try to open a URL in UIWebView-
App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.
I already tried the method given here but I get the same error report at the console
NSAppTransportSecurity add to info.plist , data type is Dictionary, then add an item NSAllowsArbitraryLoads , which is boolean value and set it to YES, then restart the Xcode project and run.
NSAppTransportSecurity: -
A dictionary containing the settings for overriding default App Transport Security behaviors. The top level key for the app’s Info.plist file.

Foxx dependencies import by name, not by mounting point

As far as I understand from reading this snippet in this documentation regarding 'Defining dependencies':
will allow using any app to be used to meet the dependency.
sessions or sessions#* will match any app with the name sessions (such as the sessions app in the Foxx application store).
sessions#1.0.0 will match the version 1.0.0 of any app with the name sessions.
Foxx will look for any dependency with name 'sessions'. However, when I tried it locally, it seems like it tries to find any app mounted at /sessions rather than name 'sessions' and this error populated in the logs if I use like this format 'sessions#1.0.0':
[ArangoError 3007: Mountpoint can only contain a-z, A-Z, 0-9 or _.]: [object Arguments]
Is this an expected behaviour? I really hope if it's possible to import an app by name rather than the mount point though.
The blurb in the documentation refers to the value in the manifest.json file. Dependencies in the manifest are defined by an alias mapped to a string in the format of <name>#<version>. The exact meaning of that string is not currently enforced so it just serves as documentation for the app.
If you mount an app that has dependencies, you need to set up the dependencies (e.g. using the web frontend). The web frontend's dependencies dialog lets you enter mount paths of apps you want to use to meet the dependencies.
The code of the app itself will then be able to refer to the exports of the apps mounted at those paths by the aliases defined in the manifest.
For example:
You create an app called example with the following dependencies:
"dependencies": {"mySessions": "sessions#^1.0.0"}
You install a sessions app (e.g. the sessions app from the Foxx app store) and mount it at /my-sessions.
You install your example app and mount it somewhere else.
You open the app details of your example app in the web frontend and open the dependencies dialog (boxes icon in the top right).
The dialog should show a single input field titled MySessions with a help popup saying sessions#^1.0.0.
Enter /my-sessions into the input field and save.
Your example app should now be able to access the exports of the app at applicationContext.dependencies.mySessions.

Spotify Folder in "My Documents"

I'm trying to make an app for Spotify, but I can't get the first step to work. I have made a folder named 'Spotify' in 'My Documents' (I use Windows 7 64 Bit), and made a folder inside it named 'test'. In 'test' I put a file 'index.html' to test if I can open it in Spotify, but I can't. I have a developer account, so that can't be a problem. When I type 'spotify:app:test' in the search bar, I get something like this:
(Note, in the screenshot it says spotify:app:tutorial, but I get the exact same result as displayed when I type spotify:app:test, saying failed to load application)
Also, I use Spotify version 0.8.7.111.gaf8d06ed-245
Spotify cannot load an application unless it has a valid manifest file. The manifest documentation can be found here.
Alternatively, see the Spotify Apps Tutorial app for a working example of a valid manifest. Note that you at least need an identifier, version and name for a manifest to be considered valid.

Launch Documents To Go app from third party Blackberry App

I was wondering if it's possible to open doc, xls, pdf, etc files using the "Documents To Go" app from a third party blackberry app.
If you want to open a specific document, since Docs ToGo registers to handle these extensions, you can use the Registry invocation and it will be handled for you. Take a look at the Registry and Invocation classes, the following code will open the document in the given path, Docs ToGo will take over through the Registry:
Invocation invocation = new Invocation(path);
Ragistry reg = = Registry.getRegistry("<your app namespace.class>");
reg.invoke(invocation);
If there is no registered handler for the file content type a ContentHandlerException will be thrown with error code ContentHandlerException.NO_REGISTERED_HANDLER.
Note: there's a small bug in Docs ToGo - closing the document or clicking the back button might not lead the user back to your application.
EDIT: The getRegistry function takes a class fully qualified name e.g. com.softartisans.SilverDust, where SilverDust is the class mane. You can find more info about the use of the Registry in this online book starting page 291 - Client use of Registry. I originally linked to the javax Registry, but it is more useful to look at the BlackBerry Registry docs.
You can use the ApplicationManager class to launch other applications, for example by looking up its descriptor and using runApplication(). You can also pass arguments in the descriptor and if the application looks at arguments passed into it, it may actually open the specified file.

Resources