Advertise Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Your First iPhone App
($1.99)

iPhone Code Generator
($9.99)

Calcuccino Programmers' Calculator
($2.99)

DataFon(Build Apps on Windows)
(free)

Infinote Pinboard for Todos and Notes
(free)

picplz
(free)

poG
($2.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Tools & Utilities

Reply
 
LinkBack Thread Tools Display Modes
Old 09-13-2009, 07:13 PM   #76 (permalink)
zim
Registered Member
 
Join Date: Jun 2009
Posts: 13
Default

Quote:
Originally Posted by puy0 View Post
Thanks Zim for the method
I should note again that I just reposted it from an anonymous comment on a blog, I wasn't clever enough to spot those plist entries and change them :-)
zim is offline   Reply With Quote
Old 09-15-2009, 01:18 PM   #77 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 2
Default how do i remove script?

How do I remove the self signing script and the wildcard developers certificate. Do you need to do this to build and go with just editing of the plist file.
alui is offline   Reply With Quote
Old 09-21-2009, 01:34 AM   #78 (permalink)
zim
Registered Member
 
Join Date: Jun 2009
Posts: 13
Default

Quote:
Originally Posted by alui View Post
How do I remove the self signing script and the wildcard developers certificate. Do you need to do this to build and go with just editing of the plist file.
There are two ingredients for build-and-go.

The first is that, by default, Xcode does not allow you to build an iPhoneOS application that is not signed with a valid certificate. You must bypass this in some way. Editing the plist acheives this.

The second is that the device itself checks the signature of applications at some key points, eg, installation (disabled via installd aka MobileInstallation patching) and debugging. That's what the self signing script is for: to make sure the application has a signature.

If you skip that step, you will not be able to debug your applications on device (predictive assumption, since I'm not inclined to verify my claim :-)
zim is offline   Reply With Quote
Old 09-22-2009, 10:47 AM   #79 (permalink)
Registered Member
 
Join Date: Aug 2009
Posts: 8
Default

after changing the plist for OS 3.1 my xCode crashes every tme i open one of my iphon projects
knigge is offline   Reply With Quote
Old 09-24-2009, 05:11 PM   #80 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 1
Default

anyone already has a clue how to remove the need for a valid provisioning profile with Xcode 3.2 and SDK 3.1?
Hijinxs is offline   Reply With Quote
Old 09-25-2009, 03:14 PM   #81 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 2
Default

OK. I'm trying to install an ipa file onto a non jailbroken iphone os 3.0.1 with xcode 3.2. I have edited the sdksettings.plist file so that code singing and entitlements are set to no. I have also edited the info.plist file in the application so that it is set to don't code sign. I get an unknown error after it tries to install the files. There are reports that it is possible to self sign or bypass provisioning on a non jailbroken phone. the 3.1 jailbreak isn't out yet for the 3gs so any help would be appreciated.
alui is offline   Reply With Quote
Old 09-30-2009, 10:57 AM   #82 (permalink)
Registered Member
 
Join Date: Sep 2009
Location: Belgrade
Posts: 3
Default xcode 3.2 - device debug on sdk 3.1

Hi all, here's all what you need to do for enabling device debug on iPhone OS 3.1 and Xcode 3.2:
  1. Change SDKSettings.plist (backup first)

    - backup it first (terminal command)
    sudo cp -p /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.sdk/SDKSettings.plist /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.sdk/SDKSettings.plist.bak

    - now edit it (terminal command)
    sudo pico /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.sdk/SDKSettings.plist

    - edit instructions:
    change DefaultProperties/CODE_SIGNING_REQUIRED and ENTITLEMENTS_REQUIRED - set to NO.

    from now on, don't use code signing in project settings!

  2. Turn off code signing in the project settings

  3. Here's the gen_entitlements.py code, just save it as file somewhere.

    Code:
    #!/usr/bin/env python
    
    import sys
    import struct
    
    if len(sys.argv) != 3:
    	print "Usage: %s appname dest_file.xcent" % sys.argv[0]
    	sys.exit(-1)
    
    APPNAME = sys.argv[1]
    DEST = sys.argv[2]
    
    if not DEST.endswith('.xml') and not DEST.endswith('.xcent'):
    	print "Dest must be .xml (for ldid) or .xcent (for codesign)"
    	sys.exit(-1)
    
    entitlements = """
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>application-identifier</key>
        <string>%s</string>
        <key>get-task-allow</key>
        <true/>
    </dict>
    </plist>
    """ % APPNAME
    
    f = open(DEST,'w')
    if DEST.endswith('.xcent'):
    	f.write("\xfa\xde\x71\x71")
    	f.write(struct.pack('>L', len(entitlements) + 8))
    f.write(entitlements)
    f.close()
  4. Insert new run script build phase in the project (project/new build phase/new run script build phase)
    Make sure you set the right path to gen_entitlements.py


    Code:
    export CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
    if [ "${PLATFORM_NAME}" == "iphoneos" ]; then
    	/Users/tadija/Documents/Tutorialz/iPhone/DeviceDebug/gen_entitlements.py "my.company.${PROJECT_NAME}" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent";
    	codesign -f -s "iPhone developer" --entitlements "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent"  "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/"
    fi

Thanks to all the others in this thread who contributed to this solution.

o/
tadija is offline   Reply With Quote
Old 10-01-2009, 02:46 AM   #83 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 1
Default

I tried and it returns an error: "object file format invalid or unsuitable".
Does anyone have a solution ?
Thanks.

Last edited by mallmertl; 10-02-2009 at 09:13 PM.
mallmertl is offline   Reply With Quote
Old 10-02-2009, 03:46 PM   #84 (permalink)
Registered Member
 
Join Date: Oct 2009
Posts: 3
Default Same problem

i have the same problem:

/Users/ax/Documents/HelloWorld/build/Release-iphoneos/HelloWorld.app/: object file format invalid or unsuitable

Command /bin/sh failed with exit code 1


anyone can help?
p4wn33 is offline   Reply With Quote
Old 10-02-2009, 04:01 PM   #85 (permalink)
Registered Member
 
Join Date: Oct 2009
Posts: 3
Default ...

i found another script on a tutorial released to fw 2.0.0 and 2.0.1 versions, but, that script search an "ResourceRules.plist" inside the .app


Script (by 246tNt's corner of web - iPhone stuff


export CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
if [ "${PLATFORM_NAME}" == "iphoneos" ]; then
/Users/youruser/bin/gen_entitlements.py "my.company.${PROJECT_NAME}" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent";
codesign -f -s "iPhone developer" --resource-rules "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/ResourceRules.plist" \
--entitlements "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/"
fi


i look inside my HelloWorld.app when it runs on iPhone simulator in Release mode and that is your content:


ax$ ls -ltra
total 72
-rw-r--r-- 1 ax staff 968 Oct 2 17:19 MainWindow.nib
-rwxr-xr-x 1 ax staff 22408 Oct 2 17:19 HelloWorld
drwxr-xr-x 4 ax staff 136 Oct 2 17:19 ..
-rw-r--r-- 1 ax staff 8 Oct 2 17:44 PkgInfo
-rw-r--r-- 1 ax staff 541 Oct 2 17:44 Info.plist
drwxr-xr-x 6 ax staff 204 Oct 2 17:44 .



No ResourceRules.plist.

I try to override the 'ResourceRules.plist' by 'Info.plist' but it results the same problem (object file format invalid or unsuitable)


Please Help!
p4wn33 is offline   Reply With Quote
Old 10-05-2009, 02:04 PM   #86 (permalink)
Registered Member
 
Join Date: Sep 2009
Location: Belgrade
Posts: 3
Default

I have changed that script so it shouldn't look for "ResourceRules.plist" (because in xcode 3.2 projects that file is missing), and that solved my problem.

I don't really know why this doesn't work for you, so I'll attach my file for you to try (maybe it can't just be copy/pasted & saved).

Let me know if this works.
Attached Files
File Type: zip gen_entitlements.py.zip (1.0 KB, 116 views)
tadija is offline   Reply With Quote
Old 10-22-2009, 11:53 AM   #87 (permalink)
Registered Member
 
Join Date: Jun 2009
Posts: 60
Default please help

Hi p4wn33,

were you able to figure this out?

I have the same problem with exit code 1.

I'm using 10.5.8 and 3.1.2 sdk trying to build for 3.0 firmware.

Please help me,

Thanks,


Quote:
Originally Posted by p4wn33 View Post
i found another script on a tutorial released to fw 2.0.0 and 2.0.1 versions, but, that script search an "ResourceRules.plist" inside the .app


Script (by 246tNt's corner of web - iPhone stuff


export CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
if [ "${PLATFORM_NAME}" == "iphoneos" ]; then
/Users/youruser/bin/gen_entitlements.py "my.company.${PROJECT_NAME}" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent";
codesign -f -s "iPhone developer" --resource-rules "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/ResourceRules.plist" \
--entitlements "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/"
fi


i look inside my HelloWorld.app when it runs on iPhone simulator in Release mode and that is your content:


ax$ ls -ltra
total 72
-rw-r--r-- 1 ax staff 968 Oct 2 17:19 MainWindow.nib
-rwxr-xr-x 1 ax staff 22408 Oct 2 17:19 HelloWorld
drwxr-xr-x 4 ax staff 136 Oct 2 17:19 ..
-rw-r--r-- 1 ax staff 8 Oct 2 17:44 PkgInfo
-rw-r--r-- 1 ax staff 541 Oct 2 17:44 Info.plist
drwxr-xr-x 6 ax staff 204 Oct 2 17:44 .



No ResourceRules.plist.

I try to override the 'ResourceRules.plist' by 'Info.plist' but it results the same problem (object file format invalid or unsuitable)


Please Help!
FerrariX is offline   Reply With Quote
Old 10-22-2009, 11:54 AM   #88 (permalink)
Registered Member
 
Join Date: Jun 2009
Posts: 60
Default script

Hi tadija,

I've tried your script but it still says exit code 1.

I'm using 10.5.8 with 3.1.2 sdk and xcode 3.14, compiling for 3.0 iphone.

Have you made any new discovery?

Thanks,
FerrariX is offline   Reply With Quote
Old 10-26-2009, 11:01 AM   #89 (permalink)
Registered Member
 
Join Date: Sep 2009
Location: Belgrade
Posts: 3
Default

I can't get to this error, everything is working fine for me...

Doublecheck that you did all the steps I wrote..

Can someone post printscreen of whole error or maybe few printscreens with all the settings (SDKSettings.plist, xcode project settings, run script build phase) so I can compare them with mine?
tadija is offline   Reply With Quote
Old 10-29-2009, 05:24 PM   #90 (permalink)
Registered Member
 
Join Date: Aug 2009
Posts: 8
Default iPhone SDK 3.2.1 xCode 3.1.4

ok, i got it, when you use a jailbroken iPhone and want to use XCode 3.1.2 and iPhone SDK 3.2.1 (guess it works with 3.0 too) you dont need the gen_entitlements.py and also you dont need the run script. Just change the values of CODE_SIGNING_REQUIRED and ENTITLEMENTS_REQUIRED in SDKSettings.plist to NO and install the installd patch on the iPhone through Cydia (it wont work without it). Then just run + go and your app is on your phone

Last edited by knigge; 10-30-2009 at 09:55 AM.
knigge is offline   Reply With Quote
Old 11-03-2009, 07:54 PM   #91 (permalink)
Registered Member
 
Join Date: Oct 2009
Posts: 3
Default working...

knigge has reason, you dont need the gen_entitlements.py and also you dont need the run script.

Sorry for my backwardness friends.
In the same day of my last reply i got it too but, after this i need pay attention to other this.

But now, i will explain the procedures i needed to make it works:
- in the Properties of the project, inside the guide(tab) 'Build', switch the CODE_SIGN_IDENTITY to 'Don't Code Sign' and in his internal option select 'Any iPhone OS Device' and his value to 'Don't Code Sign' too. Save the project.

- before i make this alteration, i include some keys(PLIST_FILE_OUTPUT_FORMAT and PROVISIONING_PROFILE_ALLOWED) at the Info.plist in '/Developer/Platforms/iPhoneOS.platform/' and maybe makes some difference:

<key>DefaultProperties</key>
<dict>
<key>ARCHS</key>
<string>armv6</string>
...
<key>PROVISIONING_PROFILE_ALLOWED</key>
<string>NO</string>
<key>PROVISIONING_PROFILE_REQUIRED</key>
<string>NO</string>
...
<key>STRINGS_FILE_OUTPUT_ENCODING</key>
<string>binary</string>
</dict>

Anyway, im attaching my Info.plist for you to see.
This 2 changes made my XCode just install the app in Device, and in the time to make it run this error occurs:

"Error from Debugger: Error launching remote program: failed to get the task for process 261."

This error occurs to the Release and Debug modes but, before the error occurs the app is successfully installed and just need to be started by the icon on the SpringBoard of Device. I dont have installed the Installd (as knigge has recommended) perhaps this solves the problem, anyway, i will try to install and test again.

Ah, i cant remember if i made the CODE_SIGNING_REQUIRED and ENTITLEMENTS_REQUIRED changes in SDKSettings.plist, i really like to know the path to this file.

Just remembering: im using iPhoneOS 3.1.0 on my device(Pwned), iAtkOS 7.0 on my VAIO (a image of Leopard 10.5.7) and the XCode 3.1.4

---------------

FerrariX: I hope this procedure helps you, if not, please explain better what part of what I found out you would like to know.
If is the tutorial to the 2.0 fw version, here is the link:
246tNt's corner of web - iPhone stuff

---------------

Thanks for all friends! And sorry again for the backwardness - and for my english, send greetings from Brazil. =)

Good Luck!
Attached Files
File Type: zip Info.plist.zip (1.4 KB, 71 views)
p4wn33 is offline   Reply With Quote
Old 11-15-2009, 06:07 PM   #92 (permalink)
Registered Member
 
Join Date: Nov 2009
Posts: 1
Thumbs up

Quote:
Originally Posted by tadija View Post
Hi all, here's all what you need to do for enabling device debug on iPhone OS 3.1 and Xcode 3.2:
[...]
[...]
[...]
Thanks to all the others in this thread who contributed to this solution.

o/
Tadija... Hvala, brat! Mnogo, mnogo!

Your solution works perfectly on Xcode 3.2.1 on OS X 10.6.2 and iPhone 3.0 JB!
(partly) Thanks to you I won't have to use VB6 to code that college project, but be able actually learn something that I can use in the real world!
So yeah, thanks a lot to you and the rest who made this possible!

Update: Still works after updating firmware to 3.1.2 (as expected). Thanks again Tadija!

Last edited by =qp=; 01-18-2010 at 04:36 PM. Reason: Update
=qp= is offline   Reply With Quote
Old 12-08-2009, 12:47 PM   #93 (permalink)
Registered Member
 
Join Date: Jun 2009
Posts: 60
Default

Thanks guy,

I finally got it to work.

However, I cannot debug, is there any way around this (besides paying apple)?

Install runs fine on iphone just can't debug.

Thanks,

-FerrariX
FerrariX is offline   Reply With Quote
Old 12-11-2009, 10:34 PM   #94 (permalink)
Registered Member
 
Join Date: Aug 2009
Posts: 3
Default Problem

I edited info.plist
and the other one (code_sign, provisioning, etc)
I edited the settings in xcode
I have 3.1.2 and 3.2.1
This is the error message I get:

http://www.iphonedevsdk.com/forum/at...rormessage.jpg
Attached Images
File Type: jpg errorMessage.jpg (38.2 KB, 2 views)

Last edited by Crallion; 12-14-2009 at 04:25 PM.
Crallion is offline   Reply With Quote
Old 12-13-2009, 01:56 PM   #95 (permalink)
Registered Member
 
Join Date: Jun 2009
Posts: 6
Default

I remember doing this sort of this when 2.2.1 was around, and it was simple. Now, it obviously isn't.

I'm at the point where, when building, it says:
Code Sign error: a valid provisioning profile matching the application's Identifier 'com.yourcompany.blabla' could not be found

Any ideas with this??? Don't want to pay $99 when I'm still in the very early stages of learning these things.
BeSweeet is offline   Reply With Quote
Old 12-20-2009, 11:08 AM   #96 (permalink)
Registered Member
 
Join Date: Dec 2009
Posts: 1
Default

hey
i need this tutorial for xcode 3.2.1 and SDK.3. who can help?

thx
mukraker is offline   Reply With Quote
Old 12-20-2009, 09:21 PM   #97 (permalink)
Registered Member
 
Join Date: Jun 2009
Posts: 6
Default

Quote:
Originally Posted by mukraker View Post
hey
i need this tutorial for xcode 3.2.1 and SDK.3. who can help?

thx
Here you go: On-Device Testing w/out Paying $99 | Gumball Tech
BeSweeet is offline   Reply With Quote
Old 01-11-2010, 03:32 AM   #98 (permalink)
Registered Member
 
Join Date: Jul 2009
Posts: 5
Default

Hey guys. The Gumball Tech article doesn't fully work. It will get you as far as loading the app onto the device, but it doesn't properly accomplish the debugger attaching. Here's the correct method:

Developing for a Jailbroken iPhone A to Z (iPhone 3.1.2) | alexwhittemore.com

credit to you guys, all the steps were here, they just weren't put together right.


The problem is that you have to disable Xcode code signatures entirely. legitimate but fake code signature seems to cause a segfault in whatever app you're trying to run as soon as the debugger tries to launch it. It'll run manually, but the debugger can never attach. On the other hand, using gen_entitlements.py is the correct route, those signatures don't cause the same segfault. However, in the current version of xcode, the run script build phase is executed before the CODESIGN, meaning that xcode just stomps on the script's signature.

Basically, you have to disable real signature then enable fake signature via that run script build phase. Then, assuming you have Installd Patch on your device, you're good to go.
alexwhittemore is offline   Reply With Quote
Old 06-21-2010, 02:39 PM   #99 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 3
Default

Hi

I tried with no success to implement the procedure. I have xcode version 3.2.2 and Mac OSX 10.6.4

Has anyone tried to build with those versions?

Thanks
mrgreen is offline   Reply With Quote
Old 06-21-2010, 02:45 PM   #100 (permalink)
Registered Member
 
Join Date: Jul 2009
Posts: 5
Default

I haven't been refreshing/testing my method for the past few weeks both because I've been studying abroad (which is time consuming) and because iOS 4 was so close to dropping anyway. The correct thing to do now is to not waste time and effort trying to get 3 to work. Just give it a while and a method for 4 will, I'm sure, get pieced together.
alexwhittemore is offline   Reply With Quote
Reply

Bookmarks

Tags
3.0, jailbreak, provisioning, sdk, xcode

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


» Advertisements
» Stats
Members: 51,375
Threads: 52,830
Posts: 225,478
Top Poster: BrianSlick (3,576)
Welcome to our newest member, darrentousignant
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:31 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0