Worklight Encrypted Offline Cache credentials mismatch with multiple apps installed? - encryption

I am developing two different hybrid apps in an IBM Worklight 6 project which make use of the Worklight Encrypted Offline Cache (EOC). That being said, everything seems to work fine with each of those apps individually. I can open the EOC, read, write, etc. However, if I try to run one app on the Blackberry10 simulator or the windows phone 8 simulator and then run the other afterward, the EOC gives me a "Credentials mismatch" error.
It seems like the EOC wants both of my apps to use the same credentials to access it.
Has anyone seen this issue or can anyone offer any advice?
I should note that I do not see this issue when using EOC on iOS.
(That being said, could this be a simulator issue?)

I found the culprit...
In the config.xml file for each app, there is a line about Widget Configuration:
<widget xmlns="http://www.w3.org/ns/widgets"
xmlns:rim="http://www.blackberry.com/ns/widgets"
version="1.0.0.0" id="[APP ID]" rim:backButton="exit">
Both of my apps had somehow ended up with the same APP ID which was causing them to try to access the same encrypted cache.

Related

Google Analyitcs with gms version 11.4.0 or higher is not working with instant apps when run on Nought Devices

We want to transfer data from instant app to installed app using Cookie API. Cookie API needs to have a play services version 11.4.0 or more. It works on lollipop, marshmallow and Oreo devices but crashes on Nought devices only showing following exception.
java.lang.NullPointerException: Attempt to invoke interface method 'void android.app.job.IJobScheduler.cancel(int)' on a null object reference.
It crashes when we use GoogleAnalytics.getInstance(getContext()) to get the Google Analytics Instance. But it works on all platforms except Nought.
I believe this is the same as this issue.
If that's the case, then this should fix it.
This is normally fixed in Google Play services for Instant Apps version 2.3. However, when you provision your device with Android Studio, you no longer receive OTA updates. You can check that from the version number (Android Studio provisioned version contains "sdk").
Try uninstalling Google Play services for Instant Apps. Then turn off Instant Apps and turn it on again. It should restore the final version (2.6-release), which contains the fix.
Deploying from the IDE will overwrite it still though.
So once it's updated, you can also remove the forced provision from the Edit Configuration dialog.
This was my issue with Firebase Analytics and I got the same error. So try that out and let me know if it helps.

xcode 8 push notification capabilities and entitlements file setting

when using xcode 8 doing the push notification setting, unlike xcode 7, xcode 8 need developer turn on push notifications capabilities switch ( located at TARGETS -> AppName -> Capabilities as following pic ),
then it will generate AppName.entitlements file as following
//AppName.entitlements
<key>aps-environment</key>
<string>development</string>
but for production version App, if we change the string to
//AppName.entitlements
<key>aps-environment</key>
<string>production</string>
then the Capabilities show a warning
and it seems no matter which string value specified in aps-environment, we can still get the push device token at application:didRegisterForRemoteNotificationsWithDeviceToken:
so what is the correct setting of the push notification entitlements?
thank you
I was struggling with that today in Xcode 8 GM. After disabling the setting, deleting my developer portal provisioning profile and regenerating it and enabling the setting again, I was able to eliminate the warning in Xcode. Keep in mind that I didn't fiddle with the entitlements file. I left it at development environment and after archiving I got the correct aps-environment setting (production).
Seems Xcode is stilly very buggy tho even in GM
My problem was my pusher client was out of date and would only push successfully to debug tokens. Other issue which I am still working on a fix for is that I could only export the app via gym with legacy-api enabled, this was not setting the apns-environment to be 'production' and leaving it as 'development' in the 'embedded-mobile.provision' file. I have however been able to successfully deploy the app via the xcode organiser to work with apns(prod) now.
I think the better solution is open the project package and open project.pbxproj
change the CODE_SIGN_ENTITLEMENTS
CODE_SIGN_ENTITLEMENTS = "your-app/production.entitlements";

How to configure my app with capability "PrivateNetworkClientServer" and keep possibility to pass "WACK" test

