◇ 哎.瘋.人.網 ◇網站現已遷移至新的版面 Apple.ORG.HK Apple人網



 ◇ 哎.瘋.人.網 ◇  Development◇哎瘋程式搞作◇  

顯示適合列印的版本 顯示適合列印的版本  把這個主題寄給朋友 寄給朋友
按平行模式觀看按樹型模式觀看前一篇主題后一篇主題
前一頁  1   2  后一頁
作者 NUse Apple SDK to build apps in XCode (if you don't have codesign cert and provisioning profile)
moming2k





文章: 298
于 2008-08-01 13:59  觀看該用戶的個人資料  主頁: http://www.igpsd.com  搜尋這個用戶發表的所有文章  把文章內容复制到剪貼板。
只适用于 IE :-)
用到左 SDK 黎破左 sign 之後,無乜原動力再去攪個 toolchain 了


mitsui





文章: 49
于 2008-08-11 16:57  觀看該用戶的個人資料  搜尋這個用戶發表的所有文章  把文章內容复制到剪貼板。
只适用于 IE :-)
javacom wrote:
Here is the update of Xcode Template for pwned firmware 2.0 and open toolchain using the Final SDK.


你好, 我是用xcode 3.1 及 iphone 3 g 的 Final SDK . 已跟著你的步驟做了, 但xcode裡的project template看不到makefile...
而且下載了 helloworld, 用terminal都不能compile, 請問我應該是那兒出錯呢? 謝謝~~


mitsui 修改于 2008-08-12 09:33
javacom




版主

文章: 3083
于 2008-09-03 06:11  觀看該用戶的個人資料  搜尋這個用戶發表的所有文章  把文章內容复制到剪貼板。
只适用于 IE :-)
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



 
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Pwned Developer";
                                PROVISIONING_PROFILE_ALLOWED = NO;
                                PROVISIONING_PROFILE_REQUIRED = NO;


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
 
  <key>SignerIdentity</key>
  <string>Apple iPhone OS Application Signing</string>


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)

 
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


(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.



To install this project template, do this in your Mac
 
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"

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

 
- (void)loadView {
  UIView *contentView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
  self.view = contentView;
  [contentView release];
  self.view.autoresizesSubviews = YES;
  CGRect frame = CGRectMake(10.0, 10.0, 250.0, 100.0);
  
  UITextView *textView = [[[UITextView alloc] initWithFrame:frame] autorelease];
  
    textView.textColor = [UIColor blackColor];
    textView.font = [UIFont fontWithName:@"Arial" size:18.0];
    textView.backgroundColor = [UIColor whiteColor];
  
  textView.text = @"This is the time for Developer to port all applications to firmware 2.0";
  
  [self.view addSubview: textView];
  
}


Enjoy and port all your applications to firmware 2.0


javacom 修改于 2008-09-21 19:06
javacom




版主

文章: 3083
于 2008-09-18 10:41  觀看該用戶的個人資料  搜尋這個用戶發表的所有文章  把文章內容复制到剪貼板。
只适用于 IE :-)
How to skip provisioning profile for iPhone SDK (build 9M2517) for building apps for firmware 2.0/2.1
First close your Xcode and backup the PhoneOS.platform Info.plist by running this in Mac Terminal

 
sudo cp -p /Developer/Platforms/iPhoneOS.platform/Info.plist /Developer/Platforms/iPhoneOS.platform/Info.plist.bak


Then edit the PhoneOS.platform Info.plist file
 
sudo vi /Developer/Platforms/iPhoneOS.platform/Info.plist


and change

 
    <key>PROVISIONING_PROFILE_ALLOWED</key>
    <string>YES</string>
    <key>PROVISIONING_PROFILE_REQUIRED</key>
    <string>YES</string>


to this

 
    <key>PROVISIONING_PROFILE_ALLOWED</key>
    <string>NO</string>
    <key>PROVISIONING_PROFILE_REQUIRED</key>
    <string>NO</string>


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.


javacom 修改于 2008-09-18 22:14
javacom




版主

文章: 3083
于 2008-09-19 18:20  觀看該用戶的個人資料  搜尋這個用戶發表的所有文章  把文章內容复制到剪貼板。
只适用于 IE :-)
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)

 
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"

MD5 (ToolChainTemplate_v352.zip) = 5de15c4cc9f7bab7feeafff5f121da36



