小编atr*_*bbi的帖子

problems synchronizing icloud database

I'm getting several errors, that are not blocking, in this piece of code:

    [psc lock];

    NSError *error = nil;
    if (![psc addPersistentStoreWithType:NSSQLiteStoreType
                           configuration:nil
                                     URL:localStore
                                 options:options
                                   error:&error]) {

        NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
        abort();
    }

    [psc unlock];
Run Code Online (Sandbox Code Playgroud)

Something like the following ( note: at the end of the process, the data seem correctly synchronized , no exception is thrown and error is nil, but however the synchronization takes some time); the error are of two kinds, at the beginning …

gps core-data ios icloud

8
推荐指数
0
解决办法
1792
查看次数

控制iOS gps输入

我的iPhone GPS有问题; 我正在尝试录制一条不在街道上的轨道,但每次我经过一条街道(看封闭的图像),我觉得gps输出用地图数据校正; 有没有办法禁用这个beahviour?我需要在我的应用程序中的精确点

从iphone追踪

maps gps ios

6
推荐指数
2
解决办法
1013
查看次数

在swift中实现objectivec协议

我正试图在swift中从Objective-C实现这个可选的协议方法:

- (void)customHTTPProtocol:(CustomHTTPProtocol *)protocol logWithFormat:
(NSString *)format arguments:(va_list)arguments;
Run Code Online (Sandbox Code Playgroud)

(cfr:https://developer.apple.com/library/ios/samplecode/CustomHTTPProtocol/Introduction/Intro.html)我在swift中编写了这个方法:

func customHTTPProtocol(`protocol`: CustomHTTPProtocol!, logWithFormat format: String!, arguments: CVaListPointer) {
}
Run Code Online (Sandbox Code Playgroud)

它抱怨不能满足可选要求并建议在方法之前添加@objc,但是如果我添加@objc它会给出错误(CVaListPointer不能在Objective-C中表示)

问题是这个测试失败了:

if ([strongDelegate respondsToSelector:@selector(customHTTPProtocol:logWithFormat:arguments:)]) {
Run Code Online (Sandbox Code Playgroud)

而且没有调用swift方法

objective-c ios swift

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

标签 统计

ios ×3

gps ×2

core-data ×1

icloud ×1

maps ×1

objective-c ×1

swift ×1