Skip to content

Commit

Permalink
[Fix] #260 - 다이나믹링크 공용 계정으로 이전
Browse files Browse the repository at this point in the history
- 안드로이드 파라미터 등록
  • Loading branch information
thingineeer committed Feb 3, 2024
1 parent d270acc commit 952b770
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 21 deletions.
22 changes: 8 additions & 14 deletions Runnect-iOS/Runnect-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
712DB0702B443ACC0013FD79 /* GAEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 712DB06F2B443ACC0013FD79 /* GAEvent.swift */; };
712F661D2A7B7BAB00D9539B /* Config.swift in Sources */ = {isa = PBXBuildFile; fileRef = 712F661C2A7B7BAB00D9539B /* Config.swift */; };
7136BF8A2AF921A900679364 /* CustomBottomSheetVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7136BF892AF921A900679364 /* CustomBottomSheetVC.swift */; };
713A98F02B29DD9900189B3C /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 713A98EF2B29DD9900189B3C /* GoogleService-Info.plist */; };
715D36E82B2CC64000CAA9D6 /* MyUploadedCourseResponseDto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 715D36E72B2CC64000CAA9D6 /* MyUploadedCourseResponseDto.swift */; };
71773C8E2B6BDF3B0041605E /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 71773C8D2B6BDF3B0041605E /* GoogleService-Info.plist */; };
717916DA2B13613B009CEF97 /* MarathonListResponseDto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 717916D92B13613B009CEF97 /* MarathonListResponseDto.swift */; };
71802C5C2B3364C2008DBCEE /* CourseDetailScrapCountDto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71802C5B2B3364C2008DBCEE /* CourseDetailScrapCountDto.swift */; };
71BAD06A2B24CECC0061E31D /* UserProfileDto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71BAD0692B24CECC0061E31D /* UserProfileDto.swift */; };
Expand Down Expand Up @@ -194,8 +194,8 @@
712DB06F2B443ACC0013FD79 /* GAEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GAEvent.swift; sourceTree = "<group>"; };
712F661C2A7B7BAB00D9539B /* Config.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Config.swift; sourceTree = "<group>"; };
7136BF892AF921A900679364 /* CustomBottomSheetVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomBottomSheetVC.swift; sourceTree = "<group>"; };
713A98EF2B29DD9900189B3C /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
715D36E72B2CC64000CAA9D6 /* MyUploadedCourseResponseDto.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyUploadedCourseResponseDto.swift; sourceTree = "<group>"; };
71773C8D2B6BDF3B0041605E /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
717916D92B13613B009CEF97 /* MarathonListResponseDto.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarathonListResponseDto.swift; sourceTree = "<group>"; };
71802C5B2B3364C2008DBCEE /* CourseDetailScrapCountDto.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseDetailScrapCountDto.swift; sourceTree = "<group>"; };
71BAD0692B24CECC0061E31D /* UserProfileDto.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserProfileDto.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -869,7 +869,7 @@
CE6655A9295D7FAA00C64E12 /* Network */,
CE6655A8295D7F7D00C64E12 /* Presentation */,
CE4545D6295D7AF5003201E1 /* Info.plist */,
713A98EF2B29DD9900189B3C /* GoogleService-Info.plist */,
71773C8D2B6BDF3B0041605E /* GoogleService-Info.plist */,
);
path = "Runnect-iOS";
sourceTree = "<group>";
Expand Down Expand Up @@ -1334,7 +1334,7 @@
files = (
CE665615295D989A00C64E12 /* .swiftlint.yml in Resources */,
CE17F0342961BEF800E1DED0 /* Pretendard-Bold.otf in Resources */,
713A98F02B29DD9900189B3C /* GoogleService-Info.plist in Resources */,
71773C8E2B6BDF3B0041605E /* GoogleService-Info.plist in Resources */,
CE17F0352961BEF800E1DED0 /* Pretendard-SemiBold.otf in Resources */,
CE17F0332961BEF800E1DED0 /* Pretendard-Medium.otf in Resources */,
CE6655BF295D82E200C64E12 /* .gitkeep in Resources */,
Expand Down Expand Up @@ -1709,11 +1709,9 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = "Runnect-iOS/Runnect-iOSDebug.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2024.0122.2217;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8Q4H7X3Q58;
DEVELOPMENT_TEAM = 8Q4H7X3Q58;
GENERATE_INFOPLIST_FILE = NO;
INFOPLIST_FILE = "Runnect-iOS/Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = Runnect;
Expand All @@ -1734,7 +1732,6 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.runnect.Runnect-iOS";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match Development com.runnect.Runnect-iOS";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
Expand All @@ -1753,11 +1750,9 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = "Runnect-iOS/Runnect-iOS.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2024.0122.2217;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8Q4H7X3Q58;
DEVELOPMENT_TEAM = 8Q4H7X3Q58;
GENERATE_INFOPLIST_FILE = NO;
INFOPLIST_FILE = "Runnect-iOS/Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = Runnect;
Expand All @@ -1778,7 +1773,6 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.runnect.Runnect-iOS";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match Development com.runnect.Runnect-iOS";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,13 @@ extension CourseDetailVC {
let description = publicCourse.description
let courseImage = publicCourse.image

let dynamicLinksDomainURIPrefix = "https://runnect.page.link"
let dynamicLinksDomainURIPrefix = "https://rnnt.page.link"
guard let link = URL(string: "\(dynamicLinksDomainURIPrefix)/?courseId=\(courseId)") else {
return
}

print("‼️link= \(link)")

guard let linkBuilder = DynamicLinkComponents(link: link, domainURIPrefix: dynamicLinksDomainURIPrefix) else {
return
}
Expand All @@ -198,6 +200,8 @@ extension CourseDetailVC {
linkBuilder.iOSParameters?.appStoreID = "1663884202"
linkBuilder.iOSParameters?.minimumAppVersion = "1.0.4"

linkBuilder.androidParameters = DynamicLinkAndroidParameters(packageName: "com.runnect.runnect")

linkBuilder.socialMetaTagParameters = DynamicLinkSocialMetaTagParameters()
linkBuilder.socialMetaTagParameters?.imageURL = URL(string: courseImage)
linkBuilder.socialMetaTagParameters?.title = title
Expand All @@ -210,7 +214,7 @@ extension CourseDetailVC {

/// 짧은 Dynamic Link로 변환하는 부분 입니다.
linkBuilder.shorten { [weak self] url, _, error in // warning 파라미터 와일드 카드
guard let shortDynamicLink = url else {
guard var shortDynamicLink = url?.absoluteString else {
if let error = error {
print("❌Error shortening dynamic link: \(error)")
}
Expand All @@ -220,7 +224,7 @@ extension CourseDetailVC {
print("🔥The short URL is: \(shortDynamicLink)")

DispatchQueue.main.async {
let activityVC = UIActivityViewController(activityItems: [shortDynamicLink.absoluteString], applicationActivities: nil)
let activityVC = UIActivityViewController(activityItems: [shortDynamicLink], applicationActivities: nil)
activityVC.popoverPresentationController?.sourceView = self?.view
self?.present(activityVC, animated: true, completion: nil)
}
Expand Down Expand Up @@ -318,8 +322,8 @@ extension CourseDetailVC {
model.publicCourse.departure.town,
model.publicCourse.departure.name
]
.compactMap { $0 }
.joined(separator: " ")
.compactMap { $0 }
.joined(separator: " ")

self.courseDepartureInfoView.setDescriptionText(description: locate)
self.courseExplanationTextView.text = model.publicCourse.description
Expand Down
2 changes: 1 addition & 1 deletion Runnect-iOS/Runnect-iOS/Runnect-iOS.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</array>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:runnect.page.link</string>
<string>applinks:rnnt.page.link</string>
</array>
</dict>
</plist>
2 changes: 1 addition & 1 deletion Runnect-iOS/Runnect-iOS/Runnect-iOSDebug.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</array>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:runnect.page.link</string>
<string>applinks:rnnt.page.link</string>
</array>
</dict>
</plist>

0 comments on commit 952b770

Please sign in to comment.