小编Mad*_*rea的帖子

在获取聊天记录时,我无法获得Openfire的两个用户历史记录

我在openfire中通过安装open fire插件从openfire获取了History并尝试了这段代码.

let iq1 = DDXMLElement(name: "iq")
    iq1.addAttribute(withName: "type", stringValue: "get")
    iq1.addAttribute(withName: "id", stringValue: "0")
    let retrieve = DDXMLElement(name: "retrieve", xmlns: "urn:xmpp:archive")
    retrieve?.addAttribute(withName: "with", stringValue: "raman@ip-172-31-53-77.ec2.internal")
    let set = DDXMLElement(name: "set", xmlns: "http://jabber.org/protocol/rsm")
    let max = DDXMLElement(name: "max", stringValue: "50")
    iq1.addChild(retrieve!)
    retrieve?.addChild(set!)
    set?.addChild(max)
    stream?.send(iq1 )
Run Code Online (Sandbox Code Playgroud)

现在我没有从双方获得历史.这是我得到的结果.

<iq xmlns="jabber:client" 
type="result" 
id="0" 
to="bentick@ip-172-31-53-77.ec2.internal/5qsinh1syg">

<chat xmlns="urn:xmpp:archive" 
with="raman@ip-172-31-53-77.ec2.internal" 
start="2017-02-07T06:28:33.691Z">

	<from secs="0">
	<body>hello</body>
	</from>

	<from secs="405">
	<body>hiii</body>
	</from>

	<from secs="580">
	<body>Hey</body>
	</from>

	<from secs="599">
	<body>HooooE</body>
	</from>

	<from secs="628">
	<body>hOo</body>
	</from>

	<from secs="907">
	<body>Raman here</body>
	</from> …
Run Code Online (Sandbox Code Playgroud)

chat xmpp openfire ios swift3

10
推荐指数
1
解决办法
716
查看次数

使用GMUClusterManager的自定义标记

我想显示自定义标记使用GMUClusterManager.我在这里遵循标记聚类的所有步骤.

但是有这样的蓝色和红色图标. 在此输入图像描述

但是,当我放大该地图时,它只显示红色标记,但我不希望这样.

有实例方法,我已经实现了我的逻辑,但没有用.

    - (instancetype)initWithMapView:(GMSMapView *)mapView clusterIconGenerator:(id<GMUClusterIconGenerator>)iconGenerator
{
    if ((self = [super init])) {

        GMSMarker *marker= [GMSMarker markerWithPosition:CLLocationCoordinate2DMake(24.0, 75.30)];

        UIView *customMarker =[[UIView alloc] initWithFrame:CGRectMake(0, 0, 63, 40)];
        customMarker.backgroundColor = [UIColor blueColor];

        marker.iconView = [self EmployeeMarker:0] ;
        marker.appearAnimation = kGMSMarkerAnimationPop;
        marker.map = mapView;
    }
    return self;
}

-(UIView *)EmployeeMarker:(int)labelTextInt{
    UIView *customMarker =[[UIView alloc] initWithFrame:CGRectMake(0, 0, 63, 40)];
    UIImageView *imgViewCustomMarker = [[UIImageView alloc]initWithFrame:CGRectMake(0, 15, 24, 25)];
    imgViewCustomMarker.image = [UIImage imageNamed:@"iconMapUser.png"];
    [customMarker addSubview:imgViewCustomMarker];
    UIView *viewRatingCustom = [[UIView alloc] …
Run Code Online (Sandbox Code Playgroud)

google-maps objective-c markerclusterer ios

9
推荐指数
2
解决办法
3384
查看次数

安装Google-Mobile-Ads-SDK时出错

嗨,任何人在安装Admob时都会遇到此错误.

[!]/usr/bin/curl -f -L -o /var/folders/_r/thfyvgfn1f19wtmqttvwfpxh0000gn/T/d20161213-1890-nik74x/file.tgz https://dl.google.com/dl/cpdc/b8337da55c97ec54 -Google-Mobile-Ads-SDK-7.14.0.tar.gz --create-dirs --netrc-optional

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:03:02 --:--:--     0curl: (56) SSLRead() return error -9806
Run Code Online (Sandbox Code Playgroud)

这是我的podfile.

# Pods for admobintegration

pod 'Firebase/Core'
pod 'Firebase/AdMob'
Run Code Online (Sandbox Code Playgroud)

objective-c ios cocoapods google-admob

4
推荐指数
1
解决办法
732
查看次数

地图框转向导航iOS

我实际上是试图通过SDK转向MapBox导航. MapBox Navigation SDK 在这里显示upadtae与carthage.我已经遵循了所有步骤,但每次都抛出错误

@import MapboxCoreNavigation;
@import MapboxDirections;
@import MapboxNavigation;
Run Code Online (Sandbox Code Playgroud)

找不到此导入的模块.

是否有任何存储库或pod可用于此.

请指导我完成这个.

这里是mapBox导航的开放问题

navigation objective-c ios mapbox

4
推荐指数
1
解决办法
359
查看次数

iOS 10中不显示本地通知

我在Appdelegates中尝试过此代码.

@import UserNotifications;


UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
    [center requestAuthorizationWithOptions:(UNAuthorizationOptionBadge | UNAuthorizationOptionSound | UNAuthorizationOptionAlert)
        completionHandler:^(BOOL granted, NSError * _Nullable error) {
            if (!error) {
            NSLog(@"request authorization succeeded!");

                center.delegate = self;
            }
    }];
Run Code Online (Sandbox Code Playgroud)

并且此代码触发了本地通知

-(void)localNotification{

NSLog(@"local notification fired");

UNMutableNotificationContent *objNotificationContent = [[UNMutableNotificationContent alloc] init];

objNotificationContent.title = @"local notificatin";

objNotificationContent.body = @"message";

objNotificationContent.sound = [UNNotificationSound defaultSound];

/// 4. update application icon badge number
objNotificationContent.badge = @([[UIApplication sharedApplication] applicationIconBadgeNumber] + 1);

// Deliver the notification in five seconds.
UNTimeIntervalNotificationTrigger *trigger = [UNTimeIntervalNotificationTrigger
                                              triggerWithTimeInterval:0.3 …
Run Code Online (Sandbox Code Playgroud)

objective-c ios uilocalnotification

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