actionscript 3.0 file download from ftp server using air - ios

I've developed an application and now I'm trying to download a file from ftp server. I'm using codes from here
Codes are working on PC and I'm able to get file. However, when I build an ipa and test on I-Pod, device is unable to connect server. I traced by using a text field on screen and there is nothing on screen whenever I press download button. Can anyone help me with this problem?
Thank you.

iOS Devices don't allow direct socket connections. You'll probably have to figure out how to do it with an http request of some sort.

Related

pkpass not downloading on physical iOS device

Background: I'm learning Apple Wallet by creating a barebones sample app and am trying to automatically update a pass. In order to do so, I understand I need to run a web server that sends push notifications to the device when it's time for the pass to update. I'm using Apple's sample code and running their Ruby webserver via localhost. It correctly generates a .pkpass file, which I can add to Apple Wallet in the simulator by visiting the localhost site or by dragging in the .pkpass file.
Problem: This process doesn't work on my physical iPhone. When I go to the localhost on my iPhone, it shows a 200 response code but comes with the popup "Safari cannot download this file." Even if I try just emailing the generated .pkpass file to myself, it won't open in Wallet.
For anyone who may be wondering, I got it to work by changing the web host to https. Then I ran into another problem getting automatic updates to work, solved here: How to allow HTTP webServiceURL in apple wallet's pass.json file

Test app on iPhone via Xcode on development server

Problem
I'm developing a full stack application and when I try testing on my physical iPhone via Xcode, the iOS app doesn't seem to be connecting to either my development server of my client server.
I'm using React Native for the iOS app and Node as my server
Does anyone know why this might be occurring and how to solve the problem?
Error from React Native Console Log
login error Error: Network Error
at createError (createError.js:16)
at XMLHttpRequest.handleError (xhr.js:87)
at XMLHttpRequest.dispatchEvent (event-target.js:172)
at XMLHttpRequest.setReadyState (XMLHttpRequest.js:580)
at XMLHttpRequest.__didCompleteResponse (XMLHttpRequest.js:394)
at XMLHttpRequest.js:507
at RCTDeviceEventEmitter.emit (EventEmitter.js:190)
at MessageQueue.__callFunction (MessageQueue.js:366)
at MessageQueue.js:106
at MessageQueue.__guard (MessageQueue.js:314)
I figured it out!
Answer
You need to change your server url from 'http://localhost:port' to 'http://computerIPAddress/port'. If you're using .env I suggest changing it where you're actually making the server call because changing the development .env doesn't seem to take effect.
This may not be the best solution, ideally there would be another .env file for this so you don't need to change any code anytime you want to test on a physical phone but at least it works!
If anyone has a cleaner solution I'd love to hear it!

Downloading and Installing IPA from server if user clicks on button on Iphone

I am working on an app where I deploy the .ipa file and manifest.plist on my server and from there I try to install the app to my iphone.
The app is initially installed but I need to check if a latest version is available on the server. I have done this part and now wish to install the latest .ipa from the server directly to my phone without redirecting user to the html page of the server
Found some links on stack overflow, especially this:
Download and install an ipa from url on iOS
I have done this:
let endPointURL = NSURL(string: "itms-services://?action=download-manifest&url=myUrlString")
UIApplication.sharedApplication().openURL(endPointURL!)
I get unsupported URL exception. Can anyone tell me how I can achieve this? Is there any other way to directly start installing the upgrade without navigating to the actual html page?
It's just for testing purpose. Only registered devices are allowed to do this.
Only single way is there to download your app and its app store. You can give app store link and it will redirect user to appstore.
And if you want to test just use test flight it's easiest way.
Your linked question also tells that. Just for testing purpose it's possible now.
I found this same issue before.
A workaround for this is to new up a webview (you can hide it if you wish) and then give the request to the webview to perform. When the request loads you will then be shown the popup asking if you wish to download the app.

How To Send file from iPhone to another iPhone using node.js and socket.io?

How To Send file from iPhone to another iPhone using node.js and socket.io. Which package i have to use and should i have to write script on client side i.e. iPhone if yes how it will run on iPhone side .
http://socket.io :socket package for node. You dont even need to write the script on your own for the client side completely for making connection with the node server, as they provide you with the js file for doing that.
How to run on iphone?
http://docs.phonegap.com.
If you are building an app for iphone you would like to put your javascript code inside the phonegap app and your code will run on iphone in web view, like in any web browser
I created a swift socketio client: SocketIOCocoa. Hope it helps.

iOS Developer Enterprise Program - Hosting on Web Server

I am new to this site, so bear with me. I just wanted to ask a quick question regarding the iOS Developer Enterprise Program. I am enrolled, and I have made a few apps that are ready for in-house distribution. I have uploaded the .plist and .ipa file to my website in a separate directory. However, whenever anybody tries to download it, they just get the error message "Could not connect to website.com". Then, when I open up Xcode and launch the console when my iPhone is connected and I try to download it, Xcode displays this: "Could not load download manifest with underlying error: (null)". The null part really throws me off. Everyone has iOS 7.1 (or mostly everyone), and the website does have an SSL certificate, so I can't figure out why it is showing that error. Any help with this would be great.
Thanks!
Was ready to give up and change SSL provider, but managed to get the reason for me. Hope this will help for someone:
Problem occurred because my server was responding 403 Forbidden for manifest download request by Safari (because this request does not send cookies required for being authorised).
You need to make sure that the website that hosts the .plist and the .ipa files uses https. This is a requirement in iOS 7.1 and above.

Resources