Jailcoder how to - iphone

I just tried to get my own app on my iPhone without a developer account. The following are steps I did:
I patched Xcode and my project (Currency.xcodeproj) with JailCoder
I want to build the project with "iOS device" in Xcode. But I got a error message like "no device found". So I ran it in the emulator and I got the currency.app-file in /Users/Dogan/Library/Developer/Xcode/DerivedData/Currency-gjxrulouxbmjslbzslsplyehgfgm/Build/Products/Debug-iphonesimulator
SSH to iPhone in /var/mobile/Applications
Creating a new folder named FADE9826-4878-4458-B5BE-90AD4EB60FDF (I have to take a valid UDID. Have I use to specific tools to create a UDID? I have the UDID from an other example). I also created a directory in this folder with the name "Documents".
chown -R mobile FADE9826-4878-4458-B5BE-90AD4EB60FDF
scp -r Currency.app root#IP-ADRESS-OF-IPHONE:/var/mobile/Applications/FADE9826-4878-4458-B5BE-90AD4EB60FDF/
Restarting Springboard in SSH with "killall SpringBoard"
I got the app, but it doesn't work. Every time on click, it crashes and kicks me to the home screen. Had I missed something?

You missed that simulator builds don't work on iPhones, because they are built for the wrong CPU type. Simulator builds are Intel x86 apps, and the iPhone has an ARM CPU.
There might be other problems (I don't know how jailcoder works) but there's no way you're getting the simulator build running on the phone.

After downloading Jailcoder and going through the guided patch of Xcode and then patching your project, if your device is plugged into your computer, select the target type (where you can select simulator, iOS Device, etc.) and there should be a listing of your device's name.

Related

Why does Xcode successfully build & copy my application, but won't launch it?

Developing an iPhone application on Xcode 4.5.2. Device: iPhone 4.
I was preparing my application for sending it to someone through testflight. I created a distribution profile and certificate for this. I did it following this: https://stackoverflow.com/a/11917884/555690
Anyway, recently, Xcode is unable to launch my project. When I press Run, it will successfully build and copy the files to the device, but when attempting to launch it, it will send an error:
Error launching remote program: No such file or directory
(/Users/Me/Library/Developer/Xcode/DerivedData/MyGame-xxxxxxxxxxxxxxx/Build/Products/Debug-iphoneos/MyGame.app/MyGame).
I'm not sure why is this happening.
A very similar question is this: Xcode successfully builds my target, but does not run the product, however, it seems to be more oriented to OSX instead of iOS, and the solutions there haven't helped me either. Also, I do get an error (he doesn't get an error).
If I run the app in the device (without Xcode), it works fine.
Yes, this happens a lot in the new Xcode.
One recipe that should work is:
disconnect the device from computer
delete app from device
reset the device
quit the xcode (not just by closing the project, quit the program)
in Finder go to ~/Library/Developer/Xcode/DerivedData
(Library folder is hidden: you can open Finder->Go->Go to Folder...)
delete all subfolders there
empty the trash
reconnect the device
open the project
now you should be able to run the app on the device again

Running iOS Simulator on Network User Accounts

I help manage a Mac-based graphics labs and I teach web design for my university's art department. I installed Xcode and the iPhone SDK/simulator so that the students can have experience testing websites on mobile devices (such as the iPhone or iPad). The simulator works just fine when logged in as the local admin user for the computer, however the iOS simulator fails to launch when logged in with one of the student accounts (which are hosted from Snow Leopard Server) or any other networked account.
The simulator begins to launch (and the application does open) but it gives me this message:
The simulated application quit.
Click Relaunch to try again.
My options are "Quit", "Switch SDK..." or "Relaunch".
Is it possible for the simulator to launch using a network account? If so, does anybody know how?
The client computers are running Mac OS 10.6.8 and the server is also on 10.6.8. I'm using Xcode 4.2 with the iOS 5 SDK (for Snow Leopard).
Thanks in advance.
I had the exact same problem, for some reason the iPhone Simulator doesn't like it when the ~/Library/Application Support/iPhone Simulator directory isn't on the local volume.
Here's the fix/workaround:
rm -Rf "~/Library/Application Support/iPhone Simulator"
mkdir "/Developer/Local/$USER/.iPhoneSimulator"
ln -s "/Developer/Local/$USER/.iPhoneSimulator" "~/Library/Application Support/iPhone Simulator"
Using the /Developer/Local directory is totally arbitrary, as long as you choose a place on the same drive as the iPhone simulator it will work. Of course, /Developer/Local/$USER should also have the correct permissions so $USER can actually use it.
Cheers
It seems that with every new OS X and Xcode release, something else breaks with regard to running Xcode on network home directories.
Our method of getting around this was to have students set their Derived Data location to /tmp/username in Xcode settings. This will create that folder when they try to build a project. Then we can place a symbolic link, ~/Library/Developer/CoreSimulator -> /tmp/username and this way the iOS Simulator will work for them.
Also, having Derived Data in /tmp/username really improves build performance and reliability.
I don't think many people use OS X and Xcode in this configuration; it's very common in university computer labs where you need to have students able to log into any workstation and have their own environment. I wouldn't mind it so much if they didn't change something new every year which breaks Xcode causing us to have to fix it all over again.

