# Swift

**URL:** https://forums.kodeco.com/c/general/swift/15.md?page=3

[Latest](https://forums.kodeco.com/latest.md) · [Categories](https://forums.kodeco.com/categories.md) · [Tags](https://forums.kodeco.com/tags.md)

**Page:** 4

---

## [Camera access with no preview](https://forums.kodeco.com/t/camera-access-with-no-preview/13568)

<div class="topic-metadata">

**Author:** [@uthaman](https://forums.kodeco.com/u/uthaman)\
**Replies:** 4\
**Last updated:** [February 25, 2022, 10:54am UTC](https://forums.kodeco.com/t/camera-access-with-no-preview/13568 "2022-02-25T10:54:43Z")

</div>

I am trying to get a small test app working so that when I touch a button the app access the camera and takes a picture. I don’t need to show what the camera is looking at, i just want to take the picture and show it in…

---

## [Conceptual questions about Struct's immutability and property changes from within the struct and from the instance](https://forums.kodeco.com/t/conceptual-questions-about-structs-immutability-and-property-changes-from-within-the-struct-and-from-the-instance/164648)

<div class="topic-metadata">

**Author:** [@logi](https://forums.kodeco.com/u/logi)\
**Replies:** 2\
**Last updated:** [February 15, 2022, 1:35pm UTC](https://forums.kodeco.com/t/conceptual-questions-about-structs-immutability-and-property-changes-from-within-the-struct-and-from-the-instance/164648 "2022-02-15T13:35:54Z")

</div>

struct Test { var a: Int func changeA() { a = 10 } } var testInstance = Test(a: 10) testInstance.a = 1 1.- I understand, Structs are immutable, nonetheless the Swift compiler allows me to change Property “a” to…

---

## [Model Generator](https://forums.kodeco.com/t/model-generator/164511)

<div class="topic-metadata">

**Author:** [@rufy](https://forums.kodeco.com/u/rufy)\
**Replies:** 1\
**Last updated:** [February 14, 2022, 4:26pm UTC](https://forums.kodeco.com/t/model-generator/164511 "2022-02-14T16:26:50Z")

</div>

Can you suggest the best json to Swift model generator site? Until recently there was jsoncafé but unfortunately it is gone. Do you know a valid alternative? Thank you

---

## [Suggested book learning path](https://forums.kodeco.com/t/suggested-book-learning-path/164105)

<div class="topic-metadata">

**Author:** [@gaspare92](https://forums.kodeco.com/u/gaspare92)\
**Replies:** 1\
**Last updated:** [February 8, 2022, 8:03pm UTC](https://forums.kodeco.com/t/suggested-book-learning-path/164105 "2022-02-08T20:03:45Z")

</div>

Hello Raywenderlich Team, Can you please suggest the reading order of your Swift/iOS books, for a complete beginner? Thank you!

---

## [Best practice of storing immutable data in the app](https://forums.kodeco.com/t/best-practice-of-storing-immutable-data-in-the-app/163722)

<div class="topic-metadata">

**Author:** [@swifty94](https://forums.kodeco.com/u/swifty94)\
**Replies:** 1\
**Last updated:** [February 8, 2022, 1:27am UTC](https://forums.kodeco.com/t/best-practice-of-storing-immutable-data-in-the-app/163722 "2022-02-08T01:27:45Z")

</div>

I want to make an app that helps prepare for a driving test. Question lists don’t change for years and I want to know the best way to store them in the app. The question may include an image, the question itself, and mul…

---

## [Unable to convert string to URL in Swift iOS](https://forums.kodeco.com/t/unable-to-convert-string-to-url-in-swift-ios/162939)

<div class="topic-metadata">

**Author:** [@deepgagan](https://forums.kodeco.com/u/deepgagan)\
**Replies:** 1\
**Last updated:** [January 25, 2022, 3:07pm UTC](https://forums.kodeco.com/t/unable-to-convert-string-to-url-in-swift-ios/162939 "2022-01-25T15:07:42Z")

</div>

In order to make HTTP request call using URLSession, I need to convert string to URL first I have tried everything but just can’t convert this piece of string to URL(string: ). This is the string: “http://api-aws-eu-q…

---

## [Extend video render size and add background ios swift](https://forums.kodeco.com/t/extend-video-render-size-and-add-background-ios-swift/97957)

<div class="topic-metadata">

**Author:** [@joysolutioncat](https://forums.kodeco.com/u/joysolutioncat)\
**Replies:** 7\
**Last updated:** [January 13, 2022, 6:10am UTC](https://forums.kodeco.com/t/extend-video-render-size-and-add-background-ios-swift/97957 "2022-01-13T06:10:53Z")

</div>

i see this tutorial and develop an app thats take a video and add square background . video screen size change to square size . but when i render, its contain a portion of black screen . i provide screen shot . and code…

---

## [Swift server-side frameworks, which is best?](https://forums.kodeco.com/t/swift-server-side-frameworks-which-is-best/28346)

<div class="topic-metadata">

**Author:** [@statemachinejunkie](https://forums.kodeco.com/u/statemachinejunkie)\
**Replies:** 5\
**Last updated:** [January 8, 2022, 8:58am UTC](https://forums.kodeco.com/t/swift-server-side-frameworks-which-is-best/28346 "2022-01-08T08:58:33Z")

</div>

I just watched a couple of videos. The first was an introduction to Vapor. The second was an introduction to Perfect. Being new to server development, I’d like to know which one is favored and why?

---

## [Bundle exec fastlane screenshot](https://forums.kodeco.com/t/bundle-exec-fastlane-screenshot/161615)

<div class="topic-metadata">

**Author:** [@lessimp](https://forums.kodeco.com/u/lessimp)\
**Replies:** 0\
**Last updated:** [January 7, 2022, 10:02pm UTC](https://forums.kodeco.com/t/bundle-exec-fastlane-screenshot/161615 "2022-01-07T22:02:00Z")

</div>

I get this error in terminal when I type “bundle exec fastlane screenshot” \[!\] Could not find lane ‘ios screenshot’. Available lanes: ios create\_app

---

## [Random string with pattern](https://forums.kodeco.com/t/random-string-with-pattern/160070)

<div class="topic-metadata">

**Author:** [@rufy](https://forums.kodeco.com/u/rufy)\
**Replies:** 1\
**Last updated:** [December 17, 2021, 2:11pm UTC](https://forums.kodeco.com/t/random-string-with-pattern/160070 "2021-12-17T14:11:50Z")

</div>

Is there a way to generate a random string with a particular pattern? e.g. ar5-Edg-2ah

---

## [Protocol-oriented programming](https://forums.kodeco.com/t/protocol-oriented-programming/161085)

<div class="topic-metadata">

**Author:** [@fortranprog](https://forums.kodeco.com/u/fortranprog)\
**Replies:** 0\
**Last updated:** [December 29, 2021, 3:42pm UTC](https://forums.kodeco.com/t/protocol-oriented-programming/161085 "2021-12-29T15:42:50Z")

</div>

protocol TeamRecord { var wins: Int { get } var losses: Int { get } var winningPercentage: Double { get } } extension TeamRecord { var gamesPlayed: Int { wins + losses } } extension TeamRecord { var win…

---

## [Swift in Browser](https://forums.kodeco.com/t/swift-in-browser/161009)

<div class="topic-metadata">

**Author:** [@rufy](https://forums.kodeco.com/u/rufy)\
**Replies:** 0\
**Last updated:** [December 24, 2021, 5:08pm UTC](https://forums.kodeco.com/t/swift-in-browser/161009 "2021-12-24T17:08:56Z")

</div>

Is there a way to use swift instead of javascript directly (without WebAssembly or similar)? I’m trying to create a framework to create static front-end website to substitute HTML, CSS and Javascript with Swift. To subs…

---

## [How to add a white color as a filter on a SKSpriteNode in Swift](https://forums.kodeco.com/t/how-to-add-a-white-color-as-a-filter-on-a-skspritenode-in-swift/160785)

<div class="topic-metadata">

**Author:** [@wangying117](https://forums.kodeco.com/u/wangying117)\
**Replies:** 0\
**Last updated:** [December 21, 2021, 6:34am UTC](https://forums.kodeco.com/t/how-to-add-a-white-color-as-a-filter-on-a-skspritenode-in-swift/160785 "2021-12-21T06:34:42Z")

</div>

1 I have added a SKSpriteNode in the scene, and I want to add a white color on it to brighten. let armySprite = SKSpriteNode(imageNamed: "army\_img") armySprite.position = tile.Position scene.addChild(armySprite) armySp…

---

## [A pathfinding problem: how to tell water-road situation?](https://forums.kodeco.com/t/a-pathfinding-problem-how-to-tell-water-road-situation/160553)

<div class="topic-metadata">

**Author:** [@wangying117](https://forums.kodeco.com/u/wangying117)\
**Replies:** 2\
**Last updated:** [December 21, 2021, 6:29am UTC](https://forums.kodeco.com/t/a-pathfinding-problem-how-to-tell-water-road-situation/160553 "2021-12-21T06:29:03Z")

</div>

Hello. as you see, there is a map pathfinding problem. The yellow tiles in the map are the Land, and blue ones are the ocean. The red font means there is a waterway, and the green font means there is a road. The correct…

---

## [Java Assignment Help in Australia](https://forums.kodeco.com/t/java-assignment-help-in-australia/151234)

<div class="topic-metadata">

**Author:** [@sorayalee](https://forums.kodeco.com/u/sorayalee)\
**Replies:** 0\
**Last updated:** [October 8, 2021, 7:01am UTC](https://forums.kodeco.com/t/java-assignment-help-in-australia/151234 "2021-10-08T07:01:12Z")

</div>

Is it correct to say that you are tired of your Java assignment tasks? Is it really you to seek assignment help? Relax, we are here to help you in every way. We can see that it is very difficult to accomplish tasks on Ja…

---

## [Optional dates and how to handle them](https://forums.kodeco.com/t/optional-dates-and-how-to-handle-them/158918)

<div class="topic-metadata">

**Author:** [@nobby](https://forums.kodeco.com/u/nobby)\
**Replies:** 1\
**Last updated:** [December 8, 2021, 10:27pm UTC](https://forums.kodeco.com/t/optional-dates-and-how-to-handle-them/158918 "2021-12-08T22:27:21Z")

</div>

Hello, I am still working on my first project and one thing is making me crazy: optional dates. The task seems easy, the user should be able to set two optional dates (from & to). To my knowledge, SwiftUI does not prov…

---

## [UIImage iamge is out of scope](https://forums.kodeco.com/t/uiimage-iamge-is-out-of-scope/158775)

<div class="topic-metadata">

**Author:** [@a-elnajjar](https://forums.kodeco.com/u/a-elnajjar)\
**Replies:** 0\
**Last updated:** [November 28, 2021, 2:13am UTC](https://forums.kodeco.com/t/uiimage-iamge-is-out-of-scope/158775 "2021-11-28T02:13:56Z")

</div>

I have done lesson 4 of Your Second iOS & SwiftUI App. I have an issue with my UIImage view is not in the scope because of that it give me compile error. I comment out my code to be able to compile the code but I could n…

---

## [How to change locale of calendar in date picker](https://forums.kodeco.com/t/how-to-change-locale-of-calendar-in-date-picker/157368)

<div class="topic-metadata">

**Author:** [@tringuyen623](https://forums.kodeco.com/u/tringuyen623)\
**Replies:** 0\
**Last updated:** [November 15, 2021, 10:16am UTC](https://forums.kodeco.com/t/how-to-change-locale-of-calendar-in-date-picker/157368 "2021-11-15T10:16:56Z")

</div>

Hi everyone. Hope you are doing well I have a problem with UIDatePicker I want to locale it to user’s language. When I change locale it not change in calendar like the picture I was attached. How can I change the loca…

---

## [Losing metadata while saving UIImage in HEIC format](https://forums.kodeco.com/t/losing-metadata-while-saving-uiimage-in-heic-format/156542)

<div class="topic-metadata">

**Author:** [@avocado7](https://forums.kodeco.com/u/avocado7)\
**Replies:** 0\
**Last updated:** [November 10, 2021, 2:50am UTC](https://forums.kodeco.com/t/losing-metadata-while-saving-uiimage-in-heic-format/156542 "2021-11-10T02:50:05Z")

</div>

Hello, Thank you for the this content! As a new Swift developer I grateful for this resource. I am following this tutorial https://www.raywenderlich.com/4726843-heic-image-compression-for-ios to save a UIImage in HEIC …

---

## [How is DevOps Making an Impact in the IT Industry?](https://forums.kodeco.com/t/how-is-devops-making-an-impact-in-the-it-industry/156378)

<div class="topic-metadata">

**Author:** [@awstrainingcertifica](https://forums.kodeco.com/u/awstrainingcertifica)\
**Replies:** 0\
**Last updated:** [November 8, 2021, 7:01pm UTC](https://forums.kodeco.com/t/how-is-devops-making-an-impact-in-the-it-industry/156378 "2021-11-08T19:01:22Z")

</div>

From the design phase to deployment and management of the shipment, DevOps is utilized everywhere to improve communication between all contributors. Some of the benefits of implementing DevOps are as follows: DevOps-en…

---

## [How do I get the sections header from NSfetchedResultController](https://forums.kodeco.com/t/how-do-i-get-the-sections-header-from-nsfetchedresultcontroller/155833)

<div class="topic-metadata">

**Author:** [@wurllink](https://forums.kodeco.com/u/wurllink)\
**Replies:** 0\
**Last updated:** [November 3, 2021, 2:09pm UTC](https://forums.kodeco.com/t/how-do-i-get-the-sections-header-from-nsfetchedresultcontroller/155833 "2021-11-03T14:09:45Z")

</div>

I am using the a diffable datasource to populate the cells in a collection view while getting the data from NSFetchedResultController. However, I am struggling to figure out how to properly create a snapshot with the acc…

---

## [Carekit 2.1 and SwiftUI](https://forums.kodeco.com/t/carekit-2-1-and-swiftui/155511)

<div class="topic-metadata">

**Author:** [@matchstick462](https://forums.kodeco.com/u/matchstick462)\
**Replies:** 0\
**Last updated:** [November 1, 2021, 3:51am UTC](https://forums.kodeco.com/t/carekit-2-1-and-swiftui/155511 "2021-11-01T03:51:55Z")

</div>

New to IOS dev and working through a simple CareKit app. Reviewing the RK and CK tutorials on RW, the framework has changed significantly since the tutorial was published, and now includes support for SwiftUI. Is it pos…

---

## [Creation XML document](https://forums.kodeco.com/t/creation-xml-document/152417)

<div class="topic-metadata">

**Author:** [@rufy](https://forums.kodeco.com/u/rufy)\
**Replies:** 0\
**Last updated:** [October 11, 2021, 5:00pm UTC](https://forums.kodeco.com/t/creation-xml-document/152417 "2021-10-11T17:00:27Z")

</div>

Is there a built-in way to create html/xml document? or which is the best framework to use of this purpose?

---

## [How to get the source code and install it Xcode of ( Your First iOS and SwiftUI App: An App From Scratch )](https://forums.kodeco.com/t/how-to-get-the-source-code-and-install-it-xcode-of-your-first-ios-and-swiftui-app-an-app-from-scratch/152070)

<div class="topic-metadata">

**Author:** [@samasoul](https://forums.kodeco.com/u/samasoul)\
**Replies:** 0\
**Last updated:** [October 10, 2021, 6:22pm UTC](https://forums.kodeco.com/t/how-to-get-the-source-code-and-install-it-xcode-of-your-first-ios-and-swiftui-app-an-app-from-scratch/152070 "2021-10-10T18:22:00Z")

</div>

Hello, In the end of the course ( Your First iOS and SwiftUI App: An App From Scratch ) how can I take the final code and open it with my Xcode? Thanks

---

## [keyNotFound Error While Trying to Connect to API](https://forums.kodeco.com/t/keynotfound-error-while-trying-to-connect-to-api/148181)

<div class="topic-metadata">

**Author:** [@aarondp2011](https://forums.kodeco.com/u/aarondp2011)\
**Replies:** 5\
**Last updated:** [October 8, 2021, 4:57am UTC](https://forums.kodeco.com/t/keynotfound-error-while-trying-to-connect-to-api/148181 "2021-10-08T04:57:09Z")

</div>

I am trying to connect to an API and I am getting the following error: keyNotFound(CodingKeys(stringValue: “title”, intValue: nil), Swift.DecodingError.Context(codingPath: \[CodingKeys(stringValue: “items”, intValue: nil…

---

## [How do I handle null values when decoding](https://forums.kodeco.com/t/how-do-i-handle-null-values-when-decoding/149202)

<div class="topic-metadata">

**Author:** [@jport1130](https://forums.kodeco.com/u/jport1130)\
**Replies:** 0\
**Last updated:** [October 2, 2021, 6:39pm UTC](https://forums.kodeco.com/t/how-do-i-handle-null-values-when-decoding/149202 "2021-10-02T18:39:42Z")

</div>

I have made changes to my app and now I am receiving an error, “No value associated with key CodingKeys”. I have done some research and I am struggling with implementation to handle null values. Below is the code I am …

---

## [Error with tutorial Push Notifications](https://forums.kodeco.com/t/error-with-tutorial-push-notifications/149086)

<div class="topic-metadata">

**Author:** [@sa44](https://forums.kodeco.com/u/sa44)\
**Replies:** 3\
**Last updated:** [September 30, 2021, 5:37pm UTC](https://forums.kodeco.com/t/error-with-tutorial-push-notifications/149086 "2021-09-30T17:37:10Z")

</div>

Hi in the Push Notifications Tutorial: Getting Started I am getting the error “Cannot find ‘self’ in scope” under func registerForPushNotifications() https://www.raywenderlich.com/11395893-push-notifications-tutorial-g…

---

## [SwiftUI and Attributed Text](https://forums.kodeco.com/t/swiftui-and-attributed-text/139242)

<div class="topic-metadata">

**Author:** [@rufy](https://forums.kodeco.com/u/rufy)\
**Replies:** 1\
**Last updated:** [September 22, 2021, 8:47am UTC](https://forums.kodeco.com/t/swiftui-and-attributed-text/139242 "2021-09-22T08:47:08Z")

</div>

One key of attributedText is this NSAttributedString.Key.verticalGlyphForm this let you to write text in vertically way. example, Japanese or Chinese text. this key unfortunately is only for UIKit. So, Is there a way…

---

## [Countdown in the background problem](https://forums.kodeco.com/t/countdown-in-the-background-problem/148111)

<div class="topic-metadata">

**Author:** [@art87](https://forums.kodeco.com/u/art87)\
**Replies:** 1\
**Last updated:** [September 17, 2021, 4:05am UTC](https://forums.kodeco.com/t/countdown-in-the-background-problem/148111 "2021-09-17T04:05:21Z")

</div>

I have built a small animated countdown app using UIKit and SwiftUI, where the animated timer itself was built with SwiftUI. The countdown counts until zero and then beeps. Here are my problems: when I switch to another …

---

## [Search Bar Does Not Display after Adding Table View Programmatically](https://forums.kodeco.com/t/search-bar-does-not-display-after-adding-table-view-programmatically/147851)

<div class="topic-metadata">

**Author:** [@aarondp2011](https://forums.kodeco.com/u/aarondp2011)\
**Replies:** 0\
**Last updated:** [September 11, 2021, 3:12pm UTC](https://forums.kodeco.com/t/search-bar-does-not-display-after-adding-table-view-programmatically/147851 "2021-09-11T15:12:28Z")

</div>

Hello. I am a beginner developer. I am trying to add a table view to a view controller that already contains a search bar. However, the search bar does not display after adding the table view. What could possibly be the …

[Previous page](https://forums.kodeco.com/c/general/swift/15.md?page=2)

[Next page](https://forums.kodeco.com/c/general/swift/15.md?page=4)
