内部iPhone购买/查看应用程序iAd(不使用iAd框架)?

发布于 2024-10-22 08:51:11 字数 548 浏览 4 评论 0原文

我喜欢 Apple 通过应用程序购买 iAds 的方式。它们看起来很棒,并且非常适合用户导航。我有一个非常艰巨的任务。我想克隆这个接口并将其应用到我自己的应用程序中,而不使用iAd框架,这样这个“广告”就可以离线访问。这意味着它不会使用 iAd 框架,并且需要将此页面的数据存储在应用程序中。这也意味着他们的 0.99 购买按钮不会购买和下载应用程序,而是会打开一个对话框,询问用户是否要打开 iTunes App Store。 (我会将此广告放入我的专业版本的免费版本中,我宁愿拥有一些很酷的东西,而不只是指向 App Store 的链接)

我下载了 iAd Producer,并且能够为我的应用程序创建 iAd 将其导出进入 Safari,然后将其另存为网络存档。但是我不知道如何将网络存档保存到我的应用程序中,也不知道如何修改购买按钮以使其链接到 iTunes App Store。

我希望它不是 web 格式,而是 .h 和 .m 文件,这样我就可以将它添加到我的项目中。是否有适合我寻找的 ViewController 模板?我应该创建自己的模板还是应该尝试挽救苹果的模板?

我是不是太疯狂了,这根本不可能? 感谢您的帮助!

I love the way that Apple has the application purchase iAds. They look great and they are great for the user to navigate with. I have a really hard task. I want to clone this interface and apply it to my own application without using the iAd framework, so this 'ad' can be accessed offline. This means that it wouldn't use the iAd framework and it would need to store the data from this page in the application. This would also mean that they 0.99 buy button would not buy and download the application but instead it would open a dialog box that asked the user if they would like to open the iTunes App Store. (I would be putting this ad in my free version for my pro version, and I would rather have something cool then just a link to the App Store)

I downloaded the iAd Producer and I was able to create the iAd for my application export it into Safari and then save it as a webarchive. However I do not know how to save the webarchive to my application and I do not know how to modify the purchase button to have it link to the iTunes App Store.

I was hoping that it wouldn't be in webformat but instead in a .h and .m file so I just could add it to my project. Is there a ViewController template out there for what I am looking for? Should I create my own template or should I attempt to salvage Apple's?

Am I too crazy and this is just impossible?
Thanks for your help!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

临走之时 2024-10-29 08:51:11

1:是的,你可能太疯狂了。是什么让你认为 Apple 会批准你的应用程序使用被黑的 iAd?

2:在我的应用程序中,我使用以下代码来显示 HTML 文件。您应该能够使用类似的东西来显示您的网络存档:

NSString *path = [[NSBundle mainBundle] pathForResource: @"Welcome Screen" ofType: @"html"];
NSFileHandle *readHandle = [NSFileHandle fileHandleForReadingAtPath: path];

NSString *htmlString = [[NSString alloc] initWithData: [readHandle readDataToEndOfFile] 
                                             encoding: NSMacOSRomanStringEncoding];

textDisplay.scalesPageToFit = YES;
textDisplay.contentMode = UIViewContentModeRedraw;
[self.textDisplay loadHTMLString: htmlString 
                         baseURL: [NSURL fileURLWithPath: [path stringByDeletingLastPathComponent]]];
[htmlString release];

1: Yes, you probably are too crazy. What makes you think Apple will approve your app with the hacked iAd?

2: In my app I used the following code to display an HTML file. You should be able to use something similar to display your web archive:

NSString *path = [[NSBundle mainBundle] pathForResource: @"Welcome Screen" ofType: @"html"];
NSFileHandle *readHandle = [NSFileHandle fileHandleForReadingAtPath: path];

NSString *htmlString = [[NSString alloc] initWithData: [readHandle readDataToEndOfFile] 
                                             encoding: NSMacOSRomanStringEncoding];

textDisplay.scalesPageToFit = YES;
textDisplay.contentMode = UIViewContentModeRedraw;
[self.textDisplay loadHTMLString: htmlString 
                         baseURL: [NSURL fileURLWithPath: [path stringByDeletingLastPathComponent]]];
[htmlString release];
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文