Is there a way to just apply changes in iOS simulator without rebuilding the whole app? - ios

I'm asking because this is a feature of android studio and was wondering if xcode or an external thing had something similar?

Yes, there is:
https://apps.apple.com/app/injectioniii/id1380446739 or from here https://github.com/johnno1962/injectionforxcode Also, I think you can get it through Alcatraz too if you have it on your XCode
Also, another tip if you have not made any changes and just want to attach the debugger and run the app without building you can do: CMD+Control+R which will run the app instantly without building.

It's would be very useful feature for development, if the same would be possible with upcoming version.
But unfortunately, as of now, with current latest version of Xcode, it is not possible to apply source code changes without rebuilding an application.
Nice question, it deserves space in Apple Bug Reporter...

Related

How can I create hybrid apps on IOS?

I see on Android that apps exist to create android apps. I understand nothing like this exists on IOS because of apple's terms. On IOS however, some apps, pythonista for example, allow the user to create scripts that run similar to apps. Is this functionality currently available for hybrid frameworks, IE phonegap/cordova, react native, etc? Barring this, is there some method whereby I can code and test such apps on my iPhone/iPad?
Bottom line, I want to code apps while commuting, etc, on IOS. I understand I need a computer to compile the final product, that's ok, it's just the coding/testing process I want to do on IOS.
I am up for any hack you can think of to make this work, so long as it is accessible with VoiceOver, apple's screen reader, as I cannot see at all. One example of something I thought of that won't work is using remote desktop software, there is no such software that is accessible as it uses an image of the remote screen, I have no access to this.
I am looking forward to your creativity, so far this has me stumped.
Thanks in advance.
Similar to the playgrounds answer, but if you wanted to use Xamarin you could use Continuous .NET. It’s a C# IDE for iOS. You could then use Working Copy to to keep the version on your computer in line.
The other option is to VNC into your computer at home, but if you’re on the train that might not be a great option.
It's not a solution for your problem, but if you have an iPad, you can write parts of apps in Swift Playgrounds. There you have access to all the UIKit stuff. Unfortunately some of the frameworks you can use in iOS are missing.

Test code on older iOS version

I have a piece of code that has a specific behavior under iOS9. However, I know that it didn't always behave in the manner it does under iOS9. I wanted to run it on previous versions, so I could discover when the behavior was fixed.
Unfortunately, Xcode 7 seems to only support simulators back to iOS 8.1.
Short of reinstalling previous iOS versions on an actual device, is there any way to install and run simulators for earlier iOS versions? Or, is there another method to accomplish my goal?
EDIT
This edit is to explain why I do not think this post is a duplicate, as indicated in the close request. Hopefully, in explaining why it is not a duplicate, it also better explains the issue and hopefully results in a solution.
#JeremyHuddlestonSequoia - Thanks for the input. That post has really good information. However, I don't consider this a duplicate for several reasons.
I already knew that information, and it didn't keep me from asking this question. So, for whatever reason, it does not give me what I'm looking for.
I don't consider questions to be duplicates if one is talking about the behavior of a beta release and the other is talking about the behavior oaf a production release.
I don't want to know how to install older simulators. I want to know if there is another way to run the simulators outside of the Xcode preferences. I think it is completely absurd that Apple have determined that nobody in the world needs to run older simulators with newer versions of Xcode. Thus, I'm looking for some alternative to the solutions in the possible duplicate question.
If there is no other way to install the simulators, maybe there is some online resource that has simulators available going back to iOSx.y that may be accessed, even if that access is for-pay. Or, maybe there is some online resource that runs stuff on actual devices, and I can submit my code to that resource.
Maybe there is some other way I haven't thought of for me to get the answers I am looking for. Basically, I want to know in which exact release of iOS a specific behavior changed. Thus, I want to run a small piece of code on different iOS versions until I witness the difference.
The fallback is to reinstall each OS on a device. Maybe someone knows of a way to do this programmatically so I can kick off the process and have it run on it's own. There are a bunch of possibilities, but I am unaware of what's out there to deal with this issue.
I was hoping that there was some way to install older simulators. The first paragraph of the original post explained my ultimate goal. The last sentence of the original post summed up the difference between this post and that post.
I'm not just looking for a way to install older simulators. That would be a WONDERFUL way to accomplish my goal. I'm looking for a way to test code on older iOS versions. Using the simulator is one possibility... if there is some way to convince Xcode to do it on something older than 8.1.

Can I integrate my UIAutomation Tests with XCode and set automitically run them every night?

