Skip to content

Instantly share code, notes, and snippets.

View jeiting's full-sized avatar

Jacob Eiting jeiting

View GitHub Profile
@jeiting
jeiting / psdkAnalyticsServiceWrapper.mm
Last active January 29, 2019 18:35 — forked from daveweaver/psdkAnalyticsServiceWrapper.mm
Originator / Revenue Cat integration
/*
The main class in this file is the AnalyticsServiceWrapper. It handles any connections to analytics services we
use, such as Google Analytics, crash reporting, revenue reporting, etc., and of course Adjust and Revenue Cat. This
is fairly old code, which is why it's written as a C++ class that contains Objective-C calls.
*/
#import <AdSupport/ASIdentifierManager.h>
#import "Adjust.h"
#import "Purchases.h"
-- cached, sound played based on the name for the sound effect, rather than the file name
SoundManager.load("dropped_bass", "assets/droppbass.ogg")
SoundManager.playSound("explosion") -- Sounds that aren't preloaded are loaded automatically
SoundManager.playMusic("dropped_bass")
def remove(self, uid = None):
"""Remove an element with UID = uid from the queue."""
if (uid is None):
raise qManagerException("remove: Provide a UID for removal.")
if (not self.lockFlag):
the_elem = None
for elem in self:
Log.debug("found UID %s" % elem['UID'])
if (elem['UID'] == uid):
the_elem = elem