Next Steps After Getting Started: Difference between revisions

From iPhone Development Wiki
(also add your own ideas for tutorials)
m (Formatting.)
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Let's say you've figured out how to [[Theos/Setup|set up Theos]], you know enough Objective-C to fool around, you know a little about how to use [[MobileSubstrate|Cydia Substrate]], and basically you've read all the beginner tutorials - what do you read next to learn more about jailbroken development as you experiment with building your own project? We should have a set of "next steps" tutorials for you! These ones haven't been written yet, but it would be pretty cool for somebody to write them...maybe you? Anyone can start a page and begin writing some explanations, or you can just start filling out the sections below with more information. (Also, if you have an idea for a tutorial that you would like to see, feel free to add it to this list - it might inspire somebody to write an explanation of that thing you want to learn about.)
Let's say you've figured out how to [[Theos/Setup|set up Theos]], you know enough Objective-C to fool around, you know a little about how to use [[MobileSubstrate|Cydia Substrate]], and basically you've read all the beginner tutorials - what do you read next to learn more about jailbroken development as you experiment with building your own project? We should have a set of "next steps" tutorials for you!


== Using Development Tools ==  
These ones haven't been written yet, but it would be pretty cool for somebody to write them...maybe you? Anyone can start a page and begin writing some explanations, or you can just start filling out the sections below with more information. (Also, if you have an idea for a tutorial that you would like to see, feel free to add it to this list - it might inspire somebody to write an explanation of that thing you want to learn about.)
 
= Using Development Tools =
 
== Changing System Volume with AVSystemController and Cycript ==


