简体   繁体   English

从Xcode在Iphone模拟器上运行时,JQM / Phonegap本机应用程序停留在初始屏幕上

[英]JQM/Phonegap native app stuck at splash screen when run on Iphone simulator from xcode

This guy seems to have a similar problem, except mine doesn't work at all, not just on the first try. 这个家伙似乎也有类似的问题,除了我的根本不工作,而不仅仅是第一次尝试。 Today I installed xcode 4.2/ios simulator 5.0 hoping that would fix the problem, but it hasn't helped. 今天,我安装了xcode 4.2 / ios模拟器5.0,希望可以解决此问题,但并没有帮助。 The app has consistently run on actual devices, but all the developers who own Iphones are out of the office today and the company ipod is in use elsewhere. 该应用程序一直在实际设备上运行,但是拥有Iphone的所有开发人员今天都不在办公室里,并且公司ipod在其他地方也正在使用。

I've tried closing both xcode and the ios simulator, changing between 5.0 and 4.3, changing between regular iphone and iphone retina, trying with simulator running first and trying with simulator closed first. 我试过关闭xcode和ios模拟器,在5.0和4.3之间切换,在常规的iphone和iphone视网膜之间切换,先尝试运行模拟器,然后先关闭模拟器。 It just sits there on the loading screen. 它只是位于加载屏幕上。 As far as I know the simulator has never worked, I'm not the one who setup xcode or any of the devices (he doesnt work on Mondays and didn't know how to fix it on Friday anyway). 据我所知,模拟器从未使用过,我不是设置xcode或任何设备的人(他在星期一不工作,也不知道在星期五如何修复它)。 Any help would be appreciated. 任何帮助,将不胜感激。

Turns out adding "localHosts" to ExternalHosts fixed the Simulator, but the simulator doesn't like the ajax call to our services site, so it still isn't working, but now at least we have an acceptable reason for it. 事实证明,将“ localHosts”添加到ExternalHosts修复了模拟器,但模拟器不喜欢对我们服务站点的ajax调用,因此它仍然无法正常工作,但是至少现在我们有一个可以接受的理由。 (Devices work correctly, so it isn't that big of a deal) Hope this helps someone. (设备可以正常工作,所以没什么大不了的)希望这对某人有帮助。

If anyone can think of a way for the simulator to work with the reference to external calls I'll transfer the answer to their answer :P. 如果有人能想到模拟器可以参考外部呼叫的方式,我将把答案转移给他们的答案:P。

Like Luke said in a comment to you: just use JSONP . 就像Luke在给您的评论中说的那样: 只需使用JSONP即可

It's not the simulator's fault, that's just how browsers work. 这不是模拟器的错,这只是浏览器的工作方式。 They don't allow cross-domain ajax requests. 他们不允许跨域的ajax请求。 That's why there is a solution to this problem, namely JSONP. 这就是为什么有一个解决方案,即JSONP。 In essence, the response must be a regular JSON object that is enclosed in a function call, something like callback_function({json: 'object'}) . 本质上,响应必须是包含在函数调用中的常规JSON对象,类似于callback_function({json: 'object'})

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么我的应用程序可以在模拟器中运行,但是在iPhone上运行时却卡在启动屏幕上? - Why does my app work in the simulator but get stuck on the splash screen when I run it on my iPhone? React 本机应用程序卡在设备的启动屏幕上,但可在模拟器中运行 - React native app stuck on splash screen on device but works in simulator Phonegap应用停留在初始屏幕上供Apple审阅者使用 - Phonegap app stuck on splash screen for Apple reviewers 应用程序卡在初始屏幕上 - 以 Xcode 上的 NSException 结尾 - App stuck on splash screen - ending with an NSException on Xcode React Native App卡在启动屏幕上 - React Native App Stuck On Splash Screen Mobile First Studio混合应用Xcode卡在启动画面上 - Mobile First Studio Hybrid App Xcode stuck at Splash Screen 应用程式停留在启动画面反应本机导航上 - App stuck on Splash screen react-native-navigation Cordova ios 应用程序卡在 Xcode 模拟器的加载屏幕上 - Cordova ios app got stuck at loading screen in Xcode simulator 当我在 iOS 上运行 Ionic 时卡在启动屏幕上 - Stuck on the splash screen when I run the Ionic on iOS 当我在ios模拟器中运行应用时,我的应用被卡在显示版权内容的白屏上 - My app gets stuck on a white screen that says copyright stuff when i run it in a ios simulator
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM