Topic: úNUse Apple SDK to build apps in XCode (if you don't have codesign cert and provisioning profile) |
| úNUse Apple SDK to build apps in XCode (if you don't have codesign cert and provisioning profile) | Copy to clipboard |
|
Posted by: javacom Posted on: 2008-04-01 23:34 [color=red]see this for updated instruction for building app in Xcode for firmware 2.1 if you don't have codesign cert and provisioning profile from Apple[/color] http://www.iphone.org.hk/cgi-bin/ch/topic_show.cgi?id=6017&pg=2&bpg=1 [code]For 1.1.4 dev, see below[/code] Use Apple SDK to build apps for firmware 1.1.4 using open tool chain header Good stuffs and updated for iPhone SDK Beta 3 read this http://www.hackint0sh.org/forum/showthread.php?t=37998 The Template file for SDK beta 3 is at http://rapidshare.com/files/108139773/sdk3_mod.tgz.html | |
| Use Apple SDK to port 1.1.4 apps to Firmware 2.0 | Copy to clipboard |
|
Posted by: javacom Posted on: 2008-04-18 00:56 [color=red]Use Apple SDK to build apps for firmware 2.0 beta using open toolchain header[/color] Assume, you have installed iPhone SDK Beta 3 and have a pwned iPhone and you want to port some 1.1.x applications to firmware 2.0 using the SDK development environment and the open toolchain header You can do this (1) Install iPhone SDK beta 3 from Apple (2) Install the toolchain headers as per instructions from here http://wikee.iphwn.org/howto:using_sdk_with_toolchain_headers But I have modified it for the Beta 3 SDK path as below [code] [$#160][$#160][$#160][$#160][$#160][$#160]$ sudo mkdir -p /Developer/SDKs/iPhoneOS.sdk/Versions/iPhoneOS2.0.sdk/ [$#160][$#160][$#160][$#160][$#160][$#160]$ svn co http://iphone-dev.googlecode.com/svn/branches/include-1.2-sdk [$#160][$#160][$#160][$#160][$#160][$#160]$ cd include-1.2-sdk [$#160][$#160][$#160][$#160][$#160][$#160]$ ./configure --prefix=/Developer/SDKs/iPhoneOS.sdk/Versions/iPhoneOS2.0.sdk/ [$#160][$#160][$#160][$#160][$#160][$#160]$ sudo sh install-headers.sh [/code] (3) The Xcode template is updated to version 2.1 and includes 3 projects (a) Tool Chain Build (b) Cocoa Touch ToolChain (which includes a local UIKit.h header file for using the new UIKit classes in SDK (you can build UIShowCase (non-IB version)) (c) Window-Based Toolchain (which includes an interface builder (IB) file MainWindow.xib) [IMG]http://www.cocoatouchdev.com/javacom/pwnimg/templateicon.png[/IMG] [COLOR="DarkRed"]The installation instruction for version 2.1 is also revised as below by using the following commands in Mac Terminal [/COLOR] [code] curl http://cocoatouchdev.com/javacom/ToolChainTemplate_v21a.zip > ToolChainTemplate_v21a.zip unzip -o ToolChainTemplate_v21a.zip -d "/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Project Templates" [/code] MD5 (ToolChainTemplate_v21a.zip) = dac6bdf027c490cba32b7b278519e3b7 (4) This template supports "Build and Go" to "Device and Release" only, so you have to connect your iPhone to USB cable when "Build and Go" [IMG]http://www.cocoatouchdev.com/javacom/pwnimg/devicerelease.png[/IMG] (5) When using SDK framework to build toolchain iPhone App, you will discover that the header files are not updated and some methods will fail in the iPhone OS. But now you can update the header file using class-dump, see post 11 of this thread http://hackint0sh.org/forum/showpost.php?p=292669&postcount=11 Additional Info When using this template to create new project. The source code and header files should be added to the ./src folder of the new project and the support files like png and wav and xib (interface Builder) files should be put to the ./resources folder There is a Makefile in the new project folder as well, so that you can run make to compile into .app folder and package it into zip file as well. You can then ssh/scp to the iPhone firmware 2.0 beta for testing. You can try this HelloWorld (using the Toolchain Build template) [iframe]http://www.iphone.org.hk/attach/27916-code.html[/iframe] | |
| TestNavBar¡G Use Apple SDK and open toolchain header | Copy to clipboard |
|
Posted by: javacom Posted on: 2008-04-19 10:51 Assume you have followed the second post to install SDK and old toolchain header and also installed this template You can start test building with more examples here These codes were from the book iPhone Open Application Development and modified for the SDK beta 3 environment and using the template that I have built. It has been tested successfully using the build to device and release under Xcode and for firmware 2.0 beta 3. [img]http://www.cocoatouchdev.com/javacom/pwnimg/devicerelease.png[/img] Project Name : [color=brown]TestNavBar[/color] [iframe]http://www.iphone.org.hk/attach/27972-code.html[/iframe] | |
| TestTransition¡G Use Apple SDK and open toolchain header | Copy to clipboard |
|
Posted by: javacom Posted on: 2008-04-19 10:55 Assume you have followed the second post to install SDK and old toolchain header and also installed this template You can start test building with more examples here These codes were from the book iPhone Open Application Development and modified for the SDK beta 3 environment and using the template that I have built. It has been tested successfully using the build to device and release under Xcode and for firmware 2.0 beta 3. [img]http://www.cocoatouchdev.com/javacom/pwnimg/devicerelease.png[/img] Project Name : [color=brown]TestTransition[/color] [iframe]http://www.iphone.org.hk/attach/27973-code.html[/iframe] | |
| Apple SDK open toolchain header sample code (Hello ToolChain) | Copy to clipboard |
|
Posted by: javacom Posted on: 2008-05-07 15:17 Project Name : [color=brown]HelloToolChain[/color] [iframe]http://www.iphone.org.hk/attach/29259-code.html[/iframe] | |
| Sample Code : HelloTouch | Copy to clipboard |
|
Posted by: javacom Posted on: 2008-05-14 12:37 Project Name : [color=brown]HelloTouch[/color] [iframe]http://www.iphone.org.hk/attach/29693-code.html[/iframe] [img]http://www.cocoatouchdev.com/javacom/pwnimg/hellotouch.gif[/img] | |
| ¦^ÂСG Use Apple SDK to build apps (1.1.4/2.0) with open toolchain header (plus template and sample | Copy to clipboard |
|
Posted by: javacom Posted on: 2008-05-16 11:52 Further updates will be posted here http://www.hackint0sh.org/forum/showthread.php?t=38389 | |
| ¦^ÂСG Use Apple SDK to build apps (1.1.4/2.0) with open toolchain header (plus template and sample | Copy to clipboard |
|
Posted by: gary Posted on: 2008-07-24 09:46 Thanks Javacom, you really eased most pain from us :) One big question, I use scp to transfer my binaries to iPhone for testing. I noticed that I can only run my App for 1st deployment. After that, if I changed the binaries and scp to iPhone.... the App will be killed even I have restarted Springboard. To resolve the issue, for every deployment, I have to reboot my iPhone. Did you experience this trouble? Any method to resolve it? | |
| ¦^ÂСG ¦^ÂСG Use Apple SDK to build apps (1.1.4/2.0) with open toolchain header (plus template and | Copy to clipboard |
|
Posted by: javacom Posted on: 2008-07-24 16:27 gary wrote: Thanks Javacom, you really eased most pain from us :) One big question, I use scp to transfer my binaries to iPhone for testing. I noticed that I can only run my App for 1st deployment. After that, if I changed the binaries and scp to iPhone.... the App will be killed even I have restarted Springboard. To resolve the issue, for every deployment, I have to reboot my iPhone. Did you experience this trouble? Any method to resolve it? If you use the ldid in iPhone, make sure you update the odcctools and ldid, saurik has issued a new version. Moreover, he has released an intel binary Mac OS X version as well http://test.saurik.com/c1d0ze/ldid-osx this is how to use it in Mac OS X, you can add it in your Makefile [code] export CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate [$nbsp][$nbsp]./ldid -S $(PROJECTNAME) [/code] OK you problem was discussed in the mailing list of cydia as quoted below use an undocumented -s (small s) option for ldid in iPhone Mapping a binary into memory that has already been mapped in order to modify its pages can cause problems. It's not that ldid is failing, its that your binary is having a hash mismash with itself. If you need to codesign the same binary twice you can either A) try ldid -s (which will update the hashes on a patched binary, unlike -S which reallocates the file) or copy the file to a new file, delete the old one, and move the new one back to the old name (which creates a new inode, which no longer has cached hashes), at which point ldid will work again on the file. [/qoute] | |
| XCode Template for pwned frmwaer 2.0 and Final SDK | Copy to clipboard |
|
Posted by: javacom Posted on: 2008-07-28 18:51 Here is the update of Xcode Template for pwned firmware 2.0 and open toolchain using the Final SDK. (1) If you have not installed the open toolchain header, please refer to the this post (point 2) to install it http://www.hackint0sh.org/forum/showthread.php?t=38389 (2) Installed the Apple's Final iPhone SDK (build 9M2199a) in Mac and with pwned iPhone OS 2.0 (3) Follow this guide to create a self-signed certificate http://developer.apple.com/documentation/Security/Conceptual/CodeSigningGuide/Procedures/chapter_3_section_2.html If you are already registered iPhone Developer, please create the certificate name to something else e.g. "iPhone Pwned Developer" (4) You should follow this to patch the SpringBoard and MobileInstallation in pwned iPhone OS 2.0 firmware. I have tested this patch using iPhone 1st generation and working fine. http://www.246tnt.com/iPhone/#xcode But I have made some modifications to the procedure as below, as the self created certificate "iPhone Developer" will ambiguously match with your existing certificate, if you are already iPhone Registered Developer. So I change the certificate name to "[COLOR="red"]iPhone Pwned Developer[/COLOR]" for the following procedure and the Xcode template in point 4 If you have already patched the SpringBoard and MobileInstallation, you don't need to do this again. [code] #/bin/sh #assume your iPhone IP is this, change this if it is not export IPHONE_IP=10.0.2.2 mkdir iphone_tmp cd iphone_tmp scp root@$IPHONE_IP:/System/Library/PrivateFrameworks/MobileInstallation.framework/MobileInstallation . scp root@$IPHONE_IP:/System/Library/CoreServices/SpringBoard.app/SpringBoard . cp MobileInstallation MobileInstallation.bak cp SpringBoard SpringBoard.bak curl -O http://www.246tNt.com/iPhone/iphone_binary_patch curl -O http://www.246tNt.com/iPhone/SpringBoard.xcent chmod +x ./iphone_binary_patch ./iphone_binary_patch export CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate codesign -s "iPhone Pwned Developer" -f MobileInstallation codesign -s "iPhone Pwned Developer" --entitlements SpringBoard.xcent -f SpringBoard scp MobileInstallation root@$IPHONE_IP:/System/Library/PrivateFrameworks/MobileInstallation.framework/MobileInstallation scp SpringBoard root@$IPHONE_IP:/System/Library/CoreServices/SpringBoard.app/SpringBoard [/code] (4) Download this template and use this command to install in your mac. The installation will go to "Application Pwned" directory of the Project Template. This template already incorporated a shell script build to codesign the binary before installation to iPhone. [code] curl http://cocoatouchdev.com/javacom/ToolChainTemplate_v3.zip > ToolChainTemplate_v3.zip unzip -o ToolChainTemplate_v3.zip -d "/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Project Templates" [/code] MD5 (ToolChainTemplate_v3.zip) = fd88fe59395ec530d5fc793cc9c85a1d There is currently only one template in this update [img]http://www.cocoatouchdev.com/javacom/pwnimg/templateicon_v3.png[/img] (5) This template supports "Build and Go" to "Device and Release" only, so you have to connect your iPhone to USB cable when "Build and Go". It also supports setting breakpoint and debug iPhone program in Xcode. [img]http://www.cocoatouchdev.com/javacom/pwnimg/devicerelease.png[/img] (6) If you rebuild the project using this template, please [COLOR="Red"]uninstall any previous build using the Xcode Organizer[/COLOR] before "Build and Go" again. This will ensure that Xcode to regenerate the application map. If you uninstall the previous build by simply remove the application icon in iPhone, your subsequent "build and go" would fail. If you forgot to remove the previous build, your second "Build and Go" would fail as well. [img]http://www.cocoatouchdev.com/javacom/pwnimg/uninstallapp.png[/img] (7) The source code should be in the "Classes" directory and Resources file like png should be in the "Resources" directory of the Project. (8) There is also a Makefile in the project template, so that you can run "make" then "make install" to the /Applications/ directory of iPhone. The Makefile will make use of the Mac OS X Intel binary of ldid (from Saurik) to sign the binary before ssh to iPhone. (9) If you want to uninstall the previous version 1/2 of this Xcode Template. You can do this by [code] rm -fr "/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Project Templates/Open Tool Chain" [/code] | |
| ¦^ÂСG Use Apple SDK to build apps (1.1.4/2.0) with open toolchain header (plus template and sample | Copy to clipboard |
|
Posted by: gary Posted on: 2008-07-29 09:16 Hi Javacom, ·Q°Ý, ¦³µL§¹¾ãupdateªº2.0 open toolchain header ¤U¸ü? ¦Û¤v¥Îclass-dump generate¥X¾¤d header, ·¥Ãø§ï... | |
| ¦^ÂСG ¦^ÂСG Use Apple SDK to build apps (1.1.4/2.0) with open toolchain header (plus template and | Copy to clipboard |
|
Posted by: javacom Posted on: 2008-07-29 09:42 gary wrote: Hi Javacom, [$#160][$#160][$#160][$#160]·Q°Ý, ¦³µL§¹¾ãupdateªº2.0 open toolchain header ¤U¸ü? ¦Û¤v¥Îclass-dump generate¥X¾¤d header, ·¥Ãø§ï... If you install the cydia package called iPhone 2.0 toolchain from Bigboss in iPhone. I think this is the latest one and will install in /var/include/ But still need the time to look into it. I am still looking the way how to add them in the Xcode environment. But this package does not include the iPhone official SDK header file which is already included in Final SDK that you install. | |
| ¦^ÂСG ¦^ÂСG ¦^ÂСG Use Apple SDK to build apps (1.1.4/2.0) with open toolchain header (plus templa | Copy to clipboard |
|
Posted by: gary Posted on: 2008-07-29 12:42 javacom wrote: If you install the cydia package called iPhone 2.0 toolchain from Bigboss in iPhone. I think this is the latest one and will install in /var/include/ But still need the time to look into it. I am still looking the way how to add them in the Xcode environment. But this package does not include the iPhone official SDK header file which is already included in Final SDK that you install. Tried, sadly, it's 1.1.4/1.2.0 compatiable headers. i.e. It only contains the APIs that appeared in both 1.1.4 and 1.2.0 If it's new API to 1.2.0, it all missed!! However, headers with new APIs in 1.2.0 is what I'm looking for. :( Anyway, I will try the last resort... class-dump -H, and modify it manually.... so painful... | |
| ¦^ÂСG Use Apple SDK to build apps (1.1.4/2.0) with open toolchain header (plus template and sample | Copy to clipboard |
|
Posted by: javacom Posted on: 2008-07-29 18:02 If you install the iPhone Framework Headers in iPhone Cydia, the sdk header file would be installed in the various frameworks under /System/Library/Frameworks of your iPhone. There is also a class-dump binary in iPhone, but not all headers can be dumped. However, the private framework is not available and compiling in iPhone is very slow. | |
| ¦^ÂСG ¦^ÂСG ¦^ÂСG ¦^ÂСG Use Apple SDK to build apps (1.1.4/2.0) with open toolchain header (plus | Copy to clipboard |
|
Posted by: javacom Posted on: 2008-08-01 09:32 gary wrote: javacom wrote: If you install the cydia package called iPhone 2.0 toolchain from Bigboss in iPhone. I think this is the latest one and will install in /var/include/ But still need the time to look into it. I am still looking the way how to add them in the Xcode environment. But this package does not include the iPhone official SDK header file which is already included in Final SDK that you install. Tried, sadly, it's 1.1.4/1.2.0 compatiable headers. i.e. It only contains the APIs that appeared in both 1.1.4 and 1.2.0 If it's new API to 1.2.0, it all missed!! However, headers with new APIs in 1.2.0 is what I'm looking for. :( Anyway, I will try the last resort... class-dump -H, and modify it manually.... so painful... Following the instructions at http://www.saurik.com/id/4 You might be able to build up a full 2.0 toolchain in Mac OS 10.5 | |
| ¦^ÂСG Use Apple SDK to build apps (1.1.4/2.0) with open toolchain header (plus template and sample | Copy to clipboard |
|
Posted by: moming2k Posted on: 2008-08-01 13:59 ¥Î¨ì¥ª SDK ¾¤¯}¥ª sign ¤§«á¡AµLÉAì°Ê¤O¦A¥hÅÍÓ toolchain ¤F | |
| ¦^ÂСG XCode Template for pwned frmwaer 2.0 and Final SDK | Copy to clipboard |
|
Posted by: mitsui Posted on: 2008-08-11 16:57 javacom wrote: Here is the update of Xcode Template for pwned firmware 2.0 and open toolchain using the Final SDK. §A¦n, §Ú¬O¥Îxcode 3.1 ¤Î iphone 3 g ªº Final SDK . ¤w¸òµÛ§Aªº¨BÆJ°µ¤F, ¦ýxcode¸Ìªºproject template¬Ý¤£¨ìmakefile... ¦Ó¥B¤U¸ü¤F helloworld, ¥Îterminal³£¤£¯àcompile, ½Ð°Ý§ÚÀ³¸Ó¬O¨º¨à¥X¿ù©O? ÁÂÁÂ~~ | |
| XCode Template to skip Provisioning Profile plus Build & Go SDK header application | Copy to clipboard |
|
Posted by: javacom Posted on: 2008-09-03 06:11 Someone asked me about how to skip the Provisioning Profile in order to build & go in official sdk applications (not using toolchain headers) as they are not registered developer. As the profile is signed by Apple's WWDC certificate, I think it is difficult to create a fake. But it is rather easy to amend the project template in order to skip the step for the profile. Here is how (1) If you have an existing project from the Official Template, you need to change the code-sign identity and add two user-defined settings in your Project Setting as below [img]http://www.iphone.org.hk/attach/42703-xcodepsetting.png[/img] [code] "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Pwned Developer"; [$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160]PROVISIONING_PROFILE_ALLOWED = NO; [$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160][$#160]PROVISIONING_PROFILE_REQUIRED = NO; [/code] There are two instances for this part (one for Debug and another for Release) (2) Then amend the Info.plist of your project and add these [code] [$#160][$#160]<key>SignerIdentity</key> [$#160][$#160]<string>Apple iPhone OS Application Signing</string> [/code] Then you can build & go your project with support of debug and setting break point like other registered iPhone developer To use this method to build & go. You need (1) Have a fake code sign identity called "iPhone Pwned Developer" in your Mac (if you have not already done so) Here is the nice guide from Apple to create a self-signed identity http://developer.apple.com/documentation/Security/Conceptual/CodeSigningGuide/Procedures/chapter_3_section_2.html (2) You need to patch the MobileInstallation in your iPhone (if you have not already done so) Here is how to patch the binary in iPhone and create backup first of course (the patch program if for iPhone which I compile from the source and supports 2.0 to 2.0.2) [code] wget http://www.cocoatouchdev.com/javacom/mobileinstallation_patch cp -p /System/Library/PrivateFrameworks/MobileInstallation.framework/MobileInstallation /System/Library/PrivateFrameworks/MobileInstallation.framework/MobileInstallation.backup chmod +x mobileinstallation_patch ./mobileinstallation_patch ldid -s /System/Library/PrivateFrameworks/MobileInstallation.framework/MobileInstallation [/code] (3) You don't need to patch SpringBoard, as the changing of Info.plist has done this trick. I have updated my XCode Template to add a new one called "View-Based Application" which is modified from the original one based on the method stated above. [IMG]http://www.iphone.org.hk/attach/42700-xcodetemp35.png[/IMG] To install this project template, do this in your Mac [code] curl http://cocoatouchdev.com/javacom/ToolChainTemplate_v31.zip > ToolChainTemplate_v31.zip unzip -o ToolChainTemplate_v31.zip -d "/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Project Templates" [/code] MD5 (ToolChainTemplate_v31.zip) = b3690c87565786a0c8430bb9a41704fb To test this new template "View-Based Application" Create a new project from "View-Based Application" of "Application Pwned" and modified the ViewController file and implement the loadView as below, then Build & Go to your device. You need to have the "iPhone Pwned Developer" certifcate in your Mac plus patch of MobileInstallation in your iPhone for successful build & go [code] - (void)loadView { [$#160][$#160]UIView *contentView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; [$#160][$#160]self.view = contentView; [$#160][$#160][contentView release]; [$#160][$#160]self.view.autoresizesSubviews = YES; [$#160][$#160]CGRect frame = CGRectMake(10.0, 10.0, 250.0, 100.0); [$#160][$#160] [$#160][$#160]UITextView *textView = [[[UITextView alloc] initWithFrame:frame] autorelease]; [$#160][$#160] [$#160][$#160][$#160][$#160]textView.textColor = [UIColor blackColor]; [$#160][$#160][$#160][$#160]textView.font = [UIFont fontWithName:@"Arial" size:18.0]; [$#160][$#160][$#160][$#160]textView.backgroundColor = [UIColor whiteColor]; [$#160][$#160] [$#160][$#160]textView.text = @"This is the time for Developer to port all applications to firmware 2.0"; [$#160][$#160] [$#160][$#160][self.view addSubview: textView]; [$#160][$#160] } [/code] Enjoy and port all your applications to firmware 2.0 | |
| How to skip provisioning profile for iPhone SDK (build 9M2517) for firmware 2.1 | Copy to clipboard |
|
Posted by: javacom Posted on: 2008-09-18 10:41 [color=red]How to skip provisioning profile for iPhone SDK (build 9M2517) for building apps for firmware 2.0/2.1[/color] First close your Xcode and backup the PhoneOS.platform Info.plist by running this in Mac Terminal [code] sudo cp -p /Developer/Platforms/iPhoneOS.platform/Info.plist /Developer/Platforms/iPhoneOS.platform/Info.plist.bak [/code] Then edit the PhoneOS.platform Info.plist file [code] sudo vi /Developer/Platforms/iPhoneOS.platform/Info.plist [/code] and change [code] [$#160][$#160][$#160][$#160]<key>PROVISIONING_PROFILE_ALLOWED</key> [$#160][$#160][$#160][$#160]<string>YES</string> [$#160][$#160][$#160][$#160]<key>PROVISIONING_PROFILE_REQUIRED</key> [$#160][$#160][$#160][$#160]<string>YES</string> [/code] to this [code] [$#160][$#160][$#160][$#160]<key>PROVISIONING_PROFILE_ALLOWED</key> [$#160][$#160][$#160][$#160]<string>[color=red]NO[/color]</string> [$#160][$#160][$#160][$#160]<key>PROVISIONING_PROFILE_REQUIRED</key> [$#160][$#160][$#160][$#160]<string>[color=red]NO[/color]</string> [/code] Launch Xcode and then create new project using my Xcode Template for pwned device "View-Based Application" to build and go to either Project Settings 2.0 or Project Settings 2.1 or iPhone Simulator and you don't need the trick to reset it anymore. Remember, you still need a fake codesign identity and patch MobileInstallation binary in your iPhone. MobileInstallation patch for 2.0/2.0.1/2.0.2/2.1 is here http://www.iphone.org.hk/cgi-bin/ch/topic_show.cgi?id=8203 If you are registered iPhone Developer with provisioning profile and codesign cert from Apple, please remember to revert the PhoneOS.platform Info.plist back to the original one before building your project to App Store. | |
| This Xcode Template is now updated to version 3.5.2 | Copy to clipboard |
|
Posted by: javacom Posted on: 2008-09-19 18:20 This Xcode Template is now updated to version 3.5.2 To install, run these in Mac Terminal (assume you have installed the Xcode in /Developer folder, if not, change it according to your installed directory) [code] curl -O http://apiexplorer.googlecode.com/files/ToolChainTemplate_v352.zip unzip -o ToolChainTemplate_v352.zip -d "/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Project Templates" [/code] MD5 (ToolChainTemplate_v352.zip) = 5de15c4cc9f7bab7feeafff5f121da36 [IMG]http://www.iphone.org.hk/attach/42700-xcodetemp35.png[/IMG] There are 4 new project templates to build the command line utility for iPhone [COLOR=Blue]C++ Tool (.cpp) CoreFoundation Tool (.c) Foundation Tool (.m) Objective C++ Tool (.mm)[/COLOR] These 4 command line utility templates used wifi ssh connection to install compiled binary in your iPhone, so you need not connect your iPhone via usb port and MobileInstallation patch is not needed. Requirements & Info: (1) Default use Open toolchain headers (2) iPhone and Mac connected to same network (you should change the IPHONE_IP, default is 10.0.2.2 in Project Settings) (3) Open SSH and Link Indenty Editor installed in iPhone (4) Mac's ssh key installed in iPhone (5) Debug / Release build to iPhone folder /private/var/root (no Build & Go) and you should change IPHONE_INSTALL_DIR in the Project Settings (6) Cannot build to Simulator If you to need the IPHONE_IP and IPHONE_INSTALL_DIR user settings twice, one for Release and another for Debug. If you don't want Open ToolChain headers for these command line tool, just remove the Other CC flags settings in the Project Settings, then it will use the official SDK headers. And you have to remove it twice, one for Release and another one for Debug in Project Settings. If you need Open ToolChain Headers in your Mac do this (assume you have installed the Xcode in /Developer folder, if not, change it according to your installed directory) [code] $ sudo mkdir -p /Developer/SDKs/iPhoneOS.sdk/Versions/iPhoneOS2.0.sdk/ $ svn co http://iphone-dev.googlecode.com/svn/branches/include-1.2-sdk $ cd include-1.2-sdk $ ./configure --prefix=/Developer/SDKs/iPhoneOS.sdk/Versions/iPhoneOS2.0.sdk/ $ sudo sh install-headers.sh [/code] [COLOR=Blue]Xcode Template Version 3.5.2 adds a Static Library Template for iPhone[/COLOR] To build the Universary Library for i386 and arm First build it on "Device" "Release" Second build it on "Simulator" "Release" Then the Universary Library binary will be in the project directory To examine the content of the Universary Library binary, run ./otoolprint.sh in the project folder [COLOR=Blue]Open Tool Chain Application[/COLOR] This template uses open toolchain headers provides a starting point for any application without Interface Builder. Requirements and Info: (1) No Interface Builder (2) Default use open toolchain headers (3) For pwned iPhone / iPod Touch with patched MobileInstallation (4) codesign certificate "iPhone Pwned Developer" installed in Mac (5) XCode SDK Info.plist Setting has removed Provisioning Profile requirement (6) Cannot build to Simulator [COLOR=Blue]View-Based Application[/COLOR] This template provides a starting point for an application that uses a single view. It provides a view controller to manage the view, and a nib file that contains the view. Requirements and Info: (1) Default use official iPhone SDK headers (2) For pwned iPhone / iPod Touch with patched MobileInstallation (3) codesign certificate "iPhone Pwned Developer" installed in Mac (4) XCode SDK Info.plist Setting has removed Provisioning Profile requirement [COLOR=Blue]Window-Based Application[/COLOR] This template provides a starting point for any application without Interface Builder and provides a minimal iPhone application with a single view, ready for customizing. This is a good starting point for your first application. In the UIView subclass, you can implement methods to draw content on the screen and to respond to touches. In a more full-featured application, you typically add a view controller to handle data and to manage rotation. Requirements and Info: (1) No Interface Builder (2) Default use official iPhone SDK headers (3) For pwned iPhone / iPod Touch with patched MobileInstallation (4) codesign certificate "iPhone Pwned Developer" installed in Mac (5) XCode SDK Info.plist Setting has removed Provisioning Profile requirement [COLOR=Red]Always reboot iPhone and your Mac after you have changed settings and to troubleshoot[/COLOR] If you need MobileInstallation Patch see post here http://www.iphone.org.hk/cgi-bin/ch/topic_show.cgi?id=8203 if you want to know how to remove Provisioning Profile requirement see post above If you need instruction to have codesign certfifcate "iPhone Pwned Developer" installed in Mac Here is the nice guide from Apple to create a self-signed identity http://developer.apple.com/documentation/Security/Conceptual/CodeSigningGuide/Procedures/chapter_3_section_2.html If you want to know how to install your Mac's ssh key in iPhone Here it is [COLOR=Sienna]In order to avoid typing the password using ssh, you can install the ssh public key of your Mac to your iPhone using the following method[/COLOR] (a) keygen in Mac terminal and type (if you haven't generated it before) [code]ssh-keygen -t rsa[/code] (b) create .ssh directory in iPhone (assume ip address of iPhone is 10.0.2.2) and in Mac terminal and type [code]ssh root@10.0.2.2 'mkdir -p .ssh'[/code] then enter iPhone root password (alpine) (c) copy mac public key to iPhone, and in Mac Terminal type [code]cat ~/.ssh/id_rsa.pub | ssh root@10.0.2.2 'cat >> .ssh/authorized_keys'[/code] then enter iPhone root password (alpine) (d) Edit the file /etc/ssh/sshd_config in [COLOR=Orange]iPhone[/COLOR] change these [code] #StrictModes yes #PubkeyAuthentication yes #AuthorizedKeysFile .ssh/authorized_keys [/code] to [code] StrictModes no PubkeyAuthentication yes AuthorizedKeysFile .ssh/authorized_keys [/code] (e)reboot iPhone | |
| ¦^ÂСG Use Apple SDK to build apps in XCode (if you don't have codesign cert and provisioning profil | Copy to clipboard |
|
Posted by: javacom Posted on: 2008-11-23 02:15 The trick to skip provisioning profile for iPhone SDK (build 9M2621) still works Just backup and edit the file [COLOR=Blue]/Developer/Platforms/iPhoneOS.platform/Info.plist[/COLOR] and add the [COLOR=red]magic words in red[/COLOR] as below [code] [$#160][$#160][$#160][$#160]<key>NATIVE_ARCH</key> [$#160][$#160][$#160][$#160]<string>armv6</string> [$#160][$#160][$#160][$#160]<key>PLIST_FILE_OUTPUT_FORMAT</key> [$#160][$#160][$#160][$#160]<string>binary</string> [COLOR=Red][$#160][$#160][$#160][$#160]<key>PROVISIONING_PROFILE_ALLOWED</key> [$#160][$#160][$#160][$#160]<string>NO</string> [$#160][$#160][$#160][$#160]<key>PROVISIONING_PROFILE_REQUIRED</key> [$#160][$#160][$#160][$#160]<string>NO</string> [/COLOR][$#160][$#160][$#160][$#160]<key>SDKROOT</key> [$#160][$#160][$#160][$#160]<string>iphoneos2.2</string> [/code] I have tested it to build app on jailbreaked iPhone firmware 2.1 . . . | |
| How-to compile iPhone Project using Makefile instead of XCode | Copy to clipboard |
|
Posted by: javacom Posted on: 2008-12-20 12:26 Here is an example to compile iPhone Project using Makefile instead of XCode. The Makefile will codesign it using ldid (Intel binary version) and then install it directly to iPhone /Applications/ folder Location of files ---------------- Classes : source code Resources : png file Project folder : *.xib Info.plist (1) First you need to download the zip file and extract to your Mac and cd to the directory [code] curl -O http://www.iphone.org.hk/attach/48150-PeoplePickerDemo.zip unzip 48150-PeoplePickerDemo.zip cd PeoplePickerDemo [/code] (3) Change the IPHONE_IP in the Makefile to the IP address of iPhone, default is 10.0.2.2 (4) install respring utility in iPhone [code]make install_respring[/code] (5) run make and make install [code]make make install[/code] (6) Test launch the app Demo in iPhone . . | |
![]() ![]() ![]() |
|
| [¿ù»~«H®§] |
|
Table './iphone1/ut_online' is marked as crashed and should be repaired
½Ð³qª¾°Q½×°ÏºÞ²zû <kk@hkfoot.com>¡C |