Xcode M1: Run Designed for iPhone - iphone

Hello fellow [iOS] Developers!
I've just got my M1 MacBook Pro and been loving how we can test our Apps without even using our mobile devices (props to Apple!!)
So far, I was able to test the app behaviour as it was for iPad (Running "Designed for iPad"), so I wonder if there's a way to build the app as if it was for an iPhone and run it on the M1? This would be awesome!

Yes, You can.
One simple smart hack is to
uncheck iPad from Deployment info
and then simply run the app you would see that the text would change to
Detailed Steps:
Select Project from Project Navigator
Select your specific target > Go to General
Under Deployment Info "Uncheck iPad"
Bas ho gya, Khatam, Tata, Bye Bye
Just run the Project

The answer is no, you cannot, if you mean native iPhone app on the M1. At least as far as I’ve seen. The simulator will continue to offer you to run the iPhone apps, as you probably have seen already.
As far as I understand, however, iPhone-only apps available on the iPhone are an exception. Whenever an app contains both iPhone and iPad versions of that same app (universal iOS apps), Apple ignores the iPhone version and makes available the iPad version exclusively out of those two iOS/iPadOS apps.
You should watch the video by Apple, ”Introducing iPad apps for Mac”, WWDC 2019, available in the ”Apple Developer” app (you can find it on the App Store). Here’s a web link if you prefer it: https://developer.apple.com/videos/play/wwdc2019/205/
Here is a quote from the transcript of that video:
Now along those lines, there's also some apps that are just not
candidates for this technology.
One example is iPhone apps. iPhone apps are optimized for the smaller screen, so they're trying to take advantage of that small screen. We really want you to have an iPad app that's taking advantage of larger screen sizes before bringing it to the Mac.
In 2019, this was all about Mac Catalyst on Intel Macs, but I think it still holds true today on M1: it is all about taking advantage of the similarity between macOS and iPadOS in terms of the screen.

Related

How to test an app without its sourcecode and not using iPhone or iPad devices?

I want to do testing on an app which is provided free through iTunes. I do not have the source code of the app, i only have the .ipa file downloaded through iTunes and i do not have an iPhone or an iPad to install it and start my testing on the app . I want to test the app see how it works, write down scenarios and etc without using an iPhone or an iPad. I tried searching for iPhone simulators but i came to know that i cant install any apps on it, installed Xcode but i cannot simulate it until i have the source code which i do not have.
So can anyone suggest me where i can simulate an app which is provided through iTunes without having the source code ? I just want to see the app, what it provides etc without using an iPhone or iPad device
Many Thanks for your suggestions
The app will not run on your Mac. It’s been compiled for the processors in iOS devices, which makes it incompatible with the Intel processor in your Mac. I’d suggest finding a cheap iPhone 3GS or iPod Touch on eBay.

iPhone Simulator Display

I'm using Titanium to build my first mobile app. Ultimately, I need to to be universal, but I'm focusing on the iPhone initially in order to learn my way around. I'm running into a problem with image display in that I need to test both the retina and non-retina display, but I can't seem to toggle between the 2.
By default, for whatever reason, my simulator launches with the "old" iPhone resolution (specifically, the combo of iOS 5 -- so location bits mostly work -- and old iPhone hardware). I see in the simulator's Hardware menu that I should be able to switch to iPhone (retina), but attempting to do so just aborts the simulator all together.
Is there a better way to navigate between hardware/software combinations in the simulator? Can the default configuration be changed? Any tips or techniques would be much appreciated by this n00b to mobile dev. For whatever it's worth, the simulator version is 5.0 (272) and, although I'm not developing native code, my XCode version is 4.2.1.
Thanks.
Titanium has a debugger connection running between the simulator and Titanium Studio. When you switch hardware the connection is severed and titanium aborts the simulator all together.
What you can do, is create a build in titanium studio, which builds an Xcode project (project name > build > iPhone).
Then, open this build in xCode, and run it from there. This way there is no debugging session running, but you can test it on multiple devices / OS versions.
Good luck!

Is it possible to build an iPad app on the iPad?

