'React-Native-Share' Library fails to compile on Web - javascript

I've been creating react-native app to share text or images to social platforms.
I've used React-Native-Share library to serve the purpose of my application.
This library is working fine for iOS & Android but when I'm running it on Web.
I'm facing compiling failed error (Syntax Error). It seems like React-Native-Web cannot parse the syntax used by this library.
As far as I researched on it. I think I need to setup webpack.config.js for this to work, but as I've never did this before so not sure how it works and how to set it up.
Please see the attached screenshot
Syntax Error
Thank you in advance :)

Related

Calling native Android java code from Cordova WebView (JS) without plugins

I know this may seem to be a duplicated question from my topic, but none of the solutions of other people's similar question suits me.
I'm trying to create an Android app from Cordova. For some reason, I need to call some native Android java code from Cordova WebView's by a javascript file such as index.js. Most solutions from other people's similar question and Cordova's official documentation suggested creating Android Plugins. Though creating Android Plugins isn't something difficult for me, after reading this article, I want to do the same thing - simply calling native Android java code from Cordova WebView without plugins.
After testing all A/B/C methods in the above article link, I ran into a problem. Though having "android.webkit.JavascriptInterface;" imported, this code:
appView.addJavascriptInterface(this, "MainActivity");
gets this error:
error: cannot find symbol
appView.addJavascriptInterface(this, "MainActivity");
^
symbol: method addJavascriptInterface(MainActivity,String)
location: variable appView of type CordovaWebView
1 error
FAILURE: Build failed with an exception.
Why is this happening? How do I fix this?

PyroCMS CKEditor: Uncaught SyntaxError: Invalid regular expression: missing /

I'm using PyroCMS 2.x based on the Codeigniter framework. When I open the file editor in the admin backend (/admin/files), it is not working but redirects me to the start page. The file editor is based on CKEditor. I had the same issue earlier and fixed it but now it happened again and I can't find the solution any more.
I'm also using Cloudflare which I turned off for testing as well as I switched off caching in PyroCMS.
In the Chrome Developer Tools it shows the following issue:
The error relates to file /assets/cache/4e1ee6d64a845f2f82e18c6ed3f1423e.js:
this.complete=function(){loaded+=1;if(loaded===list.length){callBack(list);loaded=0;list=[];}};this.push=function(item){list.push(item);};this.getList=function(){return list;};},SequenceHandler=function(){var sequence=[];this.push=function(callBack){sequence.push(callBack);if(sequence.length===1){callBack();}};this.next=function(){sequence.shift();if(sequence.length){sequence[0]();}};};FileUpload=function(container){var fileUpload=this,uploadForm,fileInput,settings={namespace:defaultNamespace,uploadFormFilter:function(index){return true;},fileInputFilter:function(index){return true;},cssClass:defaultNamespace,dragDropSupport:true,dropZone:container,url:function(form){return form.attr('action');},method:function(form){return form.attr('method');},fieldName:function(input){return input.attr('name');},formData:function(form){return form.serializeArray();},requestHeaders:null,multipart:true,multiFileRequest:false,withCredentials:false,forceIframeUpload:false,sequentialUploads:false,maxChunkSize:null,maxFileReaderSize:50000000,replaceFileInput:true},documentListeners={},dropZoneListeners={},protocolRegExp=/^http(s)?:\/\
I don't think that some code is wrong because it worked earlier before for years but there is another reason - maybe related to Cloudflare, caching, php version, etc.
Does anyone have a clue what could be a solution?
Thanks,
Philip

AngularJS and TideSDK

I am trying to implement, an AngularJS App, to work with TideSdk. Everything works fine, if I run it over the browser, but however, I am not seeing any element loaded when I package it as a TideSdk application. The template is not even loading.
I don't find any useful as an error in the console.
Has anyone tried it before.?
I'm currently working on a project which is Angular based with TideSDK, and it's working well. All my routes, directives, services, (...), are working. Could you explain a bit more your issue?
Did you enable the webkit console of the app ? (https://github.com/TideSDK/TideSDK/wiki/Enabling-Web-Inspector => for macos)
All the logs are not present in the TideSDK Developper tool.

eclipse: how to enable JavaScript validation on an existing Android project

I'm developing a web app for Android. I've set up a regular Android eclipse project, with all web files inside assets/www. I'd like to see JavaScript and JSHint warnings in the problems tab as well.
JavaScript Development Tools is installed. I can correctly see the syntax coloring, but if I type something incorrect in a js file I can't see any problem when building.
Is it possible to manually add a new builder for this project? Any other way to enable at least JSHint?
Thanks in advance.
There's a plug-in for jshint support in Eclipse: jshint-eclipse. The current jshint version (1.1.0) has a severe performance issue that slow down Eclipse if you have a lot of JS files to check. The bug is already fixed and the fix will be included in the next version.

XCode, iPhone, WebKit Framework - What am I missing?

I'm very new to XCode so please excuse my ignorance. I've spent a day now trying to figure out what I'm doing wrong, following several tutorials.
I've got a iPhone/Window project setup in XCode. I've got a UITabBar and a UIWebView, when a tab is selected the UIWebView navigates to a particular URL and everything is working great.
I'd like to be able to embed jQuery (any JS library really) into my app so it can be loaded at runtime thus reducing load times by having to load the library over the network connection.
So from what I've read it's possible to do this by implementing the WebFrameLoadDelegate Protocol, which you can get from the WebKit framework. No problem however, after adding and removing the framework (from /System/Library/Frameworks/WebKit.framework) everything builds fine except for my header inclusion:
#import <WebKit/WebKit.h>
error: WebKit/WebKit.h: No such file or directory.
I'm convinced I'm simply missing some trivial step and I'm at a wall, any thoughts?
Thanks again for any help!
You have a space in the name of the header file, so the compiler looks for a file called " WebKit/WebKit.h". Remove that space so that the line looks like this:
#import <WebKit/WebKit.h>
Edit: having looked at the iPhoneOS3.0 SDK, there is no WebKit.framework on the iPhone. /System/Library/Frameworks/WebKit.framework is part of Mac OS X. You need to find a way to do what you're trying using the iPhone SDK.

Categories

Resources