I am working on Apache Cordova Win 10 Windows-x86 Store app for the data exchanging with the microcomputers collecting measurements, connected entirely to a local network.
I tested this app with capability "PrivateNetworkClientServer" and
deployed it in a form of "*.appx" package. It is working.
But "PrivateNetworkClientServer" capability is forbidden for Windows Store
with the setting in "package.windows10.appxmanifest" as this:
"uap:Rule Match="ms-appx-web:///" Type="include" WindowsRuntimeAccess="all" "
I have tried to change this setting or remove it (by default WindowsRuntimeAccess="none"),
but after running "build" this part of manifest was returned to its initial state.
How to configure my app with capability "PrivateNetworkClientServer" and keep
possibility to pass "WACK" test.
I appreciate any suggestions.
Thank you.
To have access from my Win Store App to web API in the local network I am using the "Fiddler4" exemption for now, but still hope to find more simple solution. The same Cordova app, but built with Visual Studio for Android, works in the same local network without any quirks.

BB 10 App Crashing in device,but working good in simulator

I have developed an BB 10 app, It is working well in the simulator.The same app is not working in the device.I want to know , why it is crashing in device.
Is there any way to know the reason for crashing after installing in the device, so that i can fix it.
I have created a log file in the Device Documents
Is there any signal / listener OR try and catch mechanism, to write that exception into the log file?
my bar-descriptor.xml is like this, Please find.
<!-- Request permission to execute native code. Required for native applications. -->
<permission system="true">run_native</permission>
<permission>read_device_identifying_information</permission>
<permission>access_pimdomain_messages</permission>
<permission>access_internet</permission>
<permission system="true">_sys_use_consumer_push</permission>
<permission>access_sms_mms</permission>
<permission>post_notification</permission>
<permission>access_shared</permission>
<permission>bbm_connect</permission>
<env var="LD_LIBRARY_PATH" value="app/native/lib:/usr/lib/qt4/lib"/>
Please help,
Thanks!!!
You haven't given much to go on but here are some things to check right off the bat:
If the application isn't signed, and you don't have a debug token, or the token has expired or development mode has expired on the device the application will exit from the splash screen.
If you aren't requesting all necessary permissions in you app-descriptor.xml file your application may be getting unexpected results that cause the crash.
If you have a higher OS version on the simulator than the device, you may be using QML that isn't recognized by the device QML compiler which will cause a crash when the returned QML document is null. This is usually logged to the console.
If it isn't one of those, use the IDE run the application on the device and see if there is anything useful logged to the console. If not, set the IDE into debug mode to run the program under the debugger on the device. It will halt execution where the application is aborting. This may be deep in a system library but you may be able to step up the call stack to your code to find out the location of the problem.

Adobe AIR NativeProcess - UAC problems when trying to run update installers

I'm trying to use Adobe AIR 2's NativeProcess API to emulate the ApplicationUpdater but I'm encountering problems when I try to run the downloaded AppUpdater.exe file on computers with UAC (User Account Control) enabled.
When run without UAC enabled, the AppUpdater opens as usual and displays the standard Adobe replace dialog box. With UAC enabled, nothing happens at all.
Having run a few traces, it seems the problem arises when I call NativeProcess.start() - the code seems to stop running at this point, and does not run the following lines which exit the application in preparation for the AppUpdater to run.
I have added listeners for all of the possible events and error events that can be thrown, and added logging in each of them, but none of these are producing any output.
This issue only seems to affect installation executables (ones which windows warns will change settings on your computer). Calling java.exe -jar .... on the same computers in the same application works correctly.
I'm at a loss, so any help would be amazing!
After speaking to Adobe directly, I discovered that NativeProcess uses a windows API which is unable to elevate privileges which is why the installers wouldn't work. The workaround was to use File.openWithDefaultApplication which uses a different API that can elevate privileges, but this only works in a native-packaged AIR app (which was just fine for our app since it was already packaged in a native installer :))
adobe answer was http://kb2.adobe.com/cps/404/kb404888.html
but for real steps you should determine the application user privileges and determine UAC enabled, if yes - then warn end-user about it.
I'm expecting that you could do nothing with windows-thing from Adobe Air.

Resources