Apple Watch App Image Control - ios

I have just downloaded Xcode 6.2 (Beta) and tried my first app on Apple Watch. I have tested the app successfully by putting a simple static label and ran the app perfectly. However, when I am trying to put an Image control on the Interface Controller, it shows up onn the storyboard but not when the app is launched in the Apple Watch Simulator.
Here is what storyboard shows
But this is what happens when I run the app
I am not an expert not even intermediate level iPhone developer but just a learner, so may be I am missing some thing basic.
Any help will be appreciated.
Thanks

Select the image file in XCode
Open Utilities View in XCode (The right most icon in the screenshot below)
Select you watch app target check box under "Target Membership"
heading.

Related

Black bars on all sides when running iPhone app on iPad

I have an iPhone app and I am trying to run it on iPad. But when I run I see black bars on all the sides as shown below:
I am using a LaunchScreen.storyboard file. The LaunchScreen.storyboard is set as launch screen (checkmark is checked). In the target settings I have the following settings:
Any ideas?
Screenshot:
Edit: That apple tester got it wrong. your app is good !!!
I created a new project that only support an iphone and ran it on the ipad simulator. I calculated the ratio of the screen inside it is equal to 0.69. the same as the ratio of the screen inside the screen shot sent to you by apple.
Apple tester got it wrong. looks like that is the new behaviour on the
iOS 10 and that apple test does not know it. reply to them with this
they should accept your app without resubmitting new binary.
Original Answer:
Deleting DerivedData, Clean and remove app from simultator should solve the problem. Or maybe you didn't support iPad:
Its because of app is only for iphone, thats why if you are run in iPad it shows actually iphone's view, Enable for ipad and then check.
The Apple tester did not likely get it wrong. Check the following:
Go to your app's target. In the General tab, look at the Deployment section. What is listed for Devices? If it says Universal, change it to iPhone.
Go to your info.plist. Remove any keys pertaining to the iPad. (Supported interface orientations (iPad) may be there, for example.)
Now, your app should run correctly on an iPad, even though it was made for iPhone only.

iOS launch screen does not update

I've updated launch screen on an enterprise app, but it won't update when installed on an iPad with the existing app. I've tried completely deleting the app before installing a new version, but it still launches with the old launch screen image.
I've tried installing the new app on another iPad where this app was never installed and the new launch screen appears as expected. Both iPads run the same iOS v9. The app was built with xCode 7.2
In summary I've tried the following scenarios:
updating existing app (version 1) on iPad A - with a new app (version 2)
iPad A, loads the new app v2 with launch screen from version 1
installed new app (version 2) on iPad B, which never had this app.
iPad B, loads the new app v2 with correct launch screen
then I installed old app version 1 on iPad B
iPad B, now loads the old app v1 with launch screen from version 2
It seems the iPad somehow caches the launch screen from the very fist install regardless which version it is. Deleting the app and reinstalling does not seem to help and it does not look code related as the correct launch screen images was loaded on iPad B
I just had this problem and i found that deleting the app off the device or simulator, then restarting the device or simulator seems to fix the issue.
I found just restarting the device didn't work.
I had tried many kinds of solutions and restart your iPhone is the only way.
In xcode, under Assets.xcassets, I clicked on LaunchImage and then unchecked Universal, checked iPhone, unchecked iPhone, and checked Universal again. Then ran build and it cleared the old image.
Simulators and iPhone caches the launch images.
this can help you
1>Clear the derived data under your developer/xcode folder
2>reset the device by pressing home button and lock button at same time
3>Push your code to device and it will work, if this doesnt work then creat ipa file and install using itunes after resetting the device and it will show the new launch images
The answer by Steve still holds as of iOS 13.2.3, but I wanted to add a few more items just to back up this point that otherwise exceed the restrictions of a comment.
For starters, I did delete the app, restart the device, etc but because this issue occurs when a user updates through the app store, those fixes are simply not viable.
Then, I decided to take more drastic actions within the app to try and remedy this. These actions were taken with TestFlight builds.
In my particular case, the problem stems from a version string that misrepresents the installed version.
Step 1 then was to simply remove the UILabel in question. Re-running the app would still cause the label to appear in the app.
Step 2 then was to create an entirely new LaunchScreen storyboard and set it as seen here:
Launching the app still presents the old launch screen.
This leads me to believe that something in the project structure is the source of the caching, and no reasonable changes to the LaunchScreen by the developer are going to get around this.
Update
The app has been released to the Appstore, and using the official store release, the app presents the correct launch screen.
Solution
Again, thanks to the thread I have referenced above I found a way to solve this issue - name your new image differently from the one there was before in case your new one has the same name as the old one and put it out of the *.xcassets folder to the project directory and reference it in your UIImageView. And that's it.
Just delete app from simulated iPhone home screen.
On iPhone 11 Max version 2-finger click and drag up from outer margin of the iPhone which will bring you to the home screen and exit your simulated app.
Then 2-finger click and hold your app, delete app and close simulator.
Open Xcode and click play button to run your simulation and the launch screen should be updated.
P.S. Deleting Xcode cache and derived data couldn't hurt.
See Rambo's post about the issue. At least on iOS 13 you can clear this cache yourself:
import UIKit
public extension UIApplication {
func clearLaunchScreenCache() {
do {
try FileManager.default.removeItem(atPath: NSHomeDirectory()+"/Library/SplashBoard")
} catch {
print("Failed to delete launch screen cache: \(error)")
}
}
}

