Using clevertap-react-native npm package, iOS push notification not working - reactjs

We are using:
react-native - 0.51.0 and
clevertap-react-native - 0.2.1
Here https://www.npmjs.com/package/clevertap-react-native we followed all the instructions and SDK integration steps for ios.
Also added Clevertap.registerForPush(); in root file of project. But still Mobile push notification are not getting enabled in Clevertap Dashboard.
Here you can see, Mobile Push Notification in Clevertap Dashboard

Can you verify once that you've enabled the support of the push notifications for your application?
You can check the same by following steps:
In Xcode, go to your Targets, under your app’s name, select Capabilities and find Push Notifications in the list, switch to ON
Helping Link: https://help.apple.com/xcode/mac/current/#/devdfd3d04a1

Hey this issue has resolved. There was firebase configuration code in my appDelegate.m because of that FCM token was getting generated.
After removing firebase code from AppDelegate.m; iOS push notification working.

Related

RNIap.getProducts(itemSku) returns empty array

I am using the package react-native-admob
I created an alpha track of my app and created a managed product on the play console
If I try
RNIap.prepare()
I get the error
RNIap.prepare is not a function. (In 'RNIap.prepare()', 'RNIap.prepare' is undefined)
if I try
const itemSkus = Platform.select({
ios: [
my_product_id
],
android: [
my_product_id
]
});
const products = await RNIap.getProducts(itemSkus);
console.log(products)
I get
Array []
Is there any additional setup I'm missing? This is my first time working with in-app-purchases on react-native
I have been following along with this tutorial, but run into problems when I get to RNIap.prepare(). My app was using the Expo managed workflow, and is now using the bare workflow. I am still running my app with expo start, because I don't know what else I can do to run it.
Have you followed these steps in the document rn-iap? This was the document which i followed and implemnted in app purchase for both android and ios in react native. It explains easily and beautifully. Do check it out.
ps: Even my app is in production and it has succesfull in app purchase
You can't get RNIap.prepare() in android before first release in Google Play Store
The answer was actually that I had a different bundle id for the app on the Google Play Console than I did in all my files. Expo chose this other bundle id for me as com.myAppName.
Because the play console does not allow you to change the bundle id I had to search for com.myAppName everywhere in my project and change it to the bundle id I had entered in on the google play console.
RNIap.prepare() is apparently not even a function anymore, but it is true that you must publish a release in the Google Play Store before enabling IAP, but you can publish a Beta.

loading image using anglularjs and ibm bluemix

I developed an application using nodes and angularjs.
I have an html file that I should display an image.
when running the application on localhost, everything work perfectly and the application displays the image.
I used this code for displaying image:
<img ng-src="./app/images/{{idimage}}.jpeg" ></img>
when I do a push for this application to ibmbluemix, the console told me that there are a 404 not found error.
Any idea please for how displaying image using angulars in ibm bluemix.
Thanks for helps
A possible reason for this issue is if you are pushing the app from outside of the app folder by using the manifest path parameter, and when you run your app locally, you also run it from outside the app folder.
After pushing your app, use cf ssh (docs) to get inside your deployed app. You can then take a look around using linux tools like ls to see what folders have been deployed.

service worker canceling out REST urls

just started working with reactjs recently, month or two..not a pro but can find my way around.. I am using create ract app (quickie ,that ships with service-worker) and my setup is such that I am deploying react app in the root of my java REST application, so all my service rest calls are in relative format, e.g /rest/myservice/123 etc.. and they work just fine..
but recently I started getting strange errors, and rest calls stopped working..
if I execute RET URL from browser .... nothing happens index loads... when I test with postman REST works just fine it also works in safari or if url is localhost... ...so after hours of frustration i discovered that service worker doing its .... caching . my rest calls are getting intercepted and they never make it to server... and there is nowhere that it mentions about how to overcome it, neither in service worker docs nor in create-react-app docs ...nothing is mentioned about this use case...... this is so pathetic...
I figured it out after numerous trail and errors... but it did not stop there..
I went ahead and deleted the service-worker registration entry from index.js also deleted service-worker file and rebuild the app. well service-worker.js file is still there... it showed up in build folder after I rebuild the project..... what is it with create-react-app did they got paid by google to include service-worker? or what is going on? why can not I remove it? and how do I prevent it from canceling my rest url calls?
when I type : https://xxxx.io/x/referal/refCode/3429878 it just loads application...
what else am I missing?
got the answer over #Redit needed to unregister worker...
details #:
https://www.reddit.com/r/reactjs/comments/8hovvb/removal_of_serviceworker_from_reactjs_app/

Ionic Push on Android: unexpected error occured

I'm trying to use Ionic Push notifications on android, but every time I got the following error:
Ionic Push:, (debug) unexpected error occured.
Ionic Push:, [object Object]
I'm using Genymotion as my emulator, with Google Play Services installed (https://stevenkideckel.wordpress.com/2014/12/27/how-to-install-google-play-services-on-genymotion/). Testing on a real device is not working as well.
Also, I'm using this push plugin (https://github.com/phonegap/phonegap-plugin-push), and installed like this:
ionic plugin add phonegap-plugin-push --variable SENDER_ID="my-gcm-project-number"
My push code look's like this:
var push = new Ionic.Push({
'debug': true,
'pluginConfig': {
'android': {
'senderID': 'my-project-number',
'iconColor': '#343434'
}
}
});
push.register(function(token) {
console.log('Device token:', token.token);
push.saveToken(token);
});
I already configured my Ionic app using:
ionic config set dev_push false
ionic push --google-api-key my-google-api-key
ionic config set gcm_key <my-gcm-project-number>
I tried to search for similar problemas but never found a solution.
Anyone can help me?
Thanks!
To answer my own question:
When I published my app and testing on a real Android device downloading the app from Google Play, it worked.
A few things to try if you are getting this problem:
Remove and add again the push plugin:
ionic plugin remove phonegap-plugin-push
ionic plugin add phonegap-plugin-push --variable SENDER_ID="my-gcm-project-number"
Also:
Generate a new project number and API key on Google Console;
Check .io-config.json to check if your keys and numbers are correct;
Make sure your dev push is off: ionic config set dev_push false;
Set your GCM key on Ionic IO: ionic config set gcm_key <your-gcm-project-number>;
Check (and make it again if needed) your build profiles on Ionic IO;
Also check this answer: https://forum.ionicframework.com/t/ionic-push-not-working-on-android/52636/2
Hope this help someone.

Angular Cookies don't work after ionic build

I'm tring to store logged in user information in Angular Cookies. Strangely it work's well in browser when I do ionic serve. Also works in phone debug mode using ionic run android -l-c --debug usb debugging mode. But when I do ionic build android user information does not get stored in the $cookiestore.
I have referenced <script src="lib/angular-cookies/angular-cookies.min.js"></script> in my index.html
Simply replace $cookieStore with localStorage. It plays nice with both Android and iPhone. :)
$cookieStore.set() -> window.localStorage.setItem()
$cookieStore.get() -> window.localStorage.getItem()
$cookieStore.remove() -> window.localStorage.removeItem()

Resources