标签: ios-simulator

为什么CLLocation坐标在显示时会失去精度?

我正在进行一些实验,试图通过对随时间收集的数据进行加权平均来提高iPhone上的GPS准确度.我注意到控制台,iPhone模拟器和iPhone本身的坐标显示有所不同.

我正在运行基本的CoreLocation代码来设置我的位置管理器.

self.locationManager = [[CLLocationManager alloc] init];
[locationManager setDelegate:self];
[locationManager setDesiredAccuracy:kCLLocationAccuracyBest];

[locationManager startUpdatingLocation];
Run Code Online (Sandbox Code Playgroud)

在我的locationManager中:didUpdateToLocation:fromLocation:方法我使用NSLog以几种格式将坐标写入控制台,然后在我的IBOutlets中显示它们.

NSLog(@"%@", newLocation);
NSLog(@"%f", newLocation.coordinate.latitude);
NSLog(@"%e", newLocation.coordinate.latitude);
NSLog(@"%E", newLocation.coordinate.latitude);

self.latitude.text = [NSString stringWithFormat:@"%f", newLocation.coordinate.latitude];
self.longitude.text = [NSString stringWithFormat:@"%f", newLocation.coordinate.longitude];
self.altitude.text = [NSString stringWithFormat:@"%f", newLocation.altitude];
self.horizontalAccuracy.text = [NSString stringWithFormat:@"%f", newLocation.horizontalAccuracy];
self.verticalAccuracy.text = [NSString stringWithFormat:@"%f", newLocation.verticalAccuracy];
Run Code Online (Sandbox Code Playgroud)

写入控制台的值如下所示.

NSLog(@"%@", ...);  | <+42.40334972, -71.27483790> +/- 240.00m (speed -1.00 mps / course -1.00) @ 2010-10-19 12:15:00 GMT
NSLog(@"%f", ...); | 42.403350
NSLog(@"%e", ...); | 4.240335e+01
NSLog(@"%E", ...); | 4.240335E+01
Run Code Online (Sandbox Code Playgroud)

屏幕上显示的纬度和经度如下.

Latitude | …
Run Code Online (Sandbox Code Playgroud)

iphone precision gps ios-simulator

0
推荐指数
1
解决办法
2236
查看次数

UIActivity指标无法在iPhone 4(Retina)上运行

我有一个UIActivityIndicator在iPhone 3G模拟器/设备上工作得很好,但它不适用于iPhone 4(Retina)的模拟器/设备.我想提一下它是在黑色背景上.

iphone uiactivityindicatorview retina-display ios-simulator

0
推荐指数
1
解决办法
1059
查看次数

安装iOS 5用于模拟器

我已经下载了iOS 5测试版,想要测试我的应用程序,但由于我不想在我的iPhone上安装它,我希望它只安装在模拟器上.有谁知道如何做到这一点?在Xcode Organizer中,软件图像显示,但我无法在iOS 5中运行该应用程序.

xcode4 ios-simulator ios5

0
推荐指数
1
解决办法
1万
查看次数

Google AdMob Ads SDK仅适用于模拟器

SDK版本5.0.4,设备有IOS 4.3.2.在为模拟器构建时,一切都很好并且广告加载.当更改为"设备"时,我会在链接应用程序本身时收到9000+警告(!)"意外的srelocation类型9".在设备上运行时,应用程序EXC_BAD_ACCESS在viewDidLoad中的第一次调用时崩溃()[[GADBannerView alloc] initWithFrame].

我们遇到的问题是,最初,我们使用AdWhirl为旧的AdMob(即谷歌Admob)广告提供服务.使用正确的非测试AdWhirl帐户时,AdMob广告(仅限!)将永远不会显示.

我已经尝试一次更新AdWhirl和Google Admob,并仅使用新的AdMob删除AdWhirl.对于后者,行为如上所述,当与AdWhirl一起使用时,几秒钟后,当AdWhirl加载广告时,它会崩溃.

当然其他人得到了这个,你做了什么来解决它?

