Hot answers tagged

6

For those facing the same issue, we managed to work around it with this approach In Platform/ios/CordovaLib/Classes/CDWebViewDelegate.m, there is a method (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest with the following definition - (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(...


3

I ran into this issue recently and it looks like having a string reference for the category name value causes a problem. To resolve the issue you need to replace few values in this file. plugins/com.salesforce/src/android/libs/SalesforceSDK/AndroidManifest.xml Replace all occurrences of <category android:name="@string/app_package" /> with <...


3

The Mobile SDK is more than just database functionality. It gives you access to offline storage, camera, advanced gestures, notifications, device contact and calendars, and so on. You'll want to read more in Native, HTML5, or Hybrid. Can you access the camera with ForceJS? How about device notifications? Can you access the native contacts and calendars? ...


2

Same steps worked well for me and I see the login screen when I launch the app. I see the following error in your log The node package shelljs is required to use this script. Run 'npm install shelljs' before running this script. /Users/itsme/projects/myApp Update - I see this issue was logged on the Mobile SDK repo and has been closed as an environmental ...


2

The primary difference between iOS and Android when dealing with push notifications is the provisioning process and understanding Apple's APNS/Push process. The cause of your opt-out is probably or most often because the application is not registered properly for push messages. Make sure if you are building a production build you realize it can NOT be ...


2

To answer in short upgrade to the latest Cordova 7.x.x. but make sure you install the latest Android platform (Cordova Android 6.3.0) Reference here: https://cordova.apache.org/announcements/2017/09/27/android-release.html#disqus_thread To further explain. Our Cordova platform is currently: https://github.com/salesforce-marketingcloud/MC-Cordova-Plugin ...


2

The issue I've encountered is post_prepare hook not firing which means com.salesforce.marketingcloud.cordovaplugin.MCCordovaPluginApplication never inserted into AndroidManifest. The workaround is to insert it manually into your AndroidManifest until the plugin is fixed. !!!Note this plugin assumes that there is no other plugin overwrites android:name ...


2

We’ve released version 5.1.1 of the SDK which addresses a crash on armv7s device (like yours). Based on the crash log, we’re not precisely sure that it is the same crash (no symbols were generated) but it is the only issue we know of that affected armv7s devices. As this is not part of the publicly-available Cordova plugin, you’ll need to integrate manually....


2

If the plugin is unable to find ic_notification in your Android application's resources then it will not set the NotificationCustomizationOptions in the MarketingCloudConfig. If you haven't done so, you will need to package a set of icons in your project that will be added to the Android /res/drawable folders. The name of the icon doesn't have to be ...


2

Please see the SDK documentation https://salesforce-marketingcloud.github.io/MarketingCloudSDK-iOS/push-notifications/custom-keys.html What you need is literally in the "see also" on the page you referenced in your question.


1

The Salesforce Mobile SDK does not windows. To get a native Windows app you could use a solution such as MobileCaddy (full disclosure, I work for them), there may be other solutions also. Apps built with MobileCaddy mean x-platform support for Android/iOS/Windows with a single codebase.


1

Through testing, I was able to log the following NSDictionary structure for Inbox each message in the NSArray: { alert = Test; contentType = 2; endDateUtc = "2019-04-25 16:49:00 +0000"; id = some-ID-here; messageDeleted = 0; messageHash = "MESSAGE-HASH-HEREO/O1234AASD"; name = "Test 3/25"; read = 0; sound = ...


1

Copied from my Stack Exchange Answer: What actually definitively resolved this was going into the AndroidManifest.xml and setting android:launchMode="singleTask" on my main activity. I know that in the android docs it says singleTask is not recommended. I believe that's because it prevents you from going back but we take over the functionality of the ...


1

updated : I update the MCCordovaPlugin to the latest (downloaded from .zip file) from v.1.0.2 to v.1.0.3 and the title is displayed :) Thanks!


1

As you linked my thread I will give you few things I've learned from my issues with Android. 1)Make sure you have import {package}.R; in MCCordovaPluginApplication.java file. (otherwise it wont compile) 2) Make sure android hook fired after you execute cordova prepare . Look inside your AndroidManifest file and see if you have entry android:name="com....


1

I finally found the answer and it was quit simple : On Xcode, I had to go to App Settings -> Capabilities and switch Push Notifications to On. I was following tutorial to generate the right certificate on the Apple Developer platform but they didn't talk about the action on Xcode. Probably thinking people already know that part. I can now receive push ...


1

You did all the right configuration on the app side but you missed one on the Salesforce side. You need to register the app domain under Setup: Administer > Security Controls > CORS This should work. It is actually documented fairly well as part of the new force.js release. (*) Starting in the Spring 15 release, some Salesforce REST APIs (like ...


1

Finally I was able to get a solution on this so in case anyone running into Similar situation, We need to utilise the "OnDeviceReady" event to achieve this, Steps involved in the Solution Since we are building a remote hybrid app for Salesforce Community, this code will go inside your Community Landing Page, Add the eventlistener in "Onload" js, ...


1

I have solution about icon. You have to rename your icon image as 'sf__icon.png' and paste that file to all the resource folders. Then just run your project. The icon image will be changed.


1

Sounds like Cordova is just monitoring when the device moves on or off a Wifi network and makes no assurances about connectivity. Surely the best connectivity test is the same it's always been: just try to ping a server somewhere?


1

All the code was correct, it was a problem with my configuration of the framework: the app project has a project as library dependence (SmartStore). The SmartStore project had the res/xml/config.xml ! I just needed to add there the <access origin="http://*.somedomain.com"></access> not in the app project itself but in the library SmartStore! ...


Only top voted, non community-wiki answers of a minimum length are eligible