Tag: ios5

应用程序在启动时被拒绝崩溃,但无法在模拟器或设备中复制,而且设备日志很模糊

我最近有一个应用程序在iOS 5.0的iPhone 5上发布时遭到了拒绝,苹果公司的好友们附上了一个崩溃报告。 但是,我无法在我的设备(也是运行iOS 5的iPhone 4)或iOS 5的模拟器上复制此崩溃。而且,从下面的副本中可以看出,报告是神秘的。 线程5发生崩溃,这有助于包括? 信息应该在哪里。 第一个问题 – 这个崩溃报告象征性的错误? 我保留了dSYM并按照指导方针拖到了主办单位。 如果它是正确的象征,我不知所措。 我已经通过警告(所有的语义,没有什么可能是一个malloc / over-release问题)检查,检查内存分配,NSZombie和malloc警卫等运行,但似乎没有任何错误。 谁能帮忙? 非常感谢,谢谢。 Incident Identifier: 63777680-AF77-44B8-8264-47CF89D32C28 CrashReporter Key: 66ff952824b039efb0379c6c6fe11a2e035c7573 Hardware Model: iPhone3,1 Process: —- [4453] Path: /var/mobile/Applications/8F6C5D92-2052-4C56-9897-D6C50C1A7DA1/—-/—- Identifier: —- Version: ??? (???) Code Type: ARM (Native) Parent Process: launchd [1] Date/Time: 2011-10-18 12:58:50.611 -0700 OS Version: iPhone OS 5.0 […]

将现有OAuth凭据迁移到ACAccountStore时出错

我在将现有的OAuth凭据迁移到iOS 5中的ACAccountStore时遇到了问题。 ACAccountStore *accountStore = [[ACAccountStore alloc] init]; ACAccountType *accountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter]; ACAccount *account = [[ACAccount alloc] initWithAccountType:accountType]; ACAccountCredential *credential = [[ACAccountCredential alloc] initWithOAuthToken:savedToken tokenSecret:savedSecret]; [account setCredential:credential]; [accountStore saveAccount:account withCompletionHandler:^(BOOL success, NSError *error) { if (error) { NSLog(@"error saving account: %@", error.description); } NSLog(@"saved account? %d", success); }]; 最终的结果是: 2011-10-17 19:09:32.927 League[13731:1b803] error saving […]

在应用程序购买 – 消费品

我正在应用程序中购买应用程序。 根据要求,每次在我的应用程序中按“购买”button, 应购买产品 。 对于itunesconnect网站,在哪种types的我的产品将落在? 易耗品或非易耗品。 我很困惑select类别。 我已经阅读了一些文件,但仍然令人困惑。

难倒:NSURLConnection + php – 键/值格式问题

我很难过 试图发布到NSURLConnection的PHP脚本。 在这一整个下午,所以我想现在是时候寻求帮助。 我已经阅读了很多这里@ NSURLConnection的post,但我还没有想出我的错误。 我正在上传一个图像,有两个键/值对: user和user 。 我正在使用的ObjC代码如下。 日志输出显示string(跳过图像数据)。 我使用底部的PHP脚本在浏览器中testing我的服务器端PHP:它工作正常。 所以我在某种程度上搞砸了ObjC代码。 任何人都看到我要去哪里错了? //日志输出 —————————– 14737809831466499882746641449 内容处理:表单数据; userfile的= someImage&用户=困倦; 内容types:应用程序/八位字节stream // objC NSData *imageData = UIImageJPEGRepresentation(img, .5); NSString *urlString = @"http://example.com/loader.php"; NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init]; [request setURL:[NSURL URLWithString:urlString]]; [request setHTTPMethod:@"POST"]; NSString *boundary = [NSString stringWithString:@"—————————14737809831466499882746641449"]; NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@",boundary]; [request addValue:contentType […]

仅在“ios 5.0”中才能在导航栏上设置图像