(更新:在另一台Iphone上安装它时,我奇怪地获得了比EXC_BAD_ACCESS更多的信息.它说:

Program received signal:  “EXC_BAD_ACCESS”.
Data Formatters temporarily unavailable, will re-try after a 'continue'. (Can't find dlopen function, so it is not possible to load shared libraries.)
Cannot access memory at address 0x2fdfe8c0
Cannot access memory at address 0x2fdfe8c0
Run Code Online (Sandbox Code Playgroud)

我的猜测是,我必须使共享库静态(并且它在模拟器上工作,因为它有dlopen()).我怎么做?)

iphone crash admob ios-simulator

0
推荐指数
1
解决办法
2753
查看次数

App崩溃的设备iphone 4s 5.0.1不在模拟器中

在iphone 4s设备(ver)5.0.1上测试.

崩溃:当您单击选项卡以从主页面进入索引页面时

1)的main.m

  //
  //  main.m
  //  salah1
  //  Created by syed ali on 30/11/2011.
  //  Copyright (c) 2011 j h birmingham. All rights reserved.
  //

  #import <UIKit/UIKit.h>

   #import "AppDelegate.h"

  int main(int argc, char *argv[])
 {
     @autoreleasepool {
    return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
   }
   }
Run Code Online (Sandbox Code Playgroud)

2)当地:

  argc  int 1
  argv  char ** 0x2fdffbb4
 *argv  char *  0x2fdffc68
Run Code Online (Sandbox Code Playgroud)

3)所有输出:

GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Fri Sep 16 06:56:50 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is …
Run Code Online (Sandbox Code Playgroud)

iphone sdk xcode objective-c ios-simulator

0
推荐指数
1
解决办法
1477
查看次数

无法模拟发送给我的iOS崩溃报告

我将我的应用程序发送到App Store但由于一些崩溃而被拒绝.我正在尝试模拟,在我的设备上运行应用程序,但看不到任何崩溃日志.请帮助解释日志,并告诉我为什么我无法在我的设备上模拟它.对不起,我是iOS开发的新手.

这是报告.

Thread 4 Crashed:
0   WebCore                         0x3375a366 _ZL17_WebTryThreadLockb + 202
1   WebCore                         0x3375a28c WebThreadLock + 48
2   UIKit                           0x3294ac64 -[UITextRangeImpl isEmpty] + 4
3   UIKit                           0x3294ee66 -[UITextRange(UITextSelectionAdditions) _isCaret] + 14
4   UIKit                           0x328f2c2c -[UITextSelectionView setCaretBlinks:] + 132
5   UIKit                           0x32951a0a -[UIKeyboardImpl setCaretBlinks:] + 94
6   UIKit                           0x3288799a -[UIKeyboardImpl setDelegate:force:] + 242
7   UIKit                           0x32869f1c -[UIPeripheralHost(UIKitInternal) _reloadInputViewsForResponder:] + 608
8   UIKit                           0x328c2e68 -[UINavigationController navigationTransitionView:didStartTransition:] + 944
9   UIKit                           0x328c24c0 -[UINavigationTransitionView transition:fromView:toView:] + 660
10  UIKit                           0x328c2220 -[UINavigationTransitionView transition:toView:] + …
Run Code Online (Sandbox Code Playgroud)

crash logging report ios ios-simulator

0
推荐指数
1
解决办法
666
查看次数

如何在iPhone应用程序中显示图形

我是iphone的新手.我创建了应用程序,我在其中维护有关收入,费用和总余额的数据.我需要在图表中显示该信息.

问题: - 我如何在我的Iphone应用程序中显示图形???如假设如果总余额为1000且收入为500则在图表中显示整体图表包含总balacne表示100%,收入将显示为20%


现在我在我的应用程序中使用CorePlot获取图形但是我提供了静态数据ON Axis ..我想显示来自数据库的数据..我该怎么做?

iphone objective-c ipad ios ios-simulator

0
推荐指数
1
解决办法
7875
查看次数

