How can I make a PyCharm server running locally available to iPhone on same network - ios

I am developing a backend server for an app using PyCharm. This runs on my laptop as 127.0.0.1:8000
I need to access this server for testing from an iPhone. This is connected by wifi to my local network to which the laptop is also connected.
I have tried entering http://mycomputer.local:8000 in safari on the iPhone but I get the message "Safari could not open the page because the server stopped working. I am using the real name of my computer instead of 'mycomputer'.
I am running OS X Yosemite so Web Sharing is not available in System Preferences.
How can I give access to the 127.0.0.1:8000 server to my iPhone?

When you say "backend server", what is the Python project written in? Django, Flask, Pyramid, something else?

Related

How to connect to localhost on a real device in react native on iOS?

I have a server running on localhost:5000 on my desktop, and when I make http requests through my react-native app when running on the iOS simulation to it, it works. However, when I connect to a real device, the http requests don't work. What am I doing wrong? Is there something I have to configure?
localhost in your desktop is not the same ip of the localhost of your device.
Get the ip of your computer by typing ifconfig in a terminal, then replace localhost by this ip, you should type something like that in your device browser:
192.168.0.23:5000
Maybe my answer is too late but I ran into a similar situation today and I got it to work by running my node server using the IPv4 of my desktop and then making the request to that IP.
For example, I am running my nodejs development server at http://192.168.0.135:3000(local IP of my desktop) instead of localhost and then I make the fetch API request from my react-native app to http://192.168.0.135:3000/.
Just make sure your nodejs server and your app are on the same local network. My react-native server (metro bundler) is running on a separate PC also in the same wifi network.
If your are on macOS go to settings -> Wifi / and show more,
on bottom you see "IP address", it's your correct localhost for ios physical device !

Developing React Native on Device When Ports are Blocked

I developing a mobile application using React Native. For testing, I run the application on a physical iPhone which means pointing the device to the React Native server running on port 8081 of my laptop. As a remote developer, I often work in coffee shops, libraries, or other public places with WiFi.
My issue is some of these public places block traffic between devices so even if the phone and development machine are on the same network, the mobile device is unable to reach the React Native server.
One remedy I have found is to create a private network between the iPhone and my Macbook. While this solved the issue of connecting to the React Native server, it cuts my laptop off from a public internet connection so this is not a viable option.
Is there a solution to this problem which retains a public internet connection for my devices and also allows comunication between the phone and the React server?
https://ngrok.com allows you to setup secure tunnels to localhost that you can access on the public internet.
Test mobile apps against a development backend running on your
machine. Point ngrok at your local dev server and then configure your
app to use the ngrok URL. It won't change, even when you change
networks.

Can’t access rails app on Mac host from VMware Fusion Guest

I’m probably doing something stupid here, but....
I can’t access a rails app running on my Mac from a Windows 10 VM. I have set the network adapter to "Share with My Mac". I can access a PHP site running on my mac via http://[my-machine-name].local or http://[my-ip-address]. But if I specify port 3000 to view my rails app I get an error message (to the effect that [my-ip-address] refused to connect) even though the app is running. I don’t know if this is an issue at the Mac end (though my firewall is off for testing), the windows end, or to do with my VMWare network adapter setting. Any assistance gratefully received
Peter
Just use the -b flag while running your rails app like rails server -b 0.0.0.0:3000 so it gets bound to the whole network interfaces and it can be accessed from outside

Test XCode app running on physical device with local server

I have searched high and low for a solution to this which I am sure must exist but I have failed to find one that works.
I am running XCode 7.3 and iOS 9.2 on an iPhone.
I have a test server running on 127.0.0.1:8000
I cannot get my app running on the iPhone to connect to either 127.0.0.1:8000 or 192.168.1.200:8000 (which is the local ip address of my server).
There must be a way to give the iPhone app access to the local server if only I knew how!
The best solution to this problem, that many app developers have, is to download ngrok which acts as a proxy website.
ngrok is insanely easy to use:
Download from https://ngrok.com/
Run: ngrok http 8000 in terminal (where 8000 is your port)
Cut and paste the displayed ngrok url (e.g. http://a021v2tc.ngrok.io) into your app
So simple. And works!
Check if iPhone connect the same wifi with your server.
You can use Fiddler as iPhone agent to get the detail error message.
There is the link how to capture traffic from IOS device.
here

How to force Xcode server connections over SSL

The Issue:
Connecting to the Xcode server CI web interface over SSL with a provisioned iPad and attempting to download an integrated build fails with a message that it cannot connect.
The Setup:
I've just set up Mac OS X Server 3.01 on my home iMac OS X 10.9 (Mavericks) for continuous integration. In the server admin panel only Xcode and File Sharing services are turned on. I've got continuous integration working from my MacBook Pro dev machine, configuring and running integration bots from the web UI served by the Xcode server on the iMac.
I want team members to have access to the CI web interface so I'm serving from the iMac to a public dynDNS address, port-mapped through from the Airport Extreme router to the iMac. This all works, but I want to force connecting only over SSL.
I did originally enable the Websites service in the server admin and created a redirect rule, configured with Source: "/", Destination: "https://myServer.dynDNSName.org", Status: "Permanent (301)". This did work to force all requests to port 443 and logging in worked as expected. When logging in to the CI interface with iPad Safari over SSL it is possible to navigate to the various bots results pages as expected. The problem is, tapping a built product link to download onto the provisioned iPad fails with the message, "Cannot connect to myServer.dynDNSName.org".
I have since turned off the server Websites service which once again allows connection over port 80. I don't want to allow clear text logins over port 80 because login accounts are server user accounts. My current workaround is to log in over SSL, then change the URL on the iPad to http://myServer.dynDNSName.org, to download the product, which then does install on the device.
So the question is, how can I set up the iMac server to not allow insecure logins and still enable downloading integrated products to devices?

Resources