I'm currently using the lastest version of xCode and I'd like to be able to do this http://www.youtube.com/watch?feature=player_detailpage&v=9u1mrVTRt4w#t=98s as I could in xCode 3.
Can anyone help with possible solutions?
Xcode 4 doesn't have the Scripts menu which was built into older Xcode versions. There is a workaround however which leverages Services built into OSX to achieve the same behaviour. In order to add the Doxygen script, there is a step by step guide and the Doxygen.rb script available at this blog post: Doxygen Shortcuts In Xcode4
Duck Rowing has a very nice macro cmd-shift-D to generate a template based on the code selected.
Learn more at http://www.duckrowing.com/2011/05/14/using-the-doxygen-helper-in-xcode-4/
Related
I am an iOS developer and trying to learn tensorflow
for my Xcode 11.2.1. I tried installing tensorflow using this link
I got the package in Xcode toolchain.
But after installation when I verified installation, it failed. Swift playground is giving error
No such module 'TensorFlow'
I created a new SwiftPlayground for macOS, still, no avail.
Later I again installed tensorflow through command-line from here and it too was successful.
This time I had created a normal swift file to verify installation, but this too failed.
There is an existing old question on same issue, but that has not been helpful to me. Can anyone help me knows solution to this?
Answers to your queries:
Swift Playgrounds are not yet supported (available in future) by S4TF toolchains.
You can only build app for macOS right now but support for other OSs will be available in future.
Before you run your Swift file via CMD you need to export PATH=/Library/Developer/Toolchains/{swift-toolchain}/usr/bin/"${PATH}" where you should replace {swift-toolchain} with your S4TF toolchain name (clicking tab will suggest you available toolchains on your system). Then running swift test.swift will be (hopefully) successful.
Note: S4TF is still in early stage of development & is ready for beginners and researchers to work with it. But I personally feel that if you're developing an app for iOS it's a little early. I hope Apple with announce this feature in WWDC either in 2020 or 2021.
I hope this was helpful!
-- Rahul Bhalley
Also, if you, as an iOS developer, want to deploy a model into an iOS app without "leaving Xcode (almost)", you may be able to replicate what this developer did here. The author of that PDF presented at a S4TF design meeting not long ago. You may have seen this in the Google Groups discussion.
A workaround for model saving for you could be: use Python interop > import Keras > ... > Save model as .h5. Then, perhaps, you could use Apple's Python-based coremltools for Keras to integrate the model—now in the .mlmodel format— into your iOS app. I haven't tested this yet.
I'm developing a framework in swift targeting iOS devices. The usual pipeline include add a playground to the framework in order to test some functionalities. However, since the last update to macOS Mojave I always get messages like
No such module 'FrameWorkName'
I tried some solutions that I found on the internet, like create a workspace and add the framework and the playground, but even then it's not working. Keep in mind that the exactly same piece of code ran flawlessly on the previous OS.
How do I add custom frameworks to swift playgrounds in macOS Mojave with Xcode 10? Also, is there a better way to test custom frameworks? I understand that the swift playgrounds are trying to mimic the Jupiter-notebook style of coding, and that is awesome, but it stills need some improvement.
3rd party frameworks can’t simply be included in a playground
There is a way to solve it. It is well described in Paul Ardeleanu's post on Medium
I am currently building code that I would really like to use as a framework by being able to import MyCustomFramework as I would with Apple frameworks (in the future I would also like to distribute them).
I have some questions about that :
What is the easiest way to build a framework as what I want? Is this possible to do it directly in Xcode or do I need to use command line tools in the Terminal?
Will this framework be compatible with multiple platforms (I am thinking about all Apple platforms but also about other platforms supported by Swift such as Linux).
What is exactly the link between Swift frameworks and the Swift Package Manager ? Do I need SPM to build my framework or is this two different tools?
Thank you.
Currently, Swift Package Manager (SPM) and Xcode Frameworks follow different paths. For Linux, you have to follow the SPM path since the only way to compile a Linux swift application is to use SPM. For macOS command line apps, you can follow the SPM path as well. For iOS apps and macOS UI apps, you have to follow the Xcode Frameworks path.
For the SPM path, you make the project of your framework SPM-enabled: add Package.swift file and set the file layout of your project according to SPM conventions. The project also has to be a git repository. Then the git repository of your project can be specified as a dependency to other SPM-enabled frameworks/applications. Each SPM-enabled project can be converted to an Xcode project any time by using swift package generate-xcodeproj command.
The Xcode Frameworks path is the standard, pre-SPM way of working with frameworks with Xcode, which is described elsewhere. You create an Xcode Project that will define your framework.
So, if you want your framework to be used both in SPM-enabled projects for Linux and macOS command line apps, and in Xcode-enabled projects for iOS and macOS UI apps, you have to follow the dual path. You make your project SPM-enabled and add an Xcode Project which will define your framework. You will have to maintain your project information twice - in Package.swift file and in the Xcode Project.
I gave a detailed answer on how to use Xcode to create a Framework target in an answer 2 weeks ago here. The question wasn't specifically related to Frameworks, so I can understand how it doesn't come up in a search. (I also believe if I copied/pasted it here that would be unwelcome, but if I'm wrong I'll do it.)
For now a Swift Framework target can be compatible across Apple platforms, provided you separate UIKit, Foundation, and core code into their own frameworks. (There may be a better way but that's the best way I know.
About Swift core code: Currently Swift is (still) evolving fast. Swift 3 is beginning to have production server-side use and some Linux use, but right now with no binary compatibility (that's part of Swift 4) I'd stick to Apple platforms.
I've heard conflicting things about Swift version compatibility between Swift 2 & 3. By this I mean you can use both in the same project, but there are hurdles if you do.
Running Xcode version 8.2.1, Swift 3, and Cocoapods version 1.1.1 and I can't for the life of me figure out how to resolve this issue. I need to use the analytics library but can't get past this error in the UIViewController+SEGScreen.m class:
Without forking, is there another solution here?
What exactly do you need to figure out? The API is not available when targeting iOS extensions. There is no solution but fixing the API. If this is an open source, the fix looks really simple (wrapping in a custom macro such #ifdef TARGET_EXTENSION). If not, time to use a properly written analytics framework, that takes into account all aspects of iOS development, not the most trivial ones only.
Readers,
I can't seem to find a way to install this framework to xCode 4. Everything that is to find on internet is about xCode 3. Can anyone tell me configure my project properly to include this framework?
Greetings
-Edit:
It has been fixed, by removing everything about GHUnit Testing scripts!
There is a quite easy how-to for setting up ASI framework to your project. It should be pretty straightforward, but please do let us know which step is not clear for you, so we can better help you.
The same way you do it under XCode 3, except that the library select is is no longer available onder the right mouse click. You can find it under clicking on your project -> Build Phases.