How to check my app on client's simulator

Is there any way that client can check my app on his simulator what should i do for that...I do not want to send code of my application to him.....
I know adhoc is required to test on device but here i want to run on his simulator...
Build your app for the iPhone Simulator (iOS 4.2 on this example) and run it from Xcode.
The app should now be stored in a coded subfolder under
~/Library/Application Support/iPhone Simulator/4.2/Applications/ (e.g. ~/Library/Application Support/iPhone Simulator/4.2/Applications/E5548CB9-0A50-49EF-92AB-39F10820D9D6/)
Send your client the whole subfolder (E5548CB9-0A50-49EF-92AB-39F10820D9D6) and tell him to copy it over to /Library/Application Support/iPhone Simulator/4.2/Applications/, then run the iPhone simulator. He should be able to see the app on the simulator and run it. Note that the app will probably appear on the second 'page' of the simulator, so you client may need to scroll to the right.
You can test this between different machines at your own office prior to sending it to your client. He'll have to have Mac OS X 10.6 with the latest iOS SDK installed of course.
Go: Macintosh HD\Users\ YourUserName\Library\Application Support\iPhone Simulator\ iPhoneVersionNumber\Applications:
Then you have to look through each "AJ2783FO29ZO38-WSOHF93" weirdly named folder and find the one that is your app folder. Copy it and put it in the same place on your clients computer.
I have not personally tried this myself. Let me know if you need any other information!
There is no Apple supported method. However if you quit your Simulator after installing your app, zip up your entire Library Applications Support directory for the iPhone Simulator, send it to the client and have the client replaces theirs (after a backup of their Library, or maybe running in another Mac User account). Then when they start their Simulator (has to be from the exact same Xcode/SDK installer as yours), they will see a clone of your Simulator, with your app installed.
Trying to copy just the app bundle may or may not work, as some versions of the Simulator depend on metadata elsewhere within the App Support dir.

"Failed to upload *.app on Device " Error in iPhone

I am getting an error while uploading my app on device. It does installs it but not able to upload it.
Also I want to run the instrument tool on device but when I run it shows nothing.
Anyone facing the same issues.
I had this problem after changing around provisioning profiles and app ID's.
What fixed it for me:
Quit XCode
In Terminal.app, navigate to your project directory and execute rm -rf build/
Restart XCode
I also confirm, that I had that issue on Xcode 3.2.5 and iOS 4.2 GM Seed and after adding new provisioning profile.
You do not have to use terminal, you can select *.app from Products Group in 'Groups & Files' pane in Xcode. Then right-click on it, and select 'Reveal in finder'. Then manually delete the build catalogue. And restart Xcode.
Worked for me.
I was getting this issue on an iPhone running 3.0 software, but it was working fine on phones running 3.1. The app used to work on the 3.0 software until we added users to the provisioning for the app - this is the only thing I can think of that might have caused it.
If you're running 3.0 still, try upgrading to 3.1 and see if that fixes it.
I had the same error message in iOS 4.1 but from a different cause: when trying to link to a universal (ARM & X86) static library that was over 10MB. If I link directly to the ARM version of the static library (for iPhones), then it works fine.
Sometimes manual delete of Build folder of your application fails to solve the problem
"Failed to upload the .app on device"
Try
WIndows->organizer->Provisioning profile(in left pane)->refresh it once....
This has solved my problem!

iPhone Application works on simulator & when exported to device, but not via cydia

What I want to do:
Deploy an App to my phone using SCP without a dev license.
What Is Happening:
I can test on simulator and device and the Application works 100%. When I scp the app to the Applications folder on my phone, the icon shows, and the app opens for about a couple of seconds then closes (you don't see anything except a black background).
I tried using ldid to sign it and the main binary is set to 0755 and chown'd to root:wheel.
I have tried various permission situations and the app pretty much does the same thing no matter what.
What is causing this to happen? I know this is possible as EVERYONE who uploads apps to cydia follows this same process.
Thanks in advance.
The compiled binary on the device is an x86 binary, you need a different build for iPhone.
Check the syslog and see what it says when you tap the app icon. If it says "killed", download the ldid package from Cydia and cd to your application folder and sign it with ldid -S binaryname.
Also, are you compiling using the Open Toolchain or Apple's?