r/jailbreakdevelopers • • May 30 '20

Release SpotifyBlue - Simple Tweak (Open Source)

Hi,

I've just started to get into tweak development and i thought id post it here.

SpotifyBlue is a simple tweak that opens Spotify when you connect to a Bluetooth device.

It uses the UIKit framework and the private framework BluetoothManager

I've annotated the tweak as much to help people know exactly what each line does, which I hope helps new developers.

Source Code - https://github.com/KodeyThomas/SpotifyBlue

Available for Download on my Repo - https://kodeycodesstuff.tech/repo

Happy Developing

Edit: Wanna learn how to create tweaks join https://discord.gg/n98qGZu

38 Upvotes

14 comments sorted by

5

u/NoisyFlake Developer May 30 '20

You might want to use { and } for your if-statements, especially if they span multiple lines or you might get unexpected behavior.

Also you don't need to check r to return it. Simply return r outside your if-condition as you have to return it in any case.

2

u/[deleted] May 30 '20

updating the source now :)

2

u/jsw68 May 31 '20

Great tweak! P.S. I’m pretty sure you can do the same thing with activator. Although, to be fair, it can be quite glitchy with me sometimes.

2

u/[deleted] May 31 '20

yes you can do the exact same thing with activator, this doesn’t use activator at all and is completely independent. it was mainly written so people can see the source code and create there first tweak

1

u/jsw68 May 31 '20

Cool! Nice job!

3

u/YoelkiToelki Developer May 30 '20

Very cool, you can release it on r/jailbreak

5

u/[deleted] May 30 '20

already have :)

1

u/ReverseThatApp May 30 '20

great tweak and nice code commented out, just small question it seems you dont need to declare all methods in BluetoohDevice interface, just declare what u will use in Tweak.x for tweak compilation, correct me if Im wrong 🤗

2

u/[deleted] May 31 '20

yep that’s correct.

1

u/ReverseThatApp Jun 01 '20

btw for discord server, may I know why I only see 1 rules channel?

2

u/[deleted] Jun 01 '20

you need to react with the green tick emoji, it says it on the rules page

1

u/BostonEng May 31 '20

I am just starting out as well. I am still having trouble developing/testing my code. Would you mind sharing your source of truth and how you got started with developing tweaks?

1

u/[deleted] May 31 '20

the discord server i linked is incredibly helpful there is live-streams every few days on how to develop tweaks, and you can always ask for help.

a good foundation in obj-c helps a lot and to start off theos is your best compiler.

don’t be afraid to ask for help every dev starts somewhere

2

u/th3phantom May 30 '20

great tweak