Comments (3)
I think I figured out this problem. In Networking/Request.swift, there is a query to financialmodelingprep.com, but that needs an API Key. So the solution is to add an API key in Configuration.swift, and change the code in func companyProfile to look something like this:
var urlString = companyProfileURL.replacingOccurrences(of: "{company}", with: identifier)
urlString.append("?apikey=\(configuration.financialmodelingprepApiKey)")
from divrise.
Has that fix been added to the REPO master / dev?
I just hand rolled it in to my code base (development Mar 22, 2022) and the app is crashing.
// MARK: Portfolio & Search Shared
private func companyProfile(identifier: String) -> AnyPublisher<CompanyProfileResponse, Never> {
var urlString = companyProfileURL.replacingOccurrences(of: "{company}", with: identifier)
urlString.append("?apikey=\(configuration.financialmodelingprepApiKey)")
let url = URL(string: urlString)!
from divrise.
DivRise/Request.swift:72: Fatal error: Unexpectedly found nil while unwrapping an Optional value
2022-03-22 18:44:24.419356-0500 DivRise[21900:1652350] DivRise/Request.swift:72: Fatal error: Unexpectedly found nil while unwrapping an Optional value
line 72 is DateFormatter
func fetchUpcomingDividendDate(portfolioStock: PortfolioStock) -> AnyPublisher<UpcomingDividend, Never> {
return getCompanyCashFlowStatement(identifier: portfolioStock.ticker, period: "quarter")
.map {
var date = DateFormatter.fullString.date(from: $0.financials.first!.date)!
from divrise.
Related Issues (9)
- Make the detail screen graph bigger when selected
- Add feature to edit the ordering of attribute names
- ChartView clipping
- "Add stock to display" continues to be shown HOT 1
- Requests.swift has API keys exposed publically
- Implement remote database
- Filter portfolio stocks - value, total gain, return
- Unexpectedly found nil while unwrapping an Optional value: file DivRise/Request.swift, line 72 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from divrise.