[英]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.