Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflicting with cordova-plugin-ionic-webview #12

Open
kukukk opened this issue Feb 20, 2018 · 10 comments
Open

Conflicting with cordova-plugin-ionic-webview #12

kukukk opened this issue Feb 20, 2018 · 10 comments

Comments

@kukukk
Copy link
Contributor

kukukk commented Feb 20, 2018

Hi,

I wanted to try your plugin on iOS. A created a fresh new Ionic project and added your plugin. But when I try to build it I get an error. I tried from command line with "ionic cordova build ios" and also from Xcode but I got the following error: "197 duplicate symbols for architecture arm64".

After some more digging I found out that when I add the ios platform to ionic it automatically includes the cordova-plugin-ionic-webview plugin which also contains GCDWebServer. This is where the duplicate symbol error comes from.

Do you have an idea how to workaround this problem?

I'm using:

Update:
If I remove cordova-plugin-ionic-webview it works. But, since it is include in Ionic by default, I'm not sure whether it is a good solution or not...

@bykof
Copy link
Owner

bykof commented Apr 24, 2018

Holy... this sounds like a real problem.
I couldn't imagine how to do a workaround... since its included by default, as you said it.

My project was build first with plain cordova, but it seems that a lot of people use ionic more than the plain cordova stack...

@waidp521
Copy link

@kukukk I get the same problem. could you tell me how did you do to start a webserver? The js Embedded in my ionic app sends http request with http://localhost:8100. when I start a webserver with port 8100, it failed. when I start a webserver with 1111, it success,but doesnot perform "webserver.onRequest" . Could you help me ? Thank you.

@kukukk
Copy link
Contributor Author

kukukk commented Apr 26, 2018

@waidp521: Since you are able to build your project you have a different problem.

@samuelsont
Copy link

Has this issue been fixed yet?? I also need to use this plugin with Ionic iOS webview... Could the GCDWebServer be removed for iOS to build without issues?

@bykof
Copy link
Owner

bykof commented Jul 12, 2018

@samuelsont No it's not fixed yet.
You could try to build it without the GCDWebserver...

@samuelsont
Copy link

I will try that. It should work.

However, I'm kinda lost on some important details. I guess the webserver starts in the same directory as the calling script. Is there a way to specify the www root folder? Also, how do I check and verify the webserver ip and port?

@kukukk
Copy link
Contributor Author

kukukk commented Jul 27, 2018

Hi!

It seems that I will have to return to my project where I used this plugin. So, it is possible that I will make some more digging :}}

@samuelsont
I don't think there is a www root folder. This server is not like Apache2 or Nginx or ExpressJS. It can't serve static folders. You have to handle the request inside the onRequest method and use the request parameter to get more informations like: request method, url endpoint, query parameters, headers, body. Based on those parameters you can implement serving content from a specific folder.
The port is specified by you when you start the server. The IP will be you device's IP, if you are connected to a WiFi. If you are on mobile network the IP depends on you provider, whether they provide you a private or public IP (I doubt it will be public).

@boedy
Copy link
Collaborator

boedy commented May 30, 2019

The lastest version of cordova-plugin-webserver uses CocoaPods as iOS package manager to pull in GCDWebServer. Can anyone confirm if the latest version resolves this issue?

@Mapiac
Copy link

Mapiac commented Jul 23, 2019

Still lots of ppl using plain Cordova without Ionic (I might mention). ;)

@caramorsimon
Copy link

looks like this may have been fixed for IOS ionic-team/cordova-plugin-ionic-webview#244

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants