- Posts: 1
Missing Dynamic Library File when Generating Swift (iOS) Code
- sledsworth
- Topic Author
Less
More
29 Sep 2021 14:28 #10110
by sledsworth
Missing Dynamic Library File when Generating Swift (iOS) Code was created by sledsworth
Hello!
I'm out of my element with using SAM and dynamic languages in general, so this could totally be my mistake, but I'm not seeing the dynamic language file being generated when using the 'generate code' for iOS option in SAM. I get a header file, some csv data files, and the swift bridge file–shouldn't there also be a dynamic library file that contains the implementation of ssc?
I tried grabbing the dylib file directly from the Frameworks folder in the SAM application, but that resulted in an Xcode error stating that the file was built for macOS, not iOS (makes sense). From there I decided to try to build ssc from source, but couldn't even get one of the dependencies built (wxWidgets).
With all that, I'm not sure what the best route is to get PVWatts to work locally on an iOS device. Anyone have any tips or able to point me in the right direction?
Some more details:
macOS 11.6
SAM 2020.11.29
I attached a video of how I am using the SAM application to generate code.
Thanks!
I'm out of my element with using SAM and dynamic languages in general, so this could totally be my mistake, but I'm not seeing the dynamic language file being generated when using the 'generate code' for iOS option in SAM. I get a header file, some csv data files, and the swift bridge file–shouldn't there also be a dynamic library file that contains the implementation of ssc?
I tried grabbing the dylib file directly from the Frameworks folder in the SAM application, but that resulted in an Xcode error stating that the file was built for macOS, not iOS (makes sense). From there I decided to try to build ssc from source, but couldn't even get one of the dependencies built (wxWidgets).
With all that, I'm not sure what the best route is to get PVWatts to work locally on an iOS device. Anyone have any tips or able to point me in the right direction?
Some more details:
macOS 11.6
SAM 2020.11.29
I attached a video of how I am using the SAM application to generate code.
Thanks!
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5447
01 Oct 2021 16:31 #10116
by pgilman
Replied by pgilman on topic Missing Dynamic Library File when Generating Swift (iOS) Code
Hi Steven,
It's been a while since we worked on SAM's code generator for iOS and Android. I fixed a couple of things that should make it work better.
When you run the code generator now, it should now open a web browser with instructions. You can also get to the instructions from the SDK page on the SAM website ( sam.nrel.gov/sdk ) by following the links in the Code Generator section. Here are the URLs for those instructions:
For Android: sam.nrel.gov/11/115
For iOS: sam.nrel.gov/11/116
As mentioned in the instructions, the libraries provided were built from SAM 2017.9.5, so are a bit out of date. You can try your hand at building new ones from the makefiles on GitHub here:
For Android: github.com/NREL/ssc/tree/develop/build_android
For iOS: github.com/NREL/ssc/tree/develop/build_ios
Best regards,
Paul.
It's been a while since we worked on SAM's code generator for iOS and Android. I fixed a couple of things that should make it work better.
When you run the code generator now, it should now open a web browser with instructions. You can also get to the instructions from the SDK page on the SAM website ( sam.nrel.gov/sdk ) by following the links in the Code Generator section. Here are the URLs for those instructions:
For Android: sam.nrel.gov/11/115
For iOS: sam.nrel.gov/11/116
As mentioned in the instructions, the libraries provided were built from SAM 2017.9.5, so are a bit out of date. You can try your hand at building new ones from the makefiles on GitHub here:
For Android: github.com/NREL/ssc/tree/develop/build_android
For iOS: github.com/NREL/ssc/tree/develop/build_ios
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
Moderators: pgilman