How to publish iOS Apps on Mac desktop [duplicate] - iphone

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.

Related

Swift Coordinate System View

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.

Best practice in SWIFT to detect whether WKWebview is available?

I'm developing an iOS app that wrap a single-page-web-app in SWIFT. I'm targeting iOS 7 and above. I'd like the app to use WKWebView and fall back to UIWebView for iOS 7. Detecting the OS version is one way, but I don't think it's the best practice. I know there must be a simple way to detect the feature, but I'm new to SWIFT. Thanks in advance for your help.

Possible to write i-phone app in python [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Can I write native iPhone apps using Python
I just googled whether it is possible to write an i-phone app in Python and
got very confusing, and not super good results.
Is it possible? And if so, what module(s) do I need to install?
You can use PyObjC on the iPhone.
http://pyobjc.sourceforge.net/
You need to jail break your iphone for this to run.
They have a tutorial too which of course comes top of google search.
http://www.saurik.com/id/5/
No. You would either have to write it natively in Xcode and objective-c or use something like PhoneGap http://phonegap.com/ which ends up being compiled to objective-c anyway.
Technically for jail broken iPhone yes as you can do anything. However for a mainstream app that passes the app store rules you need to use objective C.

Flash iOS applications

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.

ConnectionKit & iPhone SDK

I'm still getting my feet wet with the iPhone SDK, but I'm wondering if it would be possible to get the ConnectionKit framework working for an iPhone app. I know it was developed for the desktop OS, so I'm not sure what sort of dependencies it has and whether or not it could be shoehorned into the iPhone OS.
In my case, I would like to use its FTP functionality, though having access to this entire framework could prove useful for future projects as well.
Any ideas or experience trying this?
In case it helps, here's the official ConnectionKit site: http://opensource.utr-software.com/connection/
The site was a little light on documentation.
The big question is what Cocoa classes it depends on. Since it is doesn't include any UI code, it should be based on Foundation classes. Foundation in Cocoa Touch is similar to, but not exactly the same as on OS X. Just check out what classes it uses.
The other obstacle is building the framework as a static library. Since the iPhone does not support frameworks/dynamic libraries, you have to build a static library to use it in your code.
That should help get you started.
There are two primary issues. One is static library and other is NSHost class that is supported by cocoa - but not cocoa touch. First one is doable - but the second one is doable if and only if you are familiar with Mac OS networking internals.