Can I uses swift library on iPad Playground? - swift-playground

I'm trying to uses swift playground on iPad.
It supports all of iOS classes.
But I can't find this features
How can I import GitHub library?
How can I create multiple Swift files?
Anyone know about this?

You can do this one of two ways.
Do it on GitHub and then download Working Copy. It's a free iOS app that allows you to download projects from GitHub as .playground files and run them in Swift Playgrounds.
Do it on a Mac. I understand this might not be possible, but it is by far the best method of doing this. It is much easier and, as a whole, better. For the best experience, I recommend this option.

Related

How to implement Steamworks API into an existing macOS / Xcode project?

I intend to submit an existing macOS game to Steam. It was made with Xcode using Objective-C and Swift.
According to the Steamworks documentation I need to link libsteam_api.dylib in the Xcode project.
However this does not seem to be enough. Several specific build and target settings need to be made, of which I can find no documentation. Also several other conditions need to be met, such as init calls that should be made.
The non-C++ language support page unfortunately has no information about Objective-C / Swift / Xcode and searching the web does not return any useful information other than how to code sign Mac games for Steam.
Is there any tutorial / help / step by step guide on how to do make the game submittable to Steam?
You can use Objective-C++ for easy integrate SteamWorks API to your Xcode project.
SteamWorks SDK has example named "steamworksexample" that show how to use it.

Libgit2sharp in Xamarin iOS

I'm trying to run Libgit2Sharp in a Xamarin.iOS project (I'm currently running it on Xamarin.Droid).
For doing so, I was trying to follow the same approach than for Android (generating a custom native binaries package) but I have faced some doubts/problems.
First, iOS doesn't allow the use of dynamic libraries at least if you want to upload the app to the market.
Is there any "easy" way no rebuild libgit2sharp to make it run static libraries?
Probably the App will not go to the official App Store, but it would be nice to know if it is possible.
Another thing I have realized while checking the libgit2sharp source code is that iOS is not in the list of possible Operating Systems, so should I make any other modification to make it run on iOS?
Thanks in advance
So in the end I found a way to run libgit2 in Xamarin.iOS.
Basically what I did was to generate the iOS libgit2 static libraries (you can use the Objective-git repository for doing so, as it is part of the process) and then modify LibGit2Sharp project to look for "__Internal" instead of the .dll/.so dynamic libraries.
The you just need to add the libgit2 static library to your Xamarin.iOS project, and that's all.
Hope someone finds this info helpful.

Applovin tvOS LIbrary Issues

I apologize but I am new to tvOS development, an programming in general.
IDE: Xcode 7.2.1
language: Swift 2
platform: tvOS
I am currently trying to integrate the AppLovin SDK for my tvOS app.
I have followed the documentation and have everything set up for Swift.
However, there is one glaring problem. when downloading the SDK the static library File: libAppLovinTVOS.a does not populate as a library.But rather a generic Document file.
I have downloaded it a couple times to see if it was just an error in downloading. Even tried to go to their gitHub to no avail. Any help will be deeply appreciated.
(sorry for breaking up the text it helps with my dyslexia)
when downloading the SDK the static library File: libAppLovinTVOS.a does not populate as a library.But rather a generic Document file.
There's nothing wrong. The file is a static library, not a framework, and it's completely normal for those to appear as plain old document files. I've got several similar libraries in my iOS project right now and they have exactly the same generic icon.

Swift Xcode debug auto complete

I have been porting an app from Objective C to Swift. In Objective C I get autocomplete in the Xcode debug pane as shown. However, the Swift version does not. I may be missing something simple but after working around this for a few months I give up. Attached are relevant screenshots (top is Objective C).
I realize this may not be a language specific feature but how do you get debug autocomplete functionality in Swift like Objective C?
Try the control+Space combination forcefully at locations. Sometimes it helps.
There's also this link I found. maybe it could help:
XCode 6 isn't autocompleting in swift
Answer is late, but I want to see my answer more people for this situation.
This is not Xcode Problem. Erasing Derived data is just temporary work.
I guess you are included by one of them
Your application is support Above iOS 7 (not iOS 8)
Use Cocoapod or 3rd party app
Autocomplete is not working when you develop with swift above iOS7. Swift did't recommend to use static lib, but iOS7 support only static lib not dynamic lib.
(see this post https://blog.cocoapods.org/CocoaPods-0.36/,
http://corinnekrych.blogspot.kr/2015/04/how-well-does-swift-plays-on-ios7.html)
Change your project to iOS 8
Cocoapod will need use_frameworks! if you want to support dynamic lib.
If you use dynamic link, You don't have to write header in Bridge_header. Import it in Swift file like Import UIKit
One more trick is just clean your Project will make Swift Auto complete, but after rebuild, you can't use auto complete.

How do I translate monotouch code to xcode

I have an app written in MONOTOUCH. It works- I tested it with TESTFLIGHT. It is being added to a larger app, and that developer needs the full xcode project. Do I need to have it rewritten or is there a way to convert it easily.
There is no way to convert Mono code to Objective-C code.
There is an --xcode option that may or may not work. It has not been maintained and we do not officially support it, so I would not depend on it working.
My suggestion is to keep the two applications separate, and transfer control from one to the other by using urls. You register two url handlers "firstApp:" and "secondApp:" and when you need to go from the first to the second, you issue a Url open to "SecondApp:statevariables" and the same process is repeated to go back.
If you have a MonoTouch license, you can use mtouch --xcode yourapp.exe to generate Objective-C code. It doesn't work in the evaluation version.
Much more detail is available in this Stack Overflow answer.

Resources