简体   繁体   English

为什么在安装iPhone应用程序时出现CGContext错误?

[英]Why am I getting CGContext errors when installing an iPhone app?

Why am I getting the following errors when trying to install my iPhone application? 为什么在尝试安装iPhone应用程序时出现以下错误?

warning: Unable to read symbols for /Library/MobileSubstrate/MobileSubstrate.dylib (file not found).
warning: Unable to read symbols for /Library/Frameworks/CydiaSubstrate.framework/Libraries/SubstrateLoader.dylib (file not found).
2011-02-18 21:57:05.038 Catalog Dev[399:307] MS:Notice: Installing: com.yourcompany.Catalog-Dev [Catalog Dev] (550.32)
2011-02-18 21:57:05.210 Catalog Dev[399:307] MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/Activator.dylib
warning: Unable to read symbols for /Library/MobileSubstrate/DynamicLibraries/Activator.dylib (file not found).
2011-02-18 21:57:05.518 Catalog Dev[399:307] MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/sandcastleclient.dylib
warning: Unable to read symbols for /Library/MobileSubstrate/DynamicLibraries/sandcastleclient.dylib (file not found).
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0.2/Symbols/usr/lib/libsubstrate.dylib (file not found).
Fri Feb 18 21:57:11 Moes-iPhone Catalog Dev[399] <Error>: CGContextDrawImage: invalid context 0x0
Fri Feb 18 21:57:11 Moes-iPhone Catalog Dev[399] <Error>: CGContextSetStrokeColorWithColor: invalid context 0x0
Fri Feb 18 21:57:11 Moes-iPhone Catalog Dev[399] <Error>: CGContextSetLineWidth: invalid context 0x0
Fri Feb 18 21:57:11 Moes-iPhone Catalog Dev[399] <Error>: CGContextMoveToPoint: invalid context 0x0
Fri Feb 18 21:57:11 Moes-iPhone Catalog Dev[399] <Error>: CGContextAddLineToPoint: invalid context 0x0
Fri Feb 18 21:57:11 Moes-iPhone Catalog Dev[399] <Error>: CGContextAddLineToPoint: invalid context 0x0
Fri Feb 18 21:57:11 Moes-iPhone Catalog Dev[399] <Error>: CGContextAddLineToPoint: invalid context 0x0
Fri Feb 18 21:57:11 Moes-iPhone Catalog Dev[399] <Error>: CGContextAddLineToPoint: invalid context 0x0
Fri Feb 18 21:57:11 Moes-iPhone Catalog Dev[399] <Error>: CGContextDrawPath: invalid context 0x0
Fri Feb 18 21:57:11 Moes-iPhone Catalog Dev[399] <Error>: CGBitmapContextCreateImage: invalid context 0x0

If you have created an app that makes use of a third-party framework (CydiaSubstrate.framework, for example), you will have to copy that framework into the Frameworks folder inside your application bundle. 如果创建的应用程序使用第三方框架(例如,CydiaSubstrate.framework),则必须将该框架复制到应用程序包内的Frameworks文件夹中。

An excellent tutorial for automating this process in Xcode can be found here . 这里可以找到有关在Xcode中自动执行此过程的出色教程。

Update: 更新:

<Error>: CGContextDrawImage: invalid context 0x0 

This error suggests that you have made a call to CGContextDrawImage but did not specify a valid CGContextRef argument. 此错误表明您已调用CGContextDrawImage ,但未指定有效的CGContextRef参数。 Without seeing the relevant code, I would have to guess at what is going on. 在没有看到相关代码的情况下,我不得不猜测正在发生什么。 The prototype for CGContextDrawImage is as follows: CGContextDrawImage的原型如下:

void CGContextDrawImage (
    CGContextRef c,
    CGRect rect,
    CGImageRef image
);

The first argument must be a valid graphics context , usually the current drawing context, accessed as follows: 第一个参数必须是有效的图形上下文 ,通常是当前的图形上下文,可通过以下方式访问:

CGContextRef myContext = [[NSGraphicsContext currentContext] graphicsPort];
...
CGContextDrawImage(myContext, someRect, someImage);

It seems that you are trying to install app that her deployment target is larger then your iPhone os version. 似乎您要安装的应用程序的部署目标比iPhone os版本大。 Xcode is complaining that he is messing some lybreris your code is trying to use. Xcode抱怨说他弄乱了您的代码试图使用的文字符号。

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

相关问题 在使用Core Plot构建iPhone应用程序时,为什么会看到以下链接器错误? - Why am I seeing the following linker errors when building an iPhone app with Core Plot? iphone MPMoviePlayerViewController CGContext错误 - iphone MPMoviePlayerViewController CGContext Errors iPhone-当视图映射正确时,为什么会出现此错误? - iPhone - Why am I getting this error when the view mapping is correct? 为什么在使用SoundCloud API时出现OAuth错误? - Why am I getting OAuth errors when using the SoundCloud API? 在iPhone和iPad之间复制Core Data数据库时,为什么会出现写入错误? - Why am I getting a write error when copying a Core Data database between iPhone and iPad? 为什么我使用SoundCloud API遇到以下编译器错误? - Why am I getting the following compiler errors with the SoundCloud API? 当我输入iPhone邮件表时,iPhone应用程序崩溃 - Iphone app getting crashing when i enter the iphone mail sheet 我正在尝试在设备上测试我的iPhone应用程序,并且遇到调试错误(收到程序接收到的SIGABRT)xcode 4.2 - I am trying to test my iPhone application on my device and I am getting debugging errors (Program Received SIGABRT) xcode 4.2 在iPhone上安装iPhone应用程序 - Installing iPhone app on iPhone 将 iPhone 应用程序安装到 iPhone - Installing iPhone App to iPhone
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM