私はチタン製のappceleratorとiOSのためのプッシュと深刻な頭痛を抱えています。私のアプリはiOS通知センターには表示されません - Appcelerator
testflightでいくつかのバージョンを生成しましたが、いずれもiOS通知センターに表示されませんでしたが、デバイスに直接スワイプすると、iPad Miniで正常に動作します。
私は現在、これらの設定を使用しています:
Operating System
Name = Mac OS X
Version = 10.12
Architecture = 64bit
# CPUs = 4
Memory = 4294967296
Node.js
Node.js Version = 4.6.0
npm Version = 2.15.9
Titanium CLI
CLI Version = 5.0.9
Titanium SDK
SDK Version = 5.5.1.GA
SDK Path = /Users/silvio/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA
Target Platform = iphone
Xcodeのバージョン:8.2(8C38)Alloy.jsで
マイコード:リンゴ
if (Ti.Platform.name === 'android') {
// set android-only options
var pnOptions = {
senderId: 'xxxx', // It's the same as your project id
notificationSettings: {
sound: 'mysound.mp3', // Place soudn file in platform/android/res/raw/mysound.mp3
smallIcon: 'appicon.png', // Place icon in platform/android/res/drawable/notification_icon.png
largeIcon: 'appicon.png', // Same
vibrate: true, // Whether the phone should vibrate
insistent: true, // Whether the notification should be insistent
group: 'Edufy', // Name of group to group similar notifications together
localOnly: false, // Whether this notification should be bridged to other devices
priority: 2 // Notification priority, from -2 to 2
}
};
} else { // set ios-only options.
// Sets interactive notifications as well if iOS8 and above. Interactive notifications is optional.
if (parseInt(Ti.Platform.version.split(".")[0], 10) >= 8) {
var thumbUpAction = Ti.App.iOS.createUserNotificationAction({
identifier: "THUMBUP_IDENTIFIER",
title: "Aceitar",
activationMode: Ti.App.iOS.USER_NOTIFICATION_ACTIVATION_MODE_BACKGROUND,
destructive: false,
authenticationRequired: false
});
var thumbDownAction = Ti.App.iOS.createUserNotificationAction({
identifier: "THUMBDOWN_IDENTIFIER",
title: "Regeitar",
activationMode: Ti.App.iOS.USER_NOTIFICATION_ACTIVATION_MODE_BACKGROUND,
destructive: false,
authenticationRequired: false
});
var thumbUpDownCategory = Ti.App.iOS.createUserNotificationCategory({
identifier: "THUMBUPDOWN_CATEGORY",
// The following actions will be displayed for an alert dialog
actionsForDefaultContext: [thumbUpAction, thumbDownAction],
// The following actions will be displayed for all other notifications
actionsForMinimalContext: [thumbUpAction, thumbDownAction]
});
var pnOptions = {
types: [Ti.App.iOS.USER_NOTIFICATION_TYPE_ALERT, Ti.App.iOS.USER_NOTIFICATION_TYPE_SOUND],
categories: [thumbUpDownCategory]
};
} else { //No support for interactive notifications, omit categories
var pnOptions = {
types: [Ti.App.iOS.USER_NOTIFICATION_TYPE_ALERT, Ti.App.iOS.USER_NOTIFICATION_TYPE_SOUND]
};
}
}
// set cross-platform event
var onReceive = function(event) {};
// Create instance with base url
var tiPush = require('ti-push-notification').init({
backendUrl: "http://xxxx.com.br/painel/ws/push_test.php"
});
// register this device
tiPush.registerDevice({
pnOptions: pnOptions,
onReceive: onReceive,
extraOptions: {
action: 'register',
user_id: 123
}
});
私の証明書ストアはすべて以下のプリントと同様に有効です:
プッシュ通知が有効:
証明書:
箴プロファイル:
、私はこれらの場所にEntitlements.plistを追加してみました:
- プロジェクト/ Entitlements.plist
- プロジェクト/アプリ/ Entitlements.plist
- プロジェクト/アプリ/プラットフォーム/ IOS/Entitlements.plist
- プロジェクト/アプリ/プラットフォーム/ IOS /の.plist
私もtiapp.xmlにタグ内からの行を追加したが、それはEntitlements.plistコードの下に...動作しませんでした:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string> <!-- Either development or production -->
<key>application-identifier</key>
<string>xxxx.com.colegiokennedy</string>
<key>keychain-access-groups</key>
<array>
<string>xxx.com.colegiokennedy</string>
</array>
</dict>
</plist>
私はまた、開発環境を本番環境に変更しようとしましたが、それも機能しませんでした。
これを解決しましたか? – Markive