标签: xcode5

“不同的语言链接”——xcode 4 中的警告,xcode 5 中的错误

在我从事的 Unity iOS 项目中,存在“不同语言链接”问题;这是 xcode 4 中的警告,但在 xcode 5 中变成了错误。

/.../Libraries/SomeFile.mm:145:10: Declaration of 'SomeMethod' has a different language linkage
Run Code Online (Sandbox Code Playgroud)

这是文件:

void SomeMethod(const char* _List);

...

extern "C"
{
    void SomeMethod(const char* _List)
    ...
}
Run Code Online (Sandbox Code Playgroud)

我该如何修复它,或者至少(因为它并不是那么重要,并且至少能够构建一些东西会很好),再次发出警告?

xcode unity-game-engine ios xcode5

0
推荐指数
1
解决办法
1860
查看次数

XCode:使用命令行工具,如何从文件夹创建 git 并将其导入到项目中

我在 ~/Documents/Share 上有一个文件夹,其中包含我经常使用并且可以协同工作的类。我想在 git 子模块中转换该文件夹,然后在 Xcode 5 上导入它。我的想法是在很多项目中使用该 git。

在过去的 3 个小时里,我一直在为此苦苦挣扎。我在网上尝试了十几个“简单”的说明,但没有一个奏效。

我怎么做?我想要的只是创建一个本地子模块来处理本地项目。

请不要给出公开的外质解释……像我五岁那样解释我(因为我以前从未使用过 git)。

是的,我熟悉终端。


当我尝试按照建议执行 git push 时,我看到此错误:

Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 292 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare repository
remote: error: is denied, because …
Run Code Online (Sandbox Code Playgroud)

git iphone xcode ios xcode5

0
推荐指数
1
解决办法
2179
查看次数

iCloud:NSUbiquitousKeyValueStore 问题

我在我的应用程序中启用 iCloud 以保存一些首选项。在功能部分启用了 iCloud,我的配置文件已更新:

在此处输入图片说明

我保存和检索测试示例的代码如下:

NSUbiquitousKeyValueStore *cloudStore = [NSUbiquitousKeyValueStore defaultStore];

if ([[cloudStore stringForKey:@"testString"] length] == 0) {
    NSLog(@"Nothing in iCloud - setting a value...");
    [cloudStore setString:@"I'm live in iCloud!" forKey:@"testString"];
    [cloudStore synchronize];
} else {
    NSString *result = [cloudStore stringForKey:@"testString"];
    NSLog(@"Found something in iCloud - here it is: %@", result);
}
Run Code Online (Sandbox Code Playgroud)

我的问题是数据仅保存在本地(如 NSUserDefaults)。当我删除设备中的应用程序时,保存的数据不可恢复。在其他设备中,显然数据也无法恢复。

第一次保存数据。接下来,如果我再次打开该应用程序,则其他代码可以很好地检索数据。但是当我删除 de app 并再次运行时,数据没有保存。

似乎数据没有保存在 iCloud 上,只保存在本地。

我的项目中唯一的“奇怪”是项目名称与包名称不同。

更新:

我的问题仅在 iOs6 中。在 iOs7 中一切正常。当我在带有 iOs 6 的设备中调试我的应用程序时,“调试导航器”iCloud 部分显示:

在此处输入图片说明

配置 iCloud 的所有步骤似乎都没有问题(对于带有 iOs7 的设备工作正常),如果我使用以下代码测试它工作正常:

NSURL *ubiq …
Run Code Online (Sandbox Code Playgroud)

xcode ios icloud nsubiquitouskeyvaluestore xcode5

0
推荐指数
1
解决办法
2546
查看次数

基本GPUImage iOS7应用视频冻结/无法正常工作

我是GPUImage的新手,我将GPUImage添加到默认的单视图模板Xcode 5.1.1 app.我成功了静态GPUImage库,我正在尝试自述文件中的示例.我有iO S7.1作为基础SDK.该应用程序编译并加载,视频冻结.它有或没有过滤器冻结.我该如何解决?我想要显示实时相机预览,并应用过滤器

github repo中包含的示例编译并运行正常.

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    GPUImageVideoCamera *videoCamera = [[GPUImageVideoCamera alloc] initWithSessionPreset:AVCaptureSessionPreset352x288 cameraPosition:AVCaptureDevicePositionBack];
    videoCamera.outputImageOrientation = UIInterfaceOrientationPortrait;

    GPUImageFilter *customFilter = [[GPUImageSepiaFilter alloc]init];
    GPUImageView *filteredVideoView = [[GPUImageView alloc] initWithFrame:CGRectMake(0.0, 0.0, 320, 320)];
    [self.view addSubview:filteredVideoView];
    // Add the view somewhere so it's visible


    [videoCamera addTarget:customFilter];
    [customFilter addTarget:filteredVideoView];

    [videoCamera startCameraCapture];
}
Run Code Online (Sandbox Code Playgroud)

这是我运行iOS 7.1的iPhone 5的屏幕截图.

相机与冷冻视频

objective-c ios gpuimage xcode5

0
推荐指数
1
解决办法
422
查看次数

对于xcode 5项目,我应该用git(.gitignore)忽略哪些文件?

在与?一起.gitignore使用时Git,我应该包含哪些文件Xcode 5

git xcode5

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