Skip to content

Commit

Permalink
(chore) links: files
Browse files Browse the repository at this point in the history
  • Loading branch information
SensehacK committed Dec 2, 2023
1 parent 085993e commit bd51835
Show file tree
Hide file tree
Showing 19 changed files with 119 additions and 100 deletions.
42 changes: 21 additions & 21 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,39 +38,39 @@

### [Terminal](tools/terminal/README_terminal.md)

### [browsers](browsers/README_browsers)
### [browsers](tools/browsers/README_browsers)

### [editors](editors/README_editors)
### [editors](tools/editors/README_editors)

### [terminal](terminal/README_terminal)
### [terminal](tools/terminal/README_terminal)

### [utility](utility/README_utility)
### [utility](tools/utility/README_utility)

----------------------------------------------------

## [Web](frontend/README_frontend.md)

### [angular](angular/README_angular)
### [angular](frontend/angular/README_angular)

### [css](css/README_css)
### [css](frontend/css/README_css)

### [html](html/README_html)
### [html](frontend/html/README_html)

### [javascript](javascript/README_javascript)
### [javascript](frontend/javascript/README_javascript)

### [react](react/README_react)
### [react](frontend/react/README_react)

----------------------------------------------------

## [Process](process/README_process)

### [best coding practices](process/README_best_coding_practices)

### [code readability](code_readability.md)
### [code readability](process/code_readability.md)

### [packaging](packaging.md)
### [packaging](process/packaging.md)

### [problem solving](problem_solving.md)
### [problem solving](process/problem_solving.md)

----------------------------------------------------

Expand All @@ -94,31 +94,31 @@

## [OS](README_os.md)

### [linux](linux/README_linux)
### [linux](os/linux/README_linux)

### [mac](mac/README_mac)
### [mac](os/mac/README_mac)

### [windows](windows/README_windows)
### [windows](os/windows/README_windows)

----------------------------------------------------

## [backend](backend/README_backend)

### [node](node/README_node)
### [node](backend/node/README_node)

### [python](python/README_python)
### [python](backend/python/README_python)

### [ruby](ruby/README_ruby)
### [ruby](backend/ruby/README_ruby)

----------------------------------------------------

## [database](database/README_database)

### [docker](docker/README_docker)
### [docker](database/docker/README_docker)

### [mongoDB](mongoDB/README_mongoDB)
### [mongoDB](database/mongoDB/README_mongoDB)

### [SQL](sql/README_sql)
### [SQL](database/sql/README_sql)

----------------------------------------------------

Expand Down
2 changes: 2 additions & 0 deletions architecture/behavioral/observer_pattern.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ iOS examples of observer pattern in simple Swift way and Combine Reactive paradi

[swift keypaths](keypaths.md)

[Key - Value Coding KVO pattern](KVO_pattern.md)

[combine Publisher](publisher.md)

[combine Subjects](subjects.md)
Expand Down
8 changes: 4 additions & 4 deletions architecture/concurrency.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

Basic concepts from my understanding.

If you want to quickly jump into Swift Concurrency or iOS Xcode Swift concurrency examples. Please follow this [Readme_concurrency](ios/concurrency/Readme_concurrency.md) or folder `iOS/concurrency/readME_concurrency`
If you want to quickly jump into Swift Concurrency or iOS Xcode Swift concurrency examples. Please follow this [Readme_concurrency](../ios/concurrency/Readme_concurrency.md) or folder `iOS/concurrency/readME_concurrency`

## Multi Threading | Multi Processing

I know they defer a lot when we really want to go into the weeds of Operating Systems, Kernel implementation or resource allocation with respect to hardware I/O. But for the sake of argument just coupling them together for normal conversations. Don't want to open a pandora's box to further complicate this.
I know they defer a lot when we really want to go into the weeds of Operating Systems, Kernel implementation or resource allocation with respect to hardware I/O. But for the sake of argument just coupling them together for normal conversations. Don't want to open a pandora's box to further complicate this.

Side note: You can do multi threading on a single processor or do multi tasking (smart context switching) on a single thread or processor - windows 95 or 98 introduced it long time ago I believe.

Expand All @@ -29,13 +29,13 @@ I should have went with a better example since human body mostly works asynchron
## Tasks