=== Changing System Volume with AVSystemController and Cycript ===
* assumes the reader has basic Cycript and Objective-C knowledge
* assumes the reader has basic Cycript and Objective-C knowledge
* takes the reader on a journey through AVSystemController's methods using cycript  
* takes the reader on a journey through AVSystemController's methods using cycript  
* documents the though process (ex. "-getVolume:(float*)arg1 forCategory:(id)arg2 indicates that there are different categories of volumes and they each have their own values")
* documents the thought process (ex. "-getVolume:(float*)arg1 forCategory:(id)arg2 indicates that there are different categories of volumes and they each have their own values")
* ends with using the information learned to make a [http://github.com/Nexuist/vol really simple command line utility]
* ends with using the information learned to make a [http://github.com/Nexuist/vol really simple command line utility]


===Dynamic Method Hooking With Cycript===
== Dynamic Method Hooking With Cycript ==
 
* assumes the reader has basic Cycript and Objective-C knowledge
* assumes the reader has basic Cycript and Objective-C knowledge
* showcases cycript's ability to hook methods  
* showcases Cycript's ability to hook methods  
* hook some example methods to display benefits of dynamic hooking
* hook some example methods to display benefits of dynamic hooking


===What's %ctor good for?===
== What's %ctor good for? ==
* explains what %ctor is and how to use it
* show some example situations where it might be useful
* show situations where %ctor is NOT a good idea


===Dissecting App Store Apps===
%ctor is a logos directive which resolves to <code>static __atribute_((constructor)) void _logosLocalCtor_&lt;8 hex characters&gt;()"</code>, which is a function that runs when your dylib is loaded.
* shows how to dump headers for an app binary


== Integrating with Third Party Frameworks and Libraries ==
The syntax is similar to that of a function. An example is shown below:
 
<source lang=objc>
%ctor {
    //This runs when your tweak gets loaded into the target process
    NSlog(@"My tweak has loaded!");
}
</source>
 
%ctor can be useful for performing any setup, for example, instantiating variables or reading your tweak's preferences.
 
However, there are certain things which %ctor is '''not''' for. Do not use UIKit elements, perform time consuming algorithms or communicate over the network.
 
It will probably minimize headache if you keep your %ctor use to just the bare minimum, and rather perform any extraneous setup at a later point.
 
== Dissecting App Store Apps ==
 
* shows how to dump headers for an app binary (see also [[Reverse Engineering Tools]])
 
= Integrating with Third Party Frameworks and Libraries =
 
== Building Tweak Settings with [[PreferenceLoader]] ==


===Building Tweak Settings with PreferenceLoader===
* goes through the process of building simple tweak preferences that are shown in Settings
* goes through the process of building simple tweak preferences that are shown in Settings
* shows the correct way to read/write to those settings in your tweak code
* shows the correct way to read/write to those settings in your tweak code
* also shows how to use popular third party additions such as AppList / libcolorpicker / Activator
* also shows how to use popular third party additions such as [[AppList]] / [[libcolorpicker]] / [[libactivator|Activator]]


===Your First Flipswitch===
== Your First Flipswitch ==
* explains the idea behind the Flipswitch framework
 
* explains the idea behind the [[Flipswitch]] framework
* goes through the different methods / objects you'll probably be using
* goes through the different methods / objects you'll probably be using
* shows how to build a simple flipswitch (ex. a simple flashlight toggle)
* shows how to build a simple flipswitch (ex. a simple flashlight toggle)


===Integrating Your Tweak With Activator===
== Integrating Your Tweak With Activator ==
* goes through the Activator library
 
* goes through the [[libactivator|Activator]] library
* dos / don't of the Activator API
* dos / don't of the Activator API
* demo a simple Activator event (ex. show an alert)
* demo a simple Activator event (ex. got a notification from a specific app)
* demo a simple Activator listener (ex. got a notification from a specific app)
* demo a simple Activator listener (ex. show an alert)

Latest revision as of 19:52, 26 January 2016

Let's say you've figured out how to set up Theos, you know enough Objective-C to fool around, you know a little about how to use Cydia Substrate, and basically you've read all the beginner tutorials - what do you read next to learn more about jailbroken development as you experiment with building your own project? We should have a set of "next steps" tutorials for you!

These ones haven't been written yet, but it would be pretty cool for somebody to write them...maybe you? Anyone can start a page and begin writing some explanations, or you can just start filling out the sections below with more information. (Also, if you have an idea for a tutorial that you would like to see, feel free to add it to this list - it might inspire somebody to write an explanation of that thing you want to learn about.)

Using Development Tools

Changing System Volume with AVSystemController and Cycript

  • assumes the reader has basic Cycript and Objective-C knowledge
  • takes the reader on a journey through AVSystemController's methods using cycript
  • documents the thought process (ex. "-getVolume:(float*)arg1 forCategory:(id)arg2 indicates that there are different categories of volumes and they each have their own values")
  • ends with using the information learned to make a really simple command line utility

Dynamic Method Hooking With Cycript

  • assumes the reader has basic Cycript and Objective-C knowledge
  • showcases Cycript's ability to hook methods
  • hook some example methods to display benefits of dynamic hooking

What's %ctor good for?

%ctor is a logos directive which resolves to static __atribute_((constructor)) void _logosLocalCtor_<8 hex characters>()", which is a function that runs when your dylib is loaded.

The syntax is similar to that of a function. An example is shown below:

%ctor {
    //This runs when your tweak gets loaded into the target process
    NSlog(@"My tweak has loaded!");
}

%ctor can be useful for performing any setup, for example, instantiating variables or reading your tweak's preferences.

However, there are certain things which %ctor is not for. Do not use UIKit elements, perform time consuming algorithms or communicate over the network.

It will probably minimize headache if you keep your %ctor use to just the bare minimum, and rather perform any extraneous setup at a later point.

Dissecting App Store Apps

Integrating with Third Party Frameworks and Libraries

Building Tweak Settings with PreferenceLoader

  • goes through the process of building simple tweak preferences that are shown in Settings
  • shows the correct way to read/write to those settings in your tweak code
  • also shows how to use popular third party additions such as AppList / libcolorpicker / Activator

Your First Flipswitch

  • explains the idea behind the Flipswitch framework
  • goes through the different methods / objects you'll probably be using
  • shows how to build a simple flipswitch (ex. a simple flashlight toggle)

Integrating Your Tweak With Activator

  • goes through the Activator library
  • dos / don't of the Activator API
  • demo a simple Activator event (ex. got a notification from a specific app)
  • demo a simple Activator listener (ex. show an alert)