开发者

How to copy/run my .app file from the builds folder of xcode to the /Applications folder on my iphone? (jailbroken)

so I've developed an app. Now I manually placed the .app file into the /Applications folder of my iphone (root). Than I did:

It sounds like the application isn't signed. Download ldid from Cydia and then use it like so: ld开发者_如何学Pythonid -S /Applications/AccelerometerGraph.app/AccelerometerGraph

Also be sure that the binary is marked as executable: chmod +x /Applications/AccelerometerGraph.app/AccelerometerGraph

(via)

Than I used UICache to make the app visible. And if I run it it shows a black screen for a 1/4 second and then it closes...(I'm not a member of the iphone dev program).

Did I something wrong?

Is there a better way?

Thank you very much! :)


I just spent a perfect Saturday afternoon looking for a solution to the exact same problem. It is a code signing problem.

Here is what I was using Xcode4 and iOS 4.3 SDK . I was building to a test device an iphone 3G running iOS 3.1.2 (jailbroken)

NOTE: ldid method did not work for me and kept on throwing the following error (Some Details on why its not working I tried using armv6 architecture through xcode4 but ldid still gave the same error):

codesign_allocate: object: MyAppName.app/MyAppName malformed object (unknown load command 4) util/ldid.cpp(582): _assert(0:WEXITSTATUS(status) == 0)

Here is what worked for me:

Step 1. Create a Self Signed Certificate.

1- Launch Keychain Access.app. With no items selected, from the Keychain menu select Certificate Assistant, then Create a Certificate.

Name: iPhone Developer Certificate Type: Code Signing Let me override defaults: Yes

2- Click Continue

Validity: 3650 days

3- Click Continue

4- Blank out the Email address field.

5- Click Continue until complete.

You should see "This root certificate is not trusted". This is expected.

via (note: you dont need to be a member of the iphone dev program to make this work even though the title of the accepted answer in the link might suggest that)

Step 2. Set xCode to allow the self-signed certificate to be used

You have to edit the Info.plist file under /Developer/Platforms/iPhoneOS.platform/Info.plist

(I have installed xcode at a different location so that path for me was xcode4/Platforms/iPhoneOS.platform/Info.plist)

1- You will not be able to edit the file in its current location so just copy it to the desktop and open it in a text editor.

2- You need to Replace all instance of XCiPhoneOSCodeSignContext with XCCodeSignContext and save the file.

3- Then drag and drop the edited file back to iPhoneOS.platform folder and replace the old file. (Make sure xcode is not running if it is then restart it)

Step 3. Change the Code Signing Identity setting in your project

Change the code signing identity for your project and your target to iPhone Developer

1- In xcode4 you have to select your project (from the left navigator panel) -> Select you Project from the center under (PROJECTS) -> Build Settings -> Code Signing (expand the menu) and change all options to iPhone Developer

2- In xcode4 with your project selected from the left panel in the center of the screen you will see PROJECT and TARGETS. Now select the targets and do that same: Targets -> Build Settings -> Code Signing (expand the menu) and change all options to iPhone Developer

Step 4. Build the App and Deploy

1- Make Sure at the top of xcode next to the run and stop buttons under Scheme you have iOS Device (your device name) selected and NOT Simulator (this is how its done in xcode4)

2- Open the Scheme menu and with the iOS Device Scheme selected click edit scheme. Select Run from the left menu and under the Info tab set Build Configuration to Release

3- Now make sure you have your iOS device connected and its scheme is selected and hit Run (note: you will get some warnings but as along as the build succeeds you are okay)

if all goes well you should be able to see YourApp.app under the Products folder on the left side now select YourApp.app open it in Finder. Your app should be in a folder called Release-iphoneos Copy it to /Applications dir on your iOS device and respring or UICache to make it appear. (note: you dont need to use ldid now)

Hopefully your app will launch fine. I have only tried this with xcode4 so not sure if it will work for older versions.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