为什么我在安装 iPhone 应用程序时收到 CGContext 错误?
为什么我在尝试安装 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
Why am I getting the following errors when trying to install my iPhone application?
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看来您正在尝试安装她的部署目标大于您的 iPhone 操作系统版本的应用程序。 Xcode 抱怨他弄乱了你的代码试图使用的一些 lybreris。
It seems that you are trying to install app that her deployment target is larger then your iPhone os version. Xcode is complaining that he is messing some lybreris your code is trying to use.
如果您创建了一个使用第三方框架(例如 CydiaSubstrate.framework)的应用,则必须将该框架复制到应用程序包内的
Frameworks
文件夹中。可以在此处找到有关在 Xcode 中自动执行此过程的优秀教程。
更新:
此错误表明您已调用
CGContextDrawImage
但未指定有效的CGContextRef
参数。如果没有看到相关代码,我就不得不猜测发生了什么。 CGContextDrawImage 的原型如下:第一个参数必须是有效的 图形上下文,通常是当前绘图上下文,访问方式如下:
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.An excellent tutorial for automating this process in Xcode can be found here.
Update:
This error suggests that you have made a call to
CGContextDrawImage
but did not specify a validCGContextRef
argument. Without seeing the relevant code, I would have to guess at what is going on. The prototype forCGContextDrawImage
is as follows:The first argument must be a valid graphics context, usually the current drawing context, accessed as follows: