我想反编译iOS Twitter框架,如果我从xcode的模拟器中获取twitterd文件,该模拟器预编译为在x86(?)上运行,而不是ARM.至于工具,我使用http://code.google.com/p/i386codedump/ 说明:
Usage: code-dump [options] <mach-o-file> where options are:
-a show instance variable offsets
-A show implementation addresses
--arch <arch> choose a specific architecture from a universal binary (ppc, i386, etc.)
-C <regex> only display classes matching regular expression
-H generate header files in current directory, or directory specified with -o
-I sort classes, categories, and protocols by inheritance (overrides -s)
-o <dir> output directory used for -H
-r recursively expand frameworks and fixed VM shared libraries
-s …Run Code Online (Sandbox Code Playgroud) 我已经在我的项目中添加了一些框架,通过Targets - > Build Phases - > Link binary with Libraries.特别是,我在谈论AVFoundation.framework.我还将所有框架添加到项目导航器中的Frameworks文件夹中.
但是,当我尝试引用链接框架中的类时,我得到"语义问题 - 使用未声明的标识符"错误.
例如,我在两个底线中得到这些错误:
- (void)viewDidLoad {
[super viewDidLoad];
AVCaptureSession *session = [[AVCaptureSession alloc] init];
session.sessionPreset = AVCaptureSessionPresetMedium;
}
Run Code Online (Sandbox Code Playgroud)
我想知道框架是否正确地链接到我的项目.那么,我该如何解决这个问题呢?我必须说我是iOs和ObjC开发的新手.
谢谢
我正在尝试更新我的项目以使用CocoaPods 0.36.0的新use_frameworks!选项.我在Xcode 6.2中使用Objective-C(不是Swift),部署目标是8.1.
除Google Analytics之外,所有内容都正在构建和正确链接,我收到链接器错误:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_GAI", referenced from:
objc-class-ref in NPDAnalytics.o
"_OBJC_CLASS_$_GAIDictionaryBuilder", referenced from:
objc-class-ref in NPDAnalytics.o
ld: symbol(s) not found for architecture x86_64
我试过改变我的旧式
#import <GoogleAnalytics_iOS_SDK/GAI.h>
到模块导入:
@import GoogleAnalytics_iOS_SDK;
但这没有任何帮助.
GAI是否与CocoaPods的动态框架实现不兼容,还是有其他一些技巧可以让它发挥作用?
objective-c ios ios-frameworks cocoapods google-analytics-sdk
该利斯特应用是苹果的只有苹果观察样本项目之一.它首先是为支持watchOS 1而编写的,后来在2015年9月16日更新以支持watchOS 2.因此,有许多目标,组等不能一致地命名,因此很难理解是什么.
我想创建一个类似的项目,我有一个iOS和带有共享代码/框架的watchOS 2.由于Lister应用程序的复杂性,我很难理解如何设置这样的项目.
我应该如何设置项目以便在watchOS 2和iOS应用程序之间共享代码?(注意:不要求支持watchOS 1.)
作为参考,以下是Lister应用程序中的目标,方案和组的列表:
我有一个压缩的 iOS 框架,我试图在测试应用程序中通过 CocoaPods 使用它。我已将它添加到我的 github 下发布。我的 podspec 目前看起来像:
Pod::Spec.new do |spec|
spec.name = "TestPod"
spec.version = "0.1"
spec.license = { :type => "MIT", :file => "LICENSE" }
spec.homepage = 'http://www.test.com'
spec.author = "test"
spec.summary = "test."
spec.source = { :http => "https://github.com/username/TestPod/releases/download/0.1/TestPod-0.1.zip"}
spec.vendored_framework = "TestPod-0.1/TestPod.framework"
spec.ios.deployment_target = '8.0'
end
Run Code Online (Sandbox Code Playgroud)
我直接在我的 Podfile 中使用它 -
target 'TestApp' do
pod 'TestPod', :git => 'https://github.com/username/TestPod/'
end
Run Code Online (Sandbox Code Playgroud)
但是,在执行 a 时pod install,我发现TestPod-0.1.zip既没有下载压缩文件,也没有将框架添加到我的项目中。有人可以告诉我如何让 Pod 下载我的框架吗?
在整个开发过程中,我一直在 ipad mini 上运行我的应用程序,但今天尝试在 iPad air 2 上测试它,但它无法运行。我收到以下警告
ignoring file /ProjectFolder/SwiftEverlive/EverliveSDK.framework/EverliveSDK, missing required architecture arm64 in file /ProjectFolder/SwiftEverlive/EverliveSDK.framework/EverliveSDK (2 slices)
它也不能在模拟器上运行。我还尝试在 Swift everlive 文件夹中打开该项目,但无法打开。它说它缺少project.pbxproj文件
老实说,不明白这里类似问题的其他答案。对不起,iOS 开发人员很新。
编辑 问题似乎出在 Telerik Everlive 框架的设置中,并且它是如何编译的,我可以通过任何方式解决这个问题,因为我没有时间让他们提出解决方案。
我正在构建一个混合语言框架.我主要有Swift文件和一些Objective-C文件.
Objective-C文件之一是使用CommonCrypto的加密类.
似乎我出于某种原因无法导入它,即使我可以在Objective-C框架中导入它.
有人能解释一下为什么会这样吗?
我发现的所有其他解决方案都谈到了当我需要在Swift框架中的Objective-C中使用它时如何在Swift中使用CommonCrypto.
PS:
我尝试在伞头文件中添加导入,如下所示:
#import <CommonCrypto/CommonCrypto.h>
错误:Include of non-modular header inside framework module 'name of header'
这个答案没有解决问题:答案
我有一个框架和一个项目,在其中使用我的框架。我试图使用在开发过程中本地构建的框架。有没有办法做类似的事情:
如果my-local-library-path存在,请执行以下操作:
pod 'MyLibraryName', :path => "my-local-library-path"
Run Code Online (Sandbox Code Playgroud)
否则,请执行以下操作:
pod 'MyLibraryName', git: 'https://github.com/mygithuburl', tag: '0.0.1'
Run Code Online (Sandbox Code Playgroud) 已经挣扎了几天...基本上,我已经构建了一个已编译的已发布框架,并将其与cocoaPods一起分发。问题在于,然后将此框架应用程序存档会出现以下错误:
ld: bitcode bundle could not be generated because '/.../testingPodsAcrossversions/Pods/Pod/Pod.framework/Pod' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build file '/.../testingPodsAcrossversions/Pods/Pod/Pod.framework/Pod' for architecture arm64
Run Code Online (Sandbox Code Playgroud)
我做了这些事情:
搜索“启用位码”设置,并将其设置为“调试”和“发布”模式。
搜索位码设置。在“调试”和“发布”模式下添加-fembed-bitcode,或者可以在“调试”和“ -fembed-bitcode”中添加-fembed-bitcode-marker。
在“用户定义”设置下添加BITCODE_GENERATION_MODE,然后为“调试”和“发布”模式添加位代码,或者您可以在“调试”和“发布”模式中添加位代码。
我只需要发布版本,所以我没有构建通用框架,只是发布版本...我真的想解决这个问题,因为这对我来说是一场噩梦。
Frameworks在Xcode中使用不同的时,编译器和链接器有时不包含Framework在库中.结果是在启动期间立即崩溃,并显示以下消息:
dyld: Library not loaded: /System/Library/Frameworks/UserNotifications.framework/UserNotifications
Referenced from: /var/containers/Bundle/Application/1D41BD68-9B88-4D5D-B7AB-0D1C31979964/App.app/App
Reason: image not found
Run Code Online (Sandbox Code Playgroud)
我发现了一种避免这种情况的方法.它只是在应用程序代码中直接提到该库的部分,如下所示:
UNNotificationRequest *unr = [UNNotificationRequest alloc];
Run Code Online (Sandbox Code Playgroud)
只包含该框架中的文件#include <UserNotifications/UserNotifications.h>并不能解决问题.也没有@import UserNotifications;
对于不同的ios版本,我已经在不同的xcode版本上看到了不同的库.
以下是另外两个具有更具体用例的问题:
1)在Storyboard中使用的CABTMidiCentralViewController仅在使用代码引用时才有效
2)切换到Xcode 10导致iOS9的UserNotifications.framekwor dyld:Library not loaded crash`
有人知道为什么会这样吗?如何避免代码的愚蠢部分,但仍然链接/嵌入所需的框架?
Always Embed Swift Standard Libraries了YESLink Frameworks Automatically了YESUserNotifications框架的问题:
使用模拟器:
使用真实设备:
当我将框架更改为时,它不会崩溃Required,Optional但推送通知不起作用.
ios-frameworks ×10
ios ×8
cocoapods ×3
objective-c ×3
swift ×3
xcode ×3
apple-watch ×1
cocoa ×1
dependencies ×1
dyld ×1
ios9 ×1
ipad ×1
iphone ×1
linker ×1
podfile ×1