Technology moves fast! ⚡ Don't get left behind.🚶 Subscribe to our mailing list to keep up with latest and greatest in open source projects! 🏆


Subscribe to our mailing list

CCTogglesTemplates

Templates and examples of CCToggles

Subscribe to updates I use CCTogglesTemplates


Statistics on CCTogglesTemplates

Number of watchers on Github 22
Number of open issues 0
Main language Logos
Open pull requests 0+
Closed pull requests 0+
Last commit about 5 years ago
Repo Created over 5 years ago
Repo Last Updated over 1 year ago
Size 284 KB
Organization / Authordevbug
Contributors1
Page Updated
Do you use CCTogglesTemplates? Leave a review!
View CCTogglesTemplates activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating CCTogglesTemplates for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

CCToggles

Toggle and QuickLaunch template

Files

CCTogglesAgent.h
nic/
    cctoggle_toggle.nic/
    cctoggle_toggle.nic.tar
QuickLaunches/
    AppSwitcher/
    InternalSettings/
Toggles/
    Respring/


THEOS nic

You can use THEOS nic template.
Copy nic/cctoggle_toggle.nic.tar into $THEOS/templates/iphone/
And you can make CCToggles bundle by this command:

$THEOS/bin/nic.pl


Examples

CCToggles has two sections.
Toggles and QuickLaunches.

They have just two differents.
Resources/Info.plist and
Makefile.


Before read below,
I just recommended if you want to make "Toggle", please use Flipswitch.


This is Toggle's Resources/Info.plist.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleDevelopmentRegion</key>
    <string>English</string>
    <key>CFBundleExecutable</key>
    <string>Respring</string>
    <key>CFBundleIdentifier</key>
    <string>me.devbug.cctoggle.respring</string>
    <key>CFBundleDisplayName</key>
    <string>Respring</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundlePackageType</key>
    <string>BNDL</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0.0</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>1.0</string>
    <key>DTPlatformName</key>
    <string>iphoneos</string>
    <key>MinimumOSVersion</key>
    <string>7.0</string>
    <key>NSPrincipalClass</key>
    <string>RespringCCToggle</string>
    <key>type</key>
    <string>Toggle</string>
    <key>wantsControlCenterDismissal</key>
    <false/>
    <key>wantsDeviceUnlock</key>
    <false/>
</dict>
</plist>



And this is QuickLaunch's Resources/Info.plist.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleDevelopmentRegion</key>
    <string>English</string>
    <key>CFBundleExecutable</key>
    <string>AppSwitcher</string>
    <key>CFBundleIdentifier</key>
    <string>me.devbug.cctoggle.ql.appswitcher</string>
    <key>CFBundleDisplayName</key>
    <string>AppSwitcher</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundlePackageType</key>
    <string>BNDL</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0.0</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>1.0</string>
    <key>DTPlatformName</key>
    <string>iphoneos</string>
    <key>MinimumOSVersion</key>
    <string>7.0</string>
    <key>NSPrincipalClass</key>
    <string>AppSwitcherCCToggle</string>
    <key>type</key>
    <string>QuickLaunch</string>
    <key>wantsControlCenterDismissal</key>
    <true/>
    <key>wantsDeviceUnlock</key>
    <false/>
</dict>
</plist>



If you make Toggle, you take care of these keys.

type, wantsControlCenterDismissal and wantsDeviceUnlock.

First of all, Toggle's wantsControlCenterDismissal is always false.
If you make QuickLaunch, you can set what you want.
wantsControlCenterDismissal means dismiss or not ControlCenter when you tap quicklaunch.

Toggle's wantsDeviceUnlock is also always false.

And type is just two values.
Toggle and QuickLaunch.
This is not important value.





This is Toggle's Makefile.

ARCHS = armv7 armv7s
TARGET = iphone:clang::7.0
SDKVERSION = 7.0

include theos/makefiles/common.mk

BUNDLE_NAME = Respring
Respring_FILES = Toggle.xm
Respring_INSTALL_PATH = /Library/Application Support/CCToggles/Toggles

include $(THEOS_MAKE_PATH)/bundle.mk


And this is QuickLaunch's.

ARCHS = armv7 armv7s
TARGET = iphone:clang::7.0
SDKVERSION = 7.0

include theos/makefiles/common.mk

BUNDLE_NAME = AppSwitcher
AppSwitcher_FILES = Toggle.xm
AppSwitcher_INSTALL_PATH = /Library/Application Support/CCToggles/QuickLaunches
AppSwitcher_FRAMEWORKS = UIKit

include $(THEOS_MAKE_PATH)/bundle.mk



I think I don't need more description of Makefile. :)





Icons

You should put icons at least two.
For iPad 2 and iPad Mini
Icon.png
For iPhone 4/4s/5/5c/5s, iPod touch 5G, iPad 3/4/Air/Mini Retina
Icon@2x.png

And if you want to set 'on' state icon, you should put one more pair.
Icon_on.png and Icon_on@2x.png.






Gestures

You can catch double tap and long press gestures.
But I don't recommended using double tap gesture.

And double tap gesture requires CCToggles (>= 0.1-16).
long press gesture requires CCToggles (>= 0.1-6).

Just add this methods

- (void)toggleLongPressed;
- (void)toggleDoubleTapped;







Localizations

Please see Respring Toggle's source code and Resources folder.


CCTogglesTemplates list of languages used
Other projects in Logos