Built App in Xcode 10, now stuck on LaunchScreen after upgrading to Xcode 11 & Simulator iOS 13 - ios13

I've seen some questions on here with problems after updating to Xcode 11, but haven't seen a solution that really helps me. I've been building my first app for a few months now. I updated to Xcode 11 to test it on my physical iPhone 11 Pro. Now, whenever I build and run on a simulator running iOS 13.0 or higher, I get no errors, but the app never makes it past the LaunchScreen. In the debug area, it says that the first View Controller in my Main.Storyboard has loaded (prints out all the print statements I have in the VC code), but the launch screen stays on the simulator. Interestingly, if I change the storyboard entry point to a Dummy View Controller with a green background and a label, that VC will display on the simulator.
I know that I'll need to update my app using SwiftUI and SceneDelegate etc soon, but I would like to release the app as is (while I learn SwiftUI and the new Xcode capabilities) if it's possible to make it compatible with iOS 13 without doing a lot of work for the time being. Is this possible or not?
Below is the output from the debug area and a screenshot of my project navigator and my info.plist.
Thanks in advance for any and all feedback!
capsule home loaded
812.0 frame height
Optional(file:///Users/christophermurray/Library/Developer/CoreSimulator/Devices/A61D294D-A5DC-4CF2-83C4-68AECCF80A65/data/Containers/Data/Application/AC4D353D-B367-4D58-8B26-9E0C5DEA5E41/Documents/default.realm)
26CF4CCF-5D21-4809-B1D1-7CA833F6181A
Capsule {
itemArray = List<string> <0x6000004b4e10> (
);
buryDate = (null);
digUpDate = (null);
itemID = 2CDF3EB3-5573-4401-AF21-47AAAF89B6BB;
} added to realm
1 # of Capsules
LazyFilterSequence<List<StoredItem>>(_base: List<StoredItem> <0x600003820600> (
), _predicate: (Function))
0
true
check update status ran
(0.0, -362.0, 375.0, 0.0)
(0.0, -362.0, 375.0, 0.0)
2019-12-24 17:30:01.476817+1100 TimeCapsule[81727:3933767] Version 4.3.0 of Realm is now available: https://github.com/realm/realm-cocoa/blob/v4.3.0/CHANGELOG.md
Project Navigator and info.plist

If empty view controller works correctly then issue with your code or with third-party libraries. Per your log we can see you are using old Realm library, there are fixes for Xcode 11/iOS 13 in new one and it is strongly recommended to upgrade. Other dependencies may also have useful fixes for new iOS release.

Related

Uno Platform Pathicon no longer displays correctly

My app uses PathIcon for the bottomnavigationbar. There was an update on the package Uno.UI - it was the update from 3.10.0-dev.474 yo 3.10.0-dev.479. Once I updated to 479 or later- my pathicons are now washed out- to the point where I can barely see them. The code in my app has not changed. What should I do? For now I have reverted to 474.
Here is an example:

Getting error when trying to use AVPictureInPictureController in iOS 13 or tvOS 13

I have small app which runs on iOS and tvOS where I’m displaying a video in UIView.It does support iOS 12 and tvOS 12.
Now want to show PIP for tvOS hence trying to use AVPictureInPictureController gives error “Use of undeclared identifier 'AVPictureInPictureController”.
Even though deployment target set to tvOS 13. In Xcode, capabilities -> Background mode -> enabled “ Audio,Airplay and Picture In Picture”.
This basic code gives error.
#import <AVKit/AVKit.h>
if ([AVPictureInPictureController isPictureInPictureSupported]) {
// code
}
Any other settings missing or something else I need do ?
Thanks
Not supported in tvOS, as stated in Apple's documentation
SDKs
iOS 9.0+
macOS 10.15+
Mac Catalyst 13.0+
POSSIBLITY OF ISSUES DUE TO THE GAPS IN IMPLEMENTATION :
Experince with the AVPlayerViewController:
Initially make Sure that we set Playback audio category, Generally when we use a AVPlayerViewController to play video content. PIP mode will automatically get invoked if the developed application enters background , but only if satisfies the below mentioned condition,First one is the Player which we are using should be in Full Screen mode,the second is we should make sure that the Video Should be Playing in it and third one is PIP Should be supported by the device and last of all write delegate method to restore our player UI when the user returns from Picture in Picture mode.
Implmentation with _AVPictureInPictureController :
You can find an working example in the below thread.
How to display AVPictureInPictureController?
Drilling down the issue:
In order to confirm the undeclared error was not due to the gaps in implementation and it was due to environmnet in Xcode, Download the source and then add the Sources folder inside another folder in your workspace.Add the folder using "Add Files to ..." option and now verify inside xcode.
POSSIBLITY OF ISSUE DUE TO REFRESH IN THE XCODE
Try Fix By Approach 1
Include the class explicitly in header and/or body - instead of the *.pch file. Then this error might go away. Also deleting the derived data workes once in a while. Did you change the location in preferences recently by any chance. Some get this error when they use a ramdisk for derived data and then they go back to default. This is the most annoying case - since it causes this error to appear then in almost every file.
Try Fix By Approach 2
Sometime a simple solution might help delete one of the #import lines from the pch file and recompile which will fail as expected.Then put the deleted line back in, recompiled and it compiled normally with all the false errors gone.
POSSIBLITY OF ISSUE DUR TO XCODE ERROR CACHE, FOLLOW THE BELOW STEPS
Clean Build : Command-Option-Shift-K to clean out the build folder.
Reset Simulator : choose iOS Simulator > Reset Content and Settings
Restart Xcode
Delete your DerivedData folder in ~/Library/Developer/Xcode/DerivedData
Restart Computer
Delete the /var/folders in a very targetted way.
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
Source:
How to Empty Caches and Clean All Targets Xcode 4 and later
Xcode "Use of undeclared identifier" errors, compiles/runs just fine
Use of undeclared identifier in Xcode 9.0
https://developer.apple.com/documentation/avkit/adopting_picture_in_picture_in_a_standard_player
To create a simple video player
First, you'll need to implement a basic video player in your project's ViewController.m file, like so:
#import "ViewController.h"
#import <AVKit/AVKit.h>
#interface ViewController ()
#property(nonatomic) AVPlayerViewController *playerViewController;
#end
#implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor blackColor];
// Create a stream video player.
AVPlayer *player = [[AVPlayer alloc] init];
self.playerViewController = [[AVPlayerViewController alloc] init];
self.playerViewController.player = player;
// Attach video player to view hierarchy.
[self addChildViewController:self.playerViewController];
self.playerViewController.view.frame = self.view.bounds;
[self.view addSubview:self.playerViewController.view];
[self.playerViewController didMoveToParentViewController:self];
}
#end
For further help go through https://help.apple.com/xcode/mac/8.0/#/dev51a648b07

