Why does my distributed app look different than it did while debugging in xcode? - ios

I 'completed' an app and submitted it to the app store. The app was rejected because they couldn't get the app to start. They sent me images and they look different than anything that I have seen while debugging.
I created an ad hoc .ipa and loaded it onto my device and then I was able to see the same symptoms. Some images are missing, including the 'start' button.
It does not cause a crash, so I can't use crash reports to debug the problem.
Are there certain settings that I need to modify to make sure that a distributed app and a debugged app are the same?
I am using Xcode 5.1.1 and Cocos2D.
(Some of the images that are missing are images whose zOrder I modified; I don't know if this is relevant or not).
One of the missing images is 'tower_blank.png' shown in the project navigator in the screen shot below:

I found a solution that fixed the problem. I would love to get some feedback as to whether this is a good idea or not.
Under 'Build Settings->Apple LLVM 5.1 - Code Generation->Optimization Level' I changed the Release setting from 'Fastest,Smallest' to 'None'

Related

Ios share extension does not work when installed by testflight but works installed by xcode

Installed with testflight the application does appear in the list of target applications to share an image with. When I select my application icon in the list I do get a normal Post dialog. After pressing "Post" in the dialog the application does open but nothing else happens.
When the same version of application is installed with xcode the shared file is delivered and the application displays the shared image.
I am not even sure how to debug such an issue as the application installed by testflight does not appear in the list of installed applications in xcode Devices window. Nothing that I can find in device logs either.
Please suggest any approach to troubleshooting the issue.
Update: I found a way to get much more detailed logs from device than the one provided by xcode's "Devices" window: deviceconsole utility. This gives at least some information to approach troubleshooting.
Update 1: It turns out that the application installed through ad hoc ipa file exported from the same archive that was submitted to testflight shows the same problem. This allows much quicker testing turn around.
This answer indicates that the problem can be caused by "Deployment Target" of extension set above the ios version of test device. I did try different combination of this setting in the application and extension, nothing helped thus far.
Update 2: I created code-level support request with apple for this issue and provided full source of the application to them. After few months of apathetic communications they concluded that the problem is due to a bug and suggested to create report Apple Bug Reporter. I did that and after another few months of more apathetic communications the issue was promptly closed on the basis that the application does not crash. Frustrating, but I still need to resolve the problem, now looks like without help from vendor.
If the deployment target is higher than the version number of the actual phone, your code cannot run. So the only choice is reducing the deployment target of the extension to be the same as the app.
I’d check if you have somehow set different deployment targets for debug and release.

Xcode 9 issues after cloning repo

This is an app I'm helping out with remotely. I have some issues right after cloning repo..
Assets folder is marked as modified. git status results: modified: AppName/Resources/Images.xcassets/AppIcon.appiconset/Contents.json. One of many compile warnings says "A 1024x1024 app store icon is required for iOS apps". Is new 1024x1024 asset placeholder the modification that was made?
Many warnings:
The app is running well in App Store and has support for iPhoneX, so if I clone, shouldn't all this stuff be sorted out already? I still see layout issues when I run in simulator on any device size that were apparently fixed for iphoneX compatibility. When I was running Xcode 8.3 I didn't have these issues.
I need to add a feature, push and make build available on TestFlight, but I'm worried about pushing with all these compile errors & bet it wont even archive with missing 1024x1024 asset.
Question:
Should I just go back to previous version of Xcode rather than sticking with 9.1 or resolve all this stuff myself? Devs aren't really available for me to consult with since initial app was developed through full-service software dev company.
Im mainly in contact with business ops/project managers who don't really have knowledge of tech at this level. Im no seasoned dev myself so I'd like some advice here before expressing concerns with managers or getting strings pulled to talk with devs who last worked on it.
I'm hoping the first comment isn't that this question doesn't belong here. I think its a fine line.
Thanks for your time.
The app in the appstore could be submitted and released to the appstore with issues listed in the issue navigator of the xcode on posted screenshot.
So, switching to a version of Xcode which was used for a last submit to the app store by previous developers does not guarantee that those issues will be not present.
There is only one issue which you have to resolve is "1024x1024 app store icon is required for iOS app" and this can be done only within Xcode 9

App is NOT Crashing While Debugging

I am facing a strange issue in my currently working app. App is crashing when we install app through diawi or directly install using .ipa . But I am not able to regenerate the issue through debugging. I am totally confused and how can I solve the issue?
I am using Xcode 8.2.1
You can try building the app in Xcode in the Release configuration instead of the Debug configuration.
You do this by
clicking on your app name at the top left (near where you press to run the app)
choosing 'Edit Scheme' from the drop down
clicking on the disclosure indicator by 'Run'
choosing 'Run' from the three choices which appear
there is a drop down called 'Build Configuration'. This will almost certainly be set to Debug. Set this to Release.
Now when you run your app you will be building a far more optimised version - this is the version you build when you are submitting to Apple. It's just the same app optimised for speed/memory instead of debugability.
Hopefully, you should be able to reproduce your crash in Xcode now. However, you'll notice that you get far less debugging information when you hit your crash - this is because Debug builds have lots of extra information in (and are much less optimised by the compiler) specifically to make debugging easier. Being able to reproduce the crash in Xcode should give you a few more clues as to what's going on. At the least you should be able to see the chunk of code causing you issues.
Let us know how you get on.
Use crash tracking tool to track crash here is the detail about installing crashlytics

Apple Watch Simulator completely fails to start or load app with message "Waiting to attach"

The Apple Watch Simulator always fails to load my WatchKit App. The entire process has always been quite flaky, but for a reason I can't figure out, the Watch simply hangs on a black screen without loading anything. No home screen, no app, no spinner, no time or date.
I've tried:
All combinations of clean/launch/stop/quit/reload/restart/etc..
Resetting simulator content and settings
Different versions of the sim, phone, iOS, etc
Recreating the scheme
Checking the code hasn't been trashed by accident, and the "Startup Interface"
Going to the WatchKitSettings (Apple Watch) app on the sim:- it's empty.
All I see is the title (e.g. Apple Watch 42mm); the rest of the screen is black.
The only thing that's changed in the project recently is the addition of Launch Files and Icon files. But the WatchKit target does not have any of these.
It's like there's a problem somewhere down in the depths of the WatchKit installation/xCode debugger. I often get the message "Waiting to attach" in the debug navigator (sometimes repeated multiple times), sometimes the message "No Debug Session" remains.
Does anyone please have any helpful tips or experience with a similar situation that might get me building again?
This turned out to be a combination of:
a problem with the project's (Apple Watch, iOS App & WatchkitExtension) Bundle Identifier
Check your bundle IDs are all correct and the parts that need to match match
Check your provisioning profiles include the ID, are set to the correct team and match throughout the project's targets
A problem with the signing of the WatchkitBundle
Due in parts to the issues noted above, but also related to the "Skip Install" 'Build Setting' of the Watchkit App
Usual steps of reset simulator, restart xcode and machine. XCode 7 is a poor effort so far.

App crash when launching from Xcode if app already installed on device through Testflight

I'm building an iOS app for which I have Testflight set up, but now I'm running into an interesting issue where I can't properly launch the app from Xcode anymore since I registered my device to test the app through Testflight.
When I try to launch the app from Xcode, it will build fine and even launch it on my phone. However, there will be no output in the console, and a few seconds later the app will crash on my phone and I get the following error message popup in Xcode:
process launch failed: failed to get the task for process 484
If I delete the app from my phone before trying to launch from Xcode, the same thing will happen and the Testflight orange dot will still show up next to the app name on the home screen.
I have tried to change the app's version and build number, but that had no effect. I have not yet tried to unregister my device to test the app through Testflight because I would like to find a good way that facilitates both.
One way I have found to circumvent this problem is create a different app target and run the app with that which seems to work -- but I'm wondering if there is an actual solution to this problem or a better way to work around it.
Thanks in advance.
Turns out Max was on the right track - if I manually specify a non-distribution provisioning profile it will work properly by overriding the Testflight version of the app (the orange dot disappears). Not sure why "automatic" wasn't doing that for me. Thank you!

Resources