どのようにiPhoneのアプリケーションとデバイスに関するその他の情報を使用してデバイストークンを取得しますか?

StackOverflow https://stackoverflow.com/questions/1513037

  •  19-09-2019
  •  | 
  •  

質問

私のiPhoneアプリケーションでは私は、APNを使用してデバイストークンをしたいです。 コードを使用していること?

取得する方法

ALOS iは、デバイスユーザー、そのバージョンおよびその他の情報に関するその他の情報が欲しいです。 コードを使用していること?

取得する方法

デバイストークンを使用してデバイスの他の情報を取得することは可能ですか?

デバイストークンの形式は何ですか?

コードまたは任意のリンクまたは理解されるであろう任意の他の方法、によって解決策をお願いします。

おかげで、

Mishalシャー

役に立ちましたか?

解決

ここにあなたがデバイスに関する情報を取得する方法---

NSString*  deviceName= [[UIDevice currentDevice] uniqueIdentifier];
NSString*  localizedModel=[[UIDevice currentDevice] localizedModel];
NSString*  systemVersion=[[UIDevice currentDevice] systemVersion];
NSString*  systemName=[[UIDevice currentDevice] systemName];
NSString*  model=[[UIDevice currentDevice] model];

他のヒント

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeBadge|UIRemoteNotificationTypeAlert ];
}

// Delegation methods 
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
    NSLog(@"didRegisterForRemoteNotificationsWithDeviceToken: %@", deviceToken);
} 
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top