The ModMyTM Family of Sites:
ModMyMotoModMyiModMyGphone




 
 
Register or Connect with Facebook

Discuss AppStore Apps | Browse / Search Cydia | MMi Cydia Stats




  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > 3rd Party Apps For iPhone | iPod Touch > iPhone / iPod Touch SDK | Development Discussion
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 07-20-2008, 07:17 PM
poetic_folly's Avatar
Owner / Founder - ModMyi
aka Kyle Matthews
 
Join Date: May 2007
Device + Firmware: iPhone 3G | 2.2.1 | Jailbroke
Operating System: OS X Leopard 10.5.6
Posts: 8,378
Thanks: 295
Thanked 2,612 Times in 855 Posts
Saurik on porting 1.x apps to 2.x

NOTE: If you've ported your app to work on 2.0 Jailbroken devices, please let us know by submitting it for us to host on our 2.0 compliant Cydia repo. This will ensure you get your app out to as many jailbreakers as possible. For help, ask here or in our IRC.

For you developers of Jailbroken applications, Saurik (creator of Cydia) has a great, informative write-up on porting 1.x apps to 2.x. This can be found by opening Cydia on your iPhone and clicking the Porting Apps from 1.x to 2.x link, but I thought you guys might also find it useful here.

Quote:
LayerKit -> CoreAnimation

Pretty much everything in LAyerKit has been moved to QuartzCore. LayerKit was really just the older name of CoreAnimation, and now most anything that was LK* maps to something similar in CA*. The names, however, aren't always the same. For example, LKCurrentTime has become CACurrentMediaTime.

UIFont/UIColor vs. CG/GS*Ref

Fonts and colors are handled by GraphicsServices and CoreGraphics, respectively. This used to be exposed directly in UIKit for 1.x (setColor: for example would normally take a CGColorRef). The new UIKit, however, has wrapped these primitives in Objective-C guises. Converting back/forth between these types is typically easy.

Using PrivateFrameworks

In order to keep application developers from using backend APIs of other applications (i.e., APIs that are going to change often and lead to unstable, brittle applications), Apple has moved most of their internal-use-only libraries into /System/Library/PrivateFrameworks, which is not normally on the link path. To add this back you need to pass this directory to gcc with -F.

Using Undocumented UIKit

The #1 thing to understand about UIKit is that Apple mostly didn't change it. For some unknown backwards compatibility reason they left in most of the 1.x classes, which means most of the code for 1.x can be compiled with only minor naming differences for the new platform. (Thanks goes to Jonathan Zdziarski (NerveGas) for figuring this out.)

UIAlertSheet - UIActionSheet
UIButtonBar - UIToolbar
UISliderControl - UIOldSliderControl
UISwitchControl - _UISwitchSlider
UIWebView - UIWebDocumentView

Alert/Action Sheet Dismissal

Pretty much all usages of dialog boxes involved dismissing the dialog box during a buttonClicked: event. Apple has renamed this to didDismissWithButtonIndex: and does the call to -(vod)dismiss.

Double vs. Single Precision

A few places in the original UIKit libraries Apple was using double's, even though pretty much everywhere they use floats. These places have been changed. One such example is [UIProgressBar setProgressfloat)].

Automatic Keyboard Support

Apple has decided that manually having to manage the keyboards that go with text input fields is stupid, and I must say I agree with them. Unfortunately, this means that code used to manually bring up keyboards is now dangerously out of date: you end up with two keyboards, only one of which normally works.

CoreGraphics vs. ImageIO

Most programs that need to draw things to the screen do not need to have complex data input/output from said graphics buffers. All of this file format and color munging code was probably taking up too much memory, so it got forked out to a different library: ImageIO. Examples: CGImageDestination/Source.

UIApplicationMain(Class)

Previous, UIApplicationMain() was passed the metaclass object of a type that derived from the class UIApplicationMain, which it would then instantiated. Now it optionally takes the names of two separate classes that take on different aspects of UIApplication's functionality. If you pass the name of your old class for both these arguments you will get seemingly identical behavior.

mprotect(), NX, and max_prot

While this information doesn't apply to applications developed for JailBroken devices, it is still useful to understand that Apple has started taking measures to protect against arbitrary code execution. In addition to code signing, pages that were once writable can never be marked executable, which means no JIT compilers or dynamic trampolines (in other words, bye bye performance). This particular issue has been patched out of the kernel by Pwnage.
Also, here's his link on the new toolchain for 2.0.

PLEASE keep this thread to the topic at hand. If you wish to discuss the merits of Cydia, if devs will port apps, etc, do so in Native Apps discussion.

Last edited by poetic_folly; 07-20-2008 at 07:17 PM.. Reason: Automerged Doublepost
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following 5 Users Say Thank You to poetic_folly For This Useful Post:
Bloaty (07-22-2008), Dashiznit (08-18-2008), lighter (07-28-2008), thakurupted (07-26-2008), tntmorgan (07-20-2008)
Reply

  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > 3rd Party Apps For iPhone | iPod Touch > iPhone / iPod Touch SDK | Development Discussion

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



Go to Top
ModMyI

All times are GMT -6. The time now is 02:56 PM. Powered by vBulletin® Version 3.8.4
If you need Dedicated Server Hosting, you should check out SingleHop. | Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 Copyright © 2007-09 by ModMy, LLC. All rights reserved.

iPhone News / iPhone Forums / Apple News / Apple Forums / RSS / Contact Us / / Privacy Statement / Top