Unabled to create single view ios app in xcode - ios

I am new to ios/xcode and I was trying to follow through the new SwiftUI tutorial. The first one has you create a ios single view app . However when I go to xcode under the ios filter that, among others is not an option for me: I have verified that my xcode is up to date via app store. Is this due to me not having a paid developer account? Are those templates in a beta channel of xcode?

Answering, as per the OP...
The tutorial in question was done using Xcode 11
In Xcode 12, there is no longer a Single View App option — it has been replaced with simply “App”

Select app and then in the next screen select "Storyboard" in the "Interface" drop down menu. That will create what you need (mainly the Main.storyboard file) for the single view app. (see the linked screenshot here below)
enter image description here
enter image description here

I don't think the "App" template that #donmag mentions is exactly the same (I don't believe it gives the same folder structure). I have a template on github for the Single View App that should match the folder structure you need, if you're still looking for that: https://github.com/jcross0204/ios-single-view-app-template/tree/master

Related

Will the Main Interface be automatically mapped to my iPad storyboard during deployment?

I'd like to deploy my first Universal app with an iPad specific version to the app store. Everything works well in Xcode, I'm able to manage 2 separate storyboards via my info.plist using the following entries:
Main storyboard file base name: Main.storyboard
Main nib file base name (iPad): Main-ipad.storyboard
Then in my Deployment Info I usually switch the Main Interface (manually) back and forth between Main and Main-ipad for development purposes.
Though, what will happen when I'll submit my app (binary) to the app store? Will the Main Interface be automagically switched based on the user device or do I have to programmatically switch the value based on the current device? So that the iPad gets the right Main Interface as well as the iPhone.
Alright - I finally worked that out. Here are the clear and simple steps that you need to follow in order to either: convert an iPhone app into a universal app, or to simply package your universal app prior to submitting the build to the App store:
Make sure you select "Universal" for devices in your project Deployment info under the General tab.
Create a XIB file (=storyboard) for the iPad. You can either copy past the iphone one or start from scratch. Name it something like "Main-ipad.storyboard" for example.
Now you need to manually do a bunch of stuff which I don't really understand why xcode does not do it automatically for us since they've introduced that "universal" project thing.
3.1 Go to your info.plist file and add the following entry to tell your project that you're using a seperate storyboard for the iPad. Add "Main storyboard file base name (iPad)" as a key and then your XIB file name "Main-ipad" without any extension.
3.2 Make sure you have the original XIB file (iphone) well setup. It should be "Main storyboard file base name" and the value something like "Main".
Now try to run your app in the simulator on iphone and then ipad see if it picks up the right storyboard.
Done!
Notes: Make sure to select the right key because I had "Main nib file base name..." instead of "Main storyboard file base...". This was generating errors when I was trying to archive and submit the build to the app store even though it was working fine in xcode!

What are the best practices for preparing an iOS demo app along with main app?

This question is about the App development/testing process. I've an app on the App Store (say ABC); now I added some features on a separate git code branch and want to show these to my teammates.
I can use TestFlight to install it on their iPhones, although that overwrites my original app on the phone.
I'm looking for the best way to get a new App, say ABC Demo, installed on their iPhones.
If you want the "new" version of the app to work alongside the old version on the same device then each app will have to have different Bundle Ids. You can achieve this by creating a new Target in Xcode
http://www.itexico.com/blog/bid/99497/iOS-Mobile-Development-Using-Xcode-Targets-to-Reuse-the-Code
two finger click the existing target and select Duplicate
Then under the new target change the Bundle Identifier to something different
Go to Targets in Xcode
Get Info on your project's target
Search for Product Name under Packaging. Change it to ABC Demo
Press Enter

iOS making a new project for an existing app

I'm remaking from scratch an app that was previously in Objective-C, to Swift. But I'm not really sure how can I make the new project be linked to the app that is already in iTunes Connect. What I mean to say is that I have a new project whose binary is supposed to be uploaded as the binary of the already registered app.
Besides using the same Bundle Identifier, what else do I need to do to achieve this?
PS: For some reason, the new project won't let me change the bundle identifier's last part: the old one was com.example.myproject while the new one is com.exmaple.MyProject (the new one has capital letters). When I click on the text box to change it to lower case, the MyProject color change to gray and I can't delete it
Go into your app's Info.plist and change the bundle identifier manually. Also, you need to have a higher app version so when you submit, the version is one higher than the one currently in the App Store (so you can make a new version and get it approved).

Beginner: XCode 6 - Says base sdk missing

I was trying to do the ToDOList project explained in the tutorial from Apple "Start developing iOS app Today". I downloaded the XCode 6 and created a new "Empty Application". The IDE looks different than how it is in the tutorial, it doesn't give me the option to choose the target device. Also, there was no code files created upon creating the project. I also see an error that says "Base SDK missing". Can anyone tell me how to resolve this.
Xcode 6 doesn’t have the “Empty Application” template any more. The one I think you used is just called “Empty”, and it creates a project with nothing at all in it. That’s not what you want.
You can start with the “Single View Application” template. If you want to empty it out, follow the instructions in this answer.

Can't run Lister app sample code (Swift) from Apple's website

I tried to download and run the Lister app sample code which was presented at WWDC for the session 406: Integrating Swift With Objective-C. (I am running XCode 6.1 on Yosemite and this is the most updated version of the Lister app from the sample code page in Apple).
https://developer.apple.com/library/ios/samplecode/Lister/Introduction/Intro.html
However I was unable to run the app in XCode which are best show in the attached screenshot.
The app doesn't have the Run and Stop buttons enabled. They are greyed out. Never had this before for any other app.
The icons for the Lister app is not showing. Instead there is this new Settings-like icon which I have never seen and have no idea what it means.
There is a ReadMe.txt file in the project that you downloaded. Have you read it because I had the same problem and by reading it, my problems were solved.
Regards
The QuickStart guide included in the project gives the key setting to change in the Build Settings to enable iCloud.
In the User-Defined section, double-click on com.example.apple-
samplecode to edit the LISTER_BUNDLE_PREFIX value.
Change this prefix to a globally unique reverse DNS string for your own
organization’s name, such as com.somecompany.lister.

Resources