我有一个现有的iOS应用程序,并希望添加一大块代码,我一直在开发另一个项目,以方便测试.新的块基本上处理将图像保存到各种共享服务等.因为共享代码需要大量的测试和未来的更新,我想知道将代码块合并到我现有的应用程序中的最佳方法是什么.
我不知道它应该是静态库,动态库还是框架,老实说,我不确定区别是什么,或者我应该如何去做它并在Xcode中设置它.
我所知道的是,我需要/想要为共享代码保留单独的测试和更新应用程序,并让主应用程序使用它.
如果你还不能说,我不是一个git wiz.我只是一个简单的单人开发人员.
任何帮助或方向将不胜感激.谢谢!
我在我的新Swift 2.0项目中使用谷歌的一些外部代码,在早期版本中需要"libz.dylib".更新到新的XCode /新SDK后.
XCode现在无法导入libz.dylib并抛出一些错误
架构i386的未定义符号:"_ deflate",引用自:+ [GAICompressionUtil gai_dataByCompressingBytes:length:compressionLevel:mode:]在libGoogleAnalyticsServices.a(GAICompressionUtil.o)"_ deflateEnd"中,引自:+ [GAICompressionUtil gai_dataByCompressingBytes:length:compressionLevel: mode:]在libGoogleAnalyticsServices.a(GAICompressionUtil.o)" deflateInit2 "中,引自:+ [GAICompressionUtil gai_dataByCompressingBytes:length:compressionLevel:mode:]在libGoogleAnalyticsServices.a(GAICompressionUtil.o)"_inflate"中,引自:+ [GAICompressionUtil在libGoogleAnalyticsServices.a(GAICompressionUtil.o)"_inflateEnd"中的gai_dataByInflatingBytes:length:isRawData:],引自:+ [GAICompressionUtil gai_dataByInflatingBytes:length:isRawData:]在libGoogleAnalyticsServices.a(GAICompressionUtil.o)" inflateInit2 "中,引用自:+ libGoogleAnalyticsServices.a中的[GAICompressionUtil gai_dataByInflatingBytes:length:isRawData:](GAICompressionUtil.o)ld:symbol(s)找不到架构i386 clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)
在查看"构建阶段"设置中的可用包时,我可以找到"libz.tbd",它似乎是libz.dylib的替代品.导入此lib时,链接器错误保持不变,但我收到此额外警告:
警告:正在跳过文件'/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/usr/lib/libz.tbd'(意外文件类型'text'in框架和库构建阶段)
知道该怎么办?
如果Xcode 7中缺少libz.dylib和libsqlite3.dylib但是存在.tbd版本,我如何使用Parse.我只是想设置推送通知.我如何让它工作?
此外,我认为这是因为我无法导入Parse到AppDelegate.swift而没有错误说它不存在.
构建我的应用程序时出现此错误.任何人都可以帮我解决这个问题吗?
我正在使用swift和parse.com.非常感谢你的帮助!
由于我无法发布图片,下面我发布了整个错误消息.
Undefined symbols for architecture i386:
"_sqlite3_bind_blob", referenced from:
-[PFSQLiteDatabase _bindObject:toColumn:inStatement:] in Parse(PFSQLiteDatabase.o)
"_sqlite3_bind_double", referenced from:
-[PFSQLiteDatabase _bindObject:toColumn:inStatement:] in Parse(PFSQLiteDatabase.o)
"_sqlite3_bind_int64", referenced from:
-[PFSQLiteDatabase _bindObject:toColumn:inStatement:] in Parse(PFSQLiteDatabase.o)
"_sqlite3_bind_null", referenced from:
-[PFSQLiteDatabase _bindObject:toColumn:inStatement:] in Parse(PFSQLiteDatabase.o)
"_sqlite3_bind_parameter_count", referenced from:
___59-[PFSQLiteDatabase executeQueryAsync:withArgumentsInArray:]_block_invoke in Parse(PFSQLiteDatabase.o)
___57-[PFSQLiteDatabase executeSQLAsync:withArgumentsInArray:]_block_invoke in Parse(PFSQLiteDatabase.o)
"_sqlite3_bind_text", referenced from:
-[PFSQLiteDatabase _bindObject:toColumn:inStatement:] in Parse(PFSQLiteDatabase.o)
"_sqlite3_close", referenced from:
___30-[PFSQLiteDatabase closeAsync]_block_invoke in Parse(PFSQLiteDatabase.o)
"_sqlite3_column_blob", referenced from:
-[PFSQLiteDatabaseResult dataForColumnIndex:] in Parse(PFSQLiteDatabaseResult.o)
"_sqlite3_column_bytes", referenced from:
-[PFSQLiteDatabaseResult dataForColumnIndex:] in Parse(PFSQLiteDatabaseResult.o)
"_sqlite3_column_count", referenced from:
-[PFSQLiteDatabaseResult columnNameToIndexMap] …Run Code Online (Sandbox Code Playgroud) 我目前正在运行Xcode 6 beta 2,但我找不到UIKit.framework.我按照Apple的参考页面中的建议查看了System/Library/Frameworks
除了UIKit之外,所有其他框架都在那里.
注意:导入UIKit框架没有问题
所以人们我正在开发一个应用程序和我使用的 SDK 需要添加libstdc++.6.0.0.dylib,当我搜索它时没有 .dylib 并且显示一个 .tbd 。我只是在谷歌上搜索了两者之间的区别,想知道我是否可以将其添加.tbd到我的项目中而不是.dylib?
我试图导入Parse和Bolts框架,但Xcode无法构建项目.我尝试了以下方法,但似乎没有任何结果:
我正在使用Xcode 7.0 beta(swift 2.0).附上相同的屏幕截图.

欢呼和感谢提前!! [