从Xcode在我的iPhone上运行我的应用程序时遇到问题.该应用程序在模拟器(iPhone,iPad等)中运行(看似很好).它也对iPhone4的或iPad2的加载时运行正常,尝试启动从Xcode中应用(4.5版),我得到的Xcode以下信息,只有当它是:无法启动""无法获得处理1024" 的任务,并且Xcode输出窗口中唯一的消息是:
error: failed to launch '/private/var/mobile/Applications/36159066-FEDB-4A26-A05D-E599F397074A/MetriScan.app' -- failed to get the task for process 1024`
Run Code Online (Sandbox Code Playgroud)
iPhone上没有崩溃日志,但控制台日志包含以下内容(在运行前清除):
Oct 29 11:14:37 Bjarne mobile_house_arrest[1015] <Error>: Max open files: 125
??Oct 29 11:14:38 Bjarne installd[31] <Error>: 0x2fe93000 handle_install: Install of "/var/mobile/Media/PublicStaging/MetriScan.app" requested by mobile_installation_proxy
??Oct 29 11:14:38 Bjarne installd[31] <Error>: 0x2fe93000 MobileInstallationInstall_Server: Installing app Bjarne.Christensen.MetriScan
??Oct 29 11:14:39 Bjarne installd[31] <Error>: Oct 29 11:14:39 SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName]
??Oct 29 11:14:40 Bjarne SpringBoard[509] <Warning>: Killing Bjarne.Christensen.MetriScan for termination assertion
??Oct 29 11:14:40 Bjarne …
Run Code Online (Sandbox Code Playgroud) 我正在尝试对标准活动(打印,邮件,FaceBook等)实施自定义活动,但现在只需要标准打印(用于AirPrint)和我自己的直接方法自定义打印.我显然缺少一些基本的东西,因为我的自定义类中的方法都没有被调用.现在我只有一些NSLog语句来确定调用序列,并使框架运行.
以下是我的自定义活动类的测试代码:
// PrintActivity.h
#import <UIKit/UIKit.h>
@interface PrintActivity : UIActivity
@end
Run Code Online (Sandbox Code Playgroud)
还有他们
#import "PrintActivity.h"
@interface PrintActivity ()
@property (nonatomic, strong) UIWebView *dummyWebView;
@end
@implementation PrintActivity
- (NSString *)activityType {
NSLog(@"activityType");
return @"MetriScan Print";
}
- (NSString *)activityTitle {
NSLog(@"activityTitle");
return @"MetriScan\nPrint";
}
- (UIImage *)activityImage {
NSLog(@"activityImage");
UIImage *icon = [UIImage imageNamed:@"metriscan_57_c2a_3.png"];
return icon;
}
- (BOOL)canPerformWithActivityItems:(NSArray *)activityItems {
NSLog(@"canPerformWithActivityItems");
return YES;
}
- (void)prepareWithActivityItems:(NSArray *)activityItems {
NSLog(@"prepareWithActivityItems");
}
- (void)performActivity {
NSLog(@"Do the actual printing here");
// My custom …
Run Code Online (Sandbox Code Playgroud)