Skip to content

Commit

Permalink
Update AmityUIKit v3.20.11
Browse files Browse the repository at this point in the history
  • Loading branch information
ZayYarHtun committed Oct 10, 2024
1 parent 996dbd7 commit 2b365ed
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 30 deletions.
8 changes: 4 additions & 4 deletions UpstraUIKit/AmityUIKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
68251A632ADEA16200395696 /* AmityPreviewLinkCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68251A612ADEA16200395696 /* AmityPreviewLinkCell.swift */; };
68251A642ADEA16200395696 /* AmityPreviewLinkCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 68251A622ADEA16200395696 /* AmityPreviewLinkCell.xib */; };
6860B01B2ADE3D650042ED45 /* AmityPreviewLinkWizard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6860B01A2ADE3D650042ED45 /* AmityPreviewLinkWizard.swift */; };
686914A52CB8097200D64409 /* SharedFrameworks in Frameworks */ = {isa = PBXBuildFile; productRef = 686914A42CB8097200D64409 /* SharedFrameworks */; };
6895D9262975359000E377F1 /* AmityAsyncAwaitTransformer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6895D9252975359000E377F1 /* AmityAsyncAwaitTransformer.swift */; };
68FEE2F72BC7A1060055FEC0 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 68FEE2F62BC7A1050055FEC0 /* PrivacyInfo.xcprivacy */; };
720D599A2525BDB1009734EF /* DispatchGroupWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 720D59992525BDB1009734EF /* DispatchGroupWrapper.swift */; };
Expand Down Expand Up @@ -361,7 +362,6 @@
78DA0323263C715C007C11CE /* AmityMyCommunityPreviewScreenViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78DA031E263C715C007C11CE /* AmityMyCommunityPreviewScreenViewModel.swift */; };
78DA0324263C715C007C11CE /* AmityMyCommunityPreviewViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 78DA0320263C715C007C11CE /* AmityMyCommunityPreviewViewController.xib */; };
78DA0325263C715C007C11CE /* AmityMyCommunityPreviewViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78DA0321263C715C007C11CE /* AmityMyCommunityPreviewViewController.swift */; };
923844642C6F4B14009747A5 /* SharedFrameworks in Frameworks */ = {isa = PBXBuildFile; productRef = 923844632C6F4B14009747A5 /* SharedFrameworks */; };
970E784726429FA500E5FCEE /* ChatSettingsTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 970E784526429FA500E5FCEE /* ChatSettingsTableViewCell.swift */; };
970E784826429FA500E5FCEE /* ChatSettingsTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 970E784626429FA500E5FCEE /* ChatSettingsTableViewCell.xib */; };
970E784E26429FB300E5FCEE /* AmityChatSettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 970E784C26429FB300E5FCEE /* AmityChatSettingsViewController.swift */; };
Expand Down Expand Up @@ -1319,7 +1319,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
923844642C6F4B14009747A5 /* SharedFrameworks in Frameworks */,
686914A52CB8097200D64409 /* SharedFrameworks in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -4434,7 +4434,7 @@
);
name = AmityUIKit;
packageProductDependencies = (
923844632C6F4B14009747A5 /* SharedFrameworks */,
686914A42CB8097200D64409 /* SharedFrameworks */,
);
productName = UpstraUIKit;
productReference = 72A3503024EA811500DA9D46 /* AmityUIKit.framework */;
Expand Down Expand Up @@ -5441,7 +5441,7 @@
/* End XCConfigurationList section */

/* Begin XCSwiftPackageProductDependency section */
923844632C6F4B14009747A5 /* SharedFrameworks */ = {
686914A42CB8097200D64409 /* SharedFrameworks */ = {
isa = XCSwiftPackageProductDependency;
productName = SharedFrameworks;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
923844662C6F4B1C009747A5 /* SharedFrameworks in Frameworks */ = {isa = PBXBuildFile; productRef = 923844652C6F4B1C009747A5 /* SharedFrameworks */; };
686914A72CB8097D00D64409 /* SharedFrameworks in Frameworks */ = {isa = PBXBuildFile; productRef = 686914A62CB8097D00D64409 /* SharedFrameworks */; };
A0B68B3026E07278007D7B5B /* LiveStreamViewController+GoLive.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0B68B2F26E07278007D7B5B /* LiveStreamViewController+GoLive.swift */; };
A0B68B3626E07824007D7B5B /* AsyncOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0B68B3526E07824007D7B5B /* AsyncOperation.swift */; };
A0B68B3F26E07912007D7B5B /* CreatePost.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0B68B3E26E07912007D7B5B /* CreatePost.swift */; };
Expand Down Expand Up @@ -69,7 +69,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
923844662C6F4B1C009747A5 /* SharedFrameworks in Frameworks */,
686914A72CB8097D00D64409 /* SharedFrameworks in Frameworks */,
A0BD0B3426DDD9820054088B /* AmityUIKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -245,7 +245,7 @@
);
name = AmityUIKitLiveStream;
packageProductDependencies = (
923844652C6F4B1C009747A5 /* SharedFrameworks */,
686914A62CB8097D00D64409 /* SharedFrameworks */,
);
productName = AmityUIKitLiveStream;
productReference = A0BD0B1526DCE4F50054088B /* AmityUIKitLiveStream.framework */;
Expand Down Expand Up @@ -529,7 +529,7 @@
/* End XCConfigurationList section */

