Overview of Xcode

Using https://appicon.co/ it was easy to generate the all icons and for free.
edit: when doing so, do not activate the alpha channel-the icons should not be transparent.

@Simeon, i stupidly upgraded to ios 13.4, this then obliged me to upgrade to Xcode 11.4. When i build now i get the error message…

module compiled with Swift 5.1.3 cannot be imported by the Swift 5.2 compiler: /Users/paschalcoyle/Library/Mobile Documents/com~apple~CloudDocs/Documents/codea apps/evtdisplay200323/Frameworks/RuntimeKit.framework/Modules/RuntimeKit.swiftmodule/

I guess this means you might have to update the export code, or can i force Xcode to use Swift 5.1.3?

Yes, sorry about this I will work on getting it upgraded.

I’ll make sure you have access to working export in a beta version soon

Posted a related question (https://codea.io/talk/discussion/10449/incompatibility-xcode-11-4-swift-5-1-3-cannot-be-imported-by-the-swift-5-2-compiler) before @piinthesky pointed me to this one.
Not sure if that helps, I was able to get the build working and then install and run the app kinda successfully. Kinda because of the assets issue, which I think is simply a matter of sticking to the ‘old’ way to addressing assets. Details here in the link above.

i came across a nice summary of the app submission process here:
https://codewithchris.com/submit-your-app-to-the-app-store/

continuing the app submission (mis)adventure…

Finally, with the latest Codea beta (215) the app does validate in the archive step and I am allowed to distribute the app to the app store connect. Each time so far it has come back within 10 mins with an email saying i should fix something!

The second time was that i should increase the bundle version, it cannot be the same as the previous submission. In the info.plist there is a bundle version and bundle version short. I increased them both from 1 to 1.1 and that seemed to work.

The third time it says the upload was successful, but suggesting that next time the “app’s Info.plist file should contain a NSLocationWhenInUseUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data.”

Anyway, it was actually successful and now in the app store connect I can see the 1.1 build listed-that’s reasonable progress for today!

@piinthesky yes a lot of those issues are part of the nature of submitting apps to the App Store, it’s significantly more complex than you’d expect (especially with all the privacy-related descriptions you must include, entitlements for particular services, and so on)

Good work getting this far!

Do you think it’s worth keeping Xcode export as a feature in Codea?

@Simeon @piinthesky I would like to get my apps in the App Store sometime in the future. Is the Xcode export not working? If the answer is “yes” how else would I get my Codea project to Xcode…,my computer is being repaired atm so I cant find out for myself, but would like to plan for a work around if need be.

@Jarc it works now, but using Xcode can be quite in-depth and you will have to do some work in Xcode (not coding, but in terms of how you package your app, icons, code signing, privacy usage descriptions, and so on) in order to deploy to the App Store

@Simeon no question you have to keep the xcode export! Isn’t it the dream of every amateur coder to be able to create their app and make their fortune on the appstore!! of course they won’t, but nevertheless I suspect it is a strong motivation for many people that purchase Codea. Now the export is working, it should not be so painful for others to go for it. I hope my ‘sort of blog’ on this thread will help people to do so. Also if xcode comes to the ipad-then things will get even easier and people will not need to have a mac at all.

@Simeon - I’ve been following this thread picking up a few hints. But, at the moment, not feeling confident enough to launch into the Apple store. So, just to builld up some experience - what do you need to do to build a local app on your Mac (designed for iPad) which you can install on your own iPad. Also what are the steps/issues involved.

I am sure there are a few other forum members who would be interested in this.

@Bri_G using Codea 3.2.1 you should be able to export the project and build to your device using the latest version of Xcode. You do need to sign up for a free developer account at https://developer.apple.com, you can then add those account credentials to Xcode’s preferences which will allow Xcode to manage the code signing requirements for you

You will not be able to build to the iOS Simulator — I had to remove that capability (hopefully temporarily) as it was preventing builds from being able to be submitted to the App Store.

Definitely interested in the XCode export capability. @Simeon, I will soon be experimenting with this process. As of right now, I do not know what is involved. Is the whole process hidden ‘under the hood’ of Codea? Is there (or going forward, could there) be some way to open source the export process, so the community can develop/maintain that capability? Similar to Shade’s export plugins?

@brianolive as of version 3.2.1 Xcode export works. You end up with a zip file containing a project that can be built and run on your device with the latest version of Xcode — though it cannot be run on the simulator

The problems with Xcode export I see most often are:

  • Xcode is a large and complex application
  • Handling code signing, creating the correct icons, adding the correct privacy usage descriptions, and setting up your application metadata is not simple
  • Getting through App Review can be tough

Is there any way to use Codea or Shade for part of an application? In other words, does what gets exported from Codea always create a brand new XCode project, or is it possible to combine code developed in Codea (for example, maybe the main gameplay) with code written in XCode (to leverage the Apple API, maybe, for example, for some UI elements)?

How do most game developers do these things for apps? For example, I believe people develop with Unity, and then get that somehow into an app store app, right? Are most serious game developers using other dev environments and then bringing their code into XCode somehow? I’d like to better understand all of this. Maybe this thread/forum isn’t the place for it, but how Codea and Shade could be part of my larger toolset - that definitely interests me.

Yes it is possible to combine Codea’s engine with a UI layer. This is what we did for Shade

Shade was written in Codea then exported, then the rest was built on top of it

However that path is quite tough, you have to be fairly competent in C/Objective-C++/Swift. Because you’d need to write bindings for Lua in C in order to expose the native functionality you want to your Lua code

There’s a starting point in the exported Xcode project called CodeaAddon. This is how we built Shade, it lives as a ShadeAddon with lots of native code bridging the Codea engine to additional functionality and UI that Shade needs

Regarding Shade, at this point I’d prefer to use it to write shaders for any native iOS applications I develop (whether Codea is part of it or not). Obviously I’ve been enjoying learning Shade, as you’ve seen on Twitter. Will using Shade in a native iOS app require some export plugin? I’m so early in getting oriented with iOS dev, I don’t even know what frameworks/third party applications people use for graphics in games. Should I just start doing my homework on using Metal?

Depends on the output. Shade can export to Unity and the latest release adds a SceneKit (Metal) exporter. So if you were using either of those two platforms you could use a Shade file

@Simeon i wanted to add some missing .mtl files to the .codea package on my mac. I tried to do this by opening the package and copying over the .mtl files to the pacakge. But when i run the app on my ipad it does not work.

Is there a way to add file to the package on the mac without having to go back to Codea and remake the export?

Opening the .codea package and copying the files in should be the same as adding them inside Codea. Did you right click on it in the Finder and choose “Show Package Contents”?