I need to know if I can do Continuous Integration with XCode server. In example: set run the tests every night or when someone commit changes, and more..
I am trying to decide one iOS Ui Automation tool to integrate with my Xcode server
Thanks
There are a few problems here:
UIAutomation has no built in support in Xcode Server. I've filed bugs, I've chased down people at WWDC. Most I've ever gotten on this problem is basically "shrug." I'm not sure UIAutomation is a priority for Apple right now. So you're not going to get any official support.
As was noted, you might be able to use a trigger. The trigger won't be able to add anything to the Xcode Server report, besides possibly the error logging. But you're not going to get anything added to the nice report table.
Running on actual devices has traditionally been a problem (if you care about that.) The loading the app part has been a problem for us, but Xcode Server might be able to preload the app for you. In addition, it seems like this might have changed in the iOS 8 SDK.
There is just a lot of uncertainty around this sort of workflow. I'm hoping Apple eventually makes an announcement or adds a new tool, but the best answer I've gotten is if you want to go down this path, use UI Unit Tests. That's a shame because it requires knowledge of Obj-C or Swift, and means interacting with the app at an API level instead of an abstract level, but if you're looking for the direction Apple wants to see people go, that's it.
Edit 7/4/2015: As of WWDC 2015, there is a new UI Testing component as part of Xcode 7 that, in my experience, seems totally supported, and is promising Xcode Server support. I would very strongly recommend using that, and not using the Instruments UIAutomation tool.
With Xcode6 right around the corner they are adding some features to XCode Server specifically it looks like "Triggers" will be helpful for running iOS UIAutomation tools. Since you can run UI automation scripts from cmd line it should be possible to utilize triggers to run your scripts post builds. This along side the logic for when a bot should run will let you decide if it should be nightly or on every commit.
https://developer.apple.com/library/prerelease/ios/documentation/DeveloperTools/Conceptual/WhatsNewXcode/Articles/xcode_6_0.html#//apple_ref/doc/uid/TP40014509-SW1
I wrote a framework around UIAutomation called Illuminator to handle tasks like nightly test runs, pull request tests, and other automated conveniences.
It provides a flexible and extensible command line that can execute any particular subset of tests that you'd like, and produces reports in JUnit format (used by Jenkins).

Base SDK Missing

I get the "BASE SDK Missing" when re-opeing projects. (I got the latest build of xcode, and latest SDK installed.)
It seems to be happening when I quit a project, (not exiting xcode), and re-open the project after a while. I have tried both, with and without my iPhone plugged in. I have tried to fix the problem like described here, but it does not help for me. - It just makes it even worse! (unrecognizable SDK)
The only way I have managed to get it back to normal, is to do a manual re-boot of my mac, plugged in my phone, waited until it has checked my iPhone, and then, opened xcode. Time consuming and annoying!
Why does it happen and what is the trick to fix this?
Your recent upgrade of Xcode likely removed the earlier SDK that your project was set to use. There are a couple of solutions for the problem. The most simple solution is to always select the "Latest" SDK in your project's settings and not select a specific option. You may be uncomfortable with the idea and want to run your app on an older device but it's important you understand that all of the newer SDKs can generate code that works on older versions of iOS. There's a separate hard to remember option for setting the deploy target. (It took me a while to learn how/why to use this but it's well worth it.)
The second option is to actually find a version of the SDK that your project is set to and attempt to reinstall it. I suggest going this route only if necessary as it's not guaranteed to work in each case. Older SDKs may or may not work in later versions of Xcode (Eg. SDK 3.0 might not work in Xcode 4.3.2) due to major changes in the toolchains. Tools like gcc/gdb are deprecated in favor of llvm/lldb. Still, you may have a valid reason for using an older SDK. You may have to fix a bug that is present only when using the older toolchain or you may need to reproduce a problem that only happens with builds generated from your build server. In many of these cases it might be easier to upgrade where the problem occurs (Eg. upgrade the tools on the build server) or downgrade your dev environment. (Install an older version of Xcode.)
The reasoning behind the frustration is that Apple highly encourages rapid adoption of it's latest tools and technologies. It creates a better product as the dev community is forced to stay current and competitive while the users are forced to maintain upgrades to ensure apps continue to work. This is in contrast with the traditional model of backward compatibility allowing developers to support revision -n of a product/platform. It is also great for business since rapid adoption of the latest often encourages purchase of newer hardware and products to get the best experience. The rapid adoption ensures the more robust software along with bug fixes, enhancements make it to the majority of consumers overall increasing their penetration in the market.
You have to set your target and project's base SDK to "Latest" and not an explicit option. If you choose one explicitly it seems to break if you update xcode versions.

Can F-Script be used to introspect iOS applications?

Can F-Script be used to inspect iOS applications that are running on the simulator or iPhone/iPad hardware? If so, how do I attach the object browser to my custom objects?
I tried but could not get F-Script working for iOS. But in the process I found https://github.com/domesticcatsoftware/DCIntrospect.
It's pretty neat and open source.
Not yet in the trunk but a promising-looking fork by Steve White which I found in Dec 2011 in this thread in the Google Group, quoted to save people looking up:
The standard F-Script distribution doesn't compile on iOS.
Steve White has worked on iOS support and published this: https://github.com/pablomarx/F-Script/commit/19019e31da78a9ef8ecb6eed...
Hopefully we'll be able to integrate it into the main F-Script branch in the future.

Resources