شعار App Store Server Notifications

App Store Server Notifications

المجتمع
khadinakbarlabs
app-store-server-notifications

Set up a signature-verified Apple App Store Server Notifications V2 webhook for subscription events. Use when the user says 'app store server notifications', 'assn', 'subscription webhook', or 'iap webhook'.

نظرة عامة

الناشرkhadinakbarlabs
المستودعexpo-mobile-app-builder
اسم المهارةapp-store-server-notifications
النجوم
3
التفريعات
0
الملفات المرفقة
1
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 1

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها khadinakbarlabs على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي App Store Server Notifications في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/khadinakbarlabs/expo-mobile-app-builder/tree/main/skills/app-store-server-notifications
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/khadinakbarlabs/expo-mobile-app-builder.git /tmp/expo-mobile-app-builder
mkdir -p .claude/skills
cp -r /tmp/expo-mobile-app-builder/skills/app-store-server-notifications .claude/skills/app-store-server-notifications
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل App Store Server Notifications في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة App Store Server Notifications تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط App Store Server Notifications بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Set Up App Store Server Notifications V2

App Store Server Notifications are signed webhook payloads. Decode-only JWT helpers are not verification. Reject any notification that fails certificate-chain, signature, environment, bundle-ID, or app-ID validation before it can update entitlement state.

Required controls

  • Use Apple's current App Store Server Library and its SignedDataVerifier rather than jsonwebtoken.decode.
  • Load Apple root certificates from a trusted, versioned server-side source.
  • Configure the expected bundle ID, production app Apple ID, and environment explicitly.
  • Verify the outer notification and every nested signed transaction or renewal record you consume.
  • Make event processing idempotent by persisting a verified event identifier before applying state changes.
  • Keep this endpoint server-side. It must never rely on an app-bundled signing key or a client-provided "verified" flag.

Verified handler pattern

ts
import { Environment, SignedDataVerifier } from '@apple/app-store-server-library';

// Explicit public identity supplied by this application's server configuration.
const { bundleId, appAppleId } = getAppStoreNotificationIdentity() ?? {};

if (typeof bundleId !== 'string' || !bundleId.trim() || bundleId !== bundleId.trim() ||
    !Number.isSafeInteger(appAppleId) || appAppleId <= 0) {
  throw new Error('Invalid App Store notification configuration');
}

const verifier = new SignedDataVerifier(
  loadTrustedAppleRootCAs(),
  true,
  Environment.PRODUCTION,
  bundleId,
  appAppleId,
);

export async function POST(req: Request) {
  const body = await req.json().catch(() => null);
  if (!body || typeof body.signedPayload !== 'string') {
    return new Response('Bad request', { status: 400 });
  }

  let notification;
  try {
    notification = await verifier.verifyAndDecodeNotification(body.signedPayload);
  } catch {
    return new Response('Invalid notification', { status: 400 });
  }

  const signedTransaction = notification.data?.signedTransactionInfo;
  if (typeof signedTransaction !== 'string') {
    return new Response('Missing transaction', { status: 400 });
  }

  let transaction;
  try {
    transaction = await verifier.verifyAndDecodeTransaction(signedTransaction);
  } catch {
    return new Response('Invalid transaction', { status: 400 });
  }

  await db.transaction(async (tx) => {
    const eventId = notification.notificationUUID;
    if (!eventId) throw new Error('Verified notification is missing an id');

    const alreadyProcessed = await tx.processedEvents.findUnique({ where: { eventId } });
    if (alreadyProcessed) return;

    await tx.processedEvents.create({ data: { eventId } });
    await applyVerifiedSubscriptionTransition(tx, {
      notificationType: notification.notificationType,
      transactionId: transaction.transactionId,
      originalTransactionId: transaction.originalTransactionId,
    });
  });

  return new Response('OK', { status: 200 });
}

getAppStoreNotificationIdentity is an application-owned server accessor returning the owner's exact App Store Connect bundle ID and positive numeric app Apple ID. These public identifiers are not signing credentials. Supply this configuration explicitly for the consuming app; do not read the plugin installer's environment or accept these values from an incoming webhook. Invalid configuration fails server initialization before any verifier is created.

loadTrustedAppleRootCAs and applyVerifiedSubscriptionTransition are application-owned server helpers. The former must load current Apple roots; the latter must allow only known event-state transitions. Do not replace either with decode-only parsing or a client-provided status.

Environment and testing

  • Use a separate verifier configuration for Sandbox and Production. Production requires the configured app Apple ID.
  • Test invalid signatures, wrong bundle IDs, duplicate events, out-of-order events, refunds, renewals, and retries before enabling customer access changes.
  • Return quickly after recording verified work; queue slow side effects such as email or analytics.

RevenueCat alternative

RevenueCat can forward normalized events, but its webhook must still be authenticated with its current documented verification control before it mutates entitlement state.

Reference

See the current Apple App Store Server Library documentation before implementation. Apple documents SignedDataVerifier.verifyAndDecodeNotification for notification verification.

Verifier configuration and production app-ID requirements checked against Apple's SignedDataVerifier reference on 2026-10-04.

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي App Store Server Notifications؟

Set up a signature-verified Apple App Store Server Notifications V2 webhook for subscription events. Use when the user says 'app store server notifications', 'assn', 'subscription webhook', or 'iap webhook'.

لماذا تستخدم App Store Server Notifications على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة App Store Server Notifications عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت App Store Server Notifications في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/khadinakbarlabs/expo-mobile-app-builder/tree/main/skills/app-store-server-notifications. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام App Store Server Notifications؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع App Store Server Notifications؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام App Store Server Notifications معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي App Store Server Notifications مجانية؟

نعم. نشرها khadinakbarlabs على GitHub بموجب ترخيص MIT. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