/* Begin XCSwiftPackageProductDependency section */
923844652C6F4B1C009747A5 /* SharedFrameworks */ = {
686914A62CB8097D00D64409 /* SharedFrameworks */ = {
isa = XCSwiftPackageProductDependency;
productName = SharedFrameworks;
};
Expand Down
8 changes: 4 additions & 4 deletions UpstraUIKit/SampleApp/SampleApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
0D73ACA825DB9423000D73CA /* NewJoinerPostComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D73ACA725DB9423000D73CA /* NewJoinerPostComponent.swift */; };
0D8FFC2925DCBFD900943538 /* AmityCustomFooterTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D8FFC2725DCBFD900943538 /* AmityCustomFooterTableViewCell.swift */; };
0D8FFC2A25DCBFD900943538 /* AmityCustomFooterTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0D8FFC2825DCBFD900943538 /* AmityCustomFooterTableViewCell.xib */; };
686914A92CB8098C00D64409 /* SharedFrameworks in Frameworks */ = {isa = PBXBuildFile; productRef = 686914A82CB8098C00D64409 /* SharedFrameworks */; };
7214C9CB2632BE5500192BB3 /* UserLevelPushNotificationsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7214C9CA2632BE5500192BB3 /* UserLevelPushNotificationsTableViewController.swift */; };
7214C9D72632C0AD00192BB3 /* NotificationModuleTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7214C9D62632C0AD00192BB3 /* NotificationModuleTableViewCell.swift */; };
7214C9DB2632C0D500192BB3 /* SwitchTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7214C9DA2632C0D500192BB3 /* SwitchTableViewCell.swift */; };
Expand All @@ -28,7 +29,6 @@
729CAF3E273CC8ED000AE162 /* Binding+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 729CAF3D273CC8ED000AE162 /* Binding+Extension.swift */; };
729CAF42273CC95B000AE162 /* EndpointManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 729CAF41273CC95B000AE162 /* EndpointManager.swift */; };
72AACE0B273931F100E59D55 /* EndpointsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72AACE0A273931F100E59D55 /* EndpointsView.swift */; };
923844682C6F4B29009747A5 /* SharedFrameworks in Frameworks */ = {isa = PBXBuildFile; productRef = 923844672C6F4B29009747A5 /* SharedFrameworks */; };
92DBE8A62ACA98CF007D873C /* DataListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D495077325E637C1005C033F /* DataListViewController.swift */; };
92DBE8A72ACA98CF007D873C /* SamplePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 724C25F3274CE38B0058B066 /* SamplePageViewController.swift */; };
92DBE8A82ACA98CF007D873C /* PostCreatorSettingsPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = A03190A6272169C1008A85DC /* PostCreatorSettingsPage.swift */; };
Expand Down Expand Up @@ -263,7 +263,7 @@
files = (
A0BD0B4826DDE0E30054088B /* AmityUIKitLiveStream.framework in Frameworks */,
D478D16926240A5E006EA140 /* AmityUIKit.framework in Frameworks */,
923844682C6F4B29009747A5 /* SharedFrameworks in Frameworks */,
686914A92CB8098C00D64409 /* SharedFrameworks in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -579,7 +579,7 @@
);
name = SampleApp;
packageProductDependencies = (
923844672C6F4B29009747A5 /* SharedFrameworks */,
686914A82CB8098C00D64409 /* SharedFrameworks */,
);
productName = SampleApp;
productReference = B78DA47524BED7D300EE902B /* SampleApp.app */;
Expand Down Expand Up @@ -1254,7 +1254,7 @@
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
923844672C6F4B29009747A5 /* SharedFrameworks */ = {
686914A82CB8098C00D64409 /* SharedFrameworks */ = {
isa = XCSwiftPackageProductDependency;
productName = SharedFrameworks;
};
Expand Down
2 changes: 1 addition & 1 deletion UpstraUIKit/SampleApp/SampleApp/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>3.20.10</string>
<string>3.20.11</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
Expand Down
2 changes: 1 addition & 1 deletion UpstraUIKit/SampleApp/SampleAppTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>3.20.10</string>
<string>3.20.11</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion UpstraUIKit/SampleApp/SampleAppUITests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>3.20.10</string>
<string>3.20.11</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
Expand Down
20 changes: 10 additions & 10 deletions UpstraUIKit/SharedFrameworks/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,28 @@ let package = Package(
dependencies: []),
.binaryTarget(
name: "AmitySDK",
url: "https://sdk.amity.co/sdk-release/ios-uikit-frameworks/3.20.10/AmitySDK.xcframework.zip",
checksum: "392479f21a7a845fcfa3c12c23faff08d6e41f903c5916de9c9ed35d9e33e233"
url: "https://sdk.amity.co/sdk-release/ios-uikit-frameworks/3.20.11/AmitySDK.xcframework.zip",
checksum: "b37fbbef22766980099171236b92a30b114c0bfb0289fa73532e14b26271ba79"
),
.binaryTarget(
name: "Realm",
url: "https://sdk.amity.co/sdk-release/ios-uikit-frameworks/3.20.10/Realm.xcframework.zip",
checksum: "b0a2c25ce8678279c1452741b3a310bea9e3869df7bbda85e73395f2b641b10d"
url: "https://sdk.amity.co/sdk-release/ios-uikit-frameworks/3.20.11/Realm.xcframework.zip",
checksum: "a36e709a19060062f29e4b286e032a36c9af39e7eb3cc21945a1864baf315821"
),
.binaryTarget(
name: "RealmSwift",
url: "https://sdk.amity.co/sdk-release/ios-uikit-frameworks/3.20.10/RealmSwift.xcframework.zip",
checksum: "a3164683df233bc79aefdbd7c92158a1c3025ccfc596f1d8022e9dfc2c0bd382"
url: "https://sdk.amity.co/sdk-release/ios-uikit-frameworks/3.20.11/RealmSwift.xcframework.zip",
checksum: "23262773506b48102cd40eb8499b3dc20b33a43e182ae2788ab165b9b1f311d0"
),
.binaryTarget(
name: "AmityLiveVideoBroadcastKit",
url: "https://sdk.amity.co/sdk-release/ios-uikit-frameworks/3.20.10/AmityLiveVideoBroadcastKit.xcframework.zip",
checksum: "aead7e72dbe90f2213e9a135e2003131743b30fc04042b37bf7b81ebd7f98e55"
url: "https://sdk.amity.co/sdk-release/ios-uikit-frameworks/3.20.11/AmityLiveVideoBroadcastKit.xcframework.zip",
checksum: "6a68c23302fe0bd13bb31be431eefbad894cd63183ec980dc5d140d22c8c9fa3"
),
.binaryTarget(
name: "AmityVideoPlayerKit",
url: "https://sdk.amity.co/sdk-release/ios-uikit-frameworks/3.20.10/AmityVideoPlayerKit.xcframework.zip",
checksum: "749708fe4ac83bd4db403e707b88fe1cd1a4f431abd9eb71bcbcff5506e9ddd3"
url: "https://sdk.amity.co/sdk-release/ios-uikit-frameworks/3.20.11/AmityVideoPlayerKit.xcframework.zip",
checksum: "263e08b505c3d7cab457705ea9f5875e4ca581cc0d0378b46a7f700afcfaf568"
),
.binaryTarget(
name: "MobileVLCKit",
Expand Down
2 changes: 1 addition & 1 deletion UpstraUIKit/UpstraUIKit/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>3.20.10</string>
<string>3.20.11</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,50 @@ class AmityPostTargetPickerScreenViewModel: AmityPostTargetPickerScreenViewModel

private let communityRepository = AmityCommunityRepository(client: AmityUIKitManagerInternal.shared.client)
private var communityCollection: AmityCollection<AmityCommunity>?
private var communities: [AmityCommunity] = []
private var categoryCollectionToken:AmityNotificationToken?

func observe() {
let queryOptions = AmityCommunityQueryOptions(displayName: "", filter: .userIsMember, sortBy: .displayName, includeDeleted: false)
communityCollection = communityRepository.getCommunities(with: queryOptions)
categoryCollectionToken = communityCollection?.observe({ [weak self] (collection, _, _) in
self?.communities = []

guard let strongSelf = self else { return }
let dispatchGroup = DispatchGroup()

switch collection.dataStatus {
case .fresh:
strongSelf.delegate?.screenViewModelDidUpdateItems(strongSelf)
for item in collection.snapshots {
dispatchGroup.enter()

if item.onlyAdminCanPost {
AmityUIKitManager.client.hasPermission(.createPrivilegedPost, forCommunity: item.communityId) { success in
if success {
self?.communities.append(item)
}
dispatchGroup.leave()
}
} else {
self?.communities.append(item)
dispatchGroup.leave()
}
}
dispatchGroup.notify(queue: .main) { [weak self] in
guard let strongSelf = self else { return }
strongSelf.delegate?.screenViewModelDidUpdateItems(strongSelf)
}
default: break
}
})
}

func numberOfItems() -> Int {
return Int(communityCollection?.count() ?? 0)
return communities.count
}

func community(at indexPath: IndexPath) -> AmityCommunity? {
return communityCollection?.object(at: indexPath.row)
return communities[indexPath.row]
}

func loadNext() {
Expand Down
2 changes: 1 addition & 1 deletion UpstraUIKit/UpstraUIKitTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>3.20.10</string>
<string>3.20.11</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
Expand Down

0 comments on commit 2b365ed

Please sign in to comment.