r/jailbreakdevelopers • u/[deleted] • 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
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
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
3
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
May 31 '20
yep that’s correct.
1
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
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
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.