You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After a while I found this is because "Module names are alphanumeric and must begin with an uppercase letter." (says Google).
And indeed the module is called IOS with a capital I.
(Sorry if I sound ungrateful, but have you actually tried following your own docs?)
So I changed this to a capital 'I':
frontend/src/Frontend.hs
importObelisk.Frontend.IOS
That gives me:
src/Frontend.hs:15:1: error:
Could not find module ‘Obelisk.Frontend.IOS’
Perhaps you meant Obelisk.Frontend (from obelisk-frontend-0.1)
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
|
15 | import Obelisk.Frontend.IOS
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
... so I (tried around quite a bit until I found out...) added obelisk-ios-libfrontendconfig to library's build-depends in frontend/frontend.cabal.
That gives me:
src/Frontend.hs:64:37: error:
Variable not in scope: myHtmlHead :: StaticWidget x0 a0
|
64 | html <- fmap snd $ renderStatic $ myHtmlHead
|
... so I just define that above the pasted code, copying the header from the default 'ob init' project:
frontend/src/Frontend.hs
myHtmlHead =do
el "title"$ text "Obelisk Minimal Example"
elAttr "script" ("type"=:"application/javascript"<>"src"=:$(static "lib.js")) blank
elAttr "link" ("href"=:$(static "main.css") <>"type"=:"text/css"<>"rel"=:"stylesheet") blank
... that throws a few warnings during compilation ("Top-level binding with no type signature", it really rather would have me defined a type for this, eh?) but it does build.
The last few lines of the build log include a
find: ‘install_name_tool’: No such file or directory
find: ‘install_name_tool’: No such file or directory
which is a bit strange, since I have that thing:
[nix-shell:~/Repositories/apple-obsidian-tests]$ which install_name_tool
/nix/store/m465asx3ymh99z06zxgphh9f82f96kkc-cctools-binutils-darwin-16.0.6-973.0.1/bin/install_name_tool
but maybe this is configured to be pure and install_name_tool needs to be in some dependency list?
The text was updated successfully, but these errors were encountered:
hacklschorsch
changed the title
Ran into a few little problems, here's a list of things I tried.
Ran into a few (7) little problems when trying this with the 'ob init' demo project.
Jun 6, 2024
hacklschorsch
changed the title
Ran into a few (7) little problems when trying this with the 'ob init' demo project.
Ran into a few (5) little problems when trying this with the 'ob init' demo project.
Jun 6, 2024
Thanks for this @ali-abrar, I have been stuck trying to get our Obelisk mobile app deploy and run on iOS for a while now.
However, I have a hard time getting this to run also.
(I still am a Haskell newbie, sorry if this is all obvious)
I tried to set this up with the Obelisk demo project
ob init
gives you.First I fixed the Nix snippet (to have haskellLib and hackGet):
default.nix
, and when trying to compile I got:
First was a bit stuped by this error message.
After a while I found this is because "Module names are alphanumeric and must begin with an uppercase letter." (says Google).
And indeed the module is called
IOS
with a capital I.(Sorry if I sound ungrateful, but have you actually tried following your own docs?)
So I changed this to a capital 'I':
frontend/src/Frontend.hs
That gives me:
... so I (tried around quite a bit until I found out...) added
obelisk-ios-libfrontendconfig
tolibrary
'sbuild-depends
infrontend/frontend.cabal
.That gives me:
... so I just define that above the pasted code, copying the header from the default 'ob init' project:
frontend/src/Frontend.hs
... that throws a few warnings during compilation ("Top-level binding with no type signature", it really rather would have me defined a type for this, eh?) but it does build.
The last few lines of the build log include a
which is a bit strange, since I have that thing:
but maybe this is configured to be pure and
install_name_tool
needs to be in some dependency list?The text was updated successfully, but these errors were encountered: