Packaging files for iOs development in adobe air application - php

I'm working on a simple iOs APP in adobe Flash CS6 AIR application. the app would have a registration and Login form which communicate with MYSQL database on my server using PHP and Flash (well flash wont be flash once its packaged as iOs).
now the question that i have its confusing me alot is that do i need to include the PHP files when i package the APP in flash?
its all a bit confusing because on the normal server/domain all you do is place the Flash file and PHP in the same directory or folder on the same server and it would work but on an iPhone APP, there is no server and I'm not sure how the MYSQL connection in php would work!
could someone please shed a light on this?
Thanks in advance

When you create your iOS application. You only need to include the files are that going to be directly running on the device (ie. additional SWC's and images). The PHP file since it is going to be accessed elsewhere will not be required to be added. Also just a word of device, make sure to compile the iOS application with the most recent Version of AIR, or Apple will reject it.

Related

Error Logs from Hybrid Mobile App that loads a PHP file

I just wanna ask if any Mobile especially Hybrid App developer here know how to see error logs from a loaded php file.
I have a hybrid app that will post data to a php file from my website and that php file will load in the screen of my hybrid app, everything is fine, data were received by php and mysql but I wasn't able to see the image file in the location where I designated it. I have no idea what kind of error it could be so I realised that I'm not using anything to see any error logs from a php file that loaded in my hybrid app, all I can do is to see error logs from the hybrid app itself by using Safari Develop Features(for iOS). Can anyone suggest a solution for this? Thank you!

Can PHP be accessible offline?

My Employer would like me to take a web application written entirely in PHP to be accessible while offline. (it has to be accessible by an ipad without internet connection.)
I have tried the following things:
http://solesignal.com/draftcode/
http://blog.smartbear.com/codereviewer/15-code-editors-for-the-ipad-for-free-or-very-cheap/
https://itunes.apple.com/us/app/offline-pages-save-complete/id364859644?mt=8
Before I'm going to spend any money i have to be 100% positive it works.
Does anyone know how i can achieve this?
What do you mean by offline?
If you're looking to embed the server within your app, you're out of luck, it's not possible nor allowed. However if you want to run a local environment in your computer, take a look at MAMP
Knowing more about Mike's question, He's trying to run a website/webapp made in PHP offline/stand-alone on iOS devices.
As PHP is a pre-processor, this is not possible without a seperate server doing the magic. Depending on what this application has to do, I suggest you try to re-make the webapp so it does not use PHP. A lot of the things done with PHP can also be done client-side with JavaScript.
If you require more sophisticated things, try looking into the Meteor Framework. It supports PhoneGap exportation natively so the applications can run stand-alone on mobile devices as apps.
EDIT: If you can use an android device, you CAN run a PHP server on the same device as the pages are displayed because android is simply more open then iOS. If you're not willing to re-write the PHP code to JS, grab an android tab and use a PHP server package for android like this or another one that does include a MySQL server like this one

Dreamweaver's build app function in cs 5.5 breaks if there is php code?

For javascript and html files only, Dreamweaver's build app for android function seems to work great in cs 5.5. But when any php code is put in (for authentication, or for ajaxing in web service returns ) it seems that the android app just displays broken php code instead of executing it. When building the app, Dreamweaver won't even let you use a root php file in the project; it only seems to only accept html files.
Am I doing something wrong? Building apps out of web language-based files seems a lot less useful if server-side code isn't allowed.
Are there any other alternatives? Titanium studio looks really complicated, but I'm willing to read the docs if it's worth the time.
http://help.adobe.com/en_US/dreamweaver/cs/using/WSeffff8bffc80208478c8d43312e240fe0ad-8000.html
Indeed it only packages HTML, CSS and Javascript into an Android or iOS package.
I'm afraid you'll have to learn real Android development if you want something more complex.
Dreamweaver will package the files up just like you asked, however, the destination system is what runs the code. Android doesn't execute the PHP within the app. Your app has to connect with a remote server that is to handle the log in. Thinks of two separate apps, one on the phone and one on your server.
Android doesn't execute the PHP within the app. This is because PHP is a server side client and Not client side. Unless they create some inbuit servers within phones from which native apps can tap into. One option you can use is to use html files and within them, create links to php files which are in online servers so as to have your scripts executed.

PHP for iPad, or other solutions

Here's a tricky one.
I'm developing a web app for iPads that will be installed as kiosks. The app is essentially a quiz. Wont need to store data in a database, but will need to process data from 1 page to another page (from questions page to results page).
Original solution was simple PHP. I have now been informed that wi-fi/3g will be unavailable to the kiosks, so they wont have access to the webserver w/ php that has been working like a charm. App needs to be browser-based.
Looked around for solutions for installing PHP on iPad, like PHPPOD from Cydia, but unsure if that is even an option for iPad...and we wont be jailbreaking them. Can this even be done w/o php?
If you won't be jailbreaking them, trying to get a working PHP interpreter on them might not be impossible, but it'll probably be at the very least annoyingly difficult (and it's unlikely Apple would approve random PHP interpreters in their app store).
I'd suggest trying to port the app to Javascript instead. If it's just a simple questions -> results flow, writing a basic Javascript web app with jQuery to help out if need be shouldn't be too painful.
If you're not jailbreaking them, then you will NOT be able to get any un-approved apps onto them. Apple does NOT want you to bypass the app store, because they want their 30% cut. Installing a PHP interpreter on an iphone/ipad would allow you to build apps outside of Apple's control - this is THE main reason why Flash will never been on an iphone - it's not just for playing movies, it's actually a pretty full runtime environment.
You could try using HTML5 local storage, or use the native SQLlite database in iOS.
Without wifi/3G you would need local storage won't you? For this you need not jailbreak your iPad & force it to work through PHP. You could do that following -
Jailbreak the app & maybe try to get your PHP solution working on iPad.
Build a native app with local storage (using sqlite or core data) & handle the display through UIWebView.
Build a HTML5 app with local storage is easy to do nowadays, again UIWebView would be used.
As Amber suggests, you could build all your quizzing logic in javascript, but I am concerned here as to where you'll store data. You need to refer to point 3.
Hope this helps...

using PHP in iphone

Hey friend as you know I am new in iphone I didn't know any think about can anyone help me.
Can I use PHP in iPhone for storing music file And get get this file again when ever I need this any one who can help out this condition or give some hint to solve this
Previously I also put one question about this.But it is with the cloud server using in iphone
please help me friends .
If you mean to natively run on the iPhone, no. PHP is a server side script for web development, you can have a website developed with it and access that website using the iPhone just fine. As far as uploading from the iPhone you cannot do that either as Safari does not have access to the file system. If needed you could develop a custom application that would allow uploads to your website.
PHP is a server side scripting language, iPhone uses Objective-c, it means the answer to your question is Plain "NO", well you can always go with other way round, you can create a iphone optimized web application using PHP and Javascript, and access it in your iPhone using the web browser like safari.

Categories