I have a web-based app made in php with a backend mysql database and am looking for ai to turn it into a phone app. I am hoping to find a way to just upload the existing php code and have ai translate it. Is that possible in Cursor?
no its not. besides having to understand how php needs to be compiled for ios and integrated into swift, mysql wont run on iphone. it needs to many resources and would destroy data when you switch apps or close it.
just use nativephp for ios! its released already.
I am not looking for swift to use php, nor to run php as an iPhone app, but for ai to figure out the logic and build it in swift. Whatever database function swift needs to make a native iPhone app, I would hope an ai would be able to figure that out from reading the code and looking at the database.
I asked chatgpt if it could do it and it said send the code and it will figure it out. Said I would need to compile and other things, but I am hoping that ai of some kind could at least help with some of the job.
Should I look elsewhere than cursor, or is that something that should be added to feature requests?
it has nothing to do with cursor or not cursor. most AI cant do that what you want. its too complex for now. yes you can use some tools to convert php to c++ and then objective C… but you are wasting your time.
im happy to be proven wrong, if someone can, just by using AI.
Hey, I think it’s possible, but it will take some time. It won’t be done in a single request, you’ll have to put in some effort before you achieve the result.
I don’t mind doing work. I tried to figure out how to write the whole thing in swift and was overwhelmed. I just recently started exploring ai and since people talk about coding, maybe it could read and write code like it translates language. I would think from what I have been seeing that ai should be able to figure out what the code is doing and at least suggest how to go about building it. Maybe as T1000 suggests it is too soon. I get that ai cannot just take my code and make the app all on its own.
Try some simple php project, like a single file that displays something on the screen. thats sure doable with AI to convert to swift and then compile in xcode (check out other posts on xcode here as they give you tips how to ‘import’ new files into xcode etc.)
this would be a proof of concept. any more complex project is possible from that start.
what i said about mysql would still be an issue but you can convert mysql sql statements to sqlite compatible statements with AI and most ios apps use sqlite.
That is a great suggestion T1000. The database is not that complex. I am hoping to have the db embedded into the app so it is all handled locally. I don’t want the user to have any data outside of their own phone. I do have Vimeo videos that I think would make the app too big though. I am assuming it can get them from Vimeo as needed.
Yes, but you can store video files as files in the app storage when user e.g. downloads a video. Dont store actual videos in the DB and yes you might not get the app approved if its too big unnecessarily. most apps download additional content that depends on which is needed for the user. Some apps like games ask if you wanna download all assets, then they start downloading them into app storage.