Xcode project won't build, has no devices except Mac - ios

I duplicated a project called Spartan App, and made the necessary changes to rename project to Wolverine App. The app is working great on my simulator and device so I pushed it up to Github for another developer to continue work on.
When the other developer opens the workspace, Xcode 6 doesn't seem to recognize it as an app. It still has the "Spartan App" as the target, and the only device shown is Mac. Neither of us know what's going on. Tried clearing and re-initializing the repo but that didn't help.

Check the Devices in your Wolverine App.xcodeproj menu. Check that it's set to iPhone/iPad (whichever you're working on, or both). These files don't really play nice with git, unless you set them up to. See this link to try to make collaboration better for the future https://robots.thoughtbot.com/xcode-and-git-bridging-the-gap

Related

App won't reopen after closing

I'm developing an iOS app.
I have placed it in a workspace with other targets (frameworks) that I use in the app. I can run the app fine, but once double tap the home button and I close it completely, I can't run it again.
I tap on the icon, and sometimes it launches the app then quits immediately, or sometimes it simply doesn't open it.
Is there a way to fix it or to find what is causing this problem?
PD: the reason why I'm doing this is to test wether reopening the app from a local notification loads the correct data for the notification that has been opened. Trying to open by tapping on the notification doesn't work either.
Neither the debugger or the console are printing anything out.
This happens when you use frameworks in your project that were not customized to work properly in the simulator. Basically, the iOS simulator uses i383 (for 32-bit) and x86_64 architectures, rather than the arm and arm64 architectures that the real devices use. For some reason, when you create a framework, Xcode doesn't set it up to retain the compiled i386/x86_64 architecture code after the app is quit. It will, however, retain the compiled arm/arm64 code, so you can be sure that the app will function normally on real devices.
I personally get around this issue by using real devices when I need to test features that rely on quitting and relaunching, but there are ways to write custom build schemes on your framework to fully support the simulator. I'm not going to put a link here, though, because the specific workarounds are very diverse and I myself have not tested any of them.

iOS App takes long to launch

