gpt4 book ai didi

ios - 从 ACAccountstore 获取 Twitter 用户名 -

转载 作者:行者123 更新时间:2023-11-28 22:23:20 24 4
gpt4 key购买 nike

我将 ACAccount 存储在数组中作为 -

 NSArray *arrayOfAccounts = [accountStore accountsWithAccountType:accountType];

通过打印 arrayOfAccounts -

  (
"type:com.apple.twitter\nidentifier: 9E8DD039-D210-49EB-90D3-797017EC9F37\naccountDescription: @kaleshnewage\nusername: kaleshnewage\nobjectID: x-coredata://8CD38D83-7C1C-4542-BE4B-7007B6586675/Account/p24\nenabledDataclasses: {(\n)}\nenableAndSyncableDataclasses: {(\n)}\nproperties: {\n \"user_id\" = 1407688573;\n}\nparentAccount: (null)\nowningBundleID:(null)",
"type:com.apple.twitter\nidentifier: 888F056F-8BB2-4847-91D3-CFFE93770F01\naccountDescription: @dasarun5\nusername: dasarun5\nobjectID: x-coredata://8CD38D83-7C1C-4542-BE4B-7007B6586675/Account/p25\nenabledDataclasses: {(\n)}\nenableAndSyncableDataclasses: {(\n)}\nproperties: {\n \"user_id\" = 120014192;\n}\nparentAccount: (null)\nowningBundleID:(null)",
"type:com.apple.twitter\nidentifier: 3BB57617-0436-4801-B302-CE7C67D2E2A5\naccountDescription: @arunjoseph700\nusername: arunjoseph700\nobjectID: x-coredata://8CD38D83-7C1C-4542-BE4B-7007B6586675/Account/p28\nenabledDataclasses: {(\n)}\nenableAndSyncableDataclasses: {(\n)}\nproperties: {\n \"user_id\" = 1068508537;\n}\nparentAccount: (null)\nowningBundleID:(null)"
)

现在我只想将用户名放入另一个数组,该怎么做?

最佳答案

accountsWithAccountType: 返回一个 ACAccount 数组,因此您可以这样做:

for (ACAccount *account in arrayOfAccounts) {
NSLog(@"Username: %@", account.username);
}

关于ios - 从 ACAccountstore 获取 Twitter 用户名 -,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19688951/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com