Skip to content

Commit

Permalink
Merge pull request #509 from DeveloperAcademy-POSTECH/bugfix/508-FixI…
Browse files Browse the repository at this point in the history
…osError

Bugfix/508 fix ios error
  • Loading branch information
HanGyeongjun authored Nov 13, 2023
2 parents 467f71a + 04f6bdc commit a2591c5
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 49 deletions.
8 changes: 4 additions & 4 deletions HappyAnding/HappyAnding.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1286,7 +1286,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.happyanding.HappyAnding;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = ShortcutsZipProfile_Dev_20230308;
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = ShortcutsZipProfile_Dev_20231113;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
Expand Down Expand Up @@ -1329,7 +1329,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.happyanding.HappyAnding;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = ShortcutsZipProfile_Dev_20230308;
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = ShortcutsZipProfile_Dev_20231113;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
Expand Down Expand Up @@ -1438,7 +1438,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.happyanding.HappyAnding.ShareExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = ShortcutsZipShareExtProfile_Dev_20230308;
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = ShortcutsZipShareExtProfile_Dev_20231113;
SKIP_INSTALL = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand Down Expand Up @@ -1470,7 +1470,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.happyanding.HappyAnding.ShareExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = ShortcutsZipShareExtProfile_Dev_20230308;
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = ShortcutsZipShareExtProfile_Dev_20231113;
SKIP_INSTALL = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
Expand Down
34 changes: 17 additions & 17 deletions HappyAnding/HappyAnding/Extensions/View/View+Navigation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ extension View {
*/
@ViewBuilder
func modifierNavigation() -> some View {
if #available(iOS 16.1, *) {
// if #available(iOS 16.1, *) {
// self
// .modifier(NavigationViewModifier())
// } else {
self
.modifier(NavigationViewModifier())
} else {
self
}
// }
}


Expand All @@ -35,28 +35,28 @@ extension View {
*/
@ViewBuilder
func navigationLinkRouter<T: Hashable>(data: T) -> some View {
if #available(iOS 16.1, *) {
NavigationLink(value: data) {
self
}
} else {
// if #available(iOS 16.1, *) {
// NavigationLink(value: data) {
// self
// }
// } else {
NavigationLink(destination: getDestination(data: data)) {
self
}
}
// }
}

@ViewBuilder
func navigationLinkRouter<T: Hashable>(data: T, isPresented: Binding<Bool>) -> some View {
if #available(iOS 16.1, *) {
NavigationLink(value: data) {
self
}
} else {
// if #available(iOS 16.1, *) {
// NavigationLink(value: data) {
// self
// }
// } else {
NavigationLink(destination: getDestination(data: data, isPresented: isPresented)) {
self
}
}
// }
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ final class WriteShortcutViewModel: ObservableObject {
// 서버에 추가 또는 수정
shortcutsZipViewModel.setData(model: shortcut)

if #available(iOS 16.1, *) {
writeShortcutNavigation.navigationPath = .init()
}
// if #available(iOS 16.1, *) {
// writeShortcutNavigation.navigationPath = .init()
// }
}

func isUnavailableUploadButton() -> Bool {
Expand Down
12 changes: 6 additions & 6 deletions HappyAnding/HappyAnding/Views/TabView/NavigationRouter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ struct NavigationRouter<Content>: View where Content: View {

var body: some View {

if #available(iOS 16.1, *) {
NavigationStack(path: $path, root: content)
.modifier(NavigationViewModifier())

} else {
// if #available(iOS 16.1, *) {
// NavigationStack(path: $path, root: content)
// .modifier(NavigationViewModifier())
//
// } else {
NavigationView(content: content)
.navigationViewStyle(StackNavigationViewStyle())
}
}
// }
}


Expand Down
32 changes: 16 additions & 16 deletions HappyAnding/HappyAnding/Views/TabView/ShortcutTabView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -201,22 +201,22 @@ extension View {
func didTappedTabViewItem(_ proxy: ScrollViewProxy, scrollID: Int, navigationPath: inout NavigationPath, viewID: inout UUID) {

// MARK: Navigation Stack
if #available(iOS 16.1, *) {

// Root View로 이동
if navigationPath.count > 0 {
navigationPath = NavigationPath()

} else {
// 최상단으로 이동
withAnimation {
proxy.scrollTo(scrollID, anchor: .bottom)
}
}

// MARK: Navigation View
} else {
// if #available(iOS 16.1, *) {
//
// // Root View로 이동
// if navigationPath.count > 0 {
// navigationPath = NavigationPath()
//
// } else {
// // 최상단으로 이동
// withAnimation {
// proxy.scrollTo(scrollID, anchor: .bottom)
// }
// }
//
// // MARK: Navigation View
// } else {
viewID = UUID()
}
}
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ struct WriteCurationInfoView: View {
shortcutsZipViewModel.addCuration(curation: data.curation, isEdit: data.isEdit, deletedShortcutCells: data.deletedShortcutCells)

self.isWriting.toggle()
if #available(iOS 16.1, *) {
writeCurationNavigation.navigationPath = .init()
}
// if #available(iOS 16.1, *) {
// writeCurationNavigation.navigationPath = .init()
// }
} label: {
Text(TextLiteral.upload)
.shortcutsZipHeadline()
Expand Down

0 comments on commit a2591c5

Please sign in to comment.