在iOS模拟器5.0中运行新的Xcode 4.3.3 Cordova应用程序错误"未找到符号:_NSURLIsExcludedFromBackupKey"

虽然运行iOS 5.1模拟器还可以.

我的系统是OSX 10.7狮子会.

我的Cordova应用程序不使用与NSURLIsExcludedFromBackupKey远程相关的任何内容.它仅在Foundation.framework/NSURL.h文件的头文件中定义.

我的研究发现了这两个相关的帖子但没有解决方案: 使用NSURLIsExcludedFromBackupKey而不会在iOS 5.0上崩溃

http://www.openradar.me/radar?id=1597401

运行iOS 5.0模拟器的输出:

dyld: Symbol not found: _NSURLIsExcludedFromBackupKey
  Referenced from: /Users/wug/Library/Application Support/iPhone Simulator/5.0/Applications/96C31219-6305-460D-A45E-CFA94BA64EFD/Sample.app/Sample
  Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/System/Library/Frameworks/Foundation.framework/Foundation
 in /Users/wug/Library/Application Support/iPhone Simulator/5.0/Applications/96C31219-6305-460D-A45E-CFA94BA64EFD/Sample.app/Sample

在较旧的模拟器上运行具有相同的错误.任何专家都可以对这个问题有所了解吗?

ios-simulator xcode4.3 cordova

0
推荐指数
1
解决办法
2759
查看次数

使用带有用于SplitView/Popover控件的图像或系统预设的UIBarButtonItem

我正在优化iPad的应用程序,并希望使用带图像的UIBarButtonItem来呈现弹出框.如果我使用带有标题的按钮但我更喜欢使用我自己的图像或者使用UIBarButtonSystemItem提供的图像,那么我目前使用的代码效果很好.如果我根本没有设置按钮的标题,它就不会显示出来.如果我设置标题和图像,我会在真实硬件上获得标题,但图像显示在模拟器上.使用UIBarButtonSystemItem,我得到了我想要的按钮,但它也以横向模式显示(它不应该这样做,因为我使用横向视图的拆分视图).

使用setImage,setTitle的任意组合或将按钮初始化为系统预设都无效.当检测到旋转到横向但它仍然在屏幕上时,我也尝试将系统预设的按钮设置为nil.我不确定如何从这里开始,但我真的想避免在这个按钮上使用字符串,而且我很想知道为什么会这样.

这是代码:

#pragma mark Split view handling
-(void)splitViewController:(UISplitViewController *)svc 
    willHideViewController:(UIViewController *)aViewController 
         withBarButtonItem:(UIBarButtonItem *)barButtonItem 
      forPopoverController:(UIPopoverController *)pc
{
    //If this bar button item doesn't have a title, it won't appear at all.
    [barButtonItem setTitle:@"-"];
    //barButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemOrganize target:[barButtonItem target] action:[barButtonItem action]];
    [barButtonItem setImage:[UIImage imageNamed:@"listing.png"]];

    //Take this bar button item and put it on the left side of our nav item
    [[self navigationItem] setLeftBarButtonItem:barButtonItem];
    self.popoverController = pc;
}

-(void)splitViewController:(UISplitViewController *)svc 
    willShowViewController:(UIViewController *)aViewController 
 invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem
{
    //Remove the bar button item …
Run Code Online (Sandbox Code Playgroud)

ipad ios ios-simulator

0
推荐指数
1
解决办法
1473
查看次数

iOS和Cocos2d:我的应用程序在模拟器上真的很慢但在设备上很精细

..我想知道是否有一些设置我应该改变,以使我的iOS 5.0应用程序在iPhone IOS 5.0模拟器上正常运行.它的运行速度仅为12fps,而不是我的设备运行速度为60fps.有帮助吗?我原以为模拟器能正常工作..

我使用的是XCode 4.3和Mac OS X 10.7.3.

xcode cocos2d-iphone ios ios-simulator

0
推荐指数
1
解决办法
3968
查看次数