當用戶通過地理圍欄區域輸入區域時,我發出了本地通知。但是當我按Home按鈕查看本地通知時,它確實顯示,但沒有聲音。我試圖在mac設置中禁用並啓用「播放用戶界面聲音..」,關閉並重新打開xcode,清理項目並最終重新啓動mac。沒有工作.. 我錯過了什麼?UILocalNotification聲音
- (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region {
NSLog(@"Entered Region - %@", region.identifier);
UILocalNotification *localNotification = [[UILocalNotification alloc] init];
[localNotification setAlertBody:@"You are about to enter.."];
[localNotification setSoundName:@"Voicemail.caf"];
UIApplication *application = [UIApplication sharedApplication];
[application presentLocalNotificationNow:localNotification];
}
你在哪裏開啓了UILocalNotification? – 2013-12-03 06:44:32
您可以編寫代碼如何通過geofencing管理用戶輸入區域嗎? – 2013-12-03 07:03:05
您好我有一個地理圍欄要求是新的IOS加州大學請分享您的示例代碼,以在我們的應用程序中添加地理圍欄 – sabir 2014-02-26 08:44:14