Skip to content

Commit

Permalink
feat: Add status URL to app-utils and update login form error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert27 committed Jul 27, 2024
1 parent fe7485c commit 63f3b2f
Show file tree
Hide file tree
Showing 14 changed files with 525 additions and 512 deletions.
46 changes: 30 additions & 16 deletions ios/NeulandNext.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand All @@ -14,6 +14,7 @@
79A805BC94BC0AD1674AEE08 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 2DE9A45D19FFF21A2FC7974A /* PrivacyInfo.xcprivacy */; };
96905EF65AED1B983A6B3ABC /* libPods-NeulandNext.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 58EEBF8E8E6FB1BC6CAF49B5 /* libPods-NeulandNext.a */; };
B18059E884C0ABDD17F3DC3D /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */; };
B7E3797A2C54A52E006A4193 /* MapLibre in Frameworks */ = {isa = PBXBuildFile; productRef = EC742494CB1CE25F860AF0D3 /* MapLibre */; };
BB2F792D24A3F905000567C9 /* Expo.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB2F792C24A3F905000567C9 /* Expo.plist */; };
CCE77C0024F64283949166B7 /* noop-file.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D4A762513EF4F1B924A16CC /* noop-file.swift */; };
/* End PBXBuildFile section */
Expand All @@ -26,7 +27,7 @@
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = NeulandNext/Info.plist; sourceTree = "<group>"; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = NeulandNext/main.m; sourceTree = "<group>"; };
2D4A762513EF4F1B924A16CC /* noop-file.swift */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.swift; name = "noop-file.swift"; path = "NeulandNext/noop-file.swift"; sourceTree = "<group>"; };
2DE9A45D19FFF21A2FC7974A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = NeulandNext/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
2DE9A45D19FFF21A2FC7974A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = NeulandNext/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
4F50E0A33A0E4558A8B767F1 /* NeulandNext-Bridging-Header.h */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.h; name = "NeulandNext-Bridging-Header.h"; path = "NeulandNext/NeulandNext-Bridging-Header.h"; sourceTree = "<group>"; };
58EEBF8E8E6FB1BC6CAF49B5 /* libPods-NeulandNext.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NeulandNext.a"; sourceTree = BUILT_PRODUCTS_DIR; };
6C2E3173556A471DD304B334 /* Pods-NeulandNext.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NeulandNext.debug.xcconfig"; path = "Target Support Files/Pods-NeulandNext/Pods-NeulandNext.debug.xcconfig"; sourceTree = "<group>"; };
Expand All @@ -42,6 +43,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
B7E3797A2C54A52E006A4193 /* MapLibre in Frameworks */,
96905EF65AED1B983A6B3ABC /* libPods-NeulandNext.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -361,18 +363,24 @@
baseConfigurationReference = 6C2E3173556A471DD304B334 /* Pods-NeulandNext.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = NeulandNext/NeulandNext.entitlements;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = FSXB76X6V2;
ENABLE_BITCODE = NO;
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
"FB_SONARKIT_ENABLED=1",
);
INFOPLIST_FILE = NeulandNext/Info.plist;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education";
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.8.3;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand All @@ -394,14 +402,20 @@
baseConfigurationReference = 7A4D352CD337FB3A3BF06240 /* Pods-NeulandNext.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = NeulandNext/NeulandNext.entitlements;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = FSXB76X6V2;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
INFOPLIST_FILE = NeulandNext/Info.plist;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education";
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.8.3;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -469,14 +483,14 @@
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
LD = "";
LDPLUSPLUS = "";
LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)";
LD_RUNPATH_SEARCH_PATHS = (
/usr/lib/swift,
"$(inherited)",
);
LIBRARY_SEARCH_PATHS = "$(SDKROOT)/usr/lib/swift\"$(inherited)\"";
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
OTHER_LDFLAGS = "$(inherited) ";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
Expand Down Expand Up @@ -528,13 +542,13 @@
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
LD = "";
LDPLUSPLUS = "";
LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)";
LIBRARY_SEARCH_PATHS = "$(SDKROOT)/usr/lib/swift\"$(inherited)\"";
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_LDFLAGS = (
LD_RUNPATH_SEARCH_PATHS = (
/usr/lib/swift,
"$(inherited)",
" ",
);
LIBRARY_SEARCH_PATHS = "$(SDKROOT)/usr/lib/swift\"$(inherited)\"";
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_LDFLAGS = "$(inherited) ";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
Expand Down
4 changes: 3 additions & 1 deletion ios/NeulandNext/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>46</string>
<string>47</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>
Expand All @@ -120,6 +120,8 @@
</dict>
<key>NSFaceIDUsageDescription</key>
<string>Allow $(PRODUCT_NAME) to use Face ID.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Allow $(PRODUCT_NAME) to access your location.</string>
<key>NSUserActivityTypes</key>
<array>
<string>$(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route</string>
Expand Down
16 changes: 8 additions & 8 deletions ios/NeulandNext/NeulandNext.entitlements
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.developer.associated-domains</key>
<array>
<string>webcredentials:neuland.app</string>
<string>activitycontinuation:neuland.app</string>
</array>
</dict>
</plist>
<dict>
<key>com.apple.developer.associated-domains</key>
<array>
<string>webcredentials:neuland.app</string>
<string>activitycontinuation:neuland.app</string>
</array>
</dict>
</plist>
117 changes: 51 additions & 66 deletions src/api/neuland-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,73 +66,58 @@ class NeulandAPIClient {
return await this.performGraphQLQuery(gql`
query {
food(locations: [${locations.map((x) => `"${x}"`).join(',')}]) {
timestamp
meals {
variants {
name {
de
en
}
additional
prices {
student
employee
guest
}
id
allergens
flags
nutrition {
kj
kcal
fat
fatSaturated
carbs
sugar
fiber
protein
salt
}
originalLanguage
static
restaurant
parent {
id
category
}
}
name {
de
en
}
id
category
prices {
student
employee
guest
}
allergens
flags
nutrition {
kj
kcal
fat
fatSaturated
carbs
sugar
fiber
protein
salt
}
originalLanguage
static
restaurant
}
foodData {
timestamp
meals {
name {
de
en
}
id
category
prices {
student
employee
guest
}
allergens
flags
nutrition {
kj
kcal
fat
fatSaturated
carbs
sugar
fiber
protein
salt
}
variants {
additional
id
allergens
flags
originalLanguage
static
restaurant
parent {
id
category
}
}
originalLanguage
static
restaurant
}
}
errors {
location
message
}
}
}
}
`)
`)
}

/**
Expand Down
20 changes: 0 additions & 20 deletions src/app/(tabs)/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,26 +110,6 @@ export default function HomeLayout(): JSX.Element {
symbolName: 'fork.knife',
iconName: 'silverware_fork_knife',
},
...(Platform.OS === 'ios'
? [
{
id: 'appIcon',
type: 'appIcon',
title: 'App Icon',
subtitle: t(
// @ts-expect-error no types
`appIcon.names.${appIcon}`,
{
ns: 'settings',
}
),
data: {
path: '(user)/appicon',
},
symbolName: 'paintpalette',
},
]
: []),
]

useEffect(() => {
Expand Down
4 changes: 2 additions & 2 deletions src/app/(user)/about.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import SingleSectionPicker from '@/components/Elements/Universal/SingleSectionPi
import { type Colors } from '@/components/colors'
import { AppIconContext, FlowContext } from '@/components/contexts'
import { type FormListSections } from '@/types/components'
import { IMPRINT_URL, PRIVACY_URL } from '@/utils/app-utils'
import { IMPRINT_URL, PRIVACY_URL, STATUS_URL } from '@/utils/app-utils'
import { PAGE_BOTTOM_SAFE_AREA, PAGE_PADDING } from '@/utils/style-utils'
import { trackEvent } from '@aptabase/react-native'
import { useTheme } from '@react-navigation/native'
Expand Down Expand Up @@ -67,7 +67,7 @@ export default function About(): JSX.Element {
android: 'sync_problem',
},
onPress: () => {
void Linking.openURL('https://status.neuland.app')
void Linking.openURL(STATUS_URL)
},
},
],
Expand Down
Loading

0 comments on commit 63f3b2f

Please sign in to comment.