NSLog for Console window

I just upgraded to Xcode 7 and I can no long use the NSLog statement to show messages for debugging? NSLog(#"I am at the start of the loop"); This used to work and now I can't even write the statement in the code, it gives me a "expected parameter declarator"? What am I missing? I researched this and can't find anything saying it's changed. One day it worked and now it doesn't. I can find it in my older projects and it still works within those older projects. Any help would be appreciated.
Try Shift +  + C (equivalent to View > Debug Area > Activate Console)
Credit to this original answer

C4Camera example crashes on XCode 4.6 and XCode 5

The main example https://gist.github.com/C4Tutorials/5399635 crashes in the simulator with the following error: NSInvalidArgumentException', reason: '*** Can't add a nil AVCaptureInput'
It does work when launched on hardware. Is this a known issue or is there a workaround?
i think you can prevent the crash by checking the availability of the AVCaptureInput object before you add it to the AVCaptureSession.
to simplify it check the below code this will prevent the crash on the simulator but it won't help you test it.
try to find where ever you add a AVCaptureInput to a AVCaptureSession and put the following piece of code .
if ([session canAddInput: backCameraDeviceInput])
{
[session addInput: backCameraDeviceInput];
}
i wish this was helpful :)

Optionally use Flash 10.2 cursors, while still being compatible with Flash 10.0?

I have a Flash application that requires Flash version 10.0 to run. I want to add native mouse cursors, which were introduced in Flash 10.2, but I don't want to require all my users to upgrade, and I don't want to have to compile two separate versions of my app.
Is there any way at runtime I can detect if the cursors are available, and then use them?
It seems like if you only compile for Flash 10.0, it marks the SWF version header "10", and you have no access to the new APIs. And if you compile for Flash 10.2, it marks the version header "11", and you have access to the new APIs, but can't run in the old Flash player any more (I get crazy errors while it's loading the Flex framework like:
VerifyError: Error #1053: Illegal override of play2 in org.osmf.net.dynamicstreaming.DynamicNetStream.
ReferenceError: Error #1065: Variable _379fa43169660c76f131cadc0adfbfe8f347bd31d3ceec26a9cb2a56f0dda1f9_flash_display_Sprite is not defined.
Something like this should work:
var bitmapDatas:Vector.<BitmapData> = new <BitmapData>[new BitmapData(32,32,false, 0xFF0000)];
var MouseCursorDataClass:Class;
try {
MouseCursorDataClass = getDefinitionByName("flash.ui.MouseCursorData") as Class;
}catch(e) {}
if(MouseCursorDataClass) {
var cursorData = new MouseCursorDataClass();
cursorData.data = bitmapDatas;
Mouse["registerCursor"]("test", cursorData);
Mouse.cursor = "Xmas";
}else {
var customCursor=new Bitmap(bitmapDatas[0]);
addChild(customCursor);
stage.addEventListener(MouseEvent.MOUSE_MOVE, moveCursor);
}
function moveCursor(e) {
customCursor.x=mouseX;
customCursor.y=mouseY;
}
And in fact the MouseCursorData object gets created and is valid in 10.2, but for some reason the browser crashes when trying to call Mouse.registerCursor(). I'm publishing for 10.0 though, so probably if you publish for 10.2 the whole thing works properly on both 10 and 10.2.
if (Mouse["supportsNativeCursor"])
{
// do stuff with MouseCursorData...
}
Notes:
This is equivalent to calling the property Mouse.supportsNativeCursor, but since supportsNativeCursor isn't supported either prior to 10.2 you need to check the property like this
Some devices may not support cursors even if they have 10.2 (Android tablets don't have cursors) -- so be aware of that too!
You may want to set this to a boolean because evaluating it probably gives a performance hit
Thanks to this video for this information. Skip to about 7:40 in the timeline :
http://www.youtube.com/watch?v=rtc3DYSuahI&feature=player_embedded#at=464
It's the video to accompany this article : http://everythingfla.com/quickies/native-mouse
Basically the solution is as follows:
I don't have a definitive answer on this, but here are some thoughts.
Have you tried building your base application for 10.0 in one SWF, putting the 10.2 code in another SWF that is compiled for 10.2, then doing a version detect and loading the 10.2 SWF if the Flash player is capable of the features in the sub-swf?
I am not sure if this would work, though. In the FP6, FP7, FP8 days, the root SWF controlled what features were really available, no matter what Flash player you were running in. For example, if the root was for FP6, a subswf for FP7, and running in Flash Player 8, you would still be (mostly) limited to FP6 functionality. Some FP7 features would work, but not all. It has been several years since I have had to do this, so I don't know how this works with the AS3 engine.

Resources