Cydia: Difference between revisions

From iPhone Development Wiki
(how to contribute to cydia)
(Undo revision 5279 by T2w (talk))
Tag: Undo
 
(11 intermediate revisions by 4 users not shown)
Line 4: Line 4:


TheiPhoneWiki has [http://theiphonewiki.com/wiki/Cydia_Errors a list of Cydia error messages and what they mean].
TheiPhoneWiki has [http://theiphonewiki.com/wiki/Cydia_Errors a list of Cydia error messages and what they mean].
== Developing tweaks for Cydia ==
''You can contribute advice and information here about making extensions for Cydia.''
As of Cydia 1.1.19, you can build extensions (tweaks) for Cydia to add new features and modify existing ones.
Cydia's code is open, so you can look at it to help you. Here is also a [https://www.reddit.com/r/jailbreak/comments/3by9l1/update_cydia_1119_released_no_longer_runs_as_root/csqo8ws?context=3 tip from saurik] though: "FWIW, I would recommend dumping headers for various reasons; my code uses a bunch of C++ templates and macros, it wasn't designed to work like a library so I don't separate interfaces from implementation as separate files in the general case, and frankly: dumping is a workflow that makes sense and is easily repeated; honestly, I, even as myself, would actually dump headers rather than scavenge them."


== Contributing to Cydia ==
== Contributing to Cydia ==


If you're interested in contributing improvements to Cydia, the process is similar to [[WinterBoard|contributing to WinterBoard]]. The first step is to get in contact with saurik (preferably via IRC in the [https://kiwiirc.com/client/irc.saurik.com/#cydia #cydia channel on irc.saurik.com] - see [[How to use IRC]]) and discuss the idea you have in mind, or explain your skills and ask him for suggestions about what to work on. After discussing your idea with him and making sure it makes sense for Cydia, he usually doesn't need a full code patch from you; if you can provide a proof of concept with a bit of useful code (or a bit of useful HTML/CSS), he can adapt that into the codebase in a way that makes sense for long-term maintenance. (Note that in general, unsolicited mockups done in Photoshop can't be integrated in a practical way, since they usually don't address all of the constraints that Cydia is working under.)
If you're interested in contributing improvements to Cydia, the process is similar to [[WinterBoard|contributing to WinterBoard]]. The first step is to get in contact with saurik (preferably via IRC in the [https://kiwiirc.com/client/irc.saurik.com/#cydia #cydia channel on irc.saurik.com] - see [[How to use IRC]]) and discuss the idea you have in mind, or explain your skills and ask for suggestions about what to work on.
 
(If you'd like to help with design, please don't start by showing Photoshop mockups - they generally can't be integrated in a practical way, since they usually don't address all of the constraints that Cydia is working under. Instead, it's helpful to start by explaining that you'd like to help with design, and show some examples of work you've done and what kind of design you like to do.)
 
The most likely next step is that saurik will have some feedback for you on your idea, or some suggestions for things you could work on. Making improvements to complex software is usually an iterative process - in other words, it takes several rounds of discussion, adjustments, and improvements to get something that works well. (For example, Surenix worked with saurik on the [http://www.cydiasubstrate.com/ Cydia Substrate] icon, and he [https://www.youtube.com/watch?v=NDW3CiGGCUk#t=11m55s explained in a JailbreakCon talk] that it took several revisions and a lot of discussion to come up with a great icon.)
 
After discussing your idea and working on it, saurik usually doesn't need a full code patch from you; if you can provide a proof of concept with a bit of useful code (or a bit of useful HTML/CSS), he can adapt that into the codebase in a way that makes sense for long-term maintenance.
 
If you'd like to read Cydia's code, it's useful to note that the code is formatted/organized in a way you might not expect - saurik uses a command-line text editor called vim, and he uses a feature called [https://www.linux.com/learn/tutorials/442438-vim-tips-folding-fun "folds"]. Check out [http://smartic.us/2009/04/06/code-folding-in-vim/ this video] and [http://vimcasts.org/episodes/how-to-fold/ this one too] to learn more if you like. You don't have to use vim folds to read Cydia's code, it just helps to know that to understand how the code is formatted.
 
== URL Scheme ==
 
Cydia has a [http://handleopenurl.com/scheme/cydia URL scheme].  
The following URLs can be used:
 
    cydia:// - open the previously opened page
    cydia://home - shows home page
    cydia://sections - shows list of sections
    cydia://sections/Tweaks - shows list of packages in this section
    cydia://changes - shows changes tab
    cydia://installed - list of installed packages
    cydia://sources - list of sources (aka repos) set up
    cydia://package/lighttpd - open details page for package with this identifier
    cydia://search/lighttpd - search for packages with this name or description
    cydia://storage - displays pie charts of disk usage
    cydia://url - open any URL (set target="_blank")
 
Cydia also has a [[Repository_Management#Share_API|share API]] for managing repositories.


== External links ==
== External links ==


* Source: http://gitweb.saurik.com/cydia.git (git://git.saurik.com/cydia.git)
* Source: http://gitweb.saurik.com/cydia.git (git://git.saurik.com/cydia.git)

Latest revision as of 13:33, 3 November 2018

Fill out more stuff here about other aspects of Cydia that may be interesting to developers.

For information about running a repository, see Repository Management and Packaging.

TheiPhoneWiki has a list of Cydia error messages and what they mean.

Developing tweaks for Cydia

You can contribute advice and information here about making extensions for Cydia.

As of Cydia 1.1.19, you can build extensions (tweaks) for Cydia to add new features and modify existing ones.

Cydia's code is open, so you can look at it to help you. Here is also a tip from saurik though: "FWIW, I would recommend dumping headers for various reasons; my code uses a bunch of C++ templates and macros, it wasn't designed to work like a library so I don't separate interfaces from implementation as separate files in the general case, and frankly: dumping is a workflow that makes sense and is easily repeated; honestly, I, even as myself, would actually dump headers rather than scavenge them."

Contributing to Cydia

If you're interested in contributing improvements to Cydia, the process is similar to contributing to WinterBoard. The first step is to get in contact with saurik (preferably via IRC in the #cydia channel on irc.saurik.com - see How to use IRC) and discuss the idea you have in mind, or explain your skills and ask for suggestions about what to work on.

(If you'd like to help with design, please don't start by showing Photoshop mockups - they generally can't be integrated in a practical way, since they usually don't address all of the constraints that Cydia is working under. Instead, it's helpful to start by explaining that you'd like to help with design, and show some examples of work you've done and what kind of design you like to do.)

The most likely next step is that saurik will have some feedback for you on your idea, or some suggestions for things you could work on. Making improvements to complex software is usually an iterative process - in other words, it takes several rounds of discussion, adjustments, and improvements to get something that works well. (For example, Surenix worked with saurik on the Cydia Substrate icon, and he explained in a JailbreakCon talk that it took several revisions and a lot of discussion to come up with a great icon.)

After discussing your idea and working on it, saurik usually doesn't need a full code patch from you; if you can provide a proof of concept with a bit of useful code (or a bit of useful HTML/CSS), he can adapt that into the codebase in a way that makes sense for long-term maintenance.

If you'd like to read Cydia's code, it's useful to note that the code is formatted/organized in a way you might not expect - saurik uses a command-line text editor called vim, and he uses a feature called "folds". Check out this video and this one too to learn more if you like. You don't have to use vim folds to read Cydia's code, it just helps to know that to understand how the code is formatted.

URL Scheme

Cydia has a URL scheme. The following URLs can be used:

   cydia:// - open the previously opened page
   cydia://home - shows home page
   cydia://sections - shows list of sections
   cydia://sections/Tweaks - shows list of packages in this section
   cydia://changes - shows changes tab
   cydia://installed - list of installed packages
   cydia://sources - list of sources (aka repos) set up
   cydia://package/lighttpd - open details page for package with this identifier
   cydia://search/lighttpd - search for packages with this name or description
   cydia://storage - displays pie charts of disk usage
   cydia://url - open any URL (set target="_blank")

Cydia also has a share API for managing repositories.

External links