-
Notifications
You must be signed in to change notification settings - Fork 0
build: restructure dependencies #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
170 changes: 84 additions & 86 deletions
170
...ilityiOSTestApp.xcodeproj/project.pbxproj → ...eApp/ExampleApp.xcodeproj/project.pbxproj
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
18 changes: 9 additions & 9 deletions
18
...ace/xcshareddata/swiftpm/Package.resolved → ...ace/xcshareddata/swiftpm/Package.resolved
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
35 changes: 35 additions & 0 deletions
35
ExampleApp/ExampleApp/Assets.xcassets/AppIcon.appiconset/Contents.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "idiom" : "universal", | ||
| "platform" : "ios", | ||
| "size" : "1024x1024" | ||
| }, | ||
| { | ||
| "appearances" : [ | ||
| { | ||
| "appearance" : "luminosity", | ||
| "value" : "dark" | ||
| } | ||
| ], | ||
| "idiom" : "universal", | ||
| "platform" : "ios", | ||
| "size" : "1024x1024" | ||
| }, | ||
| { | ||
| "appearances" : [ | ||
| { | ||
| "appearance" : "luminosity", | ||
| "value" : "tinted" | ||
| } | ||
| ], | ||
| "idiom" : "universal", | ||
| "platform" : "ios", | ||
| "size" : "1024x1024" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| } | ||
| } |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| // | ||
| // ContentView.swift | ||
| // ExampleApp | ||
| // | ||
| // Created by Mario Canto on 04/09/25. | ||
| // | ||
|
|
||
| import SwiftUI | ||
|
|
||
| struct ContentView: View { | ||
| var body: some View { | ||
| VStack(spacing: 32) { | ||
| Button { | ||
| fatalError() | ||
| } label: { | ||
| Text("Crash") | ||
| } | ||
| NetworkRequestView() | ||
| FeatureFlagView() | ||
| } | ||
| .padding() | ||
| } | ||
| } | ||
|
|
||
| #Preview { | ||
| ContentView() | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import SwiftUI | ||
|
|
||
| @main | ||
| struct ExampleAppApp: App { | ||
| @UIApplicationDelegateAdaptor(AppDelegate.self) private var appDelegate | ||
|
|
||
| var body: some Scene { | ||
| WindowGroup { | ||
| ContentView() | ||
| } | ||
| } | ||
| } |
18 changes: 9 additions & 9 deletions
18
...pp/ObservabilityiOSTestApp/HomeView.swift → ExampleApp/ExampleApp/FeatureFlagView.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,26 @@ | ||
| import SwiftUI | ||
| import LaunchDarkly | ||
| import LaunchDarklyObservability | ||
|
|
||
| private let featureFlag = "new-home-experience" | ||
| struct HomeView: View { | ||
| struct FeatureFlagView: View { | ||
| private let featureFlag = "new-home-experience" | ||
| @State private var isNewExperience = Optional<Bool>.none | ||
|
|
||
| var body: some View { | ||
| NavigationStack { | ||
| if isNewExperience == true { | ||
| HomeNewView() | ||
| } else if isNewExperience == false { | ||
| HomeOldView() | ||
| Group { | ||
| if let isNewExperience { | ||
| Text("Feature flag is: \(isNewExperience)") | ||
| } else { | ||
| Text("Default Home View") | ||
| Text("Feature flag is nil...") | ||
| } | ||
| } | ||
| .font(.title) | ||
| .bold() | ||
| .onAppear { | ||
| isNewExperience = LDClient.get()?.boolVariation( | ||
| forKey: featureFlag, | ||
| defaultValue: false | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import SwiftUI | ||
|
|
||
| struct NetworkRequestView: View { | ||
| @State private var loading = false | ||
| var body: some View { | ||
| Group { | ||
| if loading { | ||
| ProgressView { | ||
| Text("Loading content that will be instrumented") | ||
| } | ||
| } else { | ||
| Text("Check the LaunchDarkly dashboard for instrumentation") | ||
| } | ||
| } | ||
| .task { | ||
| guard let url = URL(string: "https://jsonplaceholder.typicode.com/todos/1") else { return } | ||
| do { | ||
| let (_, _) = try await URLSession.shared.data(from: url) | ||
| } catch { | ||
|
|
||
| } | ||
| } | ||
| } | ||
| } | ||
85 changes: 0 additions & 85 deletions
85
...bilityiOSTestApp/ObservabilityiOSTestApp/Assets.xcassets/AppIcon.appiconset/Contents.json
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Loading Indicator Fails to Display
The
loadingstate isn't updated during the network request, preventing the loading indicator from ever displaying. Users will always see the static text instead of the intended loading experience.