在我的通用应用中, 我正在导航栏上设置图像…使用** objective c category…on UINavigationBar ** 代码在iphone中的ios 5.0中 正常工作 * 代码在iPhone / iPad的ios 4.3中正常工作 * *But not working in **ios 5.0 iPad*** – (void) drawRect:(CGRect)rect { UIImage *image; image = [UIImage imageNamed: @"Navigation.png"]; [image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; [self setTintColor:[UIColor clearColor]]; NSLog(@"Draw Rect"); }

错误域= NSCocoaErrorDomain代码= 512“操作无法完成。操作无法完成。是一个目录

我想使用writeToFile来存储一个图片的文件,但find下面的错误,如何解决它? 错误域= NSCocoaErrorDomain代码= 512“操作无法完成。(cocoa错误512.)”{NSFilePath = /用户/ alexqdh /图书馆/应用程序支持/ iPhone模拟器/ 6.0 /应用程序/ xxx /文件/ girl.png ,NSUnderlyingError = 0x753e630“操作无法完成,是一个目录”} -(NSString*)getImagePath:(NSString *)name { NSArray *path =NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *docPath = [path objectAtIndex:0]; NSFileManager *fileManager = [NSFileManager defaultManager]; NSString *finalPath = [docPath stringByAppendingPathComponent:name]; [fileManager createDirectoryAtPath:finalPath withIntermediateDirectories:YES attributes:nil error:nil]; return finalPath; } //below is how to use NSData writeToFile […]

如何在coreplot中设置剧情委托

这是来自这个链接的后续问题: coreplot bar tap不工作 ,答案是: Set the plot delegate to your bar plot delegate object. 有人可以告诉我怎么做。我正在尝试创build一个简单的条形图,只需点击10天,没有任何教程可以用简单的语言来解释这个过程。 这将是一个很大的帮助,我会很感激它。提前感谢。

UIBarButtonItem的setBackgroundImage通过外观不适用于其他UIControlStates

我试图使用外观方法(> iOS 5.0)自定义UIBarButtonItem。 它工作正常的UIControlStateNormal,但不是突出显示或禁用。 看图像 这是我用来设置这些的代码: // now configure the UIBarButtonItems UIImage *buttonBGInactive = [[UIImage imageNamed:@"button-navbar-30-inactive.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 15, 0, 15)]; UIImage *buttonBGActive = [[UIImage imageNamed:@"button-navbar-30-pressed.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 15, 0, 15)]; [[UIBarButtonItem appearanceWhenContainedIn:[MFMailComposeViewController class], nil] setBackgroundImage: buttonBGInactive forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; [[UIBarButtonItem appearanceWhenContainedIn:[MFMailComposeViewController class], nil] setBackgroundImage: buttonBGActive forState:UIControlStateHighlighted barMetrics:UIBarMetricsDefault]; 有任何想法吗? 图像本身是30x30px,我不需要横向模式。

模拟器的iPhone应用程序编译失败:llvm-gcc-4.2失败,退出代码为255

我的队友用Restkit的一个新分支编译了应用程序,并且在他的机器上工作正常。 我拉了新的代码后,我无法再在模拟器模式下运行它。 restkit中的供应商代码存在一些错误。 我尝试了在其他qns中讨论过的e解决scheme:改变架构,有效的架构,编译器(到llvm 2.1),以及其他一些设置。 但似乎没有任何工作。 任何意见将不胜感激。 在我们的configuration唯一的主要区别是,他已经在他的xcode上安装了ios5,而我没有它 CompileC /Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/Objects-normal/armv6/NXJsonParser.o Vendor/NXJSON/NXJsonParser.m normal armv6 objective-c com.apple.compilers.llvmgcc42 cd /Users/mingyeow/tmp/DailyMus.es/RestKit setenv LANG en_US.US-ASCII setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 -x objective-c -arch armv6 -fmessage-length=0 -pipe -std=gnu99 -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wunused-variable -DDEBUG -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -fexceptions -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 -iquote /Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/RestKitJSONParserNXJSON-generated-files.hmap -I/Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/RestKitJSONParserNXJSON-own-target-headers.hmap -I/Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/RestKitJSONParserNXJSON-all-target-headers.hmap -iquote /Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/RestKitJSONParserNXJSON-project-headers.hmap -I/Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Products/Debug-iphonesimulator/include -IVendor/NSJSON -I/Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/DerivedSources/armv6 -I/Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/DerivedSources […]

用于Core Image的CIGaussianGradientfilter的示例

我正在寻找iOS的这个核心图像filter的代码示例。 那些在inputImage参数中的filter,我可以搞清楚如何实现。 但没有inputImage参数,我不知道它是如何工作的。 以下是苹果公司的文档摘录: CIGaussianGradient 使用高斯分布生成从一种颜色到另一种颜色的渐变。 参数 inputCenter A CIVector class whose attribute type is CIAttributeTypePosition and whose display name is Center. Default value: [150 150] Identity: (null) inputColor0 A CIColor class whose display name is Color 1. inputColor1 A CIColor class whose display name is Color 2. inputRadius An NSNumber class whose attribute type […]