There are 4 new project templates to build the command line utility for iPhone
C++ Tool (.cpp)
CoreFoundation Tool (.c)
Foundation Tool (.m)
Objective C++ Tool (.mm)


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)

 
$ 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


Xcode Template Version 3.5.2 adds a Static Library Template for iPhone
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

Open Tool Chain Application
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

View-Based Application
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

Window-Based Application
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

Always reboot iPhone and your Mac after you have changed settings and to troubleshoot

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
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

(a) keygen in Mac terminal and type (if you haven't generated it before)
ssh-keygen -t rsa


(b) create .ssh directory in iPhone (assume ip address of iPhone is 10.0.2.2) and in Mac terminal and type
ssh root@10.0.2.2 'mkdir -p .ssh'

then enter iPhone root password (alpine)

(c) copy mac public key to iPhone, and in Mac Terminal type
cat ~/.ssh/id_rsa.pub | ssh root@10.0.2.2 'cat >> .ssh/authorized_keys'

then enter iPhone root password (alpine)

(d) Edit the file /etc/ssh/sshd_config in iPhone

change these
 
#StrictModes yes
#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys


to

  
StrictModes no
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys


(e)reboot iPhone


42485-Test.zip


javacom 修改于 2009-02-12 11:17

http://www.cnepub.com/discuz/?fromuid=47472

香港交通快拍 v1.1 Preview
http://hk.youtube.com/watch?v=1BHvTC5-QTc

開啟隱藏的表情符號,不用 jailbreak



iPhone 3G ◇哎瘋生滋◇ 常見問題集
javacom




版主

文章: 3083
于 2008-11-23 02:15  觀看該用戶的個人資料  搜尋這個用戶發表的所有文章  把文章內容复制到剪貼板。
只适用于 IE :-)
The trick to skip provisioning profile for iPhone SDK (build 9M2621) still works

Just backup and edit the file

/Developer/Platforms/iPhoneOS.platform/Info.plist

and add the magic words in red as below
 
    <key>NATIVE_ARCH</key>
    <string>armv6</string>
    <key>PLIST_FILE_OUTPUT_FORMAT</key>
    <string>binary</string>
    <key>PROVISIONING_PROFILE_ALLOWED</key>
    <string>NO</string>
    <key>PROVISIONING_PROFILE_REQUIRED</key>
    <string>NO</string>
    <key>SDKROOT</key>
    <string>iphoneos2.2</string>


I have tested it to build app on jailbreaked iPhone firmware 2.1
.
.
.



http://www.cnepub.com/discuz/?fromuid=47472

香港交通快拍 v1.1 Preview
http://hk.youtube.com/watch?v=1BHvTC5-QTc

開啟隱藏的表情符號,不用 jailbreak



iPhone 3G ◇哎瘋生滋◇ 常見問題集
javacom




版主

文章: 3083
于 2008-12-20 12:26  觀看該用戶的個人資料  搜尋這個用戶發表的所有文章  把文章內容复制到剪貼板。
只适用于 IE :-)
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

 
curl -O http://www.iphone.org.hk/attach/48150-PeoplePickerDemo.zip
unzip 48150-PeoplePickerDemo.zip
cd PeoplePickerDemo


(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
make install_respring


(5) run make and make install
make 
make install


(6) Test launch the app Demo in iPhone
.
.


48150-PeoplePickerDemo.zip


javacom 修改于 2008-12-20 17:54

http://www.cnepub.com/discuz/?fromuid=47472

香港交通快拍 v1.1 Preview
http://hk.youtube.com/watch?v=1BHvTC5-QTc

開啟隱藏的表情符號,不用 jailbreak



iPhone 3G ◇哎瘋生滋◇ 常見問題集

 ◇ 哎.瘋.人.網 ◇  Development◇哎瘋程式搞作◇  

顯示適合列印的版本 顯示適合列印的版本  把這個主題寄給朋友 寄給朋友
按平行模式觀看按樹型模式觀看前一篇主題后一篇主題
前一頁  1   2  后一頁
  看過的文章
  新的文章
  被刪除的文章
跳轉到

發表新的文章回覆主題


[錯誤信息]
Table './iphone1/ut_online' is marked as crashed and should be repaired

請通知討論區管理員 <kk@hkfoot.com>。