I've been experiencing, of late, a weird problem with every App I create. When I deploy it to a device, I notice that it takes a long time to launch. Whether I'm debugging via Xcode or just launching it anywhere, anytime. When I tap the App icon, it takes about 4 seconds before the actual App launches. During that time, the device is pretty much frozen until the App launches.
However, I have an App that's been distributed through the App Store and it doesn't seem to have this problem. It launches immediately. But when I provision my phone via Xcode (the same App that's on the App Store), I experience this problem.
My question is, is there some sort of debug info that's built into the App binary that causes these long delays during launch that's not built into release versions? If so, is there a way to disable it on debug builds?
I believe it's bug on xcode 6 I've experienced the same issues. I've figured out a way to launch my apps quicker.
Set Xcode to build into a fixed DerivedData location—otherwise every time you blow away DerivedData, you’ll have to repeat all these step. Go to XCODE
Settings > Derived Data > Advance > Select "Unique"
Make a new script. Say: quick_compile.sh. Give it the standard “#!/bin/bash” or whatever at the top and chmod +x it. 3. Do a clean build of your project. 4. Go to the Xcode Report navigator (Cmd-8), and choose the report for your recent build. 5. Type “merge” into the upper-right hand filter, expand the log for the “Merge Khan_Academy.swiftmodule” phase, and copy the contents minus the first line into your script.
Do the same for “i386.swiftmodule”. 3. Do the same for “link”. 4. Do the same for the file you’re iterating on (e.g. ContentItemView.swift); put this at the top of your script
Once you’ve got this set up for a file, just run your script to update the build for that new file. 2. Launch the app with Cmd+Ctrl+R in Xcode.
You’ll have to repeat these steps whenever new files are added to the project or to change the file you’re iterating on, unfortunately, but it’s good when you’re working on something focused
I Learned this efficient method from #andy_matuschak twitter he made
a post a while ago on how to do this so i don't take any credit for
it. I believe he released a PDF explaining it better. If you can't follow these instructions look for the pdf file
I was seeing the same problem #purrrminator was. I have an iOS 8.3 device used for testing here at a large company with a good number of provisions that ultimately found their way on to this thing. I app I'm testing now was taking many seconds to launch.
Based on:
https://apple.stackexchange.com/questions/148792/installed-provision-profiles-not-seen-on-ios8
What I did was set the time manually to a date well into the future allowing the existing provisions to expire and get auto-pruned. A quick reboot (for good measure) and a fresh install of the app and I was good to go (a reset was not an option for me).
Try to reset phone settings (not content!). It may solve some performance problems occasionally.
The only reason that I've experienced the same problem was in fact that I got tons of provision profiles installed on the device. Our development team has over 100 apps, so iOS has to deal with all the provision profiles mess while launching the app.

Build on device from Xcode versus downloaded from TestFlight - Issues

I have an issue when running my project on my device, but only if it has been downloaded from testFlight. It works fine when I build directly from Xcode to device.
Potentially relevant details -
Using AVCaptureSession, my app records segments of video where it can switch between front/rear camera etc. I have handled orientation of each video so when playing back or merging with multiple videos they all play the correct way round.
The playback orientation works as expected on my devices when I've built directly from Xcode. Though from the app dowloaded from Testflight, the orientation of the videos are wrong way round.
Devices used iPhone 5S - 8.1 & iPad 2 7.1
As mentioned, this is only an issue from TestFlight builds. I've not posted any code as logic works fine from Xcode. I have used TestFlight a lot over the past year and not come across an issue like this before. It only seems isolated to this video playback.
If anyone has had similar issues and knows how to resolve or has suggestion, that would be much appreciated.
I discovered why my testFlight build was acting different from my Xcode build and it all came down to Build Configuration settings within Xcode
I edited scheme which which brought up build options and within the Run option I changed Build Configuration from Debug to Release.
Although this never solved the video issue, it did allow the app to act as it would on release. I will now be able to continue test of my issue, but thought other people experiencing differences in their Xcode and test builds may wish to know about this setting.
Do you happen to be using Swift. Apple changed their certs and added an extra field as part of the process. Existing certs do not work when including external libraries that include Swift code. I lost a good chunk of time to this. Here is the explanation form TestFlight competitor AirSign.
https://www.airsignapp.com/ios-apps-using-swift-crash-when-signed-with-inhouse-certificate/
If this is the case, the conclusion is generate a new cert and a new provisioning profile using the cert. You may have to revoke your old cert if you have too many.
If you build directly from your machine you are using your development Cert. If you go through TestFlight you are using you distribution cert. What happens if you take the distribution ipa that you are about to upload to TestFlight and try to install that directly onto you device. IF you can not install the app then there is an issue with your distribution cert. I also assume you tried building a new hello world type app and going through TestFlight and then adding AVCaptureSession in a new build of the app and trying that.
To make my life easier I use iFunBox to directly install test ipas directly on my machine bypassing iTunes. Great free app. Just launch, Choose Install on Device and choose the ipa
http://www.i-funbox.com/ifunboxmac/

Old interface displayed after Application update

Sometimes, i have strange behaviour while running new version of my applications (native ios application, developed under XCode 4.3).
It seems like some old interface parts displayed, while running new version of application.
It occurs on IOS simulator and on real device, connected to developer machine.
Deleting Derived data doesnt help. Cleaning sources doesnt help.
Deleting and Reinstalling application helps, but i afraid what some users can see old interface.
How to be totally sure what users will see new interface ?
I took a look on similiar question here and there but didnot found answer - how to be sure what users will see new interface after application update. Reinstaling application is not solution.
I dont think you need to worry about this happening when updating through the App Store, as the actual app update procedure is that the update is installed to a new directory, then user documents are copied over, then the old app is deleted.
Better described here What precisely happens when iOS installs an update to an app?
I know for sure that deleted or renamed resource files (like .xib files or images) remain in the bundle on the device or simulator, even if you clean/rebuild the xcode project.
The only way to make sure those files are gone completely, is to remove the app from the home screen, like you described. So I think the undeleted files could be part of your problem.
Also check if you have changed something about the localized .xib files or .strings files.
I'm pretty sure, that if the problem goes away when you delete the app from the home screen, then no end user will encounter your unwanted interface parts.

iOS apps without developer license / app store

I'm new to iPhone development and was wondering if there is a good/easy guide I could follow to install an iOS app on a jailbroken phone without joining the developer program.
Basically, I don't know if I'm going to have the time to learn everything I need to learn, but would like to make a start and see where it leads. Once I have something decent put together I can make plans to go through official channels.
I followed a guide that I found in SO, but when launching the app it immediately dies/crashes back to the springboard. So I can only assume I did something wrong, or the guide is outdated.
I'm using iOS 4.3.3 and xCode 4.
here is the link to the guide I followed: iPhone App Minus App Store?
Thanks
Just to get the warning away.
I just found a guide that worked for me: How can I deploy an iPhone application from Xcode to a real iPhone device?. all I had to do was change the 4.2 in one of the commands to 4.3
With Xcode 7 it's now free to run your apps on your iPhone, iPad or Apple Watch (beta): https://developer.apple.com/xcode/
Now everyone can get their app on their Apple device. Xcode 7 and
Swift now make it easier for everyone to build apps and run them
directly on their Apple devices. Simply sign in with your Apple ID,
and turn your idea into an app that you can touch on your iPad,
iPhone, or Apple Watch. Download Xcode 7 beta and try it yourself
today. Program membership is not required.
This isn't my own method, but I thought I'd help you out since I've just read this elsewhere:
Answer by WrightsCS
There's a way you can do this.
You will need ROOT access to edit the following file.
Navigation to /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk and open the file SDKSettings.plist.
In that file, expand DefaultProperties and change CODE_SIGNING_REQUIRED to NO, while you are there, you can also change ENTITLEMENTS_REQUIRED to NO also.
You will have to restart Xcode for the changes to take effect. Also, you must do this for every .sdk you want to be able to run on device.
Now, in your project settings, you can change Code Signing Identity to Don't Code Sign.
Your app should now build and install on your device successfully."

Resources