hood.ie setting a fixed URL instead of network address - hoodie

I've made a hood.ie app, where I will be using 2 devices (a laptop from where i do hoodie start) and an iPad.
At the moment, on the iPad i need to get the network address from the laptop from where the app actually sits to enter it in Safari on the iPad (this can also change depending on whats connected to the wifi network).
Is there a more convenient way to do this as the app has be started and logged into daily?
Thanks.

I'm afraid not, it's also not really part of Hoodie's scope. If you want to expose your local sever with less hassle, you could:
Give it a fixed IP address and just bookmark that on the ipad
Use a service like https://ngrok.com/ or http://localtunnel.me/ (especially the former) to have nicer or even fixed urls that tunnel through to your local server
Hope that helps!

Related

What is the iPhone equivalent to the \Windows\System32\Drivers\etc\hosts file?

I'm working on a web application and need to debug a problem occurring only on the iPhone.
I can reach the site on my dev box by typing its ip address into Safari (on my phone), but the domain is significant to the application, so I'm going to have to update my config in multiple places every time my IP changes.
What would be ideal is if I could configure the iPhone to always point to a specific IP when I enter a specific domain, just like the C:\Windows\System32\Drivers\etc\hosts file.
Is there a way to do that without jail breaking my phone?
You'd have to jailbreak your iPhone, another way would be to use a proxy. Hope I could help :)
If you have jailbroken, I think it's /etc/hosts (same as the Mac OS X setup)
I appended .local to the end of my computer name and it was able to resolve it.
It's not a perfect solution since I'll still have to adjust the settings in the app, but at least I won't have to keep changing it when my IP changes.
According to this answer on another SE site, it's Bonjour functionality.

Get rid of proxy popup in ios simulator

I'm behind a corporate firewall and all network traffic goes thru the main proxy. In my iOS simulator, I get proxy popups a few times each time I run my app. The thing is, my app doesn't make any network calls (yet), and doesn't import any network frameworks. In fact, I can reproduce this by making a new project in XCode using one of the standard templates and run it straight away; it'll still prompt for the proxy credentials every time.
In my OSX network settings, I've obviously set my proxy credentials in all the different protocols (HTTP, HTTPS, FTP, Socks, RTSP, Gopher). I found that I needed to put the domain and backslash before my username to allow web access in any OSX browsers etc...so given that I did that and then the OSX proxy prompts went away and I was allowed access, I would have thought that the iOS simulator would just inherit those settings...?
Any ideas?
One more bit which may be unrelated: we haven't yet figured out how to get access to the App Store on this Mac; despite supposedly getting past the proxy, any use of the App Store just results in timeouts and we can't even see the "home page". I'm wondering if somehow the iOS simulator is making similar network calls using some other protocol that is like the App Store...? (I would have thought App Store would have been HTTPS but I don't know).
Any thoughts appreciated.
If you put *.apple.com in your proxy passthrough list, the simulator will stop whining about it.
Like you, I can't get the Apple Store to work through our corporate proxy either. I've worked around it by using a wireless network that doesn't use a proxy when I have to use the App Store.
I've found plenty of other things in the OS that don't work through our proxy.
I had the same issue and found another way without touching the proxy settings!
I'm working on a Mac with OSX-El Capitan so maybe in other versions these steps might be slightly different:
Go to System Preferences
Go to Network
Choose your connection (Wireless/Ethernet/Thunderbolt-Ethernet)
Click on Advanced Options
Go to the tab Proxies
The two boxes Automatically detect proxy (for the internet connection on your mac) and Web-Proxy (HTTP)
Insert your login credentials at Web-Proxy (HTTP).
This reduced the occurence of the Proxy-PopUp greatly on all the 3 macs I work with. (At least it doesn't appear periodically anymore when I start my app from xcode)

iPhone as proxy for data upload

I want to create an iPhone application that can call web services on a computer, and then upload those files over the iPhone 3g connection. Is there an elegant way to do this?
I tried connecting the phone to local Wifi, but connecting to Wifi disables 3g, even though the Wifi is local network only.
I assume the same problem would arise if I could network the phone with the computer via bluetooth.
Any other ideas? The purpose is to go up to a special demo PC we created, pull some data off, then upload to the Internet, all within proximity of the machine. Unfortunately, it appears that I can't use one connection for pulling data, and another for pushing.
Your assumption is correct. When connecting to both 3G and Wifi, the Wifi connection will be used. Sounds like your local network has no route to the Internet. Perhaps that could be fixed.
Apple does not prefer its iPhones to be used as routers.
If you're working on something that will not be distributed through the App Store, you may have some success looking at "tethering" applications and their source code, which can be found by some clever Googling.

if I have an iphone's IP address is there anyway I can communicate with it?

are there any services running by default on an iphone that would let another ip address communicate with it if the iphone's ip is known?
Yes, technically, you can. There are a couple of issues though:
Mobile IP addresses usually change
When the phone is in sleep mode, its network interface is probably not reachable.
So I don't think you can rely on that for initiating a communication with the phone.
There aren't many options out of the box on a non jail-broken phone. However, you can write your own client application that runs on the phone. It accepts or initiates the remote connection.
And in that case, the protocol is entirely up to you.
If you jailbreak your phone, you can install the OpenSSH package and have SSH and SFTP access to your phone.
I don't know exactly what you want to do with your app, but you can consider create a thread detached from the main one (using gcd) and use it to send/receive informations from a server using JSON objects for example. Sure you can use sockets and write a client or something like that.
I suggested a new thread because you can put it running forever (on a enterprise app, I don't know if Apple will approve a thread running on an App for AppStore).
I had to develop an app with a consistent client/server relationship and it was the way I got it working.

How can I debug network requests from my iPhone?

I want to check the network requests an app is making from my iPhone. It's on the same WiFi network as my computer (or if it makes things easier, I can set it up to use an ad-hoc network). I don't want to see every packet, just the URLs which my iPhone is requesting. I don't care about the returned data all that much.
A simple solution would be much appreciated.
If you want to intercept the phone itself you'll need to point it at an http proxy you set up on a computer and watch the requests come through. Something like http://www.charlesproxy.com/ or there are most likely many free proxies.
Connect your computer to the rest
of your local network via Ethernet.
Turn on Internet Sharing from the
Sharing System Preference to share
your Ethernet connection via
AirPort.
Set your iPhone to
connect to the computer as its base
station.
Use Wireshark to
capture and analyze the packets.
I found a really nice repo on github named Wormholy https://github.com/pmusolino/Wormholy it will show every network request on your iphone, you only add it to your pod file and then on your app, you shake your phone and you will see all requests.
Easy to install
Transparent on your app usage
Overview and details of your request
Like so
Screenshot of wormholy usage