I recently checked out the Swift Playgrounds App available inside the App Store where I stumbled across this interactive coordinate system view similar to the one that can be found inside of Xcode playgrounds on the Mac.
My question is if this framework is accessible for developers or if it's something Apple developed internally for the playground?
Thanks in advance.
It seems like apple is using it internally. But you can build it yourself see this blogpost for inspiration. However it's written in Swift 3 but it should be easily transferable to Swift 4.
Related
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 new to swift.
I recently downloaded some examples of swift playgrounds by apple such as Newtonscradle and Balloons, but I am unable to view them using the assistant editor of X code(I have version 8.2.1). I was wondering how I can solve this problem.
Initially, I searched for how I can download Scenekit, Cocoa, and XCPlayground because I thought my mac does not have them. However, I couldn't find out how to download them, and I am uncertain about whether this is the real problem.
I also looked at this question which was on stackoverflow, and tried out the code. However, this didn't work out either. When I put it in, it only says "Running (document name)" and stays like that forever.
Does anyone know how I can view these codes on the assistant editor? Also, I am currently learning swift through the iBook, "The Swift Programming Language Swift 3.1 edition," but are there any other ways to learn swift with an Mac computer? I want to finish making something in two weeks for the WWDC17.
Regards,
RK2
If you clone the project you linked to, and then update the submodules (the playgrounds appear to be linked to as submodules from other GitHub projects) you should have one or more .playground files under each subfolder under the playgrounds folder. Simply open the playground file you want in Xcode by double-clicking it in Finder.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Is there a way to convert an iOS app to a Mac OS X app?
I want to publish my iPad & iPhone apps on Mac desktop too, is it possible to do, if yes so for that what changes I need to do in my code.
Well you can't do it directly, since iOS use CocoaTouch and classe like UIButton, UITableView, UIViewController, ... aren't available on OS X.
You can use most of you code which is do not use any of the CocoaTouch components since Cocoa is also Objective-C.
You may think it in MVC direction. Your modal could be reuse, while the view need to redefine. And of cause the controller could be a bit different since it is a bridge between View and Modal.
rckoenes explain in framework aspect. If you think in MVC aspect, I think it could be easier to understand.
I hope it help. Thanks
iOS development is similar to Mac development but not the same: they use different GUI libraries (AppKit vs UIKit).
You could look into an open source solution such as Chameleon, which is UIKit reimplemented for Mac. It has some limitations but is also surprisingly impressive!
Otherwise, as others have said, you'll be rewriting your GUI.
I am currently building an iOS application with flash CS5 and I would need some help with a couple of the features:
Is it possible to add in-app purchases? If yes, how does that work?
Is it possible to add iAd advertising to the app? If so, how? If not, is there any good alternative that works with flash?
How can I save data from within the app so it will be there eaten if the user restarts the app and even the device (like for a headboard and such)?
Any help is highly appreciated!!! :D
If it were a few months ago. Then answer would be an unequivocal no. However, presently, the answer is "perhaps" (or if you are an optimist, "probably"). With the release of Air 3.0, it now supports Native Extensions. These extensions are native code that have a wrapper API around them so that they can be compiled in with and called from an Air application.
In fact, I decided to look around real quick while researching for this answer and found a repo where it looks like somebody has implemented in-app purchases via a ANE. But I haven't tested this extension personally, but it may be a good starting point to see how it is implemented.
The reason you wont find too much information about ANE's yet is because they were only recently supported in the Air 3.0 update that happened last month. They are currently unsupported in Flash CS5 (or 5.5) or Flash Builder 4.5. They are supported in Flash Builder 4.6, which is currently in a closed beta. But you might be able to sneak in still, and it should be released soon.
The biggest "drawback" is that these extensions need to be developed in the native format for the device you are targeting. So that means, if you want to make an iOS extension, then you are writing it in Objective-C and xcode on a mac.
Pretty much the same answer as before. It should be possible with a ANE. But I haven't found any examples of anybody doing it yet.
It is very simple to save data/state to the device. You'll want to look into the SharedObject.getLocal() method if you want to the LSO. Or you can just use low-level File writing. Check out File.applicationStorageDirectory. For sensitive information that should be encrypted into into the EncryptedLocalStore class, which I believe is supported on iOS but not on Android.
All of these should provide a good way for you to persist data between application sessions.
With AIR 3 you can now use native extensions to call into the native platform code to achieve the functionality not provided by AIR Actionscript APIs. To answer your questions.
in app purchase. I have a sample at http://code.google.com/p/in-app-purchase-air-ios
iAd. I have a sample at http://code.google.com/p/iad-air-ios/
As others have already answered use local shared objects.
what language is it similar to? cause i was looking at the dev page on apple for the iphone and it doesnt look like anything that i'm used to or know.
iPhone applications are created using objective-C as the primary language. You can also use C/C++ in the applications, but the Cocoa Touch API uses objective-C.
Also, if you have never programmed on the Mac before it will take some getting used to. Apple uses the MVC (Model View Controller) design pattern extensively in their programming model.
Here is a good site with several iPhone apps with source code:
http://appsamuck.com/
If you need a crash course in objective-C check out this link:
http://cocoadevcentral.com/d/learn_objectivec/
It's Objective-C.
Here's Apple's Programming Guide Introduction
As others have pointed out, the answer is Objective-C. For current production-ready languages, that's it. In the not-yet production ready category, it looks like the Mono folks are able to cross-compile C# to native code for deployment on the iPhone using the Apple toolchain. Much of the CocoaTouch API is not yet exposed to Mono, but it's a start.
Objective-C
Objective-C