How can I build an IOS app on IOS? - ios

I've made an app with Codea and exported to an XCode project. Is there way to build it on IOS (or windows)?

Definitely.
Some folks over at iNinjas have successfully ported the Clang-LLVM toolchain to run on iOS. Here's a download link - install the deb on your iOS device. You will also have to copy the development sysroot (the iPhoneOSX.Y.sdk folder) from your computer to your mobile device. The device also has to be jailbroken.
(I don't remember exactly if there are any other packages to install, but perhaps odcctools from Cydia, etc, just google it.)
After that, you have to compile and link all the files. Of course, Xcode uses a proprietary format for project files, so you can't just go ahead and expect the compiler to build from the Xcode project, but you have to, for example, write a Makefile to specify that all .m files are to be compiled. Then you will have an executable file which you may or may not need to codesign.

Here is a tutorial on creating an app from your Codea/Xcode project:
http://codeatuts.blogspot.nl/2012/08/tutorial-12-submitting-to-app-store.html

Well, if you already have a mac, you can use Dringend to compile it from your iPad. It requires a program running on your mac that will do that actual compiling, and then send the file back to Dringend on your iPad, which will install it. This requires having a mac, but will let you program on your iPad away from your mac. This also requires an iOS developer license, for the code signing identities.

Related

Installing PDF reader in iOS simulator

Currently I am using Xcode 8.3.3 and Xcode 9 Beta 4.
How do I install a PDF reader and email apps in the iOS simulator.
I have gone through this link:
Is it possible to install Adobe reader or third party application in iOS simulator for testing?
and
*How to install iPhone application in iPhone Simulator.
But it was of no use.
I even tried the drag and drop method. It shows the process, but then it displays the error "unable to install the app".
How do I add applications in simulators? Currently I don't have any devices, so I want to test the functionality on the simulator.
After trying a few options and going through some folders, I am confirmed that it can be done. Can it be done by placing the payload files of PDF viewers in iPhone simulator's application folder?
If it's an app built for the simulator, then yes it can be done using the methods you linked to.
If this is an app built for the AppStore, then it's not possible. Apps built for AppStore are compiled for ARM CPUs; for simulators, they're compiled for x86.
Firstly, read these steps. However for me, the second step was not working. So I went for alternative method.
You need an iPhone for the above. If you don't have one, search the web for .ipa file of that apps and follow above procedure. Or you can use open source projects like: https://github.com/Alua-Kinzhebayeva/iOS-PDF-Reader.
Run this project for the first time. Go to project navigator:
Right click on the PDFReader.app and click "Show in Finder".
Copy and paste it in this folder Applications > Xcode.app (right click - Show Package Contents) > Contents > Developer > Platforms > iPhoneSimulator.platform > SDKs > iPhoneSimulator7.0.sdk > Applications.
and reboot the simulator. The app will be preinstalled like other apps in simulator. Ready enough to test your app functionality with pdf readers or any app you want.

iOS library not loaded when using IPA

My code uses an external library using dlsym (for reasons out of my control).
In order Xcode to find my library, I had to do 2 things:
-force_load "$(SRCROOT)/pathTo/myLibrary.a"
Dead-Code Stripping: NO
This works fine when running wit the debug profile. Both on the simulator and on a physical device, the library is loaded and works.
However if I create an AdHoc IPA file and install it on my device, this same library is no longer found.
What could be the difference?
This is what solved the issue:
In Build Settings → Deployment → Strip Linked Product, select
NO.

Different Xcode versions and jailbroken devices

Is it possible to have an Xcode version installed and set up for apps ad hoc distribution, with distribution certificate and provisioning profile and so on, and at the same time to install another Xcode version and patch it with JailCoder or avoid codesigning apps built by that Xcode? I mean, without interfering with the settings of the former Xcode version.
I'd like to test deployment on jailbroken devices but keeping an Xcode with the settings needed for that purpose separately.
Thanks!
you can install multiple versions of xcode on your computer if you want the same version installed twice... then you will have to change the name of it so your computer doesn't recognize you as having it and will create a new one... or you can copy paste it ... either way yes, you can have multiple versions ...
Yes, you can always install multiple versions of Xcode on one machine by simply choosing a different install location during the installation process (do not accept the default installation location for the second version).
Disabling the requirement to code sign iOS apps is done by modifying a .plist file, that's nested under the install directory for Xcode. For example, the default location (adjusting for SDK version) is:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/SDKSettings.plist
So, changing this file to modify one Xcode install will have no effect on the other.

How to compile OpenSSH sourcecode into ios app

I had already written an iOS app that uses OpenSSH, but this requires a device jailbreak and the install of OpenSSH in Cydia. For now, I am finding a way to get the OpenSSH source code to compile into my iOS app, and to distribute this App in Apple Enterprise Developer 'In House' way. If this works, no jailbreak would be required.
But I can not find any sample or source code which can be integrated into an XCode iOS device project. Any information is appreciated!
Instead of OpenSSH, you could use libssh if you need a server, or libssh2 if a client is sufficient. For libssh2, x2on has already made the migration effort. You can get the repo here: https://github.com/x2on/libssh2-for-iOS.
If you intend to use libssh, beware that it's LGPL licensed, so it's not compatible with the AppStore (but should be compatible with in house distribution).

How to build Apple's GCC on Linux/Windows?

I don't have a Mac, but I have an iPhone. I want to develop applications for iPhone.
After some research I think I need just the headers and library from the free SDK, and a GCC build that supports ARM/Mach-O.
Apple released the code for GCC used in the iPhone SDK (they had to), So I think if I could build it on Windows or Linux, I can use it with the headers and libs from the SDK to develop iPhone apps.
I can then install the app on any Jailbroken iPhone.
How to build it on any non Apple machine?
Look into winchain - this tool builds the iphone chain on windows allowing you to compile iphone apps on windows:
http://code.google.com/p/winchain/wiki/HowToUse
-Adam
Check iOS Build Environment for Windows. From what I see it uses llvm compiler and is frequently updated. You can use it with your own editor or use a stand alone wizard to generate a Visual Studio project (works with both VC++ and VC++ express). The only disadvantage is that it has a demo version and requires donation for full version. However I expect you would be able to use the toolchain included in the demo without a problem.
I've downloaded the demo and played along with my own project and samples provided. It compiles just fine. Unfortunately I'm unable to test the results on my devices since none of them is currently jailbroken.

Resources