I would like to minimize the number of devices I would have to purchase to do iPad development so it would be nice if it did :)
I suspect the answer is no because I really doubt apple was kind enough to put an objective c compiler on the device. I guess an alternate question would be what is the cheapest apple platform I could use to build apps?
You are correct. Apple wants you to develop your apps on a Mac.
Here is a link to Apple's site describing what you need. A mac with xcode is a requirement.
No, there is neither a compiler nor and IDE available for the iPad. You need a Mac to do iOS development, but even a cheap used Mac Mini will do (and no, you cannot do iOS development on Windows, I'm afraid).
First to answer your "subject question": As far as I know, NO you cannot install Xcode development kit on an iPad and thereby producing new iPad software... Apple also would like you to buy a real Apple computer if you want to do real business with the platform.
BUT
With some effort and research, you can just buy an orignal Mac OSX 10.6 or newer. Then with some tweaking and fixes, you install this on ordinary PC hardware. This is because the Apple computers today also are running on Intel CPU's and PC motherboards.
Its not officially supported nor "okay" from Apple's licensing point of view, but once you get it running the computer / OS thinks its a real Mac and then you can run and compile Mac software as its running 100% as a Mac.
I've seen tests where the owner connected iPod and iPhones to iTunes and AppStore which didnt see anything unusual, so the owner was able to buy movies and music and applications as normally.
Same goes for installing pure Apple software such as Xcode and other Mac-Only software.
You can even install some boot-manager and be able to run Windows 7 and Mac OSX on a partioned harddrive I've been told.
The "thing" is called a Hackintosh. But I was warned that it is far from every piece of PC hardware that you can make run with Mac OSX, so a lot of studying is needed before succeeding I guess.
I am not sure if this app is compatible with ipad, but it can certainly MAKE your app. You still need the SDK to compile the code it generates, and you still need to purchase the dev program to release your app to the store.
Not to mention the functionality you can add is very limited, but it is the closest to developing on the device itself that you can get.
You could use the Notes app on an iPad, or a Javascript editing app, or a cloud hosted text editor from iPad Safari, to write HTML5/CSS/Javascript for a web app. Upload the resulting web app source text plus a manifest to some web server, go to it in Safari with your iPad, test it, and save it as a web clipping web app.
That's for a web app.
If you want to build native iOS/iPad apps you need an Intel Mac running OS X 10.6.x (but even a cheaper old used Mini or iMac will do, as long as it can run Snow Leopard 10.6).
Or at least fast network access to a Mac. You could remote access a Mac using one of the many VNC or other remote viewing apps for the iPad, and develop native iPad apps from an iPad that way, but it would still involve a Mac.

Should I obtain a Mac to develop or test my iPhone web app?

I've been developing an iPhone web app on a Windows XP box using
MobiOne Test Center and Safari for testing and debugging and
occasionally using a real iPhone for testing. The problem is that
MobiOne, Safari (desktop), and the iPhone all produce different
errors. Obviously I am most concerned with the errors that occur on
the iPhone, since that is the target device. (An example of the type
of error encountered is that an image that ordinarily appears as
expected occasionally cannot be displayed, so the little question-mark
icon appears instead.)
I have the opportunity to obtain a Mac for development, but I need to
know whether using a Mac will make a difference.
Have any of you moved to the Mac for developing or just testing a web-only iPhone app?
Is doing so worthwhile? Why?
Does the iPhone simulator in the SDK simulate an iPhone better than Safari on the Windows desktop?
Is there a reason I would need a paid subscription to the Apple iOS Developer Program?
Thanks!
In short: no, I don't think a Mac is necessary for developing iPhone web apps, especially seeing as you have access to a device to test on, and you seem to be fine in your progress of development.
If you're not aware, there's a debug console available on Mobile Safari on your iPhone. Go to Settings > Safari > Developer (at the bottom) > Debug Console and turn that on.
When developing an iPhone web app, you do not need to pay for the iOS Developer Program. That program is for developing native apps to deploy either to your company or the App Store only.
Web apps, on the other hand, are nothing more than web sites that are designed (i.e. include certain meta tags, have mobile-friendly interface designs) to be run similarly to native apps on a device, and harness certain Web technologies such as geolocation that are available to devices. Users view them in Mobile Safari like any other web site, but for the best experience are asked to tap on the + sign and add your web app to their home screens to be accessed as such.
The iPhone Simulator certainly does a better job than desktop Safari on either Windows or Mac OS X since its user interface shares that of the iPhone device, but I don't think you'll need it for testing and debugging if you have a device to test on.
The iOS SDK has a tool called Dashcode but I don't think it's much of a difference from the web dev IDEs that the rest of us use every day. As far as I can tell, Dashcode doesn't give your web app any additional features that can't already be implemented using the standards we're familiar with.
I would not buy a Mac or a paid subscription to the Apple iOS developer program unless I was writing native iPhone applications.
You should be fine with your current configuration. Just make sure you do the bulk of your testing on the actual iPhone, that is what your customers will be using.
Does the iPhone simulator in the SDK simulate an iPhone better than Safari on the Windows desktop?
Yes - there are some significant differences between MobileSafari and Safari for Mac/Windows - but you've got an iPhone to test on. The iPhone Simulator offers no additional debugging tools for iPhone web apps, so you're not going to be better off having it available than just testing on the device.
Testing on an actual device is better than testing on any of the Simulators, since that is what you mobile customers will actually be using.
If you are strictly building web apps, your money might be better spent on more test devices (devices with and without a Retina display, iPad, maybe an old used iPod Touch running some prior version of iOS for regression testing, etc.) If you are choosy about your colors, the color can vary quite a bit across devices, so it may help to find one warm display and one cold one (from old/different manufacturing lots, etc.).
So you don't NEED a Mac (unless you have other reasons for acquiring one).
Buy an iMac. You will enjoy the experience better.
It is my understanding that your application needs to be compiled on a mac before it can be sold in the app store.

How can I test my iPad app on my actual iPad?

I am developing my first iPad app using the iOS SDK 4 and Xcode 3.2. I have written a simple Hello World and have been able to run it in the iPhone simulator. I would like to figure out:
How can I get an iPad simulator?
Is it possible to test my app on my actual iPad without signing up for a developers license for $99?
Thanks,
Mike
There are unoffical ways to get your app onto your device, you have to jailbreak it and install software called AppSync from cydia. This voids your warranty if Apple find out (restoring the device to it's original settings using the restore button in itunes means they can't tell, so jus trestore before you go to an Apple shop) and if they do find out it might prejudice them against you as a developer (but chances are very slim)
(I have no problem giving specific details as the US Government has said that jailbreaking is legal)
http://www.pcworld.com/article/201892/us_government_iphone_jailbreaking_is_fair_use.html
The SDK includes an iPad simulator. I don't have my Mac in front of me, but you should be able to choose which device to target when you launch the simulator. You can also switch between iPhone and iPad mode from within the simulator - check the Hardware menu.
Yes, you have to have a paid developer membership to deploy code to your device. That's the only official way.
If you have jailbroken, then install app sync from the Hackulo.us repo. Just sync your app in iTunes without signing it. It will work easy as Pi!
This is yet another way to keep flash from getting to iPads, if you could put your own on the device without going through apple then you could also put someone else's. I think it should be allowed, but if something doesn't work on software that isn't officially released it shouldn't be supported by Apple.