转换为 Objective C ARC 后 Xcode 4.2 中的白屏

发布于 2024-12-29 07:51:57 字数 1440 浏览 0 评论 0原文

我浏览了整个互联网寻找这个答案,但一无所获,所以我决定发布。

设备:Mac Mini (2011),运行 OSXLion (10.7),8GB 内存,500GB 硬盘 XCODE:版本4.2,运行IPAD 4.3和5.0模拟器

我使用程序HYPE(html 5设计器/生成器)开发了一个Ipad应用程序,该程序是由APPLE团队开发的。然后我使用 PhoneGap 模板将其引入 Xcode。我在以前版本的 Xcode(4.0 使用 MAC osx Snow leopard)中开发了这个应用程序,并且能够成功地将所有内容转移到 Xcode 4.2(包括phonegap 模板)中。

一切都运行良好。我在应用程序商店中成功启动了我的应用程序(五元素诊所图书高清 - http://itunes.apple.com/us/app/ Five-element-clinic-book-hd/id495512918?alreadyRedirected=1&ign-mpt=uo%3D2&mt=8

我注意到一些我想要更改的问题(即外部托管无法正常工作 - 我的嵌入式 YouTube 视频(iframe)无法正常工作,外部网站的链接无法正常工作以及iframe 引入的计数器脚本(javascript)也没有显示 - 所以我决定看一下所有内容,看看在phonegap.plist 外部主机区域中添加更详细的 URL 是否可行,但

我什至没有做到这一点。当我再次打开 Xcode 时(大约两周后,所以一定有某种 API 更改) - 我听到了一些错误提示,提示我需要将文件转换为 Objective C ARC,

所以我就这么做了 。这没有错误或问题。一切都无缝转换。所有文件均显示已转换为 Objective C ARC。

我清理然后重新构建 - 绝对没有错误或警告 - 并在 IPAD 模拟器(4.3 和 5.0)中运行我的应用程序。

这就是发生的事情。模拟器打开,我的应用程序启动,启动屏幕显示,应用程序开始加载应用程序的其余部分,然后进入白屏。永远。它无处可去。

所以我退出了应用程序,重新启动了应用程序,删除了应用程序,再次尝试了一切。同样的问题。如果我退出该应用程序,它只会进入黑屏。我还重新启动了 Xcode 和我的计算机,运行我的磁盘战士来修复文件权限等。

我的旧笔记本电脑中仍然有我的旧项目(Xcode 4.0,MAC OSx Snow Leopard)。所以我回到那里看看是否可以在旧环境中工作。没有。同样的错误要求我将文件转换为 Objective C ARC。所以我在零问题和零错误的情况下进行了转换。清理,构建 - 没有错误)并在模拟器中运行程序。它们都不起作用,所有内容都会加载启动屏幕并进入白色页面。

有谁知道发生了什么事吗?

谢谢你。

I have combed through the entire internet looking for this answer , and have found nothing, so I have decided to post.

EQUIPMENT: Mac Mini (2011) , running OSXLion (10.7) , 8gb ram, 500gb hd
XCODE: version 4.2, running IPAD 4.3 and 5.0 simulators

I have developed an Ipad app using the program HYPE (html 5 designer/generator), this program was developed by an APPLE team. I then brought it into Xcode using the PhoneGap template. I had developed this app in a previous version of Xcode (4.0 using MAC osx snow leopard) and was able to transfer everything into Xcode 4.2 (including the phonegap template) successfully.

All was running fine. I launched my app in the app store successfully (Five Element Clinic Book HD - http://itunes.apple.com/us/app/five-element-clinic-book-hd/id495512918?alreadyRedirected=1&ign-mpt=uo%3D2&mt=8)

I noticed some issues I wanted to change (namely the external hosting was not working - my embeded youtube video (iframe) was not working, links to external websites not working and an iframe bringing in a counter script (javascript) also not showing - so I decided to take a look at everything to see if I adding more detailed URLs in the phonegap.plist external hosts area would work.

I didn't even get that far. When I opened Xcode again (after about 2 weeks, so there must have been some kind of API change) - I had a tone of errors that lead me to the information of needing to Convert my files over to Objective C ARC.

So I did this, with no errors or issues. Everything converted seamlessly. All files are showing converted to Objective C ARC.

I CLEANED then reBUILT - with absolutely no errors or warnings - and RAN my app in the IPAD simulator (4.3 and 5.0).

This is what happens. The simulator opens, my app launches, the start up screen shows, the app begins to load the rest of the app and just goes to a WHITE SCREEN. Forever. It goes no where else.

So I have quit the app, restarted the app, deleted the app, tried everything again. Same issue. If I quit the app it just goes to a black screen. I have also restarted Xcode and my computer, ran my disk warriors to fix file permissions, etc.

I still have my old project in my old laptop (Xcode 4.0, MAC OSx Snow Leopard). So I went back there to see if I could just work from the old environment. Nope. Same errors that require me to convert files to Objective C ARC. So I converted with zero issues and zero errors. Cleaned, Built - no errors) and ran the program in the simulators. None of them work, everything loads the start-up screen and goes to a white page.

Does ANYONE know what is going on?

And thank you.

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

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

发布评论

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

评论(1

近箐 2025-01-05 07:51:57

我的不是白屏,而是黑屏。

在 applicationDidFinishLaunching 中,我使用结果

UIWindow* window = [[UIWindow alloc] initWithFrame:mainBounds];

作为局部变量。

转换为 ARC 后将其释放。

相反,它需要分配给我的应用程序委托的属性:

@interface MyAppDelegate : NSObject <UIApplicationDelegate> {
    UIWindow *mainWindow;
}

Mine was not a white screen - but a black screen.

In applicationDidFinishLaunching I was using the result of

UIWindow* window = [[UIWindow alloc] initWithFrame:mainBounds];

as a local variable.

Converting to ARC released it.

Instead it needed to be assigned to a property of my app delegate:

@interface MyAppDelegate : NSObject <UIApplicationDelegate> {
    UIWindow *mainWindow;
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文