A unit of work to be executed by a processor.
[tasks](ios/concurrency/tasks.md)
[tasks](../ios/concurrency/tasks.md)
## Thread

Multiple Tasks to be executed by a single thread. The thread runs on its own context and doesn't share its context with other threads. So running independent work items / tasks on a single Thread is highly recommended. When you add shared / mutable data mutation which can be accessed by multiple threads thus leading to dirty writes. Which leads to data inconsistency issues.

Multiple threads can exist on a single process.
[thread](ios/concurrency/thread.md)
[thread](../ios/concurrency/thread.md)


## Process
Expand Down
80 changes: 33 additions & 47 deletions ios/config/linking.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,39 @@

## Deep link

Good tutorial on how to achieve this.
Good scenarios of how to utilize it in project.

```text
- Create a deeplink as a quick action to log in using a specific account
E.g. `myapp://login?account=testaccount&password=StrongPassword`
- Use a deeplink to switch between a staging and production environment
E.g. `myapp://switch-environment?target=staging`
- Open a debug view based on a particular URL
E.g. `myapp://open-debug-view`
```

Above snippet from [avanderlee.com](https://www.avanderlee.com/swiftui/deeplink-url-handling)

Good tutorial on how to achieve this.
[Swift DC](https://www.swiftdevcenter.com/custom-url-scheme-deep-link-ios-13-and-later-swift-5/)

## Swift UI Deep links

```swift
var body: some Scene {
WindowGroup {
ContentView()
.onOpenURL { (url) in
// Handle url here
}
}
}
```

Can't use the same App Delegate methods lifecycle options in SwiftUI.
[apple docs](https://developer.apple.com/documentation/swiftui/view/onopenurl(perform:)/)
[apple forums](https://developer.apple.com/forums/thread/651234)

## Check App installation

With javascript we could redirect the navigation window object to a specific url of the app & if it doesn’t work we would just run the app store url of the app.
Expand All @@ -20,38 +49,31 @@ window.location = "appname://";

[SO Link](https://stackoverflow.com/questions/13044805/how-to-check-if-an-app-is-installed-from-a-web-page-on-an-iphone?rq=1)



## Universal Links


Supporting Universal links on iOS requires you to have access to Apple developer account, website domain, subdomain, write file access to public folder, SSL certificate for website to host over `https`.

It is a time consuming process but when configured properly it is seamless to work with. Since you won't have to worry about checking if the app is installed on the user device. Apple takes care of those underlying logic. With Deep linking apple first opens the URI callback on default web browser - Safari and then makes the call to open the app if installed. This requires very less effort.
But with Universal links apple is able to directly open the link on the app if supported.


[Setting up Universal links](https://www.branch.io/resources/blog/how-to-setup-universal-links-to-deep-link-on-apple-ios/) Source: Branch-IO

Apple documentation

- [Allowing apps and websites to link to your content](https://developer.apple.com/documentation/xcode/allowing-apps-and-websites-to-link-to-your-content?language=objc)
- [Supporting universal links in your app](https://developer.apple.com/documentation/xcode/supporting-universal-links-in-your-app?language=objc)


- [Supporting associated domains](https://developer.apple.com/documentation/xcode/supporting-associated-domains?language=objc)
Note
If your site uses multiple subdomains (such as `example.com`, `www.example.com`, and `support.example.com`), each requires its own entry in the [`Associated Domains Entitlement`](https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_associated-domains), and each must serve its own `apple-app-site-association` file.

Subdomain help
https://asbelita.medium.com/manage-universal-links-with-multiple-associated-domains-in-ios-97bda851b654
[multiple-associated-domains](https://asbelita.medium.com/manage-universal-links-with-multiple-associated-domains-in-ios-97bda851b654)

## Testing


Opening links without typing it in simulator for testing can be easily achieved using Xcode CLI.


Use this command to launch website or URL on simulator

```bash
Expand All @@ -60,44 +82,8 @@ xcrun simctl openurl booted "https://reddit.com/"
xcrun simctl openurl booted "com.trackvia://"
```


https://isapozhnik.com/articles/6-ways-of-launching-deeplinks-on-ios-simulator/


## Deep Links

Good scenarios of how to utilize it in project.

```text
- Create a deeplink as a quick action to log in using a specific account
E.g. `myapp://login?account=testaccount&password=StrongPassword`
- Use a deeplink to switch between a staging and production environment
E.g. `myapp://switch-environment?target=staging`
- Open a debug view based on a particular URL
E.g. `myapp://open-debug-view`
```
Above snippet from https://www.avanderlee.com/swiftui/deeplink-url-handling


## Swift UI Deep links

```swift
var body: some Scene {
WindowGroup {
ContentView()
.onOpenURL { (url) in
// Handle url here
}
}
}
```

Can't use the same App Delegate methods lifecycle options in SwiftUI.

https://developer.apple.com/forums/thread/651234

https://developer.apple.com/documentation/swiftui/view/onopenurl(perform:)/
[6-ways-of-launching-deeplinks-on-ios-simulator](https://isapozhnik.com/articles/6-ways-of-launching-deeplinks-on-ios-simulator/)

## Reference

https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app
[defining-a-custom-url-scheme](https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app)
1 change: 1 addition & 0 deletions ios/library/DRM.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions ios/library/HLS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

5 changes: 5 additions & 0 deletions ios/library/README_library.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,24 @@

[codable](codable.md)

[crossPlatform](crossPlatform.md)

[codable](codable.md)

[cryptoSwift](cryptoSwift.md)

[[date_time]]

[DRM](DRM.md)

[[foundation_library]]

[framework](framework.md)

[functional_programming](functional_programming.md)

[HLS](HLS.md)

[import](import.md)

[jailbreak](ios/library/jailbreak.md)
Expand Down
1 change: 1 addition & 0 deletions ios/library/avPlayer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions ios/library/crossPlatform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

62 changes: 36 additions & 26 deletions ios/lifecycle/README_lifecycle.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,71 @@
[[app_delegate]]
# iOS Lifecycle

[[arc]]
## List

[[class]]
[[ios/lifecycle/app_delegate]]

[[ios/lifecycle/arc]]

[[ios/lifecycle/class]]

[cache](ios/lifecycle/cache.md)

[[ios/lifecycle/dark_mode]]

[database](database.md)
[database](ios/lifecycle/database.md)

[delegation_pattern](ios/lifecycle/delegation_pattern.md)

[[dimensions]]
[[ios/lifecycle/dimensions]]

[[ios/lifecycle/documentation]]

[dynamic_runtime](dynamic_runtime.md)
[dynamic_runtime](ios/lifecycle/dynamic_runtime.md)

[[ios/lifecycle/extensions]]

[inheritance](inheritance.md)
[inheritance](ios/lifecycle/inheritance.md)

[initialization](ios/lifecycle/initialization.md)

[KVO_pattern](ios/lifecycle/KVO_pattern.md)

[initialization](initialization.md)
[[ios/lifecycle/localization]]

[[localization]]
[logging](ios/lifecycle/logging.md)

[logging](logging.md)
[notification_pattern](ios/lifecycle/notification_pattern.md)

[notification_pattern](notification_pattern.md)
[[ios/lifecycle/network_calls]]

[[network_calls]]
[[ios/lifecycle/orientation]]

[[orientation]]
[plist](ios/lifecycle/plist.md)

[plist](plist.md)
[protocol](ios/lifecycle/protocol.md)

[read_local_file](read_local_file.md)
[read_local_file](ios/lifecycle/read_local_file.md)

[[retain_cycle]]
[[ios/lifecycle/retain_cycle]]

[[rtl_alignment_support]]
[[ios/lifecycle/rtl_alignment_support]]

[[segues]]
[[ios/lifecycle/segues]]

[[storyboard_refactor]]
[[ios/lifecycle/storyboard_refactor]]

[[structs]]
[[ios/lifecycle/struct]]

[[swift_types]]
[[ios/lifecycle/swift_types]]

[timer](ios/lifecycle/timer.md)

[[unowned_vs_weak]]
[[ios/lifecycle/unowned_vs_weak]]

[[state_architecture]]
[[ios/lifecycle/state_architecture]]

[user_defaults](user_defaults.md)
[user_defaults](ios/lifecycle/user_defaults.md)

[user_notifications](user_notifications.md)
[user_notifications](ios/lifecycle/user_notifications.md)

[[view_controllers]]
[[ios/lifecycle/view_controllers]
1 change: 1 addition & 0 deletions ios/lifecycle/delegation_pattern.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Loading

0 comments on commit bd51835

Please sign in to comment.