JB=$(ls -d /var/containers/Bundle/Application/.jbroot-* | head -1)
APP="$JB/Applications/Driver.app"
echo "APP=$APP"
ls -la "$APP/Driver" "$APP/Frameworks/build-info.framework/build-info" 2>&1 | head -3
echo "--- register the jbroot copy ---"
"$JB/usr/bin/uicache" -p "$APP" 2>&1 | head -3
echo "rc=$?"
echo "--- registered path now ---"
"$JB/usr/bin/uicache" -l 2>&1 | grep -i "vn.gsm.md" | head -2
echo "--- launch ---"
"$JB/usr/bin/uiopen" --bundleid vn.gsm.md 2>&1 | head -2
sleep 8
launchctl list 2>/dev/null | grep "UIKitApplication:vn.gsm.md" | head -2
echo REG46C_DONE
