Welcome: Difference between revisions

From iPhone Development Wiki
(→‎Welcome to the iPhoneDevWiki: might as well change this now)
No edit summary
Line 1: Line 1:
__NOTOC__
The NSAutoreleasePool class is a thin wrapper around the '''NSPushAutoreleasePool''' and '''NSPopAutoreleasePool''' functions.
== Welcome to the iPhoneDevWiki ==
[[File:Drill bits.jpg|right]]
Our goal is to share the sum of all human<ref> We'll make an exception for lawyers; they may submit too. Cf. http://wiki.creativecommons.org/Frequently_Asked_Questions#How_does_a_Creative_Commons_license_operate.3F: "Creative Commons licenses are expressed in three different formats: the Commons Deed (human-readable code), the Legal Code (lawyer-readable code); and the metadata (machine readable code)."</ref> knowledge about jailbroken iOS development. In other words, this is a collection of documentation written by developers to help each other write extensions (tweaks) for jailbroken iOS, and you're invited to learn from it and contribute to it too.


What is this wiki for?
<source lang="objc">
#ifdef __cplusplus
extern "C" {
#endif
void *NSPushAutoreleasePool(NSUInteger capacity);
void NSPopAutoreleasePool(void* token);
#ifdef __cplusplus
}
#endif
</source>


* Information about using iOS [[frameworks]] (both public and [[PrivateFrameworks|private]]), [[SpringBoard.app|SpringBoard]], system [[daemons]] (for hooking and hacking), and classes in applications included with the system.
Example:
* Information about third-party libraries and extensions for developers ([[ActionMenu]], [[AppList]], [[Flipswitch]], [[IconSupport]], [[libactivator]], [[libhide]], [[libobjcipc]], [[libstatusbar]], [[PreferenceLoader]], [[RocketBootstrap]], etc.).
* Lists of [[Open Source Projects]], [[Reverse Engineering Tools]], [[advice for new developers]], [[List of development blogs|development blogs]], and other useful information for developers.
* Documentation about making [http://iphonedevwiki.net/index.php/Category:Preferences preferences] for extensions: [[PreferenceLoader]], [[PreferenceBundles]], [[Preferences specifier plist]], [[Preferences.framework]].
* Anything else about development for jailbroken iOS devices. (For other technical information about iOS, see [http://theiphonewiki.com The iPhone Wiki], which covers topics including jailbreak exploits, internal iOS systems, and iOS hardware details. [http://theiphonewiki.com/wiki/Up_to_Speed "Up to Speed"] is its getting-started page about learning about security research on iOS.)


Current featured article: '''[[Updating extensions for iOS 10]]'''
<source lang="objc">
static void MyMethod()
{
    void *pool = NSPushAutoreleasePool(0);
    [[[NSObject alloc] init] autorelease];
    NSPopAutoreleasePool(pool);
}
</source>


New articles: [[Kik]], [[Active Developers]], [[IPC|Inter Process Communication (IPC)]], [[Using ARC in tweaks]], [[Career advice]], [[IOMobileFramebuffer]], [[IOAudio2Device]], [[IOAudio2Transformer]], [[RocketBootstrap]], [[Breadcrumbs]].
The "capacity" argument of NSPushAutoreleasePool only serves as a hint. It is unused in the current implementation.


If you'd like to make a new article or improve an existing article, see [[Help:Editing]] for advice (and see [[#Editing this wiki]] for ideas). '''Articles that need work''': [[Packaging]] (tools, control file tips, troubleshooting dpkg-deb errors), [[Next Steps After Getting Started]] (a set of ideas for tutorials you could write), ''edit this page and add your idea here''.
{{occlass|library=Foundation.framework}}
 
== Getting started ==
 
New to developing for jailbroken devices? Welcome, it's fun and challenging! Hopefully you already have some experience with Objective-C. You will want to get familiar with [[MobileSubstrate|Cydia Substrate (formerly called MobileSubstrate)]] and [[Theos]], and you can study some [[Open Source Projects]] to see how existing tweaks work. See '''[[Getting Started]]''' and also take a look at [[Best Practices]] and [[MobileSubstrate Pitfalls]]. If you're looking for a more thorough and sequential tutorial, take a look at the book ''[http://iosre.com/t/ios-app-reverse-engineering-the-worlds-1st-book-of-very-detailed-ios-app-reverse-engineering-skills/1117 iOS App Reverse Engineering]'' and its forum [http://bbs.iosre.com iOSRE].
 
'''[[Getting Help | How to ask for help]]:''' You can ask questions in the IRC channel [https://kiwiirc.com/client/irc.saurik.com/#iphonedev #iphonedev on irc.saurik.com] (where a bunch of developers hang out). IRC is an old-school chat system; if you don't already know how to use it, [[How to use IRC]] has details for you. There are also tags for [http://stackoverflow.com/questions/tagged/jailbreak "jailbreak"], [http://stackoverflow.com/questions/tagged/cydia "Cydia"], and [http://stackoverflow.com/questions/tagged/theos "Theos"] on Stack Overflow, a site for programming questions in general; feel free to ask there as well. (If you want to help answer questions, following [https://twitter.com/jailbreakdevqs @JailbreakDevQs] might be useful.) On reddit, there's [http://www.reddit.com/r/jailbreakdevelopers/ /r/jailbreakdevelopers]. For non-development-related troubleshooting questions, try [http://www.jailbreakqa.com/ JailbreakQA] or [http://www.reddit.com/r/jailbreak/ /r/jailbreak].
 
== Overview of contents ==
 
By topic:
 
* '''Frameworks''':
** {{fwlink|UIKit}} &bull; {{fwlink|GraphicsServices}} &bull; {{fwlink|AppSupport}} &bull; {{fwlink|BiometricKit}} &bull; {{fwlink|ChatKit}} &bull; {{fwlink|MobileWiFi}} &bull; '''''[[Template:Navbox Frameworks|more »]]'''''
* '''Applications''':
** {{applink|SpringBoard}} &bull; {{applink|Preferences}} &bull; {{applink|MobileSafari}} &bull; '''''[[Template:Navbox Applications|more »]]'''''
* '''Extensions''':
** [[ActionMenu]] &bull; [[AppList]] &bull; [[Cydget]] &bull; [[Flipswitch]] &bull; [[IconSupport]] &bull; [[LayerSnapshotter]] &bull; [[libactivator]] &bull; [[libhide]] &bull; [[libobjcipc]] &bull; [[libstatusbar]] &bull; [[PreferenceLoader]] &bull; [[RocketBootstrap]] &bull; [[WinterBoard]] &bull; [[libPassword]] &bull; '''''[[:Category:Cydia_packages|more »]]'''''
* '''System directories''':
** [[Frameworks]] &bull; [[Internet Plug-Ins]] &bull; [[PreferenceBundles]] &bull; [[PrivateFrameworks]] &bull; '''''[[Template:Navbox_Library|more »]]'''''
* '''Other parts of iOS''':
** [[Bluetooth]] &bull; [[CgBI file format]] &bull; [[Coprocessors]] &bull; [[Daemons]] &bull; [[dyld_shared_cache]] &bull; [[Entitlements]] &bull; [[iOS Keyboard]] &bull; [[launchd]] &bull; [[NFC]] &bull; [[Notifications]] &bull; [[Seatbelt]]
* '''Development tools''':
** [[Cycript]] &bull; [[MobileSubstrate|Cydia Substrate (MobileSubstrate)]] &bull; [[debugserver|debugserver (remote debugging)]] &bull; [[Jailbreak Development Tools]] &bull; [[ldid]] &bull; [[On-device toolchains]] &bull; [[Reverse Engineering Tools]] &bull; [[Theos]], [[Logos]], [[NIC]], [[Logify]] &bull; [[Retrieving SDKs]] &bull; [[Xcode|Xcode &ndash; Bypass Provisioning Profile]] &bull; [[SSH Over USB]]
* '''Other articles about development''':
** [[Getting Started]] &bull; [[Best Practices]] &bull; [[MobileSubstrate Pitfalls]] &bull; [[Open Source Projects]] &bull; [[Advice for new developers]] &bull; [[Updating extensions for iOS 8]] &bull; [[Updating extensions for iOS 7]] &bull; [[Debugging on iOS 7]] &bull; [[Cydia Store Integration]] &bull; [[Tweak DRM]] &bull; [[Code Signing]] &bull; [[Repository Management]] &bull; [[Packaging]] &bull; [[Crack prevention]] &bull; [[List of development blogs]] &bull; [[Using ARC in tweaks]] &bull; [[Career advice]]
 
By iOS version:
 
* '''New in iOS 10:''' [[ControlCenterUI.framework]], [[UserNotificationsUIKit.framework]].
* '''New in iOS 9:''' [[Updating extensions for iOS 9]], [[Breadcrumbs]].
* '''New in iOS 8:''' [[Updating extensions for iOS 8]], [[AssertionServices.framework]], [[SBSRestartRenderServerAction]], [[FBSSystemService]], [[UIAlertController]].
* '''New in iOS 7:''' [[Updating extensions for iOS 7]], [[Debugging on iOS 7]], [[Downgrading iPhone 4 from iOS 7]], [[BiometricKit.framework]], [[TouchID]], [[UIBackdropView]], [[AVFlashlight]], [[SBAppSliderController]].
* '''New in iOS 6:''' [[BackBoardServices.framework]], [[backboardd]], [[ChatKit.framework]], [[BKSProcessAssertion]].
* '''New in iOS 5:''' [[SBIconView]], [[CKMadridService]], [[SBAppContextHostManager]].
* '''New in iOS 4:''' [[SBAppSwitcherModel]].
 
Translated articles:
 
* '''Français''': [[Main page/fr]] &bull; [[MobileSubstrate/fr]] &bull; [[SSH Over USB/fr]] &bull; [[UIFont/fr]] &bull; [[UIColor/fr]] &bull; [[ActorKit.framework/fr]] &bull; [[IOSOpenDev/fr]]
* '''ไทย''': [[MobileSubstrate/th]] &bull; [[SSH Over USB/th]] &bull; [[SpringBoard.app/th]] &bull; [[UIColor/th]]
* '''Deutsch''': [[Theos/de]]
 
<!-- {{Navbox Frameworks}}
{{Navbox Applications}} -->
 
== Editing this wiki ==
 
* If you have anything at all to contribute, feel free to do so!
* An account is required to edit pages, but everyone is welcome to make an account. If you have trouble with the account creation process, or any questions about editing the wiki, please ask in #iphonedev on irc.saurik.com for help (see [[How to use IRC]]).
 
Some ideas for information to contribute:
 
* Add more projects to the list of [[Open Source Projects]], or fill out details on that page.
* Expand [[Getting Started]] for new developers - what do they need to know before beginning? How do they set up a development environment on OS X, Windows, and Linux? What are common beginner's mistakes that they should watch out for? How to reverse-engineer parts of iOS for writing tweaks? How to debug with GDB and learn about memory management?
* Update articles that haven't been significantly edited in a few years, such as [[Seatbelt]] and [[Crack prevention]]. See [[Special:AncientPages]] for a list of articles that haven't been updated recently.
* Help [[Cycript]] explain why Cycript is fun - syntax highlighting, injection, auto-completion, generally exploring around.
* Make a page that documents a class or framework you're familiar with.
* If you've developed a library that other developers can use or write addons/plugins/extensions for, make a page that documents your project.
* Update [[Xcode]] with better information about how to build apps for jailbroken devices.
* Make the homepage more useful! For example, add links to good pages that are hidden/buried deep within the wiki.
* The following articles are linked from nowhere in the wiki: [[Special:LonelyPages]] - you can fix that by linking them somewhere.
* Check out the most popular pages and see if they need updating: [[Special:PopularPages]].
* Write an article that is in demand: [[Special:WantedPages]].
* Translate an existing article into a non-English language. Check out the list at [[Special:PopularPages]] for ideas about high-priority articles to translate, and then make a new page with this name format: <code>Article name/[language code]</code>. [http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3/languages/Names.php Here's the list of language codes.] For example: [[PreferenceLoader/de]] or [[Libactivator/sv]].
 
----
 
<references />

Revision as of 09:37, 2 February 2017

The NSAutoreleasePool class is a thin wrapper around the NSPushAutoreleasePool and NSPopAutoreleasePool functions.

#ifdef __cplusplus
extern "C" {
#endif
void *NSPushAutoreleasePool(NSUInteger capacity);
void NSPopAutoreleasePool(void* token);
#ifdef __cplusplus
}
#endif

Example:

static void MyMethod()
{
    void *pool = NSPushAutoreleasePool(0);
    [[[NSObject alloc] init] autorelease];
    NSPopAutoreleasePool(pool);
}

The "capacity" argument of NSPushAutoreleasePool only serves as a hint. It is unused in the current implementation.