MDMGiftAppActivity
A UIActivity subclass that provides a "Gift App" action to a UIActivityViewController
Install / Use
/learn @mmorey/MDMGiftAppActivityREADME
MDMGiftAppActivity
MDMGiftAppActivity is a UIActivity subclass that provides a "Gift App" action to a UIActivityViewController.
On iOS 6 the user will be taken to the gifting dialog for the app on the App Store.
On iOS 7 the user is taken to the App Store page for the app. Once on the App Store page the user still has to tap on the action button in the top toolbar. Apple no longer allows linking directly to the gifting dialog.

Installation
With CocoaPods
Add pod 'MDMGiftAppActivity' to your Podfile or pod 'MDMGiftAppActivity', :head if you're feeling adventurous.
Manually
Just drag the MDMGiftAppActivity.[h|m] and glyphicons_069_gift[@2x].png files into your project.
Important note: If your project doesn't use ARC you must add the -fobjc-arc compiler flag to MDMGiftAppActivity.m in Target Settings > Build Phases > Compile Sources.
Usage
Important note: Demo does not work on the simulator as it does not contain the App Store app, you must test on a device. See example Xcode project in /MDMGiftAppActivityDemo.
1) Create a MDMGiftAppActivity object
MDMGiftAppActivity *giftAppActivity = [[MDMGiftAppActivity alloc] initWithAppID:@"XXXXXXXXX"];
An app ID can be found by opening iTunes and finding the app you want to link to. Right click on its icon then on ‘Copy Link’. For this example I’m using Buoy Explorer and the link looks like this: https://itunes.apple.com/us/app/buoy-explorer-noaa-marine/id593296099?mt=8. The app ID for Buoy Explorer is 593296099. You can also find the App ID with the Apple Link Maker.
2) Add it to a UIActivityViewController
UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[@"Awesome app"]]
applicationActivities:@[giftAppActivity]];
[self presentViewController:activityViewController animated:YES completion:nil];
Optional Features
Add affiliate ID
MDMGiftAppActivity *giftAppActivity = [[MDMGiftAppActivity alloc] initWithAppID:@"XXXXXXXXX" withAffiliateToken:@"YYYYYY" withCampaignToken:@"ZZZZZZZ"];
Change activity title
giftAppActivity.titleOfActivity = @"Gift This App";
Change activity icon
giftAppActivity.iconOfActivity = [UIImage imageNamed:@"gift-icon"];
Credits
MDMGiftAppActivity is brought to you by Matthew Morey. The gift icon is from GLYPHICONS. If you have feature suggestions or bug reports, feel free to help out by sending pull requests or by creating new issues. If you're using MDMGiftAppActivity in your project, attribution would be nice.
Related Skills
node-connect
351.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。