iOS simulator change devices not working

So I'm working through the BNR iOS objective c book, and I want to run a project on the iPad simulator. according to the book, I change the deployment device in the general settings for the project target as "universal," which I did.
However when I run and switch to any iPad on the simulator I get drawn back to the main method of my project. The iPad does appear after a delay, but without the app I built. I've set all the views in my xibs to "inferred" but I still can't run my project on iPad.
Any help would be appreciated, thanks.
This is probably because the app is crashing. it's possible if you created the app without setting it to universal it is missing a storyboard for iPad which would cause a crash and take you to that area. You should look at the console logs and see what is happening. There should be good information in there as to what is missing or why it's crashing right away.

Missing Icons error when submitting my Apple Watch App

I get an error when trying to submit my Apple Watch app to iTunes Connect.
However, I have added all Apple Watch icons to my xcassets file and have added it to my Apple Watch App Target.
So I don't know what to do about this. Thanks!!
This is a crazy bug on Xcode 6.2 but I found an easy fix (after lots of hard work).
Apparently, Xcode doesn't work well when using same icons for the app and for the watch at the same asset catalog so just separate the icons and that would fix that.
Moreover, Pay attention that the assets resource is attached to the WatchKit app.
Just a small notice, Pay attention to have a square icon and not to include any transparency on those icons. It would be submit if you do but would reject automatically after few minutes.
I'm not sure if there is an icon spot for CarPlay in xcassets for the Apple Watch Apps or not, but I know that there is a glitch in Xcode 6.2 that has caused me to encounter the same error when I have a CarPay icon image added. When I removed the CarPlay icon, it fixed the issue instantly.
Go to the Watch App Target and click the arrow next to the App Icons Source field. Then click on an icon of your choice (doesn't matter which one). Open the File Inspector (right sidebar, first icon from left) and select the Apple Watch Target under Target Membership.

iOS application targeting iPhone still opens fullscreen on iPad?

I am developing an application with Phonegap/Cordova which should target iPhone only. I set Targeted Device Family on the project settings accordingly:
However, when I run the application on the simulator, or on a test device, it still keeps opening fullscreen on iPad, while I thought it should display in a small window at iPhone resolution.
Any suggestions on how to fix this problem?
XCode's "Target Settings" were overriding "Project Settings".
More details on this matter here:
XCode Edit Project Settings vs Edit Active Target
Actually, I've had this same problem. The fix was pretty much the same as yours but I'd like to elaborate a bit on that.
Using Xcode 4.5.1:
Go Project navigator
Click top item (This should be the name of your project, saying something like "1 target, iOS SDK 6.0)
Click on your app name under "Targets"
Then, under the tab "Summary" set the "Devices" value to iPhone (or iPad, or whatever you wish)
Then click on your app name under "Project"
Click Build Settings
Scroll all the way down to the "Deployment" section and select the proper value for Targeted Device Family EVEN WHEN IT'S ALREADY CORRECT!
That did the trick for me. I had to "confirm" that setting again and then my trouble were over. I've seen an experienced iOS dev do that thing too a bunch of times and I thought it was a tick :) Turns out it actually has an effect sometimes. I guess the config isn't always in sync with what Xcode shows.

Resources