3

我想通過Urban Airship在iPhone上使用推送通知,並且我正在使用他們的iOS客戶端庫。適用於iPhone的城市飛艇推送通知:SSL問題

我在我的項目中集成了庫,一切都編譯正確。

在應用程序啓動,我想我的設備令牌註冊到UrbanAirship服務器:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
{  
    //Init Airship launch options 
    NSMutableDictionary *takeOffOptions = [[[NSMutableDictionary alloc] init] autorelease]; 
    [takeOffOptions setValue:launchOptions forKey:UAirshipTakeOffOptionsLaunchOptionsKey]; 

    // Create Airship singleton that's used to talk to Urban Airhship servers. 
    // Please populate AirshipConfig.plist with your info from http://go.urbanairship.com 
    [UAirship takeOff:takeOffOptions]; 

    [[UAPush shared] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | 
                 UIRemoteNotificationTypeSound | 
                 UIRemoteNotificationTypeAlert)]; 

    // Override point for customization after application launch. 
    [window addSubview:[self.firstViewController view]]; 
    [self.window makeKeyAndVisible]; 

    return YES; 
} 

現在,我發現我越來越從蘋果設備標識,但是當我試圖

*重ERROR [登記裝置令牌] 錯誤::錯誤域= ASIHTTPRequestErrorDomain代碼= 1「連接失敗在UrbanAirship服務器我得到的錯誤消息在控制檯從UALOG約SSL問題來註冊它發生:SSL問題(可能是錯誤/過期/自簽名證書)「 UserInfo = 0x2b2aa0 {NSUnderlyingError = 0x2aedb0「操作無法完成。 (OSStatus error -9807。)「,NSLocalizedDescription =發生連接失敗:SSL問題(可能是錯誤/過期/自簽名證書)} *

我使用的是我從Itunes 。連接 此外,該證書似乎是,當我訪問的APN OK,有什麼能引起我的問​​題

(PS - 該證書是發展等等UrbanAirship應用程序)?

+0

解決方案我找到了解決辦法。見下文 – 2011-06-14 08:57:43

回答

2

天啊...

看來解決方案很簡單:

日期&設備上的時間設置必須正確,否則證書無效。

很顯然,如果你擦拭設備,並將其恢復到出廠默認設置的時間可以追溯到1970年的....

UrbanAirship support