Difference between revisions of "IconSupport"

From iPhone Development Wiki
Jump to: navigation, search
m (Reverted edits by Testatest (talk) to last revision by Uroboro)
 
Line 1: Line 1:
The NSAutoreleasePool class is a thin wrapper around the '''NSPushAutoreleasePool''' and '''NSPopAutoreleasePool''' functions.
+
{{Infobox Package
 +
|developer=Sakurina, chpwn, ashikase
 +
|version=1.8.1-1
 +
|package=com.chpwn.iconsupport
 +
}}
 +
'''IconSupport''' is a library that helps icon-layout-modifying tweaks play nicely together.
 +
 
 +
Quoted from its depiction:
 +
 
 +
<blockquote>
 +
<p>IconSupport is a package for use by extensions that modify how SpringBoard lays-out icons (such as extensions that change the number of icons shown per row/column).</p>
 +
<p>Normally, syncing with iTunes or booting into Mobile Substrate's Safe Mode would cause these modified layouts to be reset; IconSupport prevents this.</p>
 +
<p>IconSupport also handles repairing layouts when installing and uninstalling IconSupport-enabled extensions.</p>
 +
</blockquote>
 +
 
 +
Quoted from the README of its [https://github.com/Xuzz/IconSupport source on GitHub]:
 +
 
 +
<blockquote>
 +
<p>Uses a unique ID for each combination of packages, so icon state is never lost via respring or uninstalling a new package.</p>
 +
</blockquote>
 +
 
 +
== How to use this library ==
 +
 
 +
Headers are available from [https://github.com/Xuzz/IconSupport/blob/master/Extension/ISIconSupport.h IconSupport's GitHub project]. If using Theos, place the headers in <code>$THEOS/include/IconSupport</code>.
 +
 
 +
=== Include directive ===
  
 
<source lang="objc">
 
<source lang="objc">
#ifdef __cplusplus
+
#import <IconSupport/ISIconSupport.h>
extern "C" {
 
#endif
 
void *NSPushAutoreleasePool(NSUInteger capacity);
 
void NSPopAutoreleasePool(void* token);
 
#ifdef __cplusplus
 
}
 
#endif
 
 
</source>
 
</source>
  
Example:
+
=== Packaging ===
  
<source lang="objc">
+
Add to your package's control file:
static void MyMethod()
+
 
{
+
* <code>, com.chpwn.iconsupport</code> to the <code>Depends</code> field.
    void *pool = NSPushAutoreleasePool(0);
+
 
    [[[NSObject alloc] init] autorelease];
+
== Usage ==
    NSPopAutoreleasePool(pool);
+
 
 +
<source lang="logos">
 +
%ctor {
 +
dlopen("/Library/MobileSubstrate/DynamicLibraries/IconSupport.dylib", RTLD_NOW);
 +
[[%c("ISIconSupport") sharedInstance] addExtension:@"theNameOfMyExtension"];
 
}
 
}
 
</source>
 
</source>
  
The "capacity" argument of NSPushAutoreleasePool only serves as a hint. It is unused in the current implementation.
+
== External links ==
 +
 
 +
* [https://github.com/Xuzz/IconSupport source on GitHub].
 +
 
 +
{{Navbox Library}}
 +
 
 +
[[Category:Cydia packages]]
  
{{occlass|library=Foundation.framework}}
+
[[Category:Directories in /Library]]

Latest revision as of 10:56, 2 February 2017

IconSupport
Cydia Package
Developer Sakurina, chpwn, ashikase
Package ID com.chpwn.iconsupport
Latest Version 1.8.1-1

IconSupport is a library that helps icon-layout-modifying tweaks play nicely together.

Quoted from its depiction:

IconSupport is a package for use by extensions that modify how SpringBoard lays-out icons (such as extensions that change the number of icons shown per row/column).

Normally, syncing with iTunes or booting into Mobile Substrate's Safe Mode would cause these modified layouts to be reset; IconSupport prevents this.

IconSupport also handles repairing layouts when installing and uninstalling IconSupport-enabled extensions.

Quoted from the README of its source on GitHub:

Uses a unique ID for each combination of packages, so icon state is never lost via respring or uninstalling a new package.

How to use this library

Headers are available from IconSupport's GitHub project. If using Theos, place the headers in $THEOS/include/IconSupport.

Include directive

#import <IconSupport/ISIconSupport.h>

Packaging

Add to your package's control file:

  • , com.chpwn.iconsupport to the Depends field.

Usage

 %ctor {
	dlopen("/Library/MobileSubstrate/DynamicLibraries/IconSupport.dylib", RTLD_NOW);
	 [[%c("ISIconSupport") sharedInstance] addExtension:@"theNameOfMyExtension"];
}

External links