Skip to content

Instantly share code, notes, and snippets.

View nevyn's full-sized avatar

Nevyn Bengtsson nevyn

View GitHub Profile
@nevyn
nevyn / README.md
Last active April 25, 2025 23:03
Github Action for Mac notarized + appstore build + TestFlight + visionOS

GH Actions workflow for Mac and Vision Pro

This is taken from my app koja.works, as an attempt to get full notarized + appstore builds made in a single CI workflow so that I can keep track of all moving parts, without involving Fastlane (which in my experience breaks way too often due to system rubies etc).

Builds for both Mac and visionOS, and the vision file is probably easily extensible to iOS as well (maybe with matrix builds?)

I'm using a self-hosted Mac mini on my desktop, which is why I have to fiddle with PATH etc. I'm doing this because I require metal support during build, which Xcode Cloud does not support.

#include <Cartridge.h>
uint8_t smb2_overworld[] = {
0x56, 0x67, 0x6D, 0x20, 0x5B, 0x69, 0x00, 0x00, 0x61, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x68, 0x00, 0x00, 0x17, 0xD9, 0x21, 0x00, 0xDF, 0x12, 0x00, 0x00, 0x20, 0xCC, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x4F, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
pod 'Lookback'
@nevyn
nevyn / LookbackParticipate.h
Created February 4, 2017 00:01
Participate 1.9.0.2
#import <UIKit/UIKit.h>
@protocol LookbackParticipateDelegate;
NS_ASSUME_NONNULL_BEGIN
/*! @header LookbackParticipate.h
@abstract
Public interface for Lookback Participate, the friendly UX for guiding test particioants
through a research session, be it live, self-guided or in person.
@nevyn
nevyn / LookbackParticipate.h
Created February 3, 2017 07:53
Lookback 1.8.0.1 SDK Beta
#import <UIKit/UIKit.h>
@protocol LookbackParticipateDelegate;
NS_ASSUME_NONNULL_BEGIN
/*! @header LookbackParticipate.h
@abstract
Public interface for Lookback Participate, the friendly UX for guiding test particioants
through a research session, be it live, self-guided or in person.
LBNotificationBanner *banner = [LBNotificationBanner new];
[overlay addSubview:banner];
banner.translatesAutoresizingMaskIntoConstraints = NO;
LBInstallConstraint(banner, Top, Equal, overlay, Top, 1, margin);
LBInstallConstraint(banner, Left, Equal, overlay, Left, 1, margin);
LBInstallConstraint(banner, Right, Equal, overlay, Right, 1, margin);
#define LBGuard(cond, ...) \
BOOL __COND_SUCCESSFUL_AT ## __LINE__ = (cond); \
if(!__COND_SUCCESSFUL_AT ## __LINE__) {\
NSString *failureReason = [NSString stringWithFormat:__VA_ARGS__]; \
NSAssert(NO, @"Guard failed: %@: %@", @#cond, failureReason); \
NSLog(@"Guard failed: %@: %@", @#cond, failureReason);\
} \
if(__COND_SUCCESSFUL_AT ## __LINE__) {}
- (void)appendEncodedSampleBuffer:(CMSampleBufferRef)encodedSampleBuffer addTrimAtStart:(int)trimDuration fromSource:(id)source
{
if(!_hasWrittenTrim) {
GFLog(GFDebug, @"Adding trim to sample buffer from %@", source);
const AudioStreamBasicDescription *asbd = CMAudioFormatDescriptionGetStreamBasicDescription(CMSampleBufferGetFormatDescription(encodedSampleBuffer));
CMSetAttachment(encodedSampleBuffer, kCMSampleBufferAttachmentKey_TrimDurationAtStart, (id)CFAutorelease(
CMTimeCopyAsDictionary(
CMTimeMake(trimDuration, asbd->mSampleRate),
kCFAllocatorDefault
@nevyn
nevyn / LBCompositionDebugger.h
Last active July 18, 2017 17:42
Debug AVVideoCompositions using Apple's sample code, without having to find space *in your app* for its debug UI. I'm not sure what the correct way to license this is, but you're free to use it as you see fit as long as it conforms to Apple's original license :)
//
// LBCompositionDebugger.h
// LBMergeVideo
//
// Created by nevyn Bengtsson on 2016-02-19.
// Copyright © 2016 Lookback. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreMedia/CoreMedia.h>
(lldb) po _webView
<WKWebView: 0x6080001a24c0>
(lldb) po [_webView subviews]
<__NSArrayM 0x6000002426a0>(
<WKView: 0x608000140bb0>
)
(lldb) po [[[_webView subviews] firstObject] subviews]