小编Vis*_*esh的帖子

山狮PKG签约

我有一个插件,根据指南不需要签名但我也有pkg安装程序(安装插件)必须签名.所以我签署了我的插件和pkg文件,以便更安全.由于没有检查插件,我没有看到任何问题.但我的pkg安装程序有问题.我在10.6.8上通过pkg安装程序签名,以便我可以在10.5,10.6,10.7和10.8上重复使用它.我使用了以下命令

productsign --sign "Developer ID Installer: My Company" /Volumes/code/MyInstaller.pkg "/Volumes/code/My Installer.pkg"
Run Code Online (Sandbox Code Playgroud)

productsign显示的日志令人鼓舞

productsign: signing product with identity "Developer ID Installer: My Company" from keychain /Users/vishveshk/Library/Keychains/login.keychain
productsign: adding intermediate certificate "Developer ID Certification Authority"
productsign: Wrote signed product archive to /Volumes/code/My Installer.pkg
Run Code Online (Sandbox Code Playgroud)

当我在10.8上使用时检查它

sudo spctl -a -v My Installer.pkg
Run Code Online (Sandbox Code Playgroud)

结果很糟糕

My Installer.pkg: rejected
source=no usable signature
Run Code Online (Sandbox Code Playgroud)

我在同一台机器上签了我的插件,似乎工作正常.我做错了吗?对此有任何见解将是有用的.

macos pkg-file osx-mountain-lion

7
推荐指数
1
解决办法
5780
查看次数

指定初始值设定项只应在'超级'上调用指定的初始值设定项

此代码是此处实现的有序字典的修改版本. https://github.com/nicklockwood/OrderedDictionary/tree/master/OrderedDictionary

接口 - > OrderedDictionary.h

 @interface OrderedDictionary : NSMutableDictionary
{
}
Run Code Online (Sandbox Code Playgroud)

实现 - > OrderedDictionary.m

// This is the new method added.
- (instancetype)init
{
    return [self initWithCapacity:0];
}

- (instancetype)initWithCapacity:(NSUInteger)capacity
{
    self = [super init];
    if (self != nil)
    {
       // Allocate here.
    }
    return self;
}
Run Code Online (Sandbox Code Playgroud)

代码工作正常,但我在" - (instancetype)init"中得到以下警告.

  1. 指定初始值设定项只应在'超级'上调用指定的初始值设定项
  2. 指定的初始化程序缺少对超类的指定初始化程序的"超级"调用

我做错了什么,我该如何解决?

对代码进行了更改以解决问题

 // This is the new method added.

- (instancetype)init
{
    self = [super init];
    if (self != nil)
    {
       // Allocate here.
    }
    return …
Run Code Online (Sandbox Code Playgroud)

objective-c

5
推荐指数
1
解决办法
4701
查看次数

为 Mac 构建 libunwind

我正在尝试在 Mac 上为 iOS 和 Mac 构建 libunwind,我能够解决一些编译问题。

在 Mac 上构建

我使用配置项目

./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
Run Code Online (Sandbox Code Playgroud)

elf.h从谷歌的breakpad项目复制。

https://google-breakpad.googlecode.com/svn-history/r1017/trunk/src/common/android/include/elf.h

我现在收到以下错误:

/usr/include/elf.h:58:15: fatal error: 'elf.h' file not found
#include_next <elf.h>
Run Code Online (Sandbox Code Playgroud)

任何人都可以帮我解决这个问题或者还有其他一些构建 libunwind 的过程吗?

我还想知道是否还需要做其他事情来为 iOS 构建 libunwind。

macos ios ios5 libunwind

2
推荐指数
1
解决办法
3607
查看次数

标签 统计

macos ×2

ios ×1

ios5 ×1

libunwind ×1

objective-c ×1

osx-mountain-lion ×1